@decocms/mesh 2.10.0 → 2.12.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 (139) hide show
  1. package/dist/client/assets/{AlertCircle-BI-lv-P2.js → AlertCircle-Cso_Xxvk.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-WX776rGw.js → ArrowLeft-BrsZ2N_5.js} +1 -1
  3. package/dist/client/assets/{Check-Dh23dmDM.js → Check-JFkjTCfG.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-CQl6wdMq.js → ChevronDown-HtFMO0lw.js} +1 -1
  5. package/dist/client/assets/{Clock-C2L66fjj.js → Clock-CW5u1cfj.js} +1 -1
  6. package/dist/client/assets/{Code01-BvYrq72o.js → Code01-CgNchnl3.js} +1 -1
  7. package/dist/client/assets/{Copy01-BX4_oHqx.js → Copy01-Dadp_RDG.js} +1 -1
  8. package/dist/client/assets/{DotsHorizontal-9lU8MC-X.js → DotsHorizontal-B0A7sUYv.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-BBtotCm7.js → DotsVertical-BHUUUCDx.js} +1 -1
  10. package/dist/client/assets/Edit01-CxRkZTQ1.js +1 -0
  11. package/dist/client/assets/{File06-lv7rH_v1.js → File06-D0TXCuMx.js} +1 -1
  12. package/dist/client/assets/{FilterLines-WZSp93Oe.js → FilterLines-_uykt7r4.js} +1 -1
  13. package/dist/client/assets/{FlipBackward-CqqvNJYu.js → FlipBackward-GGMv99yc.js} +1 -1
  14. package/dist/client/assets/{GitBranch01-DN-LFsG4.js → GitBranch01-BUTuezlq.js} +1 -1
  15. package/dist/client/assets/{Grid01-bigl9l-5.js → Grid01-BbdtRdR8.js} +1 -1
  16. package/dist/client/assets/{Inbox01-BIZdM9VF.js → Inbox01-CgwXLK3n.js} +1 -1
  17. package/dist/client/assets/{InfoCircle-FggQ2WMl.js → InfoCircle-D6qJG9Nl.js} +1 -1
  18. package/dist/client/assets/{Key01-BHIpjeh2.js → Key01-8ewaPBuD.js} +1 -1
  19. package/dist/client/assets/{LinkExternal01-YcVnQhq1.js → LinkExternal01-D0Wjfr3t.js} +1 -1
  20. package/dist/client/assets/{Loading01-nz4zkIiQ.js → Loading01-NW_f44Lz.js} +1 -1
  21. package/dist/client/assets/{Lock01-DJbaRRVq.js → Lock01-BTPtPjN4.js} +1 -1
  22. package/dist/client/assets/{Play-Dy3YBriV.js → Play-CIMfsFF1.js} +1 -1
  23. package/dist/client/assets/{Plus-DRzcJPy4.js → Plus-DaP4KLuJ.js} +1 -1
  24. package/dist/client/assets/{SearchMd-CGgWiIHk.js → SearchMd-tOSOFUes.js} +1 -1
  25. package/dist/client/assets/{Terminal-DDxodu0O.js → Terminal-ANRX3jJ8.js} +1 -1
  26. package/dist/client/assets/{Trash01-Nn4emH5w.js → Trash01-CjDzx3jP.js} +1 -1
  27. package/dist/client/assets/{X-CSDtf13Z.js → X-D3ljCSd1.js} +1 -1
  28. package/dist/client/assets/{XClose-Da4Q_9Br.js → XClose-Ba3zyI0J.js} +1 -1
  29. package/dist/client/assets/{alert-dialog-BrdP9Xiy.js → alert-dialog-_Gzpv9vf.js} +1 -1
  30. package/dist/client/assets/{auth-BkX07Kdp.js → auth-C9dSkS_x.js} +1 -1
  31. package/dist/client/assets/{auth-catchall-CgZMKj4U.js → auth-catchall-DRL5ZGJM.js} +1 -1
  32. package/dist/client/assets/{avatar-DVkpHhcq.js → avatar-D1o5pnzU.js} +1 -1
  33. package/dist/client/assets/{badge-DZOpuutl.js → badge-0b6sJe4S.js} +1 -1
  34. package/dist/client/assets/{card-VaGCmdRN.js → card-B3fsloDi.js} +1 -1
  35. package/dist/client/assets/{checkbox-B6_pb64c.js → checkbox-2xIaHvS4.js} +1 -1
  36. package/dist/client/assets/{collection-detail-BZTq36Jq.js → collection-detail-Bu5gtjud.js} +31 -31
  37. package/dist/client/assets/{collection-display-button-0kCgwjcX.js → collection-display-button-BGIcja12.js} +1 -1
  38. package/dist/client/assets/{collection-header-C5jLEW4T.js → collection-header-DhWbmVkk.js} +1 -1
  39. package/dist/client/assets/{collection-page-BxN-pfZ4.js → collection-page-B4ZjGX9V.js} +1 -1
  40. package/dist/client/assets/{collection-search-DCk3URyd.js → collection-search-CYZk6T6Z.js} +1 -1
  41. package/dist/client/assets/collection-tab-IeT0mJ-2.js +1 -0
  42. package/dist/client/assets/{collection-table-wrapper-DbtYisXO.js → collection-table-wrapper-D2niE2Ci.js} +1 -1
  43. package/dist/client/assets/connection-card-D0c_wvmz.js +1 -0
  44. package/dist/client/assets/connection-detail-BmNPUV8x.js +1 -0
  45. package/dist/client/assets/connections-U2y3agtD.js +1 -0
  46. package/dist/client/assets/constants-Cy709IUA.js +1 -0
  47. package/dist/client/assets/{create-organization-dialog-BcohdvN6.js → create-organization-dialog-D0WQQsLG.js} +1 -1
  48. package/dist/client/assets/{dialog-rGW8NOdv.js → dialog-BXeLl5mO.js} +1 -1
  49. package/dist/client/assets/{dropdown-menu-DEdU2p2E.js → dropdown-menu-CnL8UM0z.js} +1 -1
  50. package/dist/client/assets/{empty-state-C6fFQCSt.js → empty-state-BmkZOMzL.js} +1 -1
  51. package/dist/client/assets/empty-state-DzS1Zp7m.js +2 -0
  52. package/dist/client/assets/{env-vars-editor-DtIOMaFz.js → env-vars-editor-B_mIaT86.js} +1 -1
  53. package/dist/client/assets/{error-boundary-B28JvE1I.js → error-boundary-BQnJ9S9E.js} +1 -1
  54. package/dist/client/assets/{extract-connection-data-fJTZE6Hc.js → extract-connection-data-DPoJQhk8.js} +1 -1
  55. package/dist/client/assets/{form-CE1tfcze.js → form-DrOt6d2d.js} +1 -1
  56. package/dist/client/assets/gateway-detail-CniDbJPb.js +1 -0
  57. package/dist/client/assets/gateways-DmEpJOpx.js +1 -0
  58. package/dist/client/assets/{home-lONkAboE.js → home-HrkEcREJ.js} +1 -1
  59. package/dist/client/assets/{index-CJEYCkTv.js → index-Bb8rHnPb.js} +1 -1
  60. package/dist/client/assets/index-CBIrwxtj.js +88 -0
  61. package/dist/client/assets/index-ChrSnaFS.css +1 -0
  62. package/dist/client/assets/{index-Dc4mPG7D.js → index-DMNk-OUX.js} +3 -3
  63. package/dist/client/assets/index-GoXtajA4.js +25 -0
  64. package/dist/client/assets/{index-CGbuv4sL.js → index-XOpbMEap.js} +1 -1
  65. package/dist/client/assets/{input-CLQFaB_P.js → input-68J17rBp.js} +1 -1
  66. package/dist/client/assets/{layout-D-qTqL0P.js → layout-Olb4shdE.js} +1 -1
  67. package/dist/client/assets/{lazy-highlighter-CM_r6Qg6.js → lazy-highlighter-Ccgc_fxj.js} +1 -1
  68. package/dist/client/assets/localstorage-keys-C62ZbWuB.js +1 -0
  69. package/dist/client/assets/{login-CY0fBMtA.js → login-UTKAAaeX.js} +1 -1
  70. package/dist/client/assets/{mcp-oauth-DwoWo555.js → mcp-oauth-Db8WtQ8u.js} +1 -1
  71. package/dist/client/assets/mcp-server-detail-BvVQovUz.js +1 -0
  72. package/dist/client/assets/members-V-vtwMYY.js +3 -0
  73. package/dist/client/assets/{monaco-editor-CGmVJ7Sz.js → monaco-editor-B_MycISs.js} +1 -1
  74. package/dist/client/assets/{monitoring-8m7n1ABH.js → monitoring-CBmCnQ7i.js} +20 -20
  75. package/dist/client/assets/{oauth-callback-C3UTt1IM.js → oauth-callback-BYBqbF1w.js} +1 -1
  76. package/dist/client/assets/page-DYF0Qz3l.js +1 -0
  77. package/dist/client/assets/page-DrIZd1pO.js +35 -0
  78. package/dist/client/assets/{pin-to-sidebar-button-DmlmCu_p.js → pin-to-sidebar-button-B1xHHS9n.js} +1 -1
  79. package/dist/client/assets/{popover-Bt6Irkfs.js → popover-DC9U4d6e.js} +1 -1
  80. package/dist/client/assets/{project-context-provider-jIErvTKU.js → project-context-provider-BJIP5a-U.js} +1 -1
  81. package/dist/client/assets/{resizable-BDACILOB.js → resizable-CW5_SPIS.js} +1 -1
  82. package/dist/client/assets/{resource-tabs-B9UXtdu9.js → resource-tabs-BKSlcL1W.js} +1 -1
  83. package/dist/client/assets/{select-CXOQrDyU.js → select-B9KJyTZZ.js} +1 -1
  84. package/dist/client/assets/{settings-Cml1v0xs.js → settings-CYg4YPRI.js} +1 -1
  85. package/dist/client/assets/shell-layout-KIN6fL5j.js +3 -0
  86. package/dist/client/assets/{spinner-C-rDsJGC.js → spinner-B0sczm1j.js} +1 -1
  87. package/dist/client/assets/{switch-C2oVrx7C.js → switch-BuVvmF04.js} +1 -1
  88. package/dist/client/assets/{textarea-DxDFaLzd.js → textarea-BAUX8Qgd.js} +1 -1
  89. package/dist/client/assets/thread-history-popover-Dv63nk6L.js +20 -0
  90. package/dist/client/assets/tool-set-selector-DMsE0yRo.js +1 -0
  91. package/dist/client/assets/tools-list-Dgf0oqyC.js +1 -0
  92. package/dist/client/assets/{use-binding-C_WCv3Kw.js → use-binding-Dj4lal1A.js} +1 -1
  93. package/dist/client/assets/use-connection-DoWszS3j.js +1 -0
  94. package/dist/client/assets/{use-connection-resources-DAy5w-Ms.js → use-connection-resources-BywYCfzc.js} +1 -1
  95. package/dist/client/assets/use-create-gateway-Ca5SEa8I.js +1 -0
  96. package/dist/client/assets/use-gateway-CRpsitbG.js +1 -0
  97. package/dist/client/assets/{use-gateway-system-prompt-B0FWJC8i.js → use-gateway-system-prompt-B4ia2QxW.js} +1 -1
  98. package/dist/client/assets/{use-list-state-D9IMsf4Z.js → use-list-state-CPUcOhR_.js} +1 -1
  99. package/dist/client/assets/use-mcp-L2lisTXg.js +1 -0
  100. package/dist/client/assets/{use-members-BrVgN1Nv.js → use-members-7eRdYOTr.js} +1 -1
  101. package/dist/client/assets/{use-mobile-BmTi-FB3.js → use-mobile--ytA5LT5.js} +1 -1
  102. package/dist/client/assets/use-organization-settings-D6rXW2c_.js +1 -0
  103. package/dist/client/assets/use-tool-call-BBonHr6l.js +1 -0
  104. package/dist/client/assets/{value-Duay7dd7.js → value-Bd2XBV_y.js} +1 -1
  105. package/dist/client/assets/{view-mode-toggle-Q_4Hio7O.js → view-mode-toggle-BpjQ6V4P.js} +1 -1
  106. package/dist/client/assets/well-known-mcp-D13f-8h2.js +1 -0
  107. package/dist/client/assets/workflow-CjynHD6b.js +1 -0
  108. package/dist/client/index.html +2 -2
  109. package/dist/server/cli.js +161 -133
  110. package/dist/server/migrate.js +2 -2
  111. package/dist/server/server.js +162 -134
  112. package/package.json +1 -1
  113. package/dist/client/assets/collection-tab-BK4lXf-5.js +0 -1
  114. package/dist/client/assets/connection-card-CtcQXchE.js +0 -1
  115. package/dist/client/assets/connection-detail-Dtnc6jAX.js +0 -1
  116. package/dist/client/assets/connections-BkTTX2-6.js +0 -1
  117. package/dist/client/assets/constants-D7HtiX2k.js +0 -1
  118. package/dist/client/assets/gateway-detail-DpvUxeca.js +0 -1
  119. package/dist/client/assets/gateways-DPTsKKk2.js +0 -1
  120. package/dist/client/assets/index-B-_GLG4a.js +0 -25
  121. package/dist/client/assets/index-DjBifmxL.js +0 -88
  122. package/dist/client/assets/index-KJvlasGf.css +0 -1
  123. package/dist/client/assets/localstorage-keys-Csxol0-8.js +0 -1
  124. package/dist/client/assets/mcp-server-detail-BfkMNCXA.js +0 -1
  125. package/dist/client/assets/members-DlfrW4qm.js +0 -3
  126. package/dist/client/assets/page-CjTfwiJs.js +0 -1
  127. package/dist/client/assets/page-Cm8i9onu.js +0 -35
  128. package/dist/client/assets/shell-layout-BC-hIRVP.js +0 -3
  129. package/dist/client/assets/thread-history-popover-D_x2TXEl.js +0 -72
  130. package/dist/client/assets/tool-set-selector-B03cDU_f.js +0 -1
  131. package/dist/client/assets/tools-list-CCvCpz3e.js +0 -1
  132. package/dist/client/assets/use-connection-D1oWmd80.js +0 -2
  133. package/dist/client/assets/use-gateway-DEBoqh3W.js +0 -1
  134. package/dist/client/assets/use-mcp-BSK2ddKq.js +0 -1
  135. package/dist/client/assets/use-organization-settings-DPGpmRIO.js +0 -1
  136. package/dist/client/assets/use-tool-call-B5UsmKnA.js +0 -1
  137. package/dist/client/assets/useQuery-CjN7yze9.js +0 -1
  138. package/dist/client/assets/well-known-mcp-7PcWXInp.js +0 -1
  139. package/dist/client/assets/workflow-C6xPZGlX.js +0 -1
@@ -1 +1 @@
1
- import{r as i,j as e}from"./index-Dc4mPG7D.js";import{i as n}from"./Loading01-nz4zkIiQ.js";import{h as l}from"./mcp-oauth-DwoWo555.js";import"./auth-BkX07Kdp.js";function x(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{x as default};
1
+ import{r as i,j as e}from"./index-DMNk-OUX.js";import{i as n}from"./Loading01-NW_f44Lz.js";import{h as l}from"./mcp-oauth-Db8WtQ8u.js";import"./auth-C9dSkS_x.js";function x(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{x as default};
@@ -0,0 +1 @@
1
+ import{a1 as ae,r as K,c as O,p as ce,K as X,am as me,j as s,f as se,a as de,k as fe,q as ue}from"./index-DMNk-OUX.js";import{b as xe,c as pe}from"./well-known-mcp-D13f-8h2.js";import{C as ge}from"./collection-header-DhWbmVkk.js";import{I as he,i as le}from"./FilterLines-_uykt7r4.js";import{n as je}from"./Inbox01-CgwXLK3n.js";import{i as U}from"./Loading01-NW_f44Lz.js";import{i as re}from"./SearchMd-tOSOFUes.js";import{c as ve,a as ie,u as Ne}from"./use-connection-DoWszS3j.js";import{c as ye,I as Ce,E as be}from"./empty-state-DzS1Zp7m.js";import{a as Se,f as we,b as Te}from"./registry-utils-B7t_ZBUi.js";import{b as Ie,T as ke,c as Re,u as Z}from"./project-context-provider-BJIP5a-U.js";import{s as $e}from"./slugify-CEUa2lfQ.js";import{C as ze}from"./collection-search-CYZk6T6Z.js";import{i as Le}from"./Lock01-BTPtPjN4.js";import{C as Pe}from"./card-B3fsloDi.js";import{g as Fe}from"./github-icon-Dp3wHhYE.js";import{e as Ae}from"./server-name-C3ttWdyD.js";import{B as G,I as Ee}from"./input-68J17rBp.js";import{P as De,a as Ke,b as Ve}from"./popover-DC9U4d6e.js";import{i as Be}from"./Check-JFkjTCfG.js";import{t as Me}from"./ChevronDown-HtFMO0lw.js";import{s as Q}from"./XClose-Ba3zyI0J.js";import{d as _e,a as Oe,b as We,c as qe,S as Ge}from"./select-B9KJyTZZ.js";import{s as He}from"./Plus-DaP4KLuJ.js";import{a as Qe}from"./use-binding-Dj4lal1A.js";import{L as Ue,u as Ye}from"./localstorage-keys-C62ZbWuB.js";import"./collection-display-button-BGIcja12.js";import"./dropdown-menu-CnL8UM0z.js";import"./Grid01-BbdtRdR8.js";import"./view-mode-toggle-BpjQ6V4P.js";import"./auth-C9dSkS_x.js";function Ze(t,e){return ae(t,he,e)}const ne=({size:t=24,color:e="currentColor",...l})=>K.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},K.createElement("path",{d:"m9 12 2 2 4.5-4.5m2.401-4.501a2.03 2.03 0 0 0 1.1 1.1l1.744.723a2.033 2.033 0 0 1 1.1 2.656l-.722 1.744a2.03 2.03 0 0 0 0 1.556l.722 1.744a2.033 2.033 0 0 1-1.1 2.656L19 17.901A2.033 2.033 0 0 0 17.9 19l-.723 1.745a2.032 2.032 0 0 1-2.656 1.1l-1.744-.722a2.032 2.032 0 0 0-1.555 0l-1.745.723a2.033 2.033 0 0 1-2.654-1.1L6.1 19.001A2.033 2.033 0 0 0 5 17.9l-1.744-.723a2.033 2.033 0 0 1-1.1-2.654l.721-1.744a2.033 2.033 0 0 0 0-1.556l-.722-1.746a2.033 2.033 0 0 1 1.1-2.657L5 6.098A2.03 2.03 0 0 0 6.1 5l.723-1.745a2.033 2.033 0 0 1 2.656-1.1l1.744.722a2.033 2.033 0 0 0 1.555-.001l1.746-.72a2.032 2.032 0 0 1 2.655 1.1l.723 1.746v-.003Z"}));ne.displayName="CheckVerified02";function Je(t,e){const l=O.c(4),[c,o]=K.useState(t),r=K.useRef(null),a=K.useRef(!0);let i,g;return l[0]!==e||l[1]!==t?(i=()=>{if(a.current){a.current=!1;return}return r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o(t)},e),()=>{r.current&&clearTimeout(r.current)}},g=[t,e],l[0]=e,l[1]=t,l[2]=i,l[3]=g):(i=l[2],g=l[3]),K.useEffect(i,g),c}const Xe=24;function et(t){const e=O.c(52),{registryId:l,listToolName:c,filtersToolName:o,search:r}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[i,g]=K.useState(a);let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[1]=u):u=e[1];const[m,n]=K.useState(u);let x;e[2]!==l?(x=ye(l),e[2]=l,e[3]=x):x=e[3];const d=x,p=!!o;let j;e[4]!==o||e[5]!==l?(j=X.toolCall(l,o||"no-filters","{}"),e[4]=o,e[5]=l,e[6]=j):j=e[6];let y;e[7]!==o||e[8]!==d?(y=async()=>o?await d(o,{}):{tags:[],categories:[]},e[7]=o,e[8]=d,e[9]=y):y=e[9];let k;e[10]!==j||e[11]!==y?(k={queryKey:j,queryFn:y,staleTime:36e5},e[10]=j,e[11]=y,e[12]=k):k=e[12];const{data:T}=ce(k);let S,C,I;if(e[13]!==c||e[14]!==l||e[15]!==r||e[16]!==m||e[17]!==i){const M=r?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:r},{field:["title"],operator:"contains",value:r},{field:["description"],operator:"contains",value:r}]}:void 0;S={limit:Xe,...i.length>0&&{tags:i},...m.length>0&&{categories:m},...M&&{where:M}},I=Ze,C=X.toolCall(l,c,JSON.stringify(S)),e[13]=c,e[14]=l,e[15]=r,e[16]=m,e[17]=i,e[18]=S,e[19]=C,e[20]=I}else S=e[18],C=e[19],I=e[20];let N;e[21]!==S||e[22]!==c||e[23]!==d?(N=async M=>{const{pageParam:J}=M,oe=J?{...S,cursor:J}:S;return await d(c,oe)},e[21]=S,e[22]=c,e[23]=d,e[24]=N):N=e[24];let b;e[25]!==C||e[26]!==N?(b={queryKey:C,queryFn:N,initialPageParam:void 0,getNextPageParam:tt,staleTime:36e5,placeholderData:me},e[25]=C,e[26]=N,e[27]=b):b=e[27];const{data:R,fetchNextPage:$,hasNextPage:L,isFetchingNextPage:P,isFetching:f,isLoading:h}=I(b);let w;e:{if(!R?.pages||R.pages.length===0){w=null;break e}const M=R.pages[0];if(typeof M=="object"&&M!==null&&"totalCount"in M&&typeof M.totalCount=="number"){w=M.totalCount;break e}w=null}const z=w,F=R?.pages;let v;e[28]!==F?(v=Se(F),e[28]=F,e[29]=v):v=e[29];const E=v;let A;e[30]!==r||e[31]!==m.length||e[32]!==i.length?(A=i.length>0||m.length>0||!!r?.trim(),e[30]=r,e[31]=m.length,e[32]=i.length,e[33]=A):A=e[33];const D=A,_=f&&!P&&!h&&D;let W;e[34]!==$||e[35]!==L||e[36]!==P?(W=()=>{L&&!P&&$()},e[34]=$,e[35]=L,e[36]=P,e[37]=W):W=e[37];const V=W,B=L??!1,q=p?T?.tags:void 0,Y=p?T?.categories:void 0;let H;return e[38]!==D||e[39]!==f||e[40]!==P||e[41]!==_||e[42]!==h||e[43]!==E||e[44]!==V||e[45]!==m||e[46]!==i||e[47]!==B||e[48]!==q||e[49]!==Y||e[50]!==z?(H={items:E,totalCount:z,hasMore:B,isLoadingMore:P,isFiltering:_,isInitialLoading:h,isFetching:f,loadMore:V,availableTags:q,availableCategories:Y,selectedTags:i,selectedCategories:m,setSelectedTags:g,setSelectedCategories:n,hasActiveFilters:D},e[38]=D,e[39]=f,e[40]=P,e[41]=_,e[42]=h,e[43]=E,e[44]=V,e[45]=m,e[46]=i,e[47]=B,e[48]=q,e[49]=Y,e[50]=z,e[51]=H):H=e[51],H}function tt(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function st(t){const e=t.title||t.server.title||t.id||"Unnamed Item",l=t._meta?.["mcp.mesh"],c=l?.short_description||l?.mesh_description||t.server.description||null,o=t.server.icons?.[0]?.src||Fe(t.server.repository)||null,r=l?.verified??!1,a=t.server.version,g=(t.server.remotes?.length??0)>0;let u=e,m=null;if(e.includes("/")){const n=e.split("/");n.length>=2&&(m=n[0]||null,u=Ae(e))}if(!m){const n=l?.scopeName,x=l?.appName;n&&x?m=`${n}/${x}`:n&&(m=n)}return l?.friendly_name&&(u=l.friendly_name),{icon:o,scopeName:m,displayName:u,description:c,version:a||null,isVerified:r,canInstall:g}}function lt(t){const e=O.c(39),{icon:l,scopeName:c,displayName:o,description:r,isVerified:a,canInstall:i,onClick:g}=t;let u;e[0]!==o||e[1]!==l?(u=s.jsx(Ce,{icon:l,name:o,size:"md",className:"shadow-sm"}),e[0]=o,e[1]=l,e[2]=u):u=e[2];let m;e[3]!==o?(m=s.jsx("span",{className:"truncate",children:o}),e[3]=o,e[4]=m):m=e[4];let n;e[5]!==a?(n=a&&s.jsx(ne,{size:16,className:"text-success shrink-0"}),e[5]=a,e[6]=n):n=e[6];let x;e[7]!==i?(x=!i&&s.jsx(Le,{size:16,className:"text-muted-foreground shrink-0"}),e[7]=i,e[8]=x):x=e[8];let d;e[9]!==m||e[10]!==n||e[11]!==x?(d=s.jsx(Ie,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-2 text-base font-medium min-w-0",children:[m,n,x]})}),e[9]=m,e[10]=n,e[11]=x,e[12]=d):d=e[12];let p;e[13]!==o?(p=s.jsx("p",{children:o}),e[13]=o,e[14]=p):p=e[14];let j;e[15]!==i?(j=!i&&s.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[15]=i,e[16]=j):j=e[16];let y;e[17]!==p||e[18]!==j?(y=s.jsxs(ke,{children:[p,j]}),e[17]=p,e[18]=j,e[19]=y):y=e[19];let k;e[20]!==d||e[21]!==y?(k=s.jsxs(Re,{children:[d,y]}),e[20]=d,e[21]=y,e[22]=k):k=e[22];let T;e[23]!==c?(T=c&&s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:c}),e[23]=c,e[24]=T):T=e[24];let S;e[25]!==T||e[26]!==k?(S=s.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:s.jsxs("div",{className:"min-w-0 flex-1",children:[k,T]})}),e[25]=T,e[26]=k,e[27]=S):S=e[27];let C;e[28]!==u||e[29]!==S?(C=s.jsxs("div",{className:"flex gap-3",children:[u,S]}),e[28]=u,e[29]=S,e[30]=C):C=e[30];const I=r||"No description available";let N;e[31]!==I?(N=s.jsx("div",{className:"grid grid-cols-1 gap-1 min-w-0",children:s.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:I})}),e[31]=I,e[32]=N):N=e[32];let b;e[33]!==C||e[34]!==N?(b=s.jsxs("div",{className:"flex flex-col gap-4 h-full relative",children:[C,N]}),e[33]=C,e[34]=N,e[35]=b):b=e[35];let R;return e[36]!==g||e[37]!==b?(R=s.jsx(Pe,{className:"p-6 cursor-pointer hover:bg-muted/50 transition-colors",onClick:g,children:b}),e[36]=g,e[37]=b,e[38]=R):R=e[38],R}function ee(t){const e=O.c(12),{items:l,title:c,onItemClick:o}=t;if(l.length===0)return null;let r;e[0]!==c?(r=c&&s.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:s.jsx("h2",{className:"text-lg font-medium",children:c})}),e[0]=c,e[1]=r):r=e[1];let a;if(e[2]!==l||e[3]!==o){let u;e[5]!==o?(u=m=>{const n=st(m);return s.jsx(lt,{...n,onClick:()=>o(m)},m.id)},e[5]=o,e[6]=u):u=e[6],a=l.map(u),e[2]=l,e[3]=o,e[4]=a}else a=e[4];let i;e[7]!==a?(i=s.jsx("div",{className:"grid grid-cols-4 gap-4",children:a}),e[7]=a,e[8]=i):i=e[8];let g;return e[9]!==r||e[10]!==i?(g=s.jsxs("div",{className:"flex flex-col gap-4",children:[r,i]}),e[9]=r,e[10]=i,e[11]=g):g=e[11],g}function rt(t,e){return[...t].sort((l,c)=>c.count-l.count).slice(0,e)}function te(t){const e=O.c(52),{label:l,items:c,selectedItems:o,onToggle:r,onClear:a}=t,[i,g]=K.useState(""),[u,m]=K.useState(!1);let n,x,d,p,j,y,k,T,S,C,I;if(e[0]!==c||e[1]!==l||e[2]!==r||e[3]!==u||e[4]!==i||e[5]!==o){const P=[...i?c.filter(A=>A.value.toLowerCase().includes(i.toLowerCase())):c].sort(it);d=o.length,x=De,S=u,C=m;let f;e[17]!==l?(f=s.jsx("span",{children:l}),e[17]=l,e[18]=f):f=e[18];let h;e[19]!==d?(h=d>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:d}),e[19]=d,e[20]=h):h=e[20];let w;e[21]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Me,{size:14,className:"opacity-50"}),e[21]=w):w=e[21],e[22]!==h||e[23]!==f?(I=s.jsx(Ke,{asChild:!0,children:s.jsxs(G,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[f,h,w]})}),e[22]=h,e[23]=f,e[24]=I):I=e[24],n=Ve,y="w-64 p-0",k="start";let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(re,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=z):z=e[25];let F;e[26]!==l?(F=l.toLowerCase(),e[26]=l,e[27]=F):F=e[27];const v=`Search ${F}...`;let E;e[28]===Symbol.for("react.memo_cache_sentinel")?(E=A=>g(A.target.value),e[28]=E):E=e[28],e[29]!==i||e[30]!==v?(T=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[z,s.jsx(Ee,{type:"text",placeholder:v,value:i,onChange:E,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=i,e[30]=v,e[31]=T):T=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",j=P.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):P.map(A=>{const D=o.includes(A.value);return s.jsxs("button",{onClick:()=>r(A.value),className:`w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors ${D?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"}`,children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[D&&s.jsx(Be,{size:16,className:"text-muted-foreground shrink-0"}),A.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:A.count})]},A.value)}),e[0]=c,e[1]=l,e[2]=r,e[3]=u,e[4]=i,e[5]=o,e[6]=n,e[7]=x,e[8]=d,e[9]=p,e[10]=j,e[11]=y,e[12]=k,e[13]=T,e[14]=S,e[15]=C,e[16]=I}else n=e[6],x=e[7],d=e[8],p=e[9],j=e[10],y=e[11],k=e[12],T=e[13],S=e[14],C=e[15],I=e[16];let N;e[32]!==p||e[33]!==j?(N=s.jsx("div",{className:p,children:j}),e[32]=p,e[33]=j,e[34]=N):N=e[34];let b;e[35]!==l||e[36]!==a||e[37]!==d?(b=d>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(G,{variant:"ghost",size:"sm",onClick:a,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",l.toLowerCase()]})}),e[35]=l,e[36]=a,e[37]=d,e[38]=b):b=e[38];let R;e[39]!==n||e[40]!==b||e[41]!==y||e[42]!==k||e[43]!==T||e[44]!==N?(R=s.jsxs(n,{className:y,align:k,children:[T,N,b]}),e[39]=n,e[40]=b,e[41]=y,e[42]=k,e[43]=T,e[44]=N,e[45]=R):R=e[45];let $;return e[46]!==x||e[47]!==R||e[48]!==S||e[49]!==C||e[50]!==I?($=s.jsxs(x,{open:S,onOpenChange:C,children:[I,R]}),e[46]=x,e[47]=R,e[48]=S,e[49]=C,e[50]=I,e[51]=$):$=e[51],$}function it(t,e){return e.count-t.count}function nt(t){const e=O.c(67),{availableTags:l,availableCategories:c,selectedTags:o,selectedCategories:r,onTagChange:a,onCategoryChange:i}=t,g=l&&l.length>0||c&&c.length>0,u=o.length>0||r.length>0;if(!g)return null;let m;e[0]!==a||e[1]!==o?(m=f=>{o.includes(f)?a(o.filter(h=>h!==f)):a([...o,f])},e[0]=a,e[1]=o,e[2]=m):m=e[2];const n=m;let x;e[3]!==i||e[4]!==r?(x=f=>{r.includes(f)?i(r.filter(h=>h!==f)):i([...r,f])},e[3]=i,e[4]=r,e[5]=x):x=e[5];const d=x;let p;e[6]!==i||e[7]!==a?(p=()=>{a([]),i([])},e[6]=i,e[7]=a,e[8]=p):p=e[8];const j=p;let y,k,T,S,C,I,N;if(e[9]!==c||e[10]!==l||e[11]!==i||e[12]!==a||e[13]!==r||e[14]!==o||e[15]!==d||e[16]!==n){const f=c?rt(c,6):[];y=r,k=o,N=new Set(f.map(ot)),C="flex items-center border-b border-border";let h;e[24]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(le,{size:16})}),e[24]=h):h=e[24];let w;e[25]!==c||e[26]!==i||e[27]!==r||e[28]!==d?(w=c&&c.length>0&&s.jsx(te,{label:"Categories",items:c,selectedItems:r,onToggle:d,onClear:()=>i([])}),e[25]=c,e[26]=i,e[27]=r,e[28]=d,e[29]=w):w=e[29];let z;e[30]!==l||e[31]!==a||e[32]!==o||e[33]!==n?(z=l&&l.length>0&&s.jsx(te,{label:"Tags",items:l,selectedItems:o,onToggle:n,onClear:()=>a([])}),e[30]=l,e[31]=a,e[32]=o,e[33]=n,e[34]=z):z=e[34],e[35]!==z||e[36]!==w?(I=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[h,w,z]}),e[35]=z,e[36]=w,e[37]=I):I=e[37],T="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==r||e[39]!==d?(F=v=>{const E=r.includes(v.value);return s.jsxs("div",{onClick:()=>d(v.value),className:`inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer ${E?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"}`,children:[s.jsx("span",{children:v.value}),E&&s.jsx("span",{onClick:A=>{A.stopPropagation(),d(v.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Q,{size:12})})]},v.value)},e[38]=r,e[39]=d,e[40]=F):F=e[40],S=f.map(F),e[9]=c,e[10]=l,e[11]=i,e[12]=a,e[13]=r,e[14]=o,e[15]=d,e[16]=n,e[17]=y,e[18]=k,e[19]=T,e[20]=S,e[21]=C,e[22]=I,e[23]=N}else y=e[17],k=e[18],T=e[19],S=e[20],C=e[21],I=e[22],N=e[23];let b;if(e[41]!==y||e[42]!==d||e[43]!==N){let f;e[45]!==N?(f=w=>!N.has(w),e[45]=N,e[46]=f):f=e[46];let h;e[47]!==d?(h=w=>s.jsxs("div",{onClick:()=>d(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:z=>{z.stopPropagation(),d(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Q,{size:12})})]},`cat-${w}`),e[47]=d,e[48]=h):h=e[48],b=y.filter(f).map(h),e[41]=y,e[42]=d,e[43]=N,e[44]=b}else b=e[44];let R;if(e[49]!==k||e[50]!==n){let f;e[52]!==n?(f=h=>s.jsxs("div",{onClick:()=>n(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:w=>{w.stopPropagation(),n(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Q,{size:12})})]},`tag-${h}`),e[52]=n,e[53]=f):f=e[53],R=k.map(f),e[49]=k,e[50]=n,e[51]=R}else R=e[51];let $;e[54]!==j||e[55]!==u?($=u&&s.jsxs(G,{variant:"ghost",size:"sm",onClick:j,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(Q,{size:14}),"Clear all"]}),e[54]=j,e[55]=u,e[56]=$):$=e[56];let L;e[57]!==$||e[58]!==T||e[59]!==S||e[60]!==b||e[61]!==R?(L=s.jsxs("div",{className:T,children:[S,b,R,$]}),e[57]=$,e[58]=T,e[59]=S,e[60]=b,e[61]=R,e[62]=L):L=e[62];let P;return e[63]!==L||e[64]!==C||e[65]!==I?(P=s.jsxs("div",{className:C,children:[I,L]}),e[63]=L,e[64]=C,e[65]=I,e[66]=P):P=e[66],P}function ot(t){return t.value}function at(t,e){if(!e)return t;const l=e.toLowerCase();return t.filter(c=>(c.name||c.title||"").toLowerCase().includes(l)||(c.description||c.server.description||"").toLowerCase().includes(l))}function ct(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function mt(t){const e=O.c(51),{registryId:l,listToolName:c,filtersToolName:o}=t,[r,a]=K.useState(""),i=Je(r,300),g=se(),{org:u}=Z(),m=K.useRef(null);let n;e[0]!==i||e[1]!==o||e[2]!==c||e[3]!==l?(n={registryId:l,listToolName:c,filtersToolName:o,search:i},e[0]=i,e[1]=o,e[2]=c,e[3]=l,e[4]=n):n=e[4];const{items:x,hasMore:d,isLoadingMore:p,isInitialLoading:j,isFetching:y,loadMore:k,availableTags:T,availableCategories:S,selectedTags:C,selectedCategories:I,setSelectedTags:N,setSelectedCategories:b,hasActiveFilters:R}=et(n);let $,L,P,f;e[5]!==i||e[6]!==y||e[7]!==j||e[8]!==x||e[9]!==r?($=r?at(x,r):x,L=(r!==i||y)&&!j&&!!r,f=$.filter(ct),P=$.filter(V=>!f.find(B=>B.id===V.id)),e[5]=i,e[6]=y,e[7]=j,e[8]=x,e[9]=r,e[10]=$,e[11]=L,e[12]=P,e[13]=f):($=e[10],L=e[11],P=e[12],f=e[13]);const h=P;let w;e[14]!==g||e[15]!==u.slug||e[16]!==l?(w=V=>{const B=$e(V.name||V.title||V.server.title||""),q=V.server.name;g({to:"/$org/store/$appName",params:{org:u.slug,appName:B},search:{registryId:l,serverName:q}})},e[14]=g,e[15]=u.slug,e[16]=l,e[17]=w):w=e[17];const z=w;let F;e[18]!==d||e[19]!==p||e[20]!==k?(F=V=>{if(!d||p)return;const B=V.currentTarget;B.scrollHeight-B.scrollTop-B.clientHeight<200&&k()},e[18]=d,e[19]=p,e[20]=k,e[21]=F):F=e[21];const v=F;let E;e[22]!==L||e[23]!==r?(E=s.jsx(ze,{value:r,onChange:a,placeholder:"Search for an MCP Server...",isSearching:L}),e[22]=L,e[23]=r,e[24]=E):E=e[24];let A;e[25]!==S||e[26]!==T||e[27]!==I||e[28]!==C||e[29]!==b||e[30]!==N?(A=s.jsx(nt,{availableTags:T,availableCategories:S,selectedTags:C,selectedCategories:I,onTagChange:N,onCategoryChange:b}),e[25]=S,e[26]=T,e[27]=I,e[28]=C,e[29]=b,e[30]=N,e[31]=A):A=e[31];let D;e[32]!==h||e[33]!==$||e[34]!==z||e[35]!==R||e[36]!==d||e[37]!==j||e[38]!==p||e[39]!==L||e[40]!==x||e[41]!==r||e[42]!==f?(D=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:j?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(U,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):x.length===0&&!R?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):x.length===0&&R&&!r?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):r&&$.length===0&&!L?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(re,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[L&&$.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(U,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),f.length>0&&s.jsx(ee,{items:f,title:"Verified",onItemClick:z}),h.length>0&&s.jsx(ee,{items:h,title:f.length>0?"All":"",onItemClick:z}),d&&p&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(U,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[32]=h,e[33]=$,e[34]=z,e[35]=R,e[36]=d,e[37]=j,e[38]=p,e[39]=L,e[40]=x,e[41]=r,e[42]=f,e[43]=D):D=e[43];let _;e[44]!==v||e[45]!==D?(_=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:v,children:D}),e[44]=v,e[45]=D,e[46]=_):_=e[46];let W;return e[47]!==E||e[48]!==A||e[49]!==_?(W=s.jsxs("div",{className:"flex flex-col h-full",children:[E,A,_]}),e[47]=E,e[48]=A,e[49]=_,e[50]=W):W=e[50],W}function dt(t){const e=O.c(8),{registryId:l}=t,c=ve(l),o=c?.tools;let r;e[0]!==o?(r=we(o),e[0]=o,e[1]=r):r=e[1];const a=r;if(!a)throw new Error("This registry does not support listing store items.");const i=c?.tools;let g;e[2]!==i?(g=Te(i),e[2]=i,e[3]=g):g=e[3];const m=g||void 0;let n;return e[4]!==a||e[5]!==l||e[6]!==m?(n=s.jsx(mt,{registryId:l,listToolName:a,filtersToolName:m}),e[4]=a,e[5]=l,e[6]=m,e[7]=n):n=e[7],n}function ft(t){const e=O.c(15),{registries:l,value:c,onValueChange:o,onAddWellKnown:r,wellKnownRegistries:a,placeholder:i}=t,g=i===void 0?"Select a registry...":i;let u;e[0]!==g?(u=s.jsx(Oe,{size:"sm",className:"w-auto min-w-[160px]",children:s.jsx(We,{placeholder:g})}),e[0]=g,e[1]=u):u=e[1];let m;e[2]!==l?(m=l.map(ut),e[2]=l,e[3]=m):m=e[3];let n;e[4]!==r||e[5]!==a?(n=a.length>0&&s.jsxs("div",{className:"border-t border-border pt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),a.map(p=>s.jsxs("button",{onClick:j=>{j.preventDefault(),j.stopPropagation(),r(p)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[p.icon?s.jsx("img",{src:p.icon,alt:p.title,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:p.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:p.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(He,{size:16})})]},p.id??p.title))]}),e[4]=r,e[5]=a,e[6]=n):n=e[6];let x;e[7]!==m||e[8]!==n?(x=s.jsxs(qe,{children:[m,n]}),e[7]=m,e[8]=n,e[9]=x):x=e[9];let d;return e[10]!==o||e[11]!==u||e[12]!==x||e[13]!==c?(d=s.jsxs(Ge,{value:c,onValueChange:o,children:[u,x]}),e[10]=o,e[11]=u,e[12]=x,e[13]=c,e[14]=d):d=e[14],d}function ut(t){return s.jsx(_e,{className:"cursor-pointer",value:t.id??t.name,children:s.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?s.jsx("img",{src:t.icon,alt:t.name,className:"w-4 h-4 rounded"}):s.jsx("div",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:t.name})]})},t.id??t.name)}function xt({registries:t,onConnected:e}){const l=ie(),{org:{slug:c}}=Z(),{data:o}=de.useSession(),r=se(),[a,i]=K.useState(!1),g=t[0],u=async()=>{if(!(!g||!o?.user?.id)){i(!0);try{const n=await l.create.mutateAsync(g);e?.(n.id)}finally{i(!1)}}},m=()=>{r({to:"/$org/mcps",params:{org:c},search:{action:"create"}})};return s.jsx(be,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(G,{variant:"outline",onClick:u,disabled:a||!g,children:[g?.icon&&s.jsx("img",{src:g.icon,alt:"",className:"size-4"}),a?"Installing...":"Install Registry"]}),s.jsx(G,{variant:"outline",onClick:m,children:"Custom Connection"})]})})}function Yt(){const t=O.c(41),{org:e}=Z(),l=Ne(),c=ie(),o=fe(),r=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Qe(l);let i;t[0]!==a?(i=a.map(ht),t[0]=a,t[1]=i):i=t[1];const g=i;let u;t[2]!==e.slug?(u=Ue.selectedRegistry(e.slug),t[2]=e.slug,t[3]=u):u=t[3];const[m,n]=Ye(u,gt);let x;if(t[4]!==a||t[5]!==m){let v;t[7]!==m?(v=E=>E.id===m,t[7]=m,t[8]=v):v=t[8],x=a.find(v),t[4]=a,t[5]=m,t[6]=x}else x=t[6];const p=x?.id||a[0]?.id||"";let j;t[9]!==e.id?(j=xe(e.id),t[9]=e.id,t[10]=j):j=t[10];let y;t[11]!==j?(y=[j],t[11]=j,t[12]=y):y=t[12];const k=y;let T;t[13]===Symbol.for("react.memo_cache_sentinel")?(T=[pe()],t[13]=T):T=t[13];const S=T;let C;t[14]!==c.create||t[15]!==n?(C=async v=>{const E=await c.create.mutateAsync(v);n(E.id)},t[14]=c.create,t[15]=n,t[16]=C):C=t[16];const I=C;let N;t[17]!==a?(N=new Set(a.map(pt)),t[17]=a,t[18]=N):N=t[18];const b=N;let R;t[19]!==b||t[20]!==k?(R=k.filter(v=>v.id&&!b.has(v.id)),t[19]=b,t[20]=k,t[21]=R):R=t[21];const $=R;let L;t[22]!==b?(L=S.filter(v=>v.id&&!b.has(v.id)),t[22]=b,t[23]=L):L=t[23];const P=L;if(r){let v;return t[24]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ue,{}),t[24]=v):v=t[24],v}let f;t[25]!==I?(f=async v=>I(v),t[25]=I,t[26]=f):f=t[26];let h;t[27]!==$||t[28]!==p||t[29]!==g||t[30]!==n||t[31]!==f?(h=s.jsx(ge,{title:"Store",ctaButton:s.jsx(ft,{wellKnownRegistries:$,registries:g,value:p,onValueChange:n,onAddWellKnown:f,placeholder:"Select store..."})}),t[27]=$,t[28]=p,t[29]=g,t[30]=n,t[31]=f,t[32]=h):h=t[32];let w;t[33]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(U,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[33]=w):w=t[33];let z;t[34]!==P||t[35]!==p||t[36]!==n?(z=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(K.Suspense,{fallback:w,children:p?s.jsx(dt,{registryId:p}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(xt,{registries:P,onConnected:v=>{n(v)}})})})}),t[34]=P,t[35]=p,t[36]=n,t[37]=z):z=t[37];let F;return t[38]!==h||t[39]!==z?(F=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[h,z]}),t[38]=h,t[39]=z,t[40]=F):F=t[40],F}function pt(t){return t.id}function gt(t){return t??""}function ht(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{Yt as default};