PageSourceSearch

https://tokenstocks.ai/assets/NewsSentimentPanel-BZBZ3rzd.js

js tokenstocks.ai collected 2026-10-05 15:26:34 UTC 3,388 bytes, 1 lines download raw bytes

1import{j as e,C as t,d as a,b as c,p as m,a as x,af as l,e as h,T as j,g as N,M as p}from"./index-CT3mG8No.js";import{N as u}from"./newspaper-Blhaxeak.js";function b({data:s}){var i;if(!s)return e.jsx(t,{className:"bg-card/50 border-border/50",children:e.jsx(a,{className:"p-6",children:e.jsx("p",{className:"text-muted-foreground text-center",children:"News sentiment not available"})})});const n=r=>r==="Bullish"||r==="Positive"?"text-emerald-400 bg-emerald-500/20":r==="Bearish"||r==="Negative"?"text-rose-400 bg-rose-500/20":"text-amber-400 bg-amber-500/20",d=r=>r==="Bullish"||r==="Positive"?e.jsx(j,{className:"w-4 h-4"}):r==="Bearish"||r==="Negative"?e.jsx(N,{className:"w-4 h-4"}):e.jsx(p,{className:"w-4 h-4"});return e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[e.jsxs(t,{className:"bg-card/50 border-border/50",children:[e.jsx(c,{className:"pb-2",children:e.jsxs(m,{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(u,{className:"w-4 h-4 text-primary"}),"News Sentiment"]})}),e.jsxs(a,{className:"space-y-4",children:[e.jsx("div",{className:"text-center",children:e.jsxs(x,{className:`text-lg px-4 py-2 ${n(s.overallSentiment)}`,children:[d(s.overallSentiment),e.jsx("span",{className:"ml-2",children:s.overallSentiment})]})}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:`text-3xl font-bold ${s.sentimentScore>0?"text-emerald-400":s.sentimentScore<0?"text-rose-400":"text-amber-400"}`,children:[s.sentimentScore>0?"+":"",s.sentimentScore]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Sentiment Score (-100 to +100)"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-emerald-400",children:"Positive"}),e.jsxs("span",{children:[s.positivePercent,"%"]})]}),e.jsx(l,{value:s.positivePercent,className:"h-2 bg-muted/20"}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-rose-400",children:"Negative"}),e.jsxs("span",{children:[s.negativePercent,"%"]})]}),e.jsx(l,{value:s.negativePercent,className:"h-2 bg-muted/20"}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-amber-400",children:"Neutral"}),e.jsxs("span",{children:[s.neutralPercent,"%"]})]}),e.jsx(l,{value:s.neutralPercent,className:"h-2 bg-muted/20"})]})]})]}),e.jsxs(t,{className:"lg:col-span-2 bg-card/50 border-border/50",children:[e.jsx(c,{className:"pb-2",children:e.jsxs(m,{className:"text-sm font-medium",children:["Recent News (",s.newsCount," articles)"]})}),e.jsx(a,{children:e.jsx(h,{className:"h-[280px]",children:e.jsx("div",{className:"space-y-3",children:(i=s.recentNews)==null?void 0:i.map((r,o)=>e.jsx("div",{className:"p-3 bg-muted/20 rounded hover:bg-muted/30 transition-colors",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(x,{variant:"outline",className:`shrink-0 ${n(r.sentiment)}`,children:r.sentiment}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-sm line-clamp-2",children:r.headline}),e.jsxs("div",{className:"flex items-center gap-2 mt-1 text-xs text-muted-foreground",children:[e.jsx("span",{children:r.source}),e.jsx("span",{children:"•"}),e.jsx("span",{children:r.time})]})]})]})},o))})})})]})]})}export{b as NewsSentimentPanel};

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.