1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7165],{4715:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(5155);function n(){return(0,r.jsx)("span",{className:"px-2 py-0.5 bg-purple-500/10 border border-purple-500/20 rounded-md text-[10px] text-purple-400/80 font-mono uppercase tracking-wider",children:"Tribute"})}},7254:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(5155),n=s(2115),i=s(2619),a=s.n(i),l=s(4715);let o=["bg-orange-500/20 text-orange-400","bg-red-500/20 text-red-400","bg-amber-500/20 text-amber-400","bg-rose-500/20 text-rose-400","bg-pink-500/20 text-pink-400","bg-violet-500/20 text-violet-400","bg-blue-500/20 text-blue-400","bg-emerald-500/20 text-emerald-400"];function c(e){let t=0;for(let s=0;s<e.length;s++)t=e.charCodeAt(s)+((t<<5)-t);return o[Math.abs(t)%o.length]}function d(){let[e,t]=(0,n.useState)([]),[s,i]=(0,n.useState)([]),[o,d]=(0,n.useState)([]),[h,x]=(0,n.useState)([]),[m,u]=(0,n.useState)(!0),[p,b]=(0,n.useState)(!0),[g,w]=(0,n.useState)(null),[f,j]=(0,n.useState)("personal"),[v,N]=(0,n.useState)(""),[k,y]=(0,n.useState)(""),[C,L]=(0,n.useState)(1),[S,A]=(0,n.use
1State)(1);(0,n.useEffect)(()=>{U(),M()},[]),(0,n.useEffect)(()=>{""===v.trim()?i(e):i(e.filter(e=>B(e.name,e.username).toLowerCase().includes(v.toLowerCase())||e.username.toLowerCase().includes(v.toLowerCase()))),L(1)},[v,e]),(0,n.useEffect)(()=>{""===k.trim()?x(o):x(o.filter(e=>e.businessName.toLowerCase().includes(k.toLowerCase())||e.businessUsername.toLowerCase().includes(k.toLowerCase()))),A(1)},[k,o]);let U=async()=>{try{let s=await fetch("/api/get-profiles"),r=await s.json();if(s.ok){var e;let s=(null==(e=r.profiles)?void 0:e.reduce((e,t)=>(e.find(e=>e.username===t.username)||e.push(t),e),[]))||[];t(s),i(s)}else w("Failed to fetch profiles")}catch(e){console.error("Error fetching profiles:",e),w("An unexpected error occurred")}finally{u(!1)}},M=async()=>{try{let t=await fetch("/api/get-business-agents"),s=await t.json();if(t.ok){var e;let t=(null==(e=s.businessAgents)?void 0:e.reduce((e,t)=>(e.find(e=>e.businessUsername===t.businessUsername)||e.push(t),e),[]))||[];d(t),x(t)}else console.error("Failed to fetch business agents:",s.error)}catch(e){console.error("Error fetching business agents:",e)}finally{b(!1)}},_=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),B=(e,t)=>e||t,E=Math.ceil(s.length/24),P=Math.ceil(h.length/24),D=s.slice((C-1)*24,24*C),F=h.slice((S-1)*24,24*S),T=e=>{let{page:t,totalPages:s,onPageChange:n}=e;if(s<=1)return null;let i=[];for(let e=1;e<=s;e++)1===e||e===s||e>=t-1&&e<=t+1?i.push(e):"..."!==i[i.length-1]&&i.push("...");return(0,r.jsxs)("div",{className:"flex items-center justify-center gap-1 mt-12",children:[(0,r.jsx)("button",{onClick:()=>n(t-1),disabled:1===t,className:"px-3 py-2 text-sm font-mono text-white/50 hover:text-white/70 disabled:opacity-20 disabled:cursor-not-allowed transition-colors",children:"<-"}),i.map((e,s)=>"string"==typeof e?(0,r.jsx)("span",{className:"px-2 py-2 text-sm text-white/35 font-mono",children:"..."},"ellipsis-".concat(s)):(0,r.jsx)("button",{onClick:()=>n(e),className:"px-3 py-2 text-sm font-mono rounded-md transition-colors ".concat(e===t?"bg-white text-black font-semibold":"text-white/50 hover:text-white/80 hover:bg-white/5"),children:e},e)),(0,r.jsx)("button",{onClick:()=>n(t+1),disabled:t===s,className:"px-3 py-2 text-sm font-mono text-white/50 hover:text-white/70 disabled:opacity-20 disabled:cursor-not-allowed transition-colors",children:"->"})]})};return m||p?(0,r.jsx)("main",{className:"min-h-screen bg-black text-white flex items-center justify-center",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-2 border-white/10 border-t-orange-500 mx-auto"}),(0,r.jsx)("p",{className:"mt-4 text-white/55 text-sm",children:"Loading agents..."})]})}):g?(0,r.jsx)("main",{className:"min-h-screen bg-black text-white flex items-center justify-center",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-white/60 mb-4",children:g}),(0,r.jsx)("button",{onClick:U,className:"px-5 py-2 bg-white text-black rounded-md text-sm font-medium hover:bg-white/90 transition-colors",children:"Try Again"})]})}):(0,r.jsxs)("main",{className:"min-h-screen bg-black text-white",children:[(0,r.jsxs)("div",{className:"relative overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-orange-950/20 via-red-950/10 to-transparent pointer-events-none"}),(0,r.jsx)("div",{className:"absolute top-0 right-0 w-96 h-96 bg-
1orange-500/5 rounded-full blur-3xl pointer-events-none"}),(0,r.jsxs)("div",{className:"relative pt-12 sm:pt-16 pb-10 px-6 sm:px-10 md:px-16 lg:px-24",children:[(0,r.jsx)(a(),{href:"/",className:"inline-flex items-center text-sm text-white/40 hover:text-white/70 transition-colors mb-10 font-mono",children:"<- Back"}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-6 mb-8",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-light text-white mb-3",children:"Agents"}),(0,r.jsx)("p",{className:"text-base sm:text-lg text-white/55 max-w-xl",children:"Chat with personal AI assistants and business support agents"})]}),(0,r.jsxs)(a(),{href:"/create-profile",className:"inline-flex items-center gap-2 px-5 py-2.5 bg-white text-black rounded-md text-sm font-medium hover:bg-white/90 transition-colors flex-shrink-0",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Create Agent"]})]}),(0,r.jsxs)("div",{className:"flex gap-6 text-sm",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),(0,r.jsxs)("span",{className:"text-white/70",children:[e.length," personal"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-emerald-500"}),(0,r.jsxs)("span",{className:"text-white/70",children:[o.length," business"]})]})]})]})]}),(0,r.jsx)("div",{className:"px-6 sm:px-10 md:px-16 lg:px-24 mb-6",children:(0,r.jsx)("div",{className:"flex items-center gap-3",children:(0,r.jsxs)(a(),{href:"/beyond",className:"inline-flex items-center gap-2 px-4 py-2 bg-white/[0.04] border border-white/[0.08] hover:border-white/20 hover:bg-white/[0.07] rounded-md text-sm text-white/60 hover:text-white/90 transition-all",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"})}),"Beyond"]})})}),(0,r.jsxs)("div",{className:"px-6 sm:px-10 md:px-16 lg:px-24 mb-8",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 mb-6 bg-white/[0.04] rounded-lg p-1 w-fit",children:[(0,r.jsxs)("button",{onClick:()=>j("personal"),className:"px-4 py-2 text-sm font-medium rounded-md transition-all ".concat("personal"===f?"bg-white text-black":"text-white/50 hover:text-white/80"),children:["Personal (",s.length,")"]}),(0,r.jsxs)("button",{onClick:()=>j("business"),className:"px-4 py-2 text-sm font-medium rounded-md transition-all ".concat("business"===f?"bg-white text-black":"text-white/50 hover:text-white/80"),children:["Business (",h.length,")"]})]}),(0,r.jsxs)("div",{className:"relative max-w-sm",children:[(0,r.jsx)("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),(0,r.jsx)("input",{type:"text",placeholder:"personal"===f?"Search personal agents...":"Search business agents...",value:"personal"===f?v:k,onChange:e=>"personal"===f?N(e.target.value):y(e.target.value),className:"w-full pl-10 pr-4 py-2.5 bg-white/[0.05] border border-white/10 hover:border-white/20 focus:border-white/30 rounded-md text-white/90 placeholder-white/30 text-sm focus:outline-none transition-colors"})]})]}),(0,r.jsxs)("div",{className:"px-6 sm:px-10 md:px-16 lg:px-24 pb-20",children:["personal"===f&&(0,r.jsx)("div",{children:D.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:D.map((e,t)=>{var s,n;return(0,r.jsxs)("div",{className:"group p-5 bg-white/[0.03] border border-white/[0.08] hover:border-white/20 hover:bg-white/[0.05] rounded-lg transition-all duration-200",children:[(0,r.jsxs)("div",{className:"flex items-center mb-4",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center font-mono text-sm font-semibold mr-3 flex-shrink-0 ".concat(c(e.username)),children:(s=e.name,n=e.username,s&&s.length>0?s.charAt(0).toUpperCase():n.charAt(0).toUpperCase())}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h3",{className:"font-medium text-white text-sm truncate",children:B(e.name,e.username)}),(0,r.jsxs)("p",{className:"text-white/45 text-xs font-mono",children:["@",e.username]})]}),e.isTribute&&(0,r.jsx)(l.A,{})]}),(0,r.jsxs)("p",{className:"text-white/35 text-xs mb-4",children:["Joined ",_(e.created_at)]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(a(),{href:"/chat/".concat(e.username),className:"flex-1 inline-flex items-center justify-center px-3 py-2 bg-white/[0.05] border border-white/10 hover:border-white/20 text-white/50 hover:text-white/80 rounded-md text-xs font-semibold transition-colors",children:"Chat"}),(0,r.jsx)("a",{href:"https://list39.org/@".concat(e.username,".json"),target:"_blank",rel:"noopener noreferrer",className:"px-3 py-2 bg-white/[0.05] border border-white/10 hover:border-white/20 rounded-md text-white/50 hover:text-white/80 text-xs font-mono transition-colors",title:"Agent Facts",children:".json"})]})]},"".concat(e.username,"-").concat(t))})}),(0,r.jsx)(T,{page:C,totalPages:E,onPageChange:L})]}):(0,r.jsxs)("div",{className:"py-20 text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-white/[0.05] flex items-center justify-center mx-auto mb-4",children:(0,r.jsx)("svg",{className:"w-7 h-7 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),(0,r.jsx)("p",{className:"text-white/50 text-sm mb-6",children:"No personal agents found"}),(0,r.jsx)(a(),{href:"/create-profile",className:"inline-flex items-center px-5 py-2.5 bg-white text-black rounded-md text-sm font-medium hover:bg-white/90 transition-colors",children:"Create Agent"})]})}),"business"===f&&(0,r.jsx)("div",{children:F.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:F.map((e,t)=>(0,r.jsxs)("div",{className:"group p-5 bg-white/[0.03] border border-white/[0.08] hover:border-white/20 hover:bg-white/[0.05] rounded-lg transition-all duration-200",children:[(0,r.jsxs)("div",{className:"flex items-center mb-4",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center font-mono text-sm font-semibold mr-3 flex-shrink-0 ".concat(c(e.businessUsername)),children:e.businessName.charAt(0).toUpperCase()}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("h3",{className:"font-medium text-white text-sm truncate",children:e.businessName}),(0,r.jsxs)("p",{className:"text-white/45 text-xs font-mono",children:["@",e.businessUsername]})]}),[...o].sort((e,t)=>
1new Date(e.created_at).getTime()-new Date(t.created_at).getTime()).slice(0,50).map(e=>e.businessUsername).includes(e.businessUsername)&&(0,r.jsx)("span",{className:"px-2 py-0.5 bg-orange-500/10 border border-orange-500/20 rounded-md text-[10px] text-orange-400/80 font-mono uppercase tracking-wider",children:"Demo"})]}),(0,r.jsxs)("p",{className:"text-white/35 text-xs mb-4",children:["Joined ",_(e.created_at)]}),(0,r.jsx)(a(),{href:"/chat/".concat(e.businessUsername),className:"w-full inline-flex items-center justify-center px-3 py-2 bg-white text-black rounded-md text-xs font-semibold transition-colors flex-1 bg-white/[0.05] border border-white/10 hover:border-white/20 text-white/50 hover:text-white/80",children:"Contact Support"})]},"".concat(e.businessUsername,"-").concat(t)))}),(0,r.jsx)(T,{page:S,totalPages:P,onPageChange:A})]}):(0,r.jsxs)("div",{className:"py-20 text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-white/[0.05] flex items-center justify-center mx-auto mb-4",children:(0,r.jsx)("svg",{className:"w-7 h-7 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})}),(0,r.jsx)("p",{className:"text-white/50 text-sm mb-6",children:"No business agents found"}),(0,r.jsx)(a(),{href:"/dashboard/business",className:"inline-flex items-center px-5 py-2.5 bg-white text-black rounded-md text-sm font-medium hover:bg-white/90 transition-colors",children:"Create Business Agent"})]})})]})]})}},7587:(e,t,s)=>{Promise.resolve().then(s.bind(s,7254))}},e=>{e.O(0,[2619,8441,1255,7358],()=>e(e.s=7587)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.