@decocms/mesh 2.44.2 → 2.44.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C1oaexcn.js → AlertCircle-9_AbzfZV.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B1SBiQVA.js → ArrowLeft-2xAygwK8.js} +1 -1
- package/dist/client/assets/{ArrowUp-BvlJhwmz.js → ArrowUp-PDh8aKqr.js} +1 -1
- package/dist/client/assets/{Check-DImC9hlR.js → Check-DCOgSIim.js} +1 -1
- package/dist/client/assets/{ChevronDown-CJiuDn-R.js → ChevronDown-B9uETHHQ.js} +1 -1
- package/dist/client/assets/{Code01-C3PLJdIe.js → Code01-Bpv3xznV.js} +1 -1
- package/dist/client/assets/{Copy01-CJVQGg2V.js → Copy01-C5lSJKpp.js} +1 -1
- package/dist/client/assets/{CpuChip02-CvTMaFgN.js → CpuChip02-B0kuxhX5.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BQhkzfkG.js → DotsHorizontal-R5qKOO-N.js} +1 -1
- package/dist/client/assets/{DotsVertical-RAbtNrG6.js → DotsVertical-qocOLS4A.js} +1 -1
- package/dist/client/assets/{Download01-DJRyuQwN.js → Download01-B-rCvX3Z.js} +1 -1
- package/dist/client/assets/{Edit01-DsrgmMbR.js → Edit01-DHPNOaMT.js} +1 -1
- package/dist/client/assets/{File06-DdyNkMaH.js → File06-BM3tW-ao.js} +1 -1
- package/dist/client/assets/{FilterLines-DudXubI6.js → FilterLines-DSbTCxDv.js} +1 -1
- package/dist/client/assets/{FlipBackward-BT14MhEV.js → FlipBackward-BQuWvmOt.js} +1 -1
- package/dist/client/assets/{GitBranch01-DMdTTGPv.js → GitBranch01-DZYIjDzk.js} +1 -1
- package/dist/client/assets/{Grid01-F6FBpTXb.js → Grid01-CHS_jF02.js} +1 -1
- package/dist/client/assets/{Home02-CXLfj9Lm.js → Home02-BuP7hann.js} +1 -1
- package/dist/client/assets/{Image01-CGATMxv1.js → Image01-5bkPZ70X.js} +1 -1
- package/dist/client/assets/{Inbox01-BExxQniM.js → Inbox01-39gPJAMl.js} +1 -1
- package/dist/client/assets/{InfoCircle-BwBXEQXi.js → InfoCircle-Dt8NaYCm.js} +1 -1
- package/dist/client/assets/{Key01-BPqaf5vy.js → Key01-8WmQn7uV.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CxomLdJd.js → LinkExternal01-DQw1Qc9U.js} +1 -1
- package/dist/client/assets/{List-taDOKmLS.js → List-C7xsEmxx.js} +1 -1
- package/dist/client/assets/{Loading01-C5WNj1RN.js → Loading01-CopTTh4g.js} +1 -1
- package/dist/client/assets/{Lock01-Di-2F0aX.js → Lock01-BdnY_MsG.js} +1 -1
- package/dist/client/assets/{Play-CrFW3Xap.js → Play-yVQdEMOg.js} +1 -1
- package/dist/client/assets/{Plus-Rzuz08cb.js → Plus-erQKhzFc.js} +1 -1
- package/dist/client/assets/{SearchMd-CQBqMKg_.js → SearchMd-CHkFEvMn.js} +1 -1
- package/dist/client/assets/{Terminal-kk64xKO9.js → Terminal-nMH6minT.js} +1 -1
- package/dist/client/assets/{Trash01-NIFttcxe.js → Trash01-CSFSnmeR.js} +1 -1
- package/dist/client/assets/{Upload01-DN0UV10S.js → Upload01-CDd2Qhk0.js} +1 -1
- package/dist/client/assets/{X-DmFAeozb.js → X-C7jTJYwd.js} +1 -1
- package/dist/client/assets/{XClose-CbwF-zr_.js → XClose-CqnirkQ-.js} +1 -1
- package/dist/client/assets/{agent-detail-COGqHNUz.js → agent-detail-BXGFUOb3.js} +1 -1
- package/dist/client/assets/{agents-B3iPqEqm.js → agents-CJ-N0UGt.js} +1 -1
- package/dist/client/assets/{alert-dialog-nojSsjex.js → alert-dialog-JUSgghwR.js} +1 -1
- package/dist/client/assets/{auth-catchall-C_OoShX7.js → auth-catchall-DuMCH5D-.js} +1 -1
- package/dist/client/assets/{avatar-HSzeBtSD.js → avatar-BIPSK-nZ.js} +1 -1
- package/dist/client/assets/{badge-D7yW7Ams.js → badge-Blh93jrG.js} +1 -1
- package/dist/client/assets/{binder-BvGWgf0j.js → binder-ku-JM_HB.js} +1 -1
- package/dist/client/assets/{button-B9UDEwx9.js → button-BNEclrG2.js} +1 -1
- package/dist/client/assets/card-kDbUMtCL.js +1 -0
- package/dist/client/assets/{checkbox-DmHZ3Xhg.js → checkbox-DZe4E6Kn.js} +1 -1
- package/dist/client/assets/{collection-detail-Cmda52TC.js → collection-detail-MFOY08Kp.js} +2 -2
- package/dist/client/assets/{collection-display-button-BAinwubP.js → collection-display-button-Bv_XCGpu.js} +1 -1
- package/dist/client/assets/{collection-header-d_96L4kd.js → collection-header-BMM2Ppyf.js} +1 -1
- package/dist/client/assets/{collection-page-BuBCnaqK.js → collection-page-CHEPcLha.js} +1 -1
- package/dist/client/assets/{collection-search-Cp9Rg8cG.js → collection-search-ClAji_RX.js} +1 -1
- package/dist/client/assets/{collection-tab-DGpjXcu1.js → collection-tab-Eyar9Ax-.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Cfb-5BQo.js → collection-table-wrapper-BdCz63Jd.js} +1 -1
- package/dist/client/assets/connect-_JtLK9IP.js +1 -0
- package/dist/client/assets/{connection-card-DSC3U6N-.js → connection-card-C5RmKpx-.js} +1 -1
- package/dist/client/assets/connection-detail-OBVHxVs9.js +1 -0
- package/dist/client/assets/{connections-3QeHd0Af.js → connections-BJK-Unmt.js} +1 -1
- package/dist/client/assets/constants-Cp5o6xb6.js +1 -0
- package/dist/client/assets/{constants-C8DVLjyM.js → constants-l6jfVkIP.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-JxPXU7zP.js → create-organization-dialog-DnFctc5e.js} +1 -1
- package/dist/client/assets/{dialog-DUXNadw5.js → dialog-cbRNFkUF.js} +1 -1
- package/dist/client/assets/{dropdown-menu-5V-XyUMl.js → dropdown-menu-B5X7QG53.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-Ba9BM3q2.js → dynamic-plugin-layout-AVNjiCzl.js} +1 -1
- package/dist/client/assets/{empty-state-D6Pye5dp.js → empty-state-Bnk561r4.js} +1 -1
- package/dist/client/assets/{empty-state-Ba4zQn5e.js → empty-state-DHhGwZ9F.js} +1 -1
- package/dist/client/assets/{env-vars-editor-BKG_L2uV.js → env-vars-editor-C22VVc0j.js} +1 -1
- package/dist/client/assets/{error-boundary-BYKWfLka.js → error-boundary-CwJYCTYr.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CDfHtG_N.js → extract-connection-data-CuvIF5Zc.js} +1 -1
- package/dist/client/assets/{file-browser-D32InLNO.js → file-browser-Ds1nWCpa.js} +2 -2
- package/dist/client/assets/{form-DufpJhV9.js → form-0ZBALKH0.js} +1 -1
- package/dist/client/assets/{grid-view-CnSMlDZ4.js → grid-view-DIwzP_dG.js} +1 -1
- package/dist/client/assets/{home-MusYVBVC.js → home-BtTYUCCq.js} +1 -1
- package/dist/client/assets/{index-kxFCfKdx.js → index-BTX95t7l.js} +11 -11
- package/dist/client/assets/index-CXM9c79w.js +25 -0
- package/dist/client/assets/{index-fVdZwXbQ.js → index-DALSTBZ2.js} +1 -1
- package/dist/client/assets/{index-g9oC-3mV.js → index-DHqToqKZ.js} +1 -1
- package/dist/client/assets/{index-CVzDWVip.js → index-DwgBtTXr.js} +1 -1
- package/dist/client/assets/{index-CNdaxvBl.js → index-dMwHjnnN.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Q9Ch1SlH.js → infiniteQueryObserver-DgpNxMlA.js} +1 -1
- package/dist/client/assets/{input-CJuUYj5Y.js → input-Vw7XIX0r.js} +1 -1
- package/dist/client/assets/{layout-BdEZp7Lm.js → layout-DKHrwMN9.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DuVpM8xt.js → localstorage-keys-BpjSpnih.js} +1 -1
- package/dist/client/assets/{login-Baj4wuxy.js → login-SBFyv6s2.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BCtnFmpv.js → mcp-oauth-CrWnEeM3.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DaxbgdWa.js → mcp-server-card-CgncAkll.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-C4n2ElKE.js → mcp-server-detail-BJ7r3PGK.js} +2 -2
- package/dist/client/assets/{members-C-QMSOdo.js → members-BWzPhwIh.js} +1 -1
- package/dist/client/assets/{monaco-editor-1VMfvFaT.js → monaco-editor-DcKPEfxo.js} +3 -3
- package/dist/client/assets/{monitoring-CyqwraZN.js → monitoring-1I6U1Wzz.js} +1 -1
- package/dist/client/assets/{oauth-callback-UvAveY4Q.js → oauth-callback-BchO0M4E.js} +1 -1
- package/dist/client/assets/{page-IMRDmGp_.js → page-BPc0iUzq.js} +1 -1
- package/dist/client/assets/{page-o9rm9dBG.js → page-Zz3f3l9F.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-DKtGxFhi.js → pin-to-sidebar-button-CDjTUMWb.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DqfmD7Lv.js → plugin-empty-state-CwFHEPBt.js} +1 -1
- package/dist/client/assets/{plugin-header-BfXGZdm2.js → plugin-header-CMNaIaJK.js} +1 -1
- package/dist/client/assets/{plugins-B-FlFz3o.js → plugins-Cv7F5xoL.js} +1 -1
- package/dist/client/assets/{popover-IWCGO-jB.js → popover-pmxV9P13.js} +1 -1
- package/dist/client/assets/{registry-utils-9nMczNLD.js → registry-utils-Dda0cOYu.js} +1 -1
- package/dist/client/assets/{resizable-oTpquxsO.js → resizable-DGeBeBFx.js} +1 -1
- package/dist/client/assets/{resource-tabs-DNjaGx4N.js → resource-tabs-B4vVuVvd.js} +1 -1
- package/dist/client/assets/{select-6QIp3PPA.js → select-BJmQF-t1.js} +1 -1
- package/dist/client/assets/{settings-DmEN7q-R.js → settings-awh6NdSn.js} +1 -1
- package/dist/client/assets/{shell-layout-f9QetI-r.js → shell-layout-CZgMrEjK.js} +2 -2
- package/dist/client/assets/{spinner-CHfAw4LE.js → spinner-DXcv41zw.js} +1 -1
- package/dist/client/assets/{switch-B8GiDtx0.js → switch-l3-49lJA.js} +1 -1
- package/dist/client/assets/{textarea-CO4qLNDj.js → textarea-DoBy6xpq.js} +1 -1
- package/dist/client/assets/{tool-set-selector-uL1FTDsj.js → tool-set-selector-DbGPsYZu.js} +1 -1
- package/dist/client/assets/{tools-list-BE1mq5Cn.js → tools-list-8U1et6rm.js} +1 -1
- package/dist/client/assets/{tooltip-DPmy6Yc4.js → tooltip-Mf5UtuF2.js} +1 -1
- package/dist/client/assets/{typewriter-title-D2-DYqDP.js → typewriter-title-B2NtHvjD.js} +1 -1
- package/dist/client/assets/{use-binding-Bpukv3gt.js → use-binding-BM0mjywS.js} +1 -1
- package/dist/client/assets/{use-collections-DWOZCISS.js → use-collections-M-ZucrNc.js} +1 -1
- package/dist/client/assets/{use-connection-ASBc3U14.js → use-connection-B7MC5D37.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DlrAoyaQ.js → use-create-virtual-mcp-mR4PpEB5.js} +1 -1
- package/dist/client/assets/{use-list-state-ZDRP3zFW.js → use-list-state-5iRHLEuj.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DXLHacDq.js → use-mcp-prompts-Cwl3wuSJ.js} +1 -1
- package/dist/client/assets/{use-members-CTEqdwIL.js → use-members-DQCYK0dI.js} +1 -1
- package/dist/client/assets/{use-mobile-BuEGyUe0.js → use-mobile-C3BU8S8_.js} +1 -1
- package/dist/client/assets/{use-organization-settings-hA9VwO-v.js → use-organization-settings-Djf-qkBb.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BR9Cj6JE.js → use-virtual-mcp-TJpzrF0-.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DMGU-oe6.js +1 -0
- package/dist/client/assets/{useMutation-ClL17OKX.js → useMutation-BuhKRt0C.js} +1 -1
- package/dist/client/assets/useQuery-CnjlQpZk.js +1 -0
- package/dist/client/assets/{value-CzHdinJY.js → value-DN_0rG_i.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B5HElat6.js → view-mode-toggle-C5CEe5h-.js} +1 -1
- package/dist/client/assets/{workflow-Lt3GFUiP.js → workflow-B7pAFqx9.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/card-D-ZcDLJM.js +0 -1
- package/dist/client/assets/circle-alert-CsGRs6FI.js +0 -1
- package/dist/client/assets/connect-ChWwgYE3.js +0 -1
- package/dist/client/assets/connection-detail-D9V3bixZ.js +0 -1
- package/dist/client/assets/constants-CuO4IXOK.js +0 -1
- package/dist/client/assets/index-BJd9JH52.js +0 -25
- package/dist/client/assets/useInfiniteQuery-CnqRaniP.js +0 -1
- package/dist/client/assets/useQuery-CVADJf0h.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aP as K,aT as C,aQ as V,aY as z,X as _,N as W,aZ as X,a_ as Y,r as h,a$ as Z,b0 as $,b1 as J,aU as ee,b2 as k,b3 as P,b4 as se,b5 as te,b6 as re,ae as oe,j as m,b7 as ne,ai as g,ah as O,b8 as ae,aj as w,b9 as A,al as ie,aq as Q,ax as ue,ay as ce}from"./index-
|
|
1
|
+
import{aP as K,aT as C,aQ as V,aY as z,X as _,N as W,aZ as X,a_ as Y,r as h,a$ as Z,b0 as $,b1 as J,aU as ee,b2 as k,b3 as P,b4 as se,b5 as te,b6 as re,ae as oe,j as m,b7 as ne,ai as g,ah as O,b8 as ae,aj as w,b9 as A,al as ie,aq as Q,ax as ue,ay as ce}from"./index-BTX95t7l.js";function I(r,s){const t=new Set(s);return r.filter(o=>!t.has(o))}function de(r,s,t){const o=r.slice(0);return o[s]=t,o}var le=class extends K{#r;#e;#o;#n;#s;#t;#a;#i;#u=[];constructor(r,s,t){super(),this.#r=r,this.#n=t,this.#o=[],this.#s=[],this.#e=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(s=>{this.#h(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,s){this.#o=r,this.#n=s,C.batch(()=>{const t=this.#s,o=this.#l(this.#o);this.#u=o,o.forEach(i=>i.observer.setOptions(i.defaultedQueryOptions));const e=o.map(i=>i.observer),n=e.map(i=>i.getCurrentResult()),a=t.length!==e.length,c=e.some((i,d)=>i!==t[d]),l=a||c,v=l?!0:n.some((i,d)=>{const b=this.#e[d];return!b||!V(i,b)});!l&&!v||(l&&(this.#s=e),this.#e=n,this.hasListeners()&&(l&&(I(t,e).forEach(i=>{i.destroy()}),I(e,t).forEach(i=>{i.subscribe(d=>{this.#h(i,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,s){const t=this.#l(r),o=t.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[o,e=>this.#d(e??o,s),()=>this.#c(o,t)]}#c(r,s){return s.map((t,o)=>{const e=r[o];return t.defaultedQueryOptions.notifyOnChangeProps?e:t.observer.trackResult(e,n=>{s.forEach(a=>{a.observer.trackProp(n)})})})}#d(r,s){return s?((!this.#t||this.#e!==this.#i||s!==this.#a)&&(this.#a=s,this.#i=this.#e,this.#t=z(this.#t,s(r))),this.#t):r}#l(r){const s=new Map;this.#s.forEach(o=>{const e=o.options.queryHash;if(!e)return;const n=s.get(e);n?n.push(o):s.set(e,[o])});const t=[];return r.forEach(o=>{const e=this.#r.defaultQueryOptions(o),a=s.get(e.queryHash)?.shift()??new _(this.#r,e);t.push({defaultedQueryOptions:e,observer:a})}),t}#h(r,s){const t=this.#s.indexOf(r);t!==-1&&(this.#e=de(this.#e,t,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#t,s=this.#c(this.#e,this.#u),t=this.#d(s,this.#n?.combine);r!==t&&C.batch(()=>{this.listeners.forEach(o=>{o(this.#e)})})}}};function Ce({queries:r,...s},t){const o=W(t),e=X(),n=Y(),a=h.useMemo(()=>r.map(u=>{const f=o.defaultQueryOptions(u);return f._optimisticResults=e?"isRestoring":"optimistic",f}),[r,o,e]);a.forEach(u=>{Z(u),$(u,n)}),J(n);const[c]=h.useState(()=>new le(o,a,s)),[l,v,i]=c.getOptimisticResult(a,s.combine),d=!e&&s.subscribed!==!1;h.useSyncExternalStore(h.useCallback(u=>d?c.subscribe(C.batchCalls(u)):ee,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),h.useEffect(()=>{c.setQueries(a,s)},[a,s,c]);const p=l.some((u,f)=>k(a[f],u))?l.flatMap((u,f)=>{const y=a[f];if(y){const x=new _(o,y);if(k(y,u))return P(y,x,n);se(u,e)&&P(y,x,n)}return[]}):[];if(p.length>0)throw Promise.all(p);const R=l.find((u,f)=>{const y=a[f];return y&&te({result:u,errorResetBoundary:n,throwOnError:y.throwOnError,query:o.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(R?.error)throw R.error;return v(i())}var S="Radio",[he,j]=Q(S),[pe,fe]=he(S),G=h.forwardRef((r,s)=>{const{__scopeRadio:t,name:o,checked:e=!1,required:n,disabled:a,value:c="on",onCheck:l,form:v,...i}=r,[d,b]=h.useState(null),p=O(s,f=>b(f)),R=h.useRef(!1),u=d?v||!!d.closest("form"):!0;return m.jsxs(pe,{scope:t,checked:e,disabled:a,children:[m.jsx(g.button,{type:"button",role:"radio","aria-checked":e,"data-state":D(e),"data-disabled":a?"":void 0,disabled:a,value:c,...i,ref:p,onClick:w(r.onClick,f=>{e||l?.(),u&&(R.current=f.isPropagationStopped(),R.current||f.stopPropagation())})}),u&&m.jsx(q,{control:d,bubbles:!R.current,name:o,value:c,checked:e,required:n,disabled:a,form:v,style:{transform:"translateX(-100%)"}})]})});G.displayName=S;var M="RadioIndicator",N=h.forwardRef((r,s)=>{const{__scopeRadio:t,forceMount:o,...e}=r,n=fe(M,t);return m.jsx(ie,{present:o||n.checked,children:m.jsx(g.span,{"data-state":D(n.checked),"data-disabled":n.disabled?"":void 0,...e,ref:s})})});N.displayName=M;var Re="RadioBubbleInput",q=h.forwardRef(({__scopeRadio:r,control:s,checked:t,bubbles:o=!0,...e},n)=>{const a=h.useRef(null),c=O(a,n),l=ue(t),v=ce(s);return h.useEffect(()=>{const i=a.current;if(!i)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==t&&p){const R=new Event("click",{bubbles:o});p.call(i,t),i.dispatchEvent(R)}},[l,t,o]),m.jsx(g.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...e,tabIndex:-1,ref:c,style:{...e.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});q.displayName=Re;function D(r){return r?"checked":"unchecked"}var ve=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],E="RadioGroup",[be]=Q(E,[A,j]),L=A(),B=j(),[me,ye]=be(E),T=h.forwardRef((r,s)=>{const{__scopeRadioGroup:t,name:o,defaultValue:e,value:n,required:a=!1,disabled:c=!1,orientation:l,dir:v,loop:i=!0,onValueChange:d,...b}=r,p=L(t),R=re(v),[u,f]=oe({prop:n,defaultProp:e??null,onChange:d,caller:E});return m.jsx(me,{scope:t,name:o,required:a,disabled:c,value:u,onValueChange:f,children:m.jsx(ne,{asChild:!0,...p,orientation:l,dir:R,loop:i,children:m.jsx(g.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":c?"":void 0,dir:R,...b,ref:s})})})});T.displayName=E;var F="RadioGroupItem",U=h.forwardRef((r,s)=>{const{__scopeRadioGroup:t,disabled:o,...e}=r,n=ye(F,t),a=n.disabled||o,c=L(t),l=B(t),v=h.useRef(null),i=O(s,v),d=n.value===e.value,b=h.useRef(!1);return h.useEffect(()=>{const p=u=>{ve.includes(u.key)&&(b.current=!0)},R=()=>b.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",R),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",R)}},[]),m.jsx(ae,{asChild:!0,...c,focusable:!a,active:d,children:m.jsx(G,{disabled:a,required:n.required,checked:d,...l,...e,name:n.name,ref:i,onCheck:()=>n.onValueChange(e.value),onKeyDown:w(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:w(e.onFocus,()=>{b.current&&v.current?.click()})})})});U.displayName=F;var ge="RadioGroupIndicator",H=h.forwardRef((r,s)=>{const{__scopeRadioGroup:t,...o}=r,e=B(t);return m.jsx(N,{...e,...o,ref:s})});H.displayName=ge;var we=T,Oe=U,Se=H;export{Oe as I,we as R,Se as a,Ce as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as M,c as ne,j as S,bW as zO,bX as jO,x as qO,ad as jt,s as ee,bY as io,bZ as s_,bn as GO,bo as VO,bl as WO,aa as Ot,ab as Ma,k as rs,o as Oe,bm as de,ac as Zn,b_ as YO,b$ as ze,_ as KO,bw as ul,u as Gn,l as o_,K as Ui,a as l_,N as Gg,a8 as un,e as u_,b as XO,d as ZO,Q as c_,c0 as d_,bT as QO,bB as Lt,c1 as JO,c2 as eL,aX as p_,c3 as tL,c4 as vn,c5 as Xl,c6 as nL,c7 as Zl,c8 as rL,c9 as iL,ca as aL,cb as sL,cc as oL,cd as lL,ce as uL,cf as cL,f as f_,bS as ao,ai as Vg,aj as dL,al as pL,ae as fL,ag as hL,ah as mL,bb as gL,aq as bL}from"./index-kxFCfKdx.js";import{c as me,B as gt}from"./button-B9UDEwx9.js";import{i as EL}from"./X-DmFAeozb.js";import{u as Qr,a as Wg,d as yL}from"./constants-C8DVLjyM.js";import{b as h_}from"./use-virtual-mcp-BR9Cj6JE.js";import{b as TL}from"./use-collections-DWOZCISS.js";import{b as m_,a as SL}from"./use-connection-ASBc3U14.js";import{a as AL}from"./use-binding-Bpukv3gt.js";import{u as kL,M as g_,s as HE}from"./monaco-editor-1VMfvFaT.js";import{u as ma,L as so}from"./localstorage-keys-DuVpM8xt.js";import{I as Yg}from"./input-CJuUYj5Y.js";import{a as is,b as as,P as ss}from"./popover-IWCGO-jB.js";import{S as xL,a as vL,b as _L,c as CL,d as IL}from"./select-6QIp3PPA.js";import{i as NL}from"./File06-DdyNkMaH.js";import{c as wL,i as b_}from"./Grid01-F6FBpTXb.js";import{a as RL}from"./Image01-CGATMxv1.js";import{i as cl}from"./SearchMd-CQBqMKg_.js";import{S as dl}from"./spinner-CHfAw4LE.js";import{c as Jr,T as ei,a as ti,b as Kg}from"./tooltip-DPmy6Yc4.js";import{u as OL,g as E_,l as $E,a as zE,r as LL}from"./use-mcp-prompts-DXLHacDq.js";import{E as DL,i as ML}from"./error-boundary-BYKWfLka.js";import{c as PL,b as FL,e as BL,a as UL,D as HL}from"./dialog-DUXNadw5.js";import{a as $L,F as zL,b as jL,c as qL,d as GL,f as VL}from"./form-DufpJhV9.js";import{I as Xg,E as WL}from"./empty-state-D6Pye5dp.js";import{i as y_}from"./AlertCircle-C1oaexcn.js";import{i as YL}from"./ArrowUp-BvlJhwmz.js";import{t as KL}from"./ChevronDown-CJiuDn-R.js";import{i as Zg}from"./CpuChip02-CvTMaFgN.js";import{i as XL}from"./Edit01-DsrgmMbR.js";import{i as pl}from"./Check-DImC9hlR.js";import{a as Qg}from"./Copy01-CJVQGg2V.js";import{i as ZL}from"./Terminal-kk64xKO9.js";import{g as QL}from"./generate-id-Dyweu44Y.js";import{s as JL}from"./Trash01-NIFttcxe.js";import{u as e2}from"./use-create-virtual-mcp-DlrAoyaQ.js";import{s as t2}from"./Plus-Rzuz08cb.js";var Pa;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},t.getValidEnumValues=i=>{const a=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},t.find=(i,a)=>{for(const s of i)if(a(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}t.joinValues=r,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Pa||(Pa={}));var jE;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(jE||(jE={}));Pa.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Pa.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class oo extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},r={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(s))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return i(this),r}static assert(e){if(!(e instanceof oo))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pa.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n=Object.create(null),r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}oo.create=t=>new oo(t);var qE;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(qE||(qE={}));var ge;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ge||(ge={}));const T_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));T_.displayName="Atom02";const S_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));S_.displayName="ChevronSelectorVertical";const A_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));A_.displayName="Coins01";const k_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));k_.displayName="CurrencyDollar";const x_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));x_.displayName="Lightbulb01";const v_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));v_.displayName="LogOut04";const fl=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));fl.displayName="Stars01";const __=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));__.displayName="Stop";const C_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));C_.displayName="Target04";const I_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));I_.displayName="XCircle";function yt(t){const e=ne.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=me("bg-accent animate-pulse rounded-md",n),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==r||e[6]!==i?(a=S.jsx("div",{"data-slot":"skeleton",className:i,...r}),e[5]=r,e[6]=i,e[7]=a):a=e[7],a}function n2(){const t=ne.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=so.developerMode(),t[0]=e):e=t[0],ma(e,!1)}var N_="vercel.ai.error",r2=Symbol.for(N_),GE,VE,Cn=class w_ extends(VE=Error,GE=r2,VE){constructor({name:e,message:n,cause:r}){super(n),this[GE]=!0,this.name=e,this.cause=r}static isInstance(e){return w_.hasMarker(e,N_)}static hasMarker(e,n){const r=Symbol.for(n);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function R_(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var O_="AI_InvalidArgumentError",L_=`vercel.ai.error.${O_}`,i2=Symbol.for(L_),WE,YE,a2=class extends(YE=Cn,WE=i2,YE){constructor({message:t,cause:e,argument:n}){super({name:O_,message:t,cause:e}),this[WE]=!0,this.argument=n}static isInstance(t){return Cn.hasMarker(t,L_)}},D_="AI_JSONParseError",M_=`vercel.ai.error.${D_}`,s2=Symbol.for(M_),KE,XE,ZE=class extends(XE=Cn,KE=s2,XE){constructor({text:t,cause:e}){super({name:D_,message:`JSON parsing failed: Text: ${t}.
|
|
1
|
+
import{r as M,c as ne,j as S,bU as zO,bV as jO,x as qO,ad as jt,s as ee,bW as io,bX as s_,bn as GO,bo as VO,bl as WO,aa as Ot,ab as Ma,k as rs,o as Oe,bm as de,ac as Zn,bY as YO,bZ as ze,_ as KO,bu as ul,u as Gn,l as o_,K as Ui,a as l_,N as Gg,a8 as un,e as u_,b as XO,d as ZO,Q as c_,b_ as d_,bR as QO,bz as Lt,b$ as JO,c0 as eL,aX as p_,c1 as tL,c2 as vn,c3 as Xl,c4 as nL,c5 as Zl,c6 as rL,c7 as iL,c8 as aL,c9 as sL,ca as oL,cb as lL,cc as uL,cd as cL,f as f_,bQ as ao,ai as Vg,aj as dL,al as pL,ae as fL,ag as hL,ah as mL,bb as gL,aq as bL}from"./index-BTX95t7l.js";import{c as me,B as gt}from"./button-BNEclrG2.js";import{i as EL}from"./X-C7jTJYwd.js";import{u as Qr,a as Wg,d as yL}from"./constants-l6jfVkIP.js";import{b as h_}from"./use-virtual-mcp-TJpzrF0-.js";import{b as TL}from"./use-collections-M-ZucrNc.js";import{b as m_,a as SL}from"./use-connection-B7MC5D37.js";import{a as AL}from"./use-binding-BM0mjywS.js";import{u as kL,M as g_,s as HE}from"./monaco-editor-DcKPEfxo.js";import{u as ma,L as so}from"./localstorage-keys-BpjSpnih.js";import{I as Yg}from"./input-Vw7XIX0r.js";import{a as is,b as as,P as ss}from"./popover-pmxV9P13.js";import{S as xL,a as vL,b as _L,c as CL,d as IL}from"./select-BJmQF-t1.js";import{i as NL}from"./File06-BM3tW-ao.js";import{c as wL,i as b_}from"./Grid01-CHS_jF02.js";import{a as RL}from"./Image01-5bkPZ70X.js";import{i as cl}from"./SearchMd-CHkFEvMn.js";import{S as dl}from"./spinner-DXcv41zw.js";import{c as Jr,T as ei,a as ti,b as Kg}from"./tooltip-Mf5UtuF2.js";import{u as OL,g as E_,l as $E,a as zE,r as LL}from"./use-mcp-prompts-Cwl3wuSJ.js";import{E as DL,i as ML}from"./error-boundary-CwJYCTYr.js";import{c as PL,b as FL,e as BL,a as UL,D as HL}from"./dialog-cbRNFkUF.js";import{a as $L,F as zL,b as jL,c as qL,d as GL,f as VL}from"./form-0ZBALKH0.js";import{I as Xg,E as WL}from"./empty-state-Bnk561r4.js";import{i as y_}from"./AlertCircle-9_AbzfZV.js";import{i as YL}from"./ArrowUp-PDh8aKqr.js";import{t as KL}from"./ChevronDown-B9uETHHQ.js";import{i as Zg}from"./CpuChip02-B0kuxhX5.js";import{i as XL}from"./Edit01-DHPNOaMT.js";import{i as pl}from"./Check-DCOgSIim.js";import{a as Qg}from"./Copy01-C5lSJKpp.js";import{i as ZL}from"./Terminal-nMH6minT.js";import{g as QL}from"./generate-id-Dyweu44Y.js";import{s as JL}from"./Trash01-CSFSnmeR.js";import{u as e2}from"./use-create-virtual-mcp-mR4PpEB5.js";import{s as t2}from"./Plus-erQKhzFc.js";var Pa;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},t.getValidEnumValues=i=>{const a=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},t.find=(i,a)=>{for(const s of i)if(a(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}t.joinValues=r,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Pa||(Pa={}));var jE;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(jE||(jE={}));Pa.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Pa.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class oo extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},r={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(s))):o[u]=o[u]||{_errors:[]},o=o[u],l++}}};return i(this),r}static assert(e){if(!(e instanceof oo))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pa.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n=Object.create(null),r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}oo.create=t=>new oo(t);var qE;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(qE||(qE={}));var ge;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ge||(ge={}));const T_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M17.115 15.358c-.27.306-.554.608-.851.905-4.296 4.296-9.678 5.88-12.021 3.536-1.607-1.606-1.368-4.641.325-7.775M6.89 8.725c.281-.32.578-.636.888-.947C12.074 3.482 17.456 1.9 19.8 4.243c1.608 1.607 1.367 4.645-.33 7.781m-3.206-4.246c4.296 4.296 5.88 9.678 3.536 12.021-2.343 2.343-7.725.76-12.02-3.535C3.483 11.968 1.9 6.586 4.244 4.243c2.343-2.343 7.725-.76 12.02 3.535ZM13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}));T_.displayName="Atom02";const S_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));S_.displayName="ChevronSelectorVertical";const A_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));A_.displayName="Coins01";const k_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));k_.displayName="CurrencyDollar";const x_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M15 16.5V19c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C13.398 22 12.932 22 12 22c-.932 0-1.398 0-1.765-.152a2 2 0 0 1-1.083-1.083C9 20.398 9 19.932 9 19v-2.5m6 0c2.649-1.157 4.5-3.925 4.5-7a7.5 7.5 0 0 0-15 0c0 3.075 1.851 5.843 4.5 7m6 0H9"}));x_.displayName="Lightbulb01";const v_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));v_.displayName="LogOut04";const fl=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));fl.displayName="Stars01";const __=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}));__.displayName="Stop";const C_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"M16 8V5l3-3 1 2 2 1-3 3h-3Zm0 0-4 4m10 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m5 10a5 5 0 1 1-5-5"}));C_.displayName="Target04";const I_=({size:t=24,color:e="currentColor",...n})=>M.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},M.createElement("path",{d:"m15 9-6 6m0-6 6 6m7-3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));I_.displayName="XCircle";function yt(t){const e=ne.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=me("bg-accent animate-pulse rounded-md",n),e[3]=n,e[4]=i):i=e[4];let a;return e[5]!==r||e[6]!==i?(a=S.jsx("div",{"data-slot":"skeleton",className:i,...r}),e[5]=r,e[6]=i,e[7]=a):a=e[7],a}function n2(){const t=ne.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=so.developerMode(),t[0]=e):e=t[0],ma(e,!1)}var N_="vercel.ai.error",r2=Symbol.for(N_),GE,VE,Cn=class w_ extends(VE=Error,GE=r2,VE){constructor({name:e,message:n,cause:r}){super(n),this[GE]=!0,this.name=e,this.cause=r}static isInstance(e){return w_.hasMarker(e,N_)}static hasMarker(e,n){const r=Symbol.for(n);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function R_(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var O_="AI_InvalidArgumentError",L_=`vercel.ai.error.${O_}`,i2=Symbol.for(L_),WE,YE,a2=class extends(YE=Cn,WE=i2,YE){constructor({message:t,cause:e,argument:n}){super({name:O_,message:t,cause:e}),this[WE]=!0,this.argument=n}static isInstance(t){return Cn.hasMarker(t,L_)}},D_="AI_JSONParseError",M_=`vercel.ai.error.${D_}`,s2=Symbol.for(M_),KE,XE,ZE=class extends(XE=Cn,KE=s2,XE){constructor({text:t,cause:e}){super({name:D_,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${R_(e)}`,cause:e}),this[KE]=!0,this.text=t}static isInstance(t){return Cn.hasMarker(t,M_)}},P_="AI_TypeValidationError",F_=`vercel.ai.error.${P_}`,o2=Symbol.for(F_),QE,JE,Ci=class Mm extends(JE=Cn,QE=o2,JE){constructor({value:e,cause:n}){super({name:P_,message:`Type validation failed: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${R_(n)}`,cause:n}),this[QE]=!0,this.value=e}static isInstance(e){return Cn.hasMarker(e,F_)}static wrap({value:e,cause:n}){return Mm.isInstance(n)&&n.value===e?n:new Mm({value:e,cause:n})}},ls=({prefix:t,size:e=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const i=()=>{const a=n.length,s=new Array(e);for(let o=0;o<e;o++)s[o]=n[Math.random()*a|0];return s.join("")};if(t==null)return i;if(n.includes(r))throw new a2({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${t}${r}${i()}`},l2=ls();function e0(t=globalThis){var e,n,r;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(r=(n=t.process)==null?void 0:n.versions)!=null&&r.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function wr(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((n,r)=>{e[r.toLowerCase()]=n});else{Array.isArray(t)||(t=Object.entries(t));for(const[n,r]of t)r!=null&&(e[n.toLowerCase()]=r)}return e}function t0(t,...e){const n=new Headers(wr(t)),r=n.get("user-agent")||"";return n.set("user-agent",[r,...e].filter(Boolean).join(" ")),Object.fromEntries(n.entries())}var u2=/"__proto__"\s*:/,c2=/"constructor"\s*:/;function n0(t){const e=JSON.parse(t);return e===null||typeof e!="object"||u2.test(t)===!1&&c2.test(t)===!1?e:d2(e)}function d2(t){let e=[t];for(;e.length;){const n=e;e=[];for(const r of n){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const i in r){const a=r[i];a&&typeof a=="object"&&e.push(a)}}}return t}function p2(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return n0(t)}try{return n0(t)}finally{Error.stackTraceLimit=e}}function Jg(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:n}=t;if(n!=null)for(const r of Object.keys(n))n[r]=Cr(n[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(Cr):Cr(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(Cr)),t.allOf!=null&&(t.allOf=t.allOf.map(Cr)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(Cr));const{definitions:e}=t;if(e!=null)for(const n of Object.keys(e))e[n]=Cr(e[n]);return t}function Cr(t){return typeof t=="boolean"?t:Jg(t)}var f2=Symbol("Let zodToJsonSchema decide on which parser to use"),r0={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},h2=t=>typeof t=="string"?{...r0,name:t}:{...r0,...t};function Qt(){return{}}function m2(t,e){var n,r,i;const a={type:"array"};return(n=t.type)!=null&&n._def&&((i=(r=t.type)==null?void 0:r._def)==null?void 0:i.typeName)!==ge.ZodAny&&(a.items=De(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(a.minItems=t.minLength.value),t.maxLength&&(a.maxItems=t.maxLength.value),t.exactLength&&(a.minItems=t.exactLength.value,a.maxItems=t.exactLength.value),a}function g2(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const n of t.checks)switch(n.kind){case"min":n.inclusive?e.minimum=n.value:e.exclusiveMinimum=n.value;break;case"max":n.inclusive?e.maximum=n.value:e.exclusiveMaximum=n.value;break;case"multipleOf":e.multipleOf=n.value;break}return e}function b2(){return{type:"boolean"}}function B_(t,e){return De(t.type._def,e)}var E2=(t,e)=>De(t.innerType._def,e);function U_(t,e,n){const r=n??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((i,a)=>U_(t,e,i))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return y2(t)}}var y2=t=>{const e={type:"integer",format:"unix-time"};for(const n of t.checks)switch(n.kind){case"min":e.minimum=n.value;break;case"max":e.maximum=n.value;break}return e};function T2(t,e){return{...De(t.innerType._def,e),default:t.defaultValue()}}function S2(t,e){return e.effectStrategy==="input"?De(t.schema._def,e):Qt()}function A2(t){return{type:"string",enum:Array.from(t.values)}}var k2=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function x2(t,e){const n=[De(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),De(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),r=[];return n.forEach(i=>{if(k2(i))r.push(...i.allOf);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:s,...o}=i;a=o}r.push(a)}}),r.length?{allOf:r}:void 0}function v2(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var Ql=void 0,pn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Ql===void 0&&(Ql=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ql),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function H_(t,e){const n={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":fn(n,"email",r.message,e);break;case"format:idn-email":fn(n,"idn-email",r.message,e);break;case"pattern:zod":Rt(n,pn.email,r.message,e);break}break;case"url":fn(n,"uri",r.message,e);break;case"uuid":fn(n,"uuid",r.message,e);break;case"regex":Rt(n,r.regex,r.message,e);break;case"cuid":Rt(n,pn.cuid,r.message,e);break;case"cuid2":Rt(n,pn.cuid2,r.message,e);break;case"startsWith":Rt(n,RegExp(`^${Jl(r.value,e)}`),r.message,e);break;case"endsWith":Rt(n,RegExp(`${Jl(r.value,e)}$`),r.message,e);break;case"datetime":fn(n,"date-time",r.message,e);break;case"date":fn(n,"date",r.message,e);break;case"time":fn(n,"time",r.message,e);break;case"duration":fn(n,"duration",r.message,e);break;case"length":n.minLength=typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value;break;case"includes":{Rt(n,RegExp(Jl(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&fn(n,"ipv4",r.message,e),r.version!=="v4"&&fn(n,"ipv6",r.message,e);break}case"base64url":Rt(n,pn.base64url,r.message,e);break;case"jwt":Rt(n,pn.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&Rt(n,pn.ipv4Cidr,r.message,e),r.version!=="v4"&&Rt(n,pn.ipv6Cidr,r.message,e);break}case"emoji":Rt(n,pn.emoji(),r.message,e);break;case"ulid":{Rt(n,pn.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{fn(n,"binary",r.message,e);break}case"contentEncoding:base64":{n.contentEncoding="base64";break}case"pattern:zod":{Rt(n,pn.base64,r.message,e);break}}break}case"nanoid":Rt(n,pn.nanoid,r.message,e)}return n}function Jl(t,e){return e.patternStrategy==="escape"?C2(t):t}var _2=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function C2(t){let e="";for(let n=0;n<t.length;n++)_2.has(t[n])||(e+="\\"),e+=t[n];return e}function fn(t,e,n,r){var i;t.format||(i=t.anyOf)!=null&&i.some(a=>a.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...n&&r.errorMessages&&{errorMessage:{format:n}}})):t.format=e}function Rt(t,e,n,r){var i;t.pattern||(i=t.allOf)!=null&&i.some(a=>a.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:i0(e,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):t.pattern=i0(e,r)}function i0(t,e){var n;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},i=r.i?t.source.toLowerCase():t.source;let a="",s=!1,o=!1,l=!1;for(let u=0;u<i.length;u++){if(s){a+=i[u],s=!1;continue}if(r.i){if(o){if(i[u].match(/[a-z]/)){l?(a+=i[u],a+=`${i[u-2]}-${i[u]}`.toUpperCase(),l=!1):i[u+1]==="-"&&((n=i[u+2])!=null&&n.match(/[a-z]/))?(a+=i[u],l=!0):a+=`${i[u]}${i[u].toUpperCase()}`;continue}}else if(i[u].match(/[a-z]/)){a+=`[${i[u]}${i[u].toUpperCase()}]`;continue}}if(r.m){if(i[u]==="^"){a+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(i[u]==="$"){a+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bw as Ie,r as u,ag as K,bx as F,R as Re,q as Ce,t as $e,n as Me,by as O}from"./index-kxFCfKdx.js";var Q={exports:{}},h={};var fe;function Ae(){if(fe)return h;fe=1;var t=Symbol.for("react.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),v=Symbol.for("react.server_context"),y=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),$;$=Symbol.for("react.module.reference");function k(n){if(typeof n=="object"&&n!==null){var M=n.$$typeof;switch(M){case t:switch(n=n.type,n){case r:case o:case f:case i:case p:return n;default:switch(n=n&&n.$$typeof,n){case v:case d:case y:case E:case b:case c:return n;default:return M}}case l:return M}}}return h.ContextConsumer=d,h.ContextProvider=c,h.Element=t,h.ForwardRef=y,h.Fragment=r,h.Lazy=E,h.Memo=b,h.Portal=l,h.Profiler=o,h.StrictMode=f,h.Suspense=i,h.SuspenseList=p,h.isAsyncMode=function(){return!1},h.isConcurrentMode=function(){return!1},h.isContextConsumer=function(n){return k(n)===d},h.isContextProvider=function(n){return k(n)===c},h.isElement=function(n){return typeof n=="object"&&n!==null&&n.$$typeof===t},h.isForwardRef=function(n){return k(n)===y},h.isFragment=function(n){return k(n)===r},h.isLazy=function(n){return k(n)===E},h.isMemo=function(n){return k(n)===b},h.isPortal=function(n){return k(n)===l},h.isProfiler=function(n){return k(n)===o},h.isStrictMode=function(n){return k(n)===f},h.isSuspense=function(n){return k(n)===i},h.isSuspenseList=function(n){return k(n)===p},h.isValidElementType=function(n){return typeof n=="string"||typeof n=="function"||n===r||n===o||n===f||n===i||n===p||n===x||typeof n=="object"&&n!==null&&(n.$$typeof===E||n.$$typeof===b||n.$$typeof===c||n.$$typeof===d||n.$$typeof===y||n.$$typeof===$||n.getModuleId!==void 0)},h.typeOf=k,h}var me;function Fe(){return me||(me=1,Q.exports=Ae()),Q.exports}var qe=Fe();const lt=Ie(qe);var ve=1,De=.9,Pe=.8,je=.17,Z=.1,ee=.999,Le=.9999,Ke=.99,Ve=/[\\\/_+.#"@\[\(\{&]/,ze=/[\\\/_+.#"@\[\(\{&]/g,Oe=/[\s-]/,be=/[\s-]/g;function re(t,l,r,f,o,c,d){if(c===l.length)return o===t.length?ve:Ke;var v=`${o},${c}`;if(d[v]!==void 0)return d[v];for(var y=f.charAt(c),i=r.indexOf(y,o),p=0,b,E,x,$;i>=0;)b=re(t,l,r,f,i+1,c+1,d),b>p&&(i===o?b*=ve:Ve.test(t.charAt(i-1))?(b*=Pe,x=t.slice(o,i-1).match(ze),x&&o>0&&(b*=Math.pow(ee,x.length))):Oe.test(t.charAt(i-1))?(b*=De,$=t.slice(o,i-1).match(be),$&&o>0&&(b*=Math.pow(ee,$.length))):(b*=je,o>0&&(b*=Math.pow(ee,i-o))),t.charAt(i)!==l.charAt(c)&&(b*=Le)),(b<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(E=re(t,l,r,f,i+1,c+2,d),E*Z>b&&(b=E*Z)),b>p&&(p=b),i=r.indexOf(y,i+1);return d[v]=p,p}function pe(t){return t.toLowerCase().replace(be," ")}function Be(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,re(t,l,pe(t),pe(l),0,0,{})}var z='[cmdk-group=""]',te='[cmdk-group-items=""]',_e='[cmdk-group-heading=""]',ge='[cmdk-item=""]',he=`${ge}:not([aria-disabled="true"])`,ne="cmdk-item-select",j="data-value",Te=(t,l,r)=>Be(t,l,r),ye=u.createContext(void 0),B=()=>u.useContext(ye),Se=u.createContext(void 0),le=()=>u.useContext(Se),we=u.createContext(void 0),Ee=u.forwardRef((t,l)=>{let r=L(()=>{var e,s;return{search:"",value:(s=(e=t.value)!=null?e:t.defaultValue)!=null?s:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=L(()=>new Set),o=L(()=>new Map),c=L(()=>new Map),d=L(()=>new Set),v=xe(t),{label:y,children:i,value:p,onValueChange:b,filter:E,shouldFilter:x,loop:$,disablePointerSelection:k=!1,vimBindings:n=!0,...M}=t,U=K(),ue=K(),H=K(),q=u.useRef(null),w=et();D(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,R.emit()}},[p]),D(()=>{w(6,ae)},[]);let R=u.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,s,m)=>{var a,g,S,C;if(!Object.is(r.current[e],s)){if(r.current[e]=s,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let I=document.getElementById(H);I?I.focus():(a=document.getElementById(U))==null||a.focus()}if(w(7,()=>{var I;r.current.selectedItemId=(I=P())==null?void 0:I.id,R.emit()}),m||w(5,ae),((g=v.current)==null?void 0:g.value)!==void 0){let I=s??"";(C=(S=v.current).onValueChange)==null||C.call(S,I);return}}R.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=u.useMemo(()=>({value:(e,s,m)=>{var a;s!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:s,keywords:m}),r.current.filtered.items.set(e,oe(s,m)),w(2,()=>{W(),R.emit()}))},item:(e,s)=>(f.current.add(e),s&&(o.current.has(s)?o.current.get(s).add(e):o.current.set(s,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),R.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let m=P();w(4,()=>{J(),m?.getAttribute("id")===e&&G(),R.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{c.current.delete(e),o.current.delete(e)}),filter:()=>v.current.shouldFilter,label:y||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:H,labelId:ue,listInnerRef:q}),[]);function oe(e,s){var m,a;let g=(a=(m=v.current)==null?void 0:m.filter)!=null?a:Te;return e?g(e,r.current.search,s):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,s=[];r.current.filtered.groups.forEach(a=>{let g=o.current.get(a),S=0;g.forEach(C=>{let I=e.get(C);S=Math.max(I,S)}),s.push([a,S])});let m=q.current;V().sort((a,g)=>{var S,C;let I=a.getAttribute("id"),_=g.getAttribute("id");return((S=e.get(_))!=null?S:0)-((C=e.get(I))!=null?C:0)}).forEach(a=>{let g=a.closest(te);g?g.appendChild(a.parentElement===g?a:a.closest(`${te} > *`)):m.appendChild(a.parentElement===m?a:a.closest(`${te} > *`))}),s.sort((a,g)=>g[1]-a[1]).forEach(a=>{var g;let S=(g=q.current)==null?void 0:g.querySelector(`${z}[${j}="${encodeURIComponent(a[0])}"]`);S?.parentElement.appendChild(S)})}function G(){let e=V().find(m=>m.getAttribute("aria-disabled")!=="true"),s=e?.getAttribute(j);R.setState("value",s||void 0)}function J(){var e,s,m,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let g=0;for(let S of f.current){let C=(s=(e=c.current.get(S))==null?void 0:e.value)!=null?s:"",I=(a=(m=c.current.get(S))==null?void 0:m.keywords)!=null?a:[],_=oe(C,I);r.current.filtered.items.set(S,_),_>0&&g++}for(let[S,C]of o.current)for(let I of C)if(r.current.filtered.items.get(I)>0){r.current.filtered.groups.add(S);break}r.current.filtered.count=g}function ae(){var e,s,m;let a=P();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((m=(s=a.closest(z))==null?void 0:s.querySelector(_e))==null||m.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function P(){var e;return(e=q.current)==null?void 0:e.querySelector(`${ge}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=q.current)==null?void 0:e.querySelectorAll(he))||[])}function X(e){let s=V()[e];s&&R.setState("value",s.getAttribute(j))}function Y(e){var s;let m=P(),a=V(),g=a.findIndex(C=>C===m),S=a[g+e];(s=v.current)!=null&&s.loop&&(S=g+e<0?a[a.length-1]:g+e===a.length?a[0]:a[g+e]),S&&R.setState("value",S.getAttribute(j))}function ie(e){let s=P(),m=s?.closest(z),a;for(;m&&!a;)m=e>0?Qe(m,z):Ze(m,z),a=m?.querySelector(he);a?R.setState("value",a.getAttribute(j)):Y(e)}let ce=()=>X(V().length-1),se=e=>{e.preventDefault(),e.metaKey?ce():e.altKey?ie(1):Y(1)},de=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ie(-1):Y(-1)};return u.createElement(F.div,{ref:l,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:e=>{var s;(s=M.onKeyDown)==null||s.call(M,e);let m=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||m))switch(e.key){case"n":case"j":{n&&e.ctrlKey&&se(e);break}case"ArrowDown":{se(e);break}case"p":case"k":{n&&e.ctrlKey&&de(e);break}case"ArrowUp":{de(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ce();break}case"Enter":{e.preventDefault();let a=P();if(a){let g=new Event(ne);a.dispatchEvent(g)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:rt},y),T(t,e=>u.createElement(Se.Provider,{value:R},u.createElement(ye.Provider,{value:N},e))))}),Ue=u.forwardRef((t,l)=>{var r,f;let o=K(),c=u.useRef(null),d=u.useContext(we),v=B(),y=xe(t),i=(f=(r=y.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;D(()=>{if(!i)return v.item(o,d?.id)},[i]);let p=ke(o,c,[t.value,t.children,c],t.keywords),b=le(),E=A(w=>w.value&&w.value===p.current),x=A(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(o)>0:!0);u.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(ne,$),()=>w.removeEventListener(ne,$)},[x,t.onSelect,t.disabled]);function $(){var w,R;k(),(R=(w=y.current).onSelect)==null||R.call(w,p.current)}function k(){b.setState("value",p.current,!0)}if(!x)return null;let{disabled:n,value:M,onSelect:U,forceMount:ue,keywords:H,...q}=t;return u.createElement(F.div,{ref:O(c,l),...q,id:o,"cmdk-item":"",role:"option","aria-disabled":!!n,"aria-selected":!!E,"data-disabled":!!n,"data-selected":!!E,onPointerMove:n||v.getDisablePointerSelection()?void 0:k,onClick:n?void 0:$},t.children)}),He=u.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:o,...c}=t,d=K(),v=u.useRef(null),y=u.useRef(null),i=K(),p=B(),b=A(x=>o||p.filter()===!1?!0:x.search?x.filtered.groups.has(d):!0);D(()=>p.group(d),[]),ke(d,v,[t.value,t.heading,y]);let E=u.useMemo(()=>({id:d,forceMount:o}),[o]);return u.createElement(F.div,{ref:O(v,l),...c,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},r&&u.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),T(t,x=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},u.createElement(we.Provider,{value:E},x))))}),Ne=u.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,o=u.useRef(null),c=A(d=>!d.search);return!r&&!c?null:u.createElement(F.div,{ref:O(o,l),...f,"cmdk-separator":"",role:"separator"})}),We=u.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,o=t.value!=null,c=le(),d=A(i=>i.search),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),u.createElement(F.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":v,id:y.inputId,type:"text",value:o?t.value:d,onChange:i=>{o||c.setState("search",i.target.value),r?.(i.target.value)}})}),Ge=u.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...o}=t,c=u.useRef(null),d=u.useRef(null),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,b,E=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let x=i.offsetHeight;p.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return E.observe(i),()=>{cancelAnimationFrame(b),E.unobserve(i)}}},[]),u.createElement(F.div,{ref:O(c,l),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:y.listId},T(t,i=>u.createElement("div",{ref:O(d,y.listInnerRef),"cmdk-list-sizer":""},i)))}),Je=u.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:o,contentClassName:c,container:d,...v}=t;return u.createElement(Re,{open:r,onOpenChange:f},u.createElement(Ce,{container:d},u.createElement($e,{"cmdk-overlay":"",className:o}),u.createElement(Me,{"aria-label":t.label,"cmdk-dialog":"",className:c},u.createElement(Ee,{ref:l,...v}))))}),Xe=u.forwardRef((t,l)=>A(r=>r.filtered.count===0)?u.createElement(F.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ye=u.forwardRef((t,l)=>{let{progress:r,children:f,label:o="Loading...",...c}=t;return u.createElement(F.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},T(t,d=>u.createElement("div",{"aria-hidden":!0},d)))}),ut=Object.assign(Ee,{List:Ge,Item:Ue,Input:We,Group:He,Separator:Ne,Dialog:Je,Empty:Xe,Loading:Ye});function Qe(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ze(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function xe(t){let l=u.useRef(t);return D(()=>{l.current=t}),l}var D=typeof window>"u"?u.useEffect:u.useLayoutEffect;function L(t){let l=u.useRef();return l.current===void 0&&(l.current=t()),l}function A(t){let l=le(),r=()=>t(l.snapshot());return u.useSyncExternalStore(l.subscribe,r,r)}function ke(t,l,r,f=[]){let o=u.useRef(),c=B();return D(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():o.current}})(),y=f.map(i=>i.trim());c.value(t,v,y),(d=l.current)==null||d.setAttribute(j,v),o.current=v}),o}var et=()=>{let[t,l]=u.useState(),r=L(()=>new Map);return D(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,o)=>{r.current.set(f,o),l({})}};function tt(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function T({asChild:t,children:l},r){return t&&u.isValidElement(l)?u.cloneElement(tt(l),{ref:l.ref},r(l.props.children)):r(l)}var rt={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{lt as R,ut as _,qe as r};
|
|
1
|
+
import{bu as Ie,r as u,ag as K,bv as F,R as Re,q as Ce,t as $e,n as Me,bw as O}from"./index-BTX95t7l.js";var Q={exports:{}},h={};var fe;function Ae(){if(fe)return h;fe=1;var t=Symbol.for("react.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),v=Symbol.for("react.server_context"),y=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),$;$=Symbol.for("react.module.reference");function k(n){if(typeof n=="object"&&n!==null){var M=n.$$typeof;switch(M){case t:switch(n=n.type,n){case r:case o:case f:case i:case p:return n;default:switch(n=n&&n.$$typeof,n){case v:case d:case y:case E:case b:case c:return n;default:return M}}case l:return M}}}return h.ContextConsumer=d,h.ContextProvider=c,h.Element=t,h.ForwardRef=y,h.Fragment=r,h.Lazy=E,h.Memo=b,h.Portal=l,h.Profiler=o,h.StrictMode=f,h.Suspense=i,h.SuspenseList=p,h.isAsyncMode=function(){return!1},h.isConcurrentMode=function(){return!1},h.isContextConsumer=function(n){return k(n)===d},h.isContextProvider=function(n){return k(n)===c},h.isElement=function(n){return typeof n=="object"&&n!==null&&n.$$typeof===t},h.isForwardRef=function(n){return k(n)===y},h.isFragment=function(n){return k(n)===r},h.isLazy=function(n){return k(n)===E},h.isMemo=function(n){return k(n)===b},h.isPortal=function(n){return k(n)===l},h.isProfiler=function(n){return k(n)===o},h.isStrictMode=function(n){return k(n)===f},h.isSuspense=function(n){return k(n)===i},h.isSuspenseList=function(n){return k(n)===p},h.isValidElementType=function(n){return typeof n=="string"||typeof n=="function"||n===r||n===o||n===f||n===i||n===p||n===x||typeof n=="object"&&n!==null&&(n.$$typeof===E||n.$$typeof===b||n.$$typeof===c||n.$$typeof===d||n.$$typeof===y||n.$$typeof===$||n.getModuleId!==void 0)},h.typeOf=k,h}var me;function Fe(){return me||(me=1,Q.exports=Ae()),Q.exports}var qe=Fe();const lt=Ie(qe);var ve=1,De=.9,Pe=.8,je=.17,Z=.1,ee=.999,Le=.9999,Ke=.99,Ve=/[\\\/_+.#"@\[\(\{&]/,ze=/[\\\/_+.#"@\[\(\{&]/g,Oe=/[\s-]/,be=/[\s-]/g;function re(t,l,r,f,o,c,d){if(c===l.length)return o===t.length?ve:Ke;var v=`${o},${c}`;if(d[v]!==void 0)return d[v];for(var y=f.charAt(c),i=r.indexOf(y,o),p=0,b,E,x,$;i>=0;)b=re(t,l,r,f,i+1,c+1,d),b>p&&(i===o?b*=ve:Ve.test(t.charAt(i-1))?(b*=Pe,x=t.slice(o,i-1).match(ze),x&&o>0&&(b*=Math.pow(ee,x.length))):Oe.test(t.charAt(i-1))?(b*=De,$=t.slice(o,i-1).match(be),$&&o>0&&(b*=Math.pow(ee,$.length))):(b*=je,o>0&&(b*=Math.pow(ee,i-o))),t.charAt(i)!==l.charAt(c)&&(b*=Le)),(b<Z&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(E=re(t,l,r,f,i+1,c+2,d),E*Z>b&&(b=E*Z)),b>p&&(p=b),i=r.indexOf(y,i+1);return d[v]=p,p}function pe(t){return t.toLowerCase().replace(be," ")}function Be(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,re(t,l,pe(t),pe(l),0,0,{})}var z='[cmdk-group=""]',te='[cmdk-group-items=""]',_e='[cmdk-group-heading=""]',ge='[cmdk-item=""]',he=`${ge}:not([aria-disabled="true"])`,ne="cmdk-item-select",j="data-value",Te=(t,l,r)=>Be(t,l,r),ye=u.createContext(void 0),B=()=>u.useContext(ye),Se=u.createContext(void 0),le=()=>u.useContext(Se),we=u.createContext(void 0),Ee=u.forwardRef((t,l)=>{let r=L(()=>{var e,s;return{search:"",value:(s=(e=t.value)!=null?e:t.defaultValue)!=null?s:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=L(()=>new Set),o=L(()=>new Map),c=L(()=>new Map),d=L(()=>new Set),v=xe(t),{label:y,children:i,value:p,onValueChange:b,filter:E,shouldFilter:x,loop:$,disablePointerSelection:k=!1,vimBindings:n=!0,...M}=t,U=K(),ue=K(),H=K(),q=u.useRef(null),w=et();D(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,R.emit()}},[p]),D(()=>{w(6,ae)},[]);let R=u.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,s,m)=>{var a,g,S,C;if(!Object.is(r.current[e],s)){if(r.current[e]=s,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let I=document.getElementById(H);I?I.focus():(a=document.getElementById(U))==null||a.focus()}if(w(7,()=>{var I;r.current.selectedItemId=(I=P())==null?void 0:I.id,R.emit()}),m||w(5,ae),((g=v.current)==null?void 0:g.value)!==void 0){let I=s??"";(C=(S=v.current).onValueChange)==null||C.call(S,I);return}}R.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),N=u.useMemo(()=>({value:(e,s,m)=>{var a;s!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:s,keywords:m}),r.current.filtered.items.set(e,oe(s,m)),w(2,()=>{W(),R.emit()}))},item:(e,s)=>(f.current.add(e),s&&(o.current.has(s)?o.current.get(s).add(e):o.current.set(s,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),R.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let m=P();w(4,()=>{J(),m?.getAttribute("id")===e&&G(),R.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{c.current.delete(e),o.current.delete(e)}),filter:()=>v.current.shouldFilter,label:y||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:U,inputId:H,labelId:ue,listInnerRef:q}),[]);function oe(e,s){var m,a;let g=(a=(m=v.current)==null?void 0:m.filter)!=null?a:Te;return e?g(e,r.current.search,s):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,s=[];r.current.filtered.groups.forEach(a=>{let g=o.current.get(a),S=0;g.forEach(C=>{let I=e.get(C);S=Math.max(I,S)}),s.push([a,S])});let m=q.current;V().sort((a,g)=>{var S,C;let I=a.getAttribute("id"),_=g.getAttribute("id");return((S=e.get(_))!=null?S:0)-((C=e.get(I))!=null?C:0)}).forEach(a=>{let g=a.closest(te);g?g.appendChild(a.parentElement===g?a:a.closest(`${te} > *`)):m.appendChild(a.parentElement===m?a:a.closest(`${te} > *`))}),s.sort((a,g)=>g[1]-a[1]).forEach(a=>{var g;let S=(g=q.current)==null?void 0:g.querySelector(`${z}[${j}="${encodeURIComponent(a[0])}"]`);S?.parentElement.appendChild(S)})}function G(){let e=V().find(m=>m.getAttribute("aria-disabled")!=="true"),s=e?.getAttribute(j);R.setState("value",s||void 0)}function J(){var e,s,m,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let g=0;for(let S of f.current){let C=(s=(e=c.current.get(S))==null?void 0:e.value)!=null?s:"",I=(a=(m=c.current.get(S))==null?void 0:m.keywords)!=null?a:[],_=oe(C,I);r.current.filtered.items.set(S,_),_>0&&g++}for(let[S,C]of o.current)for(let I of C)if(r.current.filtered.items.get(I)>0){r.current.filtered.groups.add(S);break}r.current.filtered.count=g}function ae(){var e,s,m;let a=P();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((m=(s=a.closest(z))==null?void 0:s.querySelector(_e))==null||m.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function P(){var e;return(e=q.current)==null?void 0:e.querySelector(`${ge}[aria-selected="true"]`)}function V(){var e;return Array.from(((e=q.current)==null?void 0:e.querySelectorAll(he))||[])}function X(e){let s=V()[e];s&&R.setState("value",s.getAttribute(j))}function Y(e){var s;let m=P(),a=V(),g=a.findIndex(C=>C===m),S=a[g+e];(s=v.current)!=null&&s.loop&&(S=g+e<0?a[a.length-1]:g+e===a.length?a[0]:a[g+e]),S&&R.setState("value",S.getAttribute(j))}function ie(e){let s=P(),m=s?.closest(z),a;for(;m&&!a;)m=e>0?Qe(m,z):Ze(m,z),a=m?.querySelector(he);a?R.setState("value",a.getAttribute(j)):Y(e)}let ce=()=>X(V().length-1),se=e=>{e.preventDefault(),e.metaKey?ce():e.altKey?ie(1):Y(1)},de=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ie(-1):Y(-1)};return u.createElement(F.div,{ref:l,tabIndex:-1,...M,"cmdk-root":"",onKeyDown:e=>{var s;(s=M.onKeyDown)==null||s.call(M,e);let m=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||m))switch(e.key){case"n":case"j":{n&&e.ctrlKey&&se(e);break}case"ArrowDown":{se(e);break}case"p":case"k":{n&&e.ctrlKey&&de(e);break}case"ArrowUp":{de(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ce();break}case"Enter":{e.preventDefault();let a=P();if(a){let g=new Event(ne);a.dispatchEvent(g)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:rt},y),T(t,e=>u.createElement(Se.Provider,{value:R},u.createElement(ye.Provider,{value:N},e))))}),Ue=u.forwardRef((t,l)=>{var r,f;let o=K(),c=u.useRef(null),d=u.useContext(we),v=B(),y=xe(t),i=(f=(r=y.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;D(()=>{if(!i)return v.item(o,d?.id)},[i]);let p=ke(o,c,[t.value,t.children,c],t.keywords),b=le(),E=A(w=>w.value&&w.value===p.current),x=A(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(o)>0:!0);u.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(ne,$),()=>w.removeEventListener(ne,$)},[x,t.onSelect,t.disabled]);function $(){var w,R;k(),(R=(w=y.current).onSelect)==null||R.call(w,p.current)}function k(){b.setState("value",p.current,!0)}if(!x)return null;let{disabled:n,value:M,onSelect:U,forceMount:ue,keywords:H,...q}=t;return u.createElement(F.div,{ref:O(c,l),...q,id:o,"cmdk-item":"",role:"option","aria-disabled":!!n,"aria-selected":!!E,"data-disabled":!!n,"data-selected":!!E,onPointerMove:n||v.getDisablePointerSelection()?void 0:k,onClick:n?void 0:$},t.children)}),He=u.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:o,...c}=t,d=K(),v=u.useRef(null),y=u.useRef(null),i=K(),p=B(),b=A(x=>o||p.filter()===!1?!0:x.search?x.filtered.groups.has(d):!0);D(()=>p.group(d),[]),ke(d,v,[t.value,t.heading,y]);let E=u.useMemo(()=>({id:d,forceMount:o}),[o]);return u.createElement(F.div,{ref:O(v,l),...c,"cmdk-group":"",role:"presentation",hidden:b?void 0:!0},r&&u.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),T(t,x=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},u.createElement(we.Provider,{value:E},x))))}),Ne=u.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,o=u.useRef(null),c=A(d=>!d.search);return!r&&!c?null:u.createElement(F.div,{ref:O(o,l),...f,"cmdk-separator":"",role:"separator"})}),We=u.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,o=t.value!=null,c=le(),d=A(i=>i.search),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),u.createElement(F.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":v,id:y.inputId,type:"text",value:o?t.value:d,onChange:i=>{o||c.setState("search",i.target.value),r?.(i.target.value)}})}),Ge=u.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...o}=t,c=u.useRef(null),d=u.useRef(null),v=A(i=>i.selectedItemId),y=B();return u.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,b,E=new ResizeObserver(()=>{b=requestAnimationFrame(()=>{let x=i.offsetHeight;p.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return E.observe(i),()=>{cancelAnimationFrame(b),E.unobserve(i)}}},[]),u.createElement(F.div,{ref:O(c,l),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:y.listId},T(t,i=>u.createElement("div",{ref:O(d,y.listInnerRef),"cmdk-list-sizer":""},i)))}),Je=u.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:o,contentClassName:c,container:d,...v}=t;return u.createElement(Re,{open:r,onOpenChange:f},u.createElement(Ce,{container:d},u.createElement($e,{"cmdk-overlay":"",className:o}),u.createElement(Me,{"aria-label":t.label,"cmdk-dialog":"",className:c},u.createElement(Ee,{ref:l,...v}))))}),Xe=u.forwardRef((t,l)=>A(r=>r.filtered.count===0)?u.createElement(F.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),Ye=u.forwardRef((t,l)=>{let{progress:r,children:f,label:o="Loading...",...c}=t;return u.createElement(F.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},T(t,d=>u.createElement("div",{"aria-hidden":!0},d)))}),ut=Object.assign(Ee,{List:Ge,Item:Ue,Input:We,Group:He,Separator:Ne,Dialog:Je,Empty:Xe,Loading:Ye});function Qe(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Ze(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function xe(t){let l=u.useRef(t);return D(()=>{l.current=t}),l}var D=typeof window>"u"?u.useEffect:u.useLayoutEffect;function L(t){let l=u.useRef();return l.current===void 0&&(l.current=t()),l}function A(t){let l=le(),r=()=>t(l.snapshot());return u.useSyncExternalStore(l.subscribe,r,r)}function ke(t,l,r,f=[]){let o=u.useRef(),c=B();return D(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():o.current}})(),y=f.map(i=>i.trim());c.value(t,v,y),(d=l.current)==null||d.setAttribute(j,v),o.current=v}),o}var et=()=>{let[t,l]=u.useState(),r=L(()=>new Map);return D(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,o)=>{r.current.set(f,o),l({})}};function tt(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function T({asChild:t,children:l},r){return t&&u.isValidElement(l)?u.cloneElement(tt(l),{ref:l.ref},r(l.props.children)):r(l)}var rt={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{lt as R,ut as _,qe as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as r,L as i,O as u,P as l,V as C,i as c,p as P,u as m}from"./index-
|
|
1
|
+
import{C as r,L as i,O as u,P as l,V as C,i as c,p as P,u as m}from"./index-BTX95t7l.js";import{u as M,a as g,b as x,c as L,d as S,e as d,f}from"./use-collections-M-ZucrNc.js";import{u as A,a as R,b as T}from"./use-connection-B7MC5D37.js";import{S as s}from"./constants-l6jfVkIP.js";import{K as h,a as K,W as O,c as V,g as W,b as _,d as w,e as E,u as I}from"./constants-l6jfVkIP.js";import{g as j,l as D,a as G,r as U,u as k,b as v,c as F}from"./use-mcp-prompts-Cwl3wuSJ.js";import{u as J,a as N,b as Y}from"./use-virtual-mcp-TJpzrF0-.js";import{a as z,h as B,i as X}from"./mcp-oauth-CrWnEeM3.js";import"./useMutation-BuhKRt0C.js";import"./useQuery-CnjlQpZk.js";export{r as ConnectionEntitySchema,h as KEYS,i as Locator,u as ORG_ADMIN_PROJECT_SLUG,l as ProjectContextProvider,K as SELF_MCP_ALIAS_ID,s as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,O as WellKnownOrgMCPId,z as authenticateMcp,V as createMCPClient,j as getPrompt,W as getWellKnownCommunityRegistryConnection,_ as getWellKnownMcpStudioConnection,w as getWellKnownOpenRouterConnection,E as getWellKnownRegistryConnection,B as handleOAuthCallback,X as isConnectionAuthenticated,c as isStdioParameters,D as listPrompts,G as listResources,P as parseVirtualUrl,U as readResource,M as useCollectionActions,g as useCollectionItem,x as useCollectionList,A as useConnection,R as useConnectionActions,T as useConnections,I as useMCPClient,k as useMCPPromptsList,v as useMCPPromptsListQuery,F as useMCPResourcesListQuery,L as useMCPToolCall,S as useMCPToolCallMutation,d as useMCPToolCallQuery,f as useMCPToolsListQuery,m as useProjectContext,J as useVirtualMCP,N as useVirtualMCPActions,Y as useVirtualMCPs};
|
package/dist/client/assets/{infiniteQueryObserver-Q9Ch1SlH.js → infiniteQueryObserver-DgpNxMlA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X as d,Y as f,Z as v,$ as b}from"./index-
|
|
1
|
+
import{X as d,Y as f,Z as v,$ as b}from"./index-BTX95t7l.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as a}from"./index-
|
|
1
|
+
import{c as s,j as a}from"./index-BTX95t7l.js";import{c as d}from"./button-BNEclrG2.js";function p(l){const e=s.c(10);let i,r,t;e[0]!==l?({className:i,type:t,...r}=l,e[0]=l,e[1]=i,e[2]=r,e[3]=t):(i=e[1],r=e[2],t=e[3]);let n;e[4]!==i?(n=d("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] bg-background","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==n||e[8]!==t?(o=a.jsx("input",{type:t,"data-slot":"input",className:n,...r}),e[6]=r,e[7]=n,e[8]=t,e[9]=o):o=e[9],o}export{p as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E,r as f,Q as v,j as l}from"./index-
|
|
1
|
+
import{c as E,r as f,Q as v,j as l}from"./index-BTX95t7l.js";import{B as w}from"./button-BNEclrG2.js";import{i as k}from"./ArrowLeft-2xAygwK8.js";const j=f.createContext(null);function S(x){const e=E.c(3),{children:r}=x,s=f.useContext(j);if(!s?.tabsEl)return null;let t;return e[0]!==r||e[1]!==s.tabsEl?(t=v.createPortal(r,s.tabsEl),e[0]=r,e[1]=s.tabsEl,e[2]=t):t=e[2],t}function _(x){const e=E.c(3),{children:r}=x,s=f.useContext(j);if(!s?.actionsEl)return null;let t;return e[0]!==r||e[1]!==s.actionsEl?(t=v.createPortal(r,s.actionsEl),e[0]=r,e[1]=s.actionsEl,e[2]=t):t=e[2],t}function B(x){const e=E.c(20),{children:r,onBack:s,title:t}=x,[h,N]=f.useState(null),[p,g]=f.useState(null);let n;e[0]!==p||e[1]!==h?(n={tabsEl:h,actionsEl:p},e[0]=p,e[1]=h,e[2]=n):n=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(k,{}),e[3]=u):u=e[3];let i;e[4]!==s?(i=l.jsx("div",{className:"flex h-full px-2 border-r items-center",children:l.jsx(w,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:s,children:u})}),e[4]=s,e[5]=i):i=e[5];let c;e[6]!==t?(c=t&&l.jsx("div",{className:"flex items-center gap-2 px-2",children:l.jsx("p",{className:"text-sm font-medium",children:t})}),e[6]=t,e[7]=c):c=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=l.jsxs("div",{className:"flex px-4 items-center gap-0 flex-1 min-w-0",children:[l.jsx("div",{ref:N,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),l.jsx("div",{ref:g,className:"flex items-center gap-2 ml-auto shrink-0 border-l border-border pl-4"})]}),e[8]=d):d=e[8];let o;e[9]!==i||e[10]!==c?(o=l.jsxs("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:[i,c,d]}),e[9]=i,e[10]=c,e[11]=o):o=e[11];let a;e[12]!==r?(a=l.jsx("div",{className:"flex-1 overflow-auto",children:r}),e[12]=r,e[13]=a):a=e[13];let m;e[14]!==o||e[15]!==a?(m=l.jsxs("div",{className:"flex flex-col h-full bg-background",children:[o,a]}),e[14]=o,e[15]=a,e[16]=m):m=e[16];let b;return e[17]!==n||e[18]!==m?(b=l.jsx(j,{value:n,children:m}),e[17]=n,e[18]=m,e[19]=b):b=e[19],b}export{_ as V,S as a,B as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,N as I}from"./index-
|
|
1
|
+
import{c as O,N as I}from"./index-BTX95t7l.js";import{u as x}from"./useQuery-CnjlQpZk.js";import{u as L}from"./useMutation-BuhKRt0C.js";function Q(e){try{return JSON.parse(e)}catch{return}}function y(e,s){const t=localStorage.getItem(e),o=t?Q(t):void 0,a=typeof s=="function"?s(o):o??s;if(o===void 0||a!==o)try{const n=JSON.stringify(a);localStorage.setItem(e,n)}catch{}return a}function N(e,s){const t=O.c(25),o=I();let a;t[0]!==e?(a=["localStorage",e],t[0]=e,t[1]=a):a=t[1];const n=a;let r,i;t[2]!==s||t[3]!==e?(r=()=>y(e,s),i=()=>y(e,s),t[2]=s,t[3]=e,t[4]=r,t[5]=i):(r=t[4],i=t[5]);let u;t[6]!==n||t[7]!==r||t[8]!==i?(u={queryKey:n,queryFn:r,initialData:i,staleTime:1/0,gcTime:1/0},t[6]=n,t[7]=r,t[8]=i,t[9]=u):u=t[9];const{data:v}=x(u);let l;t[10]!==e?(l=async c=>{const $=JSON.stringify(c);return localStorage.setItem(e,$),c},t[10]=e,t[11]=l):l=t[11];let m;t[12]!==o||t[13]!==n?(m=c=>{o.setQueryData(n,c)},t[12]=o,t[13]=n,t[14]=m):m=t[14];let h;t[15]!==l||t[16]!==m?(h={mutationFn:l,onSuccess:m},t[15]=l,t[16]=m,t[17]=h):h=t[17];const g=L(h);let d;t[18]!==g||t[19]!==o||t[20]!==n?(d=c=>{const $=o.getQueryData(n),C=typeof c=="function"?c($):c;g.mutate(C)},t[18]=g,t[19]=o,t[20]=n,t[21]=d):d=t[21];const p=d,S=v;let f;return t[22]!==p||t[23]!==S?(f=[S,p],t[22]=p,t[23]=S,t[24]=f):f=t[24],f}const A={assistantChatThreads:e=>`mesh:assistant-chat:threads:${e}`,messages:(e,s)=>`mesh:messages:${e}:${s}`,decoChatOpen:()=>"mesh:decochat:open",chatSelectedModel:e=>`mesh:chat:selectedModel:${e}`,assistantChatActiveThread:e=>`mesh:assistant-chat:active-thread:${e}`,decoChatPanelWidth:()=>"mesh:decochat:panel-width",sidebarOpen:()=>"mesh:sidebar-open",selectedRegistry:e=>`mesh:store:selected-registry:${e}`,orgHomeQuickstart:e=>`mesh:org-home:quickstart:${e}`,storeShowStdio:()=>"mesh:store:show-stdio",developerMode:()=>"mesh:user:developer-mode",pluginConnection:(e,s)=>`mesh:plugin:connection:${e}:${s}`};export{A as L,N as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as k,r as p,e as j,j as e,g as z,a6 as L,a7 as R,c as U}from"./index-
|
|
1
|
+
import{h as k,r as p,e as j,j as e,g as z,a6 as L,a7 as R,c as U}from"./index-BTX95t7l.js";import{u as T}from"./useMutation-BuhKRt0C.js";import{c as b,B as P}from"./button-BNEclrG2.js";import{I as E}from"./input-Vw7XIX0r.js";function B({redirectUrl:r}){const{emailAndPassword:t}=k(),[s,d]=p.useState(""),[o,u]=p.useState(""),[l,v]=p.useState(""),[i,N]=p.useState(()=>globalThis.localStorage?.getItem("hasLoggedIn")!=="true"),[m,h]=p.useState(""),g=T({mutationFn:async({email:a,password:n,name:C})=>{try{if(i){const c=await j.signUp.email({email:a,password:n,name:C||""});if(c.error)throw new Error(c.error.message||"Sign up failed");return c}else{const c=await j.signIn.email({email:a,password:n});if(c.error)throw new Error(c.error.message||"Sign in failed");return c}}catch(c){throw c instanceof Error?c:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),r&&(window.location.href=r)}}),y=a=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a),x=()=>{s.trim()&&!y(s)&&h("Invalid email address")},S=a=>{if(a.preventDefault(),!y(s)){h("Invalid email address");return}g.mutate({email:s,password:o,name:l})},_=a=>n=>{a(n.target.value),I&&g.reset(),a===d&&m&&h("")},f=g.isPending,I=g.error,w=i?s.trim()&&o.trim()&&l.trim():s.trim()&&o.trim(),A=a=>{if(!a)return null;const n=a.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?"Invalid email or password. Please try again.":n.includes("already exists")||n.includes("409")?"An account with this email already exists. Try signing in instead.":n.includes("network")||n.includes("fetch")?"Network error. Please check your connection and try again.":n.includes("rate limit")||n.includes("429")?"Too many attempts. Please wait a moment and try again.":a.message||"An error occurred. Please try again."};return e.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e.jsx("div",{className:"text-center space-y-1",children:e.jsx("p",{className:"text-sm text-foreground/70",children:i?"Create your account":"Login or signup below"})}),I&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:A(I)}),t.enabled&&e.jsxs("form",{onSubmit:S,className:"grid gap-4",children:[e.jsx("div",{className:b("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",i?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:b("p-1",!i&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(E,{type:"text",placeholder:"Your name",value:l,onChange:_(v),required:!0,disabled:f||!i,"aria-hidden":!i})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(E,{type:"email",placeholder:"you@example.com",value:s,onChange:_(d),onBlur:x,required:!0,disabled:f,"aria-invalid":!!m}),m&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:m})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Password"}),e.jsx(E,{type:"password",placeholder:"••••••••",value:o,onChange:_(u),required:!0,disabled:f})]}),e.jsx("div",{className:b("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",w?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:b("p-1",!w&&"pointer-events-none"),children:e.jsx(P,{type:"submit",disabled:f||!w,className:b("w-full font-semibold"),size:"lg","aria-hidden":!w,children:f?i?"Creating account...":"Signing in...":"Continue"})})})]}),e.jsx("div",{className:"text-center",children:e.jsx(P,{type:"button",variant:"link",onClick:()=>{N(!i),v(""),h(""),g.reset()},disabled:f,className:"text-sm text-muted-foreground hover:text-foreground",children:i?"Already have an account? Sign in":"Don't have an account? Sign up"})}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-4",children:[e.jsx("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Privacy Policy"})]})]})}function M(r){if(!r.client_id||r.response_type!=="code")return null;const t=new URLSearchParams;return r.client_id&&t.set("client_id",r.client_id),r.redirect_uri&&t.set("redirect_uri",r.redirect_uri),r.response_type&&t.set("response_type",r.response_type),r.state&&t.set("state",r.state),r.scope&&t.set("scope",r.scope),r.code_challenge&&t.set("code_challenge",r.code_challenge),r.code_challenge_method&&t.set("code_challenge_method",r.code_challenge_method),`/api/auth/mcp/authorize?${t.toString()}`}function q(r){const t=U.c(5),{callbackURL:s,providerId:d}=r;let o,u;t[0]!==s||t[1]!==d?(o=()=>{(async()=>await j.signIn.sso({providerId:d,callbackURL:s}))()},u=[d,s],t[0]=s,t[1]=d,t[2]=o,t[3]=u):(o=t[2],u=t[3]),p.useEffect(o,u);let l;return t[4]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(L,{}),t[4]=l):l=t[4],l}function Y(){const r=j.useSession(),t=z({from:"/login"}),{next:s="/",client_id:d,redirect_uri:o,response_type:u,state:l,scope:v,code_challenge:i,code_challenge_method:N}=t,{sso:m,emailAndPassword:h,magicLink:g,socialProviders:y}=k(),x=M({client_id:d,redirect_uri:o,response_type:u,state:l,scope:v,code_challenge:i,code_challenge_method:N}),S=x||s;return r.data?x?(window.location.href=x,e.jsx(L,{})):e.jsx(R,{to:s}):m.enabled?e.jsx(q,{callbackURL:S,providerId:m.providerId}):h.enabled||g.enabled||y.enabled?e.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e.jsx(B,{redirectUrl:x})]})]}):e.jsx("div",{children:"No login options available"})}export{Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a2 as R,a3 as P,a4 as $,a5 as V}from"./index-
|
|
1
|
+
import{a2 as R,a3 as P,a4 as $,a5 as V}from"./index-BTX95t7l.js";function b(n){let e=0;for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(16)}const I=new Map,O="mcp:oauth:callback:";class x{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(e){this.serverUrl=e.serverUrl,this._redirectUrl=e.callbackUrl??`${window.location.origin}/oauth/callback`,this._windowMode=e.windowMode??"popup";const t=e.scope?Array.isArray(e.scope)?e.scope.join(" "):e.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:e.clientName??"@decocms/mesh MCP client",...t&&{scope:t}},I.set(b(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(e){this._clientInfo=e}tokens(){return this._tokens??void 0}saveTokens(e){this._tokens=e}redirectToAuthorization(e){if(this._windowMode==="tab")window.open(e.toString(),"_blank")||(window.location.href=e.toString());else{const o=window.screenX+(window.outerWidth-600)/2,a=window.screenY+(window.outerHeight-700)/2;if(!window.open(e.toString(),"mcp-oauth",`width=600,height=700,left=${o},top=${a},popup=yes`))throw new Error("OAuth popup was blocked. Please allow popups for this site and try again.")}}saveCodeVerifier(e){this._codeVerifier=e}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){I.delete(b(this.serverUrl))}}async function D(n){const e=n.meshUrl??window.location.origin,t=new URL(`/mcp/${n.connectionId}`,e),r=new x({serverUrl:t.href,clientName:n.clientName,clientUri:n.clientUri,callbackUrl:n.callbackUrl,scope:n.scope,windowMode:n.windowMode});try{const o=new Promise((s,u)=>{const _=n.timeout||12e4;let h,w=!1;const M=r.state(),m=`${O}${M}`,d=()=>{window.removeEventListener("message",S),window.removeEventListener("storage",y),clearTimeout(h);try{localStorage.removeItem(m)}catch{}},g=async l=>{if(w)return;if(w=!0,!l.success){d(),u(new Error(l.error||"OAuth authentication failed"));return}const{code:p,state:E}=l;if(!p){d(),u(new Error("Missing authorization code"));return}if(r.getStoredState()!==E){d(),u(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const v=(await R(t))?.authorization_servers?.[0]||t,U=await P(v),f=r.clientInformation();if(!f){d(),u(new Error("Client information not found"));return}const C=r.codeVerifier(),L=await $(v,{metadata:U,clientInformation:f,authorizationCode:p,codeVerifier:C,redirectUri:r.redirectUrl,resource:new URL(t)});d(),s({tokens:L,clientId:f.client_id??null,clientSecret:"client_secret"in f?f.client_secret:null,tokenEndpoint:U?.token_endpoint??null})}catch(A){d(),u(A)}},S=async l=>{l.origin===window.location.origin&&l.data?.type==="mcp:oauth:callback"&&await g(l.data)},y=async l=>{if(!(l.key!==m||!l.newValue))try{const p=JSON.parse(l.newValue);await g(p)}catch{}};window.addEventListener("message",S),window.addEventListener("storage",y),h=setTimeout(()=>{w||(w=!0,d(),u(new Error("OAuth authentication timeout")))},_)});if(await V(r,{serverUrl:t})==="REDIRECT"){const s=await o;return{token:s.tokens.access_token,tokenInfo:{accessToken:s.tokens.access_token,refreshToken:s.tokens.refresh_token??null,expiresIn:s.tokens.expires_in??null,scope:s.tokens.scope??null,clientId:s.clientId,clientSecret:s.clientSecret,tokenEndpoint:s.tokenEndpoint},error:null}}const c=r.tokens(),i=r.clientInformation();return{token:c?.access_token||null,tokenInfo:c?{accessToken:c.access_token,refreshToken:c.refresh_token??null,expiresIn:c.expires_in??null,scope:c.scope??null,clientId:i?.client_id??null,clientSecret:i&&"client_secret"in i?i.client_secret:null,tokenEndpoint:null}:null,error:null}}catch(o){return{token:null,tokenInfo:null,error:o instanceof Error?o.message:String(o)}}finally{r.cleanup()}}function k(n,e){if(window.opener&&!window.opener.closed)return window.opener.postMessage(n,window.location.origin),!0;if(e)try{const t=`${O}${e}`;return localStorage.setItem(t,JSON.stringify(n)),!0}catch{}return!1}async function J(){const n=new URLSearchParams(window.location.search),e=n.get("code");let t=n.get("state");const r=n.get("error"),o=n.get("error_description");let a=t;if(t)try{const i=atob(t),s=JSON.parse(i);s.clientState&&(a=s.clientState)}catch{}if(r){const i=o||r;return k({type:"mcp:oauth:callback",success:!1,error:i},a),{success:!1,error:i}}if(!e||!t){const i="Missing code or state parameter";return k({type:"mcp:oauth:callback",success:!1,error:i},a),{success:!1,error:i}}return t=a||t,k({type:"mcp:oauth:callback",success:!0,code:e,state:t},t)?{success:!0}:{success:!1,error:"Parent window not available"}}function T(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function N(n){try{const e=T();return(e?new URL(n,e):new URL(n)).pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}async function z(n,e){try{const t=`/api/connections/${n}/oauth-token/status`,r=e?new URL(t,e).href:t,o=await fetch(r,{credentials:e?"omit":"include"});return o.ok?{hasToken:(await o.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function K({url:n,token:e,meshUrl:t}){try{const r=new Headers;r.set("Content-Type","application/json"),r.set("Accept","application/json, text/event-stream");const o=await fetch(n,{method:"POST",headers:r,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})}),a=N(n),c=T(),i=t??(c?new URL(n,c).origin:new URL(n).origin);if(o.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(a?await z(a,i):{hasToken:!1}).hasToken};let s;try{const h=await o.json();s=h.error||h.message}catch{}return o.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:s||`HTTP ${o.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!o.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:s||`HTTP ${o.status}`}}catch(r){return console.error("[isConnectionAuthenticated] Error:",r),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:r.message}}}export{D as a,J as h,K as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as B,c as V,j as a}from"./index-
|
|
1
|
+
import{r as B,c as V,j as a}from"./index-BTX95t7l.js";import{T as O,a as q,c as J}from"./tooltip-Mf5UtuF2.js";import{c as M,B as K}from"./button-BNEclrG2.js";import{s as Q}from"./registry-utils-Dda0cOYu.js";import{i as X}from"./Lock01-BdnY_MsG.js";import{s as Y}from"./Plus-erQKhzFc.js";import{i as ee}from"./Terminal-nMH6minT.js";import{C as te}from"./card-kDbUMtCL.js";import{I as se}from"./empty-state-Bnk561r4.js";import{g as le}from"./github-icon-Dp3wHhYE.js";const U=({size:s=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.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"}));U.displayName="CheckVerified02";const W=({size:s=24,color:e="currentColor",...l})=>B.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},B.createElement("path",{d:"M6 6h.01M6 18h.01m-.81-8h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 8.48 22 7.92 22 6.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 3.52 2 4.08 2 5.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 10 4.08 10 5.2 10Zm0 12h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 20.48 22 19.92 22 18.8v-1.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 14 19.92 14 18.8 14H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 15.52 2 16.08 2 17.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 22 4.08 22 5.2 22Z"}));W.displayName="Server01";function ie(s){if(!s.includes("/"))return s;const e=s.split("/"),l=e[0],i=e[1];if(!l||!i)return s;if(l.includes(".")){const n=l.split("."),r=n[n.length-1]||l,o=i.replace(/^mcp-?/,"").replace(/-?mcp$/,"").replace(/^server-?/,"").replace(/-?server$/,"");return!o||o.length<2?r:o}return i}function ae(s){const e=V.c(2),{protocol:l,className:i}=s;let n;return e[0]!==i?(n={http:a.jsx(Q,{className:i}),sse:a.jsx(W,{className:i}),stdio:a.jsx(ee,{className:i})},e[0]=i,e[1]=n):n=e[1],n[l]}function ne(s){switch(s){case"http":return"HTTP";case"sse":return"SSE";case"stdio":return"STDIO"}}function re(s){const e=V.c(9),{protocol:l}=s;let i;e[0]!==l?(i=M("flex items-center gap-1 px-1.5 py-0.5 rounded text-xs font-medium shrink-0",{http:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",sse:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",stdio:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400"}[l]),e[0]=l,e[1]=i):i=e[1];let n,r;e[2]!==l?(n=a.jsx(ae,{protocol:l,className:"w-3 h-3"}),r=ne(l),e[2]=l,e[3]=n,e[4]=r):(n=e[3],r=e[4]);let o;return e[5]!==i||e[6]!==n||e[7]!==r?(o=a.jsxs("div",{className:i,children:[n,r]}),e[5]=i,e[6]=n,e[7]=r,e[8]=o):o=e[8],o}function oe(s){const e=V.c(68),{icon:l,displayName:i,description:n,onClick:r}=s,t=(s.variant??"store")==="server",f=t?s.hostname:null,m=t?s.protocol:null,c=t?s.isInstalling:!1,d=t?s.actionLabel:void 0,p=t?null:s.scopeName,_=t?!1:s.isVerified,x=t?!0:s.canInstall,H=t?"p-4":"p-6";let u;e[0]!==H?(u=M("cursor-pointer hover:bg-muted/50 transition-colors",H),e[0]=H,e[1]=u):u=e[1];const R=t?"gap-3":"gap-4";let h;e[2]!==R?(h=M("flex flex-col h-full relative",R),e[2]=R,e[3]=h):h=e[3];const Z=t?"sm":"md";let g;e[4]!==i||e[5]!==l||e[6]!==Z?(g=a.jsx(se,{icon:l,name:i,size:Z,className:"shadow-sm shrink-0"}),e[4]=i,e[5]=l,e[6]=Z,e[7]=g):g=e[7];const G=t?"text-sm":"text-base";let v;e[8]!==G?(v=M("flex items-center gap-2 font-medium min-w-0",G),e[8]=G,e[9]=v):v=e[9];let j;e[10]!==i?(j=a.jsx("span",{className:"truncate",children:i}),e[10]=i,e[11]=j):j=e[11];let N;e[12]!==t||e[13]!==_?(N=!t&&_&&a.jsx(U,{size:16,className:"text-success shrink-0"}),e[12]=t,e[13]=_,e[14]=N):N=e[14];let C;e[15]!==x||e[16]!==t?(C=!t&&!x&&a.jsx(X,{size:16,className:"text-muted-foreground shrink-0"}),e[15]=x,e[16]=t,e[17]=C):C=e[17];let k;e[18]!==t||e[19]!==m?(k=t&&m&&a.jsx(re,{protocol:m}),e[18]=t,e[19]=m,e[20]=k):k=e[20];let b;e[21]!==C||e[22]!==k||e[23]!==v||e[24]!==j||e[25]!==N?(b=a.jsx(O,{asChild:!0,children:a.jsxs("div",{className:v,children:[j,N,C,k]})}),e[21]=C,e[22]=k,e[23]=v,e[24]=j,e[25]=N,e[26]=b):b=e[26];let w;e[27]!==i?(w=a.jsx("p",{children:i}),e[27]=i,e[28]=w):w=e[28];let y;e[29]!==x||e[30]!==t?(y=!t&&!x&&a.jsx("p",{className:"text-xs mt-1",children:"No connection available"}),e[29]=x,e[30]=t,e[31]=y):y=e[31];let I;e[32]!==w||e[33]!==y?(I=a.jsxs(q,{children:[w,y]}),e[32]=w,e[33]=y,e[34]=I):I=e[34];let $;e[35]!==b||e[36]!==I?($=a.jsxs(J,{children:[b,I]}),e[35]=b,e[36]=I,e[37]=$):$=e[37];let L;e[38]!==f||e[39]!==t||e[40]!==p?(L=(p||f)&&a.jsx("div",{className:M("text-muted-foreground truncate",t?"text-xs mt-0.5":"text-sm"),children:p||f}),e[38]=f,e[39]=t,e[40]=p,e[41]=L):L=e[41];let P;e[42]!==$||e[43]!==L?(P=a.jsx("div",{className:"flex gap-2 items-start min-w-0 flex-1",children:a.jsxs("div",{className:"min-w-0 flex-1",children:[$,L]})}),e[42]=$,e[43]=L,e[44]=P):P=e[44];let S;e[45]!==P||e[46]!==g?(S=a.jsxs("div",{className:"flex gap-3",children:[g,P]}),e[45]=P,e[46]=g,e[47]=S):S=e[47];let T;e[48]!==n?(T=n&&a.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:n}),e[48]=n,e[49]=T):T=e[49];let E;e[50]!==n||e[51]!==t?(E=!n&&!t&&a.jsx("div",{className:"text-sm text-muted-foreground line-clamp-2",children:"No description available"}),e[50]=n,e[51]=t,e[52]=E):E=e[52];let z;e[53]!==d||e[54]!==c||e[55]!==t||e[56]!==r?(z=t&&a.jsxs(K,{variant:"outline",size:"sm",onClick:F=>{F.stopPropagation(),r()},disabled:c,className:"w-full mt-auto cursor-pointer",children:[a.jsx(Y,{size:16}),c?"Connecting...":d||"Connect"]}),e[53]=d,e[54]=c,e[55]=t,e[56]=r,e[57]=z):z=e[57];let D;e[58]!==S||e[59]!==T||e[60]!==E||e[61]!==z||e[62]!==h?(D=a.jsxs("div",{className:h,children:[S,T,E,z]}),e[58]=S,e[59]=T,e[60]=E,e[61]=z,e[62]=h,e[63]=D):D=e[63];let A;return e[64]!==r||e[65]!==u||e[66]!==D?(A=a.jsx(te,{className:u,onClick:r,children:D}),e[64]=r,e[65]=u,e[66]=D,e[67]=A):A=e[67],A}function ce(s){const e=s.title||s.server.title||s.id||"Unnamed Item",l=s._meta?.["mcp.mesh"],i=l?.short_description||l?.mesh_description||s.server.description||null,n=s.server.icons?.[0]?.src||le(s.server.repository)||null,r=l?.verified??!1,o=(s.server.remotes?.length??0)>0,t=(s.server.packages?.length??0)>0,f=o||t;let m=e,c=null;if(e.includes("/")){const d=e.split("/");d.length>=2&&(c=d[0]||null,m=ie(e))}if(!c){const d=l?.scopeName,p=l?.appName;d&&p?c=`${d}/${p}`:d&&(c=d)}return l?.friendly_name&&(m=l.friendly_name),{icon:n,scopeName:c,displayName:m,description:i,isVerified:r,canInstall:f}}function Ne(s){const e=V.c(12),{items:l,title:i,onItemClick:n}=s;if(l.length===0)return null;let r;e[0]!==i?(r=i&&a.jsx("div",{className:"flex items-center justify-between w-max gap-2",children:a.jsx("h2",{className:"text-lg font-medium",children:i})}),e[0]=i,e[1]=r):r=e[1];let o;if(e[2]!==l||e[3]!==n){let m;e[5]!==n?(m=c=>{const d=ce(c);return a.jsx(oe,{...d,onClick:()=>n(c)},c.id)},e[5]=n,e[6]=m):m=e[6],o=l.map(m),e[2]=l,e[3]=n,e[4]=o}else o=e[4];let t;e[7]!==o?(t=a.jsx("div",{className:"grid grid-cols-4 gap-4",children:o}),e[7]=o,e[8]=t):t=e[8];let f;return e[9]!==r||e[10]!==t?(f=a.jsxs("div",{className:"flex flex-col gap-4",children:[r,t]}),e[9]=r,e[10]=t,e[11]=f):f=e[11],f}export{Ne as M,oe as a,W as b,ie as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{r as F,c as E,j as t,u as xe,f as he,a as Ie,g as _e,e as Te,bt as de,K as ke,a8 as me}from"./index-kxFCfKdx.js";import{i as Le}from"./AlertCircle-C1oaexcn.js";import{i as ge}from"./Loading01-C5WNj1RN.js";import{B as X,c as Pe}from"./button-B9UDEwx9.js";import{i as Me}from"./ArrowLeft-B1SBiQVA.js";import{I as ve,E as Ve}from"./empty-state-D6Pye5dp.js";import{i as De,e as Ee}from"./extract-connection-data-CDfHtG_N.js";import{t as Re}from"./ChevronDown-CJiuDn-R.js";import{s as fe}from"./Plus-Rzuz08cb.js";import{a as $e,c as Ae,b as Ue,D as Be}from"./dropdown-menu-5V-XyUMl.js";import{n as ue}from"./LinkExternal01-CxomLdJd.js";import{T as ze,R as Oe}from"./tools-list-BE1mq5Cn.js";import{R as Fe}from"./resource-tabs-DNjaGx4N.js";import{s as Ge,f as He,g as We,c as qe}from"./registry-utils-9nMczNLD.js";import{a as Ke,b as Qe,e as Ye}from"./mcp-server-card-DaxbgdWa.js";import{i as Xe}from"./Terminal-kk64xKO9.js";import{u as Ze}from"./use-binding-Bpukv3gt.js";import{u as Je}from"./useQuery-CVADJf0h.js";import{c as et}from"./use-collections-DWOZCISS.js";import{a as tt,b as st,u as ot}from"./use-connection-ASBc3U14.js";import{u as rt}from"./constants-C8DVLjyM.js";import{u as nt,L as it}from"./localstorage-keys-DuVpM8xt.js";import{s as lt}from"./slugify-CEUa2lfQ.js";import{e as at,g as ct}from"./github-icon-Dp3wHhYE.js";import{i as dt}from"./InfoCircle-BwBXEQXi.js";import"./constants-CuO4IXOK.js";import"./generate-id-Dyweu44Y.js";import"./Grid01-F6FBpTXb.js";import"./File06-DdyNkMaH.js";import"./collection-display-button-BAinwubP.js";import"./ArrowUp-BvlJhwmz.js";import"./Check-DImC9hlR.js";import"./List-taDOKmLS.js";import"./tooltip-DPmy6Yc4.js";import"./view-mode-toggle-B5HElat6.js";import"./collection-search-Cp9Rg8cG.js";import"./SearchMd-CQBqMKg_.js";import"./input-CJuUYj5Y.js";import"./collection-table-wrapper-Cfb-5BQo.js";import"./card-D-ZcDLJM.js";import"./layout-BdEZp7Lm.js";import"./badge-D7yW7Ams.js";import"./Lock01-Di-2F0aX.js";import"./binder-BvGWgf0j.js";import"./useMutation-ClL17OKX.js";const be=({size:o=24,color:e="currentColor",...s})=>F.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},F.createElement("path",{d:"m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z"}));be.displayName="SearchLg";function mt(o){const e=E.c(3),{message:s}=o,r=s===void 0?"Loading MCP Server details...":s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ge,{size:48,className:"animate-spin mb-4"}),e[0]=n):n=e[0];let i;return e[1]!==r?(i=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,t.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),e[1]=r,e[2]=i):i=e[2],i}function ft(o){const e=E.c(9),{error:s,onBack:r}=o,n=s instanceof Error?s.message:s;let i,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Le,{size:48,className:"text-destructive mb-4"}),c=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading MCP Server"}),e[0]=i,e[1]=c):(i=e[0],c=e[1]);let u;e[2]!==n?(u=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:n}),e[2]=n,e[3]=u):u=e[3];let d;e[4]!==r?(d=t.jsx("button",{onClick:r,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=r,e[5]=d):d=e[5];let m;return e[6]!==u||e[7]!==d?(m=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,c,u,d]}),e[6]=u,e[7]=d,e[8]=m):m=e[8],m}function ut(o){const e=E.c(5),{onBack:s}=o;let r,n,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(be,{size:48,className:"text-muted-foreground mb-4"}),n=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"MCP Server not found"}),i=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The MCP Server you're looking for doesn't exist in this store."}),e[0]=r,e[1]=n,e[2]=i):(r=e[0],n=e[1],i=e[2]);let c;return e[3]!==s?(c=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r,n,i,t.jsx("button",{onClick:s,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=s,e[4]=c):c=e[4],c}function pt(o){const e=E.c(3),{onBack:s}=o;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Me,{}),e[0]=r):r=e[0];let n;return e[1]!==s?(n=t.jsx("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:t.jsx("div",{className:"flex h-full px-2 border-r items-center",children:t.jsx(X,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:s,"aria-label":"Go back",children:r})})}),e[1]=s,e[2]=n):n=e[2],n}function pe(o){const e=E.c(28),{versions:s,selectedIndex:r,onSelect:n,isInstalling:i,variant:c,showLabel:u}=o,d=i===void 0?!1:i,m=c===void 0?"brand":c,I=u===void 0?!1:u,p=s[r],C=I?"sm":"default",j=m==="brand"&&"rounded-l-none px-2 border-l-2 border-l-white/50";let y;e[0]!==j?(y=Pe("shrink-0 cursor-pointer",j),e[0]=j,e[1]=y):y=e[1];let f;e[2]!==p?.server?.version||e[3]!==I?(f=I&&t.jsxs("span",{className:"mr-1",children:["v",p?.server?.version||"unknown"]}),e[2]=p?.server?.version,e[3]=I,e[4]=f):f=e[4];const N=I?14:20;let h;e[5]!==N?(h=t.jsx(Re,{size:N}),e[5]=N,e[6]=h):h=e[6];let x;e[7]!==d||e[8]!==C||e[9]!==y||e[10]!==f||e[11]!==h||e[12]!==m?(x=t.jsx($e,{asChild:!0,children:t.jsxs(X,{variant:m,disabled:d,size:C,className:y,children:[f,h]})}),e[7]=d,e[8]=C,e[9]=y,e[10]=f,e[11]=h,e[12]=m,e[13]=x):x=e[13];let g;if(e[14]!==d||e[15]!==n||e[16]!==r||e[17]!==s){let S;e[19]!==d||e[20]!==n||e[21]!==r?(S=(v,b)=>{const P=v._meta?.["io.modelcontextprotocol.registry/official"];return t.jsx(Ae,{onClick:()=>n(b),disabled:d,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"font-medium text-sm",children:["v",v.server?.version||"unknown"]}),P?.isLatest&&t.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),b===r&&t.jsx(De,{size:16,className:"text-muted-foreground shrink-0"})]})},b)},e[19]=d,e[20]=n,e[21]=r,e[22]=S):S=e[22],g=s.map(S),e[14]=d,e[15]=n,e[16]=r,e[17]=s,e[18]=g}else g=e[18];let _;e[23]!==g?(_=t.jsx(Ue,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:g}),e[23]=g,e[24]=_):_=e[24];let w;return e[25]!==x||e[26]!==_?(w=t.jsxs(Be,{children:[x,_]}),e[25]=x,e[26]=_,e[27]=w):w=e[27],w}function xt(o){const e=E.c(46),{data:s,itemVersions:r,onInstall:n,canInstall:i,isInstalling:c,hideInstallControls:u,selectedVersionIndex:d,onVersionChange:m}=o,I=i===void 0?!0:i,p=c===void 0?!1:c,C=u===void 0?!1:u,[j,y]=F.useState(0),f=d??j;let N;e[0]!==m?(N=U=>{y(U),m?.(U)},e[0]=m,e[1]=N):N=e[1];const h=N,x=r[f]||r[0];let g;e[2]!==x?.server?.remotes?(g=x?.server?.remotes??[],e[2]=x?.server?.remotes,e[3]=g):g=e[3];const _=g;let w;e[4]!==x?.server?.packages?(w=x?.server?.packages??[],e[4]=x?.server?.packages,e[5]=w):w=e[5];const v=w.length>0,b=_.length>0,P=_.findIndex(gt),a=P>=0?P:0;let M;e[6]!==a||e[7]!==v||e[8]!==b||e[9]!==n||e[10]!==f?(M=()=>{b?n(f,a,void 0):v&&n(f,void 0,0)},e[6]=a,e[7]=v,e[8]=b,e[9]=n,e[10]=f,e[11]=M):M=e[11];const V=M;let G;e[12]!==r||e[13]!==n||e[14]!==h?(G=U=>{h(U);const Z=r[U],J=Z?.server?.remotes??[],se=Z?.server?.packages??[];if(J.length>0){const ee=J.findIndex(ht);n(U,ee>=0?ee:0,void 0)}else se.length>0&&n(U,void 0,0)},e[12]=r,e[13]=n,e[14]=h,e[15]=G):G=e[15];const K=G;let $;e[16]!==s.icon||e[17]!==s.name?($=t.jsx(ve,{icon:s.icon,name:s.name,size:"lg",className:"shrink-0 shadow-sm"}),e[16]=s.icon,e[17]=s.name,e[18]=$):$=e[18];let k;e[19]!==s.name?(k=t.jsx("h1",{className:"text-3xl font-medium",children:s.name}),e[19]=s.name,e[20]=k):k=e[20];let T;e[21]!==s.verified?(T=s.verified&&t.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[21]=s.verified,e[22]=T):T=e[22];let A;e[23]!==k||e[24]!==T?(A=t.jsxs("div",{className:"flex items-center gap-2",children:[k,T]}),e[23]=k,e[24]=T,e[25]=A):A=e[25];let D;e[26]!==s.shortDescription?(D=s.shortDescription&&t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.shortDescription}),e[26]=s.shortDescription,e[27]=D):D=e[27];let B;e[28]!==A||e[29]!==D?(B=t.jsxs("div",{className:"flex-1 min-w-0",children:[A,D]}),e[28]=A,e[29]=D,e[30]=B):B=e[30];let z;e[31]!==I||e[32]!==V||e[33]!==K||e[34]!==C||e[35]!==p||e[36]!==r||e[37]!==f||e[38]!==h?(z=I&&!C?t.jsx("div",{className:"shrink-0 flex items-center gap-2",children:r.length>1?t.jsxs("div",{className:"flex",children:[t.jsxs(X,{variant:"brand",onClick:V,disabled:p,className:"shrink-0 rounded-r-none cursor-pointer",children:[t.jsx(fe,{size:20}),p?"Connecting...":"Connect"]}),t.jsx(pe,{versions:r,selectedIndex:f,onSelect:K,isInstalling:p,variant:"brand"})]}):t.jsxs(X,{variant:"brand",onClick:V,disabled:r.length===0||p,className:"shrink-0 cursor-pointer",children:[t.jsx(fe,{size:20}),p?"Connecting...":"Connect"]})}):C?r.length>1?t.jsx("div",{className:"shrink-0",children:t.jsx(pe,{versions:r,selectedIndex:f,onSelect:h,isInstalling:p,variant:"outline",showLabel:!0})}):null:t.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[31]=I,e[32]=V,e[33]=K,e[34]=C,e[35]=p,e[36]=r,e[37]=f,e[38]=h,e[39]=z):z=e[39];let O;e[40]!==B||e[41]!==z?(O=t.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[B,z]}),e[40]=B,e[41]=z,e[42]=O):O=e[42];let H;return e[43]!==O||e[44]!==$?(H=t.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[$,O]}),e[43]=O,e[44]=$,e[45]=H):H=e[45],H}function ht(o){return o.type?.toLowerCase()==="http"||o.type?.toLowerCase()==="streamable-http"}function gt(o){return o.type?.toLowerCase()==="http"||o.type?.toLowerCase()==="streamable-http"}function vt(o){if(!o)return"—";try{const e=new Date(o);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function bt(o){const e=E.c(47),{data:s,publisherInfo:r,selectedItem:n}=o;let i;e[0]!==s.description?(i=s.description&&t.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[t.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.description})]}),e[0]=s.description,e[1]=i):i=e[1];const c=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher;let u;e[2]!==r.logo||e[3]!==c?(u=t.jsx(ve,{icon:r.logo,name:c,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=r.logo,e[3]=c,e[4]=u):u=e[4];let d;e[5]!==s.publisher?(d=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher.charAt(0).toUpperCase()+s.publisher.slice(1),e[5]=s.publisher,e[6]=d):d=e[6];let m;e[7]!==d?(m=t.jsx("div",{className:"font-medium",children:d}),e[7]=d,e[8]=m):m=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"text-xs text-muted-foreground",children:"Publisher"}),e[9]=I):I=e[9];let p;e[10]!==m?(p=t.jsxs("div",{children:[m,I]}),e[10]=m,e[11]=p):p=e[11];let C;e[12]!==u||e[13]!==p?(C=t.jsx("div",{className:"px-5 border-b border-border",children:t.jsxs("div",{className:"flex items-center gap-3 py-5",children:[u,p]})}),e[12]=u,e[13]=p,e[14]=C):C=e[14];let j;e[15]!==s.version?(j=s.version&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Version"}),t.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",s.version]})]}),e[15]=s.version,e[16]=j):j=e[16];let y;e[17]!==s.tags?(y=s.tags&&s.tags.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.tags.map(yt)})]}),e[17]=s.tags,e[18]=y):y=e[18];let f;e[19]!==s.categories?(f=s.categories&&s.categories.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Categories"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.categories.map(jt)})]}),e[19]=s.categories,e[20]=f):f=e[20];let N;e[21]!==s.connectionType?(N=s.connectionType&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:s.connectionType})]}),e[21]=s.connectionType,e[22]=N):N=e[22];let h;e[23]!==s.schemaVersion?(h=s.schemaVersion&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),t.jsx("span",{className:"text-muted-foreground text-xs",children:s.schemaVersion})]}),e[23]=s.schemaVersion,e[24]=h):h=e[24];let x;e[25]!==s.websiteUrl?(x=s.websiteUrl&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Website"}),t.jsxs("a",{href:s.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"Visit"}),t.jsx(ue,{size:14})]})]}),e[25]=s.websiteUrl,e[26]=x):x=e[26];let g;e[27]!==s.repository?(g=s.repository?.url&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Source"}),t.jsxs("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"GitHub"}),t.jsx(ue,{size:14})]})]}),e[27]=s.repository,e[28]=g):g=e[28];let _;e[29]!==y||e[30]!==f||e[31]!==N||e[32]!==h||e[33]!==x||e[34]!==g||e[35]!==j?(_=t.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[j,y,f,N,h,x,g]}),e[29]=y,e[30]=f,e[31]=N,e[32]=h,e[33]=x,e[34]=g,e[35]=j,e[36]=_):_=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[37]=w):w=e[37];let S;e[38]!==n.updated_at?(S=vt(n.updated_at),e[38]=n.updated_at,e[39]=S):S=e[39];let v;e[40]!==S?(v=t.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[w,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:S})]}),e[40]=S,e[41]=v):v=e[41];let b;return e[42]!==i||e[43]!==_||e[44]!==v||e[45]!==C?(b=t.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,C,_,v]}),e[42]=i,e[43]=_,e[44]=v,e[45]=C,e[46]=b):b=e[46],b}function jt(o){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:o},o)}function yt(o){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:o},o)}const Nt=[{value:"http",label:"HTTP"},{value:"sse",label:"SSE"},{value:"stdio",label:"STDIO"},{value:"all",label:"All"}],St={docs:"Documentation",bindings:"Workers Bindings",builds:"Workers Builds",observability:"Observability",radar:"Radar",containers:"Containers",browser:"Browser Rendering",logs:"Logpush",autorag:"AutoRAG",auditlogs:"Audit Logs",graphql:"GraphQL",dex:"DEX Monitoring",casb:"CASB"};function Ct(o){if(!o)return"Local";try{return new URL(o).hostname}catch{return o}}function wt(o){if(!o)return"local";try{const e=new URL(o).hostname;return e.split(".")[0]||e}catch{return"unknown"}}function It(o){const e=St[o.toLowerCase()];return e||o.replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function _t(o){if(!o)return"http";const e=o.toLowerCase();return e==="sse"?"sse":e==="stdio"?"stdio":"http"}function Tt(o){return o.map((e,s)=>{const r=_t(e.type),n=Ct(e.url),i=wt(e.url),c=e.title||e.name||It(i);return{index:s,protocol:r,url:e.url,hostname:n,serviceName:i,displayName:c,name:e.name,title:e.title,description:e.description,_type:e._type,_index:e._index}})}function kt(o){const e=E.c(2),{protocol:s,className:r}=o;let n;return e[0]!==r?(n={http:t.jsx(Ge,{className:r}),sse:t.jsx(Qe,{className:r}),stdio:t.jsx(Xe,{className:r})},e[0]=r,e[1]=n):n=e[1],n[s]}function Lt(o){const e=E.c(10),{options:s,selected:r,onSelect:n}=o;if(s.length<=1)return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-sm text-muted-foreground",children:"Protocol:"}),e[0]=i):i=e[0];let c;if(e[1]!==n||e[2]!==s||e[3]!==r){let d;e[5]!==n||e[6]!==r?(d=m=>t.jsxs(X,{variant:r===m.value?"default":"outline",size:"sm",onClick:()=>n(m.value),className:"cursor-pointer",children:[t.jsx(kt,{protocol:m.value==="all"?"http":m.value,className:"w-4 h-4 mr-1"}),m.label]},m.value),e[5]=n,e[6]=r,e[7]=d):d=e[7],c=s.map(d),e[1]=n,e[2]=s,e[3]=r,e[4]=c}else c=e[4];let u;return e[8]!==c?(u=t.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i,t.jsx("div",{className:"flex gap-1",children:c})]}),e[8]=c,e[9]=u):u=e[9],u}function Pt(o){const e=E.c(11),{servers:s,onInstall:r,isInstalling:n,icon:i,mcpName:c,showStdio:u}=o,d=n===void 0?!1:n,m=u===void 0?!1:u,I=m?s:s.filter(Et),p=Tt(I),C=p.length<13?"all":"http",[j,y]=F.useState(C);let f;e:{if(j==="all"){f="all";break e}let a;if(e[0]!==j?(a=V=>V.protocol===j,e[0]=j,e[1]=a):a=e[1],p.some(a)){f=j;break e}if(p.length<13){f="all";break e}f=p[0]?.protocol??"http"}const N=f,h=N==="all"?p:p.filter(a=>a.protocol===N),x=new Set(p.map(Dt));let g=Nt.filter(a=>a.value==="all"||x.has(a.value));m||(g=g.filter(Vt));const _=x.size<=1?g.filter(Mt):g,w="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4";let S;e[2]!==i||e[3]!==d||e[4]!==c||e[5]!==r?(S=a=>t.jsx(Ke,{variant:"server",icon:i??null,displayName:a.displayName,description:a.description??null,hostname:a.hostname,protocol:a.protocol,isInstalling:d,onClick:()=>r({type:a.protocol,url:a.url,name:a.name,title:a.title,description:a.description,_type:a._type,_index:a._index})},`${a.hostname}-${a.protocol}-${a.index}`),e[2]=i,e[3]=d,e[4]=c,e[5]=r,e[6]=S):S=e[6];const v=h.map(S);let b;e[7]!==v?(b=t.jsx("div",{className:w,children:v}),e[7]=v,e[8]=b):b=e[8];let P;return e[9]!==h.length?(P=h.length===0&&t.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No servers match the selected filter."}),e[9]=h.length,e[10]=P):P=e[10],t.jsxs("div",{className:"p-5",children:[t.jsx(Lt,{options:_,selected:N,onSelect:y}),b,P]})}function Mt(o){return o.value!=="all"}function Vt(o){return o.value!=="stdio"}function Dt(o){return o.protocol}function Et(o){return o.type?.toLowerCase()!=="stdio"}function Rt(o){const e=E.c(29),{data:s,availableTabs:r,effectiveActiveTabId:n,effectiveTools:i,isLoadingTools:c,onTabChange:u,servers:d,onInstallServer:m,isInstalling:I,mcpIcon:p,mcpName:C,showStdio:j}=o,y=c===void 0?!1:c;let f;e[0]!==d?(f=d===void 0?[]:d,e[0]=d,e[1]=f):f=e[1];const N=f,h=I===void 0?!1:I,x=j===void 0?!1:j;let g;e[2]!==i?(g=i.map($t),e[2]=i,e[3]=g):g=e[3];const _=g;let w;e[4]!==r||e[5]!==n||e[6]!==u?(w=r.length>0&&t.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:t.jsx(Fe,{tabs:r,activeTab:n,onTabChange:u})}),e[4]=r,e[5]=n,e[6]=u,e[7]=w):w=e[7];let S;e[8]!==n||e[9]!==h||e[10]!==p||e[11]!==C||e[12]!==m||e[13]!==N||e[14]!==x?(S=n==="servers"&&N.length>0&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(Pt,{servers:N,onInstall:a=>m?.(a),isInstalling:h,icon:p,mcpName:C,showStdio:x})}),e[8]=n,e[9]=h,e[10]=p,e[11]=C,e[12]=m,e[13]=N,e[14]=x,e[15]=S):S=e[15];let v;e[16]!==n||e[17]!==i.length||e[18]!==y||e[19]!==_?(v=n==="tools"&&t.jsx("div",{className:"flex flex-col flex-1",children:y?t.jsxs("div",{className:"flex items-center justify-center p-8",children:[t.jsx(ge,{size:24,className:"animate-spin"}),t.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?t.jsx(ze,{tools:_,showToolbar:!1,emptyMessage:"This MCP Server doesn't have any tools."}):t.jsx(Ve,{image:null,title:"No tools available",description:"This MCP Server doesn't have any tools."})}),e[16]=n,e[17]=i.length,e[18]=y,e[19]=_,e[20]=v):v=e[20];let b;e[21]!==s?.repository||e[22]!==n?(b=n==="readme"&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(Oe,{repository:s?.repository})}),e[21]=s?.repository,e[22]=n,e[23]=b):b=e[23];let P;return e[24]!==b||e[25]!==w||e[26]!==S||e[27]!==v?(P=t.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[w,S,v,b]}),e[24]=b,e[25]=w,e[26]=S,e[27]=v,e[28]=P):P=e[28],P}function $t(o){const e=o;return{name:e.name||"",description:e.description||void 0}}function At(o,e){if(!o||!e)return;const s=e.toLowerCase();return o.find(r=>r.app_name?.toLowerCase()===s||r.app_id?.toLowerCase()===s||r.title.toLowerCase()===s)||o.find(r=>r.title.toLowerCase().includes(s))}function Ut(o,e,s,r,n){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:r?.icon||void 0,count:n??o.length};const i=e.toLowerCase(),c=o.filter(d=>(d._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":d.publisher||d._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===i);return{logo:s?.icon||c[0]?.publisher_logo||c[0]?.icon||void 0,count:c.length}}function Bt(o){const e=o._meta?.["mcp.mesh"],s=o._meta?.["io.modelcontextprotocol.registry/official"],r=o.server,n=We(r.remotes?.[0]?.type),i=qe(r.$schema),c=s?"io.modelcontextprotocol.registry/official":o.publisher||e?.scopeName||"Unknown",u=ct(r.repository),d=o.icon||o.image||o.logo||r.icons?.[0]?.src||u||null,m=o.name||o.title||o.server?.title||"Unnamed Item",I=Ye(m),p=e?.friendly_name||I,C=e?.mesh_description||o.description||o.summary||r?.description||"",j=e?.short_description||null,y=e?.tags||[],f=e?.categories||[];return{name:p,description:C,shortDescription:j,icon:d,verified:o.verified||e?.verified,publisher:c,version:r.version||null,websiteUrl:r.websiteUrl||null,repository:r.repository||null,schemaVersion:i??null,connectionType:n,connectionUrl:null,remoteUrl:null,tags:y,categories:f,tools:o.tools||r.tools||e?.tools||[],models:o.models||r.models||e?.models||[],emails:o.emails||r.emails||e?.emails||[],analytics:o.analytics||r.analytics||e?.analytics,cdn:o.cdn||r.cdn||e?.cdn}}class zt extends F.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,s){console.error("Store MCP server detail error:",e,s)}render(){return this.state.hasError?t.jsx(ft,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function Ot(){const{org:o}=xe(),e=he(),{appName:s}=Ie({strict:!1}),{registryId:r,serverName:n,stdio:i}=_e({strict:!1}),[c,u]=nt(it.storeShowStdio(),()=>!1),d=i==="true"?!0:i==="false"?!1:c;i!==void 0&&i==="true"!==c&&u(i==="true");const[m,I]=F.useState(null),[p,C]=F.useState(null),j=tt(),y=st(),{data:f}=Te.useSession(),N=Ze(y),h=r||N[0]?.id||"",x=ot(h),g=He(x?.tools),_=x?.tools&&x.tools.find(L=>L.name.endsWith("_VERSIONS"))?.name||"",w=x?.tools&&x.tools.find(L=>L.name.endsWith("_GET"))?.name||"",S=!!n;let v="",b={};S?(v=_||w,b={name:n}):(v=g,b={});const P=rt({connectionId:h||null,orgId:o.id}),{data:a}=et({client:P,toolName:v,toolArguments:b,select:l=>l.structuredContent??l});let M=[],V=[],G=null;if(a){if(Array.isArray(a))M=a;else if(typeof a=="object"&&a!==null)if("totalCount"in a&&typeof a.totalCount=="number"&&(G=a.totalCount),"item"in a&&a.item){const l=a.item;M=[{id:l.id||"",title:l.title,server:l.server,_meta:l._meta}]}else{let l;"versions"in a&&Array.isArray(a.versions)?l="versions":"servers"in a&&Array.isArray(a.servers)?l="servers":l=Object.keys(a).find(L=>Array.isArray(a[L])),l&&(M=a[l],(l==="versions"||v?.includes("VERSIONS"))&&(V=M))}}const K=(()=>{const l=V.findIndex(L=>L._meta?.["io.modelcontextprotocol.registry/official"]?.isLatest===!0);return l>=0?l:0})(),$=p??K;let k=M.find(l=>{const L=l.name||l.title||l.server.title||"";return lt(L)===s});!k&&n&&(k=M.find(l=>l.server.name===n||l.name===n||l.title===n));const T=k?Bt(k):null,A=(T?.tools?.length||0)>0,D=k?.server?.remotes?.[0]?.url||null,B=!A&&!!D,z=Je({queryKey:ke.remoteMcpTools(D),queryFn:async()=>{if(!D)return[];const{Client:l}=await de(async()=>{const{Client:R}=await import("./index-kxFCfKdx.js").then(q=>q.cg);return{Client:R}},__vite__mapDeps([0,1])),{StreamableHTTPClientTransport:L}=await de(async()=>{const{StreamableHTTPClientTransport:R}=await import("./index-CNdaxvBl.js");return{StreamableHTTPClientTransport:R}},__vite__mapDeps([2,0,1,3,4,5,6,7,8,9,10])),W=new l({name:"mesh-store",version:"1.0.0"}),te=new L(new URL(D),{requestInit:{headers:{Accept:"application/json, text/event-stream","Content-Type":"application/json"}}});try{return await W.connect(te),((await W.listTools()).tools||[]).map(q=>({name:q.name,description:q.description}))}finally{await W.close().catch(console.error)}},enabled:B}),O=B&&z.isLoading,H=z.data??[],U=A?T?.tools||[]:H,Z=At(y,T?.publisher),J=T?Ut(M,T.publisher,Z,x??null,G):{count:0},se=T?.repository?at(T.repository):null,ne=k?.server?.remotes??[],ee=k?.server?.packages??[],oe=[...ne.map((l,L)=>({...l,_type:"remote",_index:L})),...ee.map((l,L)=>({type:"stdio",url:void 0,name:l.name||l.identifier,title:l.name||l.identifier?.replace(/^@[^/]+\//,""),description:l.environmentVariables?.length?`Requires ${l.environmentVariables.length} environment variable(s)`:void 0,_type:"package",_index:L}))],ie=d?oe:oe.filter(l=>l.type?.toLowerCase()!=="stdio"),le=ie.length>1,Q=[{id:"servers",label:"Servers",count:ie.length,visible:le},{id:"readme",label:"README",visible:!!T?.repository&&!!se},{id:"tools",label:"Tools",count:U.length,visible:A||H.length>0||O&&!!D}].filter(l=>l.visible),je=Q.find(l=>l.id==="servers")?.id||Q.find(l=>l.id==="readme")?.id||Q[0]?.id||"overview",ye=m&&Q.find(l=>l.id===m)?m:je,re=async(l,L,W)=>{const te=V[l??0]||k;if(!te||!o||!f?.user?.id)return;const R=Ee(te,o.id,f.user.id,{remoteIndex:W===void 0?L??0:void 0,packageIndex:W}),q=R.connection_type==="STDIO",Ce=!!R.connection_url,we=q&&R.connection_headers&&typeof R.connection_headers=="object"&&"command"in R.connection_headers;if(!Ce&&!we){me.error("This MCP Server cannot be connected: no connection method available");return}try{const{id:Y}=await j.create.mutateAsync(R);e({to:"/$org/mcps/$connectionId",params:{org:o.slug,connectionId:Y}})}catch(Y){me.error(`Failed to connect MCP Server: ${Y instanceof Error?Y.message:String(Y)}`)}},ae=()=>{e({to:"/$org/store",params:{org:o.slug}})};if(!k)return t.jsx(ut,{onBack:ae});if(!T)return null;const Ne=(k?.server?.remotes?.length??0)>0,Se=(k?.server?.packages?.length??0)>0,ce=Ne||Se;return t.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[t.jsx(pt,{onBack:ae}),t.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.jsx("div",{className:"h-full",children:t.jsxs("div",{className:"h-full",children:[!ce&&t.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[t.jsx(dt,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t.jsx(xt,{data:T,itemVersions:V.length>0?V:[k],onInstall:re,canInstall:ce,isInstalling:j.create.isPending,hideInstallControls:le,selectedVersionIndex:$,onVersionChange:C}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[t.jsx(bt,{data:T,publisherInfo:J,selectedItem:k}),t.jsx(Rt,{data:T,availableTabs:Q,effectiveActiveTabId:ye,effectiveTools:U,isLoadingTools:O,onTabChange:I,servers:oe,onInstallServer:l=>{l._type==="remote"?re($,l._index,void 0):re($,void 0,l._index)},isInstalling:j.create.isPending,mcpIcon:T.icon,mcpName:T.name,showStdio:d})]})]})})})]})}function Ds(){const o=E.c(6),{org:e}=xe(),s=he();let r;o[0]!==s||o[1]!==e.slug?(r=()=>{s({to:"/$org/store",params:{org:e.slug}})},o[0]=s,o[1]=e.slug,o[2]=r):r=o[2];const n=r;let i;o[3]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(F.Suspense,{fallback:t.jsx(mt,{}),children:t.jsx(Ot,{})}),o[3]=i):i=o[3];let c;return o[4]!==n?(c=t.jsx(zt,{onBack:n,children:i}),o[4]=n,o[5]=c):c=o[5],c}export{Ds as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BTX95t7l.js","assets/index-B0qsrDFa.css","assets/index-dMwHjnnN.js","assets/use-collections-M-ZucrNc.js","assets/useMutation-BuhKRt0C.js","assets/useQuery-CnjlQpZk.js","assets/constants-l6jfVkIP.js","assets/use-connection-B7MC5D37.js","assets/use-mcp-prompts-Cwl3wuSJ.js","assets/use-virtual-mcp-TJpzrF0-.js","assets/mcp-oauth-CrWnEeM3.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as F,c as E,j as t,u as xe,f as he,a as Ie,g as _e,e as Te,bt as de,K as ke,a8 as me}from"./index-BTX95t7l.js";import{i as Le}from"./AlertCircle-9_AbzfZV.js";import{i as ge}from"./Loading01-CopTTh4g.js";import{B as X,c as Pe}from"./button-BNEclrG2.js";import{i as Me}from"./ArrowLeft-2xAygwK8.js";import{I as ve,E as Ve}from"./empty-state-Bnk561r4.js";import{i as De,e as Ee}from"./extract-connection-data-CuvIF5Zc.js";import{t as Re}from"./ChevronDown-B9uETHHQ.js";import{s as fe}from"./Plus-erQKhzFc.js";import{a as $e,c as Ae,b as Ue,D as Be}from"./dropdown-menu-B5X7QG53.js";import{n as ue}from"./LinkExternal01-DQw1Qc9U.js";import{T as ze,R as Oe}from"./tools-list-8U1et6rm.js";import{R as Fe}from"./resource-tabs-B4vVuVvd.js";import{s as Ge,f as He,g as We,c as qe}from"./registry-utils-Dda0cOYu.js";import{a as Ke,b as Qe,e as Ye}from"./mcp-server-card-CgncAkll.js";import{i as Xe}from"./Terminal-nMH6minT.js";import{u as Ze}from"./use-binding-BM0mjywS.js";import{u as Je}from"./useQuery-CnjlQpZk.js";import{c as et}from"./use-collections-M-ZucrNc.js";import{a as tt,b as st,u as ot}from"./use-connection-B7MC5D37.js";import{u as rt}from"./constants-l6jfVkIP.js";import{u as nt,L as it}from"./localstorage-keys-BpjSpnih.js";import{s as lt}from"./slugify-CEUa2lfQ.js";import{e as at,g as ct}from"./github-icon-Dp3wHhYE.js";import{i as dt}from"./InfoCircle-Dt8NaYCm.js";import"./constants-Cp5o6xb6.js";import"./generate-id-Dyweu44Y.js";import"./Grid01-CHS_jF02.js";import"./File06-BM3tW-ao.js";import"./collection-display-button-Bv_XCGpu.js";import"./ArrowUp-PDh8aKqr.js";import"./Check-DCOgSIim.js";import"./List-C7xsEmxx.js";import"./tooltip-Mf5UtuF2.js";import"./view-mode-toggle-C5CEe5h-.js";import"./collection-search-ClAji_RX.js";import"./SearchMd-CHkFEvMn.js";import"./input-Vw7XIX0r.js";import"./collection-table-wrapper-BdCz63Jd.js";import"./card-kDbUMtCL.js";import"./layout-DKHrwMN9.js";import"./badge-Blh93jrG.js";import"./Lock01-BdnY_MsG.js";import"./binder-ku-JM_HB.js";import"./useMutation-BuhKRt0C.js";const be=({size:o=24,color:e="currentColor",...s})=>F.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},F.createElement("path",{d:"m21 21-3.5-3.5m2.5-6a8.5 8.5 0 1 1-17 0 8.5 8.5 0 0 1 17 0Z"}));be.displayName="SearchLg";function mt(o){const e=E.c(3),{message:s}=o,r=s===void 0?"Loading MCP Server details...":s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(ge,{size:48,className:"animate-spin mb-4"}),e[0]=n):n=e[0];let i;return e[1]!==r?(i=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n,t.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),e[1]=r,e[2]=i):i=e[2],i}function ft(o){const e=E.c(9),{error:s,onBack:r}=o,n=s instanceof Error?s.message:s;let i,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Le,{size:48,className:"text-destructive mb-4"}),c=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading MCP Server"}),e[0]=i,e[1]=c):(i=e[0],c=e[1]);let u;e[2]!==n?(u=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:n}),e[2]=n,e[3]=u):u=e[3];let d;e[4]!==r?(d=t.jsx("button",{onClick:r,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back"}),e[4]=r,e[5]=d):d=e[5];let m;return e[6]!==u||e[7]!==d?(m=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[i,c,u,d]}),e[6]=u,e[7]=d,e[8]=m):m=e[8],m}function ut(o){const e=E.c(5),{onBack:s}=o;let r,n,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(be,{size:48,className:"text-muted-foreground mb-4"}),n=t.jsx("h3",{className:"text-lg font-medium mb-2",children:"MCP Server not found"}),i=t.jsx("p",{className:"text-muted-foreground max-w-md text-center",children:"The MCP Server you're looking for doesn't exist in this store."}),e[0]=r,e[1]=n,e[2]=i):(r=e[0],n=e[1],i=e[2]);let c;return e[3]!==s?(c=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r,n,i,t.jsx("button",{onClick:s,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"Go Back to Store"})]}),e[3]=s,e[4]=c):c=e[4],c}function pt(o){const e=E.c(3),{onBack:s}=o;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Me,{}),e[0]=r):r=e[0];let n;return e[1]!==s?(n=t.jsx("div",{className:"flex items-center h-12 border-b border-border shrink-0",children:t.jsx("div",{className:"flex h-full px-2 border-r items-center",children:t.jsx(X,{variant:"ghost",size:"icon",className:"items-center size-8 text-muted-foreground",onClick:s,"aria-label":"Go back",children:r})})}),e[1]=s,e[2]=n):n=e[2],n}function pe(o){const e=E.c(28),{versions:s,selectedIndex:r,onSelect:n,isInstalling:i,variant:c,showLabel:u}=o,d=i===void 0?!1:i,m=c===void 0?"brand":c,I=u===void 0?!1:u,p=s[r],C=I?"sm":"default",j=m==="brand"&&"rounded-l-none px-2 border-l-2 border-l-white/50";let y;e[0]!==j?(y=Pe("shrink-0 cursor-pointer",j),e[0]=j,e[1]=y):y=e[1];let f;e[2]!==p?.server?.version||e[3]!==I?(f=I&&t.jsxs("span",{className:"mr-1",children:["v",p?.server?.version||"unknown"]}),e[2]=p?.server?.version,e[3]=I,e[4]=f):f=e[4];const N=I?14:20;let h;e[5]!==N?(h=t.jsx(Re,{size:N}),e[5]=N,e[6]=h):h=e[6];let x;e[7]!==d||e[8]!==C||e[9]!==y||e[10]!==f||e[11]!==h||e[12]!==m?(x=t.jsx($e,{asChild:!0,children:t.jsxs(X,{variant:m,disabled:d,size:C,className:y,children:[f,h]})}),e[7]=d,e[8]=C,e[9]=y,e[10]=f,e[11]=h,e[12]=m,e[13]=x):x=e[13];let g;if(e[14]!==d||e[15]!==n||e[16]!==r||e[17]!==s){let S;e[19]!==d||e[20]!==n||e[21]!==r?(S=(v,b)=>{const P=v._meta?.["io.modelcontextprotocol.registry/official"];return t.jsx(Ae,{onClick:()=>n(b),disabled:d,className:"cursor-pointer",children:t.jsxs("div",{className:"flex items-center justify-between gap-2 w-full",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("div",{className:"font-medium text-sm",children:["v",v.server?.version||"unknown"]}),P?.isLatest&&t.jsx("div",{className:"text-xs text-muted-foreground/50 font-semibold",children:"LATEST"})]}),b===r&&t.jsx(De,{size:16,className:"text-muted-foreground shrink-0"})]})},b)},e[19]=d,e[20]=n,e[21]=r,e[22]=S):S=e[22],g=s.map(S),e[14]=d,e[15]=n,e[16]=r,e[17]=s,e[18]=g}else g=e[18];let _;e[23]!==g?(_=t.jsx(Ue,{align:"end",className:"w-56 max-h-[300px] overflow-y-auto",children:g}),e[23]=g,e[24]=_):_=e[24];let w;return e[25]!==x||e[26]!==_?(w=t.jsxs(Be,{children:[x,_]}),e[25]=x,e[26]=_,e[27]=w):w=e[27],w}function xt(o){const e=E.c(46),{data:s,itemVersions:r,onInstall:n,canInstall:i,isInstalling:c,hideInstallControls:u,selectedVersionIndex:d,onVersionChange:m}=o,I=i===void 0?!0:i,p=c===void 0?!1:c,C=u===void 0?!1:u,[j,y]=F.useState(0),f=d??j;let N;e[0]!==m?(N=U=>{y(U),m?.(U)},e[0]=m,e[1]=N):N=e[1];const h=N,x=r[f]||r[0];let g;e[2]!==x?.server?.remotes?(g=x?.server?.remotes??[],e[2]=x?.server?.remotes,e[3]=g):g=e[3];const _=g;let w;e[4]!==x?.server?.packages?(w=x?.server?.packages??[],e[4]=x?.server?.packages,e[5]=w):w=e[5];const v=w.length>0,b=_.length>0,P=_.findIndex(gt),a=P>=0?P:0;let M;e[6]!==a||e[7]!==v||e[8]!==b||e[9]!==n||e[10]!==f?(M=()=>{b?n(f,a,void 0):v&&n(f,void 0,0)},e[6]=a,e[7]=v,e[8]=b,e[9]=n,e[10]=f,e[11]=M):M=e[11];const V=M;let G;e[12]!==r||e[13]!==n||e[14]!==h?(G=U=>{h(U);const Z=r[U],J=Z?.server?.remotes??[],se=Z?.server?.packages??[];if(J.length>0){const ee=J.findIndex(ht);n(U,ee>=0?ee:0,void 0)}else se.length>0&&n(U,void 0,0)},e[12]=r,e[13]=n,e[14]=h,e[15]=G):G=e[15];const K=G;let $;e[16]!==s.icon||e[17]!==s.name?($=t.jsx(ve,{icon:s.icon,name:s.name,size:"lg",className:"shrink-0 shadow-sm"}),e[16]=s.icon,e[17]=s.name,e[18]=$):$=e[18];let k;e[19]!==s.name?(k=t.jsx("h1",{className:"text-3xl font-medium",children:s.name}),e[19]=s.name,e[20]=k):k=e[20];let T;e[21]!==s.verified?(T=s.verified&&t.jsx("img",{src:"/verified-badge.svg",alt:"Verified",className:"w-5 h-5 shrink-0"}),e[21]=s.verified,e[22]=T):T=e[22];let A;e[23]!==k||e[24]!==T?(A=t.jsxs("div",{className:"flex items-center gap-2",children:[k,T]}),e[23]=k,e[24]=T,e[25]=A):A=e[25];let D;e[26]!==s.shortDescription?(D=s.shortDescription&&t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s.shortDescription}),e[26]=s.shortDescription,e[27]=D):D=e[27];let B;e[28]!==A||e[29]!==D?(B=t.jsxs("div",{className:"flex-1 min-w-0",children:[A,D]}),e[28]=A,e[29]=D,e[30]=B):B=e[30];let z;e[31]!==I||e[32]!==V||e[33]!==K||e[34]!==C||e[35]!==p||e[36]!==r||e[37]!==f||e[38]!==h?(z=I&&!C?t.jsx("div",{className:"shrink-0 flex items-center gap-2",children:r.length>1?t.jsxs("div",{className:"flex",children:[t.jsxs(X,{variant:"brand",onClick:V,disabled:p,className:"shrink-0 rounded-r-none cursor-pointer",children:[t.jsx(fe,{size:20}),p?"Connecting...":"Connect"]}),t.jsx(pe,{versions:r,selectedIndex:f,onSelect:K,isInstalling:p,variant:"brand"})]}):t.jsxs(X,{variant:"brand",onClick:V,disabled:r.length===0||p,className:"shrink-0 cursor-pointer",children:[t.jsx(fe,{size:20}),p?"Connecting...":"Connect"]})}):C?r.length>1?t.jsx("div",{className:"shrink-0",children:t.jsx(pe,{versions:r,selectedIndex:f,onSelect:h,isInstalling:p,variant:"outline",showLabel:!0})}):null:t.jsx("div",{className:"shrink-0 px-4 py-2 text-sm text-muted-foreground bg-muted rounded-lg",children:"Cannot be connected"}),e[31]=I,e[32]=V,e[33]=K,e[34]=C,e[35]=p,e[36]=r,e[37]=f,e[38]=h,e[39]=z):z=e[39];let O;e[40]!==B||e[41]!==z?(O=t.jsxs("div",{className:"flex-1 min-w-0 flex items-center justify-between",children:[B,z]}),e[40]=B,e[41]=z,e[42]=O):O=e[42];let H;return e[43]!==O||e[44]!==$?(H=t.jsxs("div",{className:"flex items-center gap-4 py-8 px-5 border-b border-border",children:[$,O]}),e[43]=O,e[44]=$,e[45]=H):H=e[45],H}function ht(o){return o.type?.toLowerCase()==="http"||o.type?.toLowerCase()==="streamable-http"}function gt(o){return o.type?.toLowerCase()==="http"||o.type?.toLowerCase()==="streamable-http"}function vt(o){if(!o)return"—";try{const e=new Date(o);return isNaN(e.getTime())?"—":e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function bt(o){const e=E.c(47),{data:s,publisherInfo:r,selectedItem:n}=o;let i;e[0]!==s.description?(i=s.description&&t.jsxs("div",{className:"px-5 pb-5 border-b border-border",children:[t.jsx("h2",{className:"text-base font-medium mb-3",children:"Overview"}),t.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.description})]}),e[0]=s.description,e[1]=i):i=e[1];const c=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher;let u;e[2]!==r.logo||e[3]!==c?(u=t.jsx(ve,{icon:r.logo,name:c,size:"sm",className:"shrink-0 shadow-sm"}),e[2]=r.logo,e[3]=c,e[4]=u):u=e[4];let d;e[5]!==s.publisher?(d=s.publisher==="io.modelcontextprotocol.registry/official"?"Official Registry":s.publisher.charAt(0).toUpperCase()+s.publisher.slice(1),e[5]=s.publisher,e[6]=d):d=e[6];let m;e[7]!==d?(m=t.jsx("div",{className:"font-medium",children:d}),e[7]=d,e[8]=m):m=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"text-xs text-muted-foreground",children:"Publisher"}),e[9]=I):I=e[9];let p;e[10]!==m?(p=t.jsxs("div",{children:[m,I]}),e[10]=m,e[11]=p):p=e[11];let C;e[12]!==u||e[13]!==p?(C=t.jsx("div",{className:"px-5 border-b border-border",children:t.jsxs("div",{className:"flex items-center gap-3 py-5",children:[u,p]})}),e[12]=u,e[13]=p,e[14]=C):C=e[14];let j;e[15]!==s.version?(j=s.version&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Version"}),t.jsxs("span",{className:"text-muted-foreground uppercase text-xs",children:["v",s.version]})]}),e[15]=s.version,e[16]=j):j=e[16];let y;e[17]!==s.tags?(y=s.tags&&s.tags.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.tags.map(yt)})]}),e[17]=s.tags,e[18]=y):y=e[18];let f;e[19]!==s.categories?(f=s.categories&&s.categories.length>0&&t.jsxs("div",{className:"flex justify-between items-start text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Categories"}),t.jsx("div",{className:"flex flex-wrap gap-1 justify-end max-w-[60%]",children:s.categories.map(jt)})]}),e[19]=s.categories,e[20]=f):f=e[20];let N;e[21]!==s.connectionType?(N=s.connectionType&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Connection Type"}),t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:s.connectionType})]}),e[21]=s.connectionType,e[22]=N):N=e[22];let h;e[23]!==s.schemaVersion?(h=s.schemaVersion&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Schema Version"}),t.jsx("span",{className:"text-muted-foreground text-xs",children:s.schemaVersion})]}),e[23]=s.schemaVersion,e[24]=h):h=e[24];let x;e[25]!==s.websiteUrl?(x=s.websiteUrl&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Website"}),t.jsxs("a",{href:s.websiteUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"Visit"}),t.jsx(ue,{size:14})]})]}),e[25]=s.websiteUrl,e[26]=x):x=e[26];let g;e[27]!==s.repository?(g=s.repository?.url&&t.jsxs("div",{className:"flex justify-between items-center text-sm",children:[t.jsx("span",{className:"text-foreground text-sm",children:"Source"}),t.jsxs("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:underline flex items-center gap-1 text-xs",children:[t.jsx("span",{children:"GitHub"}),t.jsx(ue,{size:14})]})]}),e[27]=s.repository,e[28]=g):g=e[28];let _;e[29]!==y||e[30]!==f||e[31]!==N||e[32]!==h||e[33]!==x||e[34]!==g||e[35]!==j?(_=t.jsxs("div",{className:"px-5 py-5 border-b border-border space-y-4",children:[j,y,f,N,h,x,g]}),e[29]=y,e[30]=f,e[31]=N,e[32]=h,e[33]=x,e[34]=g,e[35]=j,e[36]=_):_=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("span",{className:"text-foreground text-sm",children:"Last Updated"}),e[37]=w):w=e[37];let S;e[38]!==n.updated_at?(S=vt(n.updated_at),e[38]=n.updated_at,e[39]=S):S=e[39];let v;e[40]!==S?(v=t.jsxs("div",{className:"px-5 py-5 text-sm flex justify-between items-center border-b border-border",children:[w,t.jsx("span",{className:"text-muted-foreground uppercase text-xs",children:S})]}),e[40]=S,e[41]=v):v=e[41];let b;return e[42]!==i||e[43]!==_||e[44]!==v||e[45]!==C?(b=t.jsxs("div",{className:"lg:col-span-1 flex flex-col pt-5",children:[i,C,_,v]}),e[42]=i,e[43]=_,e[44]=v,e[45]=C,e[46]=b):b=e[46],b}function jt(o){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:o},o)}function yt(o){return t.jsx("span",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:o},o)}const Nt=[{value:"http",label:"HTTP"},{value:"sse",label:"SSE"},{value:"stdio",label:"STDIO"},{value:"all",label:"All"}],St={docs:"Documentation",bindings:"Workers Bindings",builds:"Workers Builds",observability:"Observability",radar:"Radar",containers:"Containers",browser:"Browser Rendering",logs:"Logpush",autorag:"AutoRAG",auditlogs:"Audit Logs",graphql:"GraphQL",dex:"DEX Monitoring",casb:"CASB"};function Ct(o){if(!o)return"Local";try{return new URL(o).hostname}catch{return o}}function wt(o){if(!o)return"local";try{const e=new URL(o).hostname;return e.split(".")[0]||e}catch{return"unknown"}}function It(o){const e=St[o.toLowerCase()];return e||o.replace(/[-_]/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function _t(o){if(!o)return"http";const e=o.toLowerCase();return e==="sse"?"sse":e==="stdio"?"stdio":"http"}function Tt(o){return o.map((e,s)=>{const r=_t(e.type),n=Ct(e.url),i=wt(e.url),c=e.title||e.name||It(i);return{index:s,protocol:r,url:e.url,hostname:n,serviceName:i,displayName:c,name:e.name,title:e.title,description:e.description,_type:e._type,_index:e._index}})}function kt(o){const e=E.c(2),{protocol:s,className:r}=o;let n;return e[0]!==r?(n={http:t.jsx(Ge,{className:r}),sse:t.jsx(Qe,{className:r}),stdio:t.jsx(Xe,{className:r})},e[0]=r,e[1]=n):n=e[1],n[s]}function Lt(o){const e=E.c(10),{options:s,selected:r,onSelect:n}=o;if(s.length<=1)return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-sm text-muted-foreground",children:"Protocol:"}),e[0]=i):i=e[0];let c;if(e[1]!==n||e[2]!==s||e[3]!==r){let d;e[5]!==n||e[6]!==r?(d=m=>t.jsxs(X,{variant:r===m.value?"default":"outline",size:"sm",onClick:()=>n(m.value),className:"cursor-pointer",children:[t.jsx(kt,{protocol:m.value==="all"?"http":m.value,className:"w-4 h-4 mr-1"}),m.label]},m.value),e[5]=n,e[6]=r,e[7]=d):d=e[7],c=s.map(d),e[1]=n,e[2]=s,e[3]=r,e[4]=c}else c=e[4];let u;return e[8]!==c?(u=t.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i,t.jsx("div",{className:"flex gap-1",children:c})]}),e[8]=c,e[9]=u):u=e[9],u}function Pt(o){const e=E.c(11),{servers:s,onInstall:r,isInstalling:n,icon:i,mcpName:c,showStdio:u}=o,d=n===void 0?!1:n,m=u===void 0?!1:u,I=m?s:s.filter(Et),p=Tt(I),C=p.length<13?"all":"http",[j,y]=F.useState(C);let f;e:{if(j==="all"){f="all";break e}let a;if(e[0]!==j?(a=V=>V.protocol===j,e[0]=j,e[1]=a):a=e[1],p.some(a)){f=j;break e}if(p.length<13){f="all";break e}f=p[0]?.protocol??"http"}const N=f,h=N==="all"?p:p.filter(a=>a.protocol===N),x=new Set(p.map(Dt));let g=Nt.filter(a=>a.value==="all"||x.has(a.value));m||(g=g.filter(Vt));const _=x.size<=1?g.filter(Mt):g,w="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4";let S;e[2]!==i||e[3]!==d||e[4]!==c||e[5]!==r?(S=a=>t.jsx(Ke,{variant:"server",icon:i??null,displayName:a.displayName,description:a.description??null,hostname:a.hostname,protocol:a.protocol,isInstalling:d,onClick:()=>r({type:a.protocol,url:a.url,name:a.name,title:a.title,description:a.description,_type:a._type,_index:a._index})},`${a.hostname}-${a.protocol}-${a.index}`),e[2]=i,e[3]=d,e[4]=c,e[5]=r,e[6]=S):S=e[6];const v=h.map(S);let b;e[7]!==v?(b=t.jsx("div",{className:w,children:v}),e[7]=v,e[8]=b):b=e[8];let P;return e[9]!==h.length?(P=h.length===0&&t.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No servers match the selected filter."}),e[9]=h.length,e[10]=P):P=e[10],t.jsxs("div",{className:"p-5",children:[t.jsx(Lt,{options:_,selected:N,onSelect:y}),b,P]})}function Mt(o){return o.value!=="all"}function Vt(o){return o.value!=="stdio"}function Dt(o){return o.protocol}function Et(o){return o.type?.toLowerCase()!=="stdio"}function Rt(o){const e=E.c(29),{data:s,availableTabs:r,effectiveActiveTabId:n,effectiveTools:i,isLoadingTools:c,onTabChange:u,servers:d,onInstallServer:m,isInstalling:I,mcpIcon:p,mcpName:C,showStdio:j}=o,y=c===void 0?!1:c;let f;e[0]!==d?(f=d===void 0?[]:d,e[0]=d,e[1]=f):f=e[1];const N=f,h=I===void 0?!1:I,x=j===void 0?!1:j;let g;e[2]!==i?(g=i.map($t),e[2]=i,e[3]=g):g=e[3];const _=g;let w;e[4]!==r||e[5]!==n||e[6]!==u?(w=r.length>0&&t.jsx("div",{className:"px-4 py-2 border-b border-border bg-background",children:t.jsx(Fe,{tabs:r,activeTab:n,onTabChange:u})}),e[4]=r,e[5]=n,e[6]=u,e[7]=w):w=e[7];let S;e[8]!==n||e[9]!==h||e[10]!==p||e[11]!==C||e[12]!==m||e[13]!==N||e[14]!==x?(S=n==="servers"&&N.length>0&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(Pt,{servers:N,onInstall:a=>m?.(a),isInstalling:h,icon:p,mcpName:C,showStdio:x})}),e[8]=n,e[9]=h,e[10]=p,e[11]=C,e[12]=m,e[13]=N,e[14]=x,e[15]=S):S=e[15];let v;e[16]!==n||e[17]!==i.length||e[18]!==y||e[19]!==_?(v=n==="tools"&&t.jsx("div",{className:"flex flex-col flex-1",children:y?t.jsxs("div",{className:"flex items-center justify-center p-8",children:[t.jsx(ge,{size:24,className:"animate-spin"}),t.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Loading tools..."})]}):i.length>0?t.jsx(ze,{tools:_,showToolbar:!1,emptyMessage:"This MCP Server doesn't have any tools."}):t.jsx(Ve,{image:null,title:"No tools available",description:"This MCP Server doesn't have any tools."})}),e[16]=n,e[17]=i.length,e[18]=y,e[19]=_,e[20]=v):v=e[20];let b;e[21]!==s?.repository||e[22]!==n?(b=n==="readme"&&t.jsx("div",{className:"flex-1 overflow-y-auto bg-background",children:t.jsx(Oe,{repository:s?.repository})}),e[21]=s?.repository,e[22]=n,e[23]=b):b=e[23];let P;return e[24]!==b||e[25]!==w||e[26]!==S||e[27]!==v?(P=t.jsxs("div",{className:"lg:col-span-2 flex flex-col border-l border-border",children:[w,S,v,b]}),e[24]=b,e[25]=w,e[26]=S,e[27]=v,e[28]=P):P=e[28],P}function $t(o){const e=o;return{name:e.name||"",description:e.description||void 0}}function At(o,e){if(!o||!e)return;const s=e.toLowerCase();return o.find(r=>r.app_name?.toLowerCase()===s||r.app_id?.toLowerCase()===s||r.title.toLowerCase()===s)||o.find(r=>r.title.toLowerCase().includes(s))}function Ut(o,e,s,r,n){if(!e||e==="Unknown")return{count:0};if(e==="io.modelcontextprotocol.registry/official")return{logo:r?.icon||void 0,count:n??o.length};const i=e.toLowerCase(),c=o.filter(d=>(d._meta?.["io.modelcontextprotocol.registry/official"]?"io.modelcontextprotocol.registry/official":d.publisher||d._meta?.["mcp.mesh"]?.scopeName||"Unknown").toLowerCase()===i);return{logo:s?.icon||c[0]?.publisher_logo||c[0]?.icon||void 0,count:c.length}}function Bt(o){const e=o._meta?.["mcp.mesh"],s=o._meta?.["io.modelcontextprotocol.registry/official"],r=o.server,n=We(r.remotes?.[0]?.type),i=qe(r.$schema),c=s?"io.modelcontextprotocol.registry/official":o.publisher||e?.scopeName||"Unknown",u=ct(r.repository),d=o.icon||o.image||o.logo||r.icons?.[0]?.src||u||null,m=o.name||o.title||o.server?.title||"Unnamed Item",I=Ye(m),p=e?.friendly_name||I,C=e?.mesh_description||o.description||o.summary||r?.description||"",j=e?.short_description||null,y=e?.tags||[],f=e?.categories||[];return{name:p,description:C,shortDescription:j,icon:d,verified:o.verified||e?.verified,publisher:c,version:r.version||null,websiteUrl:r.websiteUrl||null,repository:r.repository||null,schemaVersion:i??null,connectionType:n,connectionUrl:null,remoteUrl:null,tags:y,categories:f,tools:o.tools||r.tools||e?.tools||[],models:o.models||r.models||e?.models||[],emails:o.emails||r.emails||e?.emails||[],analytics:o.analytics||r.analytics||e?.analytics,cdn:o.cdn||r.cdn||e?.cdn}}class zt extends F.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,s){console.error("Store MCP server detail error:",e,s)}render(){return this.state.hasError?t.jsx(ft,{error:this.state.error||new Error("Unknown error"),onBack:this.props.onBack}):this.props.children}}function Ot(){const{org:o}=xe(),e=he(),{appName:s}=Ie({strict:!1}),{registryId:r,serverName:n,stdio:i}=_e({strict:!1}),[c,u]=nt(it.storeShowStdio(),()=>!1),d=i==="true"?!0:i==="false"?!1:c;i!==void 0&&i==="true"!==c&&u(i==="true");const[m,I]=F.useState(null),[p,C]=F.useState(null),j=tt(),y=st(),{data:f}=Te.useSession(),N=Ze(y),h=r||N[0]?.id||"",x=ot(h),g=He(x?.tools),_=x?.tools&&x.tools.find(L=>L.name.endsWith("_VERSIONS"))?.name||"",w=x?.tools&&x.tools.find(L=>L.name.endsWith("_GET"))?.name||"",S=!!n;let v="",b={};S?(v=_||w,b={name:n}):(v=g,b={});const P=rt({connectionId:h||null,orgId:o.id}),{data:a}=et({client:P,toolName:v,toolArguments:b,select:l=>l.structuredContent??l});let M=[],V=[],G=null;if(a){if(Array.isArray(a))M=a;else if(typeof a=="object"&&a!==null)if("totalCount"in a&&typeof a.totalCount=="number"&&(G=a.totalCount),"item"in a&&a.item){const l=a.item;M=[{id:l.id||"",title:l.title,server:l.server,_meta:l._meta}]}else{let l;"versions"in a&&Array.isArray(a.versions)?l="versions":"servers"in a&&Array.isArray(a.servers)?l="servers":l=Object.keys(a).find(L=>Array.isArray(a[L])),l&&(M=a[l],(l==="versions"||v?.includes("VERSIONS"))&&(V=M))}}const K=(()=>{const l=V.findIndex(L=>L._meta?.["io.modelcontextprotocol.registry/official"]?.isLatest===!0);return l>=0?l:0})(),$=p??K;let k=M.find(l=>{const L=l.name||l.title||l.server.title||"";return lt(L)===s});!k&&n&&(k=M.find(l=>l.server.name===n||l.name===n||l.title===n));const T=k?Bt(k):null,A=(T?.tools?.length||0)>0,D=k?.server?.remotes?.[0]?.url||null,B=!A&&!!D,z=Je({queryKey:ke.remoteMcpTools(D),queryFn:async()=>{if(!D)return[];const{Client:l}=await de(async()=>{const{Client:R}=await import("./index-BTX95t7l.js").then(q=>q.ce);return{Client:R}},__vite__mapDeps([0,1])),{StreamableHTTPClientTransport:L}=await de(async()=>{const{StreamableHTTPClientTransport:R}=await import("./index-dMwHjnnN.js");return{StreamableHTTPClientTransport:R}},__vite__mapDeps([2,0,1,3,4,5,6,7,8,9,10])),W=new l({name:"mesh-store",version:"1.0.0"}),te=new L(new URL(D),{requestInit:{headers:{Accept:"application/json, text/event-stream","Content-Type":"application/json"}}});try{return await W.connect(te),((await W.listTools()).tools||[]).map(q=>({name:q.name,description:q.description}))}finally{await W.close().catch(console.error)}},enabled:B}),O=B&&z.isLoading,H=z.data??[],U=A?T?.tools||[]:H,Z=At(y,T?.publisher),J=T?Ut(M,T.publisher,Z,x??null,G):{count:0},se=T?.repository?at(T.repository):null,ne=k?.server?.remotes??[],ee=k?.server?.packages??[],oe=[...ne.map((l,L)=>({...l,_type:"remote",_index:L})),...ee.map((l,L)=>({type:"stdio",url:void 0,name:l.name||l.identifier,title:l.name||l.identifier?.replace(/^@[^/]+\//,""),description:l.environmentVariables?.length?`Requires ${l.environmentVariables.length} environment variable(s)`:void 0,_type:"package",_index:L}))],ie=d?oe:oe.filter(l=>l.type?.toLowerCase()!=="stdio"),le=ie.length>1,Q=[{id:"servers",label:"Servers",count:ie.length,visible:le},{id:"readme",label:"README",visible:!!T?.repository&&!!se},{id:"tools",label:"Tools",count:U.length,visible:A||H.length>0||O&&!!D}].filter(l=>l.visible),je=Q.find(l=>l.id==="servers")?.id||Q.find(l=>l.id==="readme")?.id||Q[0]?.id||"overview",ye=m&&Q.find(l=>l.id===m)?m:je,re=async(l,L,W)=>{const te=V[l??0]||k;if(!te||!o||!f?.user?.id)return;const R=Ee(te,o.id,f.user.id,{remoteIndex:W===void 0?L??0:void 0,packageIndex:W}),q=R.connection_type==="STDIO",Ce=!!R.connection_url,we=q&&R.connection_headers&&typeof R.connection_headers=="object"&&"command"in R.connection_headers;if(!Ce&&!we){me.error("This MCP Server cannot be connected: no connection method available");return}try{const{id:Y}=await j.create.mutateAsync(R);e({to:"/$org/mcps/$connectionId",params:{org:o.slug,connectionId:Y}})}catch(Y){me.error(`Failed to connect MCP Server: ${Y instanceof Error?Y.message:String(Y)}`)}},ae=()=>{e({to:"/$org/store",params:{org:o.slug}})};if(!k)return t.jsx(ut,{onBack:ae});if(!T)return null;const Ne=(k?.server?.remotes?.length??0)>0,Se=(k?.server?.packages?.length??0)>0,ce=Ne||Se;return t.jsxs("div",{className:"flex flex-col h-full border-l border-border",children:[t.jsx(pt,{onBack:ae}),t.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.jsx("div",{className:"h-full",children:t.jsxs("div",{className:"h-full",children:[!ce&&t.jsxs("div",{className:"mb-6 p-4 bg-amber-50 border border-amber-200 rounded-lg text-sm text-amber-900",children:[t.jsx(dt,{size:16,className:"inline mr-2"}),"This MCP Server cannot be connected - no connection method available."]}),t.jsx(xt,{data:T,itemVersions:V.length>0?V:[k],onInstall:re,canInstall:ce,isInstalling:j.create.isPending,hideInstallControls:le,selectedVersionIndex:$,onVersionChange:C}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 min-h-[677px]",children:[t.jsx(bt,{data:T,publisherInfo:J,selectedItem:k}),t.jsx(Rt,{data:T,availableTabs:Q,effectiveActiveTabId:ye,effectiveTools:U,isLoadingTools:O,onTabChange:I,servers:oe,onInstallServer:l=>{l._type==="remote"?re($,l._index,void 0):re($,void 0,l._index)},isInstalling:j.create.isPending,mcpIcon:T.icon,mcpName:T.name,showStdio:d})]})]})})})]})}function Ds(){const o=E.c(6),{org:e}=xe(),s=he();let r;o[0]!==s||o[1]!==e.slug?(r=()=>{s({to:"/$org/store",params:{org:e.slug}})},o[0]=s,o[1]=e.slug,o[2]=r):r=o[2];const n=r;let i;o[3]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(F.Suspense,{fallback:t.jsx(mt,{}),children:t.jsx(Ot,{})}),o[3]=i):i=o[3];let c;return o[4]!==n?(c=t.jsx(zt,{onBack:n,children:i}),o[4]=n,o[5]=c):c=o[5],c}export{Ds as default};
|