@decocms/mesh 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/client/assets/{AlertCircle-CnILn3jx.js → AlertCircle-DiqlNboz.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-B6wScdzP.js → ArrowLeft-C4VtVMs2.js} +1 -1
  3. package/dist/client/assets/{ChevronDown-DTD8t00o.js → ChevronDown-CcUg3X_Y.js} +1 -1
  4. package/dist/client/assets/{ChevronRight-1OHI0CBI.js → ChevronRight-DoX6pxYj.js} +1 -1
  5. package/dist/client/assets/{Copy01-Uwb56ntU.js → Copy01-BJql3T8w.js} +1 -1
  6. package/dist/client/assets/{DotsHorizontal-B5ryaglt.js → DotsHorizontal-wWvFFsxa.js} +1 -1
  7. package/dist/client/assets/{DotsVertical-B-5TnXsG.js → DotsVertical-C_psDJy3.js} +1 -1
  8. package/dist/client/assets/{File06-DExBhm42.js → File06-CfmzgkCD.js} +1 -1
  9. package/dist/client/assets/{FilterLines-aAu13BQ5.js → FilterLines-MNaVyood.js} +1 -1
  10. package/dist/client/assets/{FlipBackward-DWy5EIwt.js → FlipBackward-qa1GrgeQ.js} +1 -1
  11. package/dist/client/assets/{GitBranch01-Dq29bc0o.js → GitBranch01-Cy-aTD__.js} +1 -1
  12. package/dist/client/assets/{Grid01-Bdi_lD58.js → Grid01-400pwqps.js} +1 -1
  13. package/dist/client/assets/{Inbox01-DMQr1yW_.js → Inbox01-DQ40if0u.js} +1 -1
  14. package/dist/client/assets/{InfoCircle-BTGq_g6o.js → InfoCircle-DbgHopMm.js} +1 -1
  15. package/dist/client/assets/{Key01-BM7IeiIC.js → Key01-CXPRpQE9.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-BbRknnAT.js → LinkExternal01-BJZvPGF2.js} +1 -1
  17. package/dist/client/assets/{Loading01-BhwGtEie.js → Loading01-DSWhKp36.js} +1 -1
  18. package/dist/client/assets/{Lock01-BjwJTO1K.js → Lock01-Cw5Gl3NV.js} +1 -1
  19. package/dist/client/assets/{Play-B_M1eygK.js → Play-18tBEZWZ.js} +1 -1
  20. package/dist/client/assets/{Plus-CUt-llJ2.js → Plus-SMn8MQ-H.js} +1 -1
  21. package/dist/client/assets/{Terminal-OwfTXSIc.js → Terminal-yR92omIF.js} +1 -1
  22. package/dist/client/assets/{Trash01-DvwxBHIe.js → Trash01-DaFJSHZu.js} +1 -1
  23. package/dist/client/assets/{X-DmB-XP-B.js → X-q_t7ZUi-.js} +1 -1
  24. package/dist/client/assets/{XClose-BfRKR4QX.js → XClose-2lFeEEkz.js} +1 -1
  25. package/dist/client/assets/{alert-dialog-CPgX_DbI.js → alert-dialog-BOjS3GrS.js} +1 -1
  26. package/dist/client/assets/{auth-C_7jwlCE.js → auth-BvEfLR40.js} +1 -1
  27. package/dist/client/assets/{auth-catchall-BsWBBbjQ.js → auth-catchall-qnrnPCT6.js} +1 -1
  28. package/dist/client/assets/{avatar-BfkYZ3Uk.js → avatar-D8KYLrun.js} +1 -1
  29. package/dist/client/assets/{badge-pmm0Bb0n.js → badge-DHFuTJNA.js} +1 -1
  30. package/dist/client/assets/{card-DX0N7QQe.js → card-CSWNwOPv.js} +1 -1
  31. package/dist/client/assets/{checkbox-CT0tct0O.js → checkbox-D6eJScSi.js} +1 -1
  32. package/dist/client/assets/{collection-detail-BB6Q1vQA.js → collection-detail-cLR1iiCF.js} +1 -1
  33. package/dist/client/assets/{collection-display-button-C6mkNMSZ.js → collection-display-button-DWBgVnY5.js} +1 -1
  34. package/dist/client/assets/{collection-header-B-OH92G_.js → collection-header-BYkZ9Trb.js} +1 -1
  35. package/dist/client/assets/{collection-page-BMM6TZo-.js → collection-page-BjyL0NfT.js} +1 -1
  36. package/dist/client/assets/{collection-search-Dspxl3Yz.js → collection-search-BhTsTIQF.js} +1 -1
  37. package/dist/client/assets/{collection-tab-CZVDVMRh.js → collection-tab-ByD_c7B5.js} +1 -1
  38. package/dist/client/assets/{collection-table-wrapper-QnkBhjXh.js → collection-table-wrapper-G4nlfvjF.js} +1 -1
  39. package/dist/client/assets/{connection-card-D80SBKTI.js → connection-card-BRub-GLZ.js} +1 -1
  40. package/dist/client/assets/{connection-detail-CQgpZSSc.js → connection-detail-DgCsw2FN.js} +1 -1
  41. package/dist/client/assets/{connections-D1odZRUO.js → connections-BEv7u43V.js} +1 -1
  42. package/dist/client/assets/constants-CxNag89_.js +1 -0
  43. package/dist/client/assets/{create-organization-dialog-Cz1rNGDv.js → create-organization-dialog-CahJq4TL.js} +1 -1
  44. package/dist/client/assets/{dialog-CC31EL0X.js → dialog-Ay6PD9W0.js} +1 -1
  45. package/dist/client/assets/{dropdown-menu-zbRnijT0.js → dropdown-menu-CX0_ej-t.js} +1 -1
  46. package/dist/client/assets/{empty-state-B5WHq2Wp.js → empty-state-DOXYCllo.js} +1 -1
  47. package/dist/client/assets/{env-vars-editor-BZ0EKsNv.js → env-vars-editor-DB_yBian.js} +1 -1
  48. package/dist/client/assets/{error-boundary-iei4NFmK.js → error-boundary-BITgBYMF.js} +1 -1
  49. package/dist/client/assets/extract-connection-data-CaZ0wil0.js +1 -0
  50. package/dist/client/assets/{form-B4rbGxTC.js → form-CTm5F5lc.js} +1 -1
  51. package/dist/client/assets/{formatDistanceToNow-B3eT5t4e.js → formatDistanceToNow-Da1WFNC1.js} +1 -1
  52. package/dist/client/assets/{gateway-detail-Cel29Jq6.js → gateway-detail-ZvOmrysO.js} +1 -1
  53. package/dist/client/assets/{gateway-selector-DrcyKhYX.js → gateway-selector-zAzGBjF_.js} +1 -1
  54. package/dist/client/assets/{gateways-BCUxb6V6.js → gateways-JihiLKrE.js} +1 -1
  55. package/dist/client/assets/{home-DjjIziN3.js → home-BCE1FamF.js} +1 -1
  56. package/dist/client/assets/{index-CJUkmkVw.js → index-DOV_cVSz.js} +5 -5
  57. package/dist/client/assets/{index-DhProoia.js → index-DskbBe5h.js} +1 -1
  58. package/dist/client/assets/{index-Be5s3BTd.js → index-Tg8Sdg8t.js} +21 -21
  59. package/dist/client/assets/{input-D5VmXtXA.js → input-DZxsngZP.js} +1 -1
  60. package/dist/client/assets/{layout-BtPLf8h9.js → layout-Brqmaefj.js} +1 -1
  61. package/dist/client/assets/{lazy-highlighter-CKguQGTj.js → lazy-highlighter-CiDPKksG.js} +1 -1
  62. package/dist/client/assets/{localstorage-keys-Cgns4y6c.js → localstorage-keys-Bmzia9Ql.js} +1 -1
  63. package/dist/client/assets/{login-BY9zzeLF.js → login-DTvg0d0e.js} +1 -1
  64. package/dist/client/assets/{mcp-oauth-JrBnP9ka.js → mcp-oauth-SMi_MNm0.js} +1 -1
  65. package/dist/client/assets/mcp-server-detail-Dp4c82jn.js +1 -0
  66. package/dist/client/assets/{members-BLsbQRx4.js → members-Antj9sp8.js} +1 -1
  67. package/dist/client/assets/{monaco-editor-BbkOCnUd.js → monaco-editor-DzF_l7qF.js} +1 -1
  68. package/dist/client/assets/{monitoring-DQGgnd4W.js → monitoring-CFWL1rLz.js} +1 -1
  69. package/dist/client/assets/{oauth-callback-CEdwKynD.js → oauth-callback-CG8hLD-b.js} +1 -1
  70. package/dist/client/assets/page-BvT1wvbD.js +1 -0
  71. package/dist/client/assets/{page-BXDOiUca.js → page-CBEZJuHw.js} +1 -1
  72. package/dist/client/assets/{pin-to-sidebar-button-Dw4GdfbU.js → pin-to-sidebar-button-fGogNndB.js} +1 -1
  73. package/dist/client/assets/{popover-t9-OkADH.js → popover-D8pPVQL_.js} +1 -1
  74. package/dist/client/assets/{project-context-provider-BS8o541A.js → project-context-provider-DzGl09z5.js} +1 -1
  75. package/dist/client/assets/{resizable-QJ-R9KRQ.js → resizable-RYzDqksM.js} +1 -1
  76. package/dist/client/assets/{resource-tabs-B-4VA98W.js → resource-tabs-Dx00akPb.js} +1 -1
  77. package/dist/client/assets/{select-e4C4SmKq.js → select-DXarH3zI.js} +1 -1
  78. package/dist/client/assets/server-name-C3ttWdyD.js +1 -0
  79. package/dist/client/assets/{settings-Dnv8fDox.js → settings-CppuOJKP.js} +1 -1
  80. package/dist/client/assets/{shell-layout-BlrxsMrN.js → shell-layout-9hZXlinq.js} +1 -1
  81. package/dist/client/assets/{spinner-BFS4gVsU.js → spinner-BlgPNYJ_.js} +1 -1
  82. package/dist/client/assets/{switch-CLvPCUaJ.js → switch-D8JX4qkY.js} +1 -1
  83. package/dist/client/assets/{textarea-4b5OG-tc.js → textarea-B4gwvsMJ.js} +1 -1
  84. package/dist/client/assets/{thread-history-popover-CdgY8TVV.js → thread-history-popover-BGdJj9Uf.js} +5 -5
  85. package/dist/client/assets/{tools-list-DYFK0YJ7.js → tools-list-PNSOJy0p.js} +1 -1
  86. package/dist/client/assets/{use-binding-4jFDqim2.js → use-binding-BrFwEM85.js} +1 -1
  87. package/dist/client/assets/{use-connection-BV17GXlx.js → use-connection-C0rtvbAv.js} +1 -1
  88. package/dist/client/assets/{use-connection-resources-CaFhYy-Y.js → use-connection-resources-85AsmF-4.js} +1 -1
  89. package/dist/client/assets/{use-gateway-B7sk5BUf.js → use-gateway-XK2Ec2c7.js} +1 -1
  90. package/dist/client/assets/{use-list-state-ClKTIM8C.js → use-list-state-CaOiitHv.js} +1 -1
  91. package/dist/client/assets/{use-mcp-BnUTTtgf.js → use-mcp-DP2e7Pak.js} +1 -1
  92. package/dist/client/assets/{use-members-Duard-8M.js → use-members-BZIlp51_.js} +1 -1
  93. package/dist/client/assets/{use-mobile-D6agNekL.js → use-mobile-C9ZrGbF1.js} +1 -1
  94. package/dist/client/assets/{use-organization-settings-BBRsFqJO.js → use-organization-settings-CpuYghUf.js} +1 -1
  95. package/dist/client/assets/{use-tool-call-CM2oq0rB.js → use-tool-call-BLCuCQA5.js} +1 -1
  96. package/dist/client/assets/useQuery-CDC7rIFj.js +1 -0
  97. package/dist/client/assets/{value-8MKGBmon.js → value-C6pOmVvH.js} +1 -1
  98. package/dist/client/assets/{view-mode-toggle-BTD72CUu.js → view-mode-toggle-BegVAMeC.js} +1 -1
  99. package/dist/client/assets/{workflow-6yVvsMos.js → workflow-ChKb4zdL.js} +1 -1
  100. package/dist/client/index.html +1 -1
  101. package/dist/server/cli.js +167 -167
  102. package/dist/server/migrate.js +67 -67
  103. package/dist/server/server.js +164 -164
  104. package/package.json +1 -1
  105. package/dist/client/assets/app-name-gTETL9So.js +0 -1
  106. package/dist/client/assets/constants-BvQJIhjO.js +0 -1
  107. package/dist/client/assets/extract-connection-data-RbshSMFT.js +0 -1
  108. package/dist/client/assets/mcp-server-detail-D1UUYOFR.js +0 -1
  109. package/dist/client/assets/page-CjfeHs2p.js +0 -1
  110. package/dist/client/assets/useQuery-DdiguCvR.js +0 -1
@@ -1 +1 @@
1
- import{r as g,ai as K,c as w,j as o,aO as E}from"./index-Be5s3BTd.js";import{i as Y}from"./project-context-provider-BS8o541A.js";import{u as ee,i as Z}from"./use-gateway-B7sk5BUf.js";import{I as Q,i as te}from"./use-connection-BV17GXlx.js";import{b as se,a as le,c as ae,S as re}from"./select-e4C4SmKq.js";import{c as I,B as oe,I as ne}from"./input-D5VmXtXA.js";import{u as ie}from"./use-mobile-D6agNekL.js";const ce=({size:l=24,color:e="currentColor",...t})=>g.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},g.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));ce.displayName="Stop";function J({prop:l,defaultProp:e,onChange:t=()=>{}}){const[s,a]=de({defaultProp:e,onChange:t}),r=l!==void 0,n=r?l:s,i=K(t),c=g.useCallback(d=>{if(r){const f=typeof d=="function"?d(l):d;f!==l&&i(f)}else a(d)},[r,l,a,i]);return[n,c]}function de({defaultProp:l,onChange:e}){const t=g.useState(l),[s]=t,a=g.useRef(s),r=K(e);return g.useEffect(()=>{a.current!==s&&(r(s),a.current=s)},[s,a,r]),t}function fe(l){const e=w.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=o.jsx(E.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=s):s=e[3],s}function ue(l){const e=w.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=o.jsx(E.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function me(l){const e=w.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=o.jsx(E.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function pe(l){const e=w.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=I("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-black/50",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r=o.jsx(E.Overlay,{"data-slot":"drawer-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=r):r=e[7],r}function xe(l){const e=w.c(12);let t,s,a;e[0]!==l?({className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(pe,{}),e[4]=r):r=e[4];let n;e[5]!==s?(n=I("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",s),e[5]=s,e[6]=n):n=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=i):i=e[7];let c;return e[8]!==t||e[9]!==a||e[10]!==n?(c=o.jsxs(me,{"data-slot":"drawer-portal",children:[r,o.jsxs(E.Content,{"data-slot":"drawer-content",className:n,...a,children:[i,t]})]}),e[8]=t,e[9]=a,e[10]=n,e[11]=c):c=e[11],c}function he(l){const e=w.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=I("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r=o.jsx("div",{"data-slot":"drawer-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=r):r=e[7],r}function we(l){const e=w.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=I("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r=o.jsx(E.Title,{"data-slot":"drawer-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=r):r=e[7],r}const X=g.createContext({isMobile:!1,setValue:()=>{}}),q=()=>g.useContext(X),ve=l=>{const e=w.c(37);let t,s,a,r,n,i,c,d;e[0]!==l?({children:t,defaultOpen:s,open:i,onOpenChange:r,defaultValue:a,value:d,onValueChange:n,...c}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=r,e[5]=n,e[6]=i,e[7]=c,e[8]=d):(t=e[1],s=e[2],a=e[3],r=e[4],n=e[5],i=e[6],c=e[7],d=e[8]);const p=ie(),f=s??!1;let m;e[9]!==r||e[10]!==i||e[11]!==f?(m={prop:i,defaultProp:f,onChange:r},e[9]=r,e[10]=i,e[11]=f,e[12]=m):m=e[12];const[x,h]=J(m);let C;e[13]!==a||e[14]!==n||e[15]!==d?(C={prop:d,defaultProp:a,onChange:n},e[13]=a,e[14]=n,e[15]=d,e[16]=C):C=e[16];const[S,k]=J(C);let $;e[17]!==k?($=M=>{M&&k(M)},e[17]=k,e[18]=$):$=e[18];const y=$;let b;e[19]!==p||e[20]!==y?(b={isMobile:p,setValue:y},e[19]=p,e[20]=y,e[21]=b):b=e[21];let j;e[22]!==t||e[23]!==x||e[24]!==c||e[25]!==h?(j=o.jsx(fe,{open:x,onOpenChange:h,...c,children:t}),e[22]=t,e[23]=x,e[24]=c,e[25]=h,e[26]=j):j=e[26];let v;e[27]!==x||e[28]!==c||e[29]!==h||e[30]!==y||e[31]!==j||e[32]!==S?(v=o.jsx(re,{open:x,onOpenChange:h,value:S,onValueChange:y,...c,children:j}),e[27]=x,e[28]=c,e[29]=h,e[30]=y,e[31]=j,e[32]=S,e[33]=v):v=e[33];let N;return e[34]!==b||e[35]!==v?(N=o.jsx(X.Provider,{value:b,children:v}),e[34]=b,e[35]=v,e[36]=N):N=e[36],N},ge=l=>{const{children:e,title:t,headerActions:s,...a}=l,{isMobile:r}=q(),{className:n,...i}=a;return r?o.jsxs(xe,{...i,children:[o.jsxs(he,{className:I(s?"flex flex-row items-center justify-between":"hidden"),children:[o.jsx(we,{children:t}),s]}),o.jsx("div",{className:I("flex flex-col gap-2 p-2 py-4",n),children:e})]}):o.jsx(ae,{...a,children:e})},be=l=>{const e=w.c(7);let t,s;e[0]!==l?({children:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);const{isMobile:a}=q();let r;return e[3]!==t||e[4]!==a||e[5]!==s?(r=a?o.jsx(ue,{asChild:!0,children:o.jsx(oe,{variant:"outline",...s,children:t})}):o.jsx(le,{...s,children:t}),e[3]=t,e[4]=a,e[5]=s,e[6]=r):r=e[6],r},je=l=>{const e=w.c(7);let t,s;e[0]!==l?({children:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);const{isMobile:a}=q();let r;return e[3]!==t||e[4]!==a||e[5]!==s?(r=a?o.jsx("span",{...s,children:t}):o.jsx(se,{...s,children:t}),e[3]=t,e[4]=a,e[5]=s,e[6]=r):r=e[6],r};function ye(){const l=w.c(4),e=ee();let t;l[0]!==e?(t=e??[],l[0]=e,l[1]=t):t=l[1];let s;return l[2]!==t?(s=t.map(Ce),l[2]=t,l[3]=s):s=l[3],s}function Ce(l){return{id:l.id,title:l.title,description:l.description??null,icon:l.icon??null,fallbackIcon:o.jsx(Z,{})}}function Ne(l){const e=w.c(24),{gateway:t,isSelected:s}=l,a=s&&"bg-accent";let r;e[0]!==a?(r=I("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",a),e[0]=a,e[1]=r):r=e[1];let n;e[2]!==t.fallbackIcon?(n=t.fallbackIcon??o.jsx(Z,{}),e[2]=t.fallbackIcon,e[3]=n):n=e[3];let i;e[4]!==t.icon||e[5]!==t.title||e[6]!==n?(i=o.jsx(Q,{icon:t.icon,name:t.title,size:"sm",fallbackIcon:n,className:"size-10"}),e[4]=t.icon,e[5]=t.title,e[6]=n,e[7]=i):i=e[7];let c;e[8]!==t.title?(c=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[8]=t.title,e[9]=c):c=e[9];let d;e[10]!==s?(d=s&&o.jsx(Y,{size:16,className:"text-foreground shrink-0"}),e[10]=s,e[11]=d):d=e[11];let p;e[12]!==c||e[13]!==d?(p=o.jsxs("div",{className:"flex items-center justify-between",children:[c,d]}),e[12]=c,e[13]=d,e[14]=p):p=e[14];let f;e[15]!==t.description?(f=t.description&&o.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:t.description}),e[15]=t.description,e[16]=f):f=e[16];let m;e[17]!==p||e[18]!==f?(m=o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[p,f]}),e[17]=p,e[18]=f,e[19]=m):m=e[19];let x;return e[20]!==r||e[21]!==i||e[22]!==m?(x=o.jsxs("div",{className:r,children:[i,m]}),e[20]=r,e[21]=i,e[22]=m,e[23]=x):x=e[23],x}function Se(l){const e=w.c(12),{gateway:t}=l;if(!t){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{className:"text-sm text-muted-foreground",children:"Select gateway"}),e[0]=i):i=e[0],i}let s;e[1]!==t.fallbackIcon?(s=t.fallbackIcon??o.jsx(Z,{}),e[1]=t.fallbackIcon,e[2]=s):s=e[2];let a;e[3]!==t.icon||e[4]!==t.title||e[5]!==s?(a=o.jsx(Q,{icon:t.icon,name:t.title,size:"xs",fallbackIcon:s,className:"w-5! h-5! min-w-5! shrink-0 rounded-sm"}),e[3]=t.icon,e[4]=t.title,e[5]=s,e[6]=a):a=e[6];let r;e[7]!==t.title?(r=o.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:t.title}),e[7]=t.title,e[8]=r):r=e[8];let n;return e[9]!==a||e[10]!==r?(n=o.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[a,r]}),e[9]=a,e[10]=r,e[11]=n):n=e[11],n}function ze(l){const e=w.c(47),{selectedGatewayId:t,onGatewayChange:s,variant:a,className:r,placeholder:n}=l,i=a===void 0?"bordered":a,c=n===void 0?"Select Hub":n,[d,p]=g.useState(!1),[f,m]=g.useState(""),x=g.useRef(null),h=ye();let C,S;e[0]!==d?(C=()=>{d&&setTimeout(()=>{x.current?.focus()},0)},S=[d],e[0]=d,e[1]=C,e[2]=S):(C=e[1],S=e[2]),g.useEffect(C,S);let k;if(e[3]!==h||e[4]!==t){let u;e[6]!==t?(u=U=>U.id===t,e[6]=t,e[7]=u):u=e[7],k=h.find(u),e[3]=h,e[4]=t,e[5]=k}else k=e[5];const $=k;let y;e:{if(!f.trim()){y=h;break e}let u;if(e[8]!==h||e[9]!==f){const U=f.toLowerCase();u=h.filter(F=>F.title.toLowerCase().includes(U)||F.description?.toLowerCase().includes(U)),e[8]=h,e[9]=f,e[10]=u}else u=e[10];y=u}const b=y;let j;e[11]!==s?(j=u=>{s(u),m(""),p(!1)},e[11]=s,e[12]=j):j=e[12];const v=j;let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=u=>{p(u),u||m("")},e[13]=N):N=e[13];const M=N,A=t||"",W=i==="borderless"&&"border-0 md:border-none";let R;e[14]!==r||e[15]!==W?(R=I("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",W,r),e[14]=r,e[15]=W,e[16]=R):R=e[16];let D;e[17]!==$?(D=o.jsx(Se,{gateway:$}),e[17]=$,e[18]=D):D=e[18];let G;e[19]!==c||e[20]!==D?(G=o.jsx(je,{placeholder:c,className:"min-w-0 max-w-full",children:D}),e[19]=c,e[20]=D,e[21]=G):G=e[21];let _;e[22]!==R||e[23]!==G?(_=o.jsx(be,{size:"sm",className:R,children:G}),e[22]=R,e[23]=G,e[24]=_):_=e[24];let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=o.jsx(te,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[25]=L):L=e[25];let B;e[26]===Symbol.for("react.memo_cache_sentinel")?(B=u=>m(u.target.value),e[26]=B):B=e[26];let z;e[27]!==f?(z=o.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:o.jsxs("div",{className:"relative",children:[L,o.jsx(ne,{ref:x,type:"text",placeholder:"Search for a gateway...",value:f,onChange:B,className:"pl-9 h-9 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none"})]})}),e[27]=f,e[28]=z):z=e[28];let O;e[29]!==b||e[30]!==v||e[31]!==t?(O=b.length>0?b.map(u=>o.jsx("div",{onClick:()=>v(u.id),className:"outline-none",children:o.jsx(Ne,{gateway:u,isSelected:u.id===t})},u.id)):o.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No gateways found"}),e[29]=b,e[30]=v,e[31]=t,e[32]=O):O=e[32];let P;e[33]!==O?(P=o.jsx("div",{className:"overflow-y-auto p-2 flex flex-col gap-1",children:O}),e[33]=O,e[34]=P):P=e[34];let T;e[35]!==z||e[36]!==P?(T=o.jsxs("div",{className:"flex flex-col max-h-[300px]",children:[z,P]}),e[35]=z,e[36]=P,e[37]=T):T=e[37];let V;e[38]!==c||e[39]!==T?(V=o.jsx(ge,{title:c,className:"w-full md:w-[400px] p-0",side:"bottom",children:T}),e[38]=c,e[39]=T,e[40]=V):V=e[40];let H;return e[41]!==v||e[42]!==d||e[43]!==_||e[44]!==V||e[45]!==A?(H=o.jsxs(ve,{open:d,onOpenChange:M,value:A,onValueChange:v,children:[_,V]}),e[41]=v,e[42]=d,e[43]=_,e[44]=V,e[45]=A,e[46]=H):H=e[46],H}export{ue as D,ze as G,je as R,xe as a,he as b,we as c,fe as d,ye as e,be as f,ge as g,ve as h,ce as i,J as u};
1
+ import{r as g,ai as K,c as w,j as o,aO as E}from"./index-Tg8Sdg8t.js";import{i as Y}from"./project-context-provider-DzGl09z5.js";import{u as ee,i as Z}from"./use-gateway-XK2Ec2c7.js";import{I as Q,i as te}from"./use-connection-C0rtvbAv.js";import{b as se,a as le,c as ae,S as re}from"./select-DXarH3zI.js";import{c as I,B as oe,I as ne}from"./input-DZxsngZP.js";import{u as ie}from"./use-mobile-C9ZrGbF1.js";const ce=({size:l=24,color:e="currentColor",...t})=>g.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},g.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));ce.displayName="Stop";function J({prop:l,defaultProp:e,onChange:t=()=>{}}){const[s,a]=de({defaultProp:e,onChange:t}),r=l!==void 0,n=r?l:s,i=K(t),c=g.useCallback(d=>{if(r){const f=typeof d=="function"?d(l):d;f!==l&&i(f)}else a(d)},[r,l,a,i]);return[n,c]}function de({defaultProp:l,onChange:e}){const t=g.useState(l),[s]=t,a=g.useRef(s),r=K(e);return g.useEffect(()=>{a.current!==s&&(r(s),a.current=s)},[s,a,r]),t}function fe(l){const e=w.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=o.jsx(E.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=s):s=e[3],s}function ue(l){const e=w.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=o.jsx(E.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function me(l){const e=w.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=o.jsx(E.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function pe(l){const e=w.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=I("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-black/50",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r=o.jsx(E.Overlay,{"data-slot":"drawer-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=r):r=e[7],r}function xe(l){const e=w.c(12);let t,s,a;e[0]!==l?({className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(pe,{}),e[4]=r):r=e[4];let n;e[5]!==s?(n=I("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",s),e[5]=s,e[6]=n):n=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=i):i=e[7];let c;return e[8]!==t||e[9]!==a||e[10]!==n?(c=o.jsxs(me,{"data-slot":"drawer-portal",children:[r,o.jsxs(E.Content,{"data-slot":"drawer-content",className:n,...a,children:[i,t]})]}),e[8]=t,e[9]=a,e[10]=n,e[11]=c):c=e[11],c}function he(l){const e=w.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=I("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r=o.jsx("div",{"data-slot":"drawer-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=r):r=e[7],r}function we(l){const e=w.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=I("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r=o.jsx(E.Title,{"data-slot":"drawer-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=r):r=e[7],r}const X=g.createContext({isMobile:!1,setValue:()=>{}}),q=()=>g.useContext(X),ve=l=>{const e=w.c(37);let t,s,a,r,n,i,c,d;e[0]!==l?({children:t,defaultOpen:s,open:i,onOpenChange:r,defaultValue:a,value:d,onValueChange:n,...c}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=r,e[5]=n,e[6]=i,e[7]=c,e[8]=d):(t=e[1],s=e[2],a=e[3],r=e[4],n=e[5],i=e[6],c=e[7],d=e[8]);const p=ie(),f=s??!1;let m;e[9]!==r||e[10]!==i||e[11]!==f?(m={prop:i,defaultProp:f,onChange:r},e[9]=r,e[10]=i,e[11]=f,e[12]=m):m=e[12];const[x,h]=J(m);let C;e[13]!==a||e[14]!==n||e[15]!==d?(C={prop:d,defaultProp:a,onChange:n},e[13]=a,e[14]=n,e[15]=d,e[16]=C):C=e[16];const[S,k]=J(C);let $;e[17]!==k?($=M=>{M&&k(M)},e[17]=k,e[18]=$):$=e[18];const y=$;let b;e[19]!==p||e[20]!==y?(b={isMobile:p,setValue:y},e[19]=p,e[20]=y,e[21]=b):b=e[21];let j;e[22]!==t||e[23]!==x||e[24]!==c||e[25]!==h?(j=o.jsx(fe,{open:x,onOpenChange:h,...c,children:t}),e[22]=t,e[23]=x,e[24]=c,e[25]=h,e[26]=j):j=e[26];let v;e[27]!==x||e[28]!==c||e[29]!==h||e[30]!==y||e[31]!==j||e[32]!==S?(v=o.jsx(re,{open:x,onOpenChange:h,value:S,onValueChange:y,...c,children:j}),e[27]=x,e[28]=c,e[29]=h,e[30]=y,e[31]=j,e[32]=S,e[33]=v):v=e[33];let N;return e[34]!==b||e[35]!==v?(N=o.jsx(X.Provider,{value:b,children:v}),e[34]=b,e[35]=v,e[36]=N):N=e[36],N},ge=l=>{const{children:e,title:t,headerActions:s,...a}=l,{isMobile:r}=q(),{className:n,...i}=a;return r?o.jsxs(xe,{...i,children:[o.jsxs(he,{className:I(s?"flex flex-row items-center justify-between":"hidden"),children:[o.jsx(we,{children:t}),s]}),o.jsx("div",{className:I("flex flex-col gap-2 p-2 py-4",n),children:e})]}):o.jsx(ae,{...a,children:e})},be=l=>{const e=w.c(7);let t,s;e[0]!==l?({children:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);const{isMobile:a}=q();let r;return e[3]!==t||e[4]!==a||e[5]!==s?(r=a?o.jsx(ue,{asChild:!0,children:o.jsx(oe,{variant:"outline",...s,children:t})}):o.jsx(le,{...s,children:t}),e[3]=t,e[4]=a,e[5]=s,e[6]=r):r=e[6],r},je=l=>{const e=w.c(7);let t,s;e[0]!==l?({children:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);const{isMobile:a}=q();let r;return e[3]!==t||e[4]!==a||e[5]!==s?(r=a?o.jsx("span",{...s,children:t}):o.jsx(se,{...s,children:t}),e[3]=t,e[4]=a,e[5]=s,e[6]=r):r=e[6],r};function ye(){const l=w.c(4),e=ee();let t;l[0]!==e?(t=e??[],l[0]=e,l[1]=t):t=l[1];let s;return l[2]!==t?(s=t.map(Ce),l[2]=t,l[3]=s):s=l[3],s}function Ce(l){return{id:l.id,title:l.title,description:l.description??null,icon:l.icon??null,fallbackIcon:o.jsx(Z,{})}}function Ne(l){const e=w.c(24),{gateway:t,isSelected:s}=l,a=s&&"bg-accent";let r;e[0]!==a?(r=I("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",a),e[0]=a,e[1]=r):r=e[1];let n;e[2]!==t.fallbackIcon?(n=t.fallbackIcon??o.jsx(Z,{}),e[2]=t.fallbackIcon,e[3]=n):n=e[3];let i;e[4]!==t.icon||e[5]!==t.title||e[6]!==n?(i=o.jsx(Q,{icon:t.icon,name:t.title,size:"sm",fallbackIcon:n,className:"size-10"}),e[4]=t.icon,e[5]=t.title,e[6]=n,e[7]=i):i=e[7];let c;e[8]!==t.title?(c=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[8]=t.title,e[9]=c):c=e[9];let d;e[10]!==s?(d=s&&o.jsx(Y,{size:16,className:"text-foreground shrink-0"}),e[10]=s,e[11]=d):d=e[11];let p;e[12]!==c||e[13]!==d?(p=o.jsxs("div",{className:"flex items-center justify-between",children:[c,d]}),e[12]=c,e[13]=d,e[14]=p):p=e[14];let f;e[15]!==t.description?(f=t.description&&o.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:t.description}),e[15]=t.description,e[16]=f):f=e[16];let m;e[17]!==p||e[18]!==f?(m=o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[p,f]}),e[17]=p,e[18]=f,e[19]=m):m=e[19];let x;return e[20]!==r||e[21]!==i||e[22]!==m?(x=o.jsxs("div",{className:r,children:[i,m]}),e[20]=r,e[21]=i,e[22]=m,e[23]=x):x=e[23],x}function Se(l){const e=w.c(12),{gateway:t}=l;if(!t){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{className:"text-sm text-muted-foreground",children:"Select gateway"}),e[0]=i):i=e[0],i}let s;e[1]!==t.fallbackIcon?(s=t.fallbackIcon??o.jsx(Z,{}),e[1]=t.fallbackIcon,e[2]=s):s=e[2];let a;e[3]!==t.icon||e[4]!==t.title||e[5]!==s?(a=o.jsx(Q,{icon:t.icon,name:t.title,size:"xs",fallbackIcon:s,className:"w-5! h-5! min-w-5! shrink-0 rounded-sm"}),e[3]=t.icon,e[4]=t.title,e[5]=s,e[6]=a):a=e[6];let r;e[7]!==t.title?(r=o.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground transition-colors truncate min-w-0 max-w-[200px] hidden sm:inline-block",children:t.title}),e[7]=t.title,e[8]=r):r=e[8];let n;return e[9]!==a||e[10]!==r?(n=o.jsxs("div",{className:"flex items-center gap-2 min-w-0 max-w-full",children:[a,r]}),e[9]=a,e[10]=r,e[11]=n):n=e[11],n}function ze(l){const e=w.c(47),{selectedGatewayId:t,onGatewayChange:s,variant:a,className:r,placeholder:n}=l,i=a===void 0?"bordered":a,c=n===void 0?"Select Hub":n,[d,p]=g.useState(!1),[f,m]=g.useState(""),x=g.useRef(null),h=ye();let C,S;e[0]!==d?(C=()=>{d&&setTimeout(()=>{x.current?.focus()},0)},S=[d],e[0]=d,e[1]=C,e[2]=S):(C=e[1],S=e[2]),g.useEffect(C,S);let k;if(e[3]!==h||e[4]!==t){let u;e[6]!==t?(u=U=>U.id===t,e[6]=t,e[7]=u):u=e[7],k=h.find(u),e[3]=h,e[4]=t,e[5]=k}else k=e[5];const $=k;let y;e:{if(!f.trim()){y=h;break e}let u;if(e[8]!==h||e[9]!==f){const U=f.toLowerCase();u=h.filter(F=>F.title.toLowerCase().includes(U)||F.description?.toLowerCase().includes(U)),e[8]=h,e[9]=f,e[10]=u}else u=e[10];y=u}const b=y;let j;e[11]!==s?(j=u=>{s(u),m(""),p(!1)},e[11]=s,e[12]=j):j=e[12];const v=j;let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=u=>{p(u),u||m("")},e[13]=N):N=e[13];const M=N,A=t||"",W=i==="borderless"&&"border-0 md:border-none";let R;e[14]!==r||e[15]!==W?(R=I("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 max-w-full",W,r),e[14]=r,e[15]=W,e[16]=R):R=e[16];let D;e[17]!==$?(D=o.jsx(Se,{gateway:$}),e[17]=$,e[18]=D):D=e[18];let G;e[19]!==c||e[20]!==D?(G=o.jsx(je,{placeholder:c,className:"min-w-0 max-w-full",children:D}),e[19]=c,e[20]=D,e[21]=G):G=e[21];let _;e[22]!==R||e[23]!==G?(_=o.jsx(be,{size:"sm",className:R,children:G}),e[22]=R,e[23]=G,e[24]=_):_=e[24];let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=o.jsx(te,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[25]=L):L=e[25];let B;e[26]===Symbol.for("react.memo_cache_sentinel")?(B=u=>m(u.target.value),e[26]=B):B=e[26];let z;e[27]!==f?(z=o.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:o.jsxs("div",{className:"relative",children:[L,o.jsx(ne,{ref:x,type:"text",placeholder:"Search for a gateway...",value:f,onChange:B,className:"pl-9 h-9 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none"})]})}),e[27]=f,e[28]=z):z=e[28];let O;e[29]!==b||e[30]!==v||e[31]!==t?(O=b.length>0?b.map(u=>o.jsx("div",{onClick:()=>v(u.id),className:"outline-none",children:o.jsx(Ne,{gateway:u,isSelected:u.id===t})},u.id)):o.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No gateways found"}),e[29]=b,e[30]=v,e[31]=t,e[32]=O):O=e[32];let P;e[33]!==O?(P=o.jsx("div",{className:"overflow-y-auto p-2 flex flex-col gap-1",children:O}),e[33]=O,e[34]=P):P=e[34];let T;e[35]!==z||e[36]!==P?(T=o.jsxs("div",{className:"flex flex-col max-h-[300px]",children:[z,P]}),e[35]=z,e[36]=P,e[37]=T):T=e[37];let V;e[38]!==c||e[39]!==T?(V=o.jsx(ge,{title:c,className:"w-full md:w-[400px] p-0",side:"bottom",children:T}),e[38]=c,e[39]=T,e[40]=V):V=e[40];let H;return e[41]!==v||e[42]!==d||e[43]!==_||e[44]!==V||e[45]!==A?(H=o.jsxs(ve,{open:d,onOpenChange:M,value:A,onValueChange:v,children:[_,V]}),e[41]=v,e[42]=d,e[43]=_,e[44]=V,e[45]=A,e[46]=H):H=e[46],H}export{ue as D,ze as G,je as R,xe as a,he as b,we as c,fe as d,ye as e,be as f,ge as g,ve as h,ce as i,J as u};
@@ -1 +1 @@
1
- import{c as te,j as t,r as se,h as re,t as ie}from"./index-Be5s3BTd.js";import{C as ne}from"./collection-header-B-OH92G_.js";import{C as ae}from"./collection-page-BMM6TZo-.js";import{C as le}from"./collection-search-Dspxl3Yz.js";import{C as ce}from"./collection-table-wrapper-QnkBhjXh.js";import{C as de}from"./connection-card-D80SBKTI.js";import{u as me,E as q,I as ue}from"./use-connection-BV17GXlx.js";import{E as he}from"./error-boundary-iei4NFmK.js";import{a as ge,u as pe,i as j}from"./use-gateway-B7sk5BUf.js";import{u as fe,s as Q}from"./use-list-state-ClKTIM8C.js";import{u as xe}from"./project-context-provider-BS8o541A.js";import{c as je,b as ye,d as we,A as Ce,e as be,g as Ne,a as De,f as Se}from"./alert-dialog-CPgX_DbI.js";import{B as oe}from"./badge-pmm0Bb0n.js";import{B as J}from"./input-D5VmXtXA.js";import{b as U,D as X,a as Y,c as B}from"./dropdown-menu-zbRnijT0.js";import{i as Z}from"./DotsVertical-B-5TnXsG.js";import{i as ve}from"./Loading01-BhwGtEie.js";import{s as ee}from"./Trash01-DvwxBHIe.js";import"./collection-display-button-C6mkNMSZ.js";import"./Grid01-Bdi_lD58.js";import"./view-mode-toggle-BTD72CUu.js";import"./card-DX0N7QQe.js";import"./use-mobile-D6agNekL.js";import"./ChevronRight-1OHI0CBI.js";function ke(e,r){switch(r.type){case"delete":return{mode:"deleting",gateway:r.gateway};case"close":return{mode:"idle"}}}function _e(){const e=te.c(68),{org:r}=xe(),i=re();let y;e[0]!==r.slug?(y={namespace:r.slug,resource:"gateways"},e[0]=r.slug,e[1]=y):y=e[1];const s=fe(y),n=ge(),x=pe(s);let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w={},e[2]=w):w=e[2];const G=me(w);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[a,b]=se.useReducer(ke,C);let N;e[4]!==n.create||e[5]!==G.length||e[6]!==i||e[7]!==r.slug?(N=async()=>{if(G.length===0){ie.error("Create at least one Connection first");return}const o=await n.create.mutateAsync({title:"New Hub",description:"Hubs let you securely expose integrated tools to the outside world.",status:"active",tool_selection_strategy:"passthrough",tool_selection_mode:"inclusion",connections:[]});i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},e[4]=n.create,e[5]=G.length,e[6]=i,e[7]=r.slug,e[8]=N):N=e[8];const R=N;let D;e[9]!==n.delete||e[10]!==a.gateway||e[11]!==a.mode?(D=async()=>{if(a.mode!=="deleting")return;const o=a.gateway.id;b({type:"close"});try{await n.delete.mutateAsync(o)}catch{}},e[9]=n.delete,e[10]=a.gateway,e[11]=a.mode,e[12]=D):D=e[12];const T=D;let S,v,k,_,I,$;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={id:"icon",header:"",render:Be,cellClassName:"w-16 shrink-0",wrap:!0},k={id:"title",header:"Name",render:He,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_={id:"description",header:"Description",render:Ke,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},I={id:"mode",header:"Mode",accessor:Ee,cellClassName:"w-[100px]"},$={id:"connections",header:"Connections",render:Pe,cellClassName:"w-24 shrink-0"},S={id:"status",header:"Status",render:Ae,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=S,e[14]=v,e[15]=k,e[16]=_,e[17]=I,e[18]=$):(S=e[13],v=e[14],k=e[15],_=e[16],I=e[17],$=e[18]);let M;e[19]!==i||e[20]!==r.slug?(M=[v,k,_,I,$,S,{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:ze,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Me,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=i,e[20]=r.slug,e[21]=M):M=e[21];const O=M,V=n.create.isPending?"Creating...":"Create Hub";let z;e[22]!==n.create.isPending||e[23]!==R||e[24]!==V?(z=t.jsx(J,{onClick:R,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:n.create.isPending,children:V}),e[22]=n.create.isPending,e[23]=R,e[24]=V,e[25]=z):z=e[25];const L=z,F=a.mode==="deleting";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=o=>!o&&b({type:"close"}),e[26]=A):A=e[26];let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(je,{children:"Delete Hub?"}),e[27]=P):P=e[27];const W=a.mode==="deleting"&&a.gateway.title;let c;e[28]!==W?(c=t.jsxs(ye,{children:[P,t.jsxs(we,{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]!==T?(d=t.jsxs(be,{children:[E,t.jsx(Ne,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=T,e[32]=d):d=e[32];let m;e[33]!==c||e[34]!==d?(m=t.jsxs(De,{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(Se,{open:F,onOpenChange:A,children:m}),e[36]=F,e[37]=m,e[38]=u):u=e[38];let K;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[39]=K):K=e[39];let h;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(h=t.jsx(ne,{title:"Hubs",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:K,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]=h):h=e[46];let g;e[47]!==s?(g=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=g):g=e[48];let p;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==g?(p=t.jsx(le,{value:s.search,onChange:s.setSearch,placeholder:"Search for a hub...",onKeyDown:g}),e[49]=s.search,e[50]=s.setSearch,e[51]=g,e[52]=p):p=e[52];let f;e[53]!==O||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]!==i||e[61]!==r.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(j,{size:36,className:"text-muted-foreground"}),title:s.search?"No hubs found":"No hubs yet",description:s.search?`No hubs match "${s.search}"`:"Create a hub to aggregate tools from multiple 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(j,{}),onClick:()=>i({to:"/$org/gateways/$gatewayId",params:{org:r.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:$e,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Ie,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ce,{columns:O,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs found",description:`No hubs match "${s.search}"`}):t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs yet",description:"Create a hub to aggregate tools from multiple Connections."})}),e[53]=O,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]=i,e[61]=r.slug,e[62]=f):f=e[62];let H;return e[63]!==u||e[64]!==h||e[65]!==p||e[66]!==f?(H=t.jsxs(ae,{children:[u,h,p,f]}),e[63]=u,e[64]=h,e[65]=p,e[66]=f,e[67]=H):H=e[67],H}function Ie(e){return e.stopPropagation()}function $e(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function ze(e){return e.stopPropagation()}function Ae(e){return t.jsx(oe,{variant:e.status==="active"?"default":"outline",children:e.status})}function Pe(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 Ke(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function He(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Be(e){return t.jsx(ue,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(j,{size:16})})}function ct(){const e=te.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(he,{children:t.jsx(se.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_e,{})})}),e[0]=r):r=e[0],r}export{ct as default};
1
+ import{c as te,j as t,r as se,h as re,t as ie}from"./index-Tg8Sdg8t.js";import{C as ne}from"./collection-header-BYkZ9Trb.js";import{C as ae}from"./collection-page-BjyL0NfT.js";import{C as le}from"./collection-search-BhTsTIQF.js";import{C as ce}from"./collection-table-wrapper-G4nlfvjF.js";import{C as de}from"./connection-card-BRub-GLZ.js";import{u as me,E as q,I as ue}from"./use-connection-C0rtvbAv.js";import{E as he}from"./error-boundary-BITgBYMF.js";import{a as ge,u as pe,i as j}from"./use-gateway-XK2Ec2c7.js";import{u as fe,s as Q}from"./use-list-state-CaOiitHv.js";import{u as xe}from"./project-context-provider-DzGl09z5.js";import{c as je,b as ye,d as we,A as Ce,e as be,g as Ne,a as De,f as Se}from"./alert-dialog-BOjS3GrS.js";import{B as oe}from"./badge-DHFuTJNA.js";import{B as J}from"./input-DZxsngZP.js";import{b as U,D as X,a as Y,c as B}from"./dropdown-menu-CX0_ej-t.js";import{i as Z}from"./DotsVertical-C_psDJy3.js";import{i as ve}from"./Loading01-DSWhKp36.js";import{s as ee}from"./Trash01-DaFJSHZu.js";import"./collection-display-button-DWBgVnY5.js";import"./Grid01-400pwqps.js";import"./view-mode-toggle-BegVAMeC.js";import"./card-CSWNwOPv.js";import"./use-mobile-C9ZrGbF1.js";import"./ChevronRight-DoX6pxYj.js";function ke(e,r){switch(r.type){case"delete":return{mode:"deleting",gateway:r.gateway};case"close":return{mode:"idle"}}}function _e(){const e=te.c(68),{org:r}=xe(),i=re();let y;e[0]!==r.slug?(y={namespace:r.slug,resource:"gateways"},e[0]=r.slug,e[1]=y):y=e[1];const s=fe(y),n=ge(),x=pe(s);let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w={},e[2]=w):w=e[2];const G=me(w);let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C={mode:"idle"},e[3]=C):C=e[3];const[a,b]=se.useReducer(ke,C);let N;e[4]!==n.create||e[5]!==G.length||e[6]!==i||e[7]!==r.slug?(N=async()=>{if(G.length===0){ie.error("Create at least one Connection first");return}const o=await n.create.mutateAsync({title:"New Hub",description:"Hubs let you securely expose integrated tools to the outside world.",status:"active",tool_selection_strategy:"passthrough",tool_selection_mode:"inclusion",connections:[]});i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},e[4]=n.create,e[5]=G.length,e[6]=i,e[7]=r.slug,e[8]=N):N=e[8];const R=N;let D;e[9]!==n.delete||e[10]!==a.gateway||e[11]!==a.mode?(D=async()=>{if(a.mode!=="deleting")return;const o=a.gateway.id;b({type:"close"});try{await n.delete.mutateAsync(o)}catch{}},e[9]=n.delete,e[10]=a.gateway,e[11]=a.mode,e[12]=D):D=e[12];const T=D;let S,v,k,_,I,$;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={id:"icon",header:"",render:Be,cellClassName:"w-16 shrink-0",wrap:!0},k={id:"title",header:"Name",render:He,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_={id:"description",header:"Description",render:Ke,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},I={id:"mode",header:"Mode",accessor:Ee,cellClassName:"w-[100px]"},$={id:"connections",header:"Connections",render:Pe,cellClassName:"w-24 shrink-0"},S={id:"status",header:"Status",render:Ae,cellClassName:"w-24 shrink-0",sortable:!0},e[13]=S,e[14]=v,e[15]=k,e[16]=_,e[17]=I,e[18]=$):(S=e[13],v=e[14],k=e[15],_=e[16],I=e[17],$=e[18]);let M;e[19]!==i||e[20]!==r.slug?(M=[v,k,_,I,$,S,{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:ze,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Me,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[19]=i,e[20]=r.slug,e[21]=M):M=e[21];const O=M,V=n.create.isPending?"Creating...":"Create Hub";let z;e[22]!==n.create.isPending||e[23]!==R||e[24]!==V?(z=t.jsx(J,{onClick:R,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:n.create.isPending,children:V}),e[22]=n.create.isPending,e[23]=R,e[24]=V,e[25]=z):z=e[25];const L=z,F=a.mode==="deleting";let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=o=>!o&&b({type:"close"}),e[26]=A):A=e[26];let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(je,{children:"Delete Hub?"}),e[27]=P):P=e[27];const W=a.mode==="deleting"&&a.gateway.title;let c;e[28]!==W?(c=t.jsxs(ye,{children:[P,t.jsxs(we,{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]!==T?(d=t.jsxs(be,{children:[E,t.jsx(Ne,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[31]=T,e[32]=d):d=e[32];let m;e[33]!==c||e[34]!==d?(m=t.jsxs(De,{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(Se,{open:F,onOpenChange:A,children:m}),e[36]=F,e[37]=m,e[38]=u):u=e[38];let K;e[39]===Symbol.for("react.memo_cache_sentinel")?(K=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"status",label:"Status"}],e[39]=K):K=e[39];let h;e[40]!==L||e[41]!==s.handleSort||e[42]!==s.setViewMode||e[43]!==s.sortDirection||e[44]!==s.sortKey||e[45]!==s.viewMode?(h=t.jsx(ne,{title:"Hubs",viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:K,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]=h):h=e[46];let g;e[47]!==s?(g=o=>{o.key==="Escape"&&(s.setSearch(""),o.target.blur())},e[47]=s,e[48]=g):g=e[48];let p;e[49]!==s.search||e[50]!==s.setSearch||e[51]!==g?(p=t.jsx(le,{value:s.search,onChange:s.setSearch,placeholder:"Search for a hub...",onKeyDown:g}),e[49]=s.search,e[50]=s.setSearch,e[51]=g,e[52]=p):p=e[52];let f;e[53]!==O||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]!==i||e[61]!==r.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(j,{size:36,className:"text-muted-foreground"}),title:s.search?"No hubs found":"No hubs yet",description:s.search?`No hubs match "${s.search}"`:"Create a hub to aggregate tools from multiple 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(j,{}),onClick:()=>i({to:"/$org/gateways/$gatewayId",params:{org:r.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:$e,children:t.jsx(Z,{size:20})})}),t.jsxs(Y,{align:"end",onClick:Ie,children:[t.jsxs(B,{onClick:l=>{l.stopPropagation(),i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}})},children:[t.jsx(Q,{size:16}),"Inspect"]}),t.jsxs(B,{variant:"destructive",onClick:l=>{l.stopPropagation(),b({type:"delete",gateway:o})},children:[t.jsx(ee,{size:16}),"Delete"]})]})]})},o.id))})}):t.jsx(ce,{columns:O,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:o=>i({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:o.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs found",description:`No hubs match "${s.search}"`}):t.jsx(q,{image:t.jsx(j,{size:36,className:"text-muted-foreground"}),title:"No hubs yet",description:"Create a hub to aggregate tools from multiple Connections."})}),e[53]=O,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]=i,e[61]=r.slug,e[62]=f):f=e[62];let H;return e[63]!==u||e[64]!==h||e[65]!==p||e[66]!==f?(H=t.jsxs(ae,{children:[u,h,p,f]}),e[63]=u,e[64]=h,e[65]=p,e[66]=f,e[67]=H):H=e[67],H}function Ie(e){return e.stopPropagation()}function $e(e){return e.stopPropagation()}function Me(e){return e.stopPropagation()}function ze(e){return e.stopPropagation()}function Ae(e){return t.jsx(oe,{variant:e.status==="active"?"default":"outline",children:e.status})}function Pe(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 Ke(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function He(e){return t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Be(e){return t.jsx(ue,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(j,{size:16})})}function ct(){const e=te.c(1);let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(he,{children:t.jsx(se.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_e,{})})}),e[0]=r):r=e[0],r}export{ct as default};
@@ -1 +1 @@
1
- import{c as u,j as i,a as w,r as C,h as E}from"./index-Be5s3BTd.js";import{C as _}from"./card-DX0N7QQe.js";import{c as v,I as $,B as k}from"./input-D5VmXtXA.js";import{A}from"./avatar-BfkYZ3Uk.js";import{i as O}from"./AlertCircle-CnILn3jx.js";import{s as L}from"./Plus-CUt-llJ2.js";import{C as D}from"./create-organization-dialog-Cz1rNGDv.js";import"./alert-dialog-CPgX_DbI.js";import"./form-B4rbGxTC.js";import"./spinner-BFS4gVsU.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 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",c=x&&"hover:ring-2 hover:ring-primary";let a;e[2]!==l||e[3]!==d||e[4]!==c?(a=v("group transition-all flex flex-col gap-0",d,c,l),e[2]=l,e[3]=d,e[4]=c,e[5]=a):a=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==a?(g=i.jsx(_,{className:a,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=a,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:o}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,c=x===void 0?"contain":x;let a;return e[0]!==o||e[1]!==l||e[2]!==c||e[3]!==m||e[4]!==d||e[5]!==n?(a=i.jsx(A,{url:n,fallback:l,shape:m,size:d,objectFit:c,className:o}),e[0]=o,e[1]=l,e[2]=c,e[3]=m,e[4]=d,e[5]=n,e[6]=a):a=e[6],a}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 o=x,d=P[s===void 0?4:s],c=o.sm&&V[o.sm],a=o.md&&X[o.md],g=o.lg&&J[o.lg],p=o.xl&&K[o.xl],j=o["2xl"]&&U[o["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==c||e[5]!==a||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,c,a,g,p,j,r),e[2]=r,e[3]=d,e[4]=c,e[5]=a,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 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 c;e[2]!==x?(c=Array.from({length:x}).map(Y),e[2]=x,e[3]=c):c=e[3];let a;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==c?(a=i.jsx(z,{columns:m,gap:d,className:r,children:c}),e[4]=r,e[5]=m,e[6]=d,e[7]=c,e[8]=a):a=e[8],a}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 c=n.toLowerCase();return l.filter(a=>a.name.toLowerCase().includes(c)||a.slug.toLowerCase().includes(c))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=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]=c):c=e[3],c}if(x.length===0){let c;return e[4]!==n?(c=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]=c):c=e[5],c}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 c;e[10]!==s?(c=a=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:a.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:a.logo||"",fallback:a.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",a.slug]}),i.jsx(b.Title,{children:a.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(a.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},a.id),e[10]=s,e[11]=c):c=e[11],m=x.map(c),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 ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(O,{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),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(ee,{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 c;t[6]!==l?(c=i.jsx($,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=c):c=t[7];let a;t[8]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs(k,{variant:"default",onClick:()=>x(!0),children:[i.jsx(L,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=a):a=t[8];let g;t[9]!==c?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[c,a]})]}),t[9]=c,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(Z,{query:o})})}),t[12]=o,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 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(te,{})}),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,h as E}from"./index-Tg8Sdg8t.js";import{C as _}from"./card-CSWNwOPv.js";import{c as v,I as $,B as k}from"./input-DZxsngZP.js";import{A}from"./avatar-D8KYLrun.js";import{i as O}from"./AlertCircle-DiqlNboz.js";import{s as L}from"./Plus-SMn8MQ-H.js";import{C as D}from"./create-organization-dialog-CahJq4TL.js";import"./alert-dialog-BOjS3GrS.js";import"./form-CTm5F5lc.js";import"./spinner-BlgPNYJ_.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 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",c=x&&"hover:ring-2 hover:ring-primary";let a;e[2]!==l||e[3]!==d||e[4]!==c?(a=v("group transition-all flex flex-col gap-0",d,c,l),e[2]=l,e[3]=d,e[4]=c,e[5]=a):a=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==a?(g=i.jsx(_,{className:a,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=a,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:o}=t,m=s===void 0?"square":s,d=r===void 0?"lg":r,c=x===void 0?"contain":x;let a;return e[0]!==o||e[1]!==l||e[2]!==c||e[3]!==m||e[4]!==d||e[5]!==n?(a=i.jsx(A,{url:n,fallback:l,shape:m,size:d,objectFit:c,className:o}),e[0]=o,e[1]=l,e[2]=c,e[3]=m,e[4]=d,e[5]=n,e[6]=a):a=e[6],a}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 o=x,d=P[s===void 0?4:s],c=o.sm&&V[o.sm],a=o.md&&X[o.md],g=o.lg&&J[o.lg],p=o.xl&&K[o.xl],j=o["2xl"]&&U[o["2xl"]];let h;e[2]!==r||e[3]!==d||e[4]!==c||e[5]!==a||e[6]!==g||e[7]!==p||e[8]!==j?(h=v("w-full grid",d,c,a,g,p,j,r),e[2]=r,e[3]=d,e[4]=c,e[5]=a,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 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 c;e[2]!==x?(c=Array.from({length:x}).map(Y),e[2]=x,e[3]=c):c=e[3];let a;return e[4]!==r||e[5]!==m||e[6]!==d||e[7]!==c?(a=i.jsx(z,{columns:m,gap:d,className:r,children:c}),e[4]=r,e[5]=m,e[6]=d,e[7]=c,e[8]=a):a=e[8],a}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 c=n.toLowerCase();return l.filter(a=>a.name.toLowerCase().includes(c)||a.slug.toLowerCase().includes(c))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const x=r;if(!l||l.length===0){let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=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]=c):c=e[3],c}if(x.length===0){let c;return e[4]!==n?(c=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]=c):c=e[5],c}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 c;e[10]!==s?(c=a=>i.jsxs(b,{onNavigate:()=>s({to:"/$org",params:{org:a.slug}}),children:[i.jsxs(b.Header,{children:[i.jsx(b.AvatarSection,{children:i.jsx(b.Avatar,{url:a.logo||"",fallback:a.name,size:"lg",objectFit:"contain"})}),i.jsxs(b.Content,{children:[i.jsxs(b.Subtitle,{children:["@",a.slug]}),i.jsx(b.Title,{children:a.name})]})]}),i.jsx(b.Footer,{children:i.jsxs("div",{className:"text-xs text-muted-foreground",children:["Created:"," ",new Date(a.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},a.id),e[10]=s,e[11]=c):c=e[11],m=x.map(c),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 ee(t){const e=u.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(O,{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),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(ee,{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 c;t[6]!==l?(c=i.jsx($,{className:"max-w-xs",placeholder:"Search",value:l,onChange:d}),t[6]=l,t[7]=c):c=t[7];let a;t[8]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs(k,{variant:"default",onClick:()=>x(!0),children:[i.jsx(L,{size:16}),i.jsx("span",{children:"New organization"})]}),t[8]=a):a=t[8];let g;t[9]!==c?(g=i.jsxs("div",{className:"flex items-center justify-between mb-8",children:[m,i.jsxs("div",{className:"flex items-center gap-2",children:[c,a]})]}),t[9]=c,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(Z,{query:o})})}),t[12]=o,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 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(te,{})}),t[0]=e):e=t[0],e}export{xe as default};