@poolzin/poolbot-office 0.1.1 โ 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-BewsfHKI.js +32 -0
- package/dist/assets/index-BewsfHKI.js.map +1 -0
- package/dist/assets/react-vendor-Cl-1Jdvm.js +2 -0
- package/dist/assets/react-vendor-Cl-1Jdvm.js.map +1 -0
- package/dist/assets/three-vendor--jG-wMmE.js +4745 -0
- package/dist/assets/three-vendor--jG-wMmE.js.map +1 -0
- package/dist/assets/ui-vendor-Cl-1Jdvm.js +2 -0
- package/dist/assets/ui-vendor-Cl-1Jdvm.js.map +1 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/index-Dt28lMGE.js +0 -19
- package/dist/assets/index-Dt28lMGE.js.map +0 -1
- package/dist/assets/react-vendor-yPv9nvZX.js +0 -2
- package/dist/assets/react-vendor-yPv9nvZX.js.map +0 -1
- package/dist/assets/three-vendor-K0SwQi48.js +0 -4326
- package/dist/assets/three-vendor-K0SwQi48.js.map +0 -1
- package/dist/assets/ui-vendor-yPv9nvZX.js +0 -2
- package/dist/assets/ui-vendor-yPv9nvZX.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-vendor-Cl-1Jdvm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.html
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<meta name="description" content="PoolBot Office - Visual monitoring & management frontend for PoolBot Multi-Agent system" />
|
|
8
8
|
<meta name="theme-color" content="#3498DB" />
|
|
9
9
|
<title>PoolBot Office</title>
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/three-vendor-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-BewsfHKI.js"></script>
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/three-vendor--jG-wMmE.js">
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-CBgEz-kd.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{j as e,r as u,R as j,u as C,D as v,E as S,C as k,a as w,P as E,O as B,S as D,b as z,c as F}from"./three-vendor-K0SwQi48.js";(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))d(l);new MutationObserver(l=>{for(const n of l)if(n.type==="childList")for(const s of n.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&d(s)}).observe(document,{childList:!0,subtree:!0});function a(l){const n={};return l.integrity&&(n.integrity=l.integrity),l.referrerPolicy&&(n.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?n.credentials="include":l.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function d(l){if(l.ep)return;l.ep=!0;const n=a(l);fetch(l.href,n)}})();const b=({stats:r,alerts:c,onDismissAlert:a,onNavigate:d})=>{const l=({title:s,value:t,subtitle:p,icon:i,color:o,onClick:x})=>e.jsxs("div",{onClick:x,style:{backgroundColor:"white",borderRadius:"12px",padding:"20px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",cursor:x?"pointer":"default",transition:"transform 0.2s, box-shadow 0.2s"},onMouseEnter:g=>{x&&(g.currentTarget.style.transform="translateY(-4px)",g.currentTarget.style.boxShadow="0 4px 16px rgba(0, 0, 0, 0.15)")},onMouseLeave:g=>{x&&(g.currentTarget.style.transform="translateY(0)",g.currentTarget.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.1)")},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"12px"},children:[e.jsx("span",{style:{fontSize:"24px",marginRight:"12px"},children:i}),e.jsx("span",{style:{fontWeight:"bold",color:"#2C3E50",fontSize:"14px"},children:s})]}),e.jsx("div",{style:{fontSize:"32px",fontWeight:"bold",color:o,marginBottom:"4px"},children:t}),p&&e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D"},children:p})]}),n=({alert:s})=>{const p={info:{bg:"#D6EAF8",border:"#3498DB",text:"#2874A6"},warning:{bg:"#FDEBD0",border:"#F39C12",text:"#B9770E"},error:{bg:"#FADBD8",border:"#E74C3C",text:"#C0392B"},success:{bg:"#D5F5E3",border:"#27AE60",text:"#1E8449"}}[s.type];return e.jsxs("div",{style:{backgroundColor:p.bg,borderLeft:`4px solid ${p.border}`,padding:"12px 16px",borderRadius:"8px",marginBottom:"12px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:"bold",color:p.text,marginBottom:"4px"},children:s.title}),e.jsx("div",{style:{fontSize:"14px",color:p.text},children:s.message})]}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[s.actionable&&s.onAction&&e.jsx("button",{onClick:s.onAction,style:{backgroundColor:p.border,color:"white",border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},children:"Action"}),e.jsx("button",{onClick:()=>a(s.id),style:{background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:p.text,padding:"0 4px"},children:"โ"})]})]})};return e.jsxs("div",{style:{padding:"24px",maxWidth:"1400px",margin:"0 auto"},children:[e.jsxs("div",{style:{marginBottom:"24px"},children:[e.jsx("h1",{style:{fontSize:"28px",fontWeight:"bold",color:"#2C3E50",margin:0},children:"Dashboard"}),e.jsx("p",{style:{color:"#7F8C8D",margin:"8px 0 0 0"},children:"Overview of your PoolBot system"})]}),c.length>0&&e.jsx("div",{style:{marginBottom:"24px"},children:c.map(s=>e.jsx(n,{alert:s},s.id))}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(250px, 1fr))",gap:"20px",marginBottom:"24px"},children:[e.jsx(l,{title:"Total Agents",value:r.totalAgents,subtitle:`${r.activeAgents} active`,icon:"๐ค",color:"#3498DB",onClick:()=>d("agents")}),e.jsx(l,{title:"Channels",value:r.totalChannels,subtitle:`${r.connectedChannels} connected`,icon:"๐ฌ",color:"#2ECC71",onClick:()=>d("channels")}),e.jsx(l,{title:"Skills",value:r.enabledSkills,subtitle:`${r.totalSkills} available`,icon:"โก",color:"#F39C12",onClick:()=>d("skills")}),e.jsx(l,{title:"Cron Jobs",value:r.activeCronJobs,subtitle:`${r.totalCronJobs} total`,icon:"โฐ",color:"#9B59B6",onClick:()=>d("cron")}),e.jsx(l,{title:"Messages Today",value:r.messagesToday.toLocaleString(),icon:"๐ญ",color:"#1ABC9C",onClick:()=>d("chat")}),e.jsx(l,{title:"Tokens Today",value:r.tokensToday.toLocaleString(),icon:"๐ซ",color:"#E74C3C",onClick:()=>d("settings")})]}),e.jsxs("div",{style:{marginTop:"24px"},children:[e.jsx("h2",{style:{fontSize:"20px",fontWeight:"bold",color:"#2C3E50",marginBottom:"16px"},children:"Quick Actions"}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[{icon:"โ",label:"Add Agent",page:"agents"},{icon:"๐",label:"Connect Channel",page:"channels"},{icon:"๐ฆ",label:"Install Skill",page:"skills"},{icon:"โฑ๏ธ",label:"Create Cron Job",page:"cron"},{icon:"๐พ",label:"Backup Config",page:"settings"},{icon:"๐",label:"View Logs",page:"logs"}].map(s=>e.jsxs("button",{onClick:()=>d(s.page),style:{backgroundColor:"white",border:"1px solid #E0E0E0",borderRadius:"8px",padding:"12px 16px",display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",transition:"all 0.2s",textAlign:"left"},onMouseEnter:t=>{t.currentTarget.style.backgroundColor="#F5F5F5",t.currentTarget.style.borderColor="#3498DB"},onMouseLeave:t=>{t.currentTarget.style.backgroundColor="white",t.currentTarget.style.borderColor="#E0E0E0"},children:[e.jsx("span",{style:{fontSize:"20px"},children:s.icon}),e.jsx("span",{style:{fontWeight:"500",color:"#2C3E50"},children:s.label})]},s.label))})]}),e.jsxs("div",{style:{marginTop:"24px",padding:"16px",backgroundColor:"#F8F9FA",borderRadius:"8px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{style:{fontSize:"14px",color:"#7F8C8D"},children:[e.jsxs("span",{style:{marginRight:"16px"},children:["โฑ๏ธ Uptime: ",Math.floor(r.uptime/3600),"h ",Math.floor(r.uptime%3600/60),"m"]}),e.jsxs("span",{children:["โ ๏ธ Errors: ",r.errorCount]})]}),e.jsx("button",{onClick:()=>window.location.reload(),style:{backgroundColor:"#3498DB",color:"white",border:"none",padding:"8px 16px",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"๐ Refresh"})]})]})},A=({agents:r,onCreateAgent:c,onDeleteAgent:a,onSelectAgent:d})=>{const[l,n]=u.useState(!1),[s,t]=u.useState(""),[p,i]=u.useState("gpt-4o"),o=h=>({idle:"#95A5A6",working:"#3498DB",speaking:"#2ECC71",error:"#E74C3C",offline:"#BDC3C7"})[h],x=h=>({idle:"๐ด",working:"๐ป",speaking:"๐ฌ",error:"โ",offline:"โซ"})[h],g=()=>{s.trim()&&(c(s.trim(),p),t(""),n(!1))};return e.jsxs("div",{style:{padding:"24px",maxWidth:"1400px",margin:"0 auto"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[e.jsxs("div",{children:[e.jsx("h1",{style:{fontSize:"28px",fontWeight:"bold",color:"#2C3E50",margin:0},children:"Agents"}),e.jsxs("p",{style:{color:"#7F8C8D",margin:"8px 0 0 0"},children:[r.length," agents โข ",r.filter(h=>h.status==="working").length," active"]})]}),e.jsx("button",{onClick:()=>n(!0),style:{backgroundColor:"#3498DB",color:"white",border:"none",padding:"12px 24px",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:"500"},children:"โ Add Agent"})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:"16px"},children:r.map(h=>e.jsxs("div",{onClick:()=>d(h.id),style:{backgroundColor:"white",borderRadius:"12px",padding:"20px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",cursor:"pointer",transition:"all 0.2s",border:"2px solid transparent"},onMouseEnter:f=>{f.currentTarget.style.transform="translateY(-4px)",f.currentTarget.style.boxShadow="0 4px 16px rgba(0, 0, 0, 0.15)",f.currentTarget.style.borderColor="#3498DB"},onMouseLeave:f=>{f.currentTarget.style.transform="translateY(0)",f.currentTarget.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.1)",f.currentTarget.style.borderColor="transparent"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("span",{style:{fontSize:"32px"},children:"๐ค"}),e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:"bold",color:"#2C3E50",fontSize:"16px"},children:h.name}),e.jsxs("div",{style:{fontSize:"12px",color:o(h.status),display:"flex",alignItems:"center",gap:"4px"},children:[e.jsx("span",{children:x(h.status)}),e.jsx("span",{children:h.status})]})]})]}),e.jsx("button",{onClick:f=>{f.stopPropagation(),a(h.id)},style:{background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"#E74C3C",padding:"4px"},children:"๐๏ธ"})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",paddingTop:"16px",borderTop:"1px solid #F0F0F0"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D",marginBottom:"4px"},children:"Model"}),e.jsx("div",{style:{fontWeight:"500",color:"#2C3E50",fontSize:"14px"},children:h.model})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D",marginBottom:"4px"},children:"Sessions"}),e.jsx("div",{style:{fontWeight:"500",color:"#2C3E50",fontSize:"14px"},children:h.sessionCount})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D",marginBottom:"4px"},children:"Messages"}),e.jsx("div",{style:{fontWeight:"500",color:"#2C3E50",fontSize:"14px"},children:h.messageCount.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D",marginBottom:"4px"},children:"Last Active"}),e.jsx("div",{style:{fontWeight:"500",color:"#2C3E50",fontSize:"14px"},children:h.lastActiveAt?new Date(h.lastActiveAt).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):"Never"})]})]})]},h.id))}),r.length===0&&e.jsxs("div",{style:{textAlign:"center",padding:"60px 20px",color:"#7F8C8D"},children:[e.jsx("div",{style:{fontSize:"64px",marginBottom:"16px"},children:"๐ค"}),e.jsx("div",{style:{fontSize:"18px",fontWeight:"bold",marginBottom:"8px"},children:"No agents yet"}),e.jsx("div",{style:{marginBottom:"16px"},children:"Create your first agent to get started"}),e.jsx("button",{onClick:()=>n(!0),style:{backgroundColor:"#3498DB",color:"white",border:"none",padding:"12px 24px",borderRadius:"8px",cursor:"pointer",fontSize:"14px"},children:"โ Create Agent"})]}),l&&e.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onClick:()=>n(!1),children:e.jsxs("div",{onClick:h=>h.stopPropagation(),style:{backgroundColor:"white",borderRadius:"12px",padding:"24px",width:"400px",maxWidth:"90vw"},children:[e.jsx("h2",{style:{fontSize:"20px",fontWeight:"bold",marginBottom:"16px"},children:"Create New Agent"}),e.jsxs("div",{style:{marginBottom:"16px"},children:[e.jsx("label",{style:{display:"block",fontWeight:"500",marginBottom:"8px",color:"#2C3E50"},children:"Agent Name"}),e.jsx("input",{type:"text",value:s,onChange:h=>t(h.target.value),placeholder:"My Assistant",style:{width:"100%",padding:"10px 12px",border:"1px solid #E0E0E0",borderRadius:"6px",fontSize:"14px",outline:"none"}})]}),e.jsxs("div",{style:{marginBottom:"24px"},children:[e.jsx("label",{style:{display:"block",fontWeight:"500",marginBottom:"8px",color:"#2C3E50"},children:"Model"}),e.jsxs("select",{value:p,onChange:h=>i(h.target.value),style:{width:"100%",padding:"10px 12px",border:"1px solid #E0E0E0",borderRadius:"6px",fontSize:"14px",outline:"none",backgroundColor:"white"},children:[e.jsx("option",{value:"gpt-4o",children:"GPT-4o"}),e.jsx("option",{value:"gpt-4o-mini",children:"GPT-4o Mini"}),e.jsx("option",{value:"claude-3-5-sonnet",children:"Claude 3.5 Sonnet"}),e.jsx("option",{value:"claude-3-opus",children:"Claude 3 Opus"})]})]}),e.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[e.jsx("button",{onClick:()=>n(!1),style:{backgroundColor:"#E0E0E0",color:"#2C3E50",border:"none",padding:"10px 20px",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"Cancel"}),e.jsx("button",{onClick:g,disabled:!s.trim(),style:{backgroundColor:s.trim()?"#3498DB":"#BDC3C7",color:"white",border:"none",padding:"10px 20px",borderRadius:"6px",cursor:s.trim()?"pointer":"not-allowed",fontSize:"14px"},children:"Create Agent"})]})]})})]})},R=({channels:r,onConnect:c,onDisconnect:a,onConfigure:d})=>{const l=s=>({telegram:"โ๏ธ",discord:"๐ฎ",slack:"๐ผ",whatsapp:"๐ฑ",signal:"๐"})[s],n=s=>({connected:"#2ECC71",disconnected:"#95A5A6",connecting:"#F39C12",error:"#E74C3C"})[s];return e.jsxs("div",{style:{padding:"24px",maxWidth:"1400px",margin:"0 auto"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[e.jsxs("div",{children:[e.jsx("h1",{style:{fontSize:"28px",fontWeight:"bold",color:"#2C3E50",margin:0},children:"Channels"}),e.jsxs("p",{style:{color:"#7F8C8D",margin:"8px 0 0 0"},children:[r.length," channels โข"," ",r.filter(s=>s.status==="connected").length," connected"]})]}),e.jsx("button",{style:{backgroundColor:"#3498DB",color:"white",border:"none",padding:"12px 24px",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:"500"},children:"โ Add Channel"})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gap:"16px"},children:r.map(s=>e.jsxs("div",{style:{backgroundColor:"white",borderRadius:"12px",padding:"20px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",border:`2px solid ${s.status==="connected"?"#2ECC71":"transparent"}`},children:[e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx("span",{style:{fontSize:"32px"},children:l(s.type)}),e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:"bold",color:"#2C3E50",fontSize:"16px"},children:s.name}),e.jsxs("div",{style:{fontSize:"12px",color:n(s.status),display:"flex",alignItems:"center",gap:"4px"},children:[e.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:n(s.status),borderRadius:"50%"}}),e.jsx("span",{children:s.status})]})]})]})}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:"16px",borderTop:"1px solid #F0F0F0",marginBottom:"16px"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D",marginBottom:"4px"},children:"Messages"}),e.jsx("div",{style:{fontWeight:"500",color:"#2C3E50"},children:s.messageCount.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D",marginBottom:"4px"},children:"Last Seen"}),e.jsx("div",{style:{fontWeight:"500",color:"#2C3E50"},children:s.lastSeen?new Date(s.lastSeen).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):"Never"})]})]}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[s.status==="connected"?e.jsx("button",{onClick:()=>a(s.id),style:{flex:1,backgroundColor:"#E74C3C",color:"white",border:"none",padding:"10px",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"Disconnect"}):e.jsx("button",{onClick:()=>c(s.id),style:{flex:1,backgroundColor:"#2ECC71",color:"white",border:"none",padding:"10px",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"Connect"}),e.jsx("button",{onClick:()=>d(s.id),style:{flex:1,backgroundColor:"#3498DB",color:"white",border:"none",padding:"10px",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"Configure"})]})]},s.id))}),r.length===0&&e.jsxs("div",{style:{textAlign:"center",padding:"60px 20px",color:"#7F8C8D"},children:[e.jsx("div",{style:{fontSize:"64px",marginBottom:"16px"},children:"๐ฌ"}),e.jsx("div",{style:{fontSize:"18px",fontWeight:"bold",marginBottom:"8px"},children:"No channels configured"}),e.jsx("div",{children:"Add a channel to start communicating with your agents"})]})]})},M=({skills:r,onInstall:c,onUninstall:a})=>{const[d,l]=u.useState(""),[n,s]=u.useState("all"),t=["all",...Array.from(new Set(r.map(i=>i.category)))],p=r.filter(i=>{const o=i.name.toLowerCase().includes(d.toLowerCase())||i.description.toLowerCase().includes(d.toLowerCase()),x=n==="all"||i.category===n;return o&&x});return e.jsxs("div",{style:{padding:"24px",maxWidth:"1400px",margin:"0 auto"},children:[e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:e.jsxs("div",{children:[e.jsx("h1",{style:{fontSize:"28px",fontWeight:"bold",color:"#2C3E50",margin:0},children:"Skills Marketplace"}),e.jsxs("p",{style:{color:"#7F8C8D",margin:"8px 0 0 0"},children:[r.filter(i=>i.installed).length," installed โข ",r.length," available"]})]})}),e.jsxs("div",{style:{display:"flex",gap:"12px",marginBottom:"24px",flexWrap:"wrap"},children:[e.jsx("input",{type:"text",placeholder:"Search skills...",value:d,onChange:i=>l(i.target.value),style:{flex:"1",minWidth:"200px",padding:"10px 14px",border:"1px solid #E0E0E0",borderRadius:"8px",fontSize:"14px",outline:"none"}}),e.jsx("select",{value:n,onChange:i=>s(i.target.value),style:{padding:"10px 14px",border:"1px solid #E0E0E0",borderRadius:"8px",fontSize:"14px",outline:"none",backgroundColor:"white",cursor:"pointer"},children:t.map(i=>e.jsx("option",{value:i,children:i==="all"?"All Categories":i},i))})]}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:"16px"},children:p.map(i=>e.jsxs("div",{style:{backgroundColor:"white",borderRadius:"12px",padding:"20px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"12px"},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:"bold",color:"#2C3E50",fontSize:"16px",marginBottom:"4px"},children:i.name}),e.jsxs("div",{style:{fontSize:"12px",color:"#7F8C8D",marginBottom:"8px"},children:["v",i.version," โข by ",i.author]})]}),e.jsx("span",{style:{backgroundColor:i.installed?"#D5F5E3":"#F0F0F0",color:i.installed?"#27AE60":"#7F8C8D",padding:"4px 8px",borderRadius:"4px",fontSize:"12px",fontWeight:"500"},children:i.installed?"โ Installed":"Available"})]}),e.jsx("p",{style:{fontSize:"14px",color:"#7F8C8D",marginBottom:"16px",flex:1},children:i.description}),e.jsxs("div",{style:{display:"flex",gap:"16px",fontSize:"12px",color:"#7F8C8D",marginBottom:"16px"},children:[e.jsxs("span",{children:["โฌ๏ธ ",i.downloads.toLocaleString()]}),e.jsxs("span",{children:["โญ ",i.rating.toFixed(1)]}),e.jsxs("span",{children:["๐ฆ ",i.category]})]}),e.jsx("button",{onClick:()=>i.installed?a(i.id):c(i.id),style:{width:"100%",padding:"10px",backgroundColor:i.installed?"#E74C3C":"#3498DB",color:"white",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"14px",fontWeight:"500"},children:i.installed?"๐๏ธ Uninstall":"๐ฆ Install"})]},i.id))}),p.length===0&&e.jsxs("div",{style:{textAlign:"center",padding:"60px 20px",color:"#7F8C8D"},children:[e.jsx("div",{style:{fontSize:"64px",marginBottom:"16px"},children:"๐"}),e.jsx("div",{style:{fontSize:"18px",fontWeight:"bold",marginBottom:"8px"},children:"No skills found"}),e.jsx("div",{children:"Try adjusting your search or filters"})]})]})},W=({jobs:r,onCreateJob:c,onDeleteJob:a,onToggleJob:d,onRunNow:l})=>e.jsxs("div",{style:{padding:"24px",maxWidth:"1400px",margin:"0 auto"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[e.jsxs("div",{children:[e.jsx("h1",{style:{fontSize:"28px",fontWeight:"bold",color:"#2C3E50",margin:0},children:"Scheduled Jobs"}),e.jsxs("p",{style:{color:"#7F8C8D",margin:"8px 0 0 0"},children:[r.length," jobs โข ",r.filter(n=>n.enabled).length," active"]})]}),e.jsx("button",{onClick:()=>c({name:"New Job",schedule:"0 * * * *",agent:"default",command:'echo "Hello"',enabled:!0}),style:{backgroundColor:"#3498DB",color:"white",border:"none",padding:"12px 24px",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:"500"},children:"โ Create Job"})]}),e.jsxs("div",{style:{backgroundColor:"white",borderRadius:"12px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",overflow:"hidden"},children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"2fr 1.5fr 1.5fr 1fr 1fr 1fr",padding:"16px 20px",backgroundColor:"#F8F9FA",borderBottom:"1px solid #E0E0E0",fontWeight:"bold",fontSize:"12px",color:"#7F8C8D",textTransform:"uppercase"},children:[e.jsx("div",{children:"Name"}),e.jsx("div",{children:"Schedule"}),e.jsx("div",{children:"Agent"}),e.jsx("div",{children:"Last Run"}),e.jsx("div",{children:"Success/Fail"}),e.jsx("div",{children:"Actions"})]}),r.map(n=>e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"2fr 1.5fr 1.5fr 1fr 1fr 1fr",padding:"16px 20px",borderBottom:"1px solid #F0F0F0",alignItems:"center",opacity:n.enabled?1:.6},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:"500",color:"#2C3E50",marginBottom:"4px"},children:n.name}),e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D"},children:n.command})]}),e.jsx("div",{style:{fontFamily:"monospace",fontSize:"13px",color:"#2C3E50"},children:n.schedule}),e.jsx("div",{style:{color:"#2C3E50"},children:n.agent}),e.jsx("div",{style:{fontSize:"13px",color:"#7F8C8D"},children:n.lastRun?new Date(n.lastRun).toLocaleString("pt-BR",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"Never"}),e.jsxs("div",{style:{display:"flex",gap:"8px",fontSize:"13px"},children:[e.jsxs("span",{style:{color:"#27AE60"},children:["โ ",n.successCount]}),e.jsxs("span",{style:{color:"#E74C3C"},children:["โ ",n.failureCount]})]}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>l(n.id),style:{backgroundColor:"#3498DB",color:"white",border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},children:"โถ๏ธ Run"}),e.jsx("button",{onClick:()=>d(n.id,!n.enabled),style:{backgroundColor:n.enabled?"#F39C12":"#27AE60",color:"white",border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},children:n.enabled?"โธ๏ธ Pause":"โถ๏ธ Resume"}),e.jsx("button",{onClick:()=>a(n.id),style:{backgroundColor:"#E74C3C",color:"white",border:"none",padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},children:"๐๏ธ"})]})]},n.id)),r.length===0&&e.jsxs("div",{style:{padding:"60px 20px",textAlign:"center",color:"#7F8C8D"},children:[e.jsx("div",{style:{fontSize:"64px",marginBottom:"16px"},children:"โฐ"}),e.jsx("div",{style:{fontSize:"18px",fontWeight:"bold",marginBottom:"8px"},children:"No scheduled jobs"}),e.jsx("div",{children:"Create your first scheduled job to automate tasks"})]})]})]}),T=({gatewayUrl:r,language:c,theme:a,onGatewayChange:d,onLanguageChange:l,onThemeChange:n,onSave:s})=>{const[t,p]=u.useState(r),[i,o]=u.useState(c),[x,g]=u.useState(a),[h,f]=u.useState(!1),m=()=>{d(t),l(i),n(x),s(),f(!0),setTimeout(()=>f(!1),2e3)};return e.jsxs("div",{style:{padding:"24px",maxWidth:"800px",margin:"0 auto"},children:[e.jsxs("div",{style:{marginBottom:"24px"},children:[e.jsx("h1",{style:{fontSize:"28px",fontWeight:"bold",color:"#2C3E50",margin:0},children:"Settings"}),e.jsx("p",{style:{color:"#7F8C8D",margin:"8px 0 0 0"},children:"Configure your PoolBot preferences"})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[e.jsxs("div",{style:{backgroundColor:"white",borderRadius:"12px",padding:"24px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},children:[e.jsx("h2",{style:{fontSize:"18px",fontWeight:"bold",color:"#2C3E50",marginBottom:"16px"},children:"๐ Gateway Connection"}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontWeight:"500",marginBottom:"8px",color:"#2C3E50"},children:"Gateway URL"}),e.jsx("input",{type:"text",value:t,onChange:y=>p(y.target.value),placeholder:"ws://localhost:18789",style:{width:"100%",padding:"10px 12px",border:"1px solid #E0E0E0",borderRadius:"6px",fontSize:"14px",outline:"none"}}),e.jsx("p",{style:{fontSize:"12px",color:"#7F8C8D",marginTop:"8px"},children:"WebSocket URL for PoolBot Gateway connection"})]})]}),e.jsxs("div",{style:{backgroundColor:"white",borderRadius:"12px",padding:"24px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},children:[e.jsx("h2",{style:{fontSize:"18px",fontWeight:"bold",color:"#2C3E50",marginBottom:"16px"},children:"๐จ Appearance"}),e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("label",{style:{display:"block",fontWeight:"500",marginBottom:"8px",color:"#2C3E50"},children:"Theme"}),e.jsxs("div",{style:{display:"flex",gap:"12px"},children:[e.jsx("button",{onClick:()=>g("light"),style:{flex:1,padding:"12px",backgroundColor:x==="light"?"#3498DB":"#F0F0F0",color:x==="light"?"white":"#2C3E50",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"14px",fontWeight:"500"},children:"โ๏ธ Light"}),e.jsx("button",{onClick:()=>g("dark"),style:{flex:1,padding:"12px",backgroundColor:x==="dark"?"#3498DB":"#F0F0F0",color:x==="dark"?"white":"#2C3E50",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"14px",fontWeight:"500"},children:"๐ Dark"})]})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontWeight:"500",marginBottom:"8px",color:"#2C3E50"},children:"Language"}),e.jsxs("select",{value:i,onChange:y=>o(y.target.value),style:{width:"100%",padding:"10px 12px",border:"1px solid #E0E0E0",borderRadius:"6px",fontSize:"14px",outline:"none",backgroundColor:"white"},children:[e.jsx("option",{value:"pt-BR",children:"๐ง๐ท Portuguรชs (Brasil)"}),e.jsx("option",{value:"en",children:"๐บ๐ธ English"}),e.jsx("option",{value:"es",children:"๐ช๐ธ Espaรฑol"})]})]})]}),e.jsxs("div",{style:{backgroundColor:"white",borderRadius:"12px",padding:"24px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},children:[e.jsx("h2",{style:{fontSize:"18px",fontWeight:"bold",color:"#2C3E50",marginBottom:"16px"},children:"โน๏ธ About"}),e.jsxs("div",{style:{fontSize:"14px",color:"#7F8C8D",lineHeight:"1.8"},children:[e.jsx("div",{children:e.jsx("strong",{children:"PoolBot Office"})}),e.jsx("div",{children:"Version: 0.1.0"}),e.jsx("div",{children:"Build: 2026.3.22"}),e.jsx("div",{style:{marginTop:"12px"},children:"Visual monitoring & management frontend for PoolBot Multi-Agent system"})]})]}),e.jsx("button",{onClick:m,style:{backgroundColor:h?"#27AE60":"#3498DB",color:"white",border:"none",padding:"14px 28px",borderRadius:"8px",cursor:"pointer",fontSize:"14px",fontWeight:"500",width:"100%"},children:h?"โ Saved!":"๐พ Save Settings"})]})]})},L=({x:r,y:c,width:a=120,height:d=80,occupied:l=!1,agentName:n,onClick:s})=>{const t=l?"#4ECDC4":"#95A5A6";return e.jsxs("g",{transform:`translate(${r}, ${c})`,onClick:s,style:{cursor:s?"pointer":"default"},children:[e.jsx("ellipse",{cx:a/2,cy:d+10,rx:a/2,ry:d/4,fill:"rgba(0, 0, 0, 0.2)"}),e.jsx("path",{d:`M 0,${d/2} L ${a/2},0 L ${a},${d/2} L ${a/2},${d} Z`,fill:t,stroke:"#2C3E50",strokeWidth:"2"}),e.jsx("line",{x1:a*.25,y1:d/2,x2:a*.25,y2:d+5,stroke:"#2C3E50",strokeWidth:"2"}),e.jsx("line",{x1:a*.75,y1:d/2,x2:a*.75,y2:d+5,stroke:"#2C3E50",strokeWidth:"2"}),e.jsx("rect",{x:a/2-20,y:d/4-15,width:"40",height:"25",fill:"#34495E",stroke:"#2C3E50",strokeWidth:"1"}),e.jsx("rect",{x:a/2-18,y:d/4-13,width:"36",height:"21",fill:l?"#2ECC71":"#7F8C8D"}),n&&e.jsx("text",{x:a/2,y:-10,textAnchor:"middle",fontSize:"12",fill:"#2C3E50",fontWeight:"bold",children:n}),l&&e.jsx("circle",{cx:a-10,cy:10,r:"6",fill:"#2ECC71",stroke:"#27AE60",strokeWidth:"1"})]})},I=({x:r,y:c,occupied:a=!1,color:d="#E74C3C",rotation:l=0,onClick:n})=>e.jsxs("g",{transform:`translate(${r}, ${c}) rotate(${l})`,onClick:n,style:{cursor:n?"pointer":"default"},children:[e.jsx("ellipse",{cx:"0",cy:"25",rx:"20",ry:"8",fill:"rgba(0, 0, 0, 0.2)"}),e.jsx("path",{d:"M -15,15 L 0,5 L 15,15 L 0,25 Z",fill:"#34495E",stroke:"#2C3E50",strokeWidth:"1"}),e.jsx("rect",{x:"-3",y:"-10",width:"6",height:"20",fill:"#7F8C8D"}),e.jsx("ellipse",{cx:"0",cy:"-10",rx:"18",ry:"12",fill:d,stroke:"#2C3E50",strokeWidth:"2"}),e.jsx("path",{d:"M -15,-25 L 15,-25 L 15,-5 L -15,-5 Z",fill:a?"#C0392B":d,stroke:"#2C3E50",strokeWidth:"1",opacity:"0.8"}),a&&e.jsx("circle",{cx:"0",cy:"-10",r:"8",fill:"#F39C12",opacity:"0.5"})]}),P=({x:r,y:c,size:a="medium",type:d="succulent",onClick:l})=>{const n={small:{width:30,height:40},medium:{width:50,height:70},large:{width:80,height:120}},{width:s,height:t}=n[a],p="rgba(0, 0, 0, 0.2)",i=()=>{switch(d){case"fern":return e.jsxs(e.Fragment,{children:[[...Array(5)].map((o,x)=>e.jsx("path",{d:`M 0,${-t/2} Q ${20-x*8},${-t/2+20} ${30-x*5},${-t/2+40}`,stroke:"#27AE60",strokeWidth:"3",fill:"none"},x)),[...Array(5)].map((o,x)=>e.jsx("path",{d:`M 0,${-t/2} Q ${-20+x*8},${-t/2+20} ${-30+x*5},${-t/2+40}`,stroke:"#27AE60",strokeWidth:"3",fill:"none"},`left-${x}`))]});case"tree":return e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:-5,y:0,width:"10",height:t/2,fill:"#8B4513"}),e.jsx("ellipse",{cx:"0",cy:-t/3,rx:s/2,ry:t/3,fill:"#229954",stroke:"#1E8449",strokeWidth:"2"})]});case"succulent":default:return e.jsxs(e.Fragment,{children:[e.jsx("path",{d:`M ${-s/4},${t/4} L ${s/4},${t/4} L ${s/6},${t/2} L ${-s/6},${t/2} Z`,fill:"#D35400",stroke:"#BA4A00",strokeWidth:"1"}),[...Array(8)].map((o,x)=>{const g=x/8*Math.PI*2,h=Math.cos(g)*15,f=Math.sin(g)*15;return e.jsx("ellipse",{cx:h,cy:f-10,rx:"5",ry:"12",fill:"#58D68D",stroke:"#27AE60",strokeWidth:"1",transform:`rotate(${x/8*360} ${h} ${f-10})`},x)})]})}};return e.jsxs("g",{transform:`translate(${r}, ${c})`,onClick:l,style:{cursor:l?"pointer":"default"},children:[e.jsx("ellipse",{cx:"0",cy:t/2+5,rx:s/2,ry:t/6,fill:p}),i()]})},$=({lines:r,animated:c=!0,showLabels:a=!1})=>{const[d,l]=u.useState(0);u.useEffect(()=>{if(!c)return;const t=setInterval(()=>{l(p=>(p+2)%20)},50);return()=>clearInterval(t)},[c]);const n=t=>t.color?t.color:t.active?"#2ECC71":"#BDC3C7",s=t=>t.messageCount?t.messageCount>100?6:t.messageCount>50?4:2:2;return e.jsxs("svg",{className:"collaboration-lines",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1},children:[e.jsxs("defs",{children:[c&&e.jsx("pattern",{id:"dashPattern",patternUnits:"userSpaceOnUse",width:"20",height:"20",children:e.jsx("line",{x1:"0",y1:"10",x2:"15",y2:"10",stroke:"#3498DB",strokeWidth:"2",strokeDasharray:"10,10",strokeDashoffset:-d})}),e.jsxs("linearGradient",{id:"activeGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#3498DB",stopOpacity:"0"}),e.jsx("stop",{offset:"50%",stopColor:"#3498DB",stopOpacity:"1"}),e.jsx("stop",{offset:"100%",stopColor:"#3498DB",stopOpacity:"0"})]}),e.jsx("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto",children:e.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#3498DB",opacity:"0.6"})})]}),r.map((t,p)=>{const i=n(t),o=s(t);return e.jsxs("g",{children:[e.jsx("line",{x1:t.fromX,y1:t.fromY,x2:t.toX,y2:t.toY,stroke:i,strokeWidth:o,strokeOpacity:t.active?.6:.3,strokeLinecap:"round"}),c&&t.active&&e.jsx("line",{x1:t.fromX,y1:t.fromY,x2:t.toX,y2:t.toY,stroke:"url(#activeGradient)",strokeWidth:o+2,strokeOpacity:"0.8",strokeLinecap:"round",strokeDasharray:"10,10",strokeDashoffset:-d}),t.active&&e.jsx("line",{x1:t.fromX,y1:t.fromY,x2:t.toX,y2:t.toY,stroke:i,strokeWidth:"1",strokeOpacity:"0.4",markerEnd:"url(#arrowhead)"}),a&&t.messageCount!==void 0&&e.jsxs("g",{children:[e.jsx("rect",{x:(t.fromX+t.toX)/2-20,y:(t.fromY+t.toY)/2-10,width:"40",height:"20",fill:"rgba(44, 62, 80, 0.8)",rx:"4"}),e.jsx("text",{x:(t.fromX+t.toX)/2,y:(t.fromY+t.toY)/2+4,textAnchor:"middle",fontSize:"11",fill:"#ECF0F1",fontWeight:"bold",children:t.messageCount>999?`${(t.messageCount/1e3).toFixed(1)}k`:t.messageCount})]})]},p)})]})},G=({agents:r,width:c=1200,height:a=800,showCollaborationLines:d=!0,showFurniture:l=!0,onAgentClick:n,onDeskClick:s})=>{const t=u.useMemo(()=>{if(!d)return[];const o=[],x=r.filter(g=>g.status==="working"||g.status==="speaking");for(let g=0;g<x.length;g++)for(let h=g+1;h<x.length;h++){const f=x[g],m=x[h];Math.sqrt(Math.pow(f.deskX-m.deskX,2)+Math.pow(f.deskY-m.deskY,2))<400&&o.push({fromX:f.deskX+60,fromY:f.deskY+40,toX:m.deskX+60,toY:m.deskY+40,active:f.status==="speaking"||m.status==="speaking",messageCount:Math.floor(Math.random()*150)})}return o},[r,d]),p=u.useMemo(()=>l?[{x:50,y:50,size:"large",type:"tree"},{x:c-100,y:50,size:"medium",type:"fern"},{x:50,y:a-100,size:"medium",type:"succulent"},{x:c-100,y:a-100,size:"large",type:"tree"}]:[],[c,a,l]),i=o=>{switch(o){case"idle":return"#95A5A6";case"working":return"#3498DB";case"speaking":return"#2ECC71";case"error":return"#E74C3C";case"offline":return"#BDC3C7";default:return"#95A5A6"}};return e.jsxs("div",{className:"office-layout-2d",style:{position:"relative",width:c,height:a,backgroundColor:"#ECF0F1",borderRadius:"8px",overflow:"hidden",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},children:[e.jsxs("svg",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0},children:[e.jsxs("pattern",{id:"floorPattern",patternUnits:"userSpaceOnUse",width:"40",height:"40",children:[e.jsx("rect",{width:"40",height:"40",fill:"#ECF0F1"}),e.jsx("path",{d:"M 0,0 L 40,40 M 40,0 L 0,40",stroke:"#BDC3C7",strokeWidth:"0.5",opacity:"0.3"})]}),e.jsx("rect",{width:"100%",height:"100%",fill:"url(#floorPattern)"})]}),d&&e.jsx($,{lines:t,animated:!0,showLabels:!0}),l&&p.map((o,x)=>e.jsx(P,{x:o.x,y:o.y,size:o.size,type:o.type},x)),r.map(o=>e.jsxs(j.Fragment,{children:[e.jsx(L,{x:o.deskX,y:o.deskY,occupied:o.status!=="offline",agentName:o.name,onClick:()=>s==null?void 0:s(o.id)}),e.jsx(I,{x:o.deskX+60,y:o.deskY+100,occupied:o.status!=="offline"&&o.status!=="idle",color:i(o.status),rotation:o.status==="working"?-15:0,onClick:()=>n==null?void 0:n(o.id)}),o.status==="speaking"&&e.jsxs("g",{transform:`translate(${o.deskX+60}, ${o.deskY-30})`,children:[e.jsxs("circle",{cx:"0",cy:"0",r:"12",fill:"#2ECC71",opacity:"0.8",children:[e.jsx("animate",{attributeName:"r",values:"10;14;10",dur:"1s",repeatCount:"indefinite"}),e.jsx("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"1s",repeatCount:"indefinite"})]}),e.jsx("text",{x:"0",y:"4",textAnchor:"middle",fontSize:"10",fill:"white",fontWeight:"bold",children:"๐ฌ"})]}),o.status==="error"&&e.jsxs("g",{transform:`translate(${o.deskX+60}, ${o.deskY-30})`,children:[e.jsx("circle",{cx:"0",cy:"0",r:"12",fill:"#E74C3C"}),e.jsx("text",{x:"0",y:"4",textAnchor:"middle",fontSize:"12",fill:"white",fontWeight:"bold",children:"!"})]})]},o.id)),e.jsx("div",{style:{position:"absolute",top:20,left:20,fontSize:"14px",fontWeight:"bold",color:"#2C3E50",backgroundColor:"rgba(255, 255, 255, 0.8)",padding:"8px 12px",borderRadius:"4px",zIndex:10},children:"๐ Zone A - Development Team"}),e.jsxs("div",{style:{position:"absolute",bottom:20,right:20,fontSize:"12px",color:"#7F8C8D",backgroundColor:"rgba(255, 255, 255, 0.8)",padding:"4px 8px",borderRadius:"4px",zIndex:10},children:[r.length," agents โข ",r.filter(o=>o.status==="working").length," working โข"," ",r.filter(o=>o.status==="speaking").length," speaking"]})]})},O=({position:r=[0,0,0],rotation:c=[0,0,0],status:a,agentName:d,scale:l=1,onClick:n})=>{const s=u.useRef(null),t=u.useRef(null),p=u.useMemo(()=>{switch(a){case"idle":return"#95A5A6";case"working":return"#3498DB";case"speaking":return"#2ECC71";case"error":return"#E74C3C";case"offline":return"#BDC3C7";default:return"#95A5A6"}},[a]);return C(i=>{if(!s.current||!t.current)return;const o=i.clock.getElapsedTime();s.current.position.y=r[1]+Math.sin(o*2)*.02,a==="speaking"?t.current.scale.setScalar(1+Math.sin(o*8)*.05):a==="working"?t.current.rotation.y=Math.sin(o*4)*.1:a==="error"?s.current.rotation.z=Math.sin(o*20)*.05:(t.current.rotation.y=0,s.current.rotation.z=0)}),e.jsxs("group",{ref:s,position:r,rotation:c,scale:[l,l,l],onClick:n,children:[e.jsxs("mesh",{position:[0,.5,0],castShadow:!0,receiveShadow:!0,children:[e.jsx("capsuleGeometry",{args:[.15,.5,8,16]}),e.jsx("meshStandardMaterial",{color:p})]}),e.jsxs("mesh",{ref:t,position:[0,1.1,0],castShadow:!0,receiveShadow:!0,children:[e.jsx("sphereGeometry",{args:[.2,16,16]}),e.jsx("meshStandardMaterial",{color:"#F5D6BA"})]}),a!=="offline"&&e.jsxs("mesh",{position:[0,1.5,0],children:[e.jsx("sphereGeometry",{args:[.08,16,16]}),e.jsx("meshBasicMaterial",{color:p,transparent:!0,opacity:.6}),e.jsx("pointLight",{color:p,intensity:.5,distance:2})]}),d&&e.jsx("sprite",{position:[0,1.8,0],scale:[.8,.2,1],children:e.jsx("spriteMaterial",{children:e.jsx("canvasTexture",{attach:"map",image:(()=>{const i=document.createElement("canvas");i.width=256,i.height=64;const o=i.getContext("2d");return o&&(o.fillStyle="rgba(44, 62, 80, 0.8)",o.roundRect(0,0,256,64,8),o.fill(),o.fillStyle="#ECF0F1",o.font="bold 24px Arial",o.textAlign="center",o.textBaseline="middle",o.fillText(d,128,32)),i})()})})}),e.jsxs("mesh",{position:[0,.01,0],rotation:[-Math.PI/2,0,0],receiveShadow:!0,children:[e.jsx("circleGeometry",{args:[.3,16]}),e.jsx("meshBasicMaterial",{color:"#000000",transparent:!0,opacity:.3})]})]})},Y=({position:r=[0,1.5,0],skills:c=["search","code","analyze"],activeSkill:a,scale:d=1,color:l="#3498DB"})=>{const n=u.useRef(null);C(t=>{if(!n.current)return;const p=t.clock.getElapsedTime();n.current.rotation.y=p*.5,n.current.position.y=r[1]+Math.sin(p*2)*.1;const i=1+Math.sin(p*4)*.05;n.current.scale.set(i,i,i)});const s=u.useMemo(()=>c.map((t,p)=>{const i=p/c.length*Math.PI*2,o=.5;return{skill:t,x:Math.cos(i)*o,z:Math.sin(i)*o,isActive:t===a}}),[c,a]);return e.jsxs("group",{ref:n,position:r,scale:[d,d,d],children:[e.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[0,0,0],children:[e.jsx("ringGeometry",{args:[.3,.6,32]}),e.jsx("meshBasicMaterial",{color:l,transparent:!0,opacity:.3,side:v})]}),e.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[0,.01,0],children:[e.jsx("torusGeometry",{args:[.6,.02,16,32]}),e.jsx("meshBasicMaterial",{color:l,transparent:!0,opacity:.6})]}),s.map((t,p)=>e.jsxs("group",{position:[t.x,.2,t.z],children:[e.jsxs("mesh",{castShadow:!0,children:[e.jsx("sphereGeometry",{args:[.08,16,16]}),e.jsx("meshStandardMaterial",{color:t.isActive?"#2ECC71":l,emissive:t.isActive?"#2ECC71":l,emissiveIntensity:t.isActive?.5:.2})]}),e.jsxs("mesh",{position:[t.x*-.5,0,t.z*-.5],children:[e.jsx("cylinderGeometry",{args:[.01,.01,.5,8]}),e.jsx("meshBasicMaterial",{color:l,transparent:!0,opacity:.4})]}),t.isActive&&e.jsxs("mesh",{children:[e.jsx("sphereGeometry",{args:[.12,16,16]}),e.jsx("meshBasicMaterial",{color:"#2ECC71",transparent:!0,opacity:.3})]})]},p)),[0,1,2,3].map(t=>{const p=t/4*Math.PI*2,i=Math.cos(p)*.5,o=Math.sin(p)*.5;return e.jsxs("mesh",{position:[i,.5,o],rotation:[0,0,Math.atan2(o,i)],children:[e.jsx("cylinderGeometry",{args:[.01,.01,1,8]}),e.jsx("meshBasicMaterial",{color:l,transparent:!0,opacity:.3})]},t)}),e.jsxs("mesh",{position:[0,.5,0],children:[e.jsx("octahedronGeometry",{args:[.15,0]}),e.jsx("meshStandardMaterial",{color:l,emissive:l,emissiveIntensity:.5,wireframe:!0})]})]})},N=({position:r=[0,0,0],scale:c=1,color:a="#3498DB",onComplete:d})=>{const l=u.useRef(null),n=u.useRef(Date.now());return C(()=>{if(!l.current)return;const s=Date.now()-n.current,p=Math.min(s/2e3,1),i=Math.sin(p*Math.PI);l.current.scale.set(c*i,c*i,c*i),l.current.rotation.y+=.05,p>.8&&d&&d()}),e.jsxs("group",{ref:l,position:r,children:[e.jsxs("mesh",{rotation:[-Math.PI/2,0,0],children:[e.jsx("torusGeometry",{args:[.8,.1,16,32]}),e.jsx("meshBasicMaterial",{color:a,transparent:!0,opacity:.8})]}),e.jsxs("mesh",{rotation:[-Math.PI/2,0,0],scale:[.8,.8,.8],children:[e.jsx("torusGeometry",{args:[.6,.08,16,32]}),e.jsx("meshBasicMaterial",{color:"#2ECC71",transparent:!0,opacity:.6})]}),e.jsxs("mesh",{rotation:[-Math.PI/2,0,0],scale:[.6,.6,.6],children:[e.jsx("torusGeometry",{args:[.4,.06,16,32]}),e.jsx("meshBasicMaterial",{color:"#F39C12",transparent:!0,opacity:.4})]}),e.jsxs("mesh",{rotation:[-Math.PI/2,0,0],children:[e.jsx("circleGeometry",{args:[.8,32]}),e.jsx("meshBasicMaterial",{color:a,transparent:!0,opacity:.2,side:v})]}),Array.from({length:20}).map((s,t)=>{const p=t/20*Math.PI*2,i=.7+Math.sin(Date.now()*.005+t)*.1;return e.jsxs("mesh",{position:[Math.cos(p)*i,Math.sin(Date.now()*.01+t)*.2,Math.sin(p)*i],children:[e.jsx("sphereGeometry",{args:[.03,8,8]}),e.jsx("meshBasicMaterial",{color:"#FFF",transparent:!0,opacity:.8})]},t)}),e.jsxs("mesh",{position:[0,1,0],rotation:[Math.PI,0,0],children:[e.jsx("cylinderGeometry",{args:[.1,.8,2,16]}),e.jsx("meshBasicMaterial",{color:a,transparent:!0,opacity:.3})]})]})},X=({width:r=20,height:c=15,showGrid:a=!0})=>e.jsxs(e.Fragment,{children:[e.jsxs("mesh",{rotation:[-Math.PI/2,0,0],position:[0,0,0],receiveShadow:!0,children:[e.jsx("planeGeometry",{args:[r,c]}),e.jsx("meshStandardMaterial",{color:"#ECF0F1",roughness:.8,metalness:.2})]}),a&&e.jsx("gridHelper",{args:[r,20,"#BDC3C7","#BDC3C7"],position:[0,.01,0]}),e.jsxs("mesh",{rotation:[0,0,0],position:[0,1.5,-c/2],receiveShadow:!0,children:[e.jsx("boxGeometry",{args:[r,3,.1]}),e.jsx("meshStandardMaterial",{color:"#BDC3C7",transparent:!0,opacity:.5})]}),e.jsxs("mesh",{rotation:[0,0,0],position:[-r/2,1.5,0],receiveShadow:!0,children:[e.jsx("boxGeometry",{args:[.1,3,c]}),e.jsx("meshStandardMaterial",{color:"#BDC3C7",transparent:!0,opacity:.5})]}),e.jsx("ambientLight",{intensity:.5}),e.jsx("directionalLight",{position:[10,10,5],intensity:1,castShadow:!0,"shadow-mapSize-width":2048,"shadow-mapSize-height":2048}),e.jsx("pointLight",{position:[0,5,0],intensity:.5,color:"#3498DB"}),e.jsx(S,{preset:"city"}),e.jsx(k,{position:[0,.01,0],opacity:.4,scale:20,blur:2,far:4.5})]});function H({autoRotate:r}){const c=z(a=>a.controls);return u.useEffect(()=>{c&&r&&(c.autoRotate=!0,c.autoRotateSpeed=.5)},[c,r]),null}const J=({agents:r,width:c=20,height:a=15,showGrid:d=!0,showStats:l=!1,onAgentClick:n,autoRotate:s=!1})=>{const[t,p]=u.useState([]);u.useEffect(()=>{r.forEach(o=>{t.includes(o.id)||p(x=>[...x,o.id])})},[r,t]);const i=o=>{p(x=>x.filter(g=>g!==o))};return e.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[e.jsxs(w,{shadows:!0,children:[e.jsx(E,{makeDefault:!0,position:[10,10,10],fov:50,near:.1,far:1e3}),e.jsx(B,{enablePan:!0,enableZoom:!0,enableRotate:!0,minDistance:5,maxDistance:50,maxPolarAngle:Math.PI/2-.1}),e.jsx(H,{autoRotate:s}),e.jsx(X,{width:c,height:a,showGrid:d}),r.map(o=>e.jsxs(j.Fragment,{children:[t.includes(o.id)&&e.jsx(N,{position:o.position,scale:1.5,color:"#3498DB",onComplete:()=>i(o.id)}),e.jsx(O,{position:o.position,rotation:o.rotation||[0,0,0],status:o.status,agentName:o.name,scale:t.includes(o.id)?0:1,onClick:()=>n==null?void 0:n(o.id)}),(o.status==="working"||o.status==="speaking")&&o.skills&&e.jsx(Y,{position:[o.position[0],o.position[1]+1,o.position[2]],skills:o.skills,activeSkill:o.activeSkill,scale:.8,color:o.status==="speaking"?"#2ECC71":"#3498DB"})]},o.id)),l&&e.jsx(D,{})]}),e.jsxs("div",{style:{position:"absolute",top:20,left:20,backgroundColor:"rgba(44, 62, 80, 0.8)",color:"#ECF0F1",padding:"12px 16px",borderRadius:"8px",fontSize:"14px",zIndex:10},children:[e.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"๐ข 3D Office View"}),e.jsxs("div",{children:["Agents: ",r.length]}),e.jsxs("div",{children:["Working: ",r.filter(o=>o.status==="working").length]}),e.jsxs("div",{children:["Speaking: ",r.filter(o=>o.status==="speaking").length]}),e.jsx("div",{style:{marginTop:"8px",fontSize:"12px",opacity:.8},children:"๐ฑ๏ธ Drag to rotate โข Scroll to zoom โข Right-click to pan"})]})]})},U=({isOpen:r,onToggle:c,onSend:a,agentName:d="Agent",isTyping:l=!1,disabled:n=!1})=>{const[s,t]=u.useState(""),p=u.useRef(null);u.useEffect(()=>{r&&p.current&&p.current.focus()},[r]);const i=x=>{x.preventDefault(),s.trim()&&!n&&(a(s.trim()),t(""))},o=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),i(x))};return e.jsxs("div",{className:"chat-dock-bar",style:{position:"fixed",bottom:0,left:0,right:0,backgroundColor:"rgba(255, 255, 255, 0.98)",borderTop:"1px solid #E0E0E0",boxShadow:"0 -2px 8px rgba(0, 0, 0, 0.1)",zIndex:1e3,transform:r?"translateY(0)":"translateY(calc(100% - 60px))",transition:"transform 0.3s ease"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid #E0E0E0",cursor:"pointer"},onClick:c,children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"18px"},children:"๐ฌ"}),e.jsxs("span",{style:{fontWeight:"bold",color:"#2C3E50"},children:["Chat with ",d]}),l&&e.jsxs("span",{style:{fontSize:"12px",color:"#27AE60",display:"flex",alignItems:"center",gap:"4px"},children:[e.jsxs("span",{className:"typing-indicator",children:[e.jsx("span",{style:{display:"inline-block",width:"6px",height:"6px",backgroundColor:"#27AE60",borderRadius:"50%",animation:"typing 1.4s infinite"}}),e.jsx("span",{style:{display:"inline-block",width:"6px",height:"6px",backgroundColor:"#27AE60",borderRadius:"50%",animation:"typing 1.4s infinite 0.2s"}}),e.jsx("span",{style:{display:"inline-block",width:"6px",height:"6px",backgroundColor:"#27AE60",borderRadius:"50%",animation:"typing 1.4s infinite 0.4s"}})]}),"typing..."]})]}),e.jsx("button",{style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"#7F8C8D",padding:"4px 8px",borderRadius:"4px"},onClick:x=>{x.stopPropagation(),c()},children:r?"โผ":"โฒ"})]}),r&&e.jsxs("form",{onSubmit:i,style:{padding:"16px",display:"flex",gap:"12px",alignItems:"flex-end"},children:[e.jsx("textarea",{ref:p,value:s,onChange:x=>t(x.target.value),onKeyDown:o,placeholder:`Message ${d}... (Press Enter to send, Shift+Enter for new line)`,disabled:n,rows:Math.min(Math.max(s.split(`
|
|
2
|
-
`).length,1),5),style:{flex:1,padding:"12px",border:"1px solid #E0E0E0",borderRadius:"8px",fontSize:"14px",fontFamily:"inherit",resize:"none",minHeight:"44px",maxHeight:"120px",outline:"none"}}),e.jsx("button",{type:"submit",disabled:!s.trim()||n,style:{padding:"12px 24px",backgroundColor:s.trim()&&!n?"#3498DB":"#BDC3C7",color:"white",border:"none",borderRadius:"8px",fontSize:"14px",fontWeight:"bold",cursor:s.trim()&&!n?"pointer":"not-allowed",transition:"background-color 0.2s",minHeight:"44px"},children:"Send"})]}),e.jsx("style",{children:`
|
|
3
|
-
@keyframes typing {
|
|
4
|
-
0%, 100% { transform: translateY(0); }
|
|
5
|
-
50% { transform: translateY(-4px); }
|
|
6
|
-
}
|
|
7
|
-
`})]})},V=({role:r,content:c,timestamp:a,agentName:d,isStreaming:l=!1,onCopy:n})=>{const s=g=>new Date(g).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}),t=()=>{switch(r){case"user":return"#3498DB";case"assistant":return"#ECF0F1";case"system":return"#FFF3CD";default:return"#ECF0F1"}},p=()=>r==="user"?"#FFFFFF":"#2C3E50",i=()=>r==="user"?"flex-end":"flex-start",o=()=>{switch(r){case"user":return"๐ค";case"assistant":return"๐ค";case"system":return"โ๏ธ";default:return"๐ฌ"}},x=g=>g.split(`
|
|
8
|
-
`).map((h,f)=>e.jsxs(j.Fragment,{children:[h,e.jsx("br",{})]},f));return e.jsxs("div",{className:"message-bubble",style:{display:"flex",flexDirection:"column",alignItems:i(),marginBottom:"16px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px",maxWidth:"80%"},children:[e.jsx("span",{style:{fontSize:"20px"},children:o()}),e.jsx("span",{style:{fontWeight:"bold",color:"#2C3E50",fontSize:"14px"},children:r==="assistant"?d:r==="user"?"You":"System"}),e.jsx("span",{style:{fontSize:"12px",color:"#7F8C8D"},children:s(a)})]}),e.jsxs("div",{style:{backgroundColor:t(),color:p(),padding:"12px 16px",borderRadius:"16px",borderBottomRightRadius:r==="user"?"4px":"16px",borderBottomLeftRadius:r==="assistant"?"4px":"16px",maxWidth:"80%",wordBreak:"break-word",position:"relative"},children:[e.jsx("div",{style:{fontSize:"14px",lineHeight:"1.5"},children:x(c)}),l&&e.jsx("span",{className:"streaming-cursor",style:{display:"inline-block",width:"2px",height:"16px",backgroundColor:p(),marginLeft:"2px",animation:"blink 1s infinite"}}),n&&r!=="system"&&e.jsx("button",{onClick:n,style:{position:"absolute",top:"8px",right:"8px",background:"rgba(0, 0, 0, 0.1)",border:"none",borderRadius:"4px",padding:"4px 8px",fontSize:"12px",cursor:"pointer",opacity:0,transition:"opacity 0.2s",color:p()},onMouseEnter:g=>{g.currentTarget.style.opacity="1"},onMouseLeave:g=>{g.currentTarget.style.opacity="0"},children:"๐ Copy"})]}),e.jsx("style",{children:`
|
|
9
|
-
@keyframes blink {
|
|
10
|
-
0%, 100% { opacity: 1; }
|
|
11
|
-
50% { opacity: 0; }
|
|
12
|
-
}
|
|
13
|
-
`})]})},Z=({isVisible:r,agentName:c="Agent",progress:a})=>r?e.jsxs("div",{className:"streaming-indicator",style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",backgroundColor:"rgba(52, 152, 219, 0.1)",borderRadius:"8px",marginBottom:"16px",border:"1px solid rgba(52, 152, 219, 0.3)"},children:[e.jsx("div",{style:{width:"24px",height:"24px",border:"3px solid rgba(52, 152, 219, 0.2)",borderTop:"3px solid #3498DB",borderRadius:"50%",animation:"spin 1s linear infinite"}}),e.jsxs("div",{style:{flex:1},children:[e.jsxs("div",{style:{fontWeight:"bold",color:"#2C3E50",fontSize:"14px"},children:[c," is thinking..."]}),a!==void 0&&e.jsxs("div",{style:{fontSize:"12px",color:"#7F8C8D",marginTop:"4px"},children:["Generating response... ",Math.round(a),"%"]})]}),e.jsx("div",{style:{fontSize:"12px",color:"#7F8C8D",backgroundColor:"rgba(0, 0, 0, 0.05)",padding:"4px 8px",borderRadius:"4px"},children:"โก Streaming"}),e.jsx("style",{children:`
|
|
14
|
-
@keyframes spin {
|
|
15
|
-
0% { transform: rotate(0deg); }
|
|
16
|
-
100% { transform: rotate(360deg); }
|
|
17
|
-
}
|
|
18
|
-
`})]}):null,Q=({agents:r,selectedAgentId:c,onSelect:a,disabled:d=!1})=>{const[l,n]=u.useState(!1),s=u.useRef(null),t=r.find(o=>o.id===c);u.useEffect(()=>{const o=x=>{s.current&&!s.current.contains(x.target)&&n(!1)};return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[]);const p=o=>{switch(o){case"idle":return"#95A5A6";case"working":return"#3498DB";case"speaking":return"#2ECC71";case"error":return"#E74C3C";case"offline":return"#BDC3C7";default:return"#95A5A6"}},i=o=>{switch(o){case"idle":return"๐ด";case"working":return"๐ป";case"speaking":return"๐ฌ";case"error":return"โ";case"offline":return"โซ";default:return"๐ค"}};return e.jsxs("div",{ref:s,className:"agent-selector",style:{position:"relative",display:"inline-block",width:"200px"},children:[e.jsxs("button",{onClick:()=>!d&&n(!l),disabled:d,style:{width:"100%",padding:"10px 14px",backgroundColor:"white",border:"1px solid #E0E0E0",borderRadius:"8px",fontSize:"14px",cursor:d?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",opacity:d?.6:1},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"18px"},children:(t==null?void 0:t.avatar)||"๐ค"}),e.jsx("span",{style:{fontWeight:"500",color:"#2C3E50"},children:(t==null?void 0:t.name)||"Select Agent"})]}),e.jsx("span",{style:{fontSize:"12px",color:"#7F8C8D",transform:l?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s"},children:"โผ"})]}),l&&e.jsxs("div",{style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,backgroundColor:"white",border:"1px solid #E0E0E0",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",zIndex:1e3,maxHeight:"300px",overflowY:"auto"},children:[r.map(o=>e.jsxs("button",{onClick:()=>{a(o.id),n(!1)},style:{width:"100%",padding:"10px 14px",backgroundColor:o.id===c?"#F5F5F5":"white",border:"none",borderBottom:"1px solid #F0F0F0",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",transition:"background-color 0.2s",textAlign:"left"},onMouseEnter:x=>{x.currentTarget.style.backgroundColor="#F5F5F5"},onMouseLeave:x=>{x.currentTarget.style.backgroundColor=o.id===c?"#F5F5F5":"white"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{style:{fontSize:"18px"},children:o.avatar||"๐ค"}),e.jsx("span",{style:{fontWeight:o.id===c?"600":"400",color:"#2C3E50"},children:o.name})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:p(o.status)},children:[e.jsx("span",{children:i(o.status)}),e.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:p(o.status),borderRadius:"50%"}})]})]},o.id)),r.length===0&&e.jsx("div",{style:{padding:"20px",textAlign:"center",color:"#7F8C8D",fontSize:"14px"},children:"No agents available"})]})]})},K=({agents:r,messages:c,selectedAgentId:a,isStreaming:d=!1,streamingProgress:l,onSendMessage:n,onAgentSelect:s,onCopyMessage:t})=>{const[p,i]=u.useState(!0),o=u.useRef(null);u.useEffect(()=>{o.current&&o.current.scrollIntoView({behavior:"smooth"})},[c]);const x=r.find(h=>h.id===a),g=h=>{const f=c.find(m=>m.id===h);f&&t&&(navigator.clipboard.writeText(f.content),t(h))};return e.jsxs("div",{style:{position:"fixed",bottom:0,right:"20px",width:"400px",maxWidth:"calc(100vw - 40px)",zIndex:999},children:[e.jsx(U,{isOpen:p,onToggle:()=>i(!p),onSend:n,agentName:(x==null?void 0:x.name)||"Agent",isTyping:d}),p&&e.jsxs("div",{style:{position:"absolute",bottom:"220px",left:0,right:0,maxHeight:"400px",overflowY:"auto",backgroundColor:"rgba(255, 255, 255, 0.98)",borderTop:"1px solid #E0E0E0",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",boxShadow:"0 -2px 8px rgba(0, 0, 0, 0.1)"},children:[e.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid #E0E0E0",backgroundColor:"#F8F9FA",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:e.jsx(Q,{agents:r,selectedAgentId:a,onSelect:s})}),e.jsxs("div",{style:{padding:"16px"},children:[c.map(h=>e.jsx(V,{role:h.role,content:h.content,timestamp:h.timestamp,agentName:x==null?void 0:x.name,isStreaming:h.isStreaming,onCopy:()=>g(h.id)},h.id)),d&&e.jsx(Z,{isVisible:d,agentName:(x==null?void 0:x.name)||"Agent",progress:l}),e.jsx("div",{ref:o}),c.length===0&&!d&&e.jsxs("div",{style:{textAlign:"center",padding:"40px 20px",color:"#7F8C8D"},children:[e.jsx("div",{style:{fontSize:"48px",marginBottom:"12px"},children:"๐ฌ"}),e.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"Start a conversation"}),e.jsx("div",{style:{fontSize:"14px"},children:"Select an agent and send a message to begin"})]})]})]})]})},_=()=>{var g;const[r,c]=u.useState("dashboard"),[a,d]=u.useState("console"),[l]=u.useState({totalAgents:5,activeAgents:3,totalChannels:4,connectedChannels:3,totalSkills:339,enabledSkills:12,totalCronJobs:8,activeCronJobs:5,messagesToday:1247,tokensToday:45678,uptime:3456,errorCount:2}),[n]=u.useState([{id:"1",type:"warning",title:"Gateway Connection",message:"Using mock data - connect to real gateway for live updates",timestamp:Date.now()}]),[s]=u.useState([{id:"1",name:"Assistant",status:"working",model:"gpt-4o",createdAt:Date.now(),lastActiveAt:Date.now(),sessionCount:45,messageCount:1234},{id:"2",name:"Researcher",status:"speaking",model:"claude-3-5-sonnet",createdAt:Date.now(),lastActiveAt:Date.now(),sessionCount:32,messageCount:876},{id:"3",name:"Coder",status:"idle",model:"gpt-4o",createdAt:Date.now(),lastActiveAt:Date.now(),sessionCount:28,messageCount:654}]),[t]=u.useState([{id:"1",type:"telegram",name:"Telegram Bot",status:"connected",lastSeen:Date.now(),messageCount:567},{id:"2",type:"discord",name:"Discord Server",status:"connected",lastSeen:Date.now(),messageCount:432},{id:"3",type:"slack",name:"Slack Workspace",status:"disconnected",lastSeen:Date.now()-36e5,messageCount:234}]),[p]=u.useState([{id:"1",name:"GitHub",description:"GitHub integration for PRs, issues, and more",category:"development",installed:!0,version:"1.0.0",author:"OpenClaw",downloads:1234,rating:4.8},{id:"2",name:"Docker",description:"Docker container management",category:"development",installed:!0,version:"1.0.0",author:"OpenClaw",downloads:987,rating:4.6},{id:"3",name:"Notion",description:"Notion database and page management",category:"productivity",installed:!1,version:"1.0.0",author:"OpenClaw",downloads:765,rating:4.5}]),[i]=u.useState([{id:"1",name:"Daily Report",schedule:"0 9 * * *",agent:"Assistant",command:"generate daily report",enabled:!0,lastRun:Date.now()-36e5,successCount:45,failureCount:2},{id:"2",name:"Weekly Summary",schedule:"0 9 * * 1",agent:"Researcher",command:"generate weekly summary",enabled:!0,lastRun:Date.now()-6048e5,successCount:12,failureCount:0}]),o=h=>{c(h)},x=()=>{switch(r){case"dashboard":return e.jsx(b,{stats:l,alerts:n,onDismissAlert:()=>{},onNavigate:o});case"agents":return e.jsx(A,{agents:s,onCreateAgent:()=>{},onDeleteAgent:()=>{},onSelectAgent:()=>{}});case"channels":return e.jsx(R,{channels:t,onConnect:()=>{},onDisconnect:()=>{},onConfigure:()=>{}});case"skills":return e.jsx(M,{skills:p,onInstall:()=>{},onUninstall:()=>{}});case"cron":return e.jsx(W,{jobs:i,onCreateJob:()=>{},onDeleteJob:()=>{},onToggleJob:()=>{},onRunNow:()=>{}});case"settings":return e.jsx(T,{gatewayUrl:"ws://localhost:18789",language:"pt-BR",theme:"light",onGatewayChange:()=>{},onLanguageChange:()=>{},onThemeChange:()=>{},onSave:()=>{}});case"office-2d":return e.jsx(G,{agents:[],width:1200,height:800});case"office-3d":return e.jsx(J,{agents:[],width:20,height:15});default:return e.jsx(b,{stats:l,alerts:n,onDismissAlert:()=>{},onNavigate:o})}};return e.jsxs("div",{style:{minHeight:"100vh",backgroundColor:"#F5F5F5"},children:[e.jsxs("nav",{style:{backgroundColor:"white",borderBottom:"1px solid #E0E0E0",padding:"12px 24px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px"},children:[e.jsx("h1",{style:{fontSize:"20px",fontWeight:"bold",color:"#2C3E50",margin:0},children:"๐ค PoolBot Office"}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>{d("console"),c("dashboard")},style:{padding:"8px 16px",backgroundColor:a==="console"?"#3498DB":"transparent",color:a==="console"?"white":"#2C3E50",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"Console"}),e.jsx("button",{onClick:()=>{d("2d"),c("office-2d")},style:{padding:"8px 16px",backgroundColor:a==="2d"?"#3498DB":"transparent",color:a==="2d"?"white":"#2C3E50",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"2D Office"}),e.jsx("button",{onClick:()=>{d("3d"),c("office-3d")},style:{padding:"8px 16px",backgroundColor:a==="3d"?"#3498DB":"transparent",color:a==="3d"?"white":"#2C3E50",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"14px"},children:"3D Office"})]})]}),e.jsxs("div",{style:{display:"flex",gap:"16px",alignItems:"center"},children:[e.jsx("span",{style:{fontSize:"14px",color:"#7F8C8D"},children:"v0.1.0"}),e.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:"#2ECC71",borderRadius:"50%"}})]})]}),e.jsxs("div",{style:{display:"flex"},children:[a==="console"&&e.jsx("aside",{style:{width:"200px",backgroundColor:"white",borderRight:"1px solid #E0E0E0",padding:"16px 0",minHeight:"calc(100vh - 65px)"},children:[{id:"dashboard",icon:"๐",label:"Dashboard"},{id:"agents",icon:"๐ค",label:"Agents"},{id:"channels",icon:"๐ฌ",label:"Channels"},{id:"skills",icon:"โก",label:"Skills"},{id:"cron",icon:"โฐ",label:"Cron"},{id:"settings",icon:"โ๏ธ",label:"Settings"}].map(h=>e.jsxs("button",{onClick:()=>c(h.id),style:{width:"100%",padding:"12px 20px",backgroundColor:r===h.id?"#F5F5F5":"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",gap:"12px",fontSize:"14px",color:r===h.id?"#2C3E50":"#7F8C8D",fontWeight:r===h.id?"600":"400",borderLeft:r===h.id?"3px solid #3498DB":"3px solid transparent"},children:[e.jsx("span",{children:h.icon}),e.jsx("span",{children:h.label})]},h.id))}),e.jsx("main",{style:{flex:1,padding:"0"},children:x()})]}),a==="console"&&e.jsx(K,{agents:s.map(h=>({id:h.id,name:h.name,status:h.status,avatar:"๐ค"})),messages:[],selectedAgentId:(g=s[0])==null?void 0:g.id,isStreaming:!1,onSendMessage:()=>{},onAgentSelect:()=>{}})]})};F.createRoot(document.getElementById("root")).render(e.jsx(j.StrictMode,{children:e.jsx(_,{})}));
|
|
19
|
-
//# sourceMappingURL=index-Dt28lMGE.js.map
|