PageSourceSearch

https://signals.ai/assets/IndexPage-SJBBR6sA.js

js signals.ai collected 2026-10-05 12:38:13 UTC 13,517 bytes, 1 lines download raw bytes

1import{r as y,j as e,D,V as P}from"./index-D2iBRmQq.js";import{a as L,b as E,c as H,d as Y,e as W,f as A,g as O,h as G}from"./indexes-BbIVM_ac.js";import{P as B}from"./PriceSeriesChart-BkaL83NL.js";import{R as K,X as V,Y as X,T as q,J}from"./generateCategoricalChart-BwYdxyk2.js";import{L as Q}from"./LineChart-CHR9dI6M.js";import{C as U,L as Z}from"./Line-D1UHXWbe.js";import"./tiny-invariant-CopsF_GD.js";const S=460,ee=16;function te({indexKey:t}){const{data:i}=L(t),[r,s]=le(),c=y.useMemo(()=>((i==null?void 0:i.tiles)||[]).filter(o=>o.market_cap>0),[i]),l=y.useMemo(()=>ae(c),[c]),m=y.useMemo(()=>{if(!s||l.length===0)return[];const o=[],d=T(l,0,0,s,S);for(const n of d){const h=n.h>30&&n.w>70?ee:0;o.push({kind:"sector",sector:n.sector,x:n.x,y:n.y,w:n.w,h:n.h,headerH:h});const N=n.x+1,b=n.y+h,g=n.w-2,u=n.h-h-1;if(g>2&&u>2){const p=n.children.map(x=>({...x,value:x.market_cap}));for(const x of T(p,N,b,g,u))o.push({kind:"tile",...x})}}return o},[l,s]);return c.length===0?null:e.jsxs("section",{className:"mb-6 rounded-xl border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-200",children:"Heatmap"}),e.jsx("span",{className:"text-xs text-zinc-400",children:"size = market cap · color = 1D change"})]}),e.jsx("div",{ref:r,className:"relative w-full overflow-hidden rounded-lg bg-zinc-950",style:{height:S},children:m.map((o,d)=>o.kind==="sector"?e.jsx(se,{...o},`s-${o.sector}-${d}`):e.jsx(ne,{...o},`t-${o.ticker}-${d}`))})]})}function se({sector:t,x:i,y:r,w:s,h:c,headerH:l}){return e.jsx("div",{className:"absolute",style:{left:i,top:r,width:s,height:c},children:l>0&&e.jsx("div",{className:"flex items-center truncate px-1.5 text-xs font-semibold uppercase tracking-wide text-zinc-400",style:{height:l,lineHeight:`${l}px`},title:t,children:t})})}function ne({x:t,y:i,w:r,h:s,ticker:c,name:l,change_pct:m}){const o=r>30&&s>16,d=s>30&&m!=null,n=r>96&&s>56&&l,h=ie(m);return e.jsxs("div",{className:"absolute flex flex-col justify-center overflow-hidden",style:{left:t,top:i,width:r,height:s,background:re(m),outline:"1px solid rgba(9,9,11,0.7)",outlineOffset:-1,padding:r>44?4:2,color:h},title:`${c}${l?` · ${l}`:""}${m!=null?` · ${F(m)}`:""}`,children:[o&&e.jsx("span",{className:"truncate font-semibold leading-tight",style:{fontSize:Math.min(13,Math.max(9,r/5))},children:c}),n&&e.jsx("span",{className:"truncate text-xs leading-tight opacity-80",children:l}),d&&e.jsx("span",{className:"truncate text-xs leading-tight opacity-90",children:F(m)})]})}function ae(t){const i=new Map;for(const r of t){const s=r.sector||"Other";i.has(s)||i.set(s,[]),i.get(s).push(r)}return[...i.entries()].map(([r,s])=>({sector:r,children:s.slice().sort((c,l)=>l.market_cap-c.market_cap),value:s.reduce((c,l)=>c+(l.market_cap||0),0)})).sort((r,s)=>s.value-r.value)}function T(t,i,r,s,c){const l=t.reduce((u,p)=>u+(p.value||0),0);if(l<=0||s<=0||c<=0)return[];const m=s*c/l,o=t.map(u=>({...u,_area:(u.value||0)*m})),d=[];let n={x:i,y:r,w:s,h:c},h=[];const N=(u,p)=>{let x=0,f=-1/0,a=1/0;for(const w of u)x+=w._area,w._area>f&&(f=w._area),w._area<a&&(a=w._area);const j=x*x,C=p*p;return Math.max(C*f/j,j/(C*a))},b=u=>{const p=u.reduce((x,f)=>x+f._area,0);if(n.w<=n.h){const x=p/n.w;let f=n.x;for(const a of u){const j=a._area/x;d.push({...a,x:f,y:n.y,w:j,h:x}),f+=j}n={x:n.x,y:n.y+x,w:n.w,h:n.h-x}}else{const x=p/n.h;let f=n.y;for(const a of u){const j=a._area/x;d.push({...a,x:n.x,y:f,w:x,h:j}),f+=j}n={x:n.x+x,y:n.y,w:n.w-x,h:n.h}}},g=o.slice();for(;g.length;){const u=Math.min(n.w,n.h),p=g[0];h.length===0||N([...h,p],u)<=N(h,u)?(h.push(p),g.shift()):(b(h),h=[])}return h.length&&b(h),d}function re(t){if(t==null)return"hsl(240 4% 26%)";const i=Math.max(-3,Math.min(3,t))/3;return i>=0?`hsl(145 58% ${Math.round(22+i*26)}%)`:`hsl(2 62% ${Math.round(22+-i*24)}%)`}function ie(t){return t!=null&&t>=1.6?"rgba(9,9,11,0.92)":"rgba(255,255,255,0.95)"}function F(t){return`${t>=0?"+":""}${t.toFixed(1)}%`}function le(){const[t,i]=y.useState(0),r=y.useRef(null);return[y.useCallback(c=>{if(r.current&&(r.current.disconnect(),r.current=null),!c)return;i(c.clientWidth);const l=new ResizeObserver(m=>{var d,n;const o=(n=(d=m[0])==null?void 0:d.contentRect)==null?void 0:n.width;o&&i(o)});l.observe(c),r.current=l},[]),t]}const ce=[{label:"1M",value:"1m"},{label:"3M",value:"3m"},{label:"6M",value:"6m"},{label:"YTD",value:"ytd"},{label:"1Y",value:"1y"},{label:"5Y",value:"5y"}];function je(){var g,u,p,x,f;const{indexKey:t}=D(),[i,r]=y.useState("1y"),{data:s,isLoading:c}=E(t),{data:l}=H(t,i),{data:m}=Y(t),{data:o}=W(t),{data:d}=A(t),{data:n}=O(t);if(c)return e.jsx("div",{className:"mx-auto max-w-6xl px-4 py-8 text-sm text-zinc-500",children:"Loading…"});if(!s)return e.jsx("div",{className:"mx-auto max-w-6xl px-4 py-8 text-sm text-red-500",children:"Index not found."});const h=s.status==="no_data",N=!h&&s.return_ladder&&Object.values(s.return_ladder).some(a=>a!=null),b=(s.member_count??0)>0||s.pe_ttm!=null||s.pb!=null;return e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-8",children:[e.jsx(P,{to:"/indexe
1s",className:"text-xs text-zinc-400 hover:text-zinc-600",children:"← All indexes"}),e.jsxs("header",{className:"mt-2 mb-6",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:s.display_name}),e.jsx("span",{className:"rounded bg-zinc-100 px-1.5 py-0.5 text-xs uppercase tracking-wide text-zinc-500 dark:bg-zinc-800",children:s.is_proxy?`${s.tracking_etf} · proxy`:`${s.real_symbol||s.tracking_etf} · live`})]}),h?e.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:"No computed data yet for this index."}):e.jsxs(e.Fragment,{children:[N?e.jsxs("div",{className:"mt-2 flex flex-wrap items-baseline gap-x-6 gap-y-2",children:[e.jsx("div",{className:"text-3xl tabular-nums",children:_(s.level_proxy)}),e.jsx(oe,{ladder:s.return_ladder})]}):e.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:"Indexed to 1,000 at launch — daily performance accrues from here."}),e.jsx("p",{className:"mt-2 text-xs text-zinc-400",children:s.proxy_disclaimer})]})]}),!h&&e.jsxs(e.Fragment,{children:[b&&e.jsxs("div",{className:"mb-8 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[e.jsx(v,{label:"P/E (TTM)",value:s.pe_ttm!=null&&s.pe_ttm>0?_(s.pe_ttm):"N/M"}),e.jsx(v,{label:"P/B",value:_(s.pb)}),e.jsx(v,{label:"Div yield",value:R(s.dividend_yield)}),e.jsx(v,{label:"Members",value:s.member_count??"—"}),e.jsx(v,{label:"Top 10 wt",value:s.top10_weight_pct!=null?`${s.top10_weight_pct.toFixed(1)}%`:"—"}),e.jsx(v,{label:"Adv / Decl",value:`${s.advancers??"—"} / ${s.decliners??"—"}`})]}),((g=l==null?void 0:l.points)==null?void 0:g.length)>1&&e.jsx(z,{title:l!=null&&l.is_proxy?"Proxy level":"Index level",children:e.jsx(B,{points:l.points,getTime:a=>a.date,getValue:a=>a.level,height:240,rangeMode:"server",ranges:ce,defaultRange:"1Y",onRangeChange:a=>r(a.value),formatValue:a=>Number(a).toLocaleString(void 0,{maximumFractionDigits:2})})}),b&&e.jsxs("div",{className:"mb-6 grid grid-cols-1 gap-4 lg:grid-cols-3",children:[e.jsx(k,{indexKey:t,metric:"pe_ttm",label:"P/E (TTM)",fmt:a=>_(a)}),e.jsx(k,{indexKey:t,metric:"pb",label:"P/B",fmt:a=>_(a)}),e.jsx(k,{indexKey:t,metric:"dividend_yield",label:"Dividend yield",fmt:a=>R(a)})]}),(m==null?void 0:m.length)>0&&e.jsx(z,{title:"Sector breakdown",children:e.jsx("div",{className:"space-y-1.5",children:m.map(a=>e.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[e.jsx("span",{className:"w-44 shrink-0 truncate text-zinc-600 dark:text-zinc-300",children:a.sector}),e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded bg-zinc-100 dark:bg-zinc-800",children:e.jsx("div",{className:"h-full bg-indigo-500",style:{width:`${Math.min(a.weight_pct||0,100)}%`}})}),e.jsxs("span",{className:"w-12 shrink-0 text-right tabular-nums text-zinc-500",children:[(a.weight_pct||0).toFixed(1),"%"]}),e.jsx("span",{className:"w-14 shrink-0 text-right tabular-nums text-zinc-400",children:a.pe_ttm?`${a.pe_ttm.toFixed(0)}×`:"—"})]},a.sector))})}),e.jsx(te,{indexKey:t}),n&&(((u=n.gainers)==null?void 0:u.length)>0||((p=n.losers)==null?void 0:p.length)>0)&&e.jsxs("div",{className:"mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsx(I,{title:"Top gainers",rows:n.gainers}),e.jsx(I,{title:"Top losers",rows:n.losers})]}),(d==null?void 0:d.top10_weight_pct)!=null&&e.jsx(z,{title:"Concentration",children:e.jsxs("p",{className:"text-sm text-zinc-500",children:["Top 10 holdings are ",e.jsxs("span",{className:"font-medium text-zinc-700 dark:text-zinc-200",children:[d.top10_weight_pct.toFixed(1),"%"]})," of the index",((x=d.cumulative_curve)==null?void 0:x.length)>=50&&e.jsxs(e.Fragment,{children:[" · top 50 are ",d.cumulative_curve[49].cumulative_weight_pct.toFixed(1),"%"]}),"."]})}),((f=o==null?void 0:o.constituents)==null?void 0:f.length)>0&&e.jsx(z,{title:`Constituents (${o.count})`,children:e.jsxs("div",{className:"overflow-x-auto",children:[e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-zinc-200 text-left text-xs text-zinc-400 dark:border-zinc-800",children:[e.jsx("th",{className:"py-1.5 pr-3",children:"Ticker"}),e.jsx("th",{className:"py-1.5 pr-3",children:"Name"}),e.jsx("th",{className:"py-1.5 pr-3 text-right",children:"Weight"}),e.jsx("th",{className:"py-1.5 pr-3 text-right",children:"Chg"}),e.jsx("th",{className:"py-1.5 pr-3 text-right",children:"P/E"}),e.jsx("th",{className:"py-1.5 pr-3",children:"Sector"})]})}),e.jsx("tbody",{children:o.constituents.slice(0,100).map(a=>e.jsxs("tr",{className:"border-b border-zinc-100 dark:border-zinc-900",children:[e.jsx("td",{className:"py-1.5 pr-3 font-medium",children:a.ticker}),e.jsx("td",{className:"py-1.5 pr-3 text-zinc-500",children:a.name}),e.jsx("td",{className:"py-1.5 pr-3 text-right tabular-nums",children:a.weight!=null?`${(a.weight*100).toFixed(2)}%`:"—"}),e.jsx("td",{className:`py-1.5 pr-3 text-right tabular-nums ${M(a.change_pct)}`,children:$(a.change_pct)}),e.jsx("td",{className:"py-1.5 pr-3 text-right tabular-nums",children:de(a.pe)}),e.jsx("td",{className:"py-1.5 pr-3 text-zinc-400",children:a.sector})]},a.ticker))})]}),o.count>100&&e.jsxs("p",{className:"mt-2 text-xs text-zinc-400",children:["Showing top 100 of ",o.count," by weight."]})]})})]})]})}function oe({ladder:t}){if(!t)return null;const i={"1d":"1D","1w":"1W","1m":"1M",ytd:"YTD","1y":"1Y","5y":"5Y"};return e.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm",children:Object.entries(i).map(([r,s])=>e.jsxs("span",{className:"tabular-nums",children:[e.jsx("span",{className:"mr-1 text-xs text-zinc-400",children:s}),e.jsx("span",{className:M(t[r]!=null?t[r]*100:null),children:$(t[r]!=null?t[r]*100:null)})]},r))})}function k({indexKey:t,metric:i,label:r,fmt:s}){const{data:c}=G(t,i,"1y"),l=((c==null?void 0:c.points)||[]).filter(d=>d.value!=null&&d.value>0);if(l.length<2)return null;const m=[...l.map(d=>d.value)].sort((d,n)=>d-n),o=m[Math.floor(m.length/2)];return e.jsxs("section",{className:"rounded-xl border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:[e.jsxs("div",{className:"mb-1 flex items-baseline justify-between",children:[e.jsx("h3",{className:"text-sm font-medium text-zinc-700 dark:text-zinc-200",children:r}),e.jsx("span",{className:"text-lg tabular-nums",children:s(c.current)})]}),e.jsxs("div",{className:"mb-2 text-xs text-zinc-400",children:["median ",s(o),c.percentile_vs_history!=null&&e.jsxs(e.Fragment,{children:[" · ",c.percentile_vs_history,"th pctile of 1Y range"]})]}),e.jsx(K,{width:"100%",height:150,children:e.jsxs(Q,{data:l,children:[e.jsx(U,{strokeDasharray:"3 3",stroke:"#27272a",opacity:.3}),e.jsx(V,{dataKey:"date",tick:{fontSize:10},minTickGap:50}),e.jsx(X,{domain:["auto","auto"],tick:{fontSize:10},width:42}),e.jsx(q,{formatter:d=>s(d)}),e.jsx(J,{y:o,stroke:"#a1a1aa",strokeDasharray:"4 4"}),e.jsx(Z,{type:"monotone",dataKey:"value",stroke:"#6366f1",strokeWidth:1.5,dot:!1})]})})]})}function v({label:t,value:i}){return e.jsxs("div",{className:"rounded-lg border border-zinc-200 p-3 dark:border-zinc-800",children:[e.jsx("div",{className:"text-xs uppercase tracking-wide text-zinc-400",children:t}),e.jsx("div",{className:"mt-0.5 text-base tabular-nums",children:i})]})}function z({title:t,children:i}){return e.jsxs("section",{className:"mb-6 rounded-xl border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:[e.jsx("h2",{className:"mb-3 text-sm font-medium text-zinc-700 dark:text-zinc-200",children:t}),i]})}function I({title:t,rows:i}){return e.jsx(z,{title:t,children:e.jsx("div",{className:"space-y-1",children:(i||[]).map(r=>e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"font-medium",children:r.ticker}),e.jsx("span",{className:`tabular-nums ${M(r.change_pct)}`,children:$(r.change_pct)})]},r.ticker))})})}
1function _(t){return t!=null?Number(t).toLocaleString(void 0,{maximumFractionDigits:2}):"—"}function de(t){return t!=null&&Math.abs(t)<=1e3?Number(t).toFixed(1):"—"}function R(t){return t!=null?`${(t*100).toFixed(2)}%`:"—"}function $(t){return t!=null?`${t>=0?"+":""}${t.toFixed(2)}%`:"—"}function M(t){return t==null?"text-zinc-400":t>0?"text-emerald-600":t<0?"text-red-600":"text-zinc-400"}export{je 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.