@decocms/mesh 1.0.0-alpha.21 → 1.0.0-alpha.23
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/{alert-dialog-LOlFjjTl.js → alert-dialog-BzVvrda9.js} +1 -1
- package/dist/client/assets/{auth-catchall-BEa5H3qI.js → auth-catchall-DgeIVQ2f.js} +1 -1
- package/dist/client/assets/{auth-CwWr2e4Y.js → auth-zpR1tl-t.js} +1 -1
- package/dist/client/assets/{avatar-DMYSx92d.js → avatar-TIkmrysR.js} +1 -1
- package/dist/client/assets/{badge-_HmQS9RA.js → badge-xutB_EEN.js} +1 -1
- package/dist/client/assets/{button-ClXDbbMi.js → button-Ngdsb528.js} +1 -1
- package/dist/client/assets/{card-b_g2O0__.js → card-CQm1e1mc.js} +1 -1
- package/dist/client/assets/{checkbox-CR-AnfC5.js → checkbox-CaQAAt_M.js} +1 -1
- package/dist/client/assets/{circle-alert-BbU4d9mh.js → circle-alert-Cx7YqOWW.js} +1 -1
- package/dist/client/assets/{collection-detail-C544Tulj.js → collection-detail-BR-OufkK.js} +1 -1
- package/dist/client/assets/{collection-display-button-BySMuzWq.js → collection-display-button-DbcLjEj-.js} +1 -1
- package/dist/client/assets/{collection-header-BXd90zRo.js → collection-header-DnBZxnX8.js} +1 -1
- package/dist/client/assets/{collection-page-Dg7E39Si.js → collection-page-DYfA-3b1.js} +1 -1
- package/dist/client/assets/{collection-search-BjnhZZGk.js → collection-search-B58CSVO1.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D8f7Qifs.js → collection-table-wrapper-9F2m6I4T.js} +1 -1
- package/dist/client/assets/{connection-card-D7zQGQYz.js → connection-card-CBVTM8da.js} +1 -1
- package/dist/client/assets/{connection-detail-BH0p--Hy.js → connection-detail-DTdb21q1.js} +1 -1
- package/dist/client/assets/{connections-wMsSy4Mm.js → connections-D7q54Ojo.js} +1 -1
- package/dist/client/assets/core-CfjUrBnH.js +6 -0
- package/dist/client/assets/{create-organization-dialog-BubXK60q.js → create-organization-dialog-CqQsNffS.js} +1 -1
- package/dist/client/assets/{dialog-xPRrmp7z.js → dialog-drPd0DYR.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C-LSqc0S.js → dropdown-menu-CA5IGNpp.js} +1 -1
- package/dist/client/assets/{empty-state-DPOQjIuU.js → empty-state-GNQmVYL5.js} +1 -1
- package/dist/client/assets/{error-boundary-D7WkdRMW.js → error-boundary-B1cvAwRo.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CW6O9gmA.js → extract-connection-data-Cp1pOhpZ.js} +1 -1
- package/dist/client/assets/{form-M-vi9HJy.js → form-DB-vzIPN.js} +1 -1
- package/dist/client/assets/{gateway-detail-BlrCL27J.js → gateway-detail-BERbOnev.js} +1 -1
- package/dist/client/assets/{gateways-CfKdyqGb.js → gateways-BnKheBfB.js} +1 -1
- package/dist/client/assets/{home-DbkWPP-f.js → home-CFeHbGL9.js} +1 -1
- package/dist/client/assets/{icon-CpE1QQq1.js → icon-BEvt1BW0.js} +1 -1
- package/dist/client/assets/{index-D7HQTC8F.js → index-B55FG-4l.js} +1 -1
- package/dist/client/assets/index-BMLzl8gY.css +1 -0
- package/dist/client/assets/{index-iWvwzdJJ.js → index-Bg6hz_Hz.js} +2 -2
- package/dist/client/assets/{index-D66zjDTW.js → index-CUOu49uS.js} +1 -1
- package/dist/client/assets/{index-DQWn94Sm.js → index-nKHbxM5v.js} +1 -1
- package/dist/client/assets/{input-D7PefFT1.js → input-DeeRidPU.js} +1 -1
- package/dist/client/assets/json-BESjz4hO.js +1 -0
- package/dist/client/assets/json-D_HgWS-M.js +1 -0
- package/dist/client/assets/{layout-BN6Ub_26.js → layout-NRAvk8gW.js} +1 -1
- package/dist/client/assets/lazy-highlighter-DIeUJT_E.js +4 -0
- package/dist/client/assets/{localstorage-keys-COlnduT8.js → localstorage-keys-DkmqVmoD.js} +1 -1
- package/dist/client/assets/{login-COuwJCat.js → login-DotAynhy.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D5AjcROD.js → mcp-oauth-BoRvpq09.js} +1 -1
- package/dist/client/assets/{members-WpibmQVt.js → members-D6qp7ZUL.js} +1 -1
- package/dist/client/assets/monitoring-CHnwo7uy.js +1 -0
- package/dist/client/assets/{oauth-callback-BjJButzO.js → oauth-callback-BokgYivx.js} +1 -1
- package/dist/client/assets/page-DI5H70Ii.js +21 -0
- package/dist/client/assets/{popover-X2TCYYoO.js → popover-CX1-TebO.js} +1 -1
- package/dist/client/assets/prism-light-lShpcgQz.js +1 -0
- package/dist/client/assets/{resource-tabs-DJxrLcw9.js → resource-tabs-Oz2fQ-IO.js} +1 -1
- package/dist/client/assets/{schema-BlDiNtux.js → schema-BKa04Vln.js} +1 -1
- package/dist/client/assets/{select-BzKSHZ1p.js → select-BTr_dkQY.js} +1 -1
- package/dist/client/assets/{settings-CGbg0Uhj.js → settings-jZdDHZ78.js} +1 -1
- package/dist/client/assets/{shell-layout-5TgCCYHu.js → shell-layout-CTaPEgXT.js} +3 -3
- package/dist/client/assets/{spinner-DgsZg1gV.js → spinner-DcOXl8-0.js} +1 -1
- package/dist/client/assets/store-ZOK0AT5q.js +1 -0
- package/dist/client/assets/{store-app-detail-CUVP0G9m.js → store-app-detail-Ct3YK9at.js} +1 -1
- package/dist/client/assets/{switch-B7wMHRyR.js → switch-BegBdxvh.js} +1 -1
- package/dist/client/assets/{textarea-CN9WqqXs.js → textarea-QMiU4OEo.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CAybF3Fs.js → tool-set-selector-CMgj30nU.js} +1 -1
- package/dist/client/assets/{tooltip-_hZbWxgK.js → tooltip-gSizL4Cv.js} +1 -1
- package/dist/client/assets/types-Bv_SBT8V.js +45 -0
- package/dist/client/assets/{upload-DcKqFAI8.js → upload-DUA-D2IE.js} +1 -1
- package/dist/client/assets/{use-binding-BkavlI5c.js → use-binding-CS-HVfPQ.js} +1 -1
- package/dist/client/assets/{use-connection-Br2g1_CM.js → use-connection-jae8g8Tv.js} +1 -1
- package/dist/client/assets/{use-gateway-Dl3vJTlg.js → use-gateway-BW9hKt-h.js} +1 -1
- package/dist/client/assets/{use-list-state-BDAqfcqe.js → use-list-state-BBSv4_n4.js} +1 -1
- package/dist/client/assets/{use-mcp-DVKHV8dD.js → use-mcp-BV4u1keN.js} +1 -1
- package/dist/client/assets/{use-members-DPWOkgG6.js → use-members-CuLkyXeY.js} +1 -1
- package/dist/client/assets/{use-mobile-Dnm1tIHK.js → use-mobile-CdIx2Lxx.js} +1 -1
- package/dist/client/assets/{use-organization-settings-TIV8vyJm.js → use-organization-settings-CGLHcYYL.js} +1 -1
- package/dist/client/assets/{use-tool-call-COaWtA3Y.js → use-tool-call-CY79elQX.js} +1 -1
- package/dist/client/assets/useQuery-BxMITYbc.js +1 -0
- package/dist/client/assets/utils-DM-D9fBL.js +1 -0
- package/dist/client/assets/well-known-mcp-Dg77mwx9.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +37 -37
- package/dist/server/migrate.js +19 -19
- package/dist/server/server.js +31 -31
- package/package.json +1 -1
- package/dist/client/assets/index-yMf3L_oA.css +0 -1
- package/dist/client/assets/lazy-highlighter-hJ2PAlmJ.js +0 -1
- package/dist/client/assets/monitoring-kuEsi7x-.js +0 -1
- package/dist/client/assets/monitoring-stats-row-C0O2iCrN.js +0 -42
- package/dist/client/assets/page-DWgH6O_a.js +0 -21
- package/dist/client/assets/prism-CF4Q8IpQ.js +0 -9
- package/dist/client/assets/store-ppjlqJwO.js +0 -1
- package/dist/client/assets/useQuery-CrTgBBMI.js +0 -1
- package/dist/client/assets/utils---jHV5W_.js +0 -1
- package/dist/client/assets/well-known-mcp-Dq2j3ucM.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as R,j as t,r as O,a5 as ye,d as _e,ap as be,bB as ne,aq as ie,bd as ve,ar as we,as as Ce,a6 as re}from"./index-iWvwzdJJ.js";import{E as Ne}from"./empty-state-DPOQjIuU.js";import{E as ce}from"./error-boundary-D7WkdRMW.js";import{b as Se,I as Te}from"./use-connection-Br2g1_CM.js";import{T as ke}from"./tool-set-selector-CAybF3Fs.js";import{b as Ie,a as $e}from"./use-gateway-Dl3vJTlg.js";import{B as q}from"./button-ClXDbbMi.js";import{I as B}from"./icon-CpE1QQq1.js";import{I as de}from"./input-D7PefFT1.js";import{S as Ee}from"./switch-B7wMHRyR.js";import{F as M,a as Fe,b as Y,d as Z,f as ee,c as me}from"./form-M-vi9HJy.js";import{c as fe,a as ue,S as xe,b as he,d as W}from"./select-BzKSHZ1p.js";import{d as H,b as K,a as Q,T as X}from"./tooltip-_hZbWxgK.js";import{s as Ge}from"./slugify-CEUa2lfQ.js";import{V as Ae,b as Ve}from"./layout-BN6Ub_26.js";import{f as ze}from"./formatDistanceToNow-Ctx6mZEP.js";import"./utils---jHV5W_.js";import"./checkbox-CR-AnfC5.js";import"./collection-search-BjnhZZGk.js";function De(o){const s=new TextEncoder().encode(o),l=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(l)}function Pe(o){const e=R.c(52),{serverName:s,gatewayUrl:l}=o,[a,c]=O.useState(!1),[i,m]=O.useState(null),n=Ge(s);let r,d,p,g;if(e[0]!==l||e[1]!==n){const se={type:"http",url:l},oe={[n]:se};r=JSON.stringify(oe,null,2);const ae=je=>JSON.stringify({...se,headers:{"x-mesh-client":je}},null,2),pe=De(ae("Cursor"));d=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(n)}&config=${encodeURIComponent(pe)}`;const ge=ae("Claude Code");p=n;let le;e[6]===Symbol.for("react.memo_cache_sentinel")?(le=/'/g,e[6]=le):le=e[6],g=ge.replace(le,"'\\''"),e[0]=l,e[1]=n,e[2]=r,e[3]=d,e[4]=p,e[5]=g}else r=e[2],d=e[3],p=e[4],g=e[5];const C=`claude mcp add "${p}" --config '${g}'`;let u;e[7]!==r?(u=async()=>{await navigator.clipboard.writeText(r),c(!0),re.success("Configuration copied to clipboard"),setTimeout(()=>c(!1),2e3)},e[7]=r,e[8]=u):u=e[8];const x=u;let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=async(se,oe)=>{await navigator.clipboard.writeText(se),m(oe),re.success(`${oe} command copied`),setTimeout(()=>m(null),2e3)},e[9]=h):h=e[9];const J=h,L=Be;let V;e[10]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=V):V=e[10];const w=a?"check":"content_copy";let P;e[11]!==w?(P=t.jsx(B,{name:w,size:14}),e[11]=w,e[12]=P):P=e[12];let F;e[13]!==x||e[14]!==P?(F=t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:x,children:P})}),e[13]=x,e[14]=P,e[15]=F):F=e[15];let z;e[16]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(X,{children:"Copy configuration"}),e[16]=z):z=e[16];let G;e[17]!==F?(G=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(H,{children:t.jsxs(K,{children:[F,z]})})}),e[17]=F,e[18]=G):G=e[18];let j;e[19]!==r||e[20]!==x?(j=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:x,children:r}),e[19]=r,e[20]=x,e[21]=j):j=e[21];let y;e[22]!==G||e[23]!==j?(y=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[G,j]}),e[22]=G,e[23]=j,e[24]=y):y=e[24];let _;e[25]!==d?(_=()=>L(d),e[25]=d,e[26]=_):_=e[26];let N,S;e[27]===Symbol.for("react.memo_cache_sentinel")?(N=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%)"}}),S=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=N,e[28]=S):(N=e[27],S=e[28]);let A;e[29]!==_?(A=t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:_,children:[N,S]})}),e[29]=_,e[30]=A):A=e[30];let T;e[31]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(X,{children:"Add to Cursor"}),e[31]=T):T=e[31];let k;e[32]!==A?(k=t.jsx(H,{children:t.jsxs(K,{children:[A,T]})}),e[32]=A,e[33]=k):k=e[33];let b;e[34]!==C?(b=()=>J(C,"Claude"),e[34]=C,e[35]=b):b=e[35];let I,$;e[36]===Symbol.for("react.memo_cache_sentinel")?(I=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%)"}}),$=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=I,e[37]=$):(I=e[36],$=e[37]);let v;e[38]!==i?(v=i==="Claude"&&t.jsx(B,{name:"check",size:14,className:"ml-2 text-green-500"}),e[38]=i,e[39]=v):v=e[39];let E;e[40]!==b||e[41]!==v?(E=t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:b,children:[I,$,v]})}),e[40]=b,e[41]=v,e[42]=E):E=e[42];let f;e[43]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{children:"Add to Claude Code"}),e[43]=f):f=e[43];let D;e[44]!==E?(D=t.jsx(H,{children:t.jsxs(K,{children:[E,f]})}),e[44]=E,e[45]=D):D=e[45];let U;e[46]!==k||e[47]!==D?(U=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[k,D]}),e[46]=k,e[47]=D,e[48]=U):U=e[48];let te;return e[49]!==y||e[50]!==U?(te=t.jsxs("div",{className:"flex flex-col gap-4",children:[V,y,U]}),e[49]=y,e[50]=U,e[51]=te):te=e[51],te}function Be(o){window.open(o,"_blank")}const Ue=be({title:ie().min(1,"Name is required").max(255),description:ie().nullable(),status:ne(["active","inactive"]),tool_selection_mode:ne(["inclusion","exclusion"]),tool_selection_strategy:ne(["passthrough","smart_tool_selection","code_execution"])});function Oe(o,e){const s={};for(const l of o.connections)if(l.selected_tools===null){const a=e.get(l.connection_id)??[];a.length>0&&(s[l.connection_id]=a)}else l.selected_tools.length>0&&(s[l.connection_id]=l.selected_tools);return s}function Re(o,e){return Object.entries(o).map(([s,l])=>{const a=e.get(s)??[],c=a.length>0&&a.every(i=>l.includes(i));return{connection_id:s,selected_tools:c?null:l}})}function Je(o){const e=R.c(28),{form:s,toolSet:l,onToolSetChange:a,icon:c}=o;let i;e[0]!==s?(i=s.watch("title")||"Gateway",e[0]=s,e[1]=i):i=e[1];let m;e[2]!==c||e[3]!==i?(m=t.jsx(Te,{icon:c,name:i,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:"network_node"}),e[2]=c,e[3]=i,e[4]=m):m=e[4];let n;e[5]!==s.control?(n=t.jsx(M,{control:s.control,name:"status",render:He}),e[5]=s.control,e[6]=n):n=e[6];let r;e[7]!==m||e[8]!==n?(r=t.jsxs("div",{className:"flex items-start justify-between",children:[m,n]}),e[7]=m,e[8]=n,e[9]=r):r=e[9];let d;e[10]!==s.control?(d=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(M,{control:s.control,name:"title",render:We}),t.jsx(M,{control:s.control,name:"description",render:qe})]}),e[10]=s.control,e[11]=d):d=e[11];let p;e[12]!==r||e[13]!==d?(p=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[r,d]}),e[12]=r,e[13]=d,e[14]=p):p=e[14];let g;e[15]!==s.control?(g=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(M,{control:s.control,name:"tool_selection_mode",render:Me}),t.jsx(M,{control:s.control,name:"tool_selection_strategy",render:Le})]}),e[15]=s.control,e[16]=g):g=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center p-5",children:t.jsx(B,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),e[17]=C):C=e[17];let u;e[18]!==a||e[19]!==l?(u=t.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:t.jsx(ce,{children:t.jsx(O.Suspense,{fallback:C,children:t.jsx(ke,{toolSet:l,onToolSetChange:a})})})}),e[18]=a,e[19]=l,e[20]=u):u=e[20];let x;e[21]!==p||e[22]!==g||e[23]!==u?(x=t.jsxs("div",{className:"flex flex-col h-full",children:[p,g,u]}),e[21]=p,e[22]=g,e[23]=u,e[24]=x):x=e[24];let h;return e[25]!==s||e[26]!==x?(h=t.jsx(Fe,{...s,children:x}),e[25]=s,e[26]=x,e[27]=h):h=e[27],h}function Le(o){const{field:e}=o;return t.jsxs(Y,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(me,{className:"mb-0",children:"Gateway Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(H,{children:t.jsxs(K,{children:[t.jsx(Q,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(B,{name:"info",size:14,className:"text-muted-foreground"})})}),t.jsx(X,{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(fe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(Z,{children:t.jsx(ue,{className:"w-[180px]",children:t.jsx(xe,{})})}),t.jsxs(he,{children:[t.jsx(W,{value:"passthrough",children:"Passthrough"}),t.jsx(W,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(W,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(ee,{})]})}function Me(o){const{field:e}=o;return t.jsxs(Y,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(me,{className:"mb-0",children:"Tool Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(H,{children:t.jsxs(K,{children:[t.jsx(Q,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(B,{name:"info",size:14,className:"text-muted-foreground"})})}),t.jsx(X,{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 connections/tools are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All connections/tools except selected ones are exposed."]})]})})]})}),t.jsxs(fe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(Z,{children:t.jsx(ue,{className:"w-[180px]",children:t.jsx(xe,{})})}),t.jsxs(he,{children:[t.jsx(W,{value:"inclusion",children:"Include Selected"}),t.jsx(W,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(ee,{})]})}function qe(o){const{field:e}=o;return t.jsxs(Y,{className:"w-full space-y-0",children:[t.jsx(Z,{children:t.jsx(de,{...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(ee,{})]})}function We(o){const{field:e}=o;return t.jsxs(Y,{className:"w-full space-y-0",children:[t.jsx(Z,{children:t.jsx(de,{...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(ee,{})]})}function He(o){const{field:e}=o;return t.jsxs(Y,{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(Z,{children:t.jsx(Ee,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(ee,{})]})}function Ke(o){const e=R.c(53),{gateway:s,gatewayId:l}=o,a=ve(),c=$e();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const m=Se(i);let n;if(e[1]!==m){n=new Map;for(const f of m)f.tools&&f.tools.length>0&&n.set(f.id,f.tools.map(Qe));e[1]=m,e[2]=n}else n=e[2];let r;e[3]!==n||e[4]!==s?(r=()=>Oe(s,n),e[3]=n,e[4]=s,e[5]=r):r=e[5];const[d,p]=O.useState(r),[g,C]=O.useState(!1);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=f=>{p(f),C(!0)},e[6]=u):u=e[6];const x=u;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=we(Ue),e[7]=h):h=e[7];const J=s.tool_selection_mode??"inclusion",L=s.tool_selection_strategy??"passthrough";let V;e[8]!==s.description||e[9]!==s.status||e[10]!==s.title||e[11]!==J||e[12]!==L?(V={resolver:h,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:J,tool_selection_strategy:L}},e[8]=s.description,e[9]=s.status,e[10]=s.title,e[11]=J,e[12]=L,e[13]=V):V=e[13];const w=Ce(V),F=w.formState.isDirty||g;let z;e[14]!==c.update||e[15]!==n||e[16]!==w||e[17]!==l||e[18]!==d?(z=async()=>{const f=w.getValues(),D=Re(d,n);await c.update.mutateAsync({id:l,data:{title:f.title,description:f.description,status:f.status,tool_selection_mode:f.tool_selection_mode,tool_selection_strategy:f.tool_selection_strategy,connections:D}}),w.reset(f),C(!1)},e[14]=c.update,e[15]=n,e[16]=w,e[17]=l,e[18]=d,e[19]=z):z=e[19];const G=z;let j;e[20]!==a.history?(j=()=>a.history.back(),e[20]=a.history,e[21]=j):j=e[21];let y;e[22]!==c.update.isPending||e[23]!==G||e[24]!==F?(y=F&&t.jsxs(q,{onClick:G,disabled:c.update.isPending,size:"sm",className:"h-7",children:[c.update.isPending&&t.jsx(B,{name:"progress_activity",size:16,className:"mr-2 animate-spin"}),"Save Changes"]}),e[22]=c.update.isPending,e[23]=G,e[24]=F,e[25]=y):y=e[25];let _;e[26]!==y?(_=t.jsx(Ae,{children:y}),e[26]=y,e[27]=_):_=e[27];let N;e[28]!==w||e[29]!==s.icon||e[30]!==d?(N=t.jsx("div",{className:"lg:border-r border-b lg:border-b-0 border-border overflow-auto",children:t.jsx(Je,{form:w,toolSet:d,onToolSetChange:x,icon:s.icon})}),e[28]=w,e[29]=s.icon,e[30]=d,e[31]=N):N=e[31];let S;e[32]!==s.id||e[33]!==s.title?(S=s.title||`gateway-${s.id.slice(0,8)}`,e[32]=s.id,e[33]=s.title,e[34]=S):S=e[34];const A=`${window.location.origin}/mcp/gateway/${s.id}`;let T;e[35]!==S||e[36]!==A?(T=t.jsx("div",{className:"p-5",children:t.jsx(Pe,{serverName:S,gatewayUrl:A})}),e[35]=S,e[36]=A,e[37]=T):T=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"flex-1 text-sm text-foreground",children:"Last Updated"}),e[38]=k):k=e[38];let b;e[39]!==s.updated_at?(b=s.updated_at?ze(new Date(s.updated_at),{addSuffix:!1}):"Unknown",e[39]=s.updated_at,e[40]=b):b=e[40];let I;e[41]!==b?(I=t.jsxs("div",{className:"flex items-center gap-4 p-5 border-t border-border",children:[k,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:b})]}),e[41]=b,e[42]=I):I=e[42];let $;e[43]!==T||e[44]!==I?($=t.jsxs("div",{className:"flex flex-col overflow-auto",children:[T,I]}),e[43]=T,e[44]=I,e[45]=$):$=e[45];let v;e[46]!==N||e[47]!==$?(v=t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] h-full",children:[N,$]}),e[46]=N,e[47]=$,e[48]=v):v=e[48];let E;return e[49]!==_||e[50]!==v||e[51]!==j?(E=t.jsxs(Ve,{onBack:j,children:[_,v]}),e[49]=_,e[50]=v,e[51]=j,e[52]=E):E=e[52],E}function Qe(o){return o.name}function Xe(){const o=R.c(8);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},o[0]=e):e=o[0];const s=ye(e);let l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/gateways/$gatewayId"},o[1]=l):l=o[1];const{gatewayId:a,org:c}=_e(l),i=Ie(a);if(!i){let n;return o[2]!==s||o[3]!==c?(n=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ne,{title:"Gateway not found",description:"This gateway may have been deleted or you may not have access.",actions:t.jsx(q,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:c}}),children:"Back to gateways"})})}),o[2]=s,o[3]=c,o[4]=n):n=o[4],n}let m;return o[5]!==i||o[6]!==a?(m=t.jsx(Ke,{gateway:i,gatewayId:a}),o[5]=i,o[6]=a,o[7]=m):m=o[7],m}function Ye(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ce,{children:t.jsx(O.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(B,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Xe,{})})}),o[0]=e):e=o[0],e}function jt(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{}),o[0]=e):e=o[0],e}export{jt as default};
|
|
1
|
+
import{c as R,j as t,r as O,a5 as ye,d as _e,ap as be,bB as ne,aq as ie,bd as ve,ar as we,as as Ce,a6 as re}from"./index-Bg6hz_Hz.js";import{E as Ne}from"./empty-state-GNQmVYL5.js";import{E as ce}from"./error-boundary-B1cvAwRo.js";import{b as Se,I as Te}from"./use-connection-jae8g8Tv.js";import{T as ke}from"./tool-set-selector-CMgj30nU.js";import{b as Ie,a as $e}from"./use-gateway-BW9hKt-h.js";import{B as q}from"./button-Ngdsb528.js";import{I as B}from"./icon-BEvt1BW0.js";import{I as de}from"./input-DeeRidPU.js";import{S as Ee}from"./switch-BegBdxvh.js";import{F as M,a as Fe,b as Y,d as Z,f as ee,c as me}from"./form-DB-vzIPN.js";import{c as fe,a as ue,S as xe,b as he,d as W}from"./select-BTr_dkQY.js";import{d as H,b as K,a as Q,T as X}from"./tooltip-gSizL4Cv.js";import{s as Ge}from"./slugify-CEUa2lfQ.js";import{V as Ae,b as Ve}from"./layout-NRAvk8gW.js";import{f as ze}from"./formatDistanceToNow-Ctx6mZEP.js";import"./utils-DM-D9fBL.js";import"./checkbox-CaQAAt_M.js";import"./collection-search-B58CSVO1.js";function De(o){const s=new TextEncoder().encode(o),l=Array.from(s,a=>String.fromCharCode(a)).join("");return btoa(l)}function Pe(o){const e=R.c(52),{serverName:s,gatewayUrl:l}=o,[a,c]=O.useState(!1),[i,m]=O.useState(null),n=Ge(s);let r,d,p,g;if(e[0]!==l||e[1]!==n){const se={type:"http",url:l},oe={[n]:se};r=JSON.stringify(oe,null,2);const ae=je=>JSON.stringify({...se,headers:{"x-mesh-client":je}},null,2),pe=De(ae("Cursor"));d=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(n)}&config=${encodeURIComponent(pe)}`;const ge=ae("Claude Code");p=n;let le;e[6]===Symbol.for("react.memo_cache_sentinel")?(le=/'/g,e[6]=le):le=e[6],g=ge.replace(le,"'\\''"),e[0]=l,e[1]=n,e[2]=r,e[3]=d,e[4]=p,e[5]=g}else r=e[2],d=e[3],p=e[4],g=e[5];const C=`claude mcp add "${p}" --config '${g}'`;let u;e[7]!==r?(u=async()=>{await navigator.clipboard.writeText(r),c(!0),re.success("Configuration copied to clipboard"),setTimeout(()=>c(!1),2e3)},e[7]=r,e[8]=u):u=e[8];const x=u;let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=async(se,oe)=>{await navigator.clipboard.writeText(se),m(oe),re.success(`${oe} command copied`),setTimeout(()=>m(null),2e3)},e[9]=h):h=e[9];const J=h,L=Be;let V;e[10]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mb-1",children:"Install in your IDE"})}),e[10]=V):V=e[10];const w=a?"check":"content_copy";let P;e[11]!==w?(P=t.jsx(B,{name:w,size:14}),e[11]=w,e[12]=P):P=e[12];let F;e[13]!==x||e[14]!==P?(F=t.jsx(Q,{asChild:!0,children:t.jsx(q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 shrink-0",onClick:x,children:P})}),e[13]=x,e[14]=P,e[15]=F):F=e[15];let z;e[16]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(X,{children:"Copy configuration"}),e[16]=z):z=e[16];let G;e[17]!==F?(G=t.jsx("div",{className:"absolute top-2 right-2",children:t.jsx(H,{children:t.jsxs(K,{children:[F,z]})})}),e[17]=F,e[18]=G):G=e[18];let j;e[19]!==r||e[20]!==x?(j=t.jsx("pre",{className:"text-xs font-mono text-foreground overflow-auto max-h-40 whitespace-pre-wrap wrap-break-word cursor-pointer",onClick:x,children:r}),e[19]=r,e[20]=x,e[21]=j):j=e[21];let y;e[22]!==G||e[23]!==j?(y=t.jsxs("div",{className:"relative flex flex-col gap-2 p-3 bg-muted/50 rounded-lg",children:[G,j]}),e[22]=G,e[23]=j,e[24]=y):y=e[24];let _;e[25]!==d?(_=()=>L(d),e[25]=d,e[26]=_):_=e[26];let N,S;e[27]===Symbol.for("react.memo_cache_sentinel")?(N=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%)"}}),S=t.jsx("span",{className:"text-sm font-medium",children:"Cursor"}),e[27]=N,e[28]=S):(N=e[27],S=e[28]);let A;e[29]!==_?(A=t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:_,children:[N,S]})}),e[29]=_,e[30]=A):A=e[30];let T;e[31]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(X,{children:"Add to Cursor"}),e[31]=T):T=e[31];let k;e[32]!==A?(k=t.jsx(H,{children:t.jsxs(K,{children:[A,T]})}),e[32]=A,e[33]=k):k=e[33];let b;e[34]!==C?(b=()=>J(C,"Claude"),e[34]=C,e[35]=b):b=e[35];let I,$;e[36]===Symbol.for("react.memo_cache_sentinel")?(I=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%)"}}),$=t.jsx("span",{className:"text-sm font-medium",children:"Claude Code"}),e[36]=I,e[37]=$):(I=e[36],$=e[37]);let v;e[38]!==i?(v=i==="Claude"&&t.jsx(B,{name:"check",size:14,className:"ml-2 text-green-500"}),e[38]=i,e[39]=v):v=e[39];let E;e[40]!==b||e[41]!==v?(E=t.jsx(Q,{asChild:!0,children:t.jsxs(q,{variant:"outline",className:"h-auto py-3 px-4 justify-center gap-2 flex-1 min-w-fit",onClick:b,children:[I,$,v]})}),e[40]=b,e[41]=v,e[42]=E):E=e[42];let f;e[43]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(X,{children:"Add to Claude Code"}),e[43]=f):f=e[43];let D;e[44]!==E?(D=t.jsx(H,{children:t.jsxs(K,{children:[E,f]})}),e[44]=E,e[45]=D):D=e[45];let U;e[46]!==k||e[47]!==D?(U=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[k,D]}),e[46]=k,e[47]=D,e[48]=U):U=e[48];let te;return e[49]!==y||e[50]!==U?(te=t.jsxs("div",{className:"flex flex-col gap-4",children:[V,y,U]}),e[49]=y,e[50]=U,e[51]=te):te=e[51],te}function Be(o){window.open(o,"_blank")}const Ue=be({title:ie().min(1,"Name is required").max(255),description:ie().nullable(),status:ne(["active","inactive"]),tool_selection_mode:ne(["inclusion","exclusion"]),tool_selection_strategy:ne(["passthrough","smart_tool_selection","code_execution"])});function Oe(o,e){const s={};for(const l of o.connections)if(l.selected_tools===null){const a=e.get(l.connection_id)??[];a.length>0&&(s[l.connection_id]=a)}else l.selected_tools.length>0&&(s[l.connection_id]=l.selected_tools);return s}function Re(o,e){return Object.entries(o).map(([s,l])=>{const a=e.get(s)??[],c=a.length>0&&a.every(i=>l.includes(i));return{connection_id:s,selected_tools:c?null:l}})}function Je(o){const e=R.c(28),{form:s,toolSet:l,onToolSetChange:a,icon:c}=o;let i;e[0]!==s?(i=s.watch("title")||"Gateway",e[0]=s,e[1]=i):i=e[1];let m;e[2]!==c||e[3]!==i?(m=t.jsx(Te,{icon:c,name:i,size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:"network_node"}),e[2]=c,e[3]=i,e[4]=m):m=e[4];let n;e[5]!==s.control?(n=t.jsx(M,{control:s.control,name:"status",render:He}),e[5]=s.control,e[6]=n):n=e[6];let r;e[7]!==m||e[8]!==n?(r=t.jsxs("div",{className:"flex items-start justify-between",children:[m,n]}),e[7]=m,e[8]=n,e[9]=r):r=e[9];let d;e[10]!==s.control?(d=t.jsxs("div",{className:"flex flex-col",children:[t.jsx(M,{control:s.control,name:"title",render:We}),t.jsx(M,{control:s.control,name:"description",render:qe})]}),e[10]=s.control,e[11]=d):d=e[11];let p;e[12]!==r||e[13]!==d?(p=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[r,d]}),e[12]=r,e[13]=d,e[14]=p):p=e[14];let g;e[15]!==s.control?(g=t.jsxs("div",{className:"flex flex-col gap-4 p-5 border-b border-border",children:[t.jsx(M,{control:s.control,name:"tool_selection_mode",render:Me}),t.jsx(M,{control:s.control,name:"tool_selection_strategy",render:Le})]}),e[15]=s.control,e[16]=g):g=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center p-5",children:t.jsx(B,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),e[17]=C):C=e[17];let u;e[18]!==a||e[19]!==l?(u=t.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:t.jsx(ce,{children:t.jsx(O.Suspense,{fallback:C,children:t.jsx(ke,{toolSet:l,onToolSetChange:a})})})}),e[18]=a,e[19]=l,e[20]=u):u=e[20];let x;e[21]!==p||e[22]!==g||e[23]!==u?(x=t.jsxs("div",{className:"flex flex-col h-full",children:[p,g,u]}),e[21]=p,e[22]=g,e[23]=u,e[24]=x):x=e[24];let h;return e[25]!==s||e[26]!==x?(h=t.jsx(Fe,{...s,children:x}),e[25]=s,e[26]=x,e[27]=h):h=e[27],h}function Le(o){const{field:e}=o;return t.jsxs(Y,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(me,{className:"mb-0",children:"Gateway Strategy"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(H,{children:t.jsxs(K,{children:[t.jsx(Q,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(B,{name:"info",size:14,className:"text-muted-foreground"})})}),t.jsx(X,{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(fe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(Z,{children:t.jsx(ue,{className:"w-[180px]",children:t.jsx(xe,{})})}),t.jsxs(he,{children:[t.jsx(W,{value:"passthrough",children:"Passthrough"}),t.jsx(W,{value:"smart_tool_selection",children:"Smart Tool Selection"}),t.jsx(W,{value:"code_execution",children:"Code Execution"})]})]})]})]}),t.jsx(ee,{})]})}function Me(o){const{field:e}=o;return t.jsxs(Y,{children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx(me,{className:"mb-0",children:"Tool Selection Mode"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(H,{children:t.jsxs(K,{children:[t.jsx(Q,{asChild:!0,children:t.jsx("button",{type:"button",className:"cursor-help flex items-center",children:t.jsx(B,{name:"info",size:14,className:"text-muted-foreground"})})}),t.jsx(X,{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 connections/tools are exposed."]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Exclude:"})," All connections/tools except selected ones are exposed."]})]})})]})}),t.jsxs(fe,{value:e.value,onValueChange:e.onChange,children:[t.jsx(Z,{children:t.jsx(ue,{className:"w-[180px]",children:t.jsx(xe,{})})}),t.jsxs(he,{children:[t.jsx(W,{value:"inclusion",children:"Include Selected"}),t.jsx(W,{value:"exclusion",children:"Exclude Selected"})]})]})]})]}),t.jsx(ee,{})]})}function qe(o){const{field:e}=o;return t.jsxs(Y,{className:"w-full space-y-0",children:[t.jsx(Z,{children:t.jsx(de,{...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(ee,{})]})}function We(o){const{field:e}=o;return t.jsxs(Y,{className:"w-full space-y-0",children:[t.jsx(Z,{children:t.jsx(de,{...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(ee,{})]})}function He(o){const{field:e}=o;return t.jsxs(Y,{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(Z,{children:t.jsx(Ee,{checked:e.value==="active",onCheckedChange:s=>e.onChange(s?"active":"inactive")})})]}),t.jsx(ee,{})]})}function Ke(o){const e=R.c(53),{gateway:s,gatewayId:l}=o,a=ve(),c=$e();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const m=Se(i);let n;if(e[1]!==m){n=new Map;for(const f of m)f.tools&&f.tools.length>0&&n.set(f.id,f.tools.map(Qe));e[1]=m,e[2]=n}else n=e[2];let r;e[3]!==n||e[4]!==s?(r=()=>Oe(s,n),e[3]=n,e[4]=s,e[5]=r):r=e[5];const[d,p]=O.useState(r),[g,C]=O.useState(!1);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=f=>{p(f),C(!0)},e[6]=u):u=e[6];const x=u;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=we(Ue),e[7]=h):h=e[7];const J=s.tool_selection_mode??"inclusion",L=s.tool_selection_strategy??"passthrough";let V;e[8]!==s.description||e[9]!==s.status||e[10]!==s.title||e[11]!==J||e[12]!==L?(V={resolver:h,defaultValues:{title:s.title,description:s.description,status:s.status,tool_selection_mode:J,tool_selection_strategy:L}},e[8]=s.description,e[9]=s.status,e[10]=s.title,e[11]=J,e[12]=L,e[13]=V):V=e[13];const w=Ce(V),F=w.formState.isDirty||g;let z;e[14]!==c.update||e[15]!==n||e[16]!==w||e[17]!==l||e[18]!==d?(z=async()=>{const f=w.getValues(),D=Re(d,n);await c.update.mutateAsync({id:l,data:{title:f.title,description:f.description,status:f.status,tool_selection_mode:f.tool_selection_mode,tool_selection_strategy:f.tool_selection_strategy,connections:D}}),w.reset(f),C(!1)},e[14]=c.update,e[15]=n,e[16]=w,e[17]=l,e[18]=d,e[19]=z):z=e[19];const G=z;let j;e[20]!==a.history?(j=()=>a.history.back(),e[20]=a.history,e[21]=j):j=e[21];let y;e[22]!==c.update.isPending||e[23]!==G||e[24]!==F?(y=F&&t.jsxs(q,{onClick:G,disabled:c.update.isPending,size:"sm",className:"h-7",children:[c.update.isPending&&t.jsx(B,{name:"progress_activity",size:16,className:"mr-2 animate-spin"}),"Save Changes"]}),e[22]=c.update.isPending,e[23]=G,e[24]=F,e[25]=y):y=e[25];let _;e[26]!==y?(_=t.jsx(Ae,{children:y}),e[26]=y,e[27]=_):_=e[27];let N;e[28]!==w||e[29]!==s.icon||e[30]!==d?(N=t.jsx("div",{className:"lg:border-r border-b lg:border-b-0 border-border overflow-auto",children:t.jsx(Je,{form:w,toolSet:d,onToolSetChange:x,icon:s.icon})}),e[28]=w,e[29]=s.icon,e[30]=d,e[31]=N):N=e[31];let S;e[32]!==s.id||e[33]!==s.title?(S=s.title||`gateway-${s.id.slice(0,8)}`,e[32]=s.id,e[33]=s.title,e[34]=S):S=e[34];const A=`${window.location.origin}/mcp/gateway/${s.id}`;let T;e[35]!==S||e[36]!==A?(T=t.jsx("div",{className:"p-5",children:t.jsx(Pe,{serverName:S,gatewayUrl:A})}),e[35]=S,e[36]=A,e[37]=T):T=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"flex-1 text-sm text-foreground",children:"Last Updated"}),e[38]=k):k=e[38];let b;e[39]!==s.updated_at?(b=s.updated_at?ze(new Date(s.updated_at),{addSuffix:!1}):"Unknown",e[39]=s.updated_at,e[40]=b):b=e[40];let I;e[41]!==b?(I=t.jsxs("div",{className:"flex items-center gap-4 p-5 border-t border-border",children:[k,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:b})]}),e[41]=b,e[42]=I):I=e[42];let $;e[43]!==T||e[44]!==I?($=t.jsxs("div",{className:"flex flex-col overflow-auto",children:[T,I]}),e[43]=T,e[44]=I,e[45]=$):$=e[45];let v;e[46]!==N||e[47]!==$?(v=t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[2fr_1fr] h-full",children:[N,$]}),e[46]=N,e[47]=$,e[48]=v):v=e[48];let E;return e[49]!==_||e[50]!==v||e[51]!==j?(E=t.jsxs(Ve,{onBack:j,children:[_,v]}),e[49]=_,e[50]=v,e[51]=j,e[52]=E):E=e[52],E}function Qe(o){return o.name}function Xe(){const o=R.c(8);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/gateways/$gatewayId"},o[0]=e):e=o[0];const s=ye(e);let l;o[1]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/gateways/$gatewayId"},o[1]=l):l=o[1];const{gatewayId:a,org:c}=_e(l),i=Ie(a);if(!i){let n;return o[2]!==s||o[3]!==c?(n=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ne,{title:"Gateway not found",description:"This gateway may have been deleted or you may not have access.",actions:t.jsx(q,{variant:"outline",onClick:()=>s({to:"/$org/gateways",params:{org:c}}),children:"Back to gateways"})})}),o[2]=s,o[3]=c,o[4]=n):n=o[4],n}let m;return o[5]!==i||o[6]!==a?(m=t.jsx(Ke,{gateway:i,gatewayId:a}),o[5]=i,o[6]=a,o[7]=m):m=o[7],m}function Ye(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ce,{children:t.jsx(O.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(B,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Xe,{})})}),o[0]=e):e=o[0],e}function jt(){const o=R.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{}),o[0]=e):e=o[0],e}export{jt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,j as t,r as Z,a5 as te,a6 as se}from"./index-
|
|
1
|
+
import{c as Y,j as t,r as Z,a5 as te,a6 as se}from"./index-Bg6hz_Hz.js";import{C as oe}from"./collection-header-DnBZxnX8.js";import{C as ae}from"./collection-page-DYfA-3b1.js";import{C as ne}from"./collection-search-B58CSVO1.js";import{C as re}from"./collection-table-wrapper-9F2m6I4T.js";import{C as ie}from"./connection-card-CBVTM8da.js";import{E as q}from"./empty-state-GNQmVYL5.js";import{E as le}from"./error-boundary-B1cvAwRo.js";import{b as ce,I as de}from"./use-connection-jae8g8Tv.js";import{a as me,u as ue}from"./use-gateway-BW9hKt-h.js";import{u as ge}from"./use-list-state-BBSv4_n4.js";import{u as pe}from"./tooltip-gSizL4Cv.js";import{c as he,b as fe,d as xe,A as we,e as ye,g as je,a as Ce,f as Ne}from"./alert-dialog-BzVvrda9.js";import{B as ee}from"./badge-xutB_EEN.js";import{B as J}from"./button-Ngdsb528.js";import{b as Q,D as U,a as X,c as B}from"./dropdown-menu-CA5IGNpp.js";import{I as i}from"./icon-BEvt1BW0.js";import"./collection-display-button-DbcLjEj-.js";import"./utils-DM-D9fBL.js";import"./input-DeeRidPU.js";import"./card-CQm1e1mc.js";import"./use-mobile-CdIx2Lxx.js";function ve(e,a){switch(a.type){case"delete":return{mode:"deleting",gateway:a.gateway};case"close":return{mode:"idle"}}}function De(){const e=Y.c(68),{org:a}=pe(),n=te();let y;e[0]!==a.slug?(y={namespace:a.slug,resource:"gateways"},e[0]=a.slug,e[1]=y):y=e[1];const s=ge(y),r=me(),w=ue(s);let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j={},e[2]=j):j=e[2];const R=ce(j);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[l,N]=Z.useReducer(ve,C);let v;e[4]!==r.create||e[5]!==R.length||e[6]!==n||e[7]!==a.slug?(v=async()=>{if(R.length===0){se.error("Create at least one MCP connection first");return}const o=await r.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:[]});n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},e[4]=r.create,e[5]=R.length,e[6]=n,e[7]=a.slug,e[8]=v):v=e[8];const T=v;let D;e[9]!==r.delete||e[10]!==l.gateway||e[11]!==l.mode?(D=async()=>{if(l.mode!=="deleting")return;const o=l.gateway.id;N({type:"close"});try{await r.delete.mutateAsync(o)}catch{}},e[9]=r.delete,e[10]=l.gateway,e[11]=l.mode,e[12]=D):D=e[12];const O=D;let S,_,b,k,I,M;e[13]===Symbol.for("react.memo_cache_sentinel")?(_={id:"icon",header:"",render:$e,cellClassName:"w-16 shrink-0",wrap:!0},b={id:"title",header:"Name",render:Ae,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:ze,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},I={id:"mode",header:"Mode",accessor:Pe,cellClassName:"w-[100px]"},M={id:"connections",header:"Connections",render:Me,cellClassName:"w-24 shrink-0"},S={id:"status",header:"Status",render:Ie,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=S,e[14]=_,e[15]=b,e[16]=k,e[17]=I,e[18]=M):(S=e[13],_=e[14],b=e[15],k=e[16],I=e[17],M=e[18]);let P;e[19]!==n||e[20]!==a.slug?(P=[_,b,k,I,M,S,{id:"actions",header:"",render:o=>t.jsxs(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ke,children:t.jsx(i,{name:"more_vert",size:20})})}),t.jsxs(X,{align:"end",onClick:be,children:[t.jsxs(B,{onClick:c=>{c.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},children:[t.jsx(i,{name:"visibility",size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:c=>{c.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(i,{name:"delete",size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=n,e[20]=a.slug,e[21]=P):P=e[21];const V=P,H=r.create.isPending?"Creating...":"Create MCP Gateway";let z;e[22]!==r.create.isPending||e[23]!==T||e[24]!==H?(z=t.jsx(J,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:r.create.isPending,children:H}),e[22]=r.create.isPending,e[23]=T,e[24]=H,e[25]=z):z=e[25];const L=z,F=l.mode==="deleting";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=o=>!o&&N({type:"close"}),e[26]=A):A=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(he,{children:"Delete Gateway?"}),e[27]=$):$=e[27];const W=l.mode==="deleting"&&l.gateway.title;let d;e[28]!==W?(d=t.jsxs(fe,{children:[$,t.jsxs(xe,{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]=d):d=e[29];let E;e[30]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(we,{children:"Cancel"}),e[30]=E):E=e[30];let m;e[31]!==O?(m=t.jsxs(ye,{children:[E,t.jsx(je,{onClick:O,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=O,e[32]=m):m=e[32];let u;e[33]!==d||e[34]!==m?(u=t.jsxs(Ce,{children:[d,m]}),e[33]=d,e[34]=m,e[35]=u):u=e[35];let g;e[36]!==F||e[37]!==u?(g=t.jsx(Ne,{open:F,onOpenChange:A,children:u}),e[36]=F,e[37]=u,e[38]=g):g=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 p;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(p=t.jsx(oe,{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]=p):p=e[46];let h;e[47]!==s?(h=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=h):h=e[48];let f;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==h?(f=t.jsx(ne,{value:s.search,onChange:s.setSearch,placeholder:"Search for a gateway...",onKeyDown:h}),e[49]=s.search,e[50]=s.setSearch,e[51]=h,e[52]=f):f=e[52];let x;e[53]!==V||e[54]!==w||e[55]!==s.handleSort||e[56]!==s.search||e[57]!==s.sortDirection||e[58]!==s.sortKey||e[59]!==s.viewMode||e[60]!==n||e[61]!==a.slug?(x=s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:w.length===0?t.jsx(q,{image:t.jsx(i,{name:"network_node",size:48,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:w.map(o=>t.jsx(ie,{connection:{id:o.id,title:o.title,description:o.description,icon:o.icon,status:o.status},fallbackIcon:"network_node",onClick:()=>n({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(Q,{children:[t.jsx(U,{asChild:!0,children:t.jsx(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:_e,children:t.jsx(i,{name:"more_vert",size:20})})}),t.jsxs(X,{align:"end",onClick:Se,children:[t.jsxs(B,{onClick:c=>{c.stopPropagation(),n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}})},children:[t.jsx(i,{name:"visibility",size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:c=>{c.stopPropagation(),N({type:"delete",gateway:o})},children:[t.jsx(i,{name:"delete",size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(re,{columns:V,data:w,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>n({to:"/$org/gateways/$gatewayId",params:{org:a.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(i,{name:"network_node",size:48,className:"text-muted-foreground"}),title:"No gateways found",description:`No gateways match "${s.search}"`}):t.jsx(q,{image:t.jsx(i,{name:"network_node",size:48,className:"text-muted-foreground"}),title:"No gateways yet",description:"Create a gateway to aggregate tools from multiple MCP connections."})}),e[53]=V,e[54]=w,e[55]=s.handleSort,e[56]=s.search,e[57]=s.sortDirection,e[58]=s.sortKey,e[59]=s.viewMode,e[60]=n,e[61]=a.slug,e[62]=x):x=e[62];let K;return e[63]!==g||e[64]!==p||e[65]!==f||e[66]!==x?(K=t.jsxs(ae,{children:[g,p,f,x]}),e[63]=g,e[64]=p,e[65]=f,e[66]=x,e[67]=K):K=e[67],K}function Se(e){return e.stopPropagation()}function _e(e){return e.stopPropagation()}function be(e){return e.stopPropagation()}function ke(e){return e.stopPropagation()}function Ie(e){return t.jsx(ee,{variant:e.status==="active"?"default":"outline",children:e.status})}function Me(e){return t.jsx("span",{className:"text-sm text-muted-foreground",children:e.connections.length})}function Pe(e){return t.jsx(ee,{variant:"outline",className:"text-xs",children:e.tool_selection_mode==="exclusion"?"Exclude":"Include"})}function ze(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Ae(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function $e(e){return t.jsx(de,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:"network_node"})}function ot(){const e=Y.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(le,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(i,{name:"progress_activity",size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(De,{})})}),e[0]=a):a=e[0],a}export{ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,j as i,a as w,r as C,a5 as $}from"./index-iWvwzdJJ.js";import{C as _}from"./card-b_g2O0__.js";import{c as v}from"./utils---jHV5W_.js";import{A as k}from"./avatar-DMYSx92d.js";import{I as z}from"./icon-CpE1QQq1.js";import{B as A}from"./button-ClXDbbMi.js";import{I as O}from"./input-D7PefFT1.js";import{C as L}from"./create-organization-dialog-BubXK60q.js";import"./alert-dialog-LOlFjjTl.js";import"./form-M-vi9HJy.js";import"./spinner-DgsZg1gV.js";function D(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let o;e[0]!==s?(o=p=>{s&&s(p)},e[0]=s,e[1]=o):o=e[1];const m=o,d=s&&"cursor-pointer",a=x&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==d||e[4]!==a?(c=v("group transition-all flex flex-col gap-0",d,a,l),e[2]=l,e[3]=d,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=i.jsx(_,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function F(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:o}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,a=x===void 0?"contain":x;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==d||e[5]!==n?(c=i.jsx(k,{url:n,fallback:l,shape:m,size:d,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=d,e[5]=n,e[6]=c):c=e[6],c}function H(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 R(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 I(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 B(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 G(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 q(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 M(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 Q(){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(D,{Avatar:F,AvatarSection:G,Header:H,Title:R,Subtitle:I,Content:B,Footer:q,Badge:M,Skeleton:Q}),T={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},P={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"},V={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"},X={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"},J={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"},K={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 E(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 o=x,d=T[s===void 0?4:s],a=o.sm&&P[o.sm],c=o.md&&V[o.md],g=o.lg&&X[o.lg],p=o.xl&&J[o.xl],j=o["2xl"]&&K[o["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,a,c,g,p,j,r),e[2]=r,e[3]=d,e[4]=a,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 U(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,d=s===void 0?4:s;let a;e[2]!==x?(a=Array.from({length:x}).map(W),e[2]=x,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==a?(c=i.jsx(E,{columns:m,gap:d,className:r,children:a}),e[4]=r,e[5]=m,e[6]=d,e[7]=a,e[8]=c):c=e[8],c}function W(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(E,{Skeleton:U});function Y(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=$();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=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]=a):a=e[3],a}if(x.length===0){let a;return e[4]!==n?(a=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]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==x||e[8]!==s){let a;e[10]!==s?(a=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]=a):a=e[11],m=x.map(a),e[7]=x,e[8]=s,e[9]=m}else m=e[9];let d;return e[12]!==m?(d=i.jsx(S,{columns:o,children:m}),e[12]=m,e[13]=d):d=e[13],d}function Z(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(z,{name:"error",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 ee(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),o=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(Z,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=m):m=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=f=>s(f.target.value),t[5]=d):d=t[5];let a;t[6]!==l?(a=i.jsx(O,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=a):a=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsxs(A,{variant:"default",onClick:()=>x(!0),children:[i.jsx(z,{name:"add",size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=c):c=t[8];let g;t[9]!==a?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[a,c]})]}),t[9]=a,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]!==o?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Y,{query:o})})}),t[12]=o,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(L,{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 xe(){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(ee,{})}),t[0]=e):e=t[0],e}export{xe as default};
|
|
1
|
+
import{c as u,j as i,a as w,r as C,a5 as $}from"./index-Bg6hz_Hz.js";import{C as _}from"./card-CQm1e1mc.js";import{c as v}from"./utils-DM-D9fBL.js";import{A as k}from"./avatar-TIkmrysR.js";import{I as z}from"./icon-BEvt1BW0.js";import{B as A}from"./button-Ngdsb528.js";import{I as O}from"./input-DeeRidPU.js";import{C as L}from"./create-organization-dialog-CqQsNffS.js";import"./alert-dialog-BzVvrda9.js";import"./form-DB-vzIPN.js";import"./spinner-DcOXl8-0.js";function D(t){const e=u.c(10),{children:n,className:l,onNavigate:s,showHoverRing:r}=t,x=r===void 0?!1:r;let o;e[0]!==s?(o=p=>{s&&s(p)},e[0]=s,e[1]=o):o=e[1];const m=o,d=s&&"cursor-pointer",a=x&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==d||e[4]!==a?(c=v("group transition-all flex flex-col gap-0",d,a,l),e[2]=l,e[3]=d,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=i.jsx(_,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function F(t){const e=u.c(7),{url:n,fallback:l,shape:s,size:r,objectFit:x,className:o}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,a=x===void 0?"contain":x;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==d||e[5]!==n?(c=i.jsx(k,{url:n,fallback:l,shape:m,size:d,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=d,e[5]=n,e[6]=c):c=e[6],c}function H(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 R(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 I(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 B(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 G(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 q(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 M(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 Q(){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(D,{Avatar:F,AvatarSection:G,Header:H,Title:R,Subtitle:I,Content:B,Footer:q,Badge:M,Skeleton:Q}),T={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},P={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"},V={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"},X={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"},J={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"},K={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 E(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 o=x,d=T[s===void 0?4:s],a=o.sm&&P[o.sm],c=o.md&&V[o.md],g=o.lg&&X[o.lg],p=o.xl&&J[o.xl],j=o["2xl"]&&K[o["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,a,c,g,p,j,r),e[2]=r,e[3]=d,e[4]=a,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 U(t){const e=u.c(9),{count:n,columns:l,gap:s,className:r}=t,x=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,d=s===void 0?4:s;let a;e[2]!==x?(a=Array.from({length:x}).map(W),e[2]=x,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==a?(c=i.jsx(E,{columns:m,gap:d,className:r,children:a}),e[4]=r,e[5]=m,e[6]=d,e[7]=a,e[8]=c):c=e[8],c}function W(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(E,{Skeleton:U});function Y(t){const e=u.c(14),{query:n}=t,{data:l}=w.useListOrganizations(),s=$();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=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]=a):a=e[3],a}if(x.length===0){let a;return e[4]!==n?(a=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]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==x||e[8]!==s){let a;e[10]!==s?(a=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]=a):a=e[11],m=x.map(a),e[7]=x,e[8]=s,e[9]=m}else m=e[9];let d;return e[12]!==m?(d=i.jsx(S,{columns:o,children:m}),e[12]=m,e[13]=d):d=e[13],d}function Z(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(z,{name:"error",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 ee(){const t=u.c(20),{error:e,isPending:n}=w.useListOrganizations(),[l,s]=C.useState(""),[r,x]=C.useState(!1),o=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(Z,{error:e}),t[2]=e,t[3]=f):f=t[3],f}let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("h2",{className:"text-xl font-medium",children:"My organizations"}),t[4]=m):m=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=f=>s(f.target.value),t[5]=d):d=t[5];let a;t[6]!==l?(a=i.jsx(O,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=a):a=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsxs(A,{variant:"default",onClick:()=>x(!0),children:[i.jsx(z,{name:"add",size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=c):c=t[8];let g;t[9]!==a?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[a,c]})]}),t[9]=a,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]!==o?(j=i.jsx("div",{className:"@container",children:i.jsx(C.Suspense,{fallback:p,children:i.jsx(Y,{query:o})})}),t[12]=o,t[13]=j):j=t[13];let h;t[14]!==r?(h=i.jsx(L,{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 xe(){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(ee,{})}),t[0]=e):e=t[0],e}export{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as z}from"./index-
|
|
1
|
+
import{c as w,j as z}from"./index-Bg6hz_Hz.js";import{c as I}from"./utils-DM-D9fBL.js";function L(a){const t=w.c(28);let e,s,l,i,c,r,f,m;t[0]!==a?({name:s,filled:c,weight:r,grade:f,size:m,style:i,className:e,...l}=a,t[0]=a,t[1]=e,t[2]=s,t[3]=l,t[4]=i,t[5]=c,t[6]=r,t[7]=f,t[8]=m):(e=t[1],s=t[2],l=t[3],i=t[4],c=t[5],r=t[6],f=t[7],m=t[8]);const j=c===void 0?!1:c,p=r===void 0?400:r,d=f===void 0?0:f,$=m===void 0?16:m;let o;t[9]!==e?(o=I("material-symbols-outlined",e),t[9]=e,t[10]=o):o=t[10];let u;if(t[11]!==j||t[12]!==d||t[13]!==p){const y=j?"1":"0";let x;t[15]!==d||t[16]!==y||t[17]!==p?(x={FILL:y,wght:p,GRAD:d},t[15]=d,t[16]=y,t[17]=p,t[18]=x):x=t[18],u=Object.entries(x).map(R),t[11]=j,t[12]=d,t[13]=p,t[14]=u}else u=t[14];const v=u.join(", "),h=`${$}px`;let n;t[19]!==i||t[20]!==v||t[21]!==h?(n={fontVariationSettings:v,...i,fontSize:h},t[19]=i,t[20]=v,t[21]=h,t[22]=n):n=t[22];let g;return t[23]!==s||t[24]!==l||t[25]!==o||t[26]!==n?(g=z.jsx("span",{translate:"no",className:o,style:n,...l,children:s}),t[23]=s,t[24]=l,t[25]=o,t[26]=n,t[27]=g):g=t[27],g}function R(a){const[t,e]=a;return`'${t}' ${e}`}export{L as I};
|