1import{j as e}from"./web3-ClKbONd2.js";import{M as x}from"./MetricTooltip-DI5bKnC4.js";import"./charts-_-DYqyk4.js";const d={Tightening:{color:"#ef4444",bg:"rgba(239,68,68,0.1)"},Easing:{color:"#22c55e",bg:"rgba(34,197,94,0.1)"},Neutral:{color:"#a1a1aa",bg:"rgba(161,161,170,0.1)"}};function p({val:a}){if(a===0)return null;const t=a>0;return e.jsxs("span",{className:"text-[10px] font-mono tabular-nums ml-1",style:{color:t?"#ef4444":"#22c55e"},children:[t?"â²":"â¼"," ",Math.abs(a).toFixed(2)]})}const h=({data:a})=>{const t=a.signal||"Neutral",l=d[t]||d.Neutral,o=[{label:"IG Credit Spread",data:a.ig_spread,unit:"bps",desc:"Investment grade corporate OAS"},{label:"HY Credit Spread",data:a.hy_spread,unit:"bps",desc:"High yield corporate OAS"},{label:"NFCI",data:a.nfci,unit:"",desc:"Chicago Fed financial conditions (0 = avg)"},{label:"Adj NFCI",data:a.anfci,unit:"",desc:"Adjusted for economic conditions"},{label:"TED Spread",data:a.ted_rate,unit:"%",desc:"Interbank vs T-bill risk"}];return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-[13px] font-semibold font-sans",style:{color:"var(--h-text)"},children:"Credit & Financial Conditions"}),e.jsx("span",{className:"text-[11px] font-sans",style:{color:"var(--h-text-faint)"},children:"Stress signals from credit markets"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[a.spread_widening&&e.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-sans font-medium",style:{color:"#ef4444",backgroundColor:"rgba(239,68,68,0.1)"},children:"Spreads Widening"}),e.jsx("div",{className:"px-3 py-1 rounded-full text-[12px] font-semibold font-sans",style:{color:l.color,backgroundColor:l.bg},children:t})]})]}),e.jsx("div",{className:"space-y-1",children:o.map(s=>{var n,i,r,c;return e.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg",style:{backgroundColor:"var(--h-surface)"},children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("span",{className:"text-[12px] font-sans font-medium inline-flex items-center gap-0.5",style:{color:"var(--h-text)"},children:[s.label,e.jsx(x,{term:s.label,size:10})]}),e.jsx("span",{className:"text-[10px] font-sans",style:{color:"var(--h-text-faint)"},children:s.desc})]}),e.jsxs("div",{className:"text-right flex flex-col items-end gap-1",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"text-[14px] font-mono font-semibold tabular-nums",style:{color:"var(--h-text)"},children:[((n=s.data)==null?void 0:n.value)!=null?s.data.value.toFixed(2):"â",s.unit&&((i=s.data)==null?void 0:i.value)!=null&&e.jsx("span",{className:"text-[10px] font-sans ml-0.5",style:{color:"var(--h-text-faint)"},children:s.unit})]}),((r=s.data)==null?void 0:r.change_30d)!=null&&e.jsx(p,{val:s.data.change_30d})]}),((c=s.data)==null?void 0:c.percentile_1y)!=null&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-16 h-1 rounded-full overflow-hidden",style:{backgroundColor:"var(--h-border)"},children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${Math.min(s.data.percentile_1y,100)}%`,backgroundColor:s.data.percentile_1y>80?"#ef4444":s.data.percentile_1y<20?"#22c55e":"#a1a1aa"}})}),e.jsxs("span",{className:"text-[10px] font-mono tabular-nums",style:{color:s.data.percentile_1y>80?"#ef4444":s.data.percentile_1y<20?"#22c55e":"var(--h-text-faint)"},children:[s.data.percentile_1y.toFixed(0),"th %ile"]})]})]})]},s.label)})})]})};export{h as default};
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.