@decocms/mesh 2.41.0 → 2.43.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 (135) hide show
  1. package/dist/client/assets/{AlertCircle-BOa8vsZh.js → AlertCircle-C1oaexcn.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CDMQvsql.js → ArrowLeft-B1SBiQVA.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-DCo2AMki.js → ArrowUp-BvlJhwmz.js} +1 -1
  4. package/dist/client/assets/{Check-q1lpKYa1.js → Check-DImC9hlR.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-Co8pj6pr.js → ChevronDown-CJiuDn-R.js} +1 -1
  6. package/dist/client/assets/{Code01-aDUT075R.js → Code01-C3PLJdIe.js} +1 -1
  7. package/dist/client/assets/{Copy01-BkRH-0BC.js → Copy01-CJVQGg2V.js} +1 -1
  8. package/dist/client/assets/{CpuChip02-DwIcy3NO.js → CpuChip02-CvTMaFgN.js} +1 -1
  9. package/dist/client/assets/{DotsHorizontal-DXKuj9II.js → DotsHorizontal-BQhkzfkG.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-DVPX9sag.js → DotsVertical-RAbtNrG6.js} +1 -1
  11. package/dist/client/assets/{Download01-BanMSF0U.js → Download01-DJRyuQwN.js} +1 -1
  12. package/dist/client/assets/{Edit01-BiPtocOQ.js → Edit01-DsrgmMbR.js} +1 -1
  13. package/dist/client/assets/{File06-Bs1zUbfJ.js → File06-DdyNkMaH.js} +1 -1
  14. package/dist/client/assets/{FilterLines-B2KdFNOg.js → FilterLines-DudXubI6.js} +1 -1
  15. package/dist/client/assets/{FlipBackward-HZAH0Q-_.js → FlipBackward-BT14MhEV.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-yDC_Ho1l.js → GitBranch01-DMdTTGPv.js} +1 -1
  17. package/dist/client/assets/{Grid01-BAocuS88.js → Grid01-F6FBpTXb.js} +1 -1
  18. package/dist/client/assets/{Home02-CBF3-nzf.js → Home02-CXLfj9Lm.js} +1 -1
  19. package/dist/client/assets/{Image01-65pEr48I.js → Image01-CGATMxv1.js} +1 -1
  20. package/dist/client/assets/{Inbox01-BwD7PmH7.js → Inbox01-BExxQniM.js} +1 -1
  21. package/dist/client/assets/{InfoCircle-BDw1rT6g.js → InfoCircle-BwBXEQXi.js} +1 -1
  22. package/dist/client/assets/{Key01-qJ854WwS.js → Key01-BPqaf5vy.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-dkMElY_E.js → LinkExternal01-CxomLdJd.js} +1 -1
  24. package/dist/client/assets/{List-CCKoNJ66.js → List-taDOKmLS.js} +1 -1
  25. package/dist/client/assets/{Loading01-CKKp6cbv.js → Loading01-C5WNj1RN.js} +1 -1
  26. package/dist/client/assets/{Lock01-XFphy8Df.js → Lock01-Di-2F0aX.js} +1 -1
  27. package/dist/client/assets/{Play-CJ4A3hiv.js → Play-CrFW3Xap.js} +1 -1
  28. package/dist/client/assets/{Plus-LQ4IWuyR.js → Plus-Rzuz08cb.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Bh63di7T.js → SearchMd-CQBqMKg_.js} +1 -1
  30. package/dist/client/assets/{Terminal-N2rxjLda.js → Terminal-kk64xKO9.js} +1 -1
  31. package/dist/client/assets/{Trash01-V-BN70LF.js → Trash01-NIFttcxe.js} +1 -1
  32. package/dist/client/assets/{Upload01-_hIqsrRo.js → Upload01-DN0UV10S.js} +1 -1
  33. package/dist/client/assets/{X-CUmjVenV.js → X-DmFAeozb.js} +1 -1
  34. package/dist/client/assets/{XClose-Be1fwKR-.js → XClose-CbwF-zr_.js} +1 -1
  35. package/dist/client/assets/{agent-detail-DglT7YDp.js → agent-detail-COGqHNUz.js} +1 -1
  36. package/dist/client/assets/{agents-BGWtrCLi.js → agents-B3iPqEqm.js} +1 -1
  37. package/dist/client/assets/{alert-dialog-rbRMb372.js → alert-dialog-nojSsjex.js} +1 -1
  38. package/dist/client/assets/{auth-catchall-Dh6G-wkO.js → auth-catchall-C_OoShX7.js} +1 -1
  39. package/dist/client/assets/{avatar-Di5-qvoB.js → avatar-HSzeBtSD.js} +1 -1
  40. package/dist/client/assets/{badge-DcOlmFf0.js → badge-D7yW7Ams.js} +1 -1
  41. package/dist/client/assets/{binder-DDwc-czk.js → binder-BvGWgf0j.js} +1 -1
  42. package/dist/client/assets/{button-r4jchKkL.js → button-B9UDEwx9.js} +1 -1
  43. package/dist/client/assets/{card-edP2c19Y.js → card-D-ZcDLJM.js} +1 -1
  44. package/dist/client/assets/{checkbox-CQfcMt0D.js → checkbox-DmHZ3Xhg.js} +1 -1
  45. package/dist/client/assets/{circle-alert-XiIjE_Mt.js → circle-alert-CsGRs6FI.js} +1 -1
  46. package/dist/client/assets/{collection-detail-DiqkxzOs.js → collection-detail-Cmda52TC.js} +1 -1
  47. package/dist/client/assets/{collection-display-button-Bm_lpgw0.js → collection-display-button-BAinwubP.js} +1 -1
  48. package/dist/client/assets/{collection-header-Hl9H9WXY.js → collection-header-d_96L4kd.js} +1 -1
  49. package/dist/client/assets/{collection-page-eWL_sPWj.js → collection-page-BuBCnaqK.js} +1 -1
  50. package/dist/client/assets/{collection-search-E-cs4TKG.js → collection-search-Cp9Rg8cG.js} +1 -1
  51. package/dist/client/assets/{collection-tab-CPjPraim.js → collection-tab-DGpjXcu1.js} +1 -1
  52. package/dist/client/assets/{collection-table-wrapper-CTC7SkGl.js → collection-table-wrapper-Cfb-5BQo.js} +1 -1
  53. package/dist/client/assets/{connect-CUH-HVLk.js → connect-ChWwgYE3.js} +1 -1
  54. package/dist/client/assets/{connection-card-BMBB1XB3.js → connection-card-DSC3U6N-.js} +1 -1
  55. package/dist/client/assets/{connection-detail-C1Ujc7h3.js → connection-detail-D9V3bixZ.js} +1 -1
  56. package/dist/client/assets/{connections-DNzCtBst.js → connections-3QeHd0Af.js} +1 -1
  57. package/dist/client/assets/constants-C8DVLjyM.js +1 -0
  58. package/dist/client/assets/constants-CuO4IXOK.js +1 -0
  59. package/dist/client/assets/{create-organization-dialog-CQWXjIjL.js → create-organization-dialog-JxPXU7zP.js} +1 -1
  60. package/dist/client/assets/{dialog-B7wPllZ4.js → dialog-DUXNadw5.js} +1 -1
  61. package/dist/client/assets/{dropdown-menu-B1DppP3v.js → dropdown-menu-5V-XyUMl.js} +1 -1
  62. package/dist/client/assets/{dynamic-plugin-layout-B20nxv9n.js → dynamic-plugin-layout-Ba9BM3q2.js} +1 -1
  63. package/dist/client/assets/{empty-state-CD04Ydwf.js → empty-state-Ba4zQn5e.js} +1 -1
  64. package/dist/client/assets/{empty-state-CvRIcmH6.js → empty-state-D6Pye5dp.js} +1 -1
  65. package/dist/client/assets/{env-vars-editor-BxcXKWOT.js → env-vars-editor-BKG_L2uV.js} +1 -1
  66. package/dist/client/assets/{error-boundary-BVUjGITf.js → error-boundary-BYKWfLka.js} +1 -1
  67. package/dist/client/assets/{extract-connection-data-CW38_qJd.js → extract-connection-data-CDfHtG_N.js} +1 -1
  68. package/dist/client/assets/{file-browser-1hOfBN62.js → file-browser-D32InLNO.js} +2 -2
  69. package/dist/client/assets/{form-CgKLkP_b.js → form-DufpJhV9.js} +1 -1
  70. package/dist/client/assets/{grid-view-MvcSke9A.js → grid-view-CnSMlDZ4.js} +1 -1
  71. package/dist/client/assets/{home-BG57TiPK.js → home-MusYVBVC.js} +1 -1
  72. package/dist/client/assets/{index-uZ-aAbp2.js → index-BJd9JH52.js} +1 -1
  73. package/dist/client/assets/{index-CC-p2JIF.js → index-CNdaxvBl.js} +1 -1
  74. package/dist/client/assets/{index-CadkF3bd.js → index-CVzDWVip.js} +1 -1
  75. package/dist/client/assets/{index-C7XOW6LD.js → index-fVdZwXbQ.js} +1 -1
  76. package/dist/client/assets/{index-BifvkcqC.js → index-g9oC-3mV.js} +74 -74
  77. package/dist/client/assets/{index-CsMcCDhL.js → index-kxFCfKdx.js} +2 -2
  78. package/dist/client/assets/{infiniteQueryObserver-DGa1FeuM.js → infiniteQueryObserver-Q9Ch1SlH.js} +1 -1
  79. package/dist/client/assets/{input-CPirnY8u.js → input-CJuUYj5Y.js} +1 -1
  80. package/dist/client/assets/{layout-3BQ1rqCn.js → layout-BdEZp7Lm.js} +1 -1
  81. package/dist/client/assets/{localstorage-keys-uD_z-tyf.js → localstorage-keys-DuVpM8xt.js} +1 -1
  82. package/dist/client/assets/{login-YicDh7Hd.js → login-Baj4wuxy.js} +1 -1
  83. package/dist/client/assets/mcp-oauth-BCtnFmpv.js +1 -0
  84. package/dist/client/assets/{mcp-server-card-Dy2LgE0B.js → mcp-server-card-DaxbgdWa.js} +1 -1
  85. package/dist/client/assets/{mcp-server-detail-C4tr6Iu3.js → mcp-server-detail-C4n2ElKE.js} +2 -2
  86. package/dist/client/assets/{members-CU5yuzVv.js → members-C-QMSOdo.js} +1 -1
  87. package/dist/client/assets/{monaco-editor-CbBfNMoe.js → monaco-editor-1VMfvFaT.js} +1 -1
  88. package/dist/client/assets/{monitoring-BGZKk_Bb.js → monitoring-CyqwraZN.js} +1 -1
  89. package/dist/client/assets/{oauth-callback-C_dg-yXP.js → oauth-callback-UvAveY4Q.js} +1 -1
  90. package/dist/client/assets/{page-DJmVJ_mt.js → page-IMRDmGp_.js} +1 -1
  91. package/dist/client/assets/{page-DDQDVv0h.js → page-o9rm9dBG.js} +1 -1
  92. package/dist/client/assets/{pin-to-sidebar-button-cc4H1t0T.js → pin-to-sidebar-button-DKtGxFhi.js} +1 -1
  93. package/dist/client/assets/{plugin-empty-state-BdDH8bkm.js → plugin-empty-state-DqfmD7Lv.js} +1 -1
  94. package/dist/client/assets/{plugin-header-CfKIVlkj.js → plugin-header-BfXGZdm2.js} +1 -1
  95. package/dist/client/assets/{plugins-D3aykW-b.js → plugins-B-FlFz3o.js} +1 -1
  96. package/dist/client/assets/{popover-Bf2s3zPo.js → popover-IWCGO-jB.js} +1 -1
  97. package/dist/client/assets/{registry-utils-CfLiO1om.js → registry-utils-9nMczNLD.js} +1 -1
  98. package/dist/client/assets/{resizable-DWdCGNEM.js → resizable-oTpquxsO.js} +1 -1
  99. package/dist/client/assets/{resource-tabs-CNnyCF1i.js → resource-tabs-DNjaGx4N.js} +1 -1
  100. package/dist/client/assets/{select-BtmgNEc1.js → select-6QIp3PPA.js} +1 -1
  101. package/dist/client/assets/{settings-_Ir3oZ6y.js → settings-DmEN7q-R.js} +1 -1
  102. package/dist/client/assets/{shell-layout-edWfQVFN.js → shell-layout-f9QetI-r.js} +2 -2
  103. package/dist/client/assets/{spinner-ByfoT_ki.js → spinner-CHfAw4LE.js} +1 -1
  104. package/dist/client/assets/{switch-CO0WvHUA.js → switch-B8GiDtx0.js} +1 -1
  105. package/dist/client/assets/{textarea-BhdgD_h6.js → textarea-CO4qLNDj.js} +1 -1
  106. package/dist/client/assets/{tool-set-selector-N4rWe4X6.js → tool-set-selector-uL1FTDsj.js} +1 -1
  107. package/dist/client/assets/{tools-list-CdfRWLm5.js → tools-list-BE1mq5Cn.js} +1 -1
  108. package/dist/client/assets/{tooltip-BD-Bmy15.js → tooltip-DPmy6Yc4.js} +1 -1
  109. package/dist/client/assets/{typewriter-title-CAaFSQ5o.js → typewriter-title-D2-DYqDP.js} +1 -1
  110. package/dist/client/assets/{use-binding-CrloTgbm.js → use-binding-Bpukv3gt.js} +1 -1
  111. package/dist/client/assets/{use-collections-4aYW928m.js → use-collections-DWOZCISS.js} +1 -1
  112. package/dist/client/assets/{use-connection-DAEdMWMy.js → use-connection-ASBc3U14.js} +1 -1
  113. package/dist/client/assets/{use-create-virtual-mcp-B6zipxB7.js → use-create-virtual-mcp-DlrAoyaQ.js} +1 -1
  114. package/dist/client/assets/{use-list-state-gcbkerco.js → use-list-state-ZDRP3zFW.js} +1 -1
  115. package/dist/client/assets/{use-mcp-prompts-Cqx5lnP8.js → use-mcp-prompts-DXLHacDq.js} +1 -1
  116. package/dist/client/assets/{use-members-BGLpR7cv.js → use-members-CTEqdwIL.js} +1 -1
  117. package/dist/client/assets/{use-mobile-DxDTfbc3.js → use-mobile-BuEGyUe0.js} +1 -1
  118. package/dist/client/assets/{use-organization-settings-NoQXsvmA.js → use-organization-settings-hA9VwO-v.js} +1 -1
  119. package/dist/client/assets/{use-virtual-mcp-CVeqyMe_.js → use-virtual-mcp-BR9Cj6JE.js} +1 -1
  120. package/dist/client/assets/useInfiniteQuery-CnqRaniP.js +1 -0
  121. package/dist/client/assets/{useMutation-Dut9WhUN.js → useMutation-ClL17OKX.js} +1 -1
  122. package/dist/client/assets/useQuery-CVADJf0h.js +1 -0
  123. package/dist/client/assets/{value-BUZeHQHO.js → value-CzHdinJY.js} +1 -1
  124. package/dist/client/assets/{view-mode-toggle-xY1HL7Ay.js → view-mode-toggle-B5HElat6.js} +1 -1
  125. package/dist/client/assets/{workflow-Dv6VSjwi.js → workflow-Lt3GFUiP.js} +1 -1
  126. package/dist/client/index.html +1 -1
  127. package/dist/server/cli.js +148 -148
  128. package/dist/server/migrate.js +130 -130
  129. package/dist/server/server.js +119 -119
  130. package/package.json +1 -1
  131. package/dist/client/assets/constants-Bte_M-g-.js +0 -1
  132. package/dist/client/assets/constants-qfhQaIJZ.js +0 -1
  133. package/dist/client/assets/mcp-oauth-BxiEaY1l.js +0 -1
  134. package/dist/client/assets/useInfiniteQuery-BY-Kkwk8.js +0 -1
  135. package/dist/client/assets/useQuery-DLdv_D_b.js +0 -1
@@ -1,4 +1,4 @@
1
- import{I as Me}from"./infiniteQueryObserver-DGa1FeuM.js";import{W as Pe,bz as Re,r as a,bA as N,j as _,c as Se,bt as te}from"./index-CsMcCDhL.js";import{S as me}from"./spinner-ByfoT_ki.js";function Qt(e,t){return Pe({...e,enabled:!0,suspense:!0,throwOnError:Re},Me,t)}const xe=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M12 6v6l4 2m6-2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));xe.displayName="Clock";function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Te(e){if(Array.isArray(e))return e}function _e(e,t,r){return(t=Ne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ie(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,u,l=[],c=!0,g=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(O){g=!0,o=O}finally{try{if(!c&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(g)throw o}}return l}}function Ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{I as Me}from"./infiniteQueryObserver-Q9Ch1SlH.js";import{W as Pe,bA as Re,r as a,bB as N,j as _,c as Se,bt as te}from"./index-kxFCfKdx.js";import{S as me}from"./spinner-CHfAw4LE.js";function Qt(e,t){return Pe({...e,enabled:!0,suspense:!0,throwOnError:Re},Me,t)}const xe=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M12 6v6l4 2m6-2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));xe.displayName="Clock";function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Te(e){if(Array.isArray(e))return e}function _e(e,t,r){return(t=Ne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ie(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,u,l=[],c=!0,g=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(O){g=!0,o=O}finally{try{if(!c&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(g)throw o}}return l}}function Ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(n){_e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Le(e,t){if(e==null)return{};var r,n,o=Ae(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ve(e,t){return Te(e)||Ie(e,t)||De(e,t)||Ce()}function $e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ne(e){var t=$e(e,"string");return typeof t=="symbol"?t:t+""}function De(e,t){if(e){if(typeof e=="string")return ue(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ue(e,t):void 0}}function ze(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?le(Object(r),!0).forEach(function(n){ze(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ke(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function k(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return t.apply(r,[].concat(o,l))}}}function Q(e){return{}.toString.call(e).includes("Object")}function Ke(e){return!Object.keys(e).length}function W(e){return typeof e=="function"}function We(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qe(e,t){return Q(t)||T("changeType"),Object.keys(t).some(function(r){return!We(e,r)})&&T("changeField"),t}function Fe(e){W(e)||T("selectorType")}function Be(e){W(e)||Q(e)||T("handlerType"),Q(e)&&Object.values(e).some(function(t){return!W(t)})&&T("handlersType")}function Ue(e){e||T("initialIsRequired"),Q(e)||T("initialType"),Ke(e)&&T("initialContent")}function Je(e,t){throw new Error(e[t]||e.default)}var He={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},T=k(Je)(He),U={changes:qe,selector:Fe,handler:Be,initial:Ue};function Qe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};U.initial(e),U.handler(t);var r={current:e},n=k(Ze)(r,t),o=k(Ye)(r),i=k(U.changes)(e),u=k(Ge)(r);function l(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(O){return O};return U.selector(g),g(r.current)}function c(g){ke(n,o,i,u)(g)}return[l,c]}function Ge(e,t){return W(t)?t(e.current):t}function Ye(e,t){return e.current=fe(fe({},e.current),t),t}function Ze(e,t,r){return W(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Xe={create:Qe},et={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function tt(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return t.apply(r,[].concat(o,l))}}}function rt(e){return{}.toString.call(e).includes("Object")}function nt(e){return e||de("configIsRequired"),rt(e)||de("configType"),e.urls?(it(),{paths:{vs:e.urls.monacoBase}}):e}function it(){console.warn(he.deprecation)}function ot(e,t){throw new Error(e[t]||e.default)}var he={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
@@ -1,4 +1,4 @@
1
- import{r as g,c as se,f as da,u as wn,j as v,a8 as dr,bR as za,bw as et,aO as Te,bA as De,bS as LO,Q as $O,aX as qO,bT as FO,bU as BO,ah as _n,b6 as zO,ai as ha,aq as WO,al as Po,aj as Lr,bd as kr,bb as UO,g as KO,K as HO}from"./index-CsMcCDhL.js";import{C as Mf}from"./collection-header-Hl9H9WXY.js";import{C as YO}from"./collection-page-eWL_sPWj.js";import{C as GO}from"./collection-search-E-cs4TKG.js";import{I as Gn,n as Nf,E as Rx}from"./empty-state-CvRIcmH6.js";import{E as li}from"./error-boundary-BVUjGITf.js";import{B as Vn}from"./badge-DcOlmFf0.js";import{B as Ae,c as te,b as bv}from"./button-r4jchKkL.js";import{t as wi}from"./ChevronDown-Co8pj6pr.js";import{i as Lx,c as VO}from"./Grid01-BAocuS88.js";import{P as va,a as ma,b as pa}from"./popover-Bf2s3zPo.js";import{c as ui,T as ci,a as fi}from"./tooltip-BD-Bmy15.js";import{i as Os}from"./Check-q1lpKYa1.js";import{a as Wa}from"./Copy01-BkRH-0BC.js";import{n as xv}from"./Download01-BanMSF0U.js";import{i as $x}from"./FilterLines-B2KdFNOg.js";import{i as XO}from"./Key01-qJ854WwS.js";import{i as ZO,n as QO}from"./Play-CJ4A3hiv.js";import{M as wv,s as JO,u as eC}from"./monaco-editor-CbBfNMoe.js";import{r as tC,_ as Sn}from"./index-CadkF3bd.js";import{d as Oo,i as rC,e as nC,T as Cs}from"./value-BUZeHQHO.js";import{u as aC}from"./use-members-BGLpR7cv.js";import{b as Od}from"./use-connection-DAEdMWMy.js";import{a as Co,u as jo}from"./constants-Bte_M-g-.js";import{b as qx}from"./use-virtual-mcp-CVeqyMe_.js";import{i as iC}from"./Code01-aDUT075R.js";import{s as oC}from"./Plus-LQ4IWuyR.js";import{s as sC}from"./Trash01-V-BN70LF.js";import{I as Yn}from"./input-CPirnY8u.js";import{C as _v}from"./checkbox-CQfcMt0D.js";import{i as lC}from"./SearchMd-Bh63di7T.js";import{e as uC,S as Sv,a as Pv,b as Ov,c as Cv,d as Ua}from"./select-BtmgNEc1.js";import{T as cC}from"./textarea-BhdgD_h6.js";import{R as fC}from"./resource-tabs-CNnyCF1i.js";import{c as Cd}from"./use-collections-4aYW928m.js";import{i as dC}from"./CpuChip02-DwIcy3NO.js";import"./collection-display-button-Bm_lpgw0.js";import"./dropdown-menu-B1DppP3v.js";import"./ArrowUp-DCo2AMki.js";import"./List-CCKoNJ66.js";import"./view-mode-toggle-xY1HL7Ay.js";import"./Loading01-CKKp6cbv.js";import"./infiniteQueryObserver-DGa1FeuM.js";import"./spinner-ByfoT_ki.js";import"./useMutation-Dut9WhUN.js";import"./useQuery-DLdv_D_b.js";const Fx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"m15 18-6-6 6-6"}));Fx.displayName="ChevronLeft";const Bx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Bx.displayName="PauseCircle";const zx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),g.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));zx.displayName="PlayCircle";const Wx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M4 7c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C5.602 4 6.068 4 7 4h10c.932 0 1.398 0 1.765.152a2 2 0 0 1 1.083 1.083C20 5.602 20 6.068 20 7M9 20h6M12 4v16"}));Wx.displayName="Type01";function jd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function hC(e,t){t===void 0&&(t=e,e=Oo);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}const Ef={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Mr(e){return e.filter(t=>t.key.trim()).map(t=>{const r=encodeURIComponent(t.key.trim()),n=encodeURIComponent(t.value||"");return`${r}:${t.operator}:${n}`}).join(",")}function vC(e){return e?e.split(",").map(t=>{const[r,n,...a]=t.split(":");return{key:decodeURIComponent(r||""),operator:n||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ka(e){return e.filter(t=>t.key.trim()).map(t=>{switch(t.operator){case"eq":return`${t.key}=${t.value}`;case"contains":return`${t.key}~${t.value}`;case"exists":return`${t.key}?`}}).join(`
1
+ import{r as g,c as se,f as da,u as wn,j as v,a8 as dr,bS as za,bw as et,aO as Te,bB as De,bT as LO,Q as $O,aX as qO,bU as FO,bV as BO,ah as _n,b6 as zO,ai as ha,aq as WO,al as Po,aj as Lr,bd as kr,bb as UO,g as KO,K as HO}from"./index-kxFCfKdx.js";import{C as Mf}from"./collection-header-d_96L4kd.js";import{C as YO}from"./collection-page-BuBCnaqK.js";import{C as GO}from"./collection-search-Cp9Rg8cG.js";import{I as Gn,n as Nf,E as Rx}from"./empty-state-D6Pye5dp.js";import{E as li}from"./error-boundary-BYKWfLka.js";import{B as Vn}from"./badge-D7yW7Ams.js";import{B as Ae,c as te,b as bv}from"./button-B9UDEwx9.js";import{t as wi}from"./ChevronDown-CJiuDn-R.js";import{i as Lx,c as VO}from"./Grid01-F6FBpTXb.js";import{P as va,a as ma,b as pa}from"./popover-IWCGO-jB.js";import{c as ui,T as ci,a as fi}from"./tooltip-DPmy6Yc4.js";import{i as Os}from"./Check-DImC9hlR.js";import{a as Wa}from"./Copy01-CJVQGg2V.js";import{n as xv}from"./Download01-DJRyuQwN.js";import{i as $x}from"./FilterLines-DudXubI6.js";import{i as XO}from"./Key01-BPqaf5vy.js";import{i as ZO,n as QO}from"./Play-CrFW3Xap.js";import{M as wv,s as JO,u as eC}from"./monaco-editor-1VMfvFaT.js";import{r as tC,_ as Sn}from"./index-CVzDWVip.js";import{d as Oo,i as rC,e as nC,T as Cs}from"./value-CzHdinJY.js";import{u as aC}from"./use-members-CTEqdwIL.js";import{b as Od}from"./use-connection-ASBc3U14.js";import{a as Co,u as jo}from"./constants-C8DVLjyM.js";import{b as qx}from"./use-virtual-mcp-BR9Cj6JE.js";import{i as iC}from"./Code01-C3PLJdIe.js";import{s as oC}from"./Plus-Rzuz08cb.js";import{s as sC}from"./Trash01-NIFttcxe.js";import{I as Yn}from"./input-CJuUYj5Y.js";import{C as _v}from"./checkbox-DmHZ3Xhg.js";import{i as lC}from"./SearchMd-CQBqMKg_.js";import{e as uC,S as Sv,a as Pv,b as Ov,c as Cv,d as Ua}from"./select-6QIp3PPA.js";import{T as cC}from"./textarea-CO4qLNDj.js";import{R as fC}from"./resource-tabs-DNjaGx4N.js";import{c as Cd}from"./use-collections-DWOZCISS.js";import{i as dC}from"./CpuChip02-CvTMaFgN.js";import"./collection-display-button-BAinwubP.js";import"./dropdown-menu-5V-XyUMl.js";import"./ArrowUp-BvlJhwmz.js";import"./List-taDOKmLS.js";import"./view-mode-toggle-B5HElat6.js";import"./Loading01-C5WNj1RN.js";import"./infiniteQueryObserver-Q9Ch1SlH.js";import"./spinner-CHfAw4LE.js";import"./useMutation-ClL17OKX.js";import"./useQuery-CVADJf0h.js";const Fx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"m15 18-6-6 6-6"}));Fx.displayName="ChevronLeft";const Bx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Bx.displayName="PauseCircle";const zx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),g.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));zx.displayName="PlayCircle";const Wx=({size:e=24,color:t="currentColor",...r})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},g.createElement("path",{d:"M4 7c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C5.602 4 6.068 4 7 4h10c.932 0 1.398 0 1.765.152a2 2 0 0 1 1.083 1.083C20 5.602 20 6.068 20 7M9 20h6M12 4v16"}));Wx.displayName="Type01";function jd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function hC(e,t){t===void 0&&(t=e,e=Oo);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}const Ef={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Mr(e){return e.filter(t=>t.key.trim()).map(t=>{const r=encodeURIComponent(t.key.trim()),n=encodeURIComponent(t.value||"");return`${r}:${t.operator}:${n}`}).join(",")}function vC(e){return e?e.split(",").map(t=>{const[r,n,...a]=t.split(":");return{key:decodeURIComponent(r||""),operator:n||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ka(e){return e.filter(t=>t.key.trim()).map(t=>{switch(t.operator){case"eq":return`${t.key}=${t.value}`;case"contains":return`${t.key}~${t.value}`;case"exists":return`${t.key}?`}}).join(`
2
2
  `)}function jv(e){return e.trim()?e.split(`
3
3
  `).map(t=>t.trim()).filter(t=>t.length>0).map(t=>{if(t.endsWith("?"))return{key:t.slice(0,-1),operator:"exists",value:""};if(t.includes("=")){const[r,...n]=t.split("=");return{key:r||"",operator:"eq",value:n.join("=")}}if(t.includes("~")){const[r,...n]=t.split("~");return{key:r||"",operator:"contains",value:n.join("~")}}return{key:t,operator:"exists",value:""}}):[]}function mC(e){const t={},r={},n=[];for(const a of e)if(a.key.trim())switch(a.operator){case"eq":a.value&&(t[a.key]=a.value);break;case"contains":a.value&&(r[a.key]=`%${a.value}%`);break;case"exists":n.push(a.key);break}return{properties:Object.keys(t).length>0?t:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:n.length>0?n:void 0}}function Av(e){if(!e)return{content:"null",isTruncated:!1,originalSize:4};const t=JSON.stringify(e,null,2),r=t.length;return r<=Ef.maxJsonRenderSize?{content:t,isTruncated:!1,originalSize:r}:{content:t.slice(0,Ef.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{r as i,j as e}from"./index-CsMcCDhL.js";import{i as n}from"./Loading01-CKKp6cbv.js";import{h as l}from"./mcp-oauth-BxiEaY1l.js";function h(){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{h as default};
1
+ import{r as i,j as e}from"./index-kxFCfKdx.js";import{i as n}from"./Loading01-C5WNj1RN.js";import{h as l}from"./mcp-oauth-BCtnFmpv.js";function h(){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{h as default};
@@ -1 +1 @@
1
- import{c as G,r as M,u as Z,l as de,K as se,by as fe,j as s,f as oe,e as ue,bg as xe,aL as ge}from"./index-CsMcCDhL.js";import{C as pe}from"./collection-header-Hl9H9WXY.js";import{i as ne}from"./FilterLines-B2KdFNOg.js";import{n as he}from"./Inbox01-BwD7PmH7.js";import{i as J}from"./Loading01-CKKp6cbv.js";import{i as ie}from"./SearchMd-Bh63di7T.js";import{u as je}from"./useInfiniteQuery-BY-Kkwk8.js";import{a as ve,f as ye,b as Ne}from"./registry-utils-CfLiO1om.js";import{u as Ce,e as be,g as Se}from"./constants-Bte_M-g-.js";import{u as we,a as ae,b as Te}from"./use-connection-DAEdMWMy.js";import{s as Ie}from"./slugify-CEUa2lfQ.js";import{C as Re}from"./collection-search-E-cs4TKG.js";import{M as le}from"./mcp-server-card-Dy2LgE0B.js";import{c as ce,B as Q}from"./button-r4jchKkL.js";import{I as Pe}from"./input-CPirnY8u.js";import{P as $e,a as ke,b as ze}from"./popover-Bf2s3zPo.js";import{i as Fe}from"./Check-q1lpKYa1.js";import{t as Le}from"./ChevronDown-Co8pj6pr.js";import{s as Y}from"./XClose-Be1fwKR-.js";import{d as Ke,a as Ae,b as Ee,c as De,S as Me}from"./select-BtmgNEc1.js";import{s as Be}from"./Plus-LQ4IWuyR.js";import{E as Ve}from"./empty-state-CvRIcmH6.js";import{u as Oe}from"./use-binding-CrloTgbm.js";import{L as We,u as qe}from"./localstorage-keys-uD_z-tyf.js";import"./collection-display-button-Bm_lpgw0.js";import"./dropdown-menu-B1DppP3v.js";import"./Grid01-BAocuS88.js";import"./ArrowUp-DCo2AMki.js";import"./List-CCKoNJ66.js";import"./tooltip-BD-Bmy15.js";import"./view-mode-toggle-xY1HL7Ay.js";import"./infiniteQueryObserver-DGa1FeuM.js";import"./use-collections-4aYW928m.js";import"./useMutation-Dut9WhUN.js";import"./useQuery-DLdv_D_b.js";import"./Lock01-XFphy8Df.js";import"./Terminal-N2rxjLda.js";import"./card-edP2c19Y.js";import"./github-icon-Dp3wHhYE.js";import"./binder-DDwc-czk.js";function _e(t,e){const l=G.c(4),[o,c]=M.useState(t),r=M.useRef(null),a=M.useRef(!0);let i,d;return l[0]!==e||l[1]!==t?(i=()=>{if(a.current){a.current=!1;return}return r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{c(t)},e),()=>{r.current&&clearTimeout(r.current)}},d=[t,e],l[0]=e,l[1]=t,l[2]=i,l[3]=d):(i=l[2],d=l[3]),M.useEffect(i,d),o}function Ge(t){const e=G.c(14),l=M.useRef(null),o=`scroll-position:${t}`,c=M.useRef(null);let r;e[0]!==o?(r=()=>{l.current&&sessionStorage.setItem(o,String(l.current.scrollTop))},e[0]=o,e[1]=r):r=e[1];const a=r;let i;e[2]!==o?(i=()=>{if(c.current===o)return;const f=sessionStorage.getItem(o);if(f&&l.current){const j=Number.parseInt(f,10);l.current.scrollTop=j}c.current=o},e[2]=o,e[3]=i):i=e[3];const d=i;let y;e[4]!==d||e[5]!==o?(y=()=>{c.current!==o&&d()},e[4]=d,e[5]=o,e[6]=y):y=e[6];const h=y;let n;e[7]!==d||e[8]!==o?(n=f=>{l.current=f,f&&c.current!==o&&requestAnimationFrame(()=>{d()})},e[7]=d,e[8]=o,e[9]=n):n=e[9];const N=n;let u;return e[10]!==h||e[11]!==a||e[12]!==N?(u={scrollRef:N,saveScrollPosition:a,handleScroll:h},e[10]=h,e[11]=a,e[12]=N,e[13]=u):u=e[13],u}const He=24;function Qe(t){const e=G.c(53),{registryId:l,listToolName:o,filtersToolName:c,search:r}=t,{org:a}=Z();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[0]=i):i=e[0];const[d,y]=M.useState(i);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[1]=h):h=e[1];const[n,N]=M.useState(h),u=l||null;let f;e[2]!==a.id||e[3]!==u?(f={connectionId:u,orgId:a.id},e[2]=a.id,e[3]=u,e[4]=f):f=e[4];const j=Ce(f),R=!!c;let C;e[5]!==c||e[6]!==l?(C=se.toolCall(l,c||"no-filters","{}"),e[5]=c,e[6]=l,e[7]=C):C=e[7];let b;e[8]!==j||e[9]!==c?(b=async()=>{if(!c)return{tags:[],categories:[]};const D=await j.callTool({name:c,arguments:{}});return D.structuredContent??D},e[8]=j,e[9]=c,e[10]=b):b=e[10];let k;e[11]!==C||e[12]!==b?(k={queryKey:C,queryFn:b,staleTime:36e5},e[11]=C,e[12]=b,e[13]=k):k=e[13];const{data:P}=de(k);let v,S,T;if(e[14]!==o||e[15]!==l||e[16]!==r||e[17]!==n||e[18]!==d){const D=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;v={limit:He,...d.length>0&&{tags:d},...n.length>0&&{categories:n},...D&&{where:D}},T=je,S=se.toolCall(l,o,JSON.stringify(v)),e[14]=o,e[15]=l,e[16]=r,e[17]=n,e[18]=d,e[19]=v,e[20]=S,e[21]=T}else v=e[19],S=e[20],T=e[21];let I;e[22]!==j||e[23]!==v||e[24]!==o?(I=async D=>{const{pageParam:ee}=D,me=ee?{...v,cursor:ee}:v,te=await j.callTool({name:o,arguments:me});return te.structuredContent??te},e[22]=j,e[23]=v,e[24]=o,e[25]=I):I=e[25];let z;e[26]!==I||e[27]!==S?(z={queryKey:S,queryFn:I,initialPageParam:void 0,getNextPageParam:Ue,staleTime:36e5,placeholderData:fe},e[26]=I,e[27]=S,e[28]=z):z=e[28];const{data:L,fetchNextPage:$,hasNextPage:m,isFetchingNextPage:x,isFetching:g,isLoading:w}=T(z);let F;e:{if(!L?.pages||L.pages.length===0){F=null;break e}const D=L.pages[0];if(typeof D=="object"&&D!==null&&"totalCount"in D&&typeof D.totalCount=="number"){F=D.totalCount;break e}F=null}const p=F,K=L?.pages;let A;e[29]!==K?(A=ve(K),e[29]=K,e[30]=A):A=e[30];const E=A;let V;e[31]!==r||e[32]!==n.length||e[33]!==d.length?(V=d.length>0||n.length>0||!!r?.trim(),e[31]=r,e[32]=n.length,e[33]=d.length,e[34]=V):V=e[34];const O=V,q=g&&!x&&!w&&O;let _;e[35]!==$||e[36]!==m||e[37]!==x?(_=()=>{m&&!x&&$()},e[35]=$,e[36]=m,e[37]=x,e[38]=_):_=e[38];const B=_,W=m??!1,H=R?P?.tags:void 0,X=R?P?.categories:void 0;let U;return e[39]!==O||e[40]!==g||e[41]!==x||e[42]!==q||e[43]!==w||e[44]!==E||e[45]!==B||e[46]!==n||e[47]!==d||e[48]!==W||e[49]!==H||e[50]!==X||e[51]!==p?(U={items:E,totalCount:p,hasMore:W,isLoadingMore:x,isFiltering:q,isInitialLoading:w,isFetching:g,loadMore:B,availableTags:H,availableCategories:X,selectedTags:d,selectedCategories:n,setSelectedTags:y,setSelectedCategories:N,hasActiveFilters:O},e[39]=O,e[40]=g,e[41]=x,e[42]=q,e[43]=w,e[44]=E,e[45]=B,e[46]=n,e[47]=d,e[48]=W,e[49]=H,e[50]=X,e[51]=p,e[52]=U):U=e[52],U}function Ue(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function Ye(t,e){return[...t].sort((l,o)=>o.count-l.count).slice(0,e)}function re(t){const e=G.c(52),{label:l,items:o,selectedItems:c,onToggle:r,onClear:a}=t,[i,d]=M.useState(""),[y,h]=M.useState(!1);let n,N,u,f,j,R,C,b,k,P,v;if(e[0]!==o||e[1]!==l||e[2]!==r||e[3]!==y||e[4]!==i||e[5]!==c){const $=[...i?o.filter(A=>A.value.toLowerCase().includes(i.toLowerCase())):o].sort(Je);u=c.length,N=$e,k=y,P=h;let m;e[17]!==l?(m=s.jsx("span",{children:l}),e[17]=l,e[18]=m):m=e[18];let x;e[19]!==u?(x=u>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:u}),e[19]=u,e[20]=x):x=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Le,{size:14,className:"opacity-50"}),e[21]=g):g=e[21],e[22]!==x||e[23]!==m?(v=s.jsx(ke,{asChild:!0,children:s.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[m,x,g]})}),e[22]=x,e[23]=m,e[24]=v):v=e[24],n=ze,R="w-64 p-0",C="start";let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ie,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=w):w=e[25];let F;e[26]!==l?(F=l.toLowerCase(),e[26]=l,e[27]=F):F=e[27];const p=`Search ${F}...`;let K;e[28]===Symbol.for("react.memo_cache_sentinel")?(K=A=>d(A.target.value),e[28]=K):K=e[28],e[29]!==i||e[30]!==p?(b=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:[w,s.jsx(Pe,{type:"text",placeholder:p,value:i,onChange:K,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]=p,e[31]=b):b=e[31],f="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",j=$.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):$.map(A=>{const E=c.includes(A.value);return s.jsxs("button",{onClick:()=>r(A.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",E?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[E&&s.jsx(Fe,{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]=o,e[1]=l,e[2]=r,e[3]=y,e[4]=i,e[5]=c,e[6]=n,e[7]=N,e[8]=u,e[9]=f,e[10]=j,e[11]=R,e[12]=C,e[13]=b,e[14]=k,e[15]=P,e[16]=v}else n=e[6],N=e[7],u=e[8],f=e[9],j=e[10],R=e[11],C=e[12],b=e[13],k=e[14],P=e[15],v=e[16];let S;e[32]!==f||e[33]!==j?(S=s.jsx("div",{className:f,children:j}),e[32]=f,e[33]=j,e[34]=S):S=e[34];let T;e[35]!==l||e[36]!==a||e[37]!==u?(T=u>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(Q,{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]=u,e[38]=T):T=e[38];let I;e[39]!==n||e[40]!==T||e[41]!==R||e[42]!==C||e[43]!==b||e[44]!==S?(I=s.jsxs(n,{className:R,align:C,children:[b,S,T]}),e[39]=n,e[40]=T,e[41]=R,e[42]=C,e[43]=b,e[44]=S,e[45]=I):I=e[45];let z;return e[46]!==N||e[47]!==I||e[48]!==k||e[49]!==P||e[50]!==v?(z=s.jsxs(N,{open:k,onOpenChange:P,children:[v,I]}),e[46]=N,e[47]=I,e[48]=k,e[49]=P,e[50]=v,e[51]=z):z=e[51],z}function Je(t,e){return e.count-t.count}function Ze(t){const e=G.c(67),{availableTags:l,availableCategories:o,selectedTags:c,selectedCategories:r,onTagChange:a,onCategoryChange:i}=t,d=l&&l.length>0||o&&o.length>0,y=c.length>0||r.length>0;if(!d)return null;let h;e[0]!==a||e[1]!==c?(h=m=>{c.includes(m)?a(c.filter(x=>x!==m)):a([...c,m])},e[0]=a,e[1]=c,e[2]=h):h=e[2];const n=h;let N;e[3]!==i||e[4]!==r?(N=m=>{r.includes(m)?i(r.filter(x=>x!==m)):i([...r,m])},e[3]=i,e[4]=r,e[5]=N):N=e[5];const u=N;let f;e[6]!==i||e[7]!==a?(f=()=>{a([]),i([])},e[6]=i,e[7]=a,e[8]=f):f=e[8];const j=f;let R,C,b,k,P,v,S;if(e[9]!==o||e[10]!==l||e[11]!==i||e[12]!==a||e[13]!==r||e[14]!==c||e[15]!==u||e[16]!==n){const m=o?Ye(o,6):[];R=r,C=c,S=new Set(m.map(Xe)),P="flex items-center border-b border-border";let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(ne,{size:16})}),e[24]=x):x=e[24];let g;e[25]!==o||e[26]!==i||e[27]!==r||e[28]!==u?(g=o&&o.length>0&&s.jsx(re,{label:"Categories",items:o,selectedItems:r,onToggle:u,onClear:()=>i([])}),e[25]=o,e[26]=i,e[27]=r,e[28]=u,e[29]=g):g=e[29];let w;e[30]!==l||e[31]!==a||e[32]!==c||e[33]!==n?(w=l&&l.length>0&&s.jsx(re,{label:"Tags",items:l,selectedItems:c,onToggle:n,onClear:()=>a([])}),e[30]=l,e[31]=a,e[32]=c,e[33]=n,e[34]=w):w=e[34],e[35]!==w||e[36]!==g?(v=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[x,g,w]}),e[35]=w,e[36]=g,e[37]=v):v=e[37],b="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==r||e[39]!==u?(F=p=>{const K=r.includes(p.value);return s.jsxs("div",{onClick:()=>u(p.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",K?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:p.value}),K&&s.jsx("span",{onClick:A=>{A.stopPropagation(),u(p.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},p.value)},e[38]=r,e[39]=u,e[40]=F):F=e[40],k=m.map(F),e[9]=o,e[10]=l,e[11]=i,e[12]=a,e[13]=r,e[14]=c,e[15]=u,e[16]=n,e[17]=R,e[18]=C,e[19]=b,e[20]=k,e[21]=P,e[22]=v,e[23]=S}else R=e[17],C=e[18],b=e[19],k=e[20],P=e[21],v=e[22],S=e[23];let T;if(e[41]!==R||e[42]!==u||e[43]!==S){let m;e[45]!==S?(m=g=>!S.has(g),e[45]=S,e[46]=m):m=e[46];let x;e[47]!==u?(x=g=>s.jsxs("div",{onClick:()=>u(g),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:g}),s.jsx("span",{onClick:w=>{w.stopPropagation(),u(g)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},`cat-${g}`),e[47]=u,e[48]=x):x=e[48],T=R.filter(m).map(x),e[41]=R,e[42]=u,e[43]=S,e[44]=T}else T=e[44];let I;if(e[49]!==C||e[50]!==n){let m;e[52]!==n?(m=x=>s.jsxs("div",{onClick:()=>n(x),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:x}),s.jsx("span",{onClick:g=>{g.stopPropagation(),n(x)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},`tag-${x}`),e[52]=n,e[53]=m):m=e[53],I=C.map(m),e[49]=C,e[50]=n,e[51]=I}else I=e[51];let z;e[54]!==j||e[55]!==y?(z=y&&s.jsxs(Q,{variant:"ghost",size:"sm",onClick:j,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(Y,{size:14}),"Clear all"]}),e[54]=j,e[55]=y,e[56]=z):z=e[56];let L;e[57]!==z||e[58]!==b||e[59]!==k||e[60]!==T||e[61]!==I?(L=s.jsxs("div",{className:b,children:[k,T,I,z]}),e[57]=z,e[58]=b,e[59]=k,e[60]=T,e[61]=I,e[62]=L):L=e[62];let $;return e[63]!==L||e[64]!==P||e[65]!==v?($=s.jsxs("div",{className:P,children:[v,L]}),e[63]=L,e[64]=P,e[65]=v,e[66]=$):$=e[66],$}function Xe(t){return t.value}function et(t,e){if(!e)return t;const l=e.toLowerCase();return t.filter(o=>(o.name||o.title||"").toLowerCase().includes(l)||(o.description||o.server.description||"").toLowerCase().includes(l))}function tt(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function st(t){const e=G.c(54),{registryId:l,listToolName:o,filtersToolName:c}=t,[r,a]=M.useState(""),i=_e(r,300),d=oe(),{org:y}=Z(),{scrollRef:h,saveScrollPosition:n,handleScroll:N}=Ge(`store-discovery:${l}`);let u;e[0]!==i||e[1]!==c||e[2]!==o||e[3]!==l?(u={registryId:l,listToolName:o,filtersToolName:c,search:i},e[0]=i,e[1]=c,e[2]=o,e[3]=l,e[4]=u):u=e[4];const{items:f,hasMore:j,isLoadingMore:R,isInitialLoading:C,isFetching:b,loadMore:k,availableTags:P,availableCategories:v,selectedTags:S,selectedCategories:T,setSelectedTags:I,setSelectedCategories:z,hasActiveFilters:L}=Qe(u);let $,m,x,g;e[5]!==i||e[6]!==b||e[7]!==C||e[8]!==f||e[9]!==r?($=r?et(f,r):f,m=(r!==i||b)&&!C&&!!r,g=$.filter(tt),x=$.filter(B=>!g.find(W=>W.id===B.id)),e[5]=i,e[6]=b,e[7]=C,e[8]=f,e[9]=r,e[10]=$,e[11]=m,e[12]=x,e[13]=g):($=e[10],m=e[11],x=e[12],g=e[13]);const w=x;let F;e[14]!==d||e[15]!==y.slug||e[16]!==l||e[17]!==n?(F=B=>{n();const W=Ie(B.name||B.title||B.server.title||""),H=B.server.name;d({to:"/$org/store/$appName",params:{org:y.slug,appName:W},search:{registryId:l,serverName:H}})},e[14]=d,e[15]=y.slug,e[16]=l,e[17]=n,e[18]=F):F=e[18];const p=F;let K;e[19]!==N||e[20]!==j||e[21]!==R||e[22]!==k?(K=B=>{if(N(),!j||R)return;const W=B.currentTarget;W.scrollHeight-W.scrollTop-W.clientHeight<200&&k()},e[19]=N,e[20]=j,e[21]=R,e[22]=k,e[23]=K):K=e[23];const A=K;let E;e[24]!==m||e[25]!==r?(E=s.jsx(Re,{value:r,onChange:a,placeholder:"Search for an MCP Server...",isSearching:m}),e[24]=m,e[25]=r,e[26]=E):E=e[26];let V;e[27]!==v||e[28]!==P||e[29]!==T||e[30]!==S||e[31]!==z||e[32]!==I?(V=s.jsx(Ze,{availableTags:P,availableCategories:v,selectedTags:S,selectedCategories:T,onTagChange:I,onCategoryChange:z}),e[27]=v,e[28]=P,e[29]=T,e[30]=S,e[31]=z,e[32]=I,e[33]=V):V=e[33];let O;e[34]!==w||e[35]!==$||e[36]!==p||e[37]!==L||e[38]!==j||e[39]!==C||e[40]!==R||e[41]!==m||e[42]!==f||e[43]!==r||e[44]!==g?(O=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:C?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(J,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):f.length===0&&!L?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{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."})]}):f.length===0&&L&&!r?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ne,{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&&!m?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ie,{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:[m&&$.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(J,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),g.length>0&&s.jsx(le,{items:g,title:"Verified",onItemClick:p}),w.length>0&&s.jsx(le,{items:w,title:g.length>0?"All":"",onItemClick:p}),j&&R&&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(J,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[34]=w,e[35]=$,e[36]=p,e[37]=L,e[38]=j,e[39]=C,e[40]=R,e[41]=m,e[42]=f,e[43]=r,e[44]=g,e[45]=O):O=e[45];let q;e[46]!==A||e[47]!==h||e[48]!==O?(q=s.jsx("div",{ref:h,className:"flex-1 overflow-y-auto",onScroll:A,children:O}),e[46]=A,e[47]=h,e[48]=O,e[49]=q):q=e[49];let _;return e[50]!==E||e[51]!==V||e[52]!==q?(_=s.jsxs("div",{className:"flex flex-col h-full",children:[E,V,q]}),e[50]=E,e[51]=V,e[52]=q,e[53]=_):_=e[53],_}function lt(t){const e=G.c(8),{registryId:l}=t,o=we(l),c=o?.tools;let r;e[0]!==c?(r=ye(c),e[0]=c,e[1]=r):r=e[1];const a=r;if(!a)throw new Error("This registry does not support listing store items.");const i=o?.tools;let d;e[2]!==i?(d=Ne(i),e[2]=i,e[3]=d):d=e[3];const h=d||void 0;let n;return e[4]!==a||e[5]!==l||e[6]!==h?(n=s.jsx(st,{registryId:l,listToolName:a,filtersToolName:h}),e[4]=a,e[5]=l,e[6]=h,e[7]=n):n=e[7],n}function rt(t){const e=G.c(15),{registries:l,value:o,onValueChange:c,onAddWellKnown:r,wellKnownRegistries:a,placeholder:i}=t,d=i===void 0?"Select a registry...":i;let y;e[0]!==d?(y=s.jsx(Ae,{size:"sm",className:"w-auto min-w-[160px]",children:s.jsx(Ee,{placeholder:d})}),e[0]=d,e[1]=y):y=e[1];let h;e[2]!==l?(h=l.map(ot),e[2]=l,e[3]=h):h=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(f=>s.jsxs("button",{onClick:j=>{j.preventDefault(),j.stopPropagation(),r(f)},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:[f.icon?s.jsx("img",{src:f.icon,alt:f.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:f.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:f.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Be,{size:16})})]},f.id??f.title))]}),e[4]=r,e[5]=a,e[6]=n):n=e[6];let N;e[7]!==h||e[8]!==n?(N=s.jsxs(De,{children:[h,n]}),e[7]=h,e[8]=n,e[9]=N):N=e[9];let u;return e[10]!==c||e[11]!==y||e[12]!==N||e[13]!==o?(u=s.jsxs(Me,{value:o,onValueChange:c,children:[y,N]}),e[10]=c,e[11]=y,e[12]=N,e[13]=o,e[14]=u):u=e[14],u}function ot(t){return s.jsx(Ke,{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 nt({registries:t,onConnected:e}){const l=ae(),{org:{slug:o}}=Z(),{data:c}=ue.useSession(),r=oe(),[a,i]=M.useState(!1),d=t[0],y=async()=>{if(!(!d||!c?.user?.id)){i(!0);try{const n=await l.create.mutateAsync(d);e?.(n.id)}finally{i(!1)}}},h=()=>{r({to:"/$org/mcps",params:{org:o},search:{action:"create"}})};return s.jsx(Ve,{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(Q,{variant:"outline",onClick:y,disabled:a||!d,children:[d?.icon&&s.jsx("img",{src:d.icon,alt:"",className:"size-4"}),a?"Installing...":"Install Registry"]}),s.jsx(Q,{variant:"outline",onClick:h,children:"Custom Connection"})]})})}function Yt(){const t=G.c(41),{org:e}=Z(),l=Te(),o=ae(),c=xe(),r=c.location.pathname.includes("/store/")&&c.location.pathname.split("/").length>3,a=Oe(l);let i;t[0]!==a?(i=a.map(ct),t[0]=a,t[1]=i):i=t[1];const d=i;let y;t[2]!==e.slug?(y=We.selectedRegistry(e.slug),t[2]=e.slug,t[3]=y):y=t[3];const[h,n]=qe(y,at);let N;if(t[4]!==a||t[5]!==h){let p;t[7]!==h?(p=K=>K.id===h,t[7]=h,t[8]=p):p=t[8],N=a.find(p),t[4]=a,t[5]=h,t[6]=N}else N=t[6];const f=N?.id||a[0]?.id||"";let j;t[9]!==e.id?(j=be(e.id),t[9]=e.id,t[10]=j):j=t[10];let R;t[11]!==j?(R=[j],t[11]=j,t[12]=R):R=t[12];const C=R;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=[Se()],t[13]=b):b=t[13];const k=b;let P;t[14]!==o.create||t[15]!==n?(P=async p=>{const K=await o.create.mutateAsync(p);n(K.id)},t[14]=o.create,t[15]=n,t[16]=P):P=t[16];const v=P;let S;t[17]!==a?(S=new Set(a.map(it)),t[17]=a,t[18]=S):S=t[18];const T=S;let I;t[19]!==T||t[20]!==C?(I=C.filter(p=>p.id&&!T.has(p.id)),t[19]=T,t[20]=C,t[21]=I):I=t[21];const z=I;let L;t[22]!==T?(L=k.filter(p=>p.id&&!T.has(p.id)),t[22]=T,t[23]=L):L=t[23];const $=L;if(r){let p;return t[24]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ge,{}),t[24]=p):p=t[24],p}let m;t[25]!==v?(m=async p=>v(p),t[25]=v,t[26]=m):m=t[26];let x;t[27]!==z||t[28]!==f||t[29]!==d||t[30]!==n||t[31]!==m?(x=s.jsx(pe,{title:"Store",ctaButton:s.jsx(rt,{wellKnownRegistries:z,registries:d,value:f,onValueChange:n,onAddWellKnown:m,placeholder:"Select store..."})}),t[27]=z,t[28]=f,t[29]=d,t[30]=n,t[31]=m,t[32]=x):x=t[32];let g;t[33]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(J,{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]=g):g=t[33];let w;t[34]!==$||t[35]!==f||t[36]!==n?(w=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(M.Suspense,{fallback:g,children:f?s.jsx(lt,{registryId:f}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(nt,{registries:$,onConnected:p=>{n(p)}})})})}),t[34]=$,t[35]=f,t[36]=n,t[37]=w):w=t[37];let F;return t[38]!==x||t[39]!==w?(F=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[x,w]}),t[38]=x,t[39]=w,t[40]=F):F=t[40],F}function it(t){return t.id}function at(t){return t??""}function ct(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{Yt as default};
1
+ import{c as G,r as M,u as Z,l as de,K as se,bz as fe,j as s,f as oe,e as ue,bg as xe,aL as ge}from"./index-kxFCfKdx.js";import{C as pe}from"./collection-header-d_96L4kd.js";import{i as ne}from"./FilterLines-DudXubI6.js";import{n as he}from"./Inbox01-BExxQniM.js";import{i as J}from"./Loading01-C5WNj1RN.js";import{i as ie}from"./SearchMd-CQBqMKg_.js";import{u as je}from"./useInfiniteQuery-CnqRaniP.js";import{a as ve,f as ye,b as Ne}from"./registry-utils-9nMczNLD.js";import{u as Ce,e as be,g as Se}from"./constants-C8DVLjyM.js";import{u as we,a as ae,b as Te}from"./use-connection-ASBc3U14.js";import{s as Ie}from"./slugify-CEUa2lfQ.js";import{C as Re}from"./collection-search-Cp9Rg8cG.js";import{M as le}from"./mcp-server-card-DaxbgdWa.js";import{c as ce,B as Q}from"./button-B9UDEwx9.js";import{I as Pe}from"./input-CJuUYj5Y.js";import{P as $e,a as ke,b as ze}from"./popover-IWCGO-jB.js";import{i as Fe}from"./Check-DImC9hlR.js";import{t as Le}from"./ChevronDown-CJiuDn-R.js";import{s as Y}from"./XClose-CbwF-zr_.js";import{d as Ke,a as Ae,b as Ee,c as De,S as Me}from"./select-6QIp3PPA.js";import{s as Be}from"./Plus-Rzuz08cb.js";import{E as Ve}from"./empty-state-D6Pye5dp.js";import{u as Oe}from"./use-binding-Bpukv3gt.js";import{L as We,u as qe}from"./localstorage-keys-DuVpM8xt.js";import"./collection-display-button-BAinwubP.js";import"./dropdown-menu-5V-XyUMl.js";import"./Grid01-F6FBpTXb.js";import"./ArrowUp-BvlJhwmz.js";import"./List-taDOKmLS.js";import"./tooltip-DPmy6Yc4.js";import"./view-mode-toggle-B5HElat6.js";import"./infiniteQueryObserver-Q9Ch1SlH.js";import"./use-collections-DWOZCISS.js";import"./useMutation-ClL17OKX.js";import"./useQuery-CVADJf0h.js";import"./Lock01-Di-2F0aX.js";import"./Terminal-kk64xKO9.js";import"./card-D-ZcDLJM.js";import"./github-icon-Dp3wHhYE.js";import"./binder-BvGWgf0j.js";function _e(t,e){const l=G.c(4),[o,c]=M.useState(t),r=M.useRef(null),a=M.useRef(!0);let i,d;return l[0]!==e||l[1]!==t?(i=()=>{if(a.current){a.current=!1;return}return r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{c(t)},e),()=>{r.current&&clearTimeout(r.current)}},d=[t,e],l[0]=e,l[1]=t,l[2]=i,l[3]=d):(i=l[2],d=l[3]),M.useEffect(i,d),o}function Ge(t){const e=G.c(14),l=M.useRef(null),o=`scroll-position:${t}`,c=M.useRef(null);let r;e[0]!==o?(r=()=>{l.current&&sessionStorage.setItem(o,String(l.current.scrollTop))},e[0]=o,e[1]=r):r=e[1];const a=r;let i;e[2]!==o?(i=()=>{if(c.current===o)return;const f=sessionStorage.getItem(o);if(f&&l.current){const j=Number.parseInt(f,10);l.current.scrollTop=j}c.current=o},e[2]=o,e[3]=i):i=e[3];const d=i;let y;e[4]!==d||e[5]!==o?(y=()=>{c.current!==o&&d()},e[4]=d,e[5]=o,e[6]=y):y=e[6];const h=y;let n;e[7]!==d||e[8]!==o?(n=f=>{l.current=f,f&&c.current!==o&&requestAnimationFrame(()=>{d()})},e[7]=d,e[8]=o,e[9]=n):n=e[9];const N=n;let u;return e[10]!==h||e[11]!==a||e[12]!==N?(u={scrollRef:N,saveScrollPosition:a,handleScroll:h},e[10]=h,e[11]=a,e[12]=N,e[13]=u):u=e[13],u}const He=24;function Qe(t){const e=G.c(53),{registryId:l,listToolName:o,filtersToolName:c,search:r}=t,{org:a}=Z();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[0]=i):i=e[0];const[d,y]=M.useState(i);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[1]=h):h=e[1];const[n,N]=M.useState(h),u=l||null;let f;e[2]!==a.id||e[3]!==u?(f={connectionId:u,orgId:a.id},e[2]=a.id,e[3]=u,e[4]=f):f=e[4];const j=Ce(f),R=!!c;let C;e[5]!==c||e[6]!==l?(C=se.toolCall(l,c||"no-filters","{}"),e[5]=c,e[6]=l,e[7]=C):C=e[7];let b;e[8]!==j||e[9]!==c?(b=async()=>{if(!c)return{tags:[],categories:[]};const D=await j.callTool({name:c,arguments:{}});return D.structuredContent??D},e[8]=j,e[9]=c,e[10]=b):b=e[10];let k;e[11]!==C||e[12]!==b?(k={queryKey:C,queryFn:b,staleTime:36e5},e[11]=C,e[12]=b,e[13]=k):k=e[13];const{data:P}=de(k);let v,S,T;if(e[14]!==o||e[15]!==l||e[16]!==r||e[17]!==n||e[18]!==d){const D=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;v={limit:He,...d.length>0&&{tags:d},...n.length>0&&{categories:n},...D&&{where:D}},T=je,S=se.toolCall(l,o,JSON.stringify(v)),e[14]=o,e[15]=l,e[16]=r,e[17]=n,e[18]=d,e[19]=v,e[20]=S,e[21]=T}else v=e[19],S=e[20],T=e[21];let I;e[22]!==j||e[23]!==v||e[24]!==o?(I=async D=>{const{pageParam:ee}=D,me=ee?{...v,cursor:ee}:v,te=await j.callTool({name:o,arguments:me});return te.structuredContent??te},e[22]=j,e[23]=v,e[24]=o,e[25]=I):I=e[25];let z;e[26]!==I||e[27]!==S?(z={queryKey:S,queryFn:I,initialPageParam:void 0,getNextPageParam:Ue,staleTime:36e5,placeholderData:fe},e[26]=I,e[27]=S,e[28]=z):z=e[28];const{data:L,fetchNextPage:$,hasNextPage:m,isFetchingNextPage:x,isFetching:g,isLoading:w}=T(z);let F;e:{if(!L?.pages||L.pages.length===0){F=null;break e}const D=L.pages[0];if(typeof D=="object"&&D!==null&&"totalCount"in D&&typeof D.totalCount=="number"){F=D.totalCount;break e}F=null}const p=F,K=L?.pages;let A;e[29]!==K?(A=ve(K),e[29]=K,e[30]=A):A=e[30];const E=A;let V;e[31]!==r||e[32]!==n.length||e[33]!==d.length?(V=d.length>0||n.length>0||!!r?.trim(),e[31]=r,e[32]=n.length,e[33]=d.length,e[34]=V):V=e[34];const O=V,q=g&&!x&&!w&&O;let _;e[35]!==$||e[36]!==m||e[37]!==x?(_=()=>{m&&!x&&$()},e[35]=$,e[36]=m,e[37]=x,e[38]=_):_=e[38];const B=_,W=m??!1,H=R?P?.tags:void 0,X=R?P?.categories:void 0;let U;return e[39]!==O||e[40]!==g||e[41]!==x||e[42]!==q||e[43]!==w||e[44]!==E||e[45]!==B||e[46]!==n||e[47]!==d||e[48]!==W||e[49]!==H||e[50]!==X||e[51]!==p?(U={items:E,totalCount:p,hasMore:W,isLoadingMore:x,isFiltering:q,isInitialLoading:w,isFetching:g,loadMore:B,availableTags:H,availableCategories:X,selectedTags:d,selectedCategories:n,setSelectedTags:y,setSelectedCategories:N,hasActiveFilters:O},e[39]=O,e[40]=g,e[41]=x,e[42]=q,e[43]=w,e[44]=E,e[45]=B,e[46]=n,e[47]=d,e[48]=W,e[49]=H,e[50]=X,e[51]=p,e[52]=U):U=e[52],U}function Ue(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function Ye(t,e){return[...t].sort((l,o)=>o.count-l.count).slice(0,e)}function re(t){const e=G.c(52),{label:l,items:o,selectedItems:c,onToggle:r,onClear:a}=t,[i,d]=M.useState(""),[y,h]=M.useState(!1);let n,N,u,f,j,R,C,b,k,P,v;if(e[0]!==o||e[1]!==l||e[2]!==r||e[3]!==y||e[4]!==i||e[5]!==c){const $=[...i?o.filter(A=>A.value.toLowerCase().includes(i.toLowerCase())):o].sort(Je);u=c.length,N=$e,k=y,P=h;let m;e[17]!==l?(m=s.jsx("span",{children:l}),e[17]=l,e[18]=m):m=e[18];let x;e[19]!==u?(x=u>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:u}),e[19]=u,e[20]=x):x=e[20];let g;e[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Le,{size:14,className:"opacity-50"}),e[21]=g):g=e[21],e[22]!==x||e[23]!==m?(v=s.jsx(ke,{asChild:!0,children:s.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[m,x,g]})}),e[22]=x,e[23]=m,e[24]=v):v=e[24],n=ze,R="w-64 p-0",C="start";let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ie,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=w):w=e[25];let F;e[26]!==l?(F=l.toLowerCase(),e[26]=l,e[27]=F):F=e[27];const p=`Search ${F}...`;let K;e[28]===Symbol.for("react.memo_cache_sentinel")?(K=A=>d(A.target.value),e[28]=K):K=e[28],e[29]!==i||e[30]!==p?(b=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:[w,s.jsx(Pe,{type:"text",placeholder:p,value:i,onChange:K,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]=p,e[31]=b):b=e[31],f="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",j=$.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):$.map(A=>{const E=c.includes(A.value);return s.jsxs("button",{onClick:()=>r(A.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",E?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[E&&s.jsx(Fe,{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]=o,e[1]=l,e[2]=r,e[3]=y,e[4]=i,e[5]=c,e[6]=n,e[7]=N,e[8]=u,e[9]=f,e[10]=j,e[11]=R,e[12]=C,e[13]=b,e[14]=k,e[15]=P,e[16]=v}else n=e[6],N=e[7],u=e[8],f=e[9],j=e[10],R=e[11],C=e[12],b=e[13],k=e[14],P=e[15],v=e[16];let S;e[32]!==f||e[33]!==j?(S=s.jsx("div",{className:f,children:j}),e[32]=f,e[33]=j,e[34]=S):S=e[34];let T;e[35]!==l||e[36]!==a||e[37]!==u?(T=u>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(Q,{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]=u,e[38]=T):T=e[38];let I;e[39]!==n||e[40]!==T||e[41]!==R||e[42]!==C||e[43]!==b||e[44]!==S?(I=s.jsxs(n,{className:R,align:C,children:[b,S,T]}),e[39]=n,e[40]=T,e[41]=R,e[42]=C,e[43]=b,e[44]=S,e[45]=I):I=e[45];let z;return e[46]!==N||e[47]!==I||e[48]!==k||e[49]!==P||e[50]!==v?(z=s.jsxs(N,{open:k,onOpenChange:P,children:[v,I]}),e[46]=N,e[47]=I,e[48]=k,e[49]=P,e[50]=v,e[51]=z):z=e[51],z}function Je(t,e){return e.count-t.count}function Ze(t){const e=G.c(67),{availableTags:l,availableCategories:o,selectedTags:c,selectedCategories:r,onTagChange:a,onCategoryChange:i}=t,d=l&&l.length>0||o&&o.length>0,y=c.length>0||r.length>0;if(!d)return null;let h;e[0]!==a||e[1]!==c?(h=m=>{c.includes(m)?a(c.filter(x=>x!==m)):a([...c,m])},e[0]=a,e[1]=c,e[2]=h):h=e[2];const n=h;let N;e[3]!==i||e[4]!==r?(N=m=>{r.includes(m)?i(r.filter(x=>x!==m)):i([...r,m])},e[3]=i,e[4]=r,e[5]=N):N=e[5];const u=N;let f;e[6]!==i||e[7]!==a?(f=()=>{a([]),i([])},e[6]=i,e[7]=a,e[8]=f):f=e[8];const j=f;let R,C,b,k,P,v,S;if(e[9]!==o||e[10]!==l||e[11]!==i||e[12]!==a||e[13]!==r||e[14]!==c||e[15]!==u||e[16]!==n){const m=o?Ye(o,6):[];R=r,C=c,S=new Set(m.map(Xe)),P="flex items-center border-b border-border";let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(ne,{size:16})}),e[24]=x):x=e[24];let g;e[25]!==o||e[26]!==i||e[27]!==r||e[28]!==u?(g=o&&o.length>0&&s.jsx(re,{label:"Categories",items:o,selectedItems:r,onToggle:u,onClear:()=>i([])}),e[25]=o,e[26]=i,e[27]=r,e[28]=u,e[29]=g):g=e[29];let w;e[30]!==l||e[31]!==a||e[32]!==c||e[33]!==n?(w=l&&l.length>0&&s.jsx(re,{label:"Tags",items:l,selectedItems:c,onToggle:n,onClear:()=>a([])}),e[30]=l,e[31]=a,e[32]=c,e[33]=n,e[34]=w):w=e[34],e[35]!==w||e[36]!==g?(v=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[x,g,w]}),e[35]=w,e[36]=g,e[37]=v):v=e[37],b="flex items-center gap-3 flex-wrap px-5 py-3";let F;e[38]!==r||e[39]!==u?(F=p=>{const K=r.includes(p.value);return s.jsxs("div",{onClick:()=>u(p.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",K?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:p.value}),K&&s.jsx("span",{onClick:A=>{A.stopPropagation(),u(p.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},p.value)},e[38]=r,e[39]=u,e[40]=F):F=e[40],k=m.map(F),e[9]=o,e[10]=l,e[11]=i,e[12]=a,e[13]=r,e[14]=c,e[15]=u,e[16]=n,e[17]=R,e[18]=C,e[19]=b,e[20]=k,e[21]=P,e[22]=v,e[23]=S}else R=e[17],C=e[18],b=e[19],k=e[20],P=e[21],v=e[22],S=e[23];let T;if(e[41]!==R||e[42]!==u||e[43]!==S){let m;e[45]!==S?(m=g=>!S.has(g),e[45]=S,e[46]=m):m=e[46];let x;e[47]!==u?(x=g=>s.jsxs("div",{onClick:()=>u(g),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:g}),s.jsx("span",{onClick:w=>{w.stopPropagation(),u(g)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},`cat-${g}`),e[47]=u,e[48]=x):x=e[48],T=R.filter(m).map(x),e[41]=R,e[42]=u,e[43]=S,e[44]=T}else T=e[44];let I;if(e[49]!==C||e[50]!==n){let m;e[52]!==n?(m=x=>s.jsxs("div",{onClick:()=>n(x),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:x}),s.jsx("span",{onClick:g=>{g.stopPropagation(),n(x)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(Y,{size:12})})]},`tag-${x}`),e[52]=n,e[53]=m):m=e[53],I=C.map(m),e[49]=C,e[50]=n,e[51]=I}else I=e[51];let z;e[54]!==j||e[55]!==y?(z=y&&s.jsxs(Q,{variant:"ghost",size:"sm",onClick:j,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(Y,{size:14}),"Clear all"]}),e[54]=j,e[55]=y,e[56]=z):z=e[56];let L;e[57]!==z||e[58]!==b||e[59]!==k||e[60]!==T||e[61]!==I?(L=s.jsxs("div",{className:b,children:[k,T,I,z]}),e[57]=z,e[58]=b,e[59]=k,e[60]=T,e[61]=I,e[62]=L):L=e[62];let $;return e[63]!==L||e[64]!==P||e[65]!==v?($=s.jsxs("div",{className:P,children:[v,L]}),e[63]=L,e[64]=P,e[65]=v,e[66]=$):$=e[66],$}function Xe(t){return t.value}function et(t,e){if(!e)return t;const l=e.toLowerCase();return t.filter(o=>(o.name||o.title||"").toLowerCase().includes(l)||(o.description||o.server.description||"").toLowerCase().includes(l))}function tt(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function st(t){const e=G.c(54),{registryId:l,listToolName:o,filtersToolName:c}=t,[r,a]=M.useState(""),i=_e(r,300),d=oe(),{org:y}=Z(),{scrollRef:h,saveScrollPosition:n,handleScroll:N}=Ge(`store-discovery:${l}`);let u;e[0]!==i||e[1]!==c||e[2]!==o||e[3]!==l?(u={registryId:l,listToolName:o,filtersToolName:c,search:i},e[0]=i,e[1]=c,e[2]=o,e[3]=l,e[4]=u):u=e[4];const{items:f,hasMore:j,isLoadingMore:R,isInitialLoading:C,isFetching:b,loadMore:k,availableTags:P,availableCategories:v,selectedTags:S,selectedCategories:T,setSelectedTags:I,setSelectedCategories:z,hasActiveFilters:L}=Qe(u);let $,m,x,g;e[5]!==i||e[6]!==b||e[7]!==C||e[8]!==f||e[9]!==r?($=r?et(f,r):f,m=(r!==i||b)&&!C&&!!r,g=$.filter(tt),x=$.filter(B=>!g.find(W=>W.id===B.id)),e[5]=i,e[6]=b,e[7]=C,e[8]=f,e[9]=r,e[10]=$,e[11]=m,e[12]=x,e[13]=g):($=e[10],m=e[11],x=e[12],g=e[13]);const w=x;let F;e[14]!==d||e[15]!==y.slug||e[16]!==l||e[17]!==n?(F=B=>{n();const W=Ie(B.name||B.title||B.server.title||""),H=B.server.name;d({to:"/$org/store/$appName",params:{org:y.slug,appName:W},search:{registryId:l,serverName:H}})},e[14]=d,e[15]=y.slug,e[16]=l,e[17]=n,e[18]=F):F=e[18];const p=F;let K;e[19]!==N||e[20]!==j||e[21]!==R||e[22]!==k?(K=B=>{if(N(),!j||R)return;const W=B.currentTarget;W.scrollHeight-W.scrollTop-W.clientHeight<200&&k()},e[19]=N,e[20]=j,e[21]=R,e[22]=k,e[23]=K):K=e[23];const A=K;let E;e[24]!==m||e[25]!==r?(E=s.jsx(Re,{value:r,onChange:a,placeholder:"Search for an MCP Server...",isSearching:m}),e[24]=m,e[25]=r,e[26]=E):E=e[26];let V;e[27]!==v||e[28]!==P||e[29]!==T||e[30]!==S||e[31]!==z||e[32]!==I?(V=s.jsx(Ze,{availableTags:P,availableCategories:v,selectedTags:S,selectedCategories:T,onTagChange:I,onCategoryChange:z}),e[27]=v,e[28]=P,e[29]=T,e[30]=S,e[31]=z,e[32]=I,e[33]=V):V=e[33];let O;e[34]!==w||e[35]!==$||e[36]!==p||e[37]!==L||e[38]!==j||e[39]!==C||e[40]!==R||e[41]!==m||e[42]!==f||e[43]!==r||e[44]!==g?(O=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:C?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(J,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):f.length===0&&!L?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{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."})]}):f.length===0&&L&&!r?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ne,{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&&!m?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ie,{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:[m&&$.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(J,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),g.length>0&&s.jsx(le,{items:g,title:"Verified",onItemClick:p}),w.length>0&&s.jsx(le,{items:w,title:g.length>0?"All":"",onItemClick:p}),j&&R&&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(J,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[34]=w,e[35]=$,e[36]=p,e[37]=L,e[38]=j,e[39]=C,e[40]=R,e[41]=m,e[42]=f,e[43]=r,e[44]=g,e[45]=O):O=e[45];let q;e[46]!==A||e[47]!==h||e[48]!==O?(q=s.jsx("div",{ref:h,className:"flex-1 overflow-y-auto",onScroll:A,children:O}),e[46]=A,e[47]=h,e[48]=O,e[49]=q):q=e[49];let _;return e[50]!==E||e[51]!==V||e[52]!==q?(_=s.jsxs("div",{className:"flex flex-col h-full",children:[E,V,q]}),e[50]=E,e[51]=V,e[52]=q,e[53]=_):_=e[53],_}function lt(t){const e=G.c(8),{registryId:l}=t,o=we(l),c=o?.tools;let r;e[0]!==c?(r=ye(c),e[0]=c,e[1]=r):r=e[1];const a=r;if(!a)throw new Error("This registry does not support listing store items.");const i=o?.tools;let d;e[2]!==i?(d=Ne(i),e[2]=i,e[3]=d):d=e[3];const h=d||void 0;let n;return e[4]!==a||e[5]!==l||e[6]!==h?(n=s.jsx(st,{registryId:l,listToolName:a,filtersToolName:h}),e[4]=a,e[5]=l,e[6]=h,e[7]=n):n=e[7],n}function rt(t){const e=G.c(15),{registries:l,value:o,onValueChange:c,onAddWellKnown:r,wellKnownRegistries:a,placeholder:i}=t,d=i===void 0?"Select a registry...":i;let y;e[0]!==d?(y=s.jsx(Ae,{size:"sm",className:"w-auto min-w-[160px]",children:s.jsx(Ee,{placeholder:d})}),e[0]=d,e[1]=y):y=e[1];let h;e[2]!==l?(h=l.map(ot),e[2]=l,e[3]=h):h=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(f=>s.jsxs("button",{onClick:j=>{j.preventDefault(),j.stopPropagation(),r(f)},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:[f.icon?s.jsx("img",{src:f.icon,alt:f.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:f.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:f.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Be,{size:16})})]},f.id??f.title))]}),e[4]=r,e[5]=a,e[6]=n):n=e[6];let N;e[7]!==h||e[8]!==n?(N=s.jsxs(De,{children:[h,n]}),e[7]=h,e[8]=n,e[9]=N):N=e[9];let u;return e[10]!==c||e[11]!==y||e[12]!==N||e[13]!==o?(u=s.jsxs(Me,{value:o,onValueChange:c,children:[y,N]}),e[10]=c,e[11]=y,e[12]=N,e[13]=o,e[14]=u):u=e[14],u}function ot(t){return s.jsx(Ke,{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 nt({registries:t,onConnected:e}){const l=ae(),{org:{slug:o}}=Z(),{data:c}=ue.useSession(),r=oe(),[a,i]=M.useState(!1),d=t[0],y=async()=>{if(!(!d||!c?.user?.id)){i(!0);try{const n=await l.create.mutateAsync(d);e?.(n.id)}finally{i(!1)}}},h=()=>{r({to:"/$org/mcps",params:{org:o},search:{action:"create"}})};return s.jsx(Ve,{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(Q,{variant:"outline",onClick:y,disabled:a||!d,children:[d?.icon&&s.jsx("img",{src:d.icon,alt:"",className:"size-4"}),a?"Installing...":"Install Registry"]}),s.jsx(Q,{variant:"outline",onClick:h,children:"Custom Connection"})]})})}function Yt(){const t=G.c(41),{org:e}=Z(),l=Te(),o=ae(),c=xe(),r=c.location.pathname.includes("/store/")&&c.location.pathname.split("/").length>3,a=Oe(l);let i;t[0]!==a?(i=a.map(ct),t[0]=a,t[1]=i):i=t[1];const d=i;let y;t[2]!==e.slug?(y=We.selectedRegistry(e.slug),t[2]=e.slug,t[3]=y):y=t[3];const[h,n]=qe(y,at);let N;if(t[4]!==a||t[5]!==h){let p;t[7]!==h?(p=K=>K.id===h,t[7]=h,t[8]=p):p=t[8],N=a.find(p),t[4]=a,t[5]=h,t[6]=N}else N=t[6];const f=N?.id||a[0]?.id||"";let j;t[9]!==e.id?(j=be(e.id),t[9]=e.id,t[10]=j):j=t[10];let R;t[11]!==j?(R=[j],t[11]=j,t[12]=R):R=t[12];const C=R;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=[Se()],t[13]=b):b=t[13];const k=b;let P;t[14]!==o.create||t[15]!==n?(P=async p=>{const K=await o.create.mutateAsync(p);n(K.id)},t[14]=o.create,t[15]=n,t[16]=P):P=t[16];const v=P;let S;t[17]!==a?(S=new Set(a.map(it)),t[17]=a,t[18]=S):S=t[18];const T=S;let I;t[19]!==T||t[20]!==C?(I=C.filter(p=>p.id&&!T.has(p.id)),t[19]=T,t[20]=C,t[21]=I):I=t[21];const z=I;let L;t[22]!==T?(L=k.filter(p=>p.id&&!T.has(p.id)),t[22]=T,t[23]=L):L=t[23];const $=L;if(r){let p;return t[24]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ge,{}),t[24]=p):p=t[24],p}let m;t[25]!==v?(m=async p=>v(p),t[25]=v,t[26]=m):m=t[26];let x;t[27]!==z||t[28]!==f||t[29]!==d||t[30]!==n||t[31]!==m?(x=s.jsx(pe,{title:"Store",ctaButton:s.jsx(rt,{wellKnownRegistries:z,registries:d,value:f,onValueChange:n,onAddWellKnown:m,placeholder:"Select store..."})}),t[27]=z,t[28]=f,t[29]=d,t[30]=n,t[31]=m,t[32]=x):x=t[32];let g;t[33]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(J,{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]=g):g=t[33];let w;t[34]!==$||t[35]!==f||t[36]!==n?(w=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx(M.Suspense,{fallback:g,children:f?s.jsx(lt,{registryId:f}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(nt,{registries:$,onConnected:p=>{n(p)}})})})}),t[34]=$,t[35]=f,t[36]=n,t[37]=w):w=t[37];let F;return t[38]!==x||t[39]!==w?(F=s.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[x,w]}),t[38]=x,t[39]=w,t[40]=F):F=t[40],F}function it(t){return t.id}function at(t){return t??""}function ct(t){return{id:t.id,name:t.title,icon:t.icon||void 0}}export{Yt as default};