@decocms/mesh 2.17.2 → 2.18.0

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 (137) hide show
  1. package/dist/client/assets/{AlertCircle-Dvl19Bxu.js → AlertCircle-CahACZDg.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CNcRcLHi.js → ArrowLeft-DlLOWSTj.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Dj1nFRfD.js → ArrowUp-Ck0taqJi.js} +1 -1
  4. package/dist/client/assets/{Check-MZfXJ4EP.js → Check-Cjgi2ZiG.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BPwd0ESk.js → ChevronDown-BuVzyKHq.js} +1 -1
  6. package/dist/client/assets/{Code01-ZM8AfORO.js → Code01-XpAoNs3W.js} +1 -1
  7. package/dist/client/assets/{Copy01-DoisEbOD.js → Copy01-De4SwxDv.js} +1 -1
  8. package/dist/client/assets/{DotsHorizontal-2xfLjpUM.js → DotsHorizontal-D-Bv2U6B.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-CRTSoELg.js → DotsVertical-BhTwPxq7.js} +1 -1
  10. package/dist/client/assets/{Download01-DzrQfwIZ.js → Download01-DhkFfGKV.js} +1 -1
  11. package/dist/client/assets/{Edit01-BVpBBN26.js → Edit01-DsRHb45T.js} +1 -1
  12. package/dist/client/assets/{File06-DvtIjhz0.js → File06-BiIPMtEV.js} +1 -1
  13. package/dist/client/assets/{FilterLines-DkNJkoIH.js → FilterLines-C_UJwG_t.js} +1 -1
  14. package/dist/client/assets/{FlipBackward-938bk6QK.js → FlipBackward-CQnTJKeB.js} +1 -1
  15. package/dist/client/assets/{GitBranch01-HnfHVRyp.js → GitBranch01-ClS9Bk6n.js} +1 -1
  16. package/dist/client/assets/{Grid01-tEwYXVxO.js → Grid01-CRALWbj6.js} +1 -1
  17. package/dist/client/assets/{Home02-9SuE7ucu.js → Home02-ofwnyeoV.js} +1 -1
  18. package/dist/client/assets/{Image01-vvKwvz0g.js → Image01-Cb4gQMH4.js} +1 -1
  19. package/dist/client/assets/{Inbox01-Cekk6aOf.js → Inbox01-CKGdnZFH.js} +1 -1
  20. package/dist/client/assets/{InfoCircle-BXonO5qh.js → InfoCircle-_4UsKVMw.js} +1 -1
  21. package/dist/client/assets/{Key01-DqRe3I-7.js → Key01-BFJBGJng.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-BGOs7vaA.js → LinkExternal01-C1dAUI0b.js} +1 -1
  23. package/dist/client/assets/{List-j3ISho_T.js → List-DOmOO2Cw.js} +1 -1
  24. package/dist/client/assets/{Loading01-ByRd3GAn.js → Loading01-JwelopeC.js} +1 -1
  25. package/dist/client/assets/{Lock01-BYKl-IKI.js → Lock01-B7TIX2sZ.js} +1 -1
  26. package/dist/client/assets/{Play-DqeIwNA2.js → Play-CMKLF_6n.js} +1 -1
  27. package/dist/client/assets/{Plus-B6dO5J-T.js → Plus-Df2M6Ns2.js} +1 -1
  28. package/dist/client/assets/{SearchMd-RcsY4Qc3.js → SearchMd-Cgfgcbdz.js} +1 -1
  29. package/dist/client/assets/{Terminal-CM4NRPaq.js → Terminal-C8LHfiOW.js} +1 -1
  30. package/dist/client/assets/{Trash01-RdHotUor.js → Trash01-KvZ0cVo9.js} +1 -1
  31. package/dist/client/assets/{Upload01-B5lhw8CF.js → Upload01-TiwmYxO-.js} +1 -1
  32. package/dist/client/assets/{X-JFPiVUa4.js → X-DhyaYbLb.js} +1 -1
  33. package/dist/client/assets/{XClose-d9N07C9C.js → XClose-2bShEltc.js} +1 -1
  34. package/dist/client/assets/{alert-dialog-DIpJg2Aj.js → alert-dialog-gZhceV_v.js} +2 -2
  35. package/dist/client/assets/{auth-catchall-B2l1mrMK.js → auth-catchall-Dz8qCpUP.js} +1 -1
  36. package/dist/client/assets/{avatar-C9xlNN_x.js → avatar-d8M8JpvZ.js} +1 -1
  37. package/dist/client/assets/{badge--29UzF2m.js → badge-CKe-ib_i.js} +1 -1
  38. package/dist/client/assets/{binder-nBmgAoSK.js → binder-iKe3ndXq.js} +1 -1
  39. package/dist/client/assets/{button-CJFU-RdP.js → button-DXl1hVqx.js} +1 -1
  40. package/dist/client/assets/{card-BARP50i4.js → card-D0GcpRPY.js} +1 -1
  41. package/dist/client/assets/{checkbox-D4qUNjlU.js → checkbox-D1tHbcIN.js} +1 -1
  42. package/dist/client/assets/{collection-detail-DBx57h0R.js → collection-detail-BQkjgYb7.js} +1 -1
  43. package/dist/client/assets/{collection-display-button-DWT4ZvIF.js → collection-display-button-B_KC-ent.js} +1 -1
  44. package/dist/client/assets/{collection-header-DiGbkMTg.js → collection-header-BA9HTLmg.js} +1 -1
  45. package/dist/client/assets/{collection-page-b1I6uH8W.js → collection-page-CDkTC45g.js} +1 -1
  46. package/dist/client/assets/{collection-search-D3Bd0Mm5.js → collection-search-pUdl1eNx.js} +1 -1
  47. package/dist/client/assets/{collection-tab-V_ZAHQk2.js → collection-tab-BofyxU3Y.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-DToPOpkG.js → collection-table-wrapper-wARoPZXo.js} +1 -1
  49. package/dist/client/assets/{connection-Cgb7Z5-V.js → connection-ByVJuREK.js} +1 -1
  50. package/dist/client/assets/{connection-card-B6jH4I7L.js → connection-card-DjK0GZ2u.js} +1 -1
  51. package/dist/client/assets/{connection-detail-DOeKZy2u.js → connection-detail-BGizcg4Z.js} +1 -1
  52. package/dist/client/assets/{connections-DIPInEqh.js → connections-B3vaIw3-.js} +1 -1
  53. package/dist/client/assets/constants-DQVDVC-J.js +1 -0
  54. package/dist/client/assets/{create-organization-dialog-BCm-rEBq.js → create-organization-dialog-DKwU0dfN.js} +1 -1
  55. package/dist/client/assets/{dialog-DVaRsY11.js → dialog-1B3YWWMu.js} +1 -1
  56. package/dist/client/assets/{dropdown-menu-L8DDYrma.js → dropdown-menu-Hp4qYTud.js} +1 -1
  57. package/dist/client/assets/{dynamic-plugin-layout-BGqw6KSh.js → dynamic-plugin-layout-j2gEmQEr.js} +1 -1
  58. package/dist/client/assets/{empty-state-DSfHkDug.js → empty-state-C7Gr5Tg2.js} +1 -1
  59. package/dist/client/assets/{empty-state-DltMEOY9.js → empty-state-D-JjObLi.js} +1 -1
  60. package/dist/client/assets/{env-vars-editor-OFOnChaG.js → env-vars-editor-D4XTsyk0.js} +1 -1
  61. package/dist/client/assets/{error-boundary-BcexB_yc.js → error-boundary-rr4tK3fB.js} +1 -1
  62. package/dist/client/assets/{extract-connection-data-CdV5tpm8.js → extract-connection-data-37AfzoCx.js} +1 -1
  63. package/dist/client/assets/{file-browser-lBeJR8bC.js → file-browser-BECnO7FM.js} +2 -2
  64. package/dist/client/assets/{form-0xzFj1MQ.js → form-BQupN7IV.js} +1 -1
  65. package/dist/client/assets/{gateway-detail-BjMZrPhA.js → gateway-detail-B1f7bt6s.js} +1 -1
  66. package/dist/client/assets/{gateways-Los1KR32.js → gateways-jpQl136Z.js} +1 -1
  67. package/dist/client/assets/{grid-view-5k-Ei6pR.js → grid-view-BwLKimb0.js} +1 -1
  68. package/dist/client/assets/{home-BPOuMXWN.js → home-9vMYPTYi.js} +1 -1
  69. package/dist/client/assets/{index-sGJO5Tbg.js → index-Bpy9plQL.js} +1 -1
  70. package/dist/client/assets/{index-Wmq2F9D5.js → index-D0CzZUCs.js} +1 -1
  71. package/dist/client/assets/{index-B2ZzxrDd.js → index-DEuqpeVv.js} +2 -2
  72. package/dist/client/assets/index-DVolwMvn.js +107 -0
  73. package/dist/client/assets/index-Dh9ePU0t.css +1 -0
  74. package/dist/client/assets/{index-DYB_vmtw.js → index-u_K3efbu.js} +1 -1
  75. package/dist/client/assets/{infiniteQueryObserver-2ElA8vy3.js → infiniteQueryObserver-BXdaScti.js} +1 -1
  76. package/dist/client/assets/{input-BptR4gs0.js → input-CqqzkfyF.js} +1 -1
  77. package/dist/client/assets/{layout-CuyqJIpj.js → layout-D7T4rJzl.js} +1 -1
  78. package/dist/client/assets/{lazy-highlighter-BsXV5-Cp.js → lazy-highlighter-U-fd28FU.js} +1 -1
  79. package/dist/client/assets/{localstorage-keys-1ChkoQpJ.js → localstorage-keys-kemGZMIp.js} +1 -1
  80. package/dist/client/assets/{login-9aWtH8iv.js → login-AsctHrUh.js} +1 -1
  81. package/dist/client/assets/{mcp-oauth-DlEOJMOg.js → mcp-oauth-DqZqwRXe.js} +1 -1
  82. package/dist/client/assets/{mcp-server-card-QpfLcKhp.js → mcp-server-card-DfoQ5M8z.js} +1 -1
  83. package/dist/client/assets/{mcp-server-detail-C1ZMmcCI.js → mcp-server-detail-GLsULv7B.js} +1 -1
  84. package/dist/client/assets/{members-BivX1Wff.js → members-eia2aN0I.js} +1 -1
  85. package/dist/client/assets/{monaco-editor-eqnLepiA.js → monaco-editor-rl0nEzOU.js} +1 -1
  86. package/dist/client/assets/{monitoring-CsAomsG7.js → monitoring-DWEGkU9y.js} +1 -1
  87. package/dist/client/assets/{oauth-callback-tqvl2JmB.js → oauth-callback-BFr0fBNT.js} +1 -1
  88. package/dist/client/assets/{page-9g38EhhR.js → page-BeG_Zpat.js} +1 -1
  89. package/dist/client/assets/page-GoE2bJQh.js +21 -0
  90. package/dist/client/assets/{pin-to-sidebar-button-SoohzyKD.js → pin-to-sidebar-button-CrzVxc9I.js} +1 -1
  91. package/dist/client/assets/{plugin-empty-state-B7nLCaEJ.js → plugin-empty-state-CvQbqnfg.js} +1 -1
  92. package/dist/client/assets/{plugin-header-Cohl5yJx.js → plugin-header-BaWUIpLx.js} +1 -1
  93. package/dist/client/assets/{plugins-B4XhV1NA.js → plugins-Q7uqmYFh.js} +1 -1
  94. package/dist/client/assets/{popover-DMQ4A4gY.js → popover-BcOo6EXw.js} +1 -1
  95. package/dist/client/assets/{project-context-provider-CwANTiF8.js → project-context-provider-Dn1-l4h2.js} +1 -1
  96. package/dist/client/assets/{registry-utils-CYM7CTQI.js → registry-utils-85b65tFI.js} +1 -1
  97. package/dist/client/assets/{resizable-DPX1GbOQ.js → resizable-DkFmgcsj.js} +1 -1
  98. package/dist/client/assets/{resource-tabs-s8Be9X3Q.js → resource-tabs-DkDSMlFB.js} +1 -1
  99. package/dist/client/assets/{select-ChLkm3Du.js → select-Bv7J3zlQ.js} +1 -1
  100. package/dist/client/assets/{settings-CtF0WgEW.js → settings-BK8QvMDL.js} +1 -1
  101. package/dist/client/assets/shell-layout-DImgzYtx.js +3 -0
  102. package/dist/client/assets/{spinner-CwrVDgbN.js → spinner-D0hdWfev.js} +1 -1
  103. package/dist/client/assets/{switch-CcWa_MNs.js → switch-ugX7u7WU.js} +1 -1
  104. package/dist/client/assets/{textarea-DvOGbg2w.js → textarea-BUrXtpl5.js} +1 -1
  105. package/dist/client/assets/{tool-set-selector-CcjC51rS.js → tool-set-selector-a1uFioE0.js} +1 -1
  106. package/dist/client/assets/{tools-list-CZQCbddf.js → tools-list-DpFBj-bw.js} +1 -1
  107. package/dist/client/assets/{tooltip-BZp1NNfI.js → tooltip-vUrxHIt0.js} +1 -1
  108. package/dist/client/assets/typewriter-title-7_SusDya.js +16 -0
  109. package/dist/client/assets/{use-binding-kpHhQeiR.js → use-binding-B0VMz_Ex.js} +1 -1
  110. package/dist/client/assets/{use-collections-BI8SI9I-.js → use-collections-Cflasxiq.js} +1 -1
  111. package/dist/client/assets/{use-connection-By0HWGmn.js → use-connection-DhRUkVvI.js} +1 -1
  112. package/dist/client/assets/{use-connection-resources-CIndv_xt.js → use-connection-resources-C-wyp48q.js} +1 -1
  113. package/dist/client/assets/{use-create-gateway-DpNvhifN.js → use-create-gateway-DMkdPgfy.js} +1 -1
  114. package/dist/client/assets/{use-gateway-BzFnbg51.js → use-gateway-D5VVN1xE.js} +1 -1
  115. package/dist/client/assets/{use-gateway-system-prompt-DKg33ZMa.js → use-gateway-system-prompt-B3fSaA6r.js} +1 -1
  116. package/dist/client/assets/{use-list-state-cqgmpDXc.js → use-list-state-BYREPRxy.js} +1 -1
  117. package/dist/client/assets/{use-mcp-BY7dWO4N.js → use-mcp-CZeMxRgK.js} +1 -1
  118. package/dist/client/assets/{use-members-DuUTyG85.js → use-members-Bi0eIvBO.js} +1 -1
  119. package/dist/client/assets/{use-mobile-DHVQc88b.js → use-mobile-CI2w7svc.js} +1 -1
  120. package/dist/client/assets/{use-organization-settings-C3rL2iPZ.js → use-organization-settings-D0kNSjbq.js} +1 -1
  121. package/dist/client/assets/{use-tool-call-CuYepGvY.js → use-tool-call-CoI4ZCZe.js} +1 -1
  122. package/dist/client/assets/useInfiniteQuery-ckN_t7ea.js +1 -0
  123. package/dist/client/assets/{useMutation-Lj6qQmhH.js → useMutation-xcmVYLP7.js} +1 -1
  124. package/dist/client/assets/useQuery-BKyLWvSZ.js +1 -0
  125. package/dist/client/assets/{value-Cetx24MZ.js → value-C7rJ457O.js} +1 -1
  126. package/dist/client/assets/{view-mode-toggle-Df6PEFKi.js → view-mode-toggle-CTWk8Dkt.js} +1 -1
  127. package/dist/client/assets/{workflow-DiN6vHw9.js → workflow-ClKgdB2v.js} +1 -1
  128. package/dist/client/index.html +2 -2
  129. package/package.json +1 -1
  130. package/dist/client/assets/MessageChatSquare-Dfdgo-IV.js +0 -1
  131. package/dist/client/assets/constants-CRsABbUy.js +0 -1
  132. package/dist/client/assets/index-CCciYu2S.css +0 -1
  133. package/dist/client/assets/index-LUG2SkNP.js +0 -107
  134. package/dist/client/assets/page-DF7HRrxe.js +0 -35
  135. package/dist/client/assets/shell-layout-CF_ayOPu.js +0 -17
  136. package/dist/client/assets/useInfiniteQuery-Dbym_GhP.js +0 -1
  137. package/dist/client/assets/useQuery-DVzj5fVO.js +0 -1
@@ -1 +1 @@
1
- import{r as c,a5 as T,j as i,a6 as C,a3 as y,aa as I,a8 as M,aF as H,aE as z,c as A}from"./index-B2ZzxrDd.js";import{c as g}from"./button-CJFU-RdP.js";var b="Switch",[U]=T(b),[q,F]=U(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=I({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:M(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=F(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=H(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(s){return s?"checked":"unchecked"}var O=E,$=R;function X(s){const e=A.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx(O,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
1
+ import{r as c,a5 as T,j as i,a6 as C,a3 as y,aa as I,a8 as M,aF as H,aE as z,c as A}from"./index-DEuqpeVv.js";import{c as g}from"./button-DXl1hVqx.js";var b="Switch",[U]=T(b),[q,F]=U(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=I({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:M(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=F(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=H(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(s){return s?"checked":"unchecked"}var O=E,$=R;function X(s){const e=A.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx(O,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
@@ -1 +1 @@
1
- import{c as o,j as n}from"./index-B2ZzxrDd.js";import{c as l}from"./button-CJFU-RdP.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
1
+ import{c as o,j as n}from"./index-DEuqpeVv.js";import{c as l}from"./button-DXl1hVqx.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
@@ -1 +1 @@
1
- import{r as v,c as z,j as t}from"./index-B2ZzxrDd.js";import{I as F}from"./empty-state-DSfHkDug.js";import{C as I}from"./checkbox-D4qUNjlU.js";import{c as T,B as R}from"./button-CJFU-RdP.js";import{i as A}from"./ArrowLeft-CNcRcLHi.js";import{u as U}from"./use-connection-By0HWGmn.js";import{C as V}from"./collection-search-D3Bd0Mm5.js";const q=v.memo(function(S){const e=z.c(21),{connection:o,isSelected:m,hasToolsEnabled:r,activeToolsCount:h,totalToolsCount:p,onSelect:g,onToggle:x}=S,u=m?"bg-accent/50":"hover:bg-muted/50";let i;e[0]!==u?(i=T("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",u),e[0]=u,e[1]=i):i=e[1];let c;e[2]!==o.icon||e[3]!==o.title?(c=t.jsx(F,{icon:o.icon,name:o.title,size:"xs"}),e[2]=o.icon,e[3]=o.title,e[4]=c):c=e[4];let f;e[5]!==o.title?(f=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.title})}),e[5]=o.title,e[6]=f):f=e[6];let n;e[7]!==g||e[8]!==c||e[9]!==f?(n=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[c,f]}),e[7]=g,e[8]=c,e[9]=f,e[10]=n):n=e[10];let a;e[11]!==h||e[12]!==o.tools||e[13]!==r||e[14]!==x||e[15]!==p?(a=o.tools&&o.tools.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[h,"/",p]}),t.jsx(I,{checked:r,onCheckedChange:x,onClick:H})]}),e[11]=h,e[12]=o.tools,e[13]=r,e[14]=x,e[15]=p,e[16]=a):a=e[16];let N;return e[17]!==i||e[18]!==n||e[19]!==a?(N=t.jsxs("div",{className:i,children:[n,a]}),e[17]=i,e[18]=n,e[19]=a,e[20]=N):N=e[20],N}),G=v.memo(function(S){const e=z.c(18),{connectionId:o,tool:m,isSelected:r,onToggle:h}=S,p=`tool-${o}-${m.name}`,g=r?"text-foreground":"text-muted-foreground";let x;e[0]!==g?(x=T("text-sm font-medium",g),e[0]=g,e[1]=x):x=e[1];let u;e[2]!==x||e[3]!==m.name?(u=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:x,children:m.name})}),e[2]=x,e[3]=m.name,e[4]=u):u=e[4];let i;e[5]!==m.description?(i=m.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:m.description}),e[5]=m.description,e[6]=i):i=e[6];let c;e[7]!==u||e[8]!==i?(c=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,i]}),e[7]=u,e[8]=i,e[9]=c):c=e[9];const f=`tool-${o}-${m.name}`;let n;e[10]!==r||e[11]!==h||e[12]!==f?(n=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(I,{id:f,checked:r,onCheckedChange:h,onClick:J})}),e[10]=r,e[11]=h,e[12]=f,e[13]=n):n=e[13];let a;return e[14]!==p||e[15]!==c||e[16]!==n?(a=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:p,children:[c,n]}),e[14]=p,e[15]=c,e[16]=n,e[17]=a):a=e[17],a});function ee({toolSet:d,onToolSetChange:S}){const[e,o]=v.useState(""),m=v.useDeferredValue(e),[r,h]=v.useState("all"),[p,g]=v.useState(!1),x=v.useRef(new Set(Object.keys(d))),u=U({searchTerm:m.trim()||void 0}),i=x.current,c=[...i.values()].map(s=>u.find(l=>l.id===s)).filter(s=>s!==void 0),f=u.filter(s=>!i.has(s.id)),n=[...c,...f],a=s=>{const l=d[s];return l!==void 0&&l.length>0},N=n.filter(s=>{if(r==="all")return!0;const l=a(s.id);return r==="selected"?l:r==="unselected"?!l:!0}),[M,$]=v.useState(n[0]?.id??null),b=M?n.find(s=>s.id===M)??null:null,E=b?.tools??[],B=(s,l)=>d[s]?.includes(l)??!1,D=(s,l)=>{const j=d[s]??[],k=j.includes(l),w={...d};if(k){const y=j.filter(C=>C!==l);y.length===0?delete w[s]:w[s]=y}else w[s]=[...j,l];S(w)},O=s=>{const l=n.find(C=>C.id===s);if(!l?.tools)return;const j=d[s]??[],k=l.tools.map(C=>C.name),w=j.length>0&&k.every(C=>j.includes(C)),y={...d};w?delete y[s]:(y[s]=k,$(s)),S(y)},P=s=>{$(s),g(!0)},Q=()=>{g(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:T("w-full md:w-80 border-r border-border flex flex-col",p&&"hidden md:flex"),children:[t.jsx(V,{value:e,onChange:o,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>h("all"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>h("selected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>h("unselected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:N.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:e?"No connections found":r==="selected"?"No servers selected":r==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:N.map(s=>{const l=s.tools?.length??0,j=d[s.id]?.length??0;return t.jsx(q,{connection:s,isSelected:M===s.id,hasToolsEnabled:a(s.id),activeToolsCount:j,totalToolsCount:l,onSelect:()=>P(s.id),onToggle:()=>O(s.id)},s.id)})})})]}),t.jsx("div",{className:T("flex-1 flex-col",p?"flex":"hidden md:flex"),children:b?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(R,{variant:"ghost",size:"sm",onClick:Q,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(A,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(F,{icon:b.icon,name:b.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.title}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:E.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):t.jsx("div",{className:"space-y-2",children:E.map(s=>t.jsx(G,{connectionId:b.id,tool:s,isSelected:B(b.id,s.name),onToggle:()=>D(b.id,s.name)},s.name))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function H(d){return d.stopPropagation()}function J(d){return d.stopPropagation()}export{ee as T};
1
+ import{r as v,c as z,j as t}from"./index-DEuqpeVv.js";import{I as F}from"./empty-state-C7Gr5Tg2.js";import{C as I}from"./checkbox-D1tHbcIN.js";import{c as T,B as R}from"./button-DXl1hVqx.js";import{i as A}from"./ArrowLeft-DlLOWSTj.js";import{u as U}from"./use-connection-DhRUkVvI.js";import{C as V}from"./collection-search-pUdl1eNx.js";const q=v.memo(function(S){const e=z.c(21),{connection:o,isSelected:m,hasToolsEnabled:r,activeToolsCount:h,totalToolsCount:p,onSelect:g,onToggle:x}=S,u=m?"bg-accent/50":"hover:bg-muted/50";let i;e[0]!==u?(i=T("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",u),e[0]=u,e[1]=i):i=e[1];let c;e[2]!==o.icon||e[3]!==o.title?(c=t.jsx(F,{icon:o.icon,name:o.title,size:"xs"}),e[2]=o.icon,e[3]=o.title,e[4]=c):c=e[4];let f;e[5]!==o.title?(f=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.title})}),e[5]=o.title,e[6]=f):f=e[6];let n;e[7]!==g||e[8]!==c||e[9]!==f?(n=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[c,f]}),e[7]=g,e[8]=c,e[9]=f,e[10]=n):n=e[10];let a;e[11]!==h||e[12]!==o.tools||e[13]!==r||e[14]!==x||e[15]!==p?(a=o.tools&&o.tools.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[h,"/",p]}),t.jsx(I,{checked:r,onCheckedChange:x,onClick:H})]}),e[11]=h,e[12]=o.tools,e[13]=r,e[14]=x,e[15]=p,e[16]=a):a=e[16];let N;return e[17]!==i||e[18]!==n||e[19]!==a?(N=t.jsxs("div",{className:i,children:[n,a]}),e[17]=i,e[18]=n,e[19]=a,e[20]=N):N=e[20],N}),G=v.memo(function(S){const e=z.c(18),{connectionId:o,tool:m,isSelected:r,onToggle:h}=S,p=`tool-${o}-${m.name}`,g=r?"text-foreground":"text-muted-foreground";let x;e[0]!==g?(x=T("text-sm font-medium",g),e[0]=g,e[1]=x):x=e[1];let u;e[2]!==x||e[3]!==m.name?(u=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:x,children:m.name})}),e[2]=x,e[3]=m.name,e[4]=u):u=e[4];let i;e[5]!==m.description?(i=m.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:m.description}),e[5]=m.description,e[6]=i):i=e[6];let c;e[7]!==u||e[8]!==i?(c=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,i]}),e[7]=u,e[8]=i,e[9]=c):c=e[9];const f=`tool-${o}-${m.name}`;let n;e[10]!==r||e[11]!==h||e[12]!==f?(n=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(I,{id:f,checked:r,onCheckedChange:h,onClick:J})}),e[10]=r,e[11]=h,e[12]=f,e[13]=n):n=e[13];let a;return e[14]!==p||e[15]!==c||e[16]!==n?(a=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:p,children:[c,n]}),e[14]=p,e[15]=c,e[16]=n,e[17]=a):a=e[17],a});function ee({toolSet:d,onToolSetChange:S}){const[e,o]=v.useState(""),m=v.useDeferredValue(e),[r,h]=v.useState("all"),[p,g]=v.useState(!1),x=v.useRef(new Set(Object.keys(d))),u=U({searchTerm:m.trim()||void 0}),i=x.current,c=[...i.values()].map(s=>u.find(l=>l.id===s)).filter(s=>s!==void 0),f=u.filter(s=>!i.has(s.id)),n=[...c,...f],a=s=>{const l=d[s];return l!==void 0&&l.length>0},N=n.filter(s=>{if(r==="all")return!0;const l=a(s.id);return r==="selected"?l:r==="unselected"?!l:!0}),[M,$]=v.useState(n[0]?.id??null),b=M?n.find(s=>s.id===M)??null:null,E=b?.tools??[],B=(s,l)=>d[s]?.includes(l)??!1,D=(s,l)=>{const j=d[s]??[],k=j.includes(l),w={...d};if(k){const y=j.filter(C=>C!==l);y.length===0?delete w[s]:w[s]=y}else w[s]=[...j,l];S(w)},O=s=>{const l=n.find(C=>C.id===s);if(!l?.tools)return;const j=d[s]??[],k=l.tools.map(C=>C.name),w=j.length>0&&k.every(C=>j.includes(C)),y={...d};w?delete y[s]:(y[s]=k,$(s)),S(y)},P=s=>{$(s),g(!0)},Q=()=>{g(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:T("w-full md:w-80 border-r border-border flex flex-col",p&&"hidden md:flex"),children:[t.jsx(V,{value:e,onChange:o,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>h("all"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>h("selected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>h("unselected"),className:T("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",r==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:N.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:e?"No connections found":r==="selected"?"No servers selected":r==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:N.map(s=>{const l=s.tools?.length??0,j=d[s.id]?.length??0;return t.jsx(q,{connection:s,isSelected:M===s.id,hasToolsEnabled:a(s.id),activeToolsCount:j,totalToolsCount:l,onSelect:()=>P(s.id),onToggle:()=>O(s.id)},s.id)})})})]}),t.jsx("div",{className:T("flex-1 flex-col",p?"flex":"hidden md:flex"),children:b?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(R,{variant:"ghost",size:"sm",onClick:Q,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(A,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(F,{icon:b.icon,name:b.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.title}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:b.description})]})]})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:E.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):t.jsx("div",{className:"space-y-2",children:E.map(s=>t.jsx(G,{connectionId:b.id,tool:s,isSelected:B(b.id,s.name),onToggle:()=>D(b.id,s.name)},s.name))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function H(d){return d.stopPropagation()}function J(d){return d.stopPropagation()}export{ee as T};
@@ -1 +1 @@
1
- import{K as B,j as t,c as O,f as Q,r as k}from"./index-B2ZzxrDd.js";import{u as U}from"./useQuery-DVzj5fVO.js";import{i as W}from"./File06-DvtIjhz0.js";import{i as Y}from"./Loading01-ByRd3GAn.js";import{e as J}from"./github-icon-Dp3wHhYE.js";import{C as P}from"./collection-display-button-DWT4ZvIF.js";import{C as X}from"./collection-search-D3Bd0Mm5.js";import{C as Z}from"./collection-table-wrapper-DToPOpkG.js";import{E as z,I as ee}from"./empty-state-DSfHkDug.js";import{C as te}from"./card-BARP50i4.js";import{V as se}from"./layout-CuyqJIpj.js";function oe(s){return s.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function re(s){return s.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,i)=>i.includes("target=")?e.replace(/target="[^"]*"/gi,'target="_blank"'):`<a ${i} target="_blank" rel="noopener noreferrer">`)}function ne(s){let e=oe(s);return e=re(e),e}function we({repository:s}){const e=s?J(s):null,{data:i,isLoading:c}=U({queryKey:B.githubReadme(e?.owner,e?.repo),queryFn:async()=>{if(!e)return null;try{const l=await fetch(`https://api.github.com/repos/${e.owner}/${e.repo}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!l.ok){if(l.status===404)return null;throw new Error(`Failed to fetch README: ${l.statusText}`)}const m=await l.text();return ne(m)}catch(l){return console.error("Error fetching README:",l),null}},enabled:!!e&&!!s,staleTime:3600*1e3,gcTime:1440*60*1e3});return c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}):i?t.jsx("div",{className:"p-5 markdown-body",style:{backgroundColor:"transparent"},dangerouslySetInnerHTML:{__html:i}}):t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(W,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]})}function ve(s){const e=O.c(39),{tools:i,connectionId:c,org:l,onToolClick:m,showToolbar:L,emptyMessage:M}=s,D=L===void 0?!0:L,j=M===void 0?"This connection doesn't have any tools yet.":M,I=Q(),[n,$]=k.useState(""),[d,H]=k.useState("table"),[r,A]=k.useState("name"),[a,_]=k.useState("asc");let y;e[0]!==a||e[1]!==r?(y=o=>{r===o?(_(me),a==="desc"&&A(void 0)):(A(o),_("asc"))},e[0]=a,e[1]=r,e[2]=y):y=e[2];const u=y;let N;e[3]!==c||e[4]!==I||e[5]!==m||e[6]!==l?(N=o=>{m?m(o):c&&l&&I({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:c,collectionName:"tools",itemId:encodeURIComponent(o.name)}})},e[3]=c,e[4]=I,e[5]=m,e[6]=l,e[7]=N):N=e[7];const w=N;let v;if(e[8]!==n||e[9]!==a||e[10]!==r||e[11]!==i){const o=!i||i.length===0?[]:n.trim()?(()=>{const R=n.toLowerCase();return i.filter(b=>b.name.toLowerCase().includes(R)||b.description&&b.description.toLowerCase().includes(R))})():i;v=!r||!a?o:[...o].sort((R,b)=>{const q=R[r]||"",G=b[r]||"",K=String(q).localeCompare(String(G));return a==="asc"?K:-K}),e[8]=n,e[9]=a,e[10]=r,e[11]=i,e[12]=v}else v=e[12];const g=v;let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=[{id:"name",header:"Name",render:ce,sortable:!0},{id:"description",header:"Description",render:le,cellClassName:"flex-1",sortable:!0}],e[13]=C):C=e[13];const V=C;let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=V.filter(ie).map(ae),e[14]=S):S=e[14];const F=S;let f;e[15]!==u||e[16]!==D||e[17]!==a||e[18]!==r||e[19]!==d?(f=D&&t.jsx(se,{children:t.jsx(P,{viewMode:d,onViewModeChange:H,sortKey:r,sortDirection:a,onSort:u,sortOptions:F})}),e[15]=u,e[16]=D,e[17]=a,e[18]=r,e[19]=d,e[20]=f):f=e[20];let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=o=>{o.key==="Escape"&&($(""),o.target.blur())},e[21]=E):E=e[21];let p;e[22]!==n?(p=t.jsx(X,{value:n,onChange:$,placeholder:"Search tools...",onKeyDown:E}),e[22]=n,e[23]=p):p=e[23];let h;e[24]!==j||e[25]!==u||e[26]!==w||e[27]!==n||e[28]!==a||e[29]!==r||e[30]!==g||e[31]!==d?(h=d==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:g.length===0?t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:g.map(o=>t.jsx(te,{className:"cursor-pointer transition-colors",onClick:()=>w(o),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(ee,{icon:null,name:o.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:o.description||"No description"})]})]})},o.name))})}):t.jsx(Z,{columns:V,data:g,isLoading:!1,sortKey:r,sortDirection:a,onSort:u,onRowClick:o=>w(o),emptyState:t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j})}),e[24]=j,e[25]=u,e[26]=w,e[27]=n,e[28]=a,e[29]=r,e[30]=g,e[31]=d,e[32]=h):h=e[32];let x;e[33]!==p||e[34]!==h?(x=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[p,h]}),e[33]=p,e[34]=h,e[35]=x):x=e[35];let T;return e[36]!==x||e[37]!==f?(T=t.jsxs(t.Fragment,{children:[f,x]}),e[36]=x,e[37]=f,e[38]=T):T=e[38],T}function ae(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function ie(s){return s.sortable}function le(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function ce(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function me(s){return s==="asc"?"desc":s==="desc"?null:"asc"}export{we as R,ve as T};
1
+ import{K as B,j as t,c as O,f as Q,r as k}from"./index-DEuqpeVv.js";import{u as U}from"./useQuery-BKyLWvSZ.js";import{i as W}from"./File06-BiIPMtEV.js";import{i as Y}from"./Loading01-JwelopeC.js";import{e as J}from"./github-icon-Dp3wHhYE.js";import{C as P}from"./collection-display-button-B_KC-ent.js";import{C as X}from"./collection-search-pUdl1eNx.js";import{C as Z}from"./collection-table-wrapper-wARoPZXo.js";import{E as z,I as ee}from"./empty-state-C7Gr5Tg2.js";import{C as te}from"./card-D0GcpRPY.js";import{V as se}from"./layout-D7T4rJzl.js";function oe(s){return s.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function re(s){return s.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,i)=>i.includes("target=")?e.replace(/target="[^"]*"/gi,'target="_blank"'):`<a ${i} target="_blank" rel="noopener noreferrer">`)}function ne(s){let e=oe(s);return e=re(e),e}function we({repository:s}){const e=s?J(s):null,{data:i,isLoading:c}=U({queryKey:B.githubReadme(e?.owner,e?.repo),queryFn:async()=>{if(!e)return null;try{const l=await fetch(`https://api.github.com/repos/${e.owner}/${e.repo}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!l.ok){if(l.status===404)return null;throw new Error(`Failed to fetch README: ${l.statusText}`)}const m=await l.text();return ne(m)}catch(l){return console.error("Error fetching README:",l),null}},enabled:!!e&&!!s,staleTime:3600*1e3,gcTime:1440*60*1e3});return c?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}):i?t.jsx("div",{className:"p-5 markdown-body",style:{backgroundColor:"transparent"},dangerouslySetInnerHTML:{__html:i}}):t.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[t.jsx(W,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),t.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]})}function ve(s){const e=O.c(39),{tools:i,connectionId:c,org:l,onToolClick:m,showToolbar:L,emptyMessage:M}=s,D=L===void 0?!0:L,j=M===void 0?"This connection doesn't have any tools yet.":M,I=Q(),[n,$]=k.useState(""),[d,H]=k.useState("table"),[r,A]=k.useState("name"),[a,_]=k.useState("asc");let y;e[0]!==a||e[1]!==r?(y=o=>{r===o?(_(me),a==="desc"&&A(void 0)):(A(o),_("asc"))},e[0]=a,e[1]=r,e[2]=y):y=e[2];const u=y;let N;e[3]!==c||e[4]!==I||e[5]!==m||e[6]!==l?(N=o=>{m?m(o):c&&l&&I({to:"/$org/mcps/$connectionId/$collectionName/$itemId",params:{org:l,connectionId:c,collectionName:"tools",itemId:encodeURIComponent(o.name)}})},e[3]=c,e[4]=I,e[5]=m,e[6]=l,e[7]=N):N=e[7];const w=N;let v;if(e[8]!==n||e[9]!==a||e[10]!==r||e[11]!==i){const o=!i||i.length===0?[]:n.trim()?(()=>{const R=n.toLowerCase();return i.filter(b=>b.name.toLowerCase().includes(R)||b.description&&b.description.toLowerCase().includes(R))})():i;v=!r||!a?o:[...o].sort((R,b)=>{const q=R[r]||"",G=b[r]||"",K=String(q).localeCompare(String(G));return a==="asc"?K:-K}),e[8]=n,e[9]=a,e[10]=r,e[11]=i,e[12]=v}else v=e[12];const g=v;let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=[{id:"name",header:"Name",render:ce,sortable:!0},{id:"description",header:"Description",render:le,cellClassName:"flex-1",sortable:!0}],e[13]=C):C=e[13];const V=C;let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=V.filter(ie).map(ae),e[14]=S):S=e[14];const F=S;let f;e[15]!==u||e[16]!==D||e[17]!==a||e[18]!==r||e[19]!==d?(f=D&&t.jsx(se,{children:t.jsx(P,{viewMode:d,onViewModeChange:H,sortKey:r,sortDirection:a,onSort:u,sortOptions:F})}),e[15]=u,e[16]=D,e[17]=a,e[18]=r,e[19]=d,e[20]=f):f=e[20];let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=o=>{o.key==="Escape"&&($(""),o.target.blur())},e[21]=E):E=e[21];let p;e[22]!==n?(p=t.jsx(X,{value:n,onChange:$,placeholder:"Search tools...",onKeyDown:E}),e[22]=n,e[23]=p):p=e[23];let h;e[24]!==j||e[25]!==u||e[26]!==w||e[27]!==n||e[28]!==a||e[29]!==r||e[30]!==g||e[31]!==d?(h=d==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:g.length===0?t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:g.map(o=>t.jsx(te,{className:"cursor-pointer transition-colors",onClick:()=>w(o),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(ee,{icon:null,name:o.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:o.description||"No description"})]})]})},o.name))})}):t.jsx(Z,{columns:V,data:g,isLoading:!1,sortKey:r,sortDirection:a,onSort:u,onRowClick:o=>w(o),emptyState:t.jsx(z,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":j})}),e[24]=j,e[25]=u,e[26]=w,e[27]=n,e[28]=a,e[29]=r,e[30]=g,e[31]=d,e[32]=h):h=e[32];let x;e[33]!==p||e[34]!==h?(x=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[p,h]}),e[33]=p,e[34]=h,e[35]=x):x=e[35];let T;return e[36]!==x||e[37]!==f?(T=t.jsxs(t.Fragment,{children:[f,x]}),e[36]=x,e[37]=f,e[38]=T):T=e[38],T}function ae(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function ie(s){return s.sortable}function le(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function ce(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function me(s){return s==="asc"?"desc":s==="desc"?null:"asc"}export{we as R,ve as T};
@@ -1 +1 @@
1
- import{r as a,j as c,a6 as S,a5 as J,a7 as H,al as Q,aj as $,an as Z,ao as ee,bu as te,a3 as G,as as oe,aa as re,am as ne,ak as se,a8 as C,ap as ae,c as j}from"./index-B2ZzxrDd.js";import{c as ie}from"./button-CJFU-RdP.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=J("Tooltip",[$]),D=$(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=oe(),f=a.useRef(0),h=l??i.disableHoverableContent,m=d??i.delayDuration,g=a.useRef(!1),[y,T]=re({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(ne,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",B=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=G(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(se,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx(H,{present:t||s.open,children:c.jsx(Q,{asChild:!0,container:n,children:r})})})};U.displayName=N;var b="TooltipContent",q=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx(H,{present:r||l.open,children:l.disableHoverableContent?c.jsx(W,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=G(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,m)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},T=ye(y,g.getBoundingClientRect()),w=Ce(y,T),E=be(m.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),m=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",m),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",m)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=i?.contains(g)||u?.contains(g),w=!we(y,l);T?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(W,{...o,ref:s})}),[ge,me]=O(R,{isInside:!1}),Te=te("TooltipContent"),W=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(ee,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Te,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=b;var X="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return me(X,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=X;function ye(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=B,Oe=U,De=q,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Se(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Se as T,le as V,Ae as a,Me as b,Ie as c};
1
+ import{r as a,j as c,a6 as S,a5 as J,aj as H,as as Q,aa as Z,am as ee,a3 as $,ak as te,a8 as C,a7 as G,al as oe,an as re,ao as ne,bw as se,ap as ae,c as j}from"./index-DEuqpeVv.js";import{c as ie}from"./button-DXl1hVqx.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(S.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=J("Tooltip",[H]),D=H(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=Q(),f=a.useRef(0),h=l??i.disableHoverableContent,m=d??i.delayDuration,g=a.useRef(!1),[y,T]=Z({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(M)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(ee,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",B=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=$(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(te,{asChild:!0,...l,children:c.jsx(S.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx(G,{present:t||s.open,children:c.jsx(oe,{asChild:!0,container:n,children:r})})})};U.displayName=N;var b="TooltipContent",q=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx(G,{present:r||l.open,children:l.disableHoverableContent?c.jsx(W,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=$(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,m)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},T=ye(y,g.getBoundingClientRect()),w=Ce(y,T),E=be(m.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),m=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",m),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",m)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=i?.contains(g)||u?.contains(g),w=!we(y,l);T?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(W,{...o,ref:s})}),[ge,me]=O(R,{isInside:!1}),Te=se("TooltipContent"),W=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(ne,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Te,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=b;var X="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return me(X,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=X;function ye(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=B,Oe=U,De=q,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Se(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Se as T,le as V,Ae as a,Me as b,Ie as c};
@@ -0,0 +1,16 @@
1
+ import{r as d,c as V,j as v}from"./index-DEuqpeVv.js";import{c as j}from"./button-DXl1hVqx.js";const b=({size:a=24,color:e="currentColor",...t})=>d.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},d.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));b.displayName="MessageChatSquare";function L(a){const e=V.c(22),{text:t,className:C,speed:k}=a,h=C===void 0?"":C,E=k===void 0?30:k,[N,g]=d.useState(!1),s=t.length/E*1e3,w=t.length,f=`${t.length}ch`;let o;e[0]!==s?(o=()=>{g(!1);const T=setTimeout(()=>{g(!0)},s);return()=>clearTimeout(T)},e[0]=s,e[1]=o):o=e[1];let c;e[2]!==s||e[3]!==t?(c=[t,s],e[2]=s,e[3]=t,e[4]=c):c=e[4],d.useEffect(o,c);let n;e[5]!==h?(n=j(h,"block overflow-hidden"),e[5]=h,e[6]=n):n=e[6];const u=`${s}ms`;let l;e[7]!==f||e[8]!==w||e[9]!==u?(l={"--typewriter-duration":u,"--typewriter-steps":w,"--typewriter-max-width":f},e[7]=f,e[8]=w,e[9]=u,e[10]=l):l=e[10];const y=l,x=N&&"truncate";let r;e[11]!==x?(r=j("typewriter-text",x),e[11]=x,e[12]=r):r=e[12];let i;e[13]!==r||e[14]!==t?(i=v.jsx("span",{className:r,children:t}),e[13]=r,e[14]=t,e[15]=i):i=e[15];let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=v.jsx("style",{children:`
2
+ .typewriter-text {
3
+ display: inline-block;
4
+ width: 0;
5
+ max-width: 100%;
6
+ overflow: hidden;
7
+ white-space: nowrap;
8
+ animation: typewriter var(--typewriter-duration) steps(var(--typewriter-steps)) forwards;
9
+ }
10
+
11
+ @keyframes typewriter {
12
+ to {
13
+ width: min(var(--typewriter-max-width), 100%);
14
+ }
15
+ }
16
+ `}),e[16]=m):m=e[16];let p;return e[17]!==i||e[18]!==n||e[19]!==y||e[20]!==t?(p=v.jsxs("span",{className:n,style:y,children:[i,m]},t),e[17]=i,e[18]=n,e[19]=y,e[20]=t,e[21]=p):p=e[21],p}export{L as T,b as t};
@@ -1,4 +1,4 @@
1
- import{c as v}from"./binder-nBmgAoSK.js";import{bn as T,bm as O,y as t,z as e,J as p,I as c,bo as l,bp as R,_ as x,bq as U,aP as i,aK as u,L as g,aQ as n,aN as L,aG as b,aO as B,br as C}from"./index-B2ZzxrDd.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),gateway_id:e().describe("Gateway ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),c(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),J=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),$=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),H=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),V=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:c(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:V.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:c(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:c(u([E,k,$,z,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:c(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ne=t({content:c(u([q,J,K,H,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:R({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:U().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
1
+ import{c as v}from"./binder-iKe3ndXq.js";import{bp as T,bo as O,y as t,z as e,J as p,I as c,bq as l,br as R,_ as x,bs as U,aP as i,aK as u,L as g,aQ as n,aN as L,aG as b,aO as B,bt as C}from"./index-DEuqpeVv.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),gateway_id:e().describe("Gateway ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),c(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),J=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),$=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),H=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),V=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:c(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:V.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:c(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:c(u([E,k,$,z,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:c(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ne=t({content:c(u([q,J,K,H,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:R({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:U().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
2
2
  The input is the resolved value of the references in the input field. Example:
3
3
  {
4
4
  "input": {
@@ -1 +1 @@
1
- import{c as x,K as F,v as U,x as b,t as v}from"./index-B2ZzxrDd.js";import{u as w}from"./useMutation-Lj6qQmhH.js";import{u as I}from"./project-context-provider-CwANTiF8.js";function A(n,s,i){const t=[];if(n?.trim()){const e=n.trim(),r=i.map(o=>({field:[String(o)],operator:"contains",value:e}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const e of s)t.push({field:[e.column],operator:"eq",value:e.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(n,s,i){const t=n??i,e=s??"asc";return[{field:[String(t)],direction:e}]}function J(n,s,i,t){const e=x.c(14),{org:r}=I();let o;e[0]!==s?(o=s.toUpperCase(),e[0]=s,e[1]=o):o=e[1];const E=`COLLECTION_${o}_GET`;let a;e[2]!==s||e[3]!==i||e[4]!==r.slug||e[5]!==n?(a=F.collectionItem(r.slug,n,s,i??""),e[2]=s,e[3]=i,e[4]=r.slug,e[5]=n,e[6]=a):a=e[6];let c;e[7]!==E||e[8]!==i||e[9]!==t?(c=async()=>i?await t(E,{id:i}):{item:null},e[7]=E,e[8]=i,e[9]=t,e[10]=c):c=e[10];let u;e[11]!==a||e[12]!==c?(u={queryKey:a,queryFn:c,staleTime:6e4},e[11]=a,e[12]=c,e[13]=u):u=e[13];const{data:l}=U(u);return l.item}function K(n,s,i,t){const e=x.c(11),r=t===void 0?{}:t,{org:o}=I(),{searchTerm:L,filters:E,sortKey:a,sortDirection:c,searchFields:u,defaultSortKey:l,pageSize:_}=r,O=u===void 0?["title","description"]:u,S=l===void 0?"updated_at":l,p=_===void 0?100:_;let y;e[0]!==s?(y=s.toUpperCase(),e[0]=s,e[1]=y):y=e[1];const g=`COLLECTION_${y}_LIST`,f=A(L,E,O),m=D(a,c,S),$=JSON.stringify({where:f,orderBy:m,limit:p}),T=F.collectionList(o.slug,n,s,$);let d;e[2]!==g||e[3]!==m||e[4]!==p||e[5]!==i||e[6]!==f?(d=async()=>{const Q={...f&&{where:f},...m&&{orderBy:m},limit:p,offset:0};return(await i(g,Q))?.items??[]},e[2]=g,e[3]=m,e[4]=p,e[5]=i,e[6]=f,e[7]=d):d=e[7];let h;e[8]!==T||e[9]!==d?(h={queryKey:T,queryFn:d},e[8]=T,e[9]=d,e[10]=h):h=e[10];const{data:C}=U(h);return C}function M(n,s,i){const t=x.c(39),{org:e}=I(),r=b();let o;t[0]!==s?(o=s.toUpperCase(),t[0]=s,t[1]=o):o=t[1];const L=o,E=`COLLECTION_${L}_CREATE`,a=`COLLECTION_${L}_UPDATE`,c=`COLLECTION_${L}_DELETE`;let u;t[2]!==E||t[3]!==i?(u=async d=>(await i(E,{data:d})).item,t[2]=E,t[3]=i,t[4]=u):u=t[4];let l;t[5]!==s||t[6]!==e||t[7]!==r||t[8]!==n?(l=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item created successfully")},t[5]=s,t[6]=e,t[7]=r,t[8]=n,t[9]=l):l=t[9];let _;t[10]!==u||t[11]!==l?(_={mutationFn:u,onSuccess:l,onError:P},t[10]=u,t[11]=l,t[12]=_):_=t[12];const O=w(_);let S;t[13]!==i||t[14]!==a?(S=async d=>{const{id:h,data:C}=d;return(await i(a,{id:h,data:C})).item},t[13]=i,t[14]=a,t[15]=S):S=t[15];let p;t[16]!==s||t[17]!==e||t[18]!==r||t[19]!==n?(p=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item updated successfully")},t[16]=s,t[17]=e,t[18]=r,t[19]=n,t[20]=p):p=t[20];let y;t[21]!==S||t[22]!==p?(y={mutationFn:S,onSuccess:p,onError:B},t[21]=S,t[22]=p,t[23]=y):y=t[23];const q=w(y);let g;t[24]!==c||t[25]!==i?(g=async d=>(await i(c,{id:d})).item.id,t[24]=c,t[25]=i,t[26]=g):g=t[26];let f;t[27]!==s||t[28]!==e||t[29]!==r||t[30]!==n?(f=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item deleted successfully")},t[27]=s,t[28]=e,t[29]=r,t[30]=n,t[31]=f):f=t[31];let m;t[32]!==g||t[33]!==f?(m={mutationFn:g,onSuccess:f,onError:z},t[32]=g,t[33]=f,t[34]=m):m=t[34];const $=w(m);let T;return t[35]!==O||t[36]!==$||t[37]!==q?(T={create:O,update:q,delete:$},t[35]=O,t[36]=$,t[37]=q,t[38]=T):T=t[38],T}function z(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to delete item: ${s}`)}function B(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to update item: ${s}`)}function P(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to create item: ${s}`)}export{M as a,K as b,J as u};
1
+ import{c as x,K as F,v as U,x as b,t as v}from"./index-DEuqpeVv.js";import{u as w}from"./useMutation-xcmVYLP7.js";import{u as I}from"./project-context-provider-Dn1-l4h2.js";function A(n,s,i){const t=[];if(n?.trim()){const e=n.trim(),r=i.map(o=>({field:[String(o)],operator:"contains",value:e}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(s&&s.length>0)for(const e of s)t.push({field:[e.column],operator:"eq",value:e.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(n,s,i){const t=n??i,e=s??"asc";return[{field:[String(t)],direction:e}]}function J(n,s,i,t){const e=x.c(14),{org:r}=I();let o;e[0]!==s?(o=s.toUpperCase(),e[0]=s,e[1]=o):o=e[1];const E=`COLLECTION_${o}_GET`;let a;e[2]!==s||e[3]!==i||e[4]!==r.slug||e[5]!==n?(a=F.collectionItem(r.slug,n,s,i??""),e[2]=s,e[3]=i,e[4]=r.slug,e[5]=n,e[6]=a):a=e[6];let c;e[7]!==E||e[8]!==i||e[9]!==t?(c=async()=>i?await t(E,{id:i}):{item:null},e[7]=E,e[8]=i,e[9]=t,e[10]=c):c=e[10];let u;e[11]!==a||e[12]!==c?(u={queryKey:a,queryFn:c,staleTime:6e4},e[11]=a,e[12]=c,e[13]=u):u=e[13];const{data:l}=U(u);return l.item}function K(n,s,i,t){const e=x.c(11),r=t===void 0?{}:t,{org:o}=I(),{searchTerm:L,filters:E,sortKey:a,sortDirection:c,searchFields:u,defaultSortKey:l,pageSize:_}=r,O=u===void 0?["title","description"]:u,S=l===void 0?"updated_at":l,p=_===void 0?100:_;let y;e[0]!==s?(y=s.toUpperCase(),e[0]=s,e[1]=y):y=e[1];const g=`COLLECTION_${y}_LIST`,f=A(L,E,O),m=D(a,c,S),$=JSON.stringify({where:f,orderBy:m,limit:p}),T=F.collectionList(o.slug,n,s,$);let d;e[2]!==g||e[3]!==m||e[4]!==p||e[5]!==i||e[6]!==f?(d=async()=>{const Q={...f&&{where:f},...m&&{orderBy:m},limit:p,offset:0};return(await i(g,Q))?.items??[]},e[2]=g,e[3]=m,e[4]=p,e[5]=i,e[6]=f,e[7]=d):d=e[7];let h;e[8]!==T||e[9]!==d?(h={queryKey:T,queryFn:d},e[8]=T,e[9]=d,e[10]=h):h=e[10];const{data:C}=U(h);return C}function M(n,s,i){const t=x.c(39),{org:e}=I(),r=b();let o;t[0]!==s?(o=s.toUpperCase(),t[0]=s,t[1]=o):o=t[1];const L=o,E=`COLLECTION_${L}_CREATE`,a=`COLLECTION_${L}_UPDATE`,c=`COLLECTION_${L}_DELETE`;let u;t[2]!==E||t[3]!==i?(u=async d=>(await i(E,{data:d})).item,t[2]=E,t[3]=i,t[4]=u):u=t[4];let l;t[5]!==s||t[6]!==e||t[7]!==r||t[8]!==n?(l=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item created successfully")},t[5]=s,t[6]=e,t[7]=r,t[8]=n,t[9]=l):l=t[9];let _;t[10]!==u||t[11]!==l?(_={mutationFn:u,onSuccess:l,onError:P},t[10]=u,t[11]=l,t[12]=_):_=t[12];const O=w(_);let S;t[13]!==i||t[14]!==a?(S=async d=>{const{id:h,data:C}=d;return(await i(a,{id:h,data:C})).item},t[13]=i,t[14]=a,t[15]=S):S=t[15];let p;t[16]!==s||t[17]!==e||t[18]!==r||t[19]!==n?(p=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item updated successfully")},t[16]=s,t[17]=e,t[18]=r,t[19]=n,t[20]=p):p=t[20];let y;t[21]!==S||t[22]!==p?(y={mutationFn:S,onSuccess:p,onError:B},t[21]=S,t[22]=p,t[23]=y):y=t[23];const q=w(y);let g;t[24]!==c||t[25]!==i?(g=async d=>(await i(c,{id:d})).item.id,t[24]=c,t[25]=i,t[26]=g):g=t[26];let f;t[27]!==s||t[28]!==e||t[29]!==r||t[30]!==n?(f=()=>{r.invalidateQueries({queryKey:F.collection(e.slug,n,s)}),v.success("Item deleted successfully")},t[27]=s,t[28]=e,t[29]=r,t[30]=n,t[31]=f):f=t[31];let m;t[32]!==g||t[33]!==f?(m={mutationFn:g,onSuccess:f,onError:z},t[32]=g,t[33]=f,t[34]=m):m=t[34];const $=w(m);let T;return t[35]!==O||t[36]!==$||t[37]!==q?(T={create:O,update:q,delete:$},t[35]=O,t[36]=$,t[37]=q,t[38]=T):T=t[38],T}function z(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to delete item: ${s}`)}function B(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to update item: ${s}`)}function P(n){const s=n instanceof Error?n.message:String(n);v.error(`Failed to create item: ${s}`)}export{M as a,K as b,J as u};
@@ -1 +1 @@
1
- import{c as l}from"./index-B2ZzxrDd.js";import{c as r}from"./connection-Cgb7Z5-V.js";import{u as i}from"./project-context-provider-CwANTiF8.js";import{b as m,a as u,u as C}from"./use-collections-BI8SI9I-.js";function O(t){const o=l.c(3);let e;o[0]!==t?(e=t===void 0?{}:t,o[0]=t,o[1]=e):e=o[1];const n=e,{org:c}=i();let s;o[2]===Symbol.for("react.memo_cache_sentinel")?(s=r(),o[2]=s):s=o[2];const a=s;return m(c.slug,"CONNECTIONS",a,n)}function S(t){const o=l.c(1),{org:e}=i();let n;o[0]===Symbol.for("react.memo_cache_sentinel")?(n=r(),o[0]=n):n=o[0];const c=n;return C(e.slug,"CONNECTIONS",t,c)}function _(){const t=l.c(1),{org:o}=i();let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r(),t[0]=e):e=t[0];const n=e;return u(o.slug,"CONNECTIONS",n)}export{_ as a,S as b,O as u};
1
+ import{c as l}from"./index-DEuqpeVv.js";import{c as r}from"./connection-ByVJuREK.js";import{u as i}from"./project-context-provider-Dn1-l4h2.js";import{b as m,a as u,u as C}from"./use-collections-Cflasxiq.js";function O(t){const o=l.c(3);let e;o[0]!==t?(e=t===void 0?{}:t,o[0]=t,o[1]=e):e=o[1];const n=e,{org:c}=i();let s;o[2]===Symbol.for("react.memo_cache_sentinel")?(s=r(),o[2]=s):s=o[2];const a=s;return m(c.slug,"CONNECTIONS",a,n)}function S(t){const o=l.c(1),{org:e}=i();let n;o[0]===Symbol.for("react.memo_cache_sentinel")?(n=r(),o[0]=n):n=o[0];const c=n;return C(e.slug,"CONNECTIONS",t,c)}function _(){const t=l.c(1),{org:o}=i();let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r(),t[0]=e):e=t[0];const n=e;return u(o.slug,"CONNECTIONS",n)}export{_ as a,S as b,O as u};
@@ -1 +1 @@
1
- import{c as l,K as f}from"./index-B2ZzxrDd.js";import{u as y}from"./index-DYB_vmtw.js";async function h(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{prompts:{}},clientInfo:{name:"mesh-prompts",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.prompts)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.prompts||[]}catch{return[]}}function T(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(q),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(j),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(d)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={promptsMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function d(t){return{name:t.name,description:t.description}}function j(t){return t.isLoading}function q(t){return{queryKey:f.connectionPrompts(t),queryFn:()=>h(t),staleTime:6e4,retry:!1}}async function w(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{tools:{},resources:{},prompts:{}},clientInfo:{name:"mesh-resources",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.resources)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"resources/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.resources||[]}catch{return[]}}function P(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(g),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(b),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(S)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={resourcesMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function S(t){return{uri:t.uri,name:t.name,description:t.description}}function b(t){return t.isLoading}function g(t){return{queryKey:f.connectionResources(t),queryFn:()=>w(t),staleTime:6e4,retry:!1}}export{P as a,T as u};
1
+ import{c as l,K as f}from"./index-DEuqpeVv.js";import{u as y}from"./index-u_K3efbu.js";async function h(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{prompts:{}},clientInfo:{name:"mesh-prompts",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.prompts)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"prompts/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.prompts||[]}catch{return[]}}function T(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(q),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(j),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(d)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={promptsMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function d(t){return{name:t.name,description:t.description}}function j(t){return t.isLoading}function q(t){return{queryKey:f.connectionPrompts(t),queryFn:()=>h(t),staleTime:6e4,retry:!1}}async function w(t){const e=`/mcp/${t}`,s={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};try{const n=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{tools:{},resources:{},prompts:{}},clientInfo:{name:"mesh-resources",version:"1.0.0"}}})});if(!n.ok)return[];const i=await n.json();if(i.error)return[];const{capabilities:o}=i.result;if(!o?.resources)return[];const r=await fetch(e,{method:"POST",headers:s,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"resources/list",params:{}})});if(!r.ok)return[];const a=await r.json();return a.error?[]:a.result?.resources||[]}catch{return[]}}function P(t){const e=l.c(13);let s;e[0]!==t?(s=t.map(g),e[0]=t,e[1]=s):s=e[1];let n;e[2]!==s?(n={queries:s},e[2]=s,e[3]=n):n=e[3];const i=y(n);let o,r;if(e[4]!==t||e[5]!==i){r=new Map;let p;e[8]!==i?(p=i.some(b),e[8]=i,e[9]=p):p=e[9],o=p,t.forEach((u,m)=>{const c=i[m];c?.data?r.set(u,c.data.map(S)):r.set(u,[])}),e[4]=t,e[5]=i,e[6]=o,e[7]=r}else o=e[6],r=e[7];let a;return e[10]!==o||e[11]!==r?(a={resourcesMap:r,isLoading:o},e[10]=o,e[11]=r,e[12]=a):a=e[12],a}function S(t){return{uri:t.uri,name:t.name,description:t.description}}function b(t){return t.isLoading}function g(t){return{queryKey:f.connectionResources(t),queryFn:()=>w(t),staleTime:6e4,retry:!1}}export{P as a,T as u};
@@ -1 +1 @@
1
- import{c as m,f as y}from"./index-B2ZzxrDd.js";import{a as f}from"./use-gateway-BzFnbg51.js";import{u as p}from"./project-context-provider-CwANTiF8.js";function x(a){const e=m.c(10);let o;e[0]!==a?(o=a===void 0?{}:a,e[0]=a,e[1]=o):o=e[1];const d=o,{navigateOnCreate:u}=d,i=u===void 0?!1:u,{org:r}=p(),c=y(),t=f();let s;e[2]!==t.create||e[3]!==c||e[4]!==i||e[5]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_mode:"inclusion",connections:[]});return i&&c({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:l.id}}),{id:l.id,gateway:l}},e[2]=t.create,e[3]=c,e[4]=i,e[5]=r,e[6]=s):s=e[6];const g=s;let n;return e[7]!==t.create.isPending||e[8]!==g?(n={createGateway:g,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=g,e[9]=n):n=e[9],n}export{x as u};
1
+ import{c as m,f as y}from"./index-DEuqpeVv.js";import{a as f}from"./use-gateway-D5VVN1xE.js";import{u as p}from"./project-context-provider-Dn1-l4h2.js";function x(a){const e=m.c(10);let o;e[0]!==a?(o=a===void 0?{}:a,e[0]=a,e[1]=o):o=e[1];const d=o,{navigateOnCreate:u}=d,i=u===void 0?!1:u,{org:r}=p(),c=y(),t=f();let s;e[2]!==t.create||e[3]!==c||e[4]!==i||e[5]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_mode:"inclusion",connections:[]});return i&&c({to:"/$org/gateways/$gatewayId",params:{org:r.slug,gatewayId:l.id}}),{id:l.id,gateway:l}},e[2]=t.create,e[3]=c,e[4]=i,e[5]=r,e[6]=s):s=e[6];const g=s;let n;return e[7]!==t.create.isPending||e[8]!==g?(n={createGateway:g,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=g,e[9]=n):n=e[9],n}export{x as u};
@@ -1 +1 @@
1
- import{r as i,c as a}from"./index-B2ZzxrDd.js";import{c as n}from"./connection-Cgb7Z5-V.js";import{u as l}from"./project-context-provider-CwANTiF8.js";import{b as u,a as f,u as h}from"./use-collections-BI8SI9I-.js";const C=({size:o=24,color:e="currentColor",...t})=>i.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},i.createElement("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3m4-13h3m-3 5h3M2 9h3m-3 5h3m4.8 5h4.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 16.72 19 15.88 19 14.2V9.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C16.72 5 15.88 5 14.2 5H9.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C5 7.28 5 8.12 5 9.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C7.28 19 8.12 19 9.8 19Z"}));C.displayName="CpuChip02";function g(o){const e=a.c(3);let t;e[0]!==o?(t=o===void 0?{}:o,e[0]=o,e[1]=t):t=e[1];const s=t,{org:c}=l();let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n(),e[2]=r):r=e[2];const m=r;return u(c.slug,"GATEWAY",m,s)}function A(o){const e=a.c(1),{org:t}=l();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n(),e[0]=s):s=e[0];const c=s;return h(t.slug,"GATEWAY",o??void 0,c)}function G(){const o=a.c(1),{org:e}=l();let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n(),o[0]=t):t=o[0];const s=t;return f(e.slug,"GATEWAY",s)}export{G as a,A as b,C as i,g as u};
1
+ import{r as i,c as a}from"./index-DEuqpeVv.js";import{c as n}from"./connection-ByVJuREK.js";import{u as l}from"./project-context-provider-Dn1-l4h2.js";import{b as u,a as f,u as h}from"./use-collections-Cflasxiq.js";const C=({size:o=24,color:e="currentColor",...t})=>i.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},i.createElement("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3m4-13h3m-3 5h3M2 9h3m-3 5h3m4.8 5h4.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 16.72 19 15.88 19 14.2V9.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C16.72 5 15.88 5 14.2 5H9.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C5 7.28 5 8.12 5 9.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C7.28 19 8.12 19 9.8 19Z"}));C.displayName="CpuChip02";function g(o){const e=a.c(3);let t;e[0]!==o?(t=o===void 0?{}:o,e[0]=o,e[1]=t):t=e[1];const s=t,{org:c}=l();let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n(),e[2]=r):r=e[2];const m=r;return u(c.slug,"GATEWAY",m,s)}function A(o){const e=a.c(1),{org:t}=l();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n(),e[0]=s):s=e[0];const c=s;return h(t.slug,"GATEWAY",o??void 0,c)}function G(){const o=a.c(1),{org:e}=l();let t;o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n(),o[0]=t):t=o[0];const s=t;return f(e.slug,"GATEWAY",s)}export{G as a,A as b,C as i,g as u};
@@ -1 +1 @@
1
- import{c as a}from"./index-B2ZzxrDd.js";import{u as S}from"./project-context-provider-CwANTiF8.js";import{u as L,L as x}from"./localstorage-keys-1ChkoQpJ.js";function A(e){const t=a.c(9),{locator:c}=S();let o;t[0]!==c?(o=x.gatewaySystemPrompts(c),t[0]=c,t[1]=o):o=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s={},t[2]=s):s=t[2];const[u,l]=L(o,s),n=e?u[e]??"":"";let r;t[3]!==e||t[4]!==l?(r=f=>{e&&l(p=>({...p,[e]:f}))},t[3]=e,t[4]=l,t[5]=r):r=t[5];const i=r;let m;return t[6]!==i||t[7]!==n?(m=[n,i],t[6]=i,t[7]=n,t[8]=m):m=t[8],m}export{A as u};
1
+ import{c as a}from"./index-DEuqpeVv.js";import{u as S}from"./project-context-provider-Dn1-l4h2.js";import{u as L,L as x}from"./localstorage-keys-kemGZMIp.js";function A(e){const t=a.c(9),{locator:c}=S();let o;t[0]!==c?(o=x.gatewaySystemPrompts(c),t[0]=c,t[1]=o):o=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s={},t[2]=s):s=t[2];const[u,l]=L(o,s),n=e?u[e]??"":"";let r;t[3]!==e||t[4]!==l?(r=f=>{e&&l(p=>({...p,[e]:f}))},t[3]=e,t[4]=l,t[5]=r):r=t[5];const i=r;let m;return t[6]!==i||t[7]!==n?(m=[n,i],t[6]=i,t[7]=n,t[8]=m):m=t[8],m}export{A as u};
@@ -1 +1 @@
1
- import{r as a,c as T}from"./index-B2ZzxrDd.js";import{u as D}from"./use-mobile-DHVQc88b.js";const W=({size:l=24,color:e="currentColor",...t})=>a.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},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
1
+ import{r as a,c as T}from"./index-DEuqpeVv.js";import{u as D}from"./use-mobile-CI2w7svc.js";const W=({size:l=24,color:e="currentColor",...t})=>a.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},a.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),a.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));W.displayName="Eye";function k(l){const e=`deco-filters-${l}`,[t,c]=a.useState(()=>{try{const o=globalThis.localStorage?.getItem(e);if(o)return JSON.parse(o)}catch(o){console.error("Failed to parse stored filters:",o)}return[]});return[t,o=>{c(o);try{globalThis.localStorage?.setItem(e,JSON.stringify(o))}catch(i){console.error("Failed to save filters:",i)}}]}function C(l){const e=T.c(7),[t,c]=a.useState(l),[s,o]=a.useState(l?"desc":null);let i;e[0]!==s||e[1]!==t?(i=h=>{t!==h?(c(h),o("asc")):s==="asc"?o("desc"):s==="desc"&&(c(void 0),o(null))},e[0]=s,e[1]=t,e[2]=i):i=e[2];const u=i;let r;return e[3]!==u||e[4]!==s||e[5]!==t?(r={sortKey:t,sortDirection:s,handleSort:u},e[3]=u,e[4]=s,e[5]=t,e[6]=r):r=e[6],r}function L(l,e){const t=T.c(12),c=e===void 0?"cards":e,s=D(),o=a.useRef(s),i=l?`deco-view-mode-${l}`:"deco-view-mode";let u;t[0]!==c||t[1]!==i?(u=()=>{const d=globalThis.localStorage?.getItem(i);return d==="cards"||d==="table"?d:c},t[0]=c,t[1]=i,t[2]=u):u=t[2];const[r,h]=a.useState(u);let f;t[3]!==i?(f=d=>{h(d),globalThis.localStorage?.setItem(i,d)},t[3]=i,t[4]=f):f=t[4];const p=f;let S,g;t[5]!==s||t[6]!==r?(S=()=>{!o.current&&s&&r==="table"&&h("cards"),o.current=s},g=[s,r],t[5]=s,t[6]=r,t[7]=S,t[8]=g):(S=t[7],g=t[8]),a.useEffect(S,g);let n;return t[9]!==p||t[10]!==r?(n=[r,p],t[9]=p,t[10]=r,t[11]=n):n=t[11],n}function O(l){const e=T.c(20),{namespace:t,resource:c,defaultSortKey:s,defaultViewMode:o}=l,i=s===void 0?"title":s,u=o===void 0?"table":o,[r,h]=a.useState(""),f=a.useDeferredValue(r),p=`${t}-${c}`,[S,g]=k(p),n=`mesh-${c}-filter-visible-${t}`;let d;e[0]!==n?(d=()=>globalThis.localStorage?.getItem(n)==="true",e[0]=n,e[1]=d):d=e[1];const[m,B]=a.useState(d);let y;e[2]!==n?(y=I=>{B(I),globalThis.localStorage?.setItem(n,String(I))},e[2]=n,e[3]=y):y=e[3];const b=y;let M;e[4]!==m||e[5]!==b?(M=()=>{b(!m)},e[4]=m,e[5]=b,e[6]=M):M=e[6];const w=M,[V,$]=L(`mesh-${c}-${t}`,u),{sortKey:x,sortDirection:F,handleSort:K}=C(i),E=x;let v;return e[7]!==m||e[8]!==S||e[9]!==K||e[10]!==r||e[11]!==f||e[12]!==b||e[13]!==g||e[14]!==$||e[15]!==F||e[16]!==E||e[17]!==w||e[18]!==V?(v={search:r,searchTerm:f,setSearch:h,filters:S,setFilters:g,filterBarVisible:m,setFilterBarVisible:b,toggleFilterBar:w,viewMode:V,setViewMode:$,sortKey:E,sortDirection:F,handleSort:K},e[7]=m,e[8]=S,e[9]=K,e[10]=r,e[11]=f,e[12]=b,e[13]=g,e[14]=$,e[15]=F,e[16]=E,e[17]=w,e[18]=V,e[19]=v):v=e[19],v}export{W as s,O as u};
@@ -1 +1 @@
1
- import{c as E,K as b}from"./index-B2ZzxrDd.js";import{u as j}from"./useQuery-DVzj5fVO.js";function T(g){const e=E.c(18),{url:o,token:r,enabled:w}=g,$=w===void 0?!0:w;let i;e[0]!==r||e[1]!==o?(i=b.mcpTools(o,r),e[0]=r,e[1]=o,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==o?(s=async()=>{if(!o)return[];const m={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};r&&(m.Authorization=`Bearer ${r}`);const u=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-mcp",version:"1.0.0"}}})});if(!u.ok)throw new Error(`MCP initialization failed: ${u.status}`);const h=await u.json();if(h.error)throw new Error(`MCP initialization error: ${h.error.message} (code: ${h.error.code})`);const y=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"tools/list",params:{}})});if(!y.ok)throw new Error(`Failed to list tools: ${y.status}`);const l=await y.json();if(l.error)throw new Error(`Failed to list tools: ${l.error.message} (code: ${l.error.code})`);return l.result?.tools||[]},e[3]=r,e[4]=o,e[5]=s):s=e[5];const d=$&&!!o;let a;e[6]!==i||e[7]!==s||e[8]!==d?(a={queryKey:i,queryFn:s,enabled:d,staleTime:3e4,retry:!1},e[6]=i,e[7]=s,e[8]=d,e[9]=a):a=e[9];const t=j(a),f=o?t.isLoading?"connecting":t.isError?"error":"ready":"disconnected";let n;e[10]!==t.data?(n=t.data||[],e[10]=t.data,e[11]=n):n=e[11];const p=t.error;let c;return e[12]!==t.isLoading||e[13]!==t.refetch||e[14]!==f||e[15]!==n||e[16]!==p?(c={tools:n,state:f,error:p,isLoading:t.isLoading,refetch:t.refetch},e[12]=t.isLoading,e[13]=t.refetch,e[14]=f,e[15]=n,e[16]=p,e[17]=c):c=e[17],c}export{T as u};
1
+ import{c as E,K as b}from"./index-DEuqpeVv.js";import{u as j}from"./useQuery-BKyLWvSZ.js";function T(g){const e=E.c(18),{url:o,token:r,enabled:w}=g,$=w===void 0?!0:w;let i;e[0]!==r||e[1]!==o?(i=b.mcpTools(o,r),e[0]=r,e[1]=o,e[2]=i):i=e[2];let s;e[3]!==r||e[4]!==o?(s=async()=>{if(!o)return[];const m={"Content-Type":"application/json",Accept:"application/json, text/event-stream"};r&&(m.Authorization=`Bearer ${r}`);const u=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"mesh-mcp",version:"1.0.0"}}})});if(!u.ok)throw new Error(`MCP initialization failed: ${u.status}`);const h=await u.json();if(h.error)throw new Error(`MCP initialization error: ${h.error.message} (code: ${h.error.code})`);const y=await fetch(o,{method:"POST",headers:m,body:JSON.stringify({jsonrpc:"2.0",id:2,method:"tools/list",params:{}})});if(!y.ok)throw new Error(`Failed to list tools: ${y.status}`);const l=await y.json();if(l.error)throw new Error(`Failed to list tools: ${l.error.message} (code: ${l.error.code})`);return l.result?.tools||[]},e[3]=r,e[4]=o,e[5]=s):s=e[5];const d=$&&!!o;let a;e[6]!==i||e[7]!==s||e[8]!==d?(a={queryKey:i,queryFn:s,enabled:d,staleTime:3e4,retry:!1},e[6]=i,e[7]=s,e[8]=d,e[9]=a):a=e[9];const t=j(a),f=o?t.isLoading?"connecting":t.isError?"error":"ready":"disconnected";let n;e[10]!==t.data?(n=t.data||[],e[10]=t.data,e[11]=n):n=e[11];const p=t.error;let c;return e[12]!==t.isLoading||e[13]!==t.refetch||e[14]!==f||e[15]!==n||e[16]!==p?(c={tools:n,state:f,error:p,isLoading:t.isLoading,refetch:t.refetch},e[12]=t.isLoading,e[13]=t.refetch,e[14]=f,e[15]=n,e[16]=p,e[17]=c):c=e[17],c}export{T as u};
@@ -1 +1 @@
1
- import{c as o,v as n,K as u,a as i}from"./index-B2ZzxrDd.js";import{u as a}from"./project-context-provider-CwANTiF8.js";function p(){const e=o.c(4),{locator:s}=a();let t;e[0]!==s?(t=u.members(s),e[0]=s,e[1]=t):t=e[1];let r;return e[2]!==t?(r={queryKey:t,queryFn:m},e[2]=t,e[3]=r):r=e[3],n(r)}function m(){return i.organization.listMembers()}export{p as u};
1
+ import{c as o,v as n,K as u,a as i}from"./index-DEuqpeVv.js";import{u as a}from"./project-context-provider-Dn1-l4h2.js";function p(){const e=o.c(4),{locator:s}=a();let t;e[0]!==s?(t=u.members(s),e[0]=s,e[1]=t):t=e[1];let r;return e[2]!==t?(r={queryKey:t,queryFn:m},e[2]=t,e[3]=r):r=e[3],n(r)}function m(){return i.organization.listMembers()}export{p as u};
@@ -1 +1 @@
1
- import{c as m,r}from"./index-B2ZzxrDd.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
1
+ import{c as m,r}from"./index-DEuqpeVv.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
@@ -1 +1 @@
1
- import{c as f,v as y,x as p,K as m}from"./index-B2ZzxrDd.js";import{u as T}from"./useMutation-Lj6qQmhH.js";import{c as S}from"./connection-Cgb7Z5-V.js";function N(t){const e=f.c(8);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=S(),e[0]=n):n=e[0];const u=n;let r;e[1]!==t?(r=m.organizationSettings(t),e[1]=t,e[2]=r):r=e[2];let s;e[3]!==t?(s=async()=>{const i=await u("ORGANIZATION_SETTINGS_GET",{});return i||{organizationId:t,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},e[3]=t,e[4]=s):s=e[4];let l;e[5]!==r||e[6]!==s?(l={queryKey:r,queryFn:s,staleTime:6e4},e[5]=r,e[6]=s,e[7]=l):l=e[7];const{data:c}=y(l);return c}function C(t){const e=f.c(11),n=p();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=S(),e[0]=u):u=e[0];const r=u;let s;e[1]!==t?(s=async o=>await r("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t,...o}),e[1]=t,e[2]=s):s=e[2];let l;e[3]!==t||e[4]!==n?(l=o=>{n.setQueryData(m.organizationSettings(t),o)},e[3]=t,e[4]=n,e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==l?(c={mutationFn:s,onSuccess:l},e[6]=s,e[7]=l,e[8]=c):c=e[8];const i=T(c);let a;return e[9]!==i?(a={update:i},e[9]=i,e[10]=a):a=e[10],a}export{C as a,N as u};
1
+ import{c as f,v as y,x as p,K as m}from"./index-DEuqpeVv.js";import{u as T}from"./useMutation-xcmVYLP7.js";import{c as S}from"./connection-ByVJuREK.js";function N(t){const e=f.c(8);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=S(),e[0]=n):n=e[0];const u=n;let r;e[1]!==t?(r=m.organizationSettings(t),e[1]=t,e[2]=r):r=e[2];let s;e[3]!==t?(s=async()=>{const i=await u("ORGANIZATION_SETTINGS_GET",{});return i||{organizationId:t,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},e[3]=t,e[4]=s):s=e[4];let l;e[5]!==r||e[6]!==s?(l={queryKey:r,queryFn:s,staleTime:6e4},e[5]=r,e[6]=s,e[7]=l):l=e[7];const{data:c}=y(l);return c}function C(t){const e=f.c(11),n=p();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=S(),e[0]=u):u=e[0];const r=u;let s;e[1]!==t?(s=async o=>await r("ORGANIZATION_SETTINGS_UPDATE",{organizationId:t,...o}),e[1]=t,e[2]=s):s=e[2];let l;e[3]!==t||e[4]!==n?(l=o=>{n.setQueryData(m.organizationSettings(t),o)},e[3]=t,e[4]=n,e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==l?(c={mutationFn:s,onSuccess:l},e[6]=s,e[7]=l,e[8]=c):c=e[8];const i=T(c);let a;return e[9]!==i?(a={update:i},e[9]=i,e[10]=a):a=e[10],a}export{C as a,N as u};
@@ -1 +1 @@
1
- import{c as p,K as C,v as T}from"./index-B2ZzxrDd.js";import{u as q}from"./useQuery-DVzj5fVO.js";import{u as K}from"./useMutation-Lj6qQmhH.js";function E(a){const e=p.c(23);let o,l,t,s,r;e[0]!==a?({toolCaller:t,toolName:r,toolInputParams:s,scope:l,...o}=a,e[0]=a,e[1]=o,e[2]=l,e[3]=t,e[4]=s,e[5]=r):(o=e[1],l=e[2],t=e[3],s=e[4],r=e[5]);let i,c,m,u;if(e[6]!==o||e[7]!==l||e[8]!==s||e[9]!==r){const y=JSON.stringify(s);u=T,i=o,c=o.staleTime??6e4,m=C.toolCall(l,r,y),e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=c,e[12]=m,e[13]=u}else i=e[10],c=e[11],m=e[12],u=e[13];let n;e[14]!==t||e[15]!==s||e[16]!==r?(n=async()=>await t(r,s),e[14]=t,e[15]=s,e[16]=r,e[17]=n):n=e[17];let f;return e[18]!==i||e[19]!==c||e[20]!==m||e[21]!==n?(f={...i,staleTime:c,queryKey:m,queryFn:n},e[18]=i,e[19]=c,e[20]=m,e[21]=n,e[22]=f):f=e[22],u(f)}function F(a){const e=p.c(3),{toolCaller:o,toolName:l}=a;let t;return e[0]!==o||e[1]!==l?(t={mutationFn:async s=>await o(l,s),onSuccess:S,onError:N},e[0]=o,e[1]=l,e[2]=t):t=e[2],K(t)}function N(a){console.error("tool call mutation error",a)}function S(a){console.log("tool call mutation success",a)}function I(a){const e=p.c(14),{toolCaller:o,toolName:l,toolInputParams:t,scope:s,staleTime:r,refetchInterval:i,enabled:c}=a,m=r===void 0?6e4:r;let u;e[0]!==s||e[1]!==t||e[2]!==l?(u=C.toolCall(s,l,JSON.stringify(t??{})),e[0]=s,e[1]=t,e[2]=l,e[3]=u):u=e[3];let n;e[4]!==o||e[5]!==t||e[6]!==l?(n=async()=>await o(l,t??{}),e[4]=o,e[5]=t,e[6]=l,e[7]=n):n=e[7];let f;return e[8]!==c||e[9]!==i||e[10]!==m||e[11]!==u||e[12]!==n?(f={queryKey:u,queryFn:n,enabled:c,staleTime:m,refetchInterval:i},e[8]=c,e[9]=i,e[10]=m,e[11]=u,e[12]=n,e[13]=f):f=e[13],q(f)}export{I as a,F as b,E as u};
1
+ import{c as p,K as C,v as T}from"./index-DEuqpeVv.js";import{u as q}from"./useQuery-BKyLWvSZ.js";import{u as K}from"./useMutation-xcmVYLP7.js";function E(a){const e=p.c(23);let o,l,t,s,r;e[0]!==a?({toolCaller:t,toolName:r,toolInputParams:s,scope:l,...o}=a,e[0]=a,e[1]=o,e[2]=l,e[3]=t,e[4]=s,e[5]=r):(o=e[1],l=e[2],t=e[3],s=e[4],r=e[5]);let i,c,m,u;if(e[6]!==o||e[7]!==l||e[8]!==s||e[9]!==r){const y=JSON.stringify(s);u=T,i=o,c=o.staleTime??6e4,m=C.toolCall(l,r,y),e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=c,e[12]=m,e[13]=u}else i=e[10],c=e[11],m=e[12],u=e[13];let n;e[14]!==t||e[15]!==s||e[16]!==r?(n=async()=>await t(r,s),e[14]=t,e[15]=s,e[16]=r,e[17]=n):n=e[17];let f;return e[18]!==i||e[19]!==c||e[20]!==m||e[21]!==n?(f={...i,staleTime:c,queryKey:m,queryFn:n},e[18]=i,e[19]=c,e[20]=m,e[21]=n,e[22]=f):f=e[22],u(f)}function F(a){const e=p.c(3),{toolCaller:o,toolName:l}=a;let t;return e[0]!==o||e[1]!==l?(t={mutationFn:async s=>await o(l,s),onSuccess:S,onError:N},e[0]=o,e[1]=l,e[2]=t):t=e[2],K(t)}function N(a){console.error("tool call mutation error",a)}function S(a){console.log("tool call mutation success",a)}function I(a){const e=p.c(14),{toolCaller:o,toolName:l,toolInputParams:t,scope:s,staleTime:r,refetchInterval:i,enabled:c}=a,m=r===void 0?6e4:r;let u;e[0]!==s||e[1]!==t||e[2]!==l?(u=C.toolCall(s,l,JSON.stringify(t??{})),e[0]=s,e[1]=t,e[2]=l,e[3]=u):u=e[3];let n;e[4]!==o||e[5]!==t||e[6]!==l?(n=async()=>await o(l,t??{}),e[4]=o,e[5]=t,e[6]=l,e[7]=n):n=e[7];let f;return e[8]!==c||e[9]!==i||e[10]!==m||e[11]!==u||e[12]!==n?(f={queryKey:u,queryFn:n,enabled:c,staleTime:m,refetchInterval:i},e[8]=c,e[9]=i,e[10]=m,e[11]=u,e[12]=n,e[13]=f):f=e[13],q(f)}export{I as a,F as b,E as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-BXdaScti.js";import{U as i}from"./index-DEuqpeVv.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{b0 as l,b2 as b,bP as n,bQ as d,b1 as h,x as p,r as o,ba as m,bR as v}from"./index-B2ZzxrDd.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),b(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(s),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
1
+ import{b2 as l,b4 as b,bR as a,bS as d,b3 as h,x as p,r as o,bc as m,bT as v}from"./index-DEuqpeVv.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),b(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(s),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
@@ -0,0 +1 @@
1
+ import{U as u,b6 as s}from"./index-DEuqpeVv.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -1 +1 @@
1
- import{r as z,aa as A,j as u,a6 as M,a8 as ge,H as h,a5 as he,ab as X,ac as pe,a4 as be,ad as me,h as ve,c as Y}from"./index-B2ZzxrDd.js";import{c as Z}from"./button-CJFU-RdP.js";var ee="Toggle",te=z.forwardRef((t,e)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...o}=t,[i,s]=A({prop:r,onChange:a,defaultProp:n??!1,caller:ee});return u.jsx(M.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...o,ref:e,onClick:ge(t.onClick,()=>{t.disabled||s(!i)})})});te.displayName=ee;var b="ToggleGroup",[re]=he(b,[X]),ne=X(),S=h.forwardRef((t,e)=>{const{type:r,...n}=t;if(r==="single"){const a=n;return u.jsx(we,{...a,ref:e})}if(r==="multiple"){const a=n;return u.jsx(ye,{...a,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${b}\``)});S.displayName=b;var[ae,ie]=re(b),we=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??"",onChange:a,caller:b});return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"single",value:h.useMemo(()=>i?[i]:[],[i]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(""),[s]),children:u.jsx(oe,{...o,ref:e})})}),ye=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??[],onChange:a,caller:b}),f=h.useCallback(l=>s((d=[])=>[...d,l]),[s]),c=h.useCallback(l=>s((d=[])=>d.filter(xe=>xe!==l)),[s]);return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:f,onItemDeactivate:c,children:u.jsx(oe,{...o,ref:e})})});S.displayName=b;var[$e,Ne]=re(b),oe=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:s=!0,...f}=t,c=ne(r),l=be(i),d={role:"group",dir:l,...f};return u.jsx($e,{scope:r,rovingFocus:a,disabled:n,children:a?u.jsx(me,{asChild:!0,...c,orientation:o,dir:l,loop:s,children:u.jsx(M.div,{...d,ref:e})}):u.jsx(M.div,{...d,ref:e})})}),k="ToggleGroupItem",se=h.forwardRef((t,e)=>{const r=ie(k,t.__scopeToggleGroup),n=Ne(k,t.__scopeToggleGroup),a=ne(t.__scopeToggleGroup),o=r.value.includes(t.value),i=n.disabled||t.disabled,s={...t,pressed:o,disabled:i},f=h.useRef(null);return n.rovingFocus?u.jsx(pe,{asChild:!0,...a,focusable:!i,active:o,ref:f,children:u.jsx(D,{...s,ref:e})}):u.jsx(D,{...s,ref:e})});se.displayName=k;var D=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,value:n,...a}=t,o=ie(k,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},s=o.type==="single"?i:void 0;return u.jsx(te,{...s,...a,ref:e,onPressedChange:f=>{f?o.onItemActivate(n):o.onItemDeactivate(n)}})}),Ge=S,Pe=se;const Re=ve("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=z.createContext({size:"default",variant:"default"});function Ye(t){const e=Y.c(20);let r,n,a,o,i;e[0]!==t?({className:n,variant:i,size:o,children:r,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);let s;e[6]!==n?(s=Z("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",n),e[6]=n,e[7]=s):s=e[7];let f;e[8]!==o||e[9]!==i?(f={variant:i,size:o},e[8]=o,e[9]=i,e[10]=f):f=e[10];let c;e[11]!==r||e[12]!==f?(c=u.jsx(fe.Provider,{value:f,children:r}),e[11]=r,e[12]=f,e[13]=c):c=e[13];let l;return e[14]!==a||e[15]!==o||e[16]!==s||e[17]!==c||e[18]!==i?(l=u.jsx(Ge,{"data-slot":"toggle-group","data-variant":i,"data-size":o,className:s,...a,children:c}),e[14]=a,e[15]=o,e[16]=s,e[17]=c,e[18]=i,e[19]=l):l=e[19],l}function Ze(t){const e=Y.c(18);let r,n,a,o,i;e[0]!==t?({className:n,children:r,variant:i,size:o,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);const s=z.useContext(fe),f=s.variant||i,c=s.size||o;let l;e[6]!==n||e[7]!==s.size||e[8]!==s.variant||e[9]!==o||e[10]!==i?(l=Z(Re({variant:s.variant||i,size:s.size||o}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",n),e[6]=n,e[7]=s.size,e[8]=s.variant,e[9]=o,e[10]=i,e[11]=l):l=e[11];let d;return e[12]!==r||e[13]!==a||e[14]!==f||e[15]!==c||e[16]!==l?(d=u.jsx(Pe,{"data-slot":"toggle-group-item","data-variant":f,"data-size":c,className:l,...a,children:r}),e[12]=r,e[13]=a,e[14]=f,e[15]=c,e[16]=l,e[17]=d):d=e[17],d}function V(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function le(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function G(){}var y=.7,C=1/y,w="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,Ce=new RegExp(`^rgb\\(${w},${w},${w}\\)$`),Te=new RegExp(`^rgb\\(${p},${p},${p}\\)$`),je=new RegExp(`^rgba\\(${w},${w},${w},${$}\\)$`),_e=new RegExp(`^rgba\\(${p},${p},${p},${$}\\)$`),Me=new RegExp(`^hsl\\(${$},${p},${p}\\)$`),Ie=new RegExp(`^hsla\\(${$},${p},${p},${$}\\)$`),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};V(G,N,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:O,formatHex:O,formatHex8:Ee,formatHsl:He,formatRgb:B,toString:B});function O(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatHex8()}function He(){return ce(this).formatHsl()}function B(){return this.rgb().formatRgb()}function N(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?L(e):r===3?new x(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?P(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?P(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ce.exec(t))?new x(e[1],e[2],e[3],1):(e=Te.exec(t))?new x(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=je.exec(t))?P(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?P(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Me.exec(t))?K(e[1],e[2]/100,e[3]/100,1):(e=Ie.exec(t))?K(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?L(F[t]):t==="transparent"?new x(NaN,NaN,NaN,0):null}function L(t){return new x(t>>16&255,t>>8&255,t&255,1)}function P(t,e,r,n){return n<=0&&(t=e=r=NaN),new x(t,e,r,n)}function ze(t){return t instanceof G||(t=N(t)),t?(t=t.rgb(),new x(t.r,t.g,t.b,t.opacity)):new x}function I(t,e,r,n){return arguments.length===1?ze(t):new x(t,e,r,n??1)}function x(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}V(x,I,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(v(this.r),v(this.g),v(this.b),T(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U,formatHex:U,formatHex8:Ae,formatRgb:J,toString:J}));function U(){return`#${m(this.r)}${m(this.g)}${m(this.b)}`}function Ae(){return`#${m(this.r)}${m(this.g)}${m(this.b)}${m((isNaN(this.opacity)?1:this.opacity)*255)}`}function J(){const t=T(this.opacity);return`${t===1?"rgb(":"rgba("}${v(this.r)}, ${v(this.g)}, ${v(this.b)}${t===1?")":`, ${t})`}`}function T(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function v(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function m(t){return t=v(t),(t<16?"0":"")+t.toString(16)}function K(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new g(t,e,r,n)}function ce(t){if(t instanceof g)return new g(t.h,t.s,t.l,t.opacity);if(t instanceof G||(t=N(t)),!t)return new g;if(t instanceof g)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),i=NaN,s=o-a,f=(o+a)/2;return s?(e===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-e)/s+2:i=(e-r)/s+4,s/=f<.5?o+a:2-o-a,i*=60):s=f>0&&f<1?0:i,new g(i,s,f,t.opacity)}function Se(t,e,r,n){return arguments.length===1?ce(t):new g(t,e,r,n??1)}function g(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}V(g,Se,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new g(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new g(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new x(j(t>=240?t-240:t+120,a,n),j(t,a,n),j(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new g(Q(this.h),R(this.s),R(this.l),T(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=T(this.opacity);return`${t===1?"hsl(":"hsla("}${Q(this.h)}, ${R(this.s)*100}%, ${R(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Q(t){return t=(t||0)%360,t<0?t+360:t}function R(t){return Math.max(0,Math.min(1,t||0))}function j(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const q=t=>()=>t;function Ve(t,e){return function(r){return t+r*e}}function qe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function De(t){return(t=+t)==1?ue:function(e,r){return r-e?qe(e,r,t):q(isNaN(e)?r:e)}}function ue(t,e){var r=e-t;return r?Ve(t,r):q(isNaN(t)?e:t)}const W=(function t(e){var r=De(e);function n(a,o){var i=r((a=I(a)).r,(o=I(o)).r),s=r(a.g,o.g),f=r(a.b,o.b),c=ue(a.opacity,o.opacity);return function(l){return a.r=i(l),a.g=s(l),a.b=f(l),a.opacity=c(l),a+""}}return n.gamma=t,n})(1);function Fe(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=t[a]*(1-o)+e[a]*o;return n}}function Oe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Be(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=de(t[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function Le(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function E(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ue(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=de(t[a],e[a]):n[a]=e[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(H.source,"g");function Je(t){return function(){return t}}function Ke(t){return function(e){return t(e)+""}}function Qe(t,e){var r=H.lastIndex=_.lastIndex=0,n,a,o,i=-1,s=[],f=[];for(t=t+"",e=e+"";(n=H.exec(t))&&(a=_.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,f.push({i,x:E(n,a)})),r=_.lastIndex;return r<e.length&&(o=e.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?f[0]?Ke(f[0].x):Je(e):(e=f.length,function(c){for(var l=0,d;l<e;++l)s[(d=f[l]).i]=d.x(c);return s.join("")})}function de(t,e){var r=typeof e,n;return e==null||r==="boolean"?q(e):(r==="number"?E:r==="string"?(n=N(e))?(e=n,W):Qe:e instanceof N?W:e instanceof Date?Le:Oe(e)?Fe:Array.isArray(e)?Be:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ue:E)(t,e)}export{Ze as T,W as a,Qe as b,N as c,de as d,Ye as e,E as i};
1
+ import{r as z,aa as A,j as u,a6 as M,a8 as ge,H as h,a5 as he,ab as X,ac as pe,a4 as be,ad as me,h as ve,c as Y}from"./index-DEuqpeVv.js";import{c as Z}from"./button-DXl1hVqx.js";var ee="Toggle",te=z.forwardRef((t,e)=>{const{pressed:r,defaultPressed:n,onPressedChange:a,...o}=t,[i,s]=A({prop:r,onChange:a,defaultProp:n??!1,caller:ee});return u.jsx(M.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...o,ref:e,onClick:ge(t.onClick,()=>{t.disabled||s(!i)})})});te.displayName=ee;var b="ToggleGroup",[re]=he(b,[X]),ne=X(),S=h.forwardRef((t,e)=>{const{type:r,...n}=t;if(r==="single"){const a=n;return u.jsx(we,{...a,ref:e})}if(r==="multiple"){const a=n;return u.jsx(ye,{...a,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${b}\``)});S.displayName=b;var[ae,ie]=re(b),we=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??"",onChange:a,caller:b});return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"single",value:h.useMemo(()=>i?[i]:[],[i]),onItemActivate:s,onItemDeactivate:h.useCallback(()=>s(""),[s]),children:u.jsx(oe,{...o,ref:e})})}),ye=h.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...o}=t,[i,s]=A({prop:r,defaultProp:n??[],onChange:a,caller:b}),f=h.useCallback(l=>s((d=[])=>[...d,l]),[s]),c=h.useCallback(l=>s((d=[])=>d.filter(xe=>xe!==l)),[s]);return u.jsx(ae,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:f,onItemDeactivate:c,children:u.jsx(oe,{...o,ref:e})})});S.displayName=b;var[$e,Ne]=re(b),oe=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:s=!0,...f}=t,c=ne(r),l=be(i),d={role:"group",dir:l,...f};return u.jsx($e,{scope:r,rovingFocus:a,disabled:n,children:a?u.jsx(me,{asChild:!0,...c,orientation:o,dir:l,loop:s,children:u.jsx(M.div,{...d,ref:e})}):u.jsx(M.div,{...d,ref:e})})}),k="ToggleGroupItem",se=h.forwardRef((t,e)=>{const r=ie(k,t.__scopeToggleGroup),n=Ne(k,t.__scopeToggleGroup),a=ne(t.__scopeToggleGroup),o=r.value.includes(t.value),i=n.disabled||t.disabled,s={...t,pressed:o,disabled:i},f=h.useRef(null);return n.rovingFocus?u.jsx(pe,{asChild:!0,...a,focusable:!i,active:o,ref:f,children:u.jsx(D,{...s,ref:e})}):u.jsx(D,{...s,ref:e})});se.displayName=k;var D=h.forwardRef((t,e)=>{const{__scopeToggleGroup:r,value:n,...a}=t,o=ie(k,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},s=o.type==="single"?i:void 0;return u.jsx(te,{...s,...a,ref:e,onPressedChange:f=>{f?o.onItemActivate(n):o.onItemDeactivate(n)}})}),Ge=S,Pe=se;const Re=ve("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),fe=z.createContext({size:"default",variant:"default"});function Ye(t){const e=Y.c(20);let r,n,a,o,i;e[0]!==t?({className:n,variant:i,size:o,children:r,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);let s;e[6]!==n?(s=Z("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",n),e[6]=n,e[7]=s):s=e[7];let f;e[8]!==o||e[9]!==i?(f={variant:i,size:o},e[8]=o,e[9]=i,e[10]=f):f=e[10];let c;e[11]!==r||e[12]!==f?(c=u.jsx(fe.Provider,{value:f,children:r}),e[11]=r,e[12]=f,e[13]=c):c=e[13];let l;return e[14]!==a||e[15]!==o||e[16]!==s||e[17]!==c||e[18]!==i?(l=u.jsx(Ge,{"data-slot":"toggle-group","data-variant":i,"data-size":o,className:s,...a,children:c}),e[14]=a,e[15]=o,e[16]=s,e[17]=c,e[18]=i,e[19]=l):l=e[19],l}function Ze(t){const e=Y.c(18);let r,n,a,o,i;e[0]!==t?({className:n,children:r,variant:i,size:o,...a}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=i):(r=e[1],n=e[2],a=e[3],o=e[4],i=e[5]);const s=z.useContext(fe),f=s.variant||i,c=s.size||o;let l;e[6]!==n||e[7]!==s.size||e[8]!==s.variant||e[9]!==o||e[10]!==i?(l=Z(Re({variant:s.variant||i,size:s.size||o}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",n),e[6]=n,e[7]=s.size,e[8]=s.variant,e[9]=o,e[10]=i,e[11]=l):l=e[11];let d;return e[12]!==r||e[13]!==a||e[14]!==f||e[15]!==c||e[16]!==l?(d=u.jsx(Pe,{"data-slot":"toggle-group-item","data-variant":f,"data-size":c,className:l,...a,children:r}),e[12]=r,e[13]=a,e[14]=f,e[15]=c,e[16]=l,e[17]=d):d=e[17],d}function V(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function le(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function G(){}var y=.7,C=1/y,w="\\s*([+-]?\\d+)\\s*",$="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",p="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,Ce=new RegExp(`^rgb\\(${w},${w},${w}\\)$`),Te=new RegExp(`^rgb\\(${p},${p},${p}\\)$`),je=new RegExp(`^rgba\\(${w},${w},${w},${$}\\)$`),_e=new RegExp(`^rgba\\(${p},${p},${p},${$}\\)$`),Me=new RegExp(`^hsl\\(${$},${p},${p}\\)$`),Ie=new RegExp(`^hsla\\(${$},${p},${p},${$}\\)$`),F={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};V(G,N,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:O,formatHex:O,formatHex8:Ee,formatHsl:He,formatRgb:B,toString:B});function O(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatHex8()}function He(){return ce(this).formatHsl()}function B(){return this.rgb().formatRgb()}function N(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?L(e):r===3?new x(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?P(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?P(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ce.exec(t))?new x(e[1],e[2],e[3],1):(e=Te.exec(t))?new x(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=je.exec(t))?P(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?P(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Me.exec(t))?K(e[1],e[2]/100,e[3]/100,1):(e=Ie.exec(t))?K(e[1],e[2]/100,e[3]/100,e[4]):F.hasOwnProperty(t)?L(F[t]):t==="transparent"?new x(NaN,NaN,NaN,0):null}function L(t){return new x(t>>16&255,t>>8&255,t&255,1)}function P(t,e,r,n){return n<=0&&(t=e=r=NaN),new x(t,e,r,n)}function ze(t){return t instanceof G||(t=N(t)),t?(t=t.rgb(),new x(t.r,t.g,t.b,t.opacity)):new x}function I(t,e,r,n){return arguments.length===1?ze(t):new x(t,e,r,n??1)}function x(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}V(x,I,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(v(this.r),v(this.g),v(this.b),T(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U,formatHex:U,formatHex8:Ae,formatRgb:J,toString:J}));function U(){return`#${m(this.r)}${m(this.g)}${m(this.b)}`}function Ae(){return`#${m(this.r)}${m(this.g)}${m(this.b)}${m((isNaN(this.opacity)?1:this.opacity)*255)}`}function J(){const t=T(this.opacity);return`${t===1?"rgb(":"rgba("}${v(this.r)}, ${v(this.g)}, ${v(this.b)}${t===1?")":`, ${t})`}`}function T(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function v(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function m(t){return t=v(t),(t<16?"0":"")+t.toString(16)}function K(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new g(t,e,r,n)}function ce(t){if(t instanceof g)return new g(t.h,t.s,t.l,t.opacity);if(t instanceof G||(t=N(t)),!t)return new g;if(t instanceof g)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),o=Math.max(e,r,n),i=NaN,s=o-a,f=(o+a)/2;return s?(e===o?i=(r-n)/s+(r<n)*6:r===o?i=(n-e)/s+2:i=(e-r)/s+4,s/=f<.5?o+a:2-o-a,i*=60):s=f>0&&f<1?0:i,new g(i,s,f,t.opacity)}function Se(t,e,r,n){return arguments.length===1?ce(t):new g(t,e,r,n??1)}function g(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}V(g,Se,le(G,{brighter(t){return t=t==null?C:Math.pow(C,t),new g(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?y:Math.pow(y,t),new g(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new x(j(t>=240?t-240:t+120,a,n),j(t,a,n),j(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new g(Q(this.h),R(this.s),R(this.l),T(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=T(this.opacity);return`${t===1?"hsl(":"hsla("}${Q(this.h)}, ${R(this.s)*100}%, ${R(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Q(t){return t=(t||0)%360,t<0?t+360:t}function R(t){return Math.max(0,Math.min(1,t||0))}function j(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const q=t=>()=>t;function Ve(t,e){return function(r){return t+r*e}}function qe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function De(t){return(t=+t)==1?ue:function(e,r){return r-e?qe(e,r,t):q(isNaN(e)?r:e)}}function ue(t,e){var r=e-t;return r?Ve(t,r):q(isNaN(t)?e:t)}const W=(function t(e){var r=De(e);function n(a,o){var i=r((a=I(a)).r,(o=I(o)).r),s=r(a.g,o.g),f=r(a.b,o.b),c=ue(a.opacity,o.opacity);return function(l){return a.r=i(l),a.g=s(l),a.b=f(l),a.opacity=c(l),a+""}}return n.gamma=t,n})(1);function Fe(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(o){for(a=0;a<r;++a)n[a]=t[a]*(1-o)+e[a]*o;return n}}function Oe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Be(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),o=new Array(r),i;for(i=0;i<n;++i)a[i]=de(t[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(s){for(i=0;i<n;++i)o[i]=a[i](s);return o}}function Le(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function E(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ue(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=de(t[a],e[a]):n[a]=e[a];return function(o){for(a in r)n[a]=r[a](o);return n}}var H=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(H.source,"g");function Je(t){return function(){return t}}function Ke(t){return function(e){return t(e)+""}}function Qe(t,e){var r=H.lastIndex=_.lastIndex=0,n,a,o,i=-1,s=[],f=[];for(t=t+"",e=e+"";(n=H.exec(t))&&(a=_.exec(e));)(o=a.index)>r&&(o=e.slice(r,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,f.push({i,x:E(n,a)})),r=_.lastIndex;return r<e.length&&(o=e.slice(r),s[i]?s[i]+=o:s[++i]=o),s.length<2?f[0]?Ke(f[0].x):Je(e):(e=f.length,function(c){for(var l=0,d;l<e;++l)s[(d=f[l]).i]=d.x(c);return s.join("")})}function de(t,e){var r=typeof e,n;return e==null||r==="boolean"?q(e):(r==="number"?E:r==="string"?(n=N(e))?(e=n,W):Qe:e instanceof N?W:e instanceof Date?Le:Oe(e)?Fe:Array.isArray(e)?Be:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ue:E)(t,e)}export{Ze as T,W as a,Qe as b,N as c,de as d,Ye as e,E as i};
@@ -1 +1 @@
1
- import{c as Y,r as V,j as i}from"./index-B2ZzxrDd.js";import{c as n}from"./button-CJFU-RdP.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
1
+ import{c as Y,r as V,j as i}from"./index-DEuqpeVv.js";import{c as n}from"./button-DXl1hVqx.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
@@ -1 +1 @@
1
- import{a as L,f as P,r as v,j as e,c as k}from"./index-B2ZzxrDd.js";import{d as _}from"./well-known-mcp-DOEdYmKO.js";import{C as R}from"./collection-tab-V_ZAHQk2.js";import{a as z,u as A}from"./use-connection-By0HWGmn.js";import{u as B}from"./project-context-provider-CwANTiF8.js";import{B as y}from"./button-CJFU-RdP.js";import{E as F}from"./empty-state-DSfHkDug.js";import{C as M}from"./collection-header-DiGbkMTg.js";import{b as O,a as H}from"./use-binding-kpHhQeiR.js";import{i as T}from"./Loading01-ByRd3GAn.js";import"./generate-id-Dyweu44Y.js";import"./connection-Cgb7Z5-V.js";import"./collection-display-button-DWT4ZvIF.js";import"./dropdown-menu-L8DDYrma.js";import"./Grid01-tEwYXVxO.js";import"./ArrowUp-Dj1nFRfD.js";import"./Check-MZfXJ4EP.js";import"./List-j3ISho_T.js";import"./tooltip-BZp1NNfI.js";import"./view-mode-toggle-Df6PEFKi.js";import"./collection-search-D3Bd0Mm5.js";import"./SearchMd-RcsY4Qc3.js";import"./input-BptR4gs0.js";import"./card-BARP50i4.js";import"./Copy01-DoisEbOD.js";import"./DotsVertical-CRTSoELg.js";import"./Edit01-BVpBBN26.js";import"./use-list-state-cqgmpDXc.js";import"./use-mobile-DHVQc88b.js";import"./Trash01-RdHotUor.js";import"./collection-table-wrapper-DToPOpkG.js";import"./empty-state-DltMEOY9.js";import"./Inbox01-Cekk6aOf.js";import"./avatar-C9xlNN_x.js";import"./useQuery-DVzj5fVO.js";import"./pin-to-sidebar-button-SoohzyKD.js";import"./use-organization-settings-C3rL2iPZ.js";import"./useMutation-Lj6qQmhH.js";import"./use-collections-BI8SI9I-.js";import"./constants-CRsABbUy.js";import"./alert-dialog-DIpJg2Aj.js";import"./Plus-B6dO5J-T.js";import"./layout-CuyqJIpj.js";import"./ArrowLeft-CNcRcLHi.js";import"./binder-nBmgAoSK.js";function V({title:i,description:t,wellKnownMcp:o,imageSrc:n,onConnected:s}){const r=z(),{org:{slug:m}}=B(),{data:h}=L.useSession(),p=P(),[a,N]=v.useState(!1),l=async()=>{if(!(!o||!h?.user?.id)){N(!0);try{const c=await r.create.mutateAsync(o);s?.(c.id),p({to:"/$org/mcps/$connectionId",params:{org:m,connectionId:c.id}})}finally{N(!1)}}},j=()=>{p({to:"/$org/mcps",params:{org:m},search:{action:"create"}})};return e.jsx(F,{image:n?e.jsx("img",{src:n,alt:i,width:336,height:320,className:"max-w-full h-auto"}):null,title:i,description:t,actions:e.jsxs(e.Fragment,{children:[e.jsxs(y,{variant:"outline",onClick:l,disabled:a||!o,children:[o?.icon&&e.jsx("img",{src:o.icon,alt:"",className:"size-4"}),a?"Installing...":`Install ${o?.title||"MCP"}`]}),e.jsx(y,{variant:"outline",onClick:j,children:"Custom Connection"})]})})}function q(i){const t=k.c(28),{bindingName:o,collectionName:n,title:s,emptyState:r,wellKnownMcp:m}=i,{org:h}=B(),p=A();let a;t[0]!==p||t[1]!==o?(a={connections:p,binding:o},t[0]=p,t[1]=o,t[2]=a):a=t[2];const l=O(a)[0],j=H(l);let c;if(t[3]!==n||t[4]!==j){let C;t[6]!==n?(C=$=>$.name.toLowerCase()===n.toLowerCase(),t[6]=n,t[7]=C):C=t[7],c=j.find(C),t[3]=n,t[4]=j,t[5]=c}else c=t[5];const S=c,[E,W]=v.useState(null),b=l&&S&&(l.id||E);let d;t[8]!==s?(d=e.jsx(M,{title:s}),t[8]=s,t[9]=d):d=t[9];let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=I):I=t[10];let f;t[11]!==s?(f=s.toLowerCase(),t[11]=s,t[12]=f):f=t[12];let u;t[13]!==f?(u=e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[I,e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",f,"..."]})]}),t[13]=f,t[14]=u):u=t[14];let g;t[15]!==S||t[16]!==l||t[17]!==r||t[18]!==h||t[19]!==b||t[20]!==m?(g=b?e.jsx(R,{connectionId:l.id,org:h.slug,activeCollection:S}):e.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:e.jsx(V,{title:r.title,description:r.description,wellKnownMcp:m,imageSrc:r.imageSrc,onConnected:C=>{W(C)}})}),t[15]=S,t[16]=l,t[17]=r,t[18]=h,t[19]=b,t[20]=m,t[21]=g):g=t[21];let x;t[22]!==u||t[23]!==g?(x=e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx(v.Suspense,{fallback:u,children:g})}),t[22]=u,t[23]=g,t[24]=x):x=t[24];let w;return t[25]!==d||t[26]!==x?(w=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=w):w=t[27],w}function zt(){const i=k.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(q,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:_()}),i[0]=t):t=i[0],t}export{zt as default};
1
+ import{a as L,f as P,r as v,j as e,c as k}from"./index-DEuqpeVv.js";import{d as _}from"./well-known-mcp-DOEdYmKO.js";import{C as R}from"./collection-tab-BofyxU3Y.js";import{a as z,u as A}from"./use-connection-DhRUkVvI.js";import{u as B}from"./project-context-provider-Dn1-l4h2.js";import{B as y}from"./button-DXl1hVqx.js";import{E as F}from"./empty-state-C7Gr5Tg2.js";import{C as M}from"./collection-header-BA9HTLmg.js";import{b as O,a as H}from"./use-binding-B0VMz_Ex.js";import{i as T}from"./Loading01-JwelopeC.js";import"./generate-id-Dyweu44Y.js";import"./connection-ByVJuREK.js";import"./collection-display-button-B_KC-ent.js";import"./dropdown-menu-Hp4qYTud.js";import"./Grid01-CRALWbj6.js";import"./ArrowUp-Ck0taqJi.js";import"./Check-Cjgi2ZiG.js";import"./List-DOmOO2Cw.js";import"./tooltip-vUrxHIt0.js";import"./view-mode-toggle-CTWk8Dkt.js";import"./collection-search-pUdl1eNx.js";import"./SearchMd-Cgfgcbdz.js";import"./input-CqqzkfyF.js";import"./card-D0GcpRPY.js";import"./Copy01-De4SwxDv.js";import"./DotsVertical-BhTwPxq7.js";import"./Edit01-DsRHb45T.js";import"./use-list-state-BYREPRxy.js";import"./use-mobile-CI2w7svc.js";import"./Trash01-KvZ0cVo9.js";import"./collection-table-wrapper-wARoPZXo.js";import"./empty-state-D-JjObLi.js";import"./Inbox01-CKGdnZFH.js";import"./avatar-d8M8JpvZ.js";import"./useQuery-BKyLWvSZ.js";import"./pin-to-sidebar-button-CrzVxc9I.js";import"./use-organization-settings-D0kNSjbq.js";import"./useMutation-xcmVYLP7.js";import"./use-collections-Cflasxiq.js";import"./constants-DQVDVC-J.js";import"./alert-dialog-gZhceV_v.js";import"./Plus-Df2M6Ns2.js";import"./layout-D7T4rJzl.js";import"./ArrowLeft-DlLOWSTj.js";import"./binder-iKe3ndXq.js";function V({title:i,description:t,wellKnownMcp:o,imageSrc:n,onConnected:s}){const r=z(),{org:{slug:m}}=B(),{data:h}=L.useSession(),p=P(),[a,N]=v.useState(!1),l=async()=>{if(!(!o||!h?.user?.id)){N(!0);try{const c=await r.create.mutateAsync(o);s?.(c.id),p({to:"/$org/mcps/$connectionId",params:{org:m,connectionId:c.id}})}finally{N(!1)}}},j=()=>{p({to:"/$org/mcps",params:{org:m},search:{action:"create"}})};return e.jsx(F,{image:n?e.jsx("img",{src:n,alt:i,width:336,height:320,className:"max-w-full h-auto"}):null,title:i,description:t,actions:e.jsxs(e.Fragment,{children:[e.jsxs(y,{variant:"outline",onClick:l,disabled:a||!o,children:[o?.icon&&e.jsx("img",{src:o.icon,alt:"",className:"size-4"}),a?"Installing...":`Install ${o?.title||"MCP"}`]}),e.jsx(y,{variant:"outline",onClick:j,children:"Custom Connection"})]})})}function q(i){const t=k.c(28),{bindingName:o,collectionName:n,title:s,emptyState:r,wellKnownMcp:m}=i,{org:h}=B(),p=A();let a;t[0]!==p||t[1]!==o?(a={connections:p,binding:o},t[0]=p,t[1]=o,t[2]=a):a=t[2];const l=O(a)[0],j=H(l);let c;if(t[3]!==n||t[4]!==j){let C;t[6]!==n?(C=$=>$.name.toLowerCase()===n.toLowerCase(),t[6]=n,t[7]=C):C=t[7],c=j.find(C),t[3]=n,t[4]=j,t[5]=c}else c=t[5];const S=c,[E,W]=v.useState(null),b=l&&S&&(l.id||E);let d;t[8]!==s?(d=e.jsx(M,{title:s}),t[8]=s,t[9]=d):d=t[9];let I;t[10]===Symbol.for("react.memo_cache_sentinel")?(I=e.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t[10]=I):I=t[10];let f;t[11]!==s?(f=s.toLowerCase(),t[11]=s,t[12]=f):f=t[12];let u;t[13]!==f?(u=e.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[I,e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",f,"..."]})]}),t[13]=f,t[14]=u):u=t[14];let g;t[15]!==S||t[16]!==l||t[17]!==r||t[18]!==h||t[19]!==b||t[20]!==m?(g=b?e.jsx(R,{connectionId:l.id,org:h.slug,activeCollection:S}):e.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:e.jsx(V,{title:r.title,description:r.description,wellKnownMcp:m,imageSrc:r.imageSrc,onConnected:C=>{W(C)}})}),t[15]=S,t[16]=l,t[17]=r,t[18]=h,t[19]=b,t[20]=m,t[21]=g):g=t[21];let x;t[22]!==u||t[23]!==g?(x=e.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:e.jsx(v.Suspense,{fallback:u,children:g})}),t[22]=u,t[23]=g,t[24]=x):x=t[24];let w;return t[25]!==d||t[26]!==x?(w=e.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d,x]}),t[25]=d,t[26]=x,t[27]=w):w=t[27],w}function zt(){const i=k.c(1);let t;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(q,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:_()}),i[0]=t):t=i[0],t}export{zt as default};
@@ -3,8 +3,8 @@
3
3
  <head>
4
4
  <title>MCP Mesh</title>
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <script type="module" crossorigin src="/assets/index-B2ZzxrDd.js"></script>
7
- <link rel="stylesheet" crossorigin href="/assets/index-CCciYu2S.css">
6
+ <script type="module" crossorigin src="/assets/index-DEuqpeVv.js"></script>
7
+ <link rel="stylesheet" crossorigin href="/assets/index-Dh9ePU0t.css">
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/mesh",
3
- "version": "2.17.2",
3
+ "version": "2.18.0",
4
4
  "description": "MCP Mesh - Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{r as a}from"./index-B2ZzxrDd.js";const c=({size:e=24,color:r="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:r,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));c.displayName="MessageChatSquare";export{c as t};
@@ -1 +0,0 @@
1
- import{aJ as a,bm as t}from"./index-B2ZzxrDd.js";const e="mcp.mesh",s=a(t,{target:"draft-7"});export{s as B,e as M};