You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
14 KiB
JavaScript

9 months ago
exports.id=935,exports.ids=[935],exports.modules={9127:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var r,s,i=a(6413);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let l=function(e){return i.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),r||(r=i.createElement("defs",null,i.createElement("path",{id:"edit_svg__a",d:"M0 0h16v16H0z"}))),i.createElement("g",null,s||(s=i.createElement("mask",{id:"edit_svg__b",fill:"#fff"},i.createElement("use",{xlinkHref:"#edit_svg__a"}))),i.createElement("g",{mask:"url(#edit_svg__b)"},i.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M2.83 0v3c0 .37-.3.67-.66.67H0",transform:"translate(10.5 11)"}),i.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M10.67 4V.67c0-.37-.3-.67-.67-.67H.67C.3 0 0 .3 0 .67v12c0 .36.3.66.67.66h2",transform:"translate(2.667 1.333)"}),i.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0h4.67",transform:"translate(5.333 5.333)"}),i.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"m0 7 5.67-7",transform:"translate(7.667 7.667)"}),i.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0h2.67",transform:"translate(5.333 8)"}))))}},30892:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});var r,s=a(6413);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let n=function(e){return s.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},e),r||(r=s.createElement("rect",{x:3,y:3,width:18,height:18,rx:2,ry:2})))}},9935:(e,t,a)=>{"use strict";a.r(t),a.d(t,{McpMarketPage:()=>C});var r,s=a(95344),i=a(70580),n=a(99668),l=a(20925),o=a.n(l),c=a(9127),d=a(32263),m=a(26989),p=a(12670),u=a(30841),_=a(32168),h=a(47572),k=a(6068),g=a(17304),f=a(3729),v=a(85824),x=a(56815),y=a(6413);function j(){return(j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let b=function(e){return y.createElement("svg",j({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},e),r||(r=y.createElement("path",{d:"m5 3 14 9-14 9V3z"})))};var w=a(30892),N=a(99608);function C(){let e=(0,g.s0)(),[t,a]=(0,f.useState)(!1),[r,l]=(0,f.useState)(""),[y,j]=(0,f.useState)({}),[C,S]=(0,f.useState)(),[E,F]=(0,f.useState)(null),[O,L]=(0,f.useState)(),[M,Z]=(0,f.useState)(!1),[H,z]=(0,f.useState)(),[A,P]=(0,f.useState)({}),[D,W]=(0,f.useState)(!0),[R,T]=(0,f.useState)([]),[X,J]=(0,f.useState)({});if((0,f.useEffect)(()=>{(async()=>{let t=await (0,v.mJ)();a(t),t||e(N.y$.Home)})()},[e]),(0,f.useEffect)(()=>{if(!t||!H)return;let e=async()=>{P(await (0,v.Nv)())};e();let a=setInterval(e,1e3);return()=>clearInterval(a)},[t,H]),(0,f.useEffect)(()=>{(async()=>{if(t)try{W(!0);let e=await fetch("https://nextchat.club/mcp/list");if(!e.ok)throw Error("Failed to load preset servers");let t=await e.json();T(t?.data??[])}catch(e){console.error("Failed to load preset servers:",e),(0,k.CF)("Failed to load preset servers")}finally{W(!1)}})()},[t]),(0,f.useEffect)(()=>{(async()=>{if(t)try{Z(!0);let e=await (0,v.Hv)();z(e);let t=await (0,v.Nv)();P(t)}catch(e){console.error("Failed to load initial s