@decocms/mesh 1.0.0 → 1.0.1-alpha.1
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-Cu9USDUK.js → AlertCircle-CctpU08Y.js} +1 -1
- package/dist/client/assets/{ArrowLeft-nKBVB_NL.js → ArrowLeft-DMs-Q5a_.js} +1 -1
- package/dist/client/assets/{CheckCircle-BogvGi-0.js → CheckCircle-gjG4WSw6.js} +1 -1
- package/dist/client/assets/{ChevronDown-B5vWNgW1.js → ChevronDown-o688tr0R.js} +1 -1
- package/dist/client/assets/{Clock-Ck2lYkyl.js → Clock-9q1_LHWv.js} +1 -1
- package/dist/client/assets/{Copy01-BeUF9LPk.js → Copy01-Bos_ARNX.js} +1 -1
- package/dist/client/assets/{CpuChip02-8BkRby_U.js → CpuChip02-DMtVpA_p.js} +1 -1
- package/dist/client/assets/{DotsVertical-CmKPHj4W.js → DotsVertical-DjWbU1pT.js} +1 -1
- package/dist/client/assets/{File06-Cn7JLPIx.js → File06-Bt03vXoe.js} +1 -1
- package/dist/client/assets/{Grid01-4uSGUJjV.js → Grid01-DKsOPPqt.js} +1 -1
- package/dist/client/assets/{Inbox01-C8nofD1D.js → Inbox01-7EuLNj_o.js} +1 -1
- package/dist/client/assets/{InfoCircle-C21KXVBJ.js → InfoCircle-D52jwcjZ.js} +1 -1
- package/dist/client/assets/{Key01-CzDrcb2u.js → Key01-DIAppwaZ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DhNFEAza.js → LinkExternal01-OAVXSkWT.js} +1 -1
- package/dist/client/assets/{Loading01-BUZAT-Ht.js → Loading01-DhMR9Rl3.js} +1 -1
- package/dist/client/assets/{Plus-DTWKiMkv.js → Plus-BoTbvZ3o.js} +1 -1
- package/dist/client/assets/{SearchMd-BXC4Yoz_.js → SearchMd-Cle1NAvW.js} +1 -1
- package/dist/client/assets/{Trash01-KhsmIXrl.js → Trash01-CObqwAuB.js} +1 -1
- package/dist/client/assets/{Upload01-Dm3ykMHj.js → Upload01-BIarHoYq.js} +1 -1
- package/dist/client/assets/{X-BFstV52u.js → X-BS6wMyAf.js} +1 -1
- package/dist/client/assets/{XClose-OisY7Sog.js → XClose-CanbUWiZ.js} +1 -1
- package/dist/client/assets/{alert-dialog-Ck-TQRXx.js → alert-dialog-BZCR78KJ.js} +1 -1
- package/dist/client/assets/{auth-catchall-DDvXFYk4.js → auth-catchall-B7-v9vo-.js} +1 -1
- package/dist/client/assets/{auth-DB_JGgAS.js → auth-l7FoQBwy.js} +1 -1
- package/dist/client/assets/{avatar-CqnXtnOZ.js → avatar-tMh-ed4_.js} +1 -1
- package/dist/client/assets/{badge-RGvdF-cd.js → badge-ZGSDRM2V.js} +1 -1
- package/dist/client/assets/{button-Chm7HSn5.js → button-DRbSSzMo.js} +1 -1
- package/dist/client/assets/{card-BVamKRXq.js → card-yDshgaNk.js} +1 -1
- package/dist/client/assets/{checkbox-BMbqVqRo.js → checkbox-CVaEe_Kv.js} +1 -1
- package/dist/client/assets/collection-detail-DipzpGBX.js +1 -0
- package/dist/client/assets/{collection-display-button-DDw_0fW6.js → collection-display-button-CxHAeMlJ.js} +1 -1
- package/dist/client/assets/{collection-header-BVYMmoel.js → collection-header-Bbr_EelX.js} +1 -1
- package/dist/client/assets/{collection-page-BoS9hpji.js → collection-page-BB_fkZHl.js} +1 -1
- package/dist/client/assets/{collection-search-CBHWh6W9.js → collection-search-CAT-KwFV.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CGsO_-78.js → collection-table-wrapper-CpATqDDy.js} +1 -1
- package/dist/client/assets/{connection-card-D6fhK6Cn.js → connection-card-BHTh8x40.js} +1 -1
- package/dist/client/assets/{connection-detail-ClFH3Tdf.js → connection-detail-D__R0L9n.js} +1 -1
- package/dist/client/assets/{connections-BtC-4KRY.js → connections-BbW7JMdD.js} +1 -1
- package/dist/client/assets/{core-BiybLldu.js → core-LRyg4NIV.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D3ZZuPXS.js → create-organization-dialog-Tqv9FyFB.js} +1 -1
- package/dist/client/assets/{deco-chat-skeleton-DHRag8GN.js → deco-chat-skeleton-BWkV1MzQ.js} +9 -9
- package/dist/client/assets/{dialog-kXtxooG_.js → dialog-BBqtAKNq.js} +1 -1
- package/dist/client/assets/{dropdown-menu-MeaPHHuN.js → dropdown-menu-ZynV4CKZ.js} +1 -1
- package/dist/client/assets/{error-boundary-m5kquR9K.js → error-boundary-77v8_xoc.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BSn-ydRW.js → extract-connection-data-Cqx4p3NY.js} +1 -1
- package/dist/client/assets/{form-BBS_Tp5l.js → form-CKfv-8nJ.js} +1 -1
- package/dist/client/assets/{formatDistanceToNow-Dkl3nWpl.js → formatDistanceToNow-D6EC-Mne.js} +1 -1
- package/dist/client/assets/{gateway-detail-B6IgcRfH.js → gateway-detail-C3YoTd2-.js} +1 -1
- package/dist/client/assets/{gateways-Bu8MP7ql.js → gateways-DD9oFefb.js} +1 -1
- package/dist/client/assets/{home-BYCoW2D_.js → home-RnslI0RJ.js} +1 -1
- package/dist/client/assets/{index-BZz7aGs7.js → index-BpYm0xnO.js} +1 -1
- package/dist/client/assets/{index-hySmljwG.js → index-BwdoZ6Iz.js} +1 -1
- package/dist/client/assets/index-CL5fDzg4.css +1 -0
- package/dist/client/assets/{index-C4a1DvcM.js → index-DPFREQMN.js} +2 -2
- package/dist/client/assets/{index-RS2MPOun.js → index-aOeElpLt.js} +1 -1
- package/dist/client/assets/{input-DCV4VviT.js → input-jqtlIgj3.js} +1 -1
- package/dist/client/assets/json-CAM1x_8F.js +1 -0
- package/dist/client/assets/{json-syntax-highlighter-VMspUwuH.js → json-syntax-highlighter-BDiX9ikS.js} +2 -2
- package/dist/client/assets/{layout-BkDVhV_I.js → layout-CkdsMZBx.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-Bx9tA9px.js → lazy-highlighter-CqCOmbZ8.js} +1 -1
- package/dist/client/assets/{localstorage-keys-G21128-2.js → localstorage-keys-Ffqwn37f.js} +1 -1
- package/dist/client/assets/{login-DEwqVT25.js → login-B57O8j1V.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Cm2UNUay.js → mcp-oauth-DxMvAHRa.js} +1 -1
- package/dist/client/assets/{members-BpGlve-L.js → members-BWnzV6ih.js} +1 -1
- package/dist/client/assets/{monitoring-DHEto-A6.js → monitoring-DIiGLrrO.js} +1 -1
- package/dist/client/assets/{oauth-callback-DchNKQy2.js → oauth-callback-CwLtKUf9.js} +1 -1
- package/dist/client/assets/{page-DGoTXd70.js → page-TnUbYFnb.js} +1 -1
- package/dist/client/assets/{popover-Cx3pFfUQ.js → popover-aib-y-v5.js} +1 -1
- package/dist/client/assets/prism-light-6y0IYHxK.js +1 -0
- package/dist/client/assets/{resource-tabs-n23Yoxcd.js → resource-tabs-BA7yau3f.js} +1 -1
- package/dist/client/assets/{schema-DIY49r7a.js → schema-BnBjhQOg.js} +1 -1
- package/dist/client/assets/{select-BXHiOY7b.js → select-CQ6166et.js} +1 -1
- package/dist/client/assets/{settings-BwVTvZ32.js → settings-B4dEHs8J.js} +1 -1
- package/dist/client/assets/shell-layout-B00KNNmL.js +17 -0
- package/dist/client/assets/{spinner-zi1IadXF.js → spinner-CfV2XsUQ.js} +1 -1
- package/dist/client/assets/{store-app-detail-BswrVEFL.js → store-app-detail-ClCjW4tC.js} +1 -1
- package/dist/client/assets/{store-Bu-y0GHn.js → store-j9hTSK4h.js} +1 -1
- package/dist/client/assets/{switch-C8nDXRDi.js → switch-DfV4Hg4D.js} +1 -1
- package/dist/client/assets/{textarea-BA6caASm.js → textarea-rD1H1oiO.js} +1 -1
- package/dist/client/assets/{tools-list-Cw4QW2l7.js → tools-list-BtqQwWMd.js} +1 -1
- package/dist/client/assets/{tooltip-DZ8PMo3S.js → tooltip-T6rRsM2k.js} +1 -1
- package/dist/client/assets/{types-DsEr-_hk.js → types-D-N921FV.js} +1 -1
- package/dist/client/assets/{use-binding-C1zXgwae.js → use-binding-CWUVDcMm.js} +1 -1
- package/dist/client/assets/{use-connection-8aFd9ZgQ.js → use-connection-BObBSW3a.js} +1 -1
- package/dist/client/assets/{use-connection-resources-BaWWtVSI.js → use-connection-resources-BN_6g4of.js} +1 -1
- package/dist/client/assets/{use-gateway-BGsZlt6a.js → use-gateway-BnSOdKih.js} +1 -1
- package/dist/client/assets/{use-list-state-DhJWwg48.js → use-list-state-BXrmE2tY.js} +1 -1
- package/dist/client/assets/{use-mcp-BJzX7M7c.js → use-mcp-feMLqae5.js} +1 -1
- package/dist/client/assets/{use-members-BNSWYzmJ.js → use-members-pxuBBuU5.js} +1 -1
- package/dist/client/assets/{use-mobile-BQAr1bEF.js → use-mobile-BWmDV7SV.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CAOHB7nk.js → use-organization-settings-B_v59XiE.js} +1 -1
- package/dist/client/assets/{use-tool-call-Dxebi6Uq.js → use-tool-call-DJqpt8-4.js} +1 -1
- package/dist/client/assets/useQuery-BDJatAa4.js +1 -0
- package/dist/client/assets/utils-BDWLM78M.js +1 -0
- package/dist/client/assets/{well-known-mcp-DizRQm94.js → well-known-mcp-r4sGkJCM.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/collection-detail-UyMhNT0c.js +0 -1
- package/dist/client/assets/index-MyldRbGR.css +0 -1
- package/dist/client/assets/json-CtxcuNHM.js +0 -1
- package/dist/client/assets/prism-light-DhG4KyCm.js +0 -1
- package/dist/client/assets/shell-layout-BqZsnuW0.js +0 -17
- package/dist/client/assets/useQuery-39cprZL6.js +0 -1
- package/dist/client/assets/utils-BXNVuJET.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,j as i,R as g,a1 as m,C as u,T as x,P as j,D as N,O as b,g as D}from"./index-
|
|
1
|
+
import{c as n,j as i,R as g,a1 as m,C as u,T as x,P as j,D as N,O as b,g as D}from"./index-DPFREQMN.js";import{i as h}from"./X-BS6wMyAf.js";import{c}from"./utils-BDWLM78M.js";function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-background/60 backdrop-blur-[0.5px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(D,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{R as D,P as a,B as b,T as c,k as d,w as e,O as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,j as i,bG as p,bH as f,bI as m,bJ as g,bK as x,bL as b,bM as v,bN as w,bO as h}from"./index-
|
|
1
|
+
import{c,j as i,bG as p,bH as f,bI as m,bJ as g,bK as x,bL as b,bM as v,bN as w,bO as h}from"./index-DPFREQMN.js";import{i as j}from"./Grid01-DKsOPPqt.js";import{c as u}from"./utils-BDWLM78M.js";function M(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(p,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=o):o=e[3],o}function S(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(f,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=o):o=e[3],o}function $(s){const e=c.c(10);let t,o,a;e[0]!==s?({className:t,sideOffset:a,...o}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==o||e[7]!==n||e[8]!==r?(d=i.jsx(m,{children:i.jsx(g,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...o})}),e[6]=o,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function y(s){const e=c.c(12);let t,o,a,n;e[0]!==s?({className:t,inset:o,variant:n,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a,e[4]=n):(t=e[1],o=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-xl px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r?(l=i.jsx(x,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":r,className:d,...a}),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function _(s){const e=c.c(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==o||e[6]!==a?(n=i.jsx(h,{"data-slot":"dropdown-menu-separator",className:a,...o}),e[5]=o,e[6]=a,e[7]=n):n=e[7],n}function C(s){const e=c.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let o;return e[2]!==t?(o=i.jsx(b,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=o):o=e[3],o}function T(s){const e=c.c(13);let t,o,a,n;e[0]!==s?({className:o,inset:a,children:t,...n}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a,e[4]=n):(t=e[1],o=e[2],a=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-xl px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(j,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(l=i.jsxs(v,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,d]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function I(s){const e=c.c(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==o||e[6]!==a?(n=i.jsx(w,{"data-slot":"dropdown-menu-sub-content",className:a,...o}),e[5]=o,e[6]=a,e[7]=n):n=e[7],n}export{S as D,$ as a,M as b,y as c,_ as d,C as e,T as f,I as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as e}from"./index-
|
|
1
|
+
import{r as a,j as e}from"./index-DPFREQMN.js";import{B as n}from"./button-DRbSSzMo.js";const o=({size:t=24,color:r="currentColor",...s})=>a.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:r,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},a.createElement("path",{d:"M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.813 0c-.296.132-.523.525-.978 1.31Z"}));o.displayName="AlertTriangle";class l extends a.Component{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,s){console.error("Uncaught error:",r,s)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[e.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:e.jsx(o,{className:"h-6 w-6 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),e.jsx(n,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}export{l as E};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bb as o}from"./index-
|
|
1
|
+
import{bb as o}from"./index-DPFREQMN.js";import{B as F}from"./use-binding-CWUVDcMm.js";import{b as R,g as C}from"./registry-utils-ulDDT0d8.js";import{g as B}from"./generate-id-Dyweu44Y.js";const U=Symbol("Let zodToJsonSchema decide on which parser to use"),A={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},K=e=>typeof e=="string"?{...A,name:e}:{...A,...e},V=e=>{const t=K(e),a=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}};function T(e,t,a,n){n?.errorMessages&&a&&(e.errorMessage={...e.errorMessage,[t]:a})}function p(e,t,a,n,r){e[t]=a,T(e,t,n,r)}const N=(e,t)=>{let a=0;for(;a<e.length&&a<t.length&&e[a]===t[a];a++);return[(e.length-a).toString(),...t.slice(a)].join("/")};function d(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?N(t,e.currentPath):t.join("/")}}function q(e,t){const a={type:"array"};return e.type?._def&&e.type?._def?.typeName!==o.ZodAny&&(a.items=l(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&p(a,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&p(a,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(p(a,"minItems",e.exactLength.value,e.exactLength.message,t),p(a,"maxItems",e.exactLength.value,e.exactLength.message,t)),a}function G(e,t){const a={type:"integer",format:"int64"};if(!e.checks)return a;for(const n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?p(a,"minimum",n.value,n.message,t):p(a,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(a.exclusiveMinimum=!0),p(a,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?p(a,"maximum",n.value,n.message,t):p(a,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(a.exclusiveMaximum=!0),p(a,"maximum",n.value,n.message,t));break;case"multipleOf":p(a,"multipleOf",n.value,n.message,t);break}return a}function H(){return{type:"boolean"}}function j(e,t){return l(e.type._def,t)}const J=(e,t)=>l(e.innerType._def,t);function M(e,t,a){const n=a??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((r,i)=>M(e,t,r))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return W(e,t)}}const W=(e,t)=>{const a={type:"integer",format:"unix-time"};if(t.target==="openApi3")return a;for(const n of e.checks)switch(n.kind){case"min":p(a,"minimum",n.value,n.message,t);break;case"max":p(a,"maximum",n.value,n.message,t);break}return a};function Y(e,t){return{...l(e.innerType._def,t),default:e.defaultValue()}}function Q(e,t){return t.effectStrategy==="input"?l(e.schema._def,t):d(t)}function X(e){return{type:"string",enum:Array.from(e.values)}}const ee=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function te(e,t){const a=[l(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),l(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i);let n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const r=[];return a.forEach(i=>{if(ee(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:c,...u}=i;s=u}else n=void 0;r.push(s)}}),r.length?{allOf:r,...n}:void 0}function ne(e,t){const a=typeof e.value;return a!=="bigint"&&a!=="number"&&a!=="boolean"&&a!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:a==="bigint"?"integer":a,enum:[e.value]}:{type:a==="bigint"?"integer":a,const:e.value}}let P;const g={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(P===void 0&&(P=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),P),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function D(e,t){const a={type:"string"};if(e.checks)for(const n of e.checks)switch(n.kind){case"min":p(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,t);break;case"max":p(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":y(a,"email",n.message,t);break;case"format:idn-email":y(a,"idn-email",n.message,t);break;case"pattern:zod":m(a,g.email,n.message,t);break}break;case"url":y(a,"uri",n.message,t);break;case"uuid":y(a,"uuid",n.message,t);break;case"regex":m(a,n.regex,n.message,t);break;case"cuid":m(a,g.cuid,n.message,t);break;case"cuid2":m(a,g.cuid2,n.message,t);break;case"startsWith":m(a,RegExp(`^${_(n.value,t)}`),n.message,t);break;case"endsWith":m(a,RegExp(`${_(n.value,t)}$`),n.message,t);break;case"datetime":y(a,"date-time",n.message,t);break;case"date":y(a,"date",n.message,t);break;case"time":y(a,"time",n.message,t);break;case"duration":y(a,"duration",n.message,t);break;case"length":p(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,t),p(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,t);break;case"includes":{m(a,RegExp(_(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&y(a,"ipv4",n.message,t),n.version!=="v4"&&y(a,"ipv6",n.message,t);break}case"base64url":m(a,g.base64url,n.message,t);break;case"jwt":m(a,g.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&m(a,g.ipv4Cidr,n.message,t),n.version!=="v4"&&m(a,g.ipv6Cidr,n.message,t);break}case"emoji":m(a,g.emoji(),n.message,t);break;case"ulid":{m(a,g.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{y(a,"binary",n.message,t);break}case"contentEncoding:base64":{p(a,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{m(a,g.base64,n.message,t);break}}break}case"nanoid":m(a,g.nanoid,n.message,t)}return a}function _(e,t){return t.patternStrategy==="escape"?re(e):e}const ae=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function re(e){let t="";for(let a=0;a<e.length;a++)ae.has(e[a])||(t+="\\"),t+=e[a];return t}function y(e,t,a,n){e.format||e.anyOf?.some(r=>r.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...a&&n.errorMessages&&{errorMessage:{format:a}}})):p(e,"format",t,a,n)}function m(e,t,a,n){e.pattern||e.allOf?.some(r=>r.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:k(t,n),...a&&n.errorMessages&&{errorMessage:{pattern:a}}})):p(e,"pattern",k(t,n),a,n)}function k(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const a={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=a.i?e.source.toLowerCase():e.source;let r="",i=!1,s=!1,c=!1;for(let u=0;u<n.length;u++){if(i){r+=n[u],i=!1;continue}if(a.i){if(s){if(n[u].match(/[a-z]/)){c?(r+=n[u],r+=`${n[u-2]}-${n[u]}`.toUpperCase(),c=!1):n[u+1]==="-"&&n[u+2]?.match(/[a-z]/)?(r+=n[u],c=!0):r+=`${n[u]}${n[u].toUpperCase()}`;continue}}else if(n[u].match(/[a-z]/)){r+=`[${n[u]}${n[u].toUpperCase()}]`;continue}}if(a.m){if(n[u]==="^"){r+=`(^|(?<=[\r
|
|
2
2
|
]))`;continue}else if(n[u]==="$"){r+=`($|(?=[\r
|
|
3
3
|
]))`;continue}}if(a.s&&n[u]==="."){r+=s?`${n[u]}\r
|
|
4
4
|
`:`[${n[u]}\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as c,bi as $,c1 as j,c2 as C,r as f,i as v,c3 as N,c4 as h}from"./index-
|
|
1
|
+
import{c as d,j as c,bi as $,c1 as j,c2 as C,r as f,i as v,c3 as N,c4 as h}from"./index-DPFREQMN.js";import{c as u}from"./utils-BDWLM78M.js";function S(t){const e=d.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let l;e[3]!==s?(l=u("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let r;return e[5]!==o||e[6]!==l?(r=c.jsx($,{"data-slot":"label",className:l,...o}),e[5]=o,e[6]=l,e[7]=r):r=e[7],r}const D=j,I=f.createContext({}),E=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let l;e[4]!==s?(l=c.jsx(C,{...s}),e[4]=s,e[5]=l):l=e[5];let r;return e[6]!==o||e[7]!==l?(r=c.jsx(I.Provider,{value:o,children:l}),e[6]=o,e[7]=l,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(I),s=f.useContext(b),{getFieldState:o}=N();let l;t[0]!==e.name?(l={name:e.name},t[0]=e.name,t[1]=l):l=t[1];const r=h(l);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const n=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,g=`${i}-form-item-message`;let p;return t[6]!==e.name||t[7]!==n||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==g?(p={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:g,...n},t[6]=e.name,t[7]=n,t[8]=i,t[9]=m,t[10]=F,t[11]=g,t[12]=p):p=t[12],p},b=f.createContext({});function M(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const l=f.useId();let r;e[3]!==l?(r={id:l},e[3]=l,e[4]=r):r=e[4];let a;e[5]!==s?(a=u("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let n;e[7]!==o||e[8]!==a?(n=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=n):n=e[9];let i;return e[10]!==r||e[11]!==n?(i=c.jsx(b.Provider,{value:r,children:n}),e[10]=r,e[11]=n,e[12]=i):i=e[12],i}function P(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:l,formItemId:r}=x(),a=!!l;let n;e[3]!==s?(n=u("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==n?(i=c.jsx(S,{"data-slot":"form-label","data-error":a,className:n,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=n,e[9]=i):i=e[9],i}function R(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:l,formDescriptionId:r,formMessageId:a}=x(),n=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==l||e[3]!==s||e[4]!==n||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:l,"aria-describedby":n,"aria-invalid":i,...s}),e[2]=l,e[3]=s,e[4]=n,e[5]=i,e[6]=m):m=e[6],m}function L(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:l}=x();let r;e[3]!==s?(r=u("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:l,className:r,...o}),e[5]=l,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function k(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:l,formMessageId:r}=x(),a=l?String(l?.message??""):o.children;if(!a)return null;let n;e[3]!==s?(n=u("text-destructive text-sm",s),e[3]=s,e[4]=n):n=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==n?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:n,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=n,e[9]=i):i=e[9],i}export{E as F,D as a,M as b,P as c,R as d,L as e,k as f};
|
package/dist/client/assets/{formatDistanceToNow-Dkl3nWpl.js → formatDistanceToNow-D6EC-Mne.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bP as X,bQ as O,bR as q,bS as j,ap as A,Z as Y,bT as _,bU as z,r as w,bV as I,bW as L,bX as N,bY as H,bZ as k,b_ as x,b$ as V,c0 as J}from"./index-C4a1DvcM.js";function F(t,n){const e=new Set(n);return t.filter(s=>!e.has(s))}function B(t,n,e){const s=t.slice(0);return s[n]=e,s}var U=class extends X{#r;#t;#s;#a;#e;#n;#o;#i;#u=[];constructor(t,n,e){super(),this.#r=t,this.#a=e,this.#s=[],this.#e=[],this.#t=[],this.setQueries(n)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(t=>{t.subscribe(n=>{this.#d(t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(t=>{t.destroy()})}setQueries(t,n){this.#s=t,this.#a=n,O.batch(()=>{const e=this.#e,s=this.#l(this.#s);s.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const r=s.map(u=>u.observer),i=r.map(u=>u.getCurrentResult()),o=e.length!==r.length,a=r.some((u,f)=>u!==e[f]),c=o||a,d=c?!0:i.some((u,f)=>{const h=this.#t[f];return!h||!q(u,h)});!c&&!d||(c&&(this.#u=s,this.#e=r),this.#t=i,this.hasListeners()&&(c&&(F(e,r).forEach(u=>{u.destroy()}),F(r,e).forEach(u=>{u.subscribe(f=>{this.#d(u,f)})})),this.#f()))})}getCurrentResult(){return this.#t}getQueries(){return this.#e.map(t=>t.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(t,n){const e=this.#l(t),s=e.map(r=>r.observer.getOptimisticResult(r.defaultedQueryOptions));return[s,r=>this.#h(r??s,n),()=>this.#c(s,e)]}#c(t,n){return n.map((e,s)=>{const r=t[s];return e.defaultedQueryOptions.notifyOnChangeProps?r:e.observer.trackResult(r,i=>{n.forEach(o=>{o.observer.trackProp(i)})})})}#h(t,n){return n?((!this.#n||this.#t!==this.#i||n!==this.#o)&&(this.#o=n,this.#i=this.#t,this.#n=j(this.#n,n(t))),this.#n):t}#l(t){const n=new Map;this.#e.forEach(s=>{const r=s.options.queryHash;if(!r)return;const i=n.get(r);i?i.push(s):n.set(r,[s])});const e=[];return t.forEach(s=>{const r=this.#r.defaultQueryOptions(s),o=n.get(r.queryHash)?.shift()??new A(this.#r,r);e.push({defaultedQueryOptions:r,observer:o})}),e}#d(t,n){const e=this.#e.indexOf(t);e!==-1&&(this.#t=B(this.#t,e,n),this.#f())}#f(){if(this.hasListeners()){const t=this.#n,n=this.#c(this.#t,this.#u),e=this.#h(n,this.#a?.combine);t!==e&&O.batch(()=>{this.listeners.forEach(s=>{s(this.#t)})})}}};function It({queries:t,...n},e){const s=Y(e),r=_(),i=z(),o=w.useMemo(()=>t.map(l=>{const b=s.defaultQueryOptions(l);return b._optimisticResults=r?"isRestoring":"optimistic",b}),[t,s,r]);o.forEach(l=>{I(l);const b=s.getQueryCache().get(l.queryHash);L(l,i,b)}),N(i);const[a]=w.useState(()=>new U(s,o,n)),[c,d,u]=a.getOptimisticResult(o,n.combine),f=!r&&n.subscribed!==!1;w.useSyncExternalStore(w.useCallback(l=>f?a.subscribe(O.batchCalls(l)):H,[a,f]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),w.useEffect(()=>{a.setQueries(o,n)},[o,n,a]);const g=c.some((l,b)=>k(o[b],l))?c.flatMap((l,b)=>{const y=o[b];if(y){const C=new A(s,y);if(k(y,l))return x(y,C,i);V(l,r)&&x(y,C,i)}return[]}):[];if(g.length>0)throw Promise.all(g);const m=c.find((l,b)=>{const y=o[b];return y&&J({result:l,errorResetBoundary:i,throwOnError:y.throwOnError,query:s.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(m?.error)throw m.error;return d(u())}const D=43200,E=1440,Q=Symbol.for("constructDateFrom");function W(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&Q in t?t[Q](n):t instanceof Date?new t.constructor(n):new Date(n)}function p(t,n){return W(t,t)}let Z={};function $(){return Z}function T(t){const n=p(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function R(t,...n){const e=W.bind(null,t||n.find(s=>typeof s=="object"));return n.map(e)}function P(t,n){const e=+p(t)-+p(n);return e<0?-1:e>0?1:e}function K(t){return W(t,Date.now())}function G(t,n,e){const[s,r]=R(e?.in,t,n),i=s.getFullYear()-r.getFullYear(),o=s.getMonth()-r.getMonth();return i*12+o}function tt(t){return n=>{const s=(t?Math[t]:Math.trunc)(n);return s===0?0:s}}function et(t,n){return+p(t)-+p(n)}function nt(t,n){const e=p(t);return e.setHours(23,59,59,999),e}function rt(t,n){const e=p(t),s=e.getMonth();return e.setFullYear(e.getFullYear(),s+1,0),e.setHours(23,59,59,999),e}function st(t,n){const e=p(t);return+nt(e)==+rt(e)}function at(t,n,e){const[s,r,i]=R(e?.in,t,t,n),o=P(r,i),a=Math.abs(G(r,i));if(a<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*a);let c=P(r,i)===-o;st(s)&&a===1&&P(s,i)===1&&(c=!1);const d=o*(a-+c);return d===0?0:d}function ot(t,n,e){const s=et(t,n)/1e3;return tt(e?.roundingMethod)(s)}const it={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ut=(t,n,e)=>{let s;const r=it[t];return typeof r=="string"?s=r:n===1?s=r.one:s=r.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+s:s+" ago":s};function S(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const ct={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ht={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dt={date:S({formats:ct,defaultWidth:"full"}),time:S({formats:ht,defaultWidth:"full"}),dateTime:S({formats:lt,defaultWidth:"full"})},ft={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mt=(t,n,e,s)=>ft[t];function M(t){return(n,e)=>{const s=e?.context?String(e.context):"standalone";let r;if(s==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=e?.width?String(e.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=e?.width?String(e.width):t.defaultWidth;r=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(n):n;return r[i]}}const bt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},yt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vt=(t,n)=>{const e=Number(t),s=e%100;if(s>20||s<10)switch(s%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Dt={ordinalNumber:vt,era:M({values:bt,defaultWidth:"wide"}),quarter:M({values:yt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:M({values:gt,defaultWidth:"wide"}),day:M({values:pt,defaultWidth:"wide"}),dayPeriod:M({values:wt,defaultWidth:"wide",formattingValues:Mt,defaultFormattingWidth:"wide"})};function v(t){return(n,e={})=>{const s=e.width,r=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],i=n.match(r);if(!i)return null;const o=i[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(a)?St(a,f=>f.test(o)):Pt(a,f=>f.test(o));let d;d=t.valueCallback?t.valueCallback(c):c,d=e.valueCallback?e.valueCallback(d):d;const u=n.slice(o.length);return{value:d,rest:u}}}function Pt(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function St(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function Ot(t){return(n,e={})=>{const s=n.match(t.matchPattern);if(!s)return null;const r=s[0],i=n.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=e.valueCallback?e.valueCallback(o):o;const a=n.slice(r.length);return{value:o,rest:a}}}const Wt=/^(\d+)(th|st|nd|rd)?/i,Rt=/\d+/i,Ct={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kt={any:[/^b/i,/^(a|c)/i]},xt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ft={any:[/1/i,/2/i,/3/i,/4/i]},Et={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Qt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Tt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},At={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jt={ordinalNumber:Ot({matchPattern:Wt,parsePattern:Rt,valueCallback:t=>parseInt(t,10)}),era:v({matchPatterns:Ct,defaultMatchWidth:"wide",parsePatterns:kt,defaultParseWidth:"any"}),quarter:v({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:Ft,defaultParseWidth:"any",valueCallback:t=>t+1}),month:v({matchPatterns:Et,defaultMatchWidth:"wide",parsePatterns:Qt,defaultParseWidth:"any"}),day:v({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:At,defaultParseWidth:"any"}),dayPeriod:v({matchPatterns:Xt,defaultMatchWidth:"any",parsePatterns:qt,defaultParseWidth:"any"})},Yt={code:"en-US",formatDistance:ut,formatLong:dt,formatRelative:mt,localize:Dt,match:jt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _t(t,n,e){const s=$(),r=e?.locale??s.locale??Yt,i=2520,o=P(t,n);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},e,{addSuffix:e?.addSuffix,comparison:o}),[c,d]=R(e?.in,...o>0?[n,t]:[t,n]),u=ot(d,c),f=(T(d)-T(c))/1e3,h=Math.round((u-f)/60);let g;if(h<2)return e?.includeSeconds?u<5?r.formatDistance("lessThanXSeconds",5,a):u<10?r.formatDistance("lessThanXSeconds",10,a):u<20?r.formatDistance("lessThanXSeconds",20,a):u<40?r.formatDistance("halfAMinute",0,a):u<60?r.formatDistance("lessThanXMinutes",1,a):r.formatDistance("xMinutes",1,a):h===0?r.formatDistance("lessThanXMinutes",1,a):r.formatDistance("xMinutes",h,a);if(h<45)return r.formatDistance("xMinutes",h,a);if(h<90)return r.formatDistance("aboutXHours",1,a);if(h<E){const m=Math.round(h/60);return r.formatDistance("aboutXHours",m,a)}else{if(h<i)return r.formatDistance("xDays",1,a);if(h<D){const m=Math.round(h/E);return r.formatDistance("xDays",m,a)}else if(h<D*2)return g=Math.round(h/D),r.formatDistance("aboutXMonths",g,a)}if(g=at(d,c),g<12){const m=Math.round(h/D);return r.formatDistance("xMonths",m,a)}else{const m=g%12,l=Math.trunc(g/12);return m<3?r.formatDistance("aboutXYears",l,a):m<9?r.formatDistance("overXYears",l,a):r.formatDistance("almostXYears",l+1,a)}}function Lt(t,n){return _t(t,K(t),n)}export{Lt as f,It as u};
|
|
1
|
+
import{bP as X,bQ as O,bR as q,bS as j,ap as A,Z as Y,bT as _,bU as z,r as w,bV as I,bW as L,bX as N,bY as H,bZ as k,b_ as x,b$ as V,c0 as J}from"./index-DPFREQMN.js";function F(t,n){const e=new Set(n);return t.filter(s=>!e.has(s))}function B(t,n,e){const s=t.slice(0);return s[n]=e,s}var U=class extends X{#r;#t;#s;#a;#e;#n;#o;#i;#u=[];constructor(t,n,e){super(),this.#r=t,this.#a=e,this.#s=[],this.#e=[],this.#t=[],this.setQueries(n)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(t=>{t.subscribe(n=>{this.#d(t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(t=>{t.destroy()})}setQueries(t,n){this.#s=t,this.#a=n,O.batch(()=>{const e=this.#e,s=this.#l(this.#s);s.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions));const r=s.map(u=>u.observer),i=r.map(u=>u.getCurrentResult()),o=e.length!==r.length,a=r.some((u,f)=>u!==e[f]),c=o||a,d=c?!0:i.some((u,f)=>{const h=this.#t[f];return!h||!q(u,h)});!c&&!d||(c&&(this.#u=s,this.#e=r),this.#t=i,this.hasListeners()&&(c&&(F(e,r).forEach(u=>{u.destroy()}),F(r,e).forEach(u=>{u.subscribe(f=>{this.#d(u,f)})})),this.#f()))})}getCurrentResult(){return this.#t}getQueries(){return this.#e.map(t=>t.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(t,n){const e=this.#l(t),s=e.map(r=>r.observer.getOptimisticResult(r.defaultedQueryOptions));return[s,r=>this.#h(r??s,n),()=>this.#c(s,e)]}#c(t,n){return n.map((e,s)=>{const r=t[s];return e.defaultedQueryOptions.notifyOnChangeProps?r:e.observer.trackResult(r,i=>{n.forEach(o=>{o.observer.trackProp(i)})})})}#h(t,n){return n?((!this.#n||this.#t!==this.#i||n!==this.#o)&&(this.#o=n,this.#i=this.#t,this.#n=j(this.#n,n(t))),this.#n):t}#l(t){const n=new Map;this.#e.forEach(s=>{const r=s.options.queryHash;if(!r)return;const i=n.get(r);i?i.push(s):n.set(r,[s])});const e=[];return t.forEach(s=>{const r=this.#r.defaultQueryOptions(s),o=n.get(r.queryHash)?.shift()??new A(this.#r,r);e.push({defaultedQueryOptions:r,observer:o})}),e}#d(t,n){const e=this.#e.indexOf(t);e!==-1&&(this.#t=B(this.#t,e,n),this.#f())}#f(){if(this.hasListeners()){const t=this.#n,n=this.#c(this.#t,this.#u),e=this.#h(n,this.#a?.combine);t!==e&&O.batch(()=>{this.listeners.forEach(s=>{s(this.#t)})})}}};function It({queries:t,...n},e){const s=Y(e),r=_(),i=z(),o=w.useMemo(()=>t.map(l=>{const b=s.defaultQueryOptions(l);return b._optimisticResults=r?"isRestoring":"optimistic",b}),[t,s,r]);o.forEach(l=>{I(l);const b=s.getQueryCache().get(l.queryHash);L(l,i,b)}),N(i);const[a]=w.useState(()=>new U(s,o,n)),[c,d,u]=a.getOptimisticResult(o,n.combine),f=!r&&n.subscribed!==!1;w.useSyncExternalStore(w.useCallback(l=>f?a.subscribe(O.batchCalls(l)):H,[a,f]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),w.useEffect(()=>{a.setQueries(o,n)},[o,n,a]);const g=c.some((l,b)=>k(o[b],l))?c.flatMap((l,b)=>{const y=o[b];if(y){const C=new A(s,y);if(k(y,l))return x(y,C,i);V(l,r)&&x(y,C,i)}return[]}):[];if(g.length>0)throw Promise.all(g);const m=c.find((l,b)=>{const y=o[b];return y&&J({result:l,errorResetBoundary:i,throwOnError:y.throwOnError,query:s.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(m?.error)throw m.error;return d(u())}const D=43200,E=1440,Q=Symbol.for("constructDateFrom");function W(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&Q in t?t[Q](n):t instanceof Date?new t.constructor(n):new Date(n)}function p(t,n){return W(t,t)}let Z={};function $(){return Z}function T(t){const n=p(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function R(t,...n){const e=W.bind(null,t||n.find(s=>typeof s=="object"));return n.map(e)}function P(t,n){const e=+p(t)-+p(n);return e<0?-1:e>0?1:e}function K(t){return W(t,Date.now())}function G(t,n,e){const[s,r]=R(e?.in,t,n),i=s.getFullYear()-r.getFullYear(),o=s.getMonth()-r.getMonth();return i*12+o}function tt(t){return n=>{const s=(t?Math[t]:Math.trunc)(n);return s===0?0:s}}function et(t,n){return+p(t)-+p(n)}function nt(t,n){const e=p(t);return e.setHours(23,59,59,999),e}function rt(t,n){const e=p(t),s=e.getMonth();return e.setFullYear(e.getFullYear(),s+1,0),e.setHours(23,59,59,999),e}function st(t,n){const e=p(t);return+nt(e)==+rt(e)}function at(t,n,e){const[s,r,i]=R(e?.in,t,t,n),o=P(r,i),a=Math.abs(G(r,i));if(a<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*a);let c=P(r,i)===-o;st(s)&&a===1&&P(s,i)===1&&(c=!1);const d=o*(a-+c);return d===0?0:d}function ot(t,n,e){const s=et(t,n)/1e3;return tt(e?.roundingMethod)(s)}const it={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ut=(t,n,e)=>{let s;const r=it[t];return typeof r=="string"?s=r:n===1?s=r.one:s=r.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+s:s+" ago":s};function S(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const ct={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ht={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dt={date:S({formats:ct,defaultWidth:"full"}),time:S({formats:ht,defaultWidth:"full"}),dateTime:S({formats:lt,defaultWidth:"full"})},ft={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mt=(t,n,e,s)=>ft[t];function M(t){return(n,e)=>{const s=e?.context?String(e.context):"standalone";let r;if(s==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=e?.width?String(e.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=e?.width?String(e.width):t.defaultWidth;r=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(n):n;return r[i]}}const bt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},yt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vt=(t,n)=>{const e=Number(t),s=e%100;if(s>20||s<10)switch(s%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Dt={ordinalNumber:vt,era:M({values:bt,defaultWidth:"wide"}),quarter:M({values:yt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:M({values:gt,defaultWidth:"wide"}),day:M({values:pt,defaultWidth:"wide"}),dayPeriod:M({values:wt,defaultWidth:"wide",formattingValues:Mt,defaultFormattingWidth:"wide"})};function v(t){return(n,e={})=>{const s=e.width,r=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],i=n.match(r);if(!i)return null;const o=i[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(a)?St(a,f=>f.test(o)):Pt(a,f=>f.test(o));let d;d=t.valueCallback?t.valueCallback(c):c,d=e.valueCallback?e.valueCallback(d):d;const u=n.slice(o.length);return{value:d,rest:u}}}function Pt(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function St(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function Ot(t){return(n,e={})=>{const s=n.match(t.matchPattern);if(!s)return null;const r=s[0],i=n.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=e.valueCallback?e.valueCallback(o):o;const a=n.slice(r.length);return{value:o,rest:a}}}const Wt=/^(\d+)(th|st|nd|rd)?/i,Rt=/\d+/i,Ct={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kt={any:[/^b/i,/^(a|c)/i]},xt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ft={any:[/1/i,/2/i,/3/i,/4/i]},Et={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Qt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Tt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},At={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Xt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jt={ordinalNumber:Ot({matchPattern:Wt,parsePattern:Rt,valueCallback:t=>parseInt(t,10)}),era:v({matchPatterns:Ct,defaultMatchWidth:"wide",parsePatterns:kt,defaultParseWidth:"any"}),quarter:v({matchPatterns:xt,defaultMatchWidth:"wide",parsePatterns:Ft,defaultParseWidth:"any",valueCallback:t=>t+1}),month:v({matchPatterns:Et,defaultMatchWidth:"wide",parsePatterns:Qt,defaultParseWidth:"any"}),day:v({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:At,defaultParseWidth:"any"}),dayPeriod:v({matchPatterns:Xt,defaultMatchWidth:"any",parsePatterns:qt,defaultParseWidth:"any"})},Yt={code:"en-US",formatDistance:ut,formatLong:dt,formatRelative:mt,localize:Dt,match:jt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _t(t,n,e){const s=$(),r=e?.locale??s.locale??Yt,i=2520,o=P(t,n);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},e,{addSuffix:e?.addSuffix,comparison:o}),[c,d]=R(e?.in,...o>0?[n,t]:[t,n]),u=ot(d,c),f=(T(d)-T(c))/1e3,h=Math.round((u-f)/60);let g;if(h<2)return e?.includeSeconds?u<5?r.formatDistance("lessThanXSeconds",5,a):u<10?r.formatDistance("lessThanXSeconds",10,a):u<20?r.formatDistance("lessThanXSeconds",20,a):u<40?r.formatDistance("halfAMinute",0,a):u<60?r.formatDistance("lessThanXMinutes",1,a):r.formatDistance("xMinutes",1,a):h===0?r.formatDistance("lessThanXMinutes",1,a):r.formatDistance("xMinutes",h,a);if(h<45)return r.formatDistance("xMinutes",h,a);if(h<90)return r.formatDistance("aboutXHours",1,a);if(h<E){const m=Math.round(h/60);return r.formatDistance("aboutXHours",m,a)}else{if(h<i)return r.formatDistance("xDays",1,a);if(h<D){const m=Math.round(h/E);return r.formatDistance("xDays",m,a)}else if(h<D*2)return g=Math.round(h/D),r.formatDistance("aboutXMonths",g,a)}if(g=at(d,c),g<12){const m=Math.round(h/D);return r.formatDistance("xMonths",m,a)}else{const m=g%12,l=Math.trunc(g/12);return m<3?r.formatDistance("aboutXYears",l,a):m<9?r.formatDistance("overXYears",l,a):r.formatDistance("almostXYears",l+1,a)}}function Lt(t,n){return _t(t,K(t),n)}export{Lt as f,It as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as k,c as G,j as t,f as we,d as De,b as Fe,v as Ve,bo as je,w as Se,av as Me,x as Ge,y as Oe,t as Ce}from"./index-C4a1DvcM.js";import{E as Ue}from"./SearchMd-BXC4Yoz_.js";import{E as Ne}from"./error-boundary-m5kquR9K.js";import{I as ye,u as Ie}from"./use-connection-8aFd9ZgQ.js";import{T as Be,S as Le}from"./switch-C8nDXRDi.js";import{C as Te}from"./checkbox-BMbqVqRo.js";import{B as X}from"./button-Chm7HSn5.js";import{i as Je}from"./ArrowLeft-nKBVB_NL.js";import{c as H}from"./utils-BXNVuJET.js";import{C as qe}from"./collection-search-CBHWh6W9.js";import{I as ve}from"./input-DCV4VviT.js";import{s as Qe}from"./Plus-DTWKiMkv.js";import{i as Ke}from"./X-BFstV52u.js";import{b as We,a as He}from"./use-gateway-BGsZlt6a.js";import{u as Xe,a as Ye}from"./use-connection-resources-BaWWtVSI.js";import{a as ie,c as ce,b as ae,T as de,i as _e}from"./tooltip-DZ8PMo3S.js";import{a as Ze}from"./Copy01-BeUF9LPk.js";import{i as et}from"./CpuChip02-8BkRby_U.js";import{i as ke}from"./InfoCircle-C21KXVBJ.js";import{i as be}from"./Loading01-BUZAT-Ht.js";import{F as re,a as tt,b as ue,d as fe,f as xe,c as $e}from"./form-BBS_Tp5l.js";import{S as Pe,a as Re,b as ze,c as Ae,d as me}from"./select-BXHiOY7b.js";import{R as st}from"./resource-tabs-n23Yoxcd.js";import{s as nt}from"./slugify-CEUa2lfQ.js";import{a as ot,V as lt,b as rt}from"./layout-BkDVhV_I.js";import{f as it}from"./formatDistanceToNow-Dkl3nWpl.js";import"./ChevronDown-B5vWNgW1.js";import"./badge-RGvdF-cd.js";const ct=k.memo(function(e){const s=G.c(20),{connection:o,isSelected:a,hasItemsEnabled:l,activeItemsCount:f,totalItemsCount:h,onSelect:i,onToggle:r}=e,c=a?"bg-accent/50":"hover:bg-muted/50";let m;s[0]!==c?(m=H("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",c),s[0]=c,s[1]=m):m=s[1];let x;s[2]!==o.icon||s[3]!==o.title?(x=t.jsx(ye,{icon:o.icon,name:o.title,size:"xs"}),s[2]=o.icon,s[3]=o.title,s[4]=x):x=s[4];let j;s[5]!==o.title?(j=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]=j):j=s[6];let p;s[7]!==i||s[8]!==x||s[9]!==j?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:i,children:[x,j]}),s[7]=i,s[8]=x,s[9]=j,s[10]=p):p=s[10];let d;s[11]!==f||s[12]!==l||s[13]!==r||s[14]!==h?(d=h>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[f,"/",h]}),t.jsx(Te,{checked:l,onCheckedChange:r,onClick:dt})]}),s[11]=f,s[12]=l,s[13]=r,s[14]=h,s[15]=d):d=s[15];let y;return s[16]!==m||s[17]!==p||s[18]!==d?(y=t.jsxs("div",{className:m,children:[p,d]}),s[16]=m,s[17]=p,s[18]=d,s[19]=y):y=s[19],y}),at=k.memo(function(e){const s=G.c(18),{connectionId:o,item:a,isSelected:l,onToggle:f}=e,h=`item-${o}-${a.id}`,i=l?"text-foreground":"text-muted-foreground";let r;s[0]!==i?(r=H("text-sm font-medium",i),s[0]=i,s[1]=r):r=s[1];let c;s[2]!==a.name||s[3]!==r?(c=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:r,children:a.name})}),s[2]=a.name,s[3]=r,s[4]=c):c=s[4];let m;s[5]!==a.description?(m=a.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:a.description}),s[5]=a.description,s[6]=m):m=s[6];let x;s[7]!==c||s[8]!==m?(x=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,m]}),s[7]=c,s[8]=m,s[9]=x):x=s[9];const j=`item-${o}-${a.id}`;let p;s[10]!==l||s[11]!==f||s[12]!==j?(p=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(Te,{id:j,checked:l,onCheckedChange:f,onClick:mt})}),s[10]=l,s[11]=f,s[12]=j,s[13]=p):p=s[13];let d;return s[14]!==h||s[15]!==x||s[16]!==p?(d=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:h,children:[x,p]}),s[14]=h,s[15]=x,s[16]=p,s[17]=d):d=s[17],d});function Ee({itemSet:n,onItemSetChange:e,getItems:s,itemLabel:o,emptyItemsMessage:a,extraContent:l}){const[f,h]=k.useState(""),i=k.useDeferredValue(f),[r,c]=k.useState("all"),[m,x]=k.useState(!1),j=k.useRef(new Set(Object.keys(n))),p=Ie({searchTerm:i.trim()||void 0}),d=j.current,y=[...d.values()].map(u=>p.find(S=>S.id===u)).filter(u=>u!==void 0),_=p.filter(u=>!d.has(u.id)),N=[...y,..._],g=u=>{const S=n[u];return S!==void 0&&S.length>0},b=N.filter(u=>{if(r==="all")return!0;const S=g(u.id);return r==="selected"?S:r==="unselected"?!S:!0}),[C,w]=k.useState(N[0]?.id??null),v=C?N.find(u=>u.id===C)??null:null,V=v?s(v):[],O=(u,S)=>n[u]?.includes(S)??!1,D=(u,S)=>{const $=n[u]??[],R=$.includes(S),z={...n};if(R){const A=$.filter(P=>P!==S);A.length===0?delete z[u]:z[u]=A}else z[u]=[...$,S];e(z)},M=u=>{const S=N.find(T=>T.id===u);if(!S)return;const $=s(S);if($.length===0)return;const R=n[u]??[],z=$.map(T=>T.id),A=R.length>0&&z.every(T=>R.includes(T)),P={...n};A?delete P[u]:(P[u]=z,w(u)),e(P)},J=u=>{w(u),x(!0)},F=()=>{x(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:H("w-full md:w-80 border-r border-border flex flex-col",m&&"hidden md:flex"),children:[t.jsx(qe,{value:f,onChange:h,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:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>c("selected"),className:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>c("unselected"),className:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:b.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:f?"No connections found":r==="selected"?"No servers selected":r==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:b.map(u=>{const $=s(u).length,R=n[u.id]?.length??0;return t.jsx(ct,{connection:u,isSelected:C===u.id,hasItemsEnabled:g(u.id),activeItemsCount:R,totalItemsCount:$,onSelect:()=>J(u.id),onToggle:()=>M(u.id)},u.id)})})})]}),t.jsx("div",{className:H("flex-1 flex-col",m?"flex":"hidden md:flex"),children:v?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(X,{variant:"ghost",size:"sm",onClick:F,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(Je,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(ye,{icon:v.icon,name:v.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:v.title}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:v.description})]})]})]}),l,t.jsx("div",{className:"flex-1 overflow-auto p-4",children:V.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:a||`This connection has no ${o} available`}):t.jsx("div",{className:"space-y-2",children:V.map(u=>t.jsx(at,{connectionId:v.id,item:u,isSelected:O(v.id,u.id),onToggle:()=>D(v.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 dt(n){return n.stopPropagation()}function mt(n){return n.stopPropagation()}function ut(n){const e=G.c(6),{promptSet:s,onPromptSetChange:o,connectionPrompts:a}=n;let l;e[0]!==a?(l=i=>(a.get(i.id)??[]).map(ft),e[0]=a,e[1]=l):l=e[1];const f=l;let h;return e[2]!==f||e[3]!==o||e[4]!==s?(h=t.jsx(Ee,{itemSet:s,onItemSetChange:o,getItems:f,itemLabel:"prompts",emptyItemsMessage:"This connection has no prompts available"}),e[2]=f,e[3]=o,e[4]=s,e[5]=h):h=e[5],h}function ft(n){return{id:n.name,name:n.name,description:n.description}}function xt(n){return n.includes("*")}function ht(n){const e=G.c(27),{patterns:s,onAddPattern:o,onRemovePattern:a}=n,[l,f]=k.useState("");let h;e[0]!==l||e[1]!==o||e[2]!==s?(h=()=>{const x=l.trim();x&&!s.includes(x)&&(o(x),f(""))},e[0]=l,e[1]=o,e[2]=s,e[3]=h):h=e[3];const i=h;let r;e[4]!==i?(r=x=>{x.key==="Enter"&&(x.preventDefault(),i())},e[4]=i,e[5]=r):r=e[5];const c=r;let m;if(e[6]!==i||e[7]!==c||e[8]!==l||e[9]!==a||e[10]!==s){const x=s.filter(xt);let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("code",{children:"*"}),e[12]=j):j=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 ",j," for single segment and ",t.jsx("code",{children:"**"})," for multiple segments."]}),e[13]=p):p=e[13];let d;e[14]===Symbol.for("react.memo_cache_sentinel")?(d=w=>f(w.target.value),e[14]=d):d=e[14];let y;e[15]!==c||e[16]!==l?(y=t.jsx(ve,{value:l,onChange:d,onKeyDown:c,placeholder:"e.g., file:///**/*.ts or db://users/*",className:"flex-1 text-sm"}),e[15]=c,e[16]=l,e[17]=y):y=e[17];let _;e[18]!==l?(_=l.trim(),e[18]=l,e[19]=_):_=e[19];const N=!_;let g;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Qe,{size:16}),e[20]=g):g=e[20];let b;e[21]!==i||e[22]!==N?(b=t.jsx(X,{type:"button",variant:"outline",size:"sm",onClick:i,disabled:N,children:g}),e[21]=i,e[22]=N,e[23]=b):b=e[23];let C;e[24]!==b||e[25]!==y?(C=t.jsxs("div",{className:"flex gap-2",children:[y,b]}),e[24]=b,e[25]=y,e[26]=C):C=e[26],m=t.jsxs("div",{className:"border-b border-border p-4 space-y-3",children:[p,C,x.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(w=>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:w}),t.jsx("button",{type:"button",onClick:()=>a(w),className:"text-muted-foreground hover:text-foreground",children:t.jsx(Ke,{size:12})})]},w))})]}),e[6]=i,e[7]=c,e[8]=l,e[9]=a,e[10]=s,e[11]=m}else m=e[11];return m}function pt(n){const e=G.c(23),{resourceSet:s,onResourceSetChange:o,connectionResources:a}=n,[l]=k.useState(null);let f;e[0]!==a?(f=g=>(a.get(g.id)??[]).map(gt),e[0]=a,e[1]=f):f=e[1];const h=f;let i;e[2]!==o||e[3]!==s?(i=(g,b)=>{const C=s[g]??[];C.includes(b)||o({...s,[g]:[...C,b]})},e[2]=o,e[3]=s,e[4]=i):i=e[4];const r=i;let c;e[5]!==o||e[6]!==s?(c=(g,b)=>{const w=(s[g]??[]).filter(v=>v!==b);if(w.length===0){const v={...s};delete v[g],o(v)}else o({...s,[g]:w})},e[5]=o,e[6]=s,e[7]=c):c=e[7];const m=c;let x;e[8]!==o?(x=g=>{o(g)},e[8]=o,e[9]=x):x=e[9];const j=x;let p;e[10]!==s||e[11]!==l?(p=l?s[l]??[]:[],e[10]=s,e[11]=l,e[12]=p):p=e[12];const d=p;let y;e[13]!==r||e[14]!==m||e[15]!==l||e[16]!==d?(y=l?t.jsx(ht,{patterns:d,onAddPattern:g=>r(l,g),onRemovePattern:g=>m(l,g)}):null,e[13]=r,e[14]=m,e[15]=l,e[16]=d,e[17]=y):y=e[17];const _=y;let N;return e[18]!==_||e[19]!==h||e[20]!==j||e[21]!==s?(N=t.jsx("div",{className:"h-full",children:t.jsx(Ee,{itemSet:s,onItemSetChange:j,getItems:h,itemLabel:"resources",emptyItemsMessage:"This connection has no resources available",extraContent:_})}),e[18]=_,e[19]=h,e[20]=j,e[21]=s,e[22]=N):N=e[22],N}function gt(n){return{id:n.uri,name:n.name||n.uri,description:n.description||n.uri}}function jt(n){const s=new TextEncoder().encode(n),o=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(o)}function bt(n){const e=G.c(52),{serverName:s,gatewayUrl:o}=n,[a,l]=k.useState(!1),[f,h]=k.useState(null),i=nt(s);let r,c,m,x;if(e[0]!==o||e[1]!==i){const q={type:"http",url:o},L={[i]:q};r=JSON.stringify(L,null,2);const le=K=>JSON.stringify({...q,headers:{"x-mesh-client":K}},null,2),E=jt(le("Cursor"));c=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(i)}&config=${encodeURIComponent(E)}`;const Y=le("Claude Code");m=i;let Q;e[6]===Symbol.for("react.memo_cache_sentinel")?(Q=/'/g,e[6]=Q):Q=e[6],x=Y.replace(Q,"'\\''"),e[0]=o,e[1]=i,e[2]=r,e[3]=c,e[4]=m,e[5]=x}else r=e[2],c=e[3],m=e[4],x=e[5];const j=`claude mcp add "${m}" --config '${x}'`;let p;e[7]!==r?(p=async()=>{await navigator.clipboard.writeText(r),l(!0),Ce.success("Configuration copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[7]=r,e[8]=p):p=e[8];const d=p;let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=async(q,L)=>{await navigator.clipboard.writeText(q),h(L),Ce.success(`${L} command copied`),setTimeout(()=>h(null),2e3)},e[9]=y):y=e[9];const _=y,N=yt;let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=g):g=e[10];let b;e[11]!==a?(b=a?t.jsx(_e,{size:14}):t.jsx(Ze,{size:14}),e[11]=a,e[12]=b):b=e[12];let C;e[13]!==d||e[14]!==b?(C=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:d,children:b})}),e[13]=d,e[14]=b,e[15]=C):C=e[15];let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(de,{children:"Copy configuration"}),e[16]=w):w=e[16];let v;e[17]!==C?(v=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(ie,{children:t.jsxs(ce,{children:[C,w]})})}),e[17]=C,e[18]=v):v=e[18];let V;e[19]!==r||e[20]!==d?(V=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:d,children:r}),e[19]=r,e[20]=d,e[21]=V):V=e[21];let O;e[22]!==V||e[23]!==v?(O=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[v,V]}),e[22]=V,e[23]=v,e[24]=O):O=e[24];let D;e[25]!==c?(D=()=>N(c),e[25]=c,e[26]=D):D=e[26];let M,J;e[27]===Symbol.for("react.memo_cache_sentinel")?(M=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%)"}}),J=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=M,e[28]=J):(M=e[27],J=e[28]);let F;e[29]!==D?(F=t.jsx(ae,{asChild:!0,children:t.jsxs(X,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:D,children:[M,J]})}),e[29]=D,e[30]=F):F=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]!==F?(S=t.jsx(ie,{children:t.jsxs(ce,{children:[F,u]})}),e[32]=F,e[33]=S):S=e[33];let $;e[34]!==j?($=()=>_(j,"Claude"),e[34]=j,e[35]=$):$=e[35];let R,z;e[36]===Symbol.for("react.memo_cache_sentinel")?(R=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%)"}}),z=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=R,e[37]=z):(R=e[36],z=e[37]);let A;e[38]!==f?(A=f==="Claude"&&t.jsx(_e,{size:14,className:"ml-2 text-green-500"}),e[38]=f,e[39]=A):A=e[39];let P;e[40]!==$||e[41]!==A?(P=t.jsx(ae,{asChild:!0,children:t.jsxs(X,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:$,children:[R,z,A]})}),e[40]=$,e[41]=A,e[42]=P):P=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(de,{children:"Add to Claude Code"}),e[43]=T):T=e[43];let W;e[44]!==P?(W=t.jsx(ie,{children:t.jsxs(ce,{children:[P,T]})}),e[44]=P,e[45]=W):W=e[45];let U;e[46]!==S||e[47]!==W?(U=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[S,W]}),e[46]=S,e[47]=W,e[48]=U):U=e[48];let B;return e[49]!==O||e[50]!==U?(B=t.jsxs("div",{className:"flex flex-col gap-4",children:[g,O,U]}),e[49]=O,e[50]=U,e[51]=B):B=e[51],B}function yt(n){window.open(n,"_blank")}const vt=Ve({title:Se().min(1,"Name is required").max(255),description:Se().nullable(),status:je(["active","inactive"]),tool_selection_mode:je(["inclusion","exclusion"]),tool_selection_strategy:je(["passthrough","smart_tool_selection","code_execution"])});function St(n,e){const s={};for(const o of n.connections)if(o.selected_tools===null){const a=e.get(o.connection_id)??[];a.length>0&&(s[o.connection_id]=a)}else o.selected_tools.length>0&&(s[o.connection_id]=o.selected_tools);return s}function Ct(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 _t(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 wt(n,e,s,o){const a=new Set([...Object.keys(n),...Object.keys(e),...Object.keys(s)]);return Array.from(a).map(l=>{const f=n[l]??[],h=o.get(l)??[],i=h.length>0&&h.every(r=>f.includes(r));return{connection_id:l,selected_tools:f.length===0||i?null:f,selected_resources:e[l]??null,selected_prompts:s[l]??null}})}function Nt(n){const e=G.c(41),{form:s,gateway:o,icon:a}=n;let l;e[0]!==s?(l=s.watch("title")||"Gateway",e[0]=s,e[1]=l):l=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(et,{}),e[2]=f):f=e[2];let h;e[3]!==a||e[4]!==l?(h=t.jsx(ye,{icon:a,name:l,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=a,e[4]=l,e[5]=h):h=e[5];let i;e[6]!==s.control?(i=t.jsx(re,{control:s.control,name:"status",render:Pt}),e[6]=s.control,e[7]=i):i=e[7];let r;e[8]!==h||e[9]!==i?(r=t.jsxs("div",{className:"flex items-start justify-between",children:[h,i]}),e[8]=h,e[9]=i,e[10]=r):r=e[10];let c;e[11]!==s.control?(c=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(re,{control:s.control,name:"title",render:$t}),t.jsx(re,{control:s.control,name:"description",render:kt})]}),e[11]=s.control,e[12]=c):c=e[12];let m;e[13]!==r||e[14]!==c?(m=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[r,c]}),e[13]=r,e[14]=c,e[15]=m):m=e[15];let x;e[16]!==s.control?(x=t.jsxs("div",{className:"flex flex-col gap-4 p-5",children:[t.jsx(re,{control:s.control,name:"tool_selection_mode",render:Tt}),t.jsx(re,{control:s.control,name:"tool_selection_strategy",render:It})]}),e[16]=s.control,e[17]=x):x=e[17];let j;e[18]!==m||e[19]!==x?(j=t.jsxs("div",{className:"flex flex-col",children:[m,x]}),e[18]=m,e[19]=x,e[20]=j):j=e[20];let p;e[21]!==s||e[22]!==j?(p=t.jsx("div",{className:"lg:border-r border-b lg:border-b-0 border-border overflow-auto",children:t.jsx(tt,{...s,children:j})}),e[21]=s,e[22]=j,e[23]=p):p=e[23];let d;e[24]!==o.id||e[25]!==o.title?(d=o.title||`gateway-${o.id.slice(0,8)}`,e[24]=o.id,e[25]=o.title,e[26]=d):d=e[26];const y=`${window.location.origin}/mcp/gateway/${o.id}`;let _;e[27]!==d||e[28]!==y?(_=t.jsx("div",{className:"p-5",children:t.jsx(bt,{serverName:d,gatewayUrl:y})}),e[27]=d,e[28]=y,e[29]=_):_=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 g;e[31]!==o.updated_at?(g=o.updated_at?it(new Date(o.updated_at),{addSuffix:!1}):"Unknown",e[31]=o.updated_at,e[32]=g):g=e[32];let b;e[33]!==g?(b=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:g})]}),e[33]=g,e[34]=b):b=e[34];let C;e[35]!==_||e[36]!==b?(C=t.jsxs("div",{className:"flex flex-col overflow-auto",children:[_,b]}),e[35]=_,e[36]=b,e[37]=C):C=e[37];let w;return e[38]!==p||e[39]!==C?(w=t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] h-full",children:[p,C]}),e[38]=p,e[39]=C,e[40]=w):w=e[40],w}function It(n){const{field:e}=n;return t.jsxs(ue,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx($e,{className:"mb-0",children:"Gateway Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ie,{children:t.jsxs(ce,{children:[t.jsx(ae,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(ke,{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(Pe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(fe,{children:t.jsx(Re,{className:"w-[180px]",children:t.jsx(ze,{})})}),t.jsxs(Ae,{children:[t.jsx(me,{value:"passthrough",children:"Passthrough"}),t.jsx(me,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(me,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(xe,{})]})}function Tt(n){const{field:e}=n;return t.jsxs(ue,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx($e,{className:"mb-0",children:"Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ie,{children:t.jsxs(ce,{children:[t.jsx(ae,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(ke,{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(Pe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(fe,{children:t.jsx(Re,{className:"w-[180px]",children:t.jsx(ze,{})})}),t.jsxs(Ae,{children:[t.jsx(me,{value:"inclusion",children:"Include Selected"}),t.jsx(me,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(xe,{})]})}function kt(n){const{field:e}=n;return t.jsxs(ue,{className:"w-full space-y-0",children:[t.jsx(fe,{children:t.jsx(ve,{...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(xe,{})]})}function $t(n){const{field:e}=n;return t.jsxs(ue,{className:"w-full space-y-0",children:[t.jsx(fe,{children:t.jsx(ve,{...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(xe,{})]})}function Pt(n){const{field:e}=n;return t.jsxs(ue,{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(fe,{children:t.jsx(Le,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(xe,{})]})}function Rt(n){const e=G.c(65),{gateway:s,gatewayId:o,requestedTabId:a}=n,l=Me();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/$org/gateways/$gatewayId"},e[0]=f):f=e[0];const h=we(f),i=He();let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={},e[1]=r):r=e[1];const c=Ie(r);let m;e[2]!==c?(m=c.map(At),e[2]=c,e[3]=m):m=e[3];const x=m,{promptsMap:j}=Xe(x),{resourcesMap:p}=Ye(x);let d;if(e[4]!==c){d=new Map;for(const I of c)I.tools&&I.tools.length>0&&d.set(I.id,I.tools.map(zt));e[4]=c,e[5]=d}else d=e[5];let y;e[6]!==d||e[7]!==s?(y=()=>St(s,d),e[6]=d,e[7]=s,e[8]=y):y=e[8];const[_,N]=k.useState(y);let g;e[9]!==s?(g=()=>Ct(s),e[9]=s,e[10]=g):g=e[10];const[b,C]=k.useState(g);let w;e[11]!==s?(w=()=>_t(s),e[11]=s,e[12]=w):w=e[12];const[v,V]=k.useState(w),[O,D]=k.useState(!1);let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=I=>{N(I),D(!0)},e[13]=M):M=e[13];const J=M;let F;e[14]===Symbol.for("react.memo_cache_sentinel")?(F=I=>{C(I),D(!0)},e[14]=F):F=e[14];const u=F;let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=I=>{V(I),D(!0)},e[15]=S):S=e[15];const $=S;let R;e[16]===Symbol.for("react.memo_cache_sentinel")?(R=Ge(vt),e[16]=R):R=e[16];const z=s.tool_selection_mode??"inclusion",A=s.tool_selection_strategy??"passthrough";let P;e[17]!==s.description||e[18]!==s.status||e[19]!==s.title||e[20]!==z||e[21]!==A?(P={resolver:R,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:z,tool_selection_strategy:A}},e[17]=s.description,e[18]=s.status,e[19]=s.title,e[20]=z,e[21]=A,e[22]=P):P=e[22];const T=Oe(P),U=T.formState.isDirty||O;let B;e[23]!==i.update||e[24]!==d||e[25]!==T||e[26]!==o||e[27]!==v||e[28]!==b||e[29]!==_?(B=async()=>{const I=T.getValues(),ge=wt(_,b,v,d);await i.update.mutateAsync({id:o,data:{title:I.title,description:I.description,status:I.status,tool_selection_mode:I.tool_selection_mode,tool_selection_strategy:I.tool_selection_strategy,connections:ge}}),T.reset(I),D(!1)},e[23]=i.update,e[24]=d,e[25]=T,e[26]=o,e[27]=v,e[28]=b,e[29]=_,e[30]=B):B=e[30];const q=B;let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=[{id:"settings",label:"Settings"},{id:"tools",label:"Tools"},{id:"resources",label:"Resources"},{id:"prompts",label:"Prompts"}],e[31]=L):L=e[31];const le=L,E=le.some(I=>I.id===a)?a:"settings";let Y;e[32]!==h?(Y=I=>{h({search:ge=>({...ge,tab:I}),replace:!0})},e[32]=h,e[33]=Y):Y=e[33];const Q=Y;let K;e[34]!==l.history?(K=()=>l.history.back(),e[34]=l.history,e[35]=K):K=e[35];let Z;e[36]!==E||e[37]!==Q?(Z=t.jsx(ot,{children:t.jsx(st,{tabs:le,activeTab:E,onTabChange:Q})}),e[36]=E,e[37]=Q,e[38]=Z):Z=e[38];let ee;e[39]!==i.update.isPending||e[40]!==q||e[41]!==U?(ee=U&&t.jsxs(X,{onClick:q,disabled:i.update.isPending,size:"sm",className:"h-7",children:[i.update.isPending&&t.jsx(be,{size:16,className:"mr-2 animate-spin"}),"Save Changes"]}),e[39]=i.update.isPending,e[40]=q,e[41]=U,e[42]=ee):ee=e[42];let te;e[43]!==ee?(te=t.jsx(lt,{children:ee}),e[43]=ee,e[44]=te):te=e[44];let he;e[45]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(be,{size:32,className:"animate-spin text-muted-foreground"})}),e[45]=he):he=e[45];let se;e[46]!==E||e[47]!==j||e[48]!==p||e[49]!==T||e[50]!==s||e[51]!==v||e[52]!==b||e[53]!==_?(se=E==="settings"?t.jsx(Nt,{form:T,gateway:s,icon:s.icon}):E==="tools"?t.jsx(Be,{toolSet:_,onToolSetChange:J}):E==="resources"?t.jsx(pt,{resourceSet:b,onResourceSetChange:u,connectionResources:p}):E==="prompts"?t.jsx(ut,{promptSet:v,onPromptSetChange:$,connectionPrompts:j}):null,e[46]=E,e[47]=j,e[48]=p,e[49]=T,e[50]=s,e[51]=v,e[52]=b,e[53]=_,e[54]=se):se=e[54];let ne;e[55]!==se?(ne=t.jsx(k.Suspense,{fallback:he,children:se}),e[55]=se,e[56]=ne):ne=e[56];let oe;e[57]!==E||e[58]!==ne?(oe=t.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:t.jsx(Ne,{children:ne},E)})}),e[57]=E,e[58]=ne,e[59]=oe):oe=e[59];let pe;return e[60]!==K||e[61]!==Z||e[62]!==te||e[63]!==oe?(pe=t.jsxs(rt,{onBack:K,children:[Z,te,oe]}),e[60]=K,e[61]=Z,e[62]=te,e[63]=oe,e[64]=pe):pe=e[64],pe}function zt(n){return n.name}function At(n){return n.id}function Et(){const n=G.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=we(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:a,org:l}=De(o);let f;n[2]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org/gateways/$gatewayId"},n[2]=f):f=n[2];const i=Fe(f).tab||"settings",r=We(a);if(!r){let m;return n[3]!==s||n[4]!==l?(m=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ue,{title:"Gateway not found",description:"This gateway may have been deleted or you may not have access.",actions:t.jsx(X,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:l}}),children:"Back to gateways"})})}),n[3]=s,n[4]=l,n[5]=m):m=n[5],m}let c;return n[6]!==r||n[7]!==a||n[8]!==i?(c=t.jsx(Rt,{gateway:r,gatewayId:a,requestedTabId:i}),n[6]=r,n[7]=a,n[8]=i,n[9]=c):c=n[9],c}function Dt(){const n=G.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ne,{children:t.jsx(k.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(be,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Et,{})})}),n[0]=e):e=n[0],e}function ms(){const n=G.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Dt,{}),n[0]=e):e=n[0],e}export{ms as default};
|
|
1
|
+
import{r as k,c as G,j as t,f as we,d as De,b as Fe,v as Ve,bo as je,w as Se,av as Me,x as Ge,y as Oe,t as Ce}from"./index-DPFREQMN.js";import{E as Ue}from"./SearchMd-Cle1NAvW.js";import{E as Ne}from"./error-boundary-77v8_xoc.js";import{I as ye,u as Ie}from"./use-connection-BObBSW3a.js";import{T as Be,S as Le}from"./switch-DfV4Hg4D.js";import{C as Te}from"./checkbox-CVaEe_Kv.js";import{B as X}from"./button-DRbSSzMo.js";import{i as Je}from"./ArrowLeft-DMs-Q5a_.js";import{c as H}from"./utils-BDWLM78M.js";import{C as qe}from"./collection-search-CAT-KwFV.js";import{I as ve}from"./input-jqtlIgj3.js";import{s as Qe}from"./Plus-BoTbvZ3o.js";import{i as Ke}from"./X-BS6wMyAf.js";import{b as We,a as He}from"./use-gateway-BnSOdKih.js";import{u as Xe,a as Ye}from"./use-connection-resources-BN_6g4of.js";import{a as ie,c as ce,b as ae,T as de,i as _e}from"./tooltip-T6rRsM2k.js";import{a as Ze}from"./Copy01-Bos_ARNX.js";import{i as et}from"./CpuChip02-DMtVpA_p.js";import{i as ke}from"./InfoCircle-D52jwcjZ.js";import{i as be}from"./Loading01-DhMR9Rl3.js";import{F as re,a as tt,b as ue,d as fe,f as xe,c as $e}from"./form-CKfv-8nJ.js";import{S as Pe,a as Re,b as ze,c as Ae,d as me}from"./select-CQ6166et.js";import{R as st}from"./resource-tabs-BA7yau3f.js";import{s as nt}from"./slugify-CEUa2lfQ.js";import{a as ot,V as lt,b as rt}from"./layout-CkdsMZBx.js";import{f as it}from"./formatDistanceToNow-D6EC-Mne.js";import"./ChevronDown-o688tr0R.js";import"./badge-ZGSDRM2V.js";const ct=k.memo(function(e){const s=G.c(20),{connection:o,isSelected:a,hasItemsEnabled:l,activeItemsCount:f,totalItemsCount:h,onSelect:i,onToggle:r}=e,c=a?"bg-accent/50":"hover:bg-muted/50";let m;s[0]!==c?(m=H("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",c),s[0]=c,s[1]=m):m=s[1];let x;s[2]!==o.icon||s[3]!==o.title?(x=t.jsx(ye,{icon:o.icon,name:o.title,size:"xs"}),s[2]=o.icon,s[3]=o.title,s[4]=x):x=s[4];let j;s[5]!==o.title?(j=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]=j):j=s[6];let p;s[7]!==i||s[8]!==x||s[9]!==j?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:i,children:[x,j]}),s[7]=i,s[8]=x,s[9]=j,s[10]=p):p=s[10];let d;s[11]!==f||s[12]!==l||s[13]!==r||s[14]!==h?(d=h>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[f,"/",h]}),t.jsx(Te,{checked:l,onCheckedChange:r,onClick:dt})]}),s[11]=f,s[12]=l,s[13]=r,s[14]=h,s[15]=d):d=s[15];let y;return s[16]!==m||s[17]!==p||s[18]!==d?(y=t.jsxs("div",{className:m,children:[p,d]}),s[16]=m,s[17]=p,s[18]=d,s[19]=y):y=s[19],y}),at=k.memo(function(e){const s=G.c(18),{connectionId:o,item:a,isSelected:l,onToggle:f}=e,h=`item-${o}-${a.id}`,i=l?"text-foreground":"text-muted-foreground";let r;s[0]!==i?(r=H("text-sm font-medium",i),s[0]=i,s[1]=r):r=s[1];let c;s[2]!==a.name||s[3]!==r?(c=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:r,children:a.name})}),s[2]=a.name,s[3]=r,s[4]=c):c=s[4];let m;s[5]!==a.description?(m=a.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:a.description}),s[5]=a.description,s[6]=m):m=s[6];let x;s[7]!==c||s[8]!==m?(x=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,m]}),s[7]=c,s[8]=m,s[9]=x):x=s[9];const j=`item-${o}-${a.id}`;let p;s[10]!==l||s[11]!==f||s[12]!==j?(p=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(Te,{id:j,checked:l,onCheckedChange:f,onClick:mt})}),s[10]=l,s[11]=f,s[12]=j,s[13]=p):p=s[13];let d;return s[14]!==h||s[15]!==x||s[16]!==p?(d=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:h,children:[x,p]}),s[14]=h,s[15]=x,s[16]=p,s[17]=d):d=s[17],d});function Ee({itemSet:n,onItemSetChange:e,getItems:s,itemLabel:o,emptyItemsMessage:a,extraContent:l}){const[f,h]=k.useState(""),i=k.useDeferredValue(f),[r,c]=k.useState("all"),[m,x]=k.useState(!1),j=k.useRef(new Set(Object.keys(n))),p=Ie({searchTerm:i.trim()||void 0}),d=j.current,y=[...d.values()].map(u=>p.find(S=>S.id===u)).filter(u=>u!==void 0),_=p.filter(u=>!d.has(u.id)),N=[...y,..._],g=u=>{const S=n[u];return S!==void 0&&S.length>0},b=N.filter(u=>{if(r==="all")return!0;const S=g(u.id);return r==="selected"?S:r==="unselected"?!S:!0}),[C,w]=k.useState(N[0]?.id??null),v=C?N.find(u=>u.id===C)??null:null,V=v?s(v):[],O=(u,S)=>n[u]?.includes(S)??!1,D=(u,S)=>{const $=n[u]??[],R=$.includes(S),z={...n};if(R){const A=$.filter(P=>P!==S);A.length===0?delete z[u]:z[u]=A}else z[u]=[...$,S];e(z)},M=u=>{const S=N.find(T=>T.id===u);if(!S)return;const $=s(S);if($.length===0)return;const R=n[u]??[],z=$.map(T=>T.id),A=R.length>0&&z.every(T=>R.includes(T)),P={...n};A?delete P[u]:(P[u]=z,w(u)),e(P)},J=u=>{w(u),x(!0)},F=()=>{x(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:H("w-full md:w-80 border-r border-border flex flex-col",m&&"hidden md:flex"),children:[t.jsx(qe,{value:f,onChange:h,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:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>c("selected"),className:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>c("unselected"),className:H("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:b.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:f?"No connections found":r==="selected"?"No servers selected":r==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:b.map(u=>{const $=s(u).length,R=n[u.id]?.length??0;return t.jsx(ct,{connection:u,isSelected:C===u.id,hasItemsEnabled:g(u.id),activeItemsCount:R,totalItemsCount:$,onSelect:()=>J(u.id),onToggle:()=>M(u.id)},u.id)})})})]}),t.jsx("div",{className:H("flex-1 flex-col",m?"flex":"hidden md:flex"),children:v?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(X,{variant:"ghost",size:"sm",onClick:F,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(Je,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(ye,{icon:v.icon,name:v.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:v.title}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:v.description})]})]})]}),l,t.jsx("div",{className:"flex-1 overflow-auto p-4",children:V.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:a||`This connection has no ${o} available`}):t.jsx("div",{className:"space-y-2",children:V.map(u=>t.jsx(at,{connectionId:v.id,item:u,isSelected:O(v.id,u.id),onToggle:()=>D(v.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 dt(n){return n.stopPropagation()}function mt(n){return n.stopPropagation()}function ut(n){const e=G.c(6),{promptSet:s,onPromptSetChange:o,connectionPrompts:a}=n;let l;e[0]!==a?(l=i=>(a.get(i.id)??[]).map(ft),e[0]=a,e[1]=l):l=e[1];const f=l;let h;return e[2]!==f||e[3]!==o||e[4]!==s?(h=t.jsx(Ee,{itemSet:s,onItemSetChange:o,getItems:f,itemLabel:"prompts",emptyItemsMessage:"This connection has no prompts available"}),e[2]=f,e[3]=o,e[4]=s,e[5]=h):h=e[5],h}function ft(n){return{id:n.name,name:n.name,description:n.description}}function xt(n){return n.includes("*")}function ht(n){const e=G.c(27),{patterns:s,onAddPattern:o,onRemovePattern:a}=n,[l,f]=k.useState("");let h;e[0]!==l||e[1]!==o||e[2]!==s?(h=()=>{const x=l.trim();x&&!s.includes(x)&&(o(x),f(""))},e[0]=l,e[1]=o,e[2]=s,e[3]=h):h=e[3];const i=h;let r;e[4]!==i?(r=x=>{x.key==="Enter"&&(x.preventDefault(),i())},e[4]=i,e[5]=r):r=e[5];const c=r;let m;if(e[6]!==i||e[7]!==c||e[8]!==l||e[9]!==a||e[10]!==s){const x=s.filter(xt);let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("code",{children:"*"}),e[12]=j):j=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 ",j," for single segment and ",t.jsx("code",{children:"**"})," for multiple segments."]}),e[13]=p):p=e[13];let d;e[14]===Symbol.for("react.memo_cache_sentinel")?(d=w=>f(w.target.value),e[14]=d):d=e[14];let y;e[15]!==c||e[16]!==l?(y=t.jsx(ve,{value:l,onChange:d,onKeyDown:c,placeholder:"e.g., file:///**/*.ts or db://users/*",className:"flex-1 text-sm"}),e[15]=c,e[16]=l,e[17]=y):y=e[17];let _;e[18]!==l?(_=l.trim(),e[18]=l,e[19]=_):_=e[19];const N=!_;let g;e[20]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Qe,{size:16}),e[20]=g):g=e[20];let b;e[21]!==i||e[22]!==N?(b=t.jsx(X,{type:"button",variant:"outline",size:"sm",onClick:i,disabled:N,children:g}),e[21]=i,e[22]=N,e[23]=b):b=e[23];let C;e[24]!==b||e[25]!==y?(C=t.jsxs("div",{className:"flex gap-2",children:[y,b]}),e[24]=b,e[25]=y,e[26]=C):C=e[26],m=t.jsxs("div",{className:"border-b border-border p-4 space-y-3",children:[p,C,x.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(w=>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:w}),t.jsx("button",{type:"button",onClick:()=>a(w),className:"text-muted-foreground hover:text-foreground",children:t.jsx(Ke,{size:12})})]},w))})]}),e[6]=i,e[7]=c,e[8]=l,e[9]=a,e[10]=s,e[11]=m}else m=e[11];return m}function pt(n){const e=G.c(23),{resourceSet:s,onResourceSetChange:o,connectionResources:a}=n,[l]=k.useState(null);let f;e[0]!==a?(f=g=>(a.get(g.id)??[]).map(gt),e[0]=a,e[1]=f):f=e[1];const h=f;let i;e[2]!==o||e[3]!==s?(i=(g,b)=>{const C=s[g]??[];C.includes(b)||o({...s,[g]:[...C,b]})},e[2]=o,e[3]=s,e[4]=i):i=e[4];const r=i;let c;e[5]!==o||e[6]!==s?(c=(g,b)=>{const w=(s[g]??[]).filter(v=>v!==b);if(w.length===0){const v={...s};delete v[g],o(v)}else o({...s,[g]:w})},e[5]=o,e[6]=s,e[7]=c):c=e[7];const m=c;let x;e[8]!==o?(x=g=>{o(g)},e[8]=o,e[9]=x):x=e[9];const j=x;let p;e[10]!==s||e[11]!==l?(p=l?s[l]??[]:[],e[10]=s,e[11]=l,e[12]=p):p=e[12];const d=p;let y;e[13]!==r||e[14]!==m||e[15]!==l||e[16]!==d?(y=l?t.jsx(ht,{patterns:d,onAddPattern:g=>r(l,g),onRemovePattern:g=>m(l,g)}):null,e[13]=r,e[14]=m,e[15]=l,e[16]=d,e[17]=y):y=e[17];const _=y;let N;return e[18]!==_||e[19]!==h||e[20]!==j||e[21]!==s?(N=t.jsx("div",{className:"h-full",children:t.jsx(Ee,{itemSet:s,onItemSetChange:j,getItems:h,itemLabel:"resources",emptyItemsMessage:"This connection has no resources available",extraContent:_})}),e[18]=_,e[19]=h,e[20]=j,e[21]=s,e[22]=N):N=e[22],N}function gt(n){return{id:n.uri,name:n.name||n.uri,description:n.description||n.uri}}function jt(n){const s=new TextEncoder().encode(n),o=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(o)}function bt(n){const e=G.c(52),{serverName:s,gatewayUrl:o}=n,[a,l]=k.useState(!1),[f,h]=k.useState(null),i=nt(s);let r,c,m,x;if(e[0]!==o||e[1]!==i){const q={type:"http",url:o},L={[i]:q};r=JSON.stringify(L,null,2);const le=K=>JSON.stringify({...q,headers:{"x-mesh-client":K}},null,2),E=jt(le("Cursor"));c=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(i)}&config=${encodeURIComponent(E)}`;const Y=le("Claude Code");m=i;let Q;e[6]===Symbol.for("react.memo_cache_sentinel")?(Q=/'/g,e[6]=Q):Q=e[6],x=Y.replace(Q,"'\\''"),e[0]=o,e[1]=i,e[2]=r,e[3]=c,e[4]=m,e[5]=x}else r=e[2],c=e[3],m=e[4],x=e[5];const j=`claude mcp add "${m}" --config '${x}'`;let p;e[7]!==r?(p=async()=>{await navigator.clipboard.writeText(r),l(!0),Ce.success("Configuration copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[7]=r,e[8]=p):p=e[8];const d=p;let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=async(q,L)=>{await navigator.clipboard.writeText(q),h(L),Ce.success(`${L} command copied`),setTimeout(()=>h(null),2e3)},e[9]=y):y=e[9];const _=y,N=yt;let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=g):g=e[10];let b;e[11]!==a?(b=a?t.jsx(_e,{size:14}):t.jsx(Ze,{size:14}),e[11]=a,e[12]=b):b=e[12];let C;e[13]!==d||e[14]!==b?(C=t.jsx(ae,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:d,children:b})}),e[13]=d,e[14]=b,e[15]=C):C=e[15];let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(de,{children:"Copy configuration"}),e[16]=w):w=e[16];let v;e[17]!==C?(v=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(ie,{children:t.jsxs(ce,{children:[C,w]})})}),e[17]=C,e[18]=v):v=e[18];let V;e[19]!==r||e[20]!==d?(V=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:d,children:r}),e[19]=r,e[20]=d,e[21]=V):V=e[21];let O;e[22]!==V||e[23]!==v?(O=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[v,V]}),e[22]=V,e[23]=v,e[24]=O):O=e[24];let D;e[25]!==c?(D=()=>N(c),e[25]=c,e[26]=D):D=e[26];let M,J;e[27]===Symbol.for("react.memo_cache_sentinel")?(M=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%)"}}),J=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=M,e[28]=J):(M=e[27],J=e[28]);let F;e[29]!==D?(F=t.jsx(ae,{asChild:!0,children:t.jsxs(X,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:D,children:[M,J]})}),e[29]=D,e[30]=F):F=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]!==F?(S=t.jsx(ie,{children:t.jsxs(ce,{children:[F,u]})}),e[32]=F,e[33]=S):S=e[33];let $;e[34]!==j?($=()=>_(j,"Claude"),e[34]=j,e[35]=$):$=e[35];let R,z;e[36]===Symbol.for("react.memo_cache_sentinel")?(R=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%)"}}),z=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=R,e[37]=z):(R=e[36],z=e[37]);let A;e[38]!==f?(A=f==="Claude"&&t.jsx(_e,{size:14,className:"ml-2 text-green-500"}),e[38]=f,e[39]=A):A=e[39];let P;e[40]!==$||e[41]!==A?(P=t.jsx(ae,{asChild:!0,children:t.jsxs(X,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:$,children:[R,z,A]})}),e[40]=$,e[41]=A,e[42]=P):P=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(de,{children:"Add to Claude Code"}),e[43]=T):T=e[43];let W;e[44]!==P?(W=t.jsx(ie,{children:t.jsxs(ce,{children:[P,T]})}),e[44]=P,e[45]=W):W=e[45];let U;e[46]!==S||e[47]!==W?(U=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[S,W]}),e[46]=S,e[47]=W,e[48]=U):U=e[48];let B;return e[49]!==O||e[50]!==U?(B=t.jsxs("div",{className:"flex flex-col gap-4",children:[g,O,U]}),e[49]=O,e[50]=U,e[51]=B):B=e[51],B}function yt(n){window.open(n,"_blank")}const vt=Ve({title:Se().min(1,"Name is required").max(255),description:Se().nullable(),status:je(["active","inactive"]),tool_selection_mode:je(["inclusion","exclusion"]),tool_selection_strategy:je(["passthrough","smart_tool_selection","code_execution"])});function St(n,e){const s={};for(const o of n.connections)if(o.selected_tools===null){const a=e.get(o.connection_id)??[];a.length>0&&(s[o.connection_id]=a)}else o.selected_tools.length>0&&(s[o.connection_id]=o.selected_tools);return s}function Ct(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 _t(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 wt(n,e,s,o){const a=new Set([...Object.keys(n),...Object.keys(e),...Object.keys(s)]);return Array.from(a).map(l=>{const f=n[l]??[],h=o.get(l)??[],i=h.length>0&&h.every(r=>f.includes(r));return{connection_id:l,selected_tools:f.length===0||i?null:f,selected_resources:e[l]??null,selected_prompts:s[l]??null}})}function Nt(n){const e=G.c(41),{form:s,gateway:o,icon:a}=n;let l;e[0]!==s?(l=s.watch("title")||"Gateway",e[0]=s,e[1]=l):l=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(et,{}),e[2]=f):f=e[2];let h;e[3]!==a||e[4]!==l?(h=t.jsx(ye,{icon:a,name:l,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=a,e[4]=l,e[5]=h):h=e[5];let i;e[6]!==s.control?(i=t.jsx(re,{control:s.control,name:"status",render:Pt}),e[6]=s.control,e[7]=i):i=e[7];let r;e[8]!==h||e[9]!==i?(r=t.jsxs("div",{className:"flex items-start justify-between",children:[h,i]}),e[8]=h,e[9]=i,e[10]=r):r=e[10];let c;e[11]!==s.control?(c=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(re,{control:s.control,name:"title",render:$t}),t.jsx(re,{control:s.control,name:"description",render:kt})]}),e[11]=s.control,e[12]=c):c=e[12];let m;e[13]!==r||e[14]!==c?(m=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[r,c]}),e[13]=r,e[14]=c,e[15]=m):m=e[15];let x;e[16]!==s.control?(x=t.jsxs("div",{className:"flex flex-col gap-4 p-5",children:[t.jsx(re,{control:s.control,name:"tool_selection_mode",render:Tt}),t.jsx(re,{control:s.control,name:"tool_selection_strategy",render:It})]}),e[16]=s.control,e[17]=x):x=e[17];let j;e[18]!==m||e[19]!==x?(j=t.jsxs("div",{className:"flex flex-col",children:[m,x]}),e[18]=m,e[19]=x,e[20]=j):j=e[20];let p;e[21]!==s||e[22]!==j?(p=t.jsx("div",{className:"lg:border-r border-b lg:border-b-0 border-border overflow-auto",children:t.jsx(tt,{...s,children:j})}),e[21]=s,e[22]=j,e[23]=p):p=e[23];let d;e[24]!==o.id||e[25]!==o.title?(d=o.title||`gateway-${o.id.slice(0,8)}`,e[24]=o.id,e[25]=o.title,e[26]=d):d=e[26];const y=`${window.location.origin}/mcp/gateway/${o.id}`;let _;e[27]!==d||e[28]!==y?(_=t.jsx("div",{className:"p-5",children:t.jsx(bt,{serverName:d,gatewayUrl:y})}),e[27]=d,e[28]=y,e[29]=_):_=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 g;e[31]!==o.updated_at?(g=o.updated_at?it(new Date(o.updated_at),{addSuffix:!1}):"Unknown",e[31]=o.updated_at,e[32]=g):g=e[32];let b;e[33]!==g?(b=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:g})]}),e[33]=g,e[34]=b):b=e[34];let C;e[35]!==_||e[36]!==b?(C=t.jsxs("div",{className:"flex flex-col overflow-auto",children:[_,b]}),e[35]=_,e[36]=b,e[37]=C):C=e[37];let w;return e[38]!==p||e[39]!==C?(w=t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] h-full",children:[p,C]}),e[38]=p,e[39]=C,e[40]=w):w=e[40],w}function It(n){const{field:e}=n;return t.jsxs(ue,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx($e,{className:"mb-0",children:"Gateway Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ie,{children:t.jsxs(ce,{children:[t.jsx(ae,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(ke,{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(Pe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(fe,{children:t.jsx(Re,{className:"w-[180px]",children:t.jsx(ze,{})})}),t.jsxs(Ae,{children:[t.jsx(me,{value:"passthrough",children:"Passthrough"}),t.jsx(me,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(me,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(xe,{})]})}function Tt(n){const{field:e}=n;return t.jsxs(ue,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx($e,{className:"mb-0",children:"Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ie,{children:t.jsxs(ce,{children:[t.jsx(ae,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(ke,{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(Pe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(fe,{children:t.jsx(Re,{className:"w-[180px]",children:t.jsx(ze,{})})}),t.jsxs(Ae,{children:[t.jsx(me,{value:"inclusion",children:"Include Selected"}),t.jsx(me,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(xe,{})]})}function kt(n){const{field:e}=n;return t.jsxs(ue,{className:"w-full space-y-0",children:[t.jsx(fe,{children:t.jsx(ve,{...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(xe,{})]})}function $t(n){const{field:e}=n;return t.jsxs(ue,{className:"w-full space-y-0",children:[t.jsx(fe,{children:t.jsx(ve,{...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(xe,{})]})}function Pt(n){const{field:e}=n;return t.jsxs(ue,{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(fe,{children:t.jsx(Le,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(xe,{})]})}function Rt(n){const e=G.c(65),{gateway:s,gatewayId:o,requestedTabId:a}=n,l=Me();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/$org/gateways/$gatewayId"},e[0]=f):f=e[0];const h=we(f),i=He();let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={},e[1]=r):r=e[1];const c=Ie(r);let m;e[2]!==c?(m=c.map(At),e[2]=c,e[3]=m):m=e[3];const x=m,{promptsMap:j}=Xe(x),{resourcesMap:p}=Ye(x);let d;if(e[4]!==c){d=new Map;for(const I of c)I.tools&&I.tools.length>0&&d.set(I.id,I.tools.map(zt));e[4]=c,e[5]=d}else d=e[5];let y;e[6]!==d||e[7]!==s?(y=()=>St(s,d),e[6]=d,e[7]=s,e[8]=y):y=e[8];const[_,N]=k.useState(y);let g;e[9]!==s?(g=()=>Ct(s),e[9]=s,e[10]=g):g=e[10];const[b,C]=k.useState(g);let w;e[11]!==s?(w=()=>_t(s),e[11]=s,e[12]=w):w=e[12];const[v,V]=k.useState(w),[O,D]=k.useState(!1);let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=I=>{N(I),D(!0)},e[13]=M):M=e[13];const J=M;let F;e[14]===Symbol.for("react.memo_cache_sentinel")?(F=I=>{C(I),D(!0)},e[14]=F):F=e[14];const u=F;let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=I=>{V(I),D(!0)},e[15]=S):S=e[15];const $=S;let R;e[16]===Symbol.for("react.memo_cache_sentinel")?(R=Ge(vt),e[16]=R):R=e[16];const z=s.tool_selection_mode??"inclusion",A=s.tool_selection_strategy??"passthrough";let P;e[17]!==s.description||e[18]!==s.status||e[19]!==s.title||e[20]!==z||e[21]!==A?(P={resolver:R,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:z,tool_selection_strategy:A}},e[17]=s.description,e[18]=s.status,e[19]=s.title,e[20]=z,e[21]=A,e[22]=P):P=e[22];const T=Oe(P),U=T.formState.isDirty||O;let B;e[23]!==i.update||e[24]!==d||e[25]!==T||e[26]!==o||e[27]!==v||e[28]!==b||e[29]!==_?(B=async()=>{const I=T.getValues(),ge=wt(_,b,v,d);await i.update.mutateAsync({id:o,data:{title:I.title,description:I.description,status:I.status,tool_selection_mode:I.tool_selection_mode,tool_selection_strategy:I.tool_selection_strategy,connections:ge}}),T.reset(I),D(!1)},e[23]=i.update,e[24]=d,e[25]=T,e[26]=o,e[27]=v,e[28]=b,e[29]=_,e[30]=B):B=e[30];const q=B;let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=[{id:"settings",label:"Settings"},{id:"tools",label:"Tools"},{id:"resources",label:"Resources"},{id:"prompts",label:"Prompts"}],e[31]=L):L=e[31];const le=L,E=le.some(I=>I.id===a)?a:"settings";let Y;e[32]!==h?(Y=I=>{h({search:ge=>({...ge,tab:I}),replace:!0})},e[32]=h,e[33]=Y):Y=e[33];const Q=Y;let K;e[34]!==l.history?(K=()=>l.history.back(),e[34]=l.history,e[35]=K):K=e[35];let Z;e[36]!==E||e[37]!==Q?(Z=t.jsx(ot,{children:t.jsx(st,{tabs:le,activeTab:E,onTabChange:Q})}),e[36]=E,e[37]=Q,e[38]=Z):Z=e[38];let ee;e[39]!==i.update.isPending||e[40]!==q||e[41]!==U?(ee=U&&t.jsxs(X,{onClick:q,disabled:i.update.isPending,size:"sm",className:"h-7",children:[i.update.isPending&&t.jsx(be,{size:16,className:"mr-2 animate-spin"}),"Save Changes"]}),e[39]=i.update.isPending,e[40]=q,e[41]=U,e[42]=ee):ee=e[42];let te;e[43]!==ee?(te=t.jsx(lt,{children:ee}),e[43]=ee,e[44]=te):te=e[44];let he;e[45]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(be,{size:32,className:"animate-spin text-muted-foreground"})}),e[45]=he):he=e[45];let se;e[46]!==E||e[47]!==j||e[48]!==p||e[49]!==T||e[50]!==s||e[51]!==v||e[52]!==b||e[53]!==_?(se=E==="settings"?t.jsx(Nt,{form:T,gateway:s,icon:s.icon}):E==="tools"?t.jsx(Be,{toolSet:_,onToolSetChange:J}):E==="resources"?t.jsx(pt,{resourceSet:b,onResourceSetChange:u,connectionResources:p}):E==="prompts"?t.jsx(ut,{promptSet:v,onPromptSetChange:$,connectionPrompts:j}):null,e[46]=E,e[47]=j,e[48]=p,e[49]=T,e[50]=s,e[51]=v,e[52]=b,e[53]=_,e[54]=se):se=e[54];let ne;e[55]!==se?(ne=t.jsx(k.Suspense,{fallback:he,children:se}),e[55]=se,e[56]=ne):ne=e[56];let oe;e[57]!==E||e[58]!==ne?(oe=t.jsx("div",{className:"flex h-full w-full bg-background overflow-hidden",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-auto",children:t.jsx(Ne,{children:ne},E)})}),e[57]=E,e[58]=ne,e[59]=oe):oe=e[59];let pe;return e[60]!==K||e[61]!==Z||e[62]!==te||e[63]!==oe?(pe=t.jsxs(rt,{onBack:K,children:[Z,te,oe]}),e[60]=K,e[61]=Z,e[62]=te,e[63]=oe,e[64]=pe):pe=e[64],pe}function zt(n){return n.name}function At(n){return n.id}function Et(){const n=G.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=we(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:a,org:l}=De(o);let f;n[2]===Symbol.for("react.memo_cache_sentinel")?(f={from:"/shell/$org/gateways/$gatewayId"},n[2]=f):f=n[2];const i=Fe(f).tab||"settings",r=We(a);if(!r){let m;return n[3]!==s||n[4]!==l?(m=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ue,{title:"Gateway not found",description:"This gateway may have been deleted or you may not have access.",actions:t.jsx(X,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:l}}),children:"Back to gateways"})})}),n[3]=s,n[4]=l,n[5]=m):m=n[5],m}let c;return n[6]!==r||n[7]!==a||n[8]!==i?(c=t.jsx(Rt,{gateway:r,gatewayId:a,requestedTabId:i}),n[6]=r,n[7]=a,n[8]=i,n[9]=c):c=n[9],c}function Dt(){const n=G.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ne,{children:t.jsx(k.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(be,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Et,{})})}),n[0]=e):e=n[0],e}function ms(){const n=G.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Dt,{}),n[0]=e):e=n[0],e}export{ms as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as te,j as t,r as se,f as ae,t as re}from"./index-
|
|
1
|
+
import{c as te,j as t,r as se,f as ae,t as re}from"./index-DPFREQMN.js";import{C as ie}from"./collection-header-Bbr_EelX.js";import{C as ne}from"./collection-page-BB_fkZHl.js";import{C as le}from"./collection-search-CAT-KwFV.js";import{C as ce}from"./collection-table-wrapper-CpATqDDy.js";import{C as de}from"./connection-card-BHTh8x40.js";import{E as q}from"./SearchMd-Cle1NAvW.js";import{E as me}from"./error-boundary-77v8_xoc.js";import{u as ue,I as ge}from"./use-connection-BObBSW3a.js";import{a as pe,u as he}from"./use-gateway-BnSOdKih.js";import{u as fe,s as Q}from"./use-list-state-BXrmE2tY.js";import{u as xe}from"./tooltip-T6rRsM2k.js";import{c as ye,b as we,d as je,A as Ce,e as Ne,g as De,a as Se,f as ve}from"./alert-dialog-BZCR78KJ.js";import{B as oe}from"./badge-ZGSDRM2V.js";import{B as J}from"./button-DRbSSzMo.js";import{b as U,D as X,a as Y,c as B}from"./dropdown-menu-ZynV4CKZ.js";import{i as y}from"./CpuChip02-DMtVpA_p.js";import{i as Z}from"./DotsVertical-DjWbU1pT.js";import{i as be}from"./Loading01-DhMR9Rl3.js";import{s as ee}from"./Trash01-CObqwAuB.js";import"./collection-display-button-CxHAeMlJ.js";import"./Grid01-DKsOPPqt.js";import"./utils-BDWLM78M.js";import"./input-jqtlIgj3.js";import"./card-yDshgaNk.js";import"./use-mobile-BWmDV7SV.js";function ke(e,a){switch(a.type){case"delete":return{mode:"deleting",gateway:a.gateway};case"close":return{mode:"idle"}}}function _e(){const e=te.c(68),{org:a}=xe(),r=ae();let w;e[0]!==a.slug?(w={namespace:a.slug,resource:"gateways"},e[0]=a.slug,e[1]=w):w=e[1];const s=fe(w),i=pe(),x=he(s);let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j={},e[2]=j):j=e[2];const R=ue(j);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[n,N]=se.useReducer(ke,C);let D;e[4]!==i.create||e[5]!==R.length||e[6]!==r||e[7]!==a.slug?(D=async()=>{if(R.length===0){re.error("Create at least one MCP connection first");return}const o=await i.create.mutateAsync({title:"New Gateway",description:"Gateways let you securely expose integrated tools to the outside world.",status:"active",tool_selection_strategy:"passthrough",tool_selection_mode:"inclusion",connections:[]});r({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},e[4]=i.create,e[5]=R.length,e[6]=r,e[7]=a.slug,e[8]=D):D=e[8];const T=D;let S;e[9]!==i.delete||e[10]!==n.gateway||e[11]!==n.mode?(S=async()=>{if(n.mode!=="deleting")return;const o=n.gateway.id;N({type:"close"});try{await i.delete.mutateAsync(o)}catch{}},e[9]=i.delete,e[10]=n.gateway,e[11]=n.mode,e[12]=S):S=e[12];const O=S;let v,b,k,_,M,I;e[13]===Symbol.for("react.memo_cache_sentinel")?(b={id:"icon",header:"",render:Be,cellClassName:"w-16 shrink-0",wrap:!0},k={id:"title",header:"Name",render:Ke,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_={id:"description",header:"Description",render:Ge,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},M={id:"mode",header:"Mode",accessor:Ee,cellClassName:"w-[100px]"},I={id:"connections",header:"Connections",render:Ae,cellClassName:"w-24 shrink-0"},v={id:"status",header:"Status",render:ze,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=v,e[14]=b,e[15]=k,e[16]=_,e[17]=M,e[18]=I):(v=e[13],b=e[14],k=e[15],_=e[16],M=e[17],I=e[18]);let P;e[19]!==r||e[20]!==a.slug?(P=[b,k,_,M,I,v,{id:"actions",header:"",render:o=>t.jsxs(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:$e,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Pe,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),r({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=r,e[20]=a.slug,e[21]=P):P=e[21];const V=P,H=i.create.isPending?"Creating...":"Create MCP Gateway";let $;e[22]!==i.create.isPending||e[23]!==T||e[24]!==H?($=t.jsx(J,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:i.create.isPending,children:H}),e[22]=i.create.isPending,e[23]=T,e[24]=H,e[25]=$):$=e[25];const L=$,F=n.mode==="deleting";let z;e[26]===Symbol.for("react.memo_cache_sentinel")?(z=o=>!o&&N({type:"close"}),e[26]=z):z=e[26];let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(ye,{children:"Delete Gateway?"}),e[27]=A):A=e[27];const W=n.mode==="deleting"&&n.gateway.title;let c;e[28]!==W?(c=t.jsxs(we,{children:[A,t.jsxs(je,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[28]=W,e[29]=c):c=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Ce,{children:"Cancel"}),e[30]=E):E=e[30];let d;e[31]!==O?(d=t.jsxs(Ne,{children:[E,t.jsx(De,{onClick:O,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=O,e[32]=d):d=e[32];let m;e[33]!==c||e[34]!==d?(m=t.jsxs(Se,{children:[c,d]}),e[33]=c,e[34]=d,e[35]=m):m=e[35];let u;e[36]!==F||e[37]!==m?(u=t.jsx(ve,{open:F,onOpenChange:z,children:m}),e[36]=F,e[37]=m,e[38]=u):u=e[38];let G;e[39]===Symbol.for("react.memo_cache_sentinel")?(G=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[39]=G):G=e[39];let g;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(g=t.jsx(ie,{title:"MCP Gateways",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:G,ctaButton:L}),e[40]=L,e[41]=s.handleSort,e[42]=s.setViewMode,e[43]=s.sortDirection,e[44]=s.sortKey,e[45]=s.viewMode,e[46]=g):g=e[46];let p;e[47]!==s?(p=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=p):p=e[48];let h;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==p?(h=t.jsx(le,{value:s.search,onChange:s.setSearch,placeholder:"Search for a gateway...",onKeyDown:p}),e[49]=s.search,e[50]=s.setSearch,e[51]=p,e[52]=h):h=e[52];let f;e[53]!==V||e[54]!==x||e[55]!==s.handleSort||e[56]!==s.search||e[57]!==s.sortDirection||e[58]!==s.sortKey||e[59]!==s.viewMode||e[60]!==r||e[61]!==a.slug?(f=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(y,{size:36,className:"text-muted-foreground"}),title:s.search?"No gateways found":"No gateways yet",description:s.search?`No gateways match "${s.search}"`:"Create a gateway to aggregate tools from multiple MCP connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(o=>t.jsx(de,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:t.jsx(y,{}),onClick:()=>r({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}}),footer:t.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.jsxs("span",{children:[o.connections.length," connection",o.connections.length!==1?"s":""]}),t.jsx("span",{children:"•"}),t.jsx("span",{children:o.tool_selection_mode==="exclusion"?"Exclude":"Include"})]}),headerActions:t.jsxs(U,{children:[t.jsx(X,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ie,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Me,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),r({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ce,{columns:V,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>r({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(y,{size:36,className:"text-muted-foreground"}),title:"No gateways found",description:`No gateways match "${s.search}"`}):t.jsx(q,{image:t.jsx(y,{size:36,className:"text-muted-foreground"}),title:"No gateways yet",description:"Create a gateway to aggregate tools from multiple MCP connections."})}),e[53]=V,e[54]=x,e[55]=s.handleSort,e[56]=s.search,e[57]=s.sortDirection,e[58]=s.sortKey,e[59]=s.viewMode,e[60]=r,e[61]=a.slug,e[62]=f):f=e[62];let K;return e[63]!==u||e[64]!==g||e[65]!==h||e[66]!==f?(K=t.jsxs(ne,{children:[u,g,h,f]}),e[63]=u,e[64]=g,e[65]=h,e[66]=f,e[67]=K):K=e[67],K}function Me(e){return e.stopPropagation()}function Ie(e){return e.stopPropagation()}function Pe(e){return e.stopPropagation()}function $e(e){return e.stopPropagation()}function ze(e){return t.jsx(oe,{variant:e.status==="active"?"default":"outline",children:e.status})}function Ae(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function Ee(e){return t.jsx(oe,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function Ge(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Ke(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Be(e){return t.jsx(ge,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(y,{size:16})})}function mt(){const e=te.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(me,{children:t.jsx(se.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(be,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_e,{})})}),e[0]=a):a=e[0],a}export{mt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,j as i,a as w,r as C,f as E}from"./index-C4a1DvcM.js";import{C as _}from"./card-BVamKRXq.js";import{c as v}from"./utils-BXNVuJET.js";import{A as $}from"./avatar-CqnXtnOZ.js";import{i as k}from"./AlertCircle-Cu9USDUK.js";import{s as A}from"./Plus-DTWKiMkv.js";import{B as O}from"./button-Chm7HSn5.js";import{I as L}from"./input-DCV4VviT.js";import{C as D}from"./create-organization-dialog-D3ZZuPXS.js";import"./alert-dialog-Ck-TQRXx.js";import"./form-BBS_Tp5l.js";import"./spinner-zi1IadXF.js";function F(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let a;e[0]!==s?(a=p=>{s&&s(p)},e[0]=s,e[1]=a):a=e[1];const d=a,m=s&&"cursor-pointer",o=x&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==m||e[4]!==o?(c=v("group transition-all flex flex-col gap-0",m,o,l),e[2]=l,e[3]=m,e[4]=o,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==d||e[8]!==c?(g=i.jsx(_,{className:c,onClick:d,children:n}),e[6]=n,e[7]=d,e[8]=c,e[9]=g):g=e[9],g}function H(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:a}=t,d=s===void 0?"square":s,m=r===void 0?"lg":r,o=x===void 0?"contain":x;let c;return e[0]!==a||e[1]!==l||e[2]!==o||e[3]!==d||e[4]!==m||e[5]!==n?(c=i.jsx($,{url:n,fallback:l,shape:d,size:m,objectFit:o,className:a}),e[0]=a,e[1]=l,e[2]=o,e[3]=d,e[4]=m,e[5]=n,e[6]=c):c=e[6],c}function R(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("font-medium truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("p",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function G(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("h3",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex flex-col gap-[2px]",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function I(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex justify-between items-start",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function M(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function Q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function T(){const t=u.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex justify-between items-start",children:i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,i.jsxs("div",{className:"flex flex-col gap-[2px]",children:[i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),i.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsxs(_,{className:"group transition-colors flex flex-col",children:[n,i.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const b=Object.assign(F,{Avatar:H,AvatarSection:I,Header:R,Title:B,Subtitle:G,Content:q,Footer:M,Badge:Q,Skeleton:T}),P={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},V={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},X={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},J={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},K={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},U={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function z(t){const e=u.c(13),{children:n,columns:l,gap:s,className:r}=t;let x;e[0]!==l?(x=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=x):x=e[1];const a=x,m=P[s===void 0?4:s],o=a.sm&&V[a.sm],c=a.md&&X[a.md],g=a.lg&&J[a.lg],p=a.xl&&K[a.xl],j=a["2xl"]&&U[a["2xl"]];let h;e[2]!==r||e[3]!==m||e[4]!==o||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",m,o,c,g,p,j,r),e[2]=r,e[3]=m,e[4]=o,e[5]=c,e[6]=g,e[7]=p,e[8]=j,e[9]=h):h=e[9];const N=h;let f;return e[10]!==n||e[11]!==N?(f=i.jsx("div",{className:N,children:n}),e[10]=n,e[11]=N,e[12]=f):f=e[12],f}function W(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let a;e[0]!==l?(a=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=a):a=e[1];const d=a,m=s===void 0?4:s;let o;e[2]!==x?(o=Array.from({length:x}).map(Y),e[2]=x,e[3]=o):o=e[3];let c;return e[4]!==r||e[5]!==d||e[6]!==m||e[7]!==o?(c=i.jsx(z,{columns:d,gap:m,className:r,children:o}),e[4]=r,e[5]=d,e[6]=m,e[7]=o,e[8]=c):c=e[8],c}function Y(t,e){return i.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),i.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const S=Object.assign(z,{Skeleton:W});function Z(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const o=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(o)||c.slug.toLowerCase().includes(o))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=o):o=e[3],o}if(x.length===0){let o;return e[4]!==n?(o=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=o):o=e[5],o}let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a={sm:2,md:3,lg:4},e[6]=a):a=e[6];let d;if(e[7]!==x||e[8]!==s){let o;e[10]!==s?(o=c=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:c.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",c.slug]}),i.jsx(b.Title,{children:c.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=s,e[11]=o):o=e[11],d=x.map(o),e[7]=x,e[8]=s,e[9]=d}else d=e[9];let m;return e[12]!==d?(m=i.jsx(S,{columns:a,children:d}),e[12]=d,e[13]=m):m=e[13],m}function ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(k,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let s;return e[1]!==n.message?(s=i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:[l,i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=s):s=e[2],s}function te(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),a=C.useDeferredValue(l);if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"})}),t[0]=f):f=t[0];let y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[f,i.jsx("div",{className:"@container",children:i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})]}),t[1]=y):y=t[1],y}if(e){let f;return t[2]!==e?(f=i.jsx(ee,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=d):d=t[4];let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m=f=>s(f.target.value),t[5]=m):m=t[5];let o;t[6]!==l?(o=i.jsx(L,{className:"max-w-xs",placeholder:"Search",value:l,onChange:m}),t[6]=l,t[7]=o):o=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsxs(O,{variant:"default",onClick:()=>x(!0),children:[i.jsx(A,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=c):c=t[8];let g;t[9]!==o?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[d,i.jsxs("div",{className:"flex items-center gap-2",children:[o,c]})]}),t[9]=o,t[10]=g):g=t[10];let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[11]=p):p=t[11];let j;t[12]!==a?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Z,{query:a})})}),t[12]=a,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(D,{open:r,onOpenChange:x}),t[14]=r,t[15]=h):h=t[15];let N;return t[16]!==g||t[17]!==j||t[18]!==h?(N=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[g,j,h]}),t[16]=g,t[17]=j,t[18]=h,t[19]=N):N=t[19],N}function ue(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"min-h-full",children:i.jsx(te,{})}),t[0]=e):e=t[0],e}export{ue as default};
|
|
1
|
+
import{c as u,j as i,a as w,r as C,f as E}from"./index-DPFREQMN.js";import{C as _}from"./card-yDshgaNk.js";import{c as v}from"./utils-BDWLM78M.js";import{A as $}from"./avatar-tMh-ed4_.js";import{i as k}from"./AlertCircle-CctpU08Y.js";import{s as A}from"./Plus-BoTbvZ3o.js";import{B as O}from"./button-DRbSSzMo.js";import{I as L}from"./input-jqtlIgj3.js";import{C as D}from"./create-organization-dialog-Tqv9FyFB.js";import"./alert-dialog-BZCR78KJ.js";import"./form-CKfv-8nJ.js";import"./spinner-CfV2XsUQ.js";function F(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let a;e[0]!==s?(a=p=>{s&&s(p)},e[0]=s,e[1]=a):a=e[1];const d=a,m=s&&"cursor-pointer",o=x&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==m||e[4]!==o?(c=v("group transition-all flex flex-col gap-0",m,o,l),e[2]=l,e[3]=m,e[4]=o,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==d||e[8]!==c?(g=i.jsx(_,{className:c,onClick:d,children:n}),e[6]=n,e[7]=d,e[8]=c,e[9]=g):g=e[9],g}function H(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:a}=t,d=s===void 0?"square":s,m=r===void 0?"lg":r,o=x===void 0?"contain":x;let c;return e[0]!==a||e[1]!==l||e[2]!==o||e[3]!==d||e[4]!==m||e[5]!==n?(c=i.jsx($,{url:n,fallback:l,shape:d,size:m,objectFit:o,className:a}),e[0]=a,e[1]=l,e[2]=o,e[3]=d,e[4]=m,e[5]=n,e[6]=c):c=e[6],c}function R(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function B(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("font-medium truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("p",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function G(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("h3",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex flex-col gap-[2px]",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function I(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex justify-between items-start",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function M(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function Q(t){const e=u.c(5),{children:n,className:l}=t;let s;e[0]!==l?(s=v("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=s):s=e[1];let r;return e[2]!==n||e[3]!==s?(r=i.jsx("div",{className:s,children:n}),e[2]=n,e[3]=s,e[4]=r):r=e[4],r}function T(){const t=u.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex justify-between items-start",children:i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,i.jsxs("div",{className:"flex flex-col gap-[2px]",children:[i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),i.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsxs(_,{className:"group transition-colors flex flex-col",children:[n,i.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const b=Object.assign(F,{Avatar:H,AvatarSection:I,Header:R,Title:B,Subtitle:G,Content:q,Footer:M,Badge:Q,Skeleton:T}),P={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},V={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},X={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},J={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},K={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},U={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function z(t){const e=u.c(13),{children:n,columns:l,gap:s,className:r}=t;let x;e[0]!==l?(x=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=x):x=e[1];const a=x,m=P[s===void 0?4:s],o=a.sm&&V[a.sm],c=a.md&&X[a.md],g=a.lg&&J[a.lg],p=a.xl&&K[a.xl],j=a["2xl"]&&U[a["2xl"]];let h;e[2]!==r||e[3]!==m||e[4]!==o||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",m,o,c,g,p,j,r),e[2]=r,e[3]=m,e[4]=o,e[5]=c,e[6]=g,e[7]=p,e[8]=j,e[9]=h):h=e[9];const N=h;let f;return e[10]!==n||e[11]!==N?(f=i.jsx("div",{className:N,children:n}),e[10]=n,e[11]=N,e[12]=f):f=e[12],f}function W(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let a;e[0]!==l?(a=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=a):a=e[1];const d=a,m=s===void 0?4:s;let o;e[2]!==x?(o=Array.from({length:x}).map(Y),e[2]=x,e[3]=o):o=e[3];let c;return e[4]!==r||e[5]!==d||e[6]!==m||e[7]!==o?(c=i.jsx(z,{columns:d,gap:m,className:r,children:o}),e[4]=r,e[5]=d,e[6]=m,e[7]=o,e[8]=c):c=e[8],c}function Y(t,e){return i.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[i.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[i.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),i.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),i.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),i.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const S=Object.assign(z,{Skeleton:W});function Z(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const o=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(o)||c.slug.toLowerCase().includes(o))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=o):o=e[3],o}if(x.length===0){let o;return e[4]!==n?(o=i.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=o):o=e[5],o}let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a={sm:2,md:3,lg:4},e[6]=a):a=e[6];let d;if(e[7]!==x||e[8]!==s){let o;e[10]!==s?(o=c=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:c.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",c.slug]}),i.jsx(b.Title,{children:c.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=s,e[11]=o):o=e[11],d=x.map(o),e[7]=x,e[8]=s,e[9]=d}else d=e[9];let m;return e[12]!==d?(m=i.jsx(S,{columns:a,children:d}),e[12]=d,e[13]=m):m=e[13],m}function ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(k,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let s;return e[1]!==n.message?(s=i.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4 p-8",children:[l,i.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=s):s=e[2],s}function te(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),a=C.useDeferredValue(l);if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("div",{className:"flex items-center justify-between mb-8",children:i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"})}),t[0]=f):f=t[0];let y;return t[1]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[f,i.jsx("div",{className:"@container",children:i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})]}),t[1]=y):y=t[1],y}if(e){let f;return t[2]!==e?(f=i.jsx(ee,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=d):d=t[4];let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m=f=>s(f.target.value),t[5]=m):m=t[5];let o;t[6]!==l?(o=i.jsx(L,{className:"max-w-xs",placeholder:"Search",value:l,onChange:m}),t[6]=l,t[7]=o):o=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsxs(O,{variant:"default",onClick:()=>x(!0),children:[i.jsx(A,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=c):c=t[8];let g;t[9]!==o?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[d,i.jsxs("div",{className:"flex items-center gap-2",children:[o,c]})]}),t[9]=o,t[10]=g):g=t[10];let p;t[11]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx(S.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[11]=p):p=t[11];let j;t[12]!==a?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Z,{query:a})})}),t[12]=a,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(D,{open:r,onOpenChange:x}),t[14]=r,t[15]=h):h=t[15];let N;return t[16]!==g||t[17]!==j||t[18]!==h?(N=i.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[g,j,h]}),t[16]=g,t[17]=j,t[18]=h,t[19]=N):N=t[19],N}function ue(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"min-h-full",children:i.jsx(te,{})}),t[0]=e):e=t[0],e}export{ue as default};
|