PageSourceSearch

https://tokenstocks.ai/assets/ESGPanel-xo2Vs6Kr.js

js tokenstocks.ai collected 2026-10-05 15:26:06 UTC 5,960 bytes, 1 lines download raw bytes

1import{j as e,C as c,d as n,b as d,p as o,w as j,a as t,af as x,z as h,e as u}from"./index-CT3mG8No.js";import{L as b}from"./leaf-0sjDIYhp.js";const i=({score:s,label:l,color:a})=>e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"relative w-20 h-20 mx-auto mb-2",children:[e.jsxs("svg",{className:"w-20 h-20 transform -rotate-90",children:[e.jsx("circle",{cx:"40",cy:"40",r:"35",strokeWidth:"6",fill:"none",className:"stroke-secondary"}),e.jsx("circle",{cx:"40",cy:"40",r:"35",strokeWidth:"6",fill:"none",className:a,strokeDasharray:`${s/100*220} 220`,strokeLinecap:"round"})]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"text-xl font-bold font-mono text-foreground",children:s})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:l})]});function g({data:s}){var a;if(!s)return e.jsx(c,{className:"bg-card border-border/50",children:e.jsx(n,{className:"py-12 text-center",children:e.jsx("p",{className:"text-muted-foreground",children:"ESG data not available"})})});const l=r=>r==="AAA"||r==="AA"?"default":r==="A"||r==="BBB"?"secondary":"destructive";return e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[e.jsxs(c,{className:"bg-card border-border/50",children:[e.jsx(d,{className:"pb-2",children:e.jsxs(o,{className:"text-sm flex items-center gap-2",children:[e.jsx(j,{className:"w-4 h-4 text-primary"}),"ESG Summary"]})}),e.jsxs(n,{children:[e.jsxs("div",{className:"text-center mb-4",children:[e.jsx(t,{variant:l(s.rating),className:"text-2xl px-6 py-2",children:s.rating}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Overall ESG Rating"}),e.jsxs("p",{className:"text-sm text-foreground mt-1",children:["Score: ",s.totalScore,"/100"]})]}),e.jsxs("div",{className:"flex justify-around py-4",children:[e.jsx(i,{score:s.environmentalScore,label:"Environmental",color:"stroke-emerald-500"}),e.jsx(i,{score:s.socialScore,label:"Social",color:"stroke-blue-500"}),e.jsx(i,{score:s.governanceScore,label:"Governance",color:"stroke-violet-500"})]}),e.jsxs("div",{className:"mt-4 p-3 rounded bg-secondary/20 border border-border/30",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Peer Percentile"}),e.jsxs(t,{variant:"outline",className:"text-xs",children:[s.peerPercentile,"%ile"]})]}),e.jsx(x,{value:s.peerPercentile,className:"h-2"})]})]})]}),e.jsxs(c,{className:"bg-card border-border/50",children:[e.jsx(d,{className:"pb-2",children:e.jsxs(o,{className:"text-sm flex items-center gap-2",children:[e.jsx(b,{className:"w-4 h-4 text-emerald-500"}),"Environmental"]})}),e.jsx(n,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"p-3 rounded bg-secondary/20 border border-border/30",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Carbon Intensity"}),e.jsxs(t,{variant:s.carbonIntensity<100?"default":"destructive",className:"text-xs",children:[s.carbonIntensity," tCO2e/$M"]})]}),e.jsx(x,{value:Math.min(s.carbonIntensity/2,100),className:"h-1.5"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{className:"p-2 rounded bg-secondary/20 border border-border/30",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Renewable %"}),e.jsxs("p",{className:"font-mono text-sm text-foreground",children:[s.renewableEnergy,"%"]})]}),e.jsxs("div",{className:"p-2 rounded bg-secondary/20 border border-border/30",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Water Usage"}),e.jsx("p",{className:"font-mono text-sm text-foreground",children:s.waterUsage})]}),e.jsxs("div",{className:"p-2 rounded bg-secondary/20 border border-border/30",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Waste Recycled"}),e.jsxs("p",{className:"font-mono text-sm text-foreground",children:[s.wasteRecycled,"%"]})]}),e.jsxs("div",{className:"p-2 rounded bg-secondary/20 border border-border/30",children:[e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Net Zero Target"}),e.jsx("p",{className:"font-mono text-sm text-foreground",children:s.netZeroTarget})]})]}),e.jsxs("div",{className:"pt-2 border-t border-border/30",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Climate Risk"}),e.jsx(t,{variant:s.climateRisk==="Low"?"default":s.climateRisk==="Medium"?"secondary":"destructive",className:"ml-2 text-xs",children:s.climateRisk})]})]})})]}),e.jsxs(c,{className:"bg-card border-border/50",children:[e.jsx(d,{className:"pb-2",children:e.jsxs(o,{className:"text-sm flex items-center gap-2",children:[e.jsx(h,{className:"w-4 h-4 text-amber-500"}),"Controversies & Risks"]})}),e.jsxs(n,{children:[e.jsx("div",{className:"mb-4",children:e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Controversy Level"}),e.jsxs(t,{variant:s.controversyLevel<=2?"default":s.controversyLevel<=3?"secondary":"destructive",children:["Level ",s.controversyLevel,"/5"]})]})}),e.jsx(u,{className:"h-[250px]",children:e.jsx("div",{className:"space-y-2",children:(a=s.controversies)==null?void 0:a.map((r,m)=>e.jsxs("div",{className:"p-3 rounded border border-border/50 bg-secondary/20",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(t,{variant:r.severity==="High"?"destructive":r.severity==="Medium"?"secondary":"outline",className:"text-[10px]",children:r.severity}),e.jsx("span",{className:"text-xs text-muted-foreground",children:r.date})]}),e.jsx("p",{className:"text-xs text-foreground",children:r.description}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:r.category})]},m))})})]})]})]})}export{g as ESGPanel};

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.