zframes 0.3.0 → 0.4.1

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.
Files changed (110) hide show
  1. package/dist/index.js +533 -84
  2. package/package.json +3 -3
  3. package/runtime/assets/bitcoin-dominance-BHcykQ8j.js +1 -0
  4. package/runtime/assets/breakeven-PNgn_Prq.js +1 -0
  5. package/runtime/assets/breathing-DrPgIS4r.js +1 -0
  6. package/runtime/assets/btc-blocks-mJPjO7gs.js +1 -0
  7. package/runtime/assets/btc-difficulty-D8kmEyQb.js +1 -0
  8. package/runtime/assets/btc-fees-Cv6K9S1L.js +1 -0
  9. package/runtime/assets/btc-hashrate-DT6qyeME.js +1 -0
  10. package/runtime/assets/btc-mempool-ftlit90k.js +1 -0
  11. package/runtime/assets/btc-shared-DeqDaCze.js +1 -0
  12. package/runtime/assets/calculator-CYNDBlrv.js +1 -0
  13. package/runtime/assets/chart-utils-BYIZMM9J.js +1 -0
  14. package/runtime/assets/checklist-DygbP4AG.js +1 -0
  15. package/runtime/assets/clock-D2rGZ-yo.js +1 -0
  16. package/runtime/assets/coin-movers-DpHOtUMJ.js +1 -0
  17. package/runtime/assets/content-shared-BZ1XzrJx.js +1 -0
  18. package/runtime/assets/countdown-DcbUf2-f.js +1 -0
  19. package/runtime/assets/{d3-B3esOK0k.js → d3-xK4fOkBU.js} +1 -1
  20. package/runtime/assets/daily-analysis-D3g2BXJd.js +1 -0
  21. package/runtime/assets/day-meter-CDmmKsh5.js +1 -0
  22. package/runtime/assets/dex-volume-chart-C3KHEnoK.js +1 -0
  23. package/runtime/assets/dex-volume-treemap-C-hqWu6U.js +1 -0
  24. package/runtime/assets/dice-B7dy1iZP.js +1 -0
  25. package/runtime/assets/dino-game-DLEtJMnt.js +1 -0
  26. package/runtime/assets/divider-CVjQeL0n.js +1 -0
  27. package/runtime/assets/drawdy-DoJeRpgi.js +1 -0
  28. package/runtime/assets/editor-CHAAJRb1.css +1 -0
  29. package/runtime/assets/editor-UP2LBUZ9.js +68 -0
  30. package/runtime/assets/fear-greed-zPvN2LSi.js +1 -0
  31. package/runtime/assets/feed-row-mVg1d5Zj.js +1 -0
  32. package/runtime/assets/filings-feed-CWAGVlAW.js +1 -0
  33. package/runtime/assets/financial-stress-C5-XFPqY.js +1 -0
  34. package/runtime/assets/flappy-bird-CoKOL9Ib.js +1 -0
  35. package/runtime/assets/format-CfAcS4D8.js +1 -0
  36. package/runtime/assets/fundamentals-BYjofvJi.js +1 -0
  37. package/runtime/assets/funding-heatmap-BhL0jjq8.js +1 -0
  38. package/runtime/assets/funding-rate-chart-CxBH7hVe.js +1 -0
  39. package/runtime/assets/fx-board-Cm0_zK03.js +1 -0
  40. package/runtime/assets/game-ui-Dy_QYsPr.js +1 -0
  41. package/runtime/assets/heading-gFm9ZDY1.js +1 -0
  42. package/runtime/assets/holiday-calendar-ffNyuPje.js +1 -0
  43. package/runtime/assets/image-D3DwdoU8.js +1 -0
  44. package/runtime/assets/index-DRTPEQtR.css +1 -0
  45. package/runtime/assets/index-DbboK5sz.js +820 -0
  46. package/runtime/assets/index-XGtH5pVY.css +1 -0
  47. package/runtime/assets/index-jnySFpSv.js +1 -0
  48. package/runtime/assets/inflation-pulse-GrBWa9Z6.js +1 -0
  49. package/runtime/assets/journal-log-CcLb4w4A.js +1 -0
  50. package/runtime/assets/journal-open-C0BKFgMk.js +1 -0
  51. package/runtime/assets/journal-results-Bpzb4REp.js +1 -0
  52. package/runtime/assets/journal-score-BUDUgceb.js +1 -0
  53. package/runtime/assets/journal-store-KCRoPnI_.js +1 -0
  54. package/runtime/assets/journal-ui-CJIuEcIa.js +1 -0
  55. package/runtime/assets/labor-market-DJihF3Mk.js +1 -0
  56. package/runtime/assets/lightning-stats-BV14FfAY.js +1 -0
  57. package/runtime/assets/link-grid-DK3kGS1q.js +1 -0
  58. package/runtime/assets/market-cap-treemap-DpuSjWWe.js +1 -0
  59. package/runtime/assets/market-data-CvmpLFSo.js +1 -0
  60. package/runtime/assets/market-hours-D89LjpUm.js +1 -0
  61. package/runtime/assets/marquee-ByOQSr9Q.js +28 -0
  62. package/runtime/assets/metric-row-BVVhjsjK.js +1 -0
  63. package/runtime/assets/mini-line-chart-D-i1QqSe.js +1 -0
  64. package/runtime/assets/mining-pools-D6AnoVnf.js +1 -0
  65. package/runtime/assets/mover-row-BTeXB98H.js +1 -0
  66. package/runtime/assets/national-debt-CgI8LSK6.js +1 -0
  67. package/runtime/assets/news-feed-CA8M5V3K.js +1 -0
  68. package/runtime/assets/note-Biu6llug.js +1 -0
  69. package/runtime/assets/open-interest-DgDfcYh5.js +1 -0
  70. package/runtime/assets/options-iv-CqDfM4IA.js +1 -0
  71. package/runtime/assets/options-oi-strike-CrIT5WTU.js +1 -0
  72. package/runtime/assets/options-put-call--RXL3vTA.js +1 -0
  73. package/runtime/assets/pomodoro-DZEEQU2X.js +1 -0
  74. package/runtime/assets/portfolio-allocation-DKf6H-m6.js +1 -0
  75. package/runtime/assets/portfolio-common-CVt117Oi.js +1 -0
  76. package/runtime/assets/portfolio-holdings-CHtvm8aL.js +1 -0
  77. package/runtime/assets/portfolio-value-Dj37WMRc.js +1 -0
  78. package/runtime/assets/price-chart-hgZApQaG.js +1 -0
  79. package/runtime/assets/price-compare-BczbPKy-.js +1 -0
  80. package/runtime/assets/price-liveline-Cbor-Nv_.js +1 -0
  81. package/runtime/assets/price-ticker-BmfARqHc.js +1 -0
  82. package/runtime/assets/protocol-fees-treemap-DeSBgGJ9.js +1 -0
  83. package/runtime/assets/protocol-tvl-chart-Dl_MwJdU.js +1 -0
  84. package/runtime/assets/protocol-tvl-treemap-Bvgp0EHh.js +1 -0
  85. package/runtime/assets/quote-BjjZrPpM.js +1 -0
  86. package/runtime/assets/rates-board-B_OYdW_u.js +1 -0
  87. package/runtime/assets/returns-projector-EA7LLxnL.js +1 -0
  88. package/runtime/assets/risk-reward-xhKH6ouR.js +1 -0
  89. package/runtime/assets/rules-card-CrDquc56.js +1 -0
  90. package/runtime/assets/session-progress-BquR98Sm.js +1 -0
  91. package/runtime/assets/short-volume-CYxTQG8H.js +1 -0
  92. package/runtime/assets/snake-9JevhL1w.js +1 -0
  93. package/runtime/assets/spotify-embed-CNEzG2xL.js +1 -0
  94. package/runtime/assets/stopwatch-BuN_qlhH.js +1 -0
  95. package/runtime/assets/top-movers-D7sBm6jo.js +1 -0
  96. package/runtime/assets/treasury-auctions-bA-385ON.js +1 -0
  97. package/runtime/assets/treemap-leaf-DLQawrx4.js +1 -0
  98. package/runtime/assets/tvl-treemap-jrgafmGj.js +1 -0
  99. package/runtime/assets/ui-Bq3RQsdJ.js +1 -0
  100. package/runtime/assets/unicorn-scene-DcohHRPZ.js +1 -0
  101. package/runtime/assets/use-countdown-BmcF-qdL.js +1 -0
  102. package/runtime/assets/utils-DaT-yT0k.js +1 -0
  103. package/runtime/assets/video-CUWN4TBo.js +1 -0
  104. package/runtime/assets/yield-curve-BOvLIfWe.js +1 -0
  105. package/runtime/index.html +2 -4
  106. package/runtime/assets/editor-DVTcqJo4.js +0 -68
  107. package/runtime/assets/editor-DnV0I9s-.css +0 -1
  108. package/runtime/assets/index-DEGnog6Q.css +0 -1
  109. package/runtime/assets/index-DPlG_EDx.js +0 -35727
  110. package/runtime/assets/index-KRy1feFG.js +0 -761
@@ -0,0 +1 @@
1
+ @keyframes dnaStrand1Move{0%,to{translate:0 0px}50%{translate:0 18px}}@keyframes dnaStrand1Scale{0%,to{scale:.7}25%{scale:1}50%{scale:.7}75%{scale:.7}}@keyframes dnaStrand1Color{0%,to{background-color:hsl(var(--zf-accent-hue, 242) 100% 68%)}25%{background-color:hsl(calc(var(--zf-accent-hue, 242) + 21) 83% 75%)}50%{background-color:#fff6}75%{background-color:#ffffff4d}}@keyframes dnaStrand2Move{0%,to{translate:0 18px}50%{translate:0 0px}}@keyframes dnaStrand2Scale{0%,to{scale:.7}25%{scale:.7}50%{scale:1}75%{scale:1}}@keyframes dnaStrand2Color{0%,to{background-color:#fff6}25%{background-color:#ffffff4d}50%{background-color:hsl(var(--zf-accent-hue, 242) 100% 68%)}75%{background-color:hsl(calc(var(--zf-accent-hue, 242) + 21) 83% 75%)}}
@@ -0,0 +1 @@
1
+ import{r as b,j as a,R as lt}from"./react-qoZPGuNy.js";import{l as ot,s as U,h as dt,c as ut,e as mt,i as it,j as tt,d as pt,f as ft,k as ht,n as Z,q as gt,r as xt,t as vt,u as et,v as yt}from"./d3-xK4fOkBU.js";import{c as D}from"./utils-DaT-yT0k.js";import{c as wt,f as jt}from"./chart-utils-BYIZMM9J.js";const O={top:20,right:110,bottom:40,left:50},Q={sm:640},R={height:400,yAxisPadding:15,fontSize:12},nt={rectHeight:22,paddingX:4},kt={offsetX:80},Y={ticks:6,opacity:.05,color:"#FFFFFF"},$={xTicks:5,xSubTicks:36,yTicks:5,tickSize:10,subTickSize:6,tickColor:"#404146",domainColor:"#FFFFFF",domainOpacity:.05,textOpacity:.5},st=1e12,rt=1e9,K=1e6,X=t=>t==null?"-":t===0?"0":t<.001?St(t):t<1||t<10?parseFloat(t.toPrecision(4)).toString():t<K?t.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}):t>st?`${(t/st).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}T`:t>rt?`${(t/rt).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}B`:t>K?`${(t/K).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}M`:t.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0}),bt=t=>{const s=["₀","₁","₂","₃","₄","₅","₆","₇","₈","₉"];return t.toString().split("").map(e=>s[parseInt(e)]).join("")},St=t=>{const s=t<0,i=Math.abs(t).toFixed(20).replace(/\.?0+$/,""),l=i.match(/^0\.0+/);if(l){const u=l[0].length-2,c=i.slice(l[0].length).slice(0,3).replace(/0+$/,""),d=`0.${bt(u)}${c}`;return s?`-${d}`:d}return Number.isInteger(t)?String(t):String(Math.round(t*100)/100)},Nt=({width:t,height:s=R.height,yDomain:e,formatValue:i,containerRef:l,svgRef:u})=>{const[r,c]=b.useState(t);b.useLayoutEffect(()=>{const v=()=>{if(l.current){const y=l.current.getBoundingClientRect();c(y.width)}};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[l]);const d=v=>{const y=U(u.current);if(!y.node())return O.left;const k=y.append("text").style("font-size",`${R.fontSize}px`).style("font-family","var(--font-dmsans)").style("font-weight","700").style("visibility","hidden"),[M,F]=v.domain(),A=[],L=5;for(let T=0;T<L;T++){const z=M+(F-M)/(L-1)*T;A.push(z)}let W=0;return A.forEach(T=>{var x;const z=i?i(T):X(T);k.text(z);const G=((x=k.node())==null?void 0:x.getBBox().width)||0;W=Math.max(W,G)}),k.remove(),Math.ceil(W)+R.yAxisPadding};let n=r??null;if(!n&&l.current){const v=l.current.getBoundingClientRect();v.width>0&&(n=v.width)}n=n||t||null;const m=s-O.top-O.bottom,w=ot().domain(e).range([m,0]),f=n&&n>0?d(w):null,j=n&&n>0&&f&&f>0?n-f-(n>640?O.right:20):null;return{width:n,height:s,innerWidth:j,innerHeight:m,dynamicLeftMargin:f}},Ct=t=>{const s=b.useMemo(()=>{const r=new Set;return t.forEach(c=>{c.seriesGroup&&r.add(c.seriesGroup)}),Array.from(r)},[t]),[e,i]=b.useState(()=>new Set(s));b.useEffect(()=>{i(r=>{const c=new Set(r);return s.forEach(d=>{c.has(d)||c.add(d)}),c})},[s]);const l=b.useMemo(()=>t.filter(r=>r.seriesGroup?e.has(r.seriesGroup):!0),[t,e]);return{seriesGroups:s,visibleGroups:e,filteredSeries:l,toggleGroup:r=>{i(c=>{const d=new Set(c);return d.has(r)?d.delete(r):d.add(r),d})}}},Mt=t=>({seriesColors:b.useMemo(()=>t.reduce((e,i)=>(e[i.id]=i.color,e),{}),[t]),isColorLoading:!1}),Tt=({group:t,isVisible:s,onClick:e})=>a.jsxs("button",{onClick:e,className:D("flex cursor-pointer items-center justify-center gap-2 text-xs font-semibold",s?"text-white":"text-white/30"),children:[a.jsx("div",{className:D("h-3 w-3",s?"bg-white/80":"bg-white/30")}),t]}),$t=Tt,Lt=(t,s)=>jt(t,s),at=(t,s)=>{const e=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),l=parseInt(t.slice(5,7),16);return`rgba(${e}, ${i}, ${l}, ${s})`},Ft=t=>{const s=t.flatMap(e=>e.data);return wt(s)},Dt=t=>{const s=new Set;return t.forEach(e=>{e.data.forEach(i=>s.add(i.date))}),Array.from(s).sort()},Et=(t,s)=>t.map(e=>{const i={};return s.forEach(l=>{const u=l.data.find(r=>r.date===e);i[l.id]=u?u.value:0}),{date:new Date(e),values:i}}),zt=(t,s,e)=>{const i=s.invert(t),l=dt(d=>d.date).left,u=l(e,i,1),r=e[u-1],c=e[u];return!r||!c?null:i.getTime()-r.date.getTime()>c.date.getTime()-i.getTime()?c:r},J=(t,s)=>{const e=s===t,i=s!==null&&s!==t;return e?1:i?.3:1},At=({legendItems:t,containerWidth:s,hoveredSeriesId:e,onSeriesHover:i,onLabelClick:l,unitPrefix:u,unitSuffix:r,legendRef:c})=>s&&s>Q.sm?a.jsx("div",{className:D("pointer-events-none absolute left-0 top-0 w-full flex-wrap items-center gap-2 max-sm:overflow-hidden"),children:t.map(n=>a.jsx("div",{className:D("pointer-events-auto absolute flex h-[22px] w-fit cursor-pointer items-center justify-center gap-1 rounded-[11px] px-[5px] py-1 transition-opacity duration-200 ease-out"),style:{left:`${n.left}px`,top:`${n.top}px`,backgroundColor:at(n.color,.3),opacity:J(n.id,e)},onClick:()=>l==null?void 0:l(n.id),onPointerEnter:m=>{m.preventDefault(),m.stopPropagation(),i(n.id)},onPointerLeave:m=>{m.preventDefault(),m.stopPropagation(),i(null)},children:a.jsxs("div",{className:"relative flex select-none items-center justify-center gap-1",children:[n.seriesData.iconImageUrl&&a.jsx("div",{className:"size-4 rounded-full",children:a.jsx("img",{src:n.seriesData.iconImageUrl,width:16,height:16,alt:n.seriesData.name,className:"size-4 rounded-full",draggable:!1})}),a.jsxs("div",{className:"text-normal relative flex items-center justify-center whitespace-nowrap text-[11px] font-semibold leading-4",children:[a.jsx("span",{className:D("mr-1 max-w-12 truncate",n.seriesData.iconImageUrl?"max-w-10":"max-w-12"),children:n.displayText}),u&&a.jsx("span",{className:"mr-0.5 [&_svg]:!text-white/70",children:u}),a.jsx("span",{children:n.value}),r&&a.jsx("span",{children:r})]})]})},n.id))}):a.jsx("div",{className:D("pointer-events-none left-0 top-0 flex w-full flex-wrap items-center gap-1 max-sm:overflow-hidden"),ref:c,children:t.map(n=>a.jsx("div",{className:D("pointer-events-auto flex h-[22px] w-fit min-w-[112px] cursor-pointer items-center gap-1 rounded-[11px] px-[5px] py-1 transition-opacity duration-200 ease-out"),style:{backgroundColor:at(n.color,.3),opacity:J(n.id,e)},onClick:()=>l==null?void 0:l(n.id),onPointerEnter:m=>{m.preventDefault(),m.stopPropagation(),i(n.id)},onPointerLeave:m=>{m.preventDefault(),m.stopPropagation(),i(null)},children:a.jsxs("div",{className:"relative flex select-none items-center gap-1",children:[n.seriesData.iconImageUrl&&a.jsx("div",{className:"size-4 rounded-full",children:a.jsx("img",{src:n.seriesData.iconImageUrl,width:16,height:16,alt:n.seriesData.name,className:"size-4 rounded-full",draggable:!1})}),a.jsxs("div",{className:"text-normal relative flex items-center whitespace-nowrap text-[11px] font-semibold leading-none",children:[a.jsx("span",{className:D("mr-1 max-w-12 truncate",n.seriesData.iconImageUrl?"max-w-10":"max-w-12"),children:n.displayText}),a.jsx("span",{"data-legend-value":n.id,children:n.value}),r&&a.jsx("span",{children:r})]})]})},n.id))}),It=At,Gt=({containerWidth:t,tooltipRef:s,series:e,seriesColors:i,unitPrefix:l,unitSuffix:u})=>t&&t>Q.sm?a.jsx("div",{ref:s,className:"pointer-events-none absolute left-0 top-0 z-50 rounded-md bg-slate-700 px-6 py-3 text-xs text-white opacity-0 transition-opacity duration-300",children:a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx("div",{className:"body-md font-semibold text-white/50","data-tooltip-date":!0}),a.jsx("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5",children:e.map(c=>a.jsxs(lt.Fragment,{children:[a.jsxs("span",{className:"text-soft flex max-w-[126px] items-center gap-1",children:[a.jsx("div",{className:"h-full w-0.5 rounded-full",style:{backgroundColor:i[c.id]}}),c.iconImageUrl&&a.jsx("img",{src:c.iconImageUrl,width:20,height:20,alt:c.name,className:"rounded-full"}),a.jsx("span",{className:"text-normal body-sm font-bold capitalize",children:c.name})]}),a.jsxs("div",{className:"font-dmsans text-normal flex flex-row items-center font-bold",children:[a.jsx("div",{className:"mr-1",children:l}),a.jsx("span",{className:"text-normal text-right text-xs font-bold","data-tooltip-value":c.id}),u]})]},c.id))})]})}):a.jsx("div",{ref:s,className:"pointer-events-none absolute left-0 top-0 z-50 min-w-[130px] rounded-md bg-slate-700 px-2 py-1 text-xs text-white opacity-0 transition-opacity duration-300 ease-out",children:a.jsx("div",{className:"flex flex-col items-center justify-center gap-3",children:a.jsx("div",{className:"caption font-semibold text-white/50","data-tooltip-date":!0})})}),Ht=Gt,Ot=(t,s,e,i)=>{const l=ut().domain(mt(t,r=>r.date)).range([0,e]),u=ot().domain(s).range([i,0]);return{xScale:l,yScale:u}},Wt=(t,s,e)=>{const[i,l]=s.domain(),u=[];for(let r=0;r<Y.ticks;r++){const c=i+(l-i)/(Y.ticks-1)*r;u.push(c)}t.append("g").attr("class","grid").call(it(s).tickValues(u).tickSize(-e).tickFormat(()=>"")).call(r=>r.select(".domain").remove()).selectAll("line").attr("stroke",Y.color).attr("stroke-opacity",Y.opacity)},Bt=(t,s,e,i,l,u,r)=>{const c=r!==void 0?Math.max(2,Math.min($.xTicks,Math.floor(r/70))):$.xTicks,d=t.append("g").attr("transform",`translate(0,${i})`).call(tt(s).ticks(c).tickSize($.tickSize).tickFormat(y=>y instanceof Date?Lt(y.toISOString(),l):String(y))).style("font-size","12px").style("font-weight","700").style("font-family","var(--font-manrope)");d.select(".domain").attr("stroke",$.domainColor).attr("stroke-width",1).attr("stroke-opacity",$.domainOpacity),d.selectAll(".tick line").attr("stroke",$.tickColor).attr("transform","translate(0, 4)"),d.selectAll(".tick text").attr("dy","1.2em").style("fill",$.domainColor).style("opacity",$.textOpacity);const n=t.append("g").attr("transform",`translate(0,${i})`).call(tt(s).ticks($.xSubTicks).tickSize($.subTickSize).tickFormat(()=>""));n.select(".domain").remove(),n.selectAll(".tick line").attr("stroke",$.tickColor).attr("transform","translate(0, 4)");const[m,w]=e.domain(),f=[],j=5;for(let y=0;y<j;y++){const k=m+(w-m)/(j-1)*y;f.push(k)}const v=t.append("g").call(it(e).tickValues(f).tickSize($.yTicks).tickFormat(y=>u?u(y):X(y))).style("font-size","12px").style("color",$.domainColor).style("font-family","var(--font-dmsans)").style("opacity",$.textOpacity).style("font-weight","700");v.select(".domain").attr("stroke","none"),v.selectAll(".tick line").attr("stroke","none")},Ut=(t,s,e,i,l)=>{const u=pt().x(r=>i(r.date)).y(r=>l(r.value)).curve(ft);s.forEach(r=>{const c=r.data.map(w=>({date:new Date(w.date),value:w.value})),d=e[r.id],n=t.append("path").datum(c).attr("fill","none").attr("stroke",d).attr("stroke-width",1.2).attr("opacity",1).attr("data-series-id",r.id).attr("d",u),m=n.node().getTotalLength();n.attr("stroke-dasharray",m+" "+m).attr("stroke-dashoffset",m),n.transition("draw").duration(1200).ease(ht).attr("stroke-dashoffset",0).on("end",function(){U(this).attr("stroke-dasharray",null)})})},Pt=({g:t,containerWidth:s,innerWidth:e,innerHeight:i,xScale:l,yScale:u,combinedData:r,filteredSeries:c,tooltipRef:d,containerRef:n,legendRef:m,highestValue:w,formatValue:f})=>{var V;const j=t.append("line").attr("class","hover-line").attr("stroke","white").attr("stroke-width",1).attr("stroke-dasharray","4,4").attr("stroke-opacity",.6).attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",i).attr("opacity",0),v=t.append("g").attr("class","hover-dots");let y=!0,k=((V=n.current)==null?void 0:V.getBoundingClientRect().width)||e,M=0,F=0;const A=o=>{y?(j.attr("x1",o-.75),j.attr("x2",o-.75),j.transition().duration(150).ease(Z).attr("opacity",1),y=!1):j.transition().duration(100).ease(et).attr("x1",o-.75).attr("x2",o-.75).attr("opacity",1)},L=(o,p)=>{const S=v.selectAll("g.hover-circle-group").data(c.filter(g=>o.values[g.id]!==void 0));S.exit().remove();const N=S.enter().append("g").attr("class","hover-circle-group").style("opacity",0);N.append("circle").attr("class","hover-dot-glow").attr("r",9).attr("fill","white").attr("fill-opacity",.18),N.append("circle").attr("class","hover-dot-core").attr("r",4.5).attr("fill","white").attr("stroke","rgba(10, 12, 20, 0.55)").attr("stroke-width",1.5),N.attr("transform",g=>{const C=o.values[g.id];return`translate(${p}, ${u(C)}) scale(0.5)`}).style("opacity",1).transition().duration(200).ease(yt).attr("transform",g=>{const C=o.values[g.id];return`translate(${p}, ${u(C)}) scale(1)`}),S.transition().duration(100).ease(et).attr("transform",g=>{const C=o.values[g.id];return`translate(${p}, ${u(C)})`})},W=(o,p)=>{d.current&&M===0&&F===0&&(M=d.current.getBoundingClientRect().height,F=d.current.getBoundingClientRect().width);let h=o+kt.offsetX;return h+F>k&&(h=o-F),h<0&&(h=0),{x:h,y:p-M/2+20}},T=o=>{let h=o-65+O.left;const S=u(w);return o+130/2>k-O.left&&(h=k-130),h<0&&(h=0),{x:h,y:S}},z=(o,p)=>{if(!d.current)return;const h=d.current.querySelector("[data-tooltip-date]");h&&h.textContent!==o&&(h.textContent=o),c.forEach(S=>{var E;const N=p[S.id];if(N===void 0)return;const g=(E=d.current)==null?void 0:E.querySelector(`[data-tooltip-value="${S.id}"]`),C=f?f(N):X(N);g&&g.textContent!==C&&(g.textContent=C)})},G=o=>{if(!d.current)return;const p=d.current.querySelector("[data-tooltip-date]");p&&p.textContent!==o&&(p.textContent=o)},x=o=>{m.current&&c.forEach(p=>{var N;const h=o[p.id];if(h===void 0)return;const S=(N=m.current)==null?void 0:N.querySelector(`[data-legend-value="${p.id}"]`);if(S){const g=f?f(h):X(h);S.textContent=g}})},P=(o,p)=>{d.current&&(d.current.style.opacity="1",d.current.style.transform=`translate3d(${o}px, ${p}px, 0)`)},B=o=>{const h=window.TouchEvent&&o instanceof TouchEvent?o.touches[0]:o,[S,N]=xt(h,t.node()),g=zt(S,l,r);if(!g)return;const C=l(g.date),E=vt("%b %d, %Y - %H:%M")(g.date);if(s>Q.sm){const H=W(S,N);P(H.x,H.y),z(E,g.values)}else{const H=T(S);P(H.x,H.y),G(E),x(g.values)}A(C),L(g,C)},_=()=>{j.transition().duration(150).ease(Z).attr("opacity",0),y=!0,d.current&&(d.current.style.opacity="0"),v.selectAll("g").transition().duration(150).ease(gt).style("opacity",0).attr("transform",(o,p,h)=>{const N=U(h[p]).attr("transform"),g=N.match(/translate\(([^,]+),\s*([^)]+)\)/);if(g){const C=parseFloat(g[1]),E=parseFloat(g[2]);return`translate(${C}, ${E}) scale(0.3)`}return N}).remove()},I=new ResizeObserver(()=>{n.current&&(k=n.current.getBoundingClientRect().width)});return n.current&&I.observe(n.current),{onMouseMove:B,onMouseLeave:_,destroy:()=>I.disconnect()}},Xt=(t,s,{xScale:e,yScale:i},l,u,r)=>{const c=nt.rectHeight,d=nt.paddingX,n=[];return t.forEach(w=>{const f=w.data.map(j=>({date:new Date(j.date),value:j.value}));if(f.length>0){const j=f[f.length-1],v=e(j.date)+8,y=i(j.value),k=v-d;let M=y-c/2;const F=n.findLast(A=>M+c>=A.top&&M<=A.bottom);F&&(M=F.top+c),n.push({top:M,bottom:M+c,id:w.id,left:k})}}),n.reverse().reduce((w,f)=>{const j=w.find(v=>f.top+c>=v.top&&f.top<=v.bottom&&v.id!==f.id);return j&&(f.top=j.top-c),[f,...w]},[]),n.map(w=>{var y,k;const f=t.find(M=>M.id===w.id);if(!f)return null;const j=s[w.id],v=r?r(((y=f.data.at(-1))==null?void 0:y.value)??0):X(((k=f.data.at(-1))==null?void 0:k.value)??0);return{id:w.id,left:w.left+l,top:w.top+u,seriesData:f,color:j,value:v,displayText:f.name}}).filter(Boolean)},Vt=({className:t})=>a.jsx("div",{className:D("relative size-8",t),children:a.jsx("div",{className:"absolute left-1/2 top-1/2 flex size-12 -translate-x-1/2 -translate-y-1/2 items-center justify-center",children:a.jsxs("div",{className:"relative h-6 w-full",children:[Array.from({length:5}).map((s,e)=>a.jsx("div",{className:"absolute size-1.5 rounded-full will-change-transform",style:{left:`${e/6*100}%`,animation:`dnaStrand1Move 2s infinite ease-in-out ${-e*.2}s, dnaStrand1Scale 2s infinite ease-in-out ${-e*.2}s, dnaStrand1Color 2s infinite ease-in-out ${-e*.2}s`}},`strand1-${e}`)),Array.from({length:5}).map((s,e)=>a.jsx("div",{className:"absolute size-1.5 rounded-full",style:{left:`${e/6*100}%`,animation:`dnaStrand2Move 2s infinite ease-in-out ${-e*.2}s, dnaStrand2Scale 2s infinite ease-in-out ${-e*.2}s, dnaStrand2Color 2s infinite ease-in-out ${-e*.2}s`}},`strand2-${e}`))]})})}),Yt=({series:t,width:s,height:e=400,timeframe:i,className:l,isLoading:u=!1,formatValue:r,unitPrefix:c,unitSuffix:d,onLabelClick:n})=>{const m=b.useRef(null),w=b.useRef(null),f=b.useRef(null),j=b.useRef(null),[v,y]=b.useState(null),k=b.useMemo(()=>[...t].sort((o,p)=>{const h=o.data.length>0?o.data[o.data.length-1].value:0;return(p.data.length>0?p.data[p.data.length-1].value:0)-h}),[t]),M=b.useCallback(o=>{y(o)},[]),{seriesGroups:F,visibleGroups:A,filteredSeries:L,toggleGroup:W}=Ct(k),{seriesColors:T,isColorLoading:z}=Mt(k),G=b.useMemo(()=>Ft(k),[k]),x=Nt({width:s,height:e,yDomain:G,formatValue:r,containerRef:w,svgRef:m}),P=b.useMemo(()=>Dt(k),[k]),B=b.useMemo(()=>Et(P,k),[P,k]),_=b.useMemo(()=>Math.max(...L.map(o=>o.data.map(p=>p.value)).flat().filter(o=>o!==void 0)),[L]),I=b.useMemo(()=>!x.innerWidth||!x.innerHeight?null:Ot(B,G,x.innerWidth,x.innerHeight),[B,G,x.innerWidth,x.innerHeight]),V=b.useMemo(()=>!I||!x.dynamicLeftMargin?[]:Xt(L,T,I,x.dynamicLeftMargin,O.top,r),[I,x.dynamicLeftMargin,L,T,r]);return b.useEffect(()=>{if(!m.current||t.length===0||z||!I||x.width===null||x.innerWidth===null||x.dynamicLeftMargin===null)return;const o=U(m.current),{innerWidth:p,innerHeight:h,dynamicLeftMargin:S}=x;o.selectAll("*").remove();const{xScale:N,yScale:g}=I,C=o.append("g").attr("transform",`translate(${S},${O.top})`);Wt(C,g,p),Bt(C,N,g,h,i,r,p),Ut(C,L,T,N,g);const{onMouseMove:E,onMouseLeave:H,destroy:ct}=Pt({g:C,containerWidth:x.width,innerWidth:p,innerHeight:x.innerHeight,xScale:N,yScale:g,combinedData:B,filteredSeries:L,tooltipRef:f,containerRef:w,legendRef:j,highestValue:_,formatValue:r}),q=C.append("rect").attr("class","overlay").attr("width",p).attr("height",h).attr("fill","transparent").style("cursor","crosshair").style("pointer-events","all");return q.on("mousemove",E).on("mouseleave",H).on("touchstart",E).on("touchmove",E).on("touchend",H),q.raise(),()=>{ct(),q.on("mousemove",null).on("mouseleave",null).on("touchstart",null).on("touchmove",null).on("touchend",null),o.selectAll("*").interrupt(),o.selectAll("*").remove()}},[B,G,t.length,L,I,x.innerWidth,x.innerHeight,x.dynamicLeftMargin,e,i,z,T,r]),b.useEffect(()=>{if(!m.current||t.length===0||z)return;U(m.current).select("g").selectAll("path[data-series-id]").transition().duration(200).ease(Z).attr("opacity",function(){const h=U(this).attr("data-series-id");return J(h,v)})},[v,t,T,z]),!u&&t.length===0?a.jsx("div",{className:D("relative w-full",l),children:a.jsx("div",{className:D("mx-auto flex w-full items-center justify-center text-sm text-gray-400"),style:{height:e},children:"No data available"})}):a.jsx("div",{ref:w,className:D("relative w-full",l),style:{width:s,minHeight:e},children:u?a.jsx(Vt,{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}):a.jsxs(a.Fragment,{children:[F.length>0&&a.jsx("div",{className:"mb-3 flex flex-wrap items-center justify-center gap-2",children:F.map(o=>a.jsx($t,{group:o,isVisible:A.has(o),onClick:()=>W(o)},o))}),x.width!==null&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"relative z-20",children:a.jsx(It,{legendRef:j,legendItems:V,containerWidth:x.width,hoveredSeriesId:v,onSeriesHover:M,onLabelClick:n,unitPrefix:c,unitSuffix:d})}),a.jsxs("div",{className:"relative select-none",children:[a.jsx("svg",{ref:m,width:x.width,height:e,className:"relative z-0",style:{maxWidth:"100%",width:"100%",display:"block",overflow:"visible"}}),a.jsx("div",{className:"z-10",children:a.jsx(Ht,{containerWidth:x.width,tooltipRef:f,series:L,seriesColors:T,unitPrefix:c,unitSuffix:d})})]})]})]})})},Zt=Yt;export{Zt as M};
@@ -0,0 +1 @@
1
+ import{r as f,j as t}from"./react-qoZPGuNy.js";import{a as p,c as j}from"./format-CfAcS4D8.js";import{f as w,W as y,L as P}from"./index-DbboK5sz.js";import{F as v}from"./ui-Bq3RQsdJ.js";import{M as S}from"./mini-line-chart-D-i1QqSe.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";y.schema;const F="CUUR0000SA0";function g(a,o){return!o||o<=0?null:(a/o-1)*100}function I({config:a}){const x=new Date().getUTCFullYear(),C=x-2,{series:e,isLoading:N}=P(F,C,x),n=f.useMemo(()=>((e==null?void 0:e.points)??[]).slice(-a.months),[a.months,e==null?void 0:e.points]),s=n.at(-1),r=n.at(-2),c=s?n.find(i=>{const h=new Date(i.time),u=new Date(s.time);return h.getUTCFullYear()===u.getUTCFullYear()-1&&h.getUTCMonth()===u.getUTCMonth()}):void 0,b=f.useMemo(()=>n.map(i=>({date:new Date(i.time).toISOString(),value:i.value})),[n]);if(N)return t.jsx(v,{loading:!0,children:"loading CPI…"});if(!e||!s)return t.jsx(v,{children:"no CPI data yet"});const l=g(s.value,r==null?void 0:r.value),d=g(s.value,c==null?void 0:c.value),m=j(d??l??0);return t.jsxs("div",{className:"flex h-full flex-col justify-center gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{children:[t.jsx("div",{className:"caption text-soft uppercase",children:"BLS CPI-U"}),t.jsx("div",{className:"body-sm text-normal",children:s.date})]}),t.jsx("div",{className:"caption text-soft text-right",children:"monthly"})]}),t.jsxs("div",{className:"flex items-end justify-between gap-3",children:[t.jsxs("div",{children:[t.jsx("div",{className:"metric-xl leading-none",style:{color:m,textShadow:`0 0 24px ${m}44`},children:d!==null?p(d):"--"}),t.jsx("div",{className:"caption text-soft mt-1",children:"year over year"})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"caption text-soft",children:"index"}),t.jsx("div",{className:"body-md text-strong font-bold tabular-nums",children:s.value.toFixed(3)}),t.jsx("div",{className:"caption text-soft mt-2",children:"month over month"}),t.jsx("div",{className:"body-md font-bold tabular-nums",style:{color:j(l??0)},children:l!==null?p(l):"--"})]})]}),t.jsx(S,{data:b,width:210,height:46,color:m}),t.jsxs("div",{className:"caption text-soft",children:[e.label," · ",n.length," monthly observations"]})]})}const _=w({...y,component:I});export{_ as inflationPulseFrame};
@@ -0,0 +1 @@
1
+ import{r as a,j as s}from"./react-qoZPGuNy.js";import{f as G,s as U,v as P,k as H,h as c,A as _}from"./index-DbboK5sz.js";import{i as $}from"./content-shared-BZ1XzrJx.js";import{d as M,a as J,c as K,U as q,D as X}from"./format-CfAcS4D8.js";import{C as Y,d as F,a as V,l as Z}from"./journal-store-KCRoPnI_.js";import{s as ee}from"./ui-Bq3RQsdJ.js";const se=["xyz:*"],I=v=>Object.entries(v).filter(([,t])=>t.markPx>0).map(([t])=>t).sort((t,m)=>c(t).localeCompare(c(m)));U.schema;const T=[{label:"funding reset",cls:"mean-reversion"},{label:"oversold bounce",cls:"mean-reversion"},{label:"range reclaim",cls:"mean-reversion"},{label:"breakout",cls:"breakout"},{label:"momentum / trend",cls:"breakout"},{label:"positioning flush",cls:"positioning"},{label:"catalyst / earnings",cls:"macro"}];function te(v){var R;const[t,m]=a.useState("xyz:TSLA"),[j,Q]=a.useState("long"),[N,C]=a.useState(!1),[p,k]=a.useState(""),[x,S]=a.useState(null),[b,w]=a.useState(""),[h,W]=a.useState(65),[L,O]=a.useState(!1),i=P(se,6e4),u=P(void 0,6e4),z=a.useMemo(()=>({...u,...i}),[u,i]),d=a.useMemo(()=>[...I(i),...I(u)],[i,u]),B=H([t]),f=e=>{var l;return B[e]??((l=z[e])==null?void 0:l.markPx)},g=f(t),y=(R=z[t])==null?void 0:R.changePct,o=x!=null?T[x]:null,n=o?Y[o.cls]:null,A=n?n.hits/n.n>=.55:!0,D=a.useMemo(()=>{const e=p.trim().toLowerCase();return(e?d.filter(r=>c(r).toLowerCase().includes(e)):d).slice(0,80)},[p,d]);function E(){if(!o)return;const e=b.trim()?`${o.label} — ${b.trim()}`:o.label;Z({sym:t,dir:j,confidence:h,claim:e,cls:o.cls,entry:g}),S(null),w(""),O(!0),window.setTimeout(()=>O(!1),1100)}return s.jsxs("div",{className:"flex h-full flex-col gap-2.5",children:[s.jsxs("div",{className:"relative",children:[s.jsxs("button",{type:"button",onClick:()=>C(e=>!e),className:`flex w-full items-center gap-2 px-2.5 py-2 ${$}`,children:[s.jsx(_,{symbol:t,size:20}),s.jsx("span",{className:"body-md text-strong font-semibold",children:c(t)}),s.jsxs("span",{className:"ml-auto flex items-baseline gap-2 tabular-nums",children:[s.jsx("span",{className:"body-sm text-strong",children:g!=null?M(g):"…"}),y!=null&&s.jsx("span",{className:"caption",style:{color:K(y)},children:J(y)})]}),s.jsx("span",{className:"caption text-disabled ml-1",children:N?"▲":"▼"})]}),N&&s.jsxs("div",{className:"absolute left-0 right-0 top-full z-50 mt-1 flex flex-col gap-1 rounded-md p-1.5 shadow-xl",style:{background:"hsl(248 32% 9%)",border:"1px solid var(--color-accent-line)"},children:[s.jsx("input",{autoFocus:!0,value:p,onChange:e=>k(e.target.value),placeholder:"search ticker…",className:"body-sm w-full rounded bg-white/[0.05] px-2 py-1.5 text-strong outline-none placeholder:text-disabled"}),s.jsxs("div",{className:`flex max-h-44 flex-col ${ee}`,children:[D.map(e=>s.jsxs("button",{type:"button",onClick:()=>{m(e),C(!1),k("")},className:"flex items-center gap-2 rounded px-2 py-1.5 transition-colors hover:bg-white/[0.06]",children:[s.jsx(_,{symbol:e,size:16}),s.jsx("span",{className:"body-sm text-normal",children:c(e)}),s.jsx("span",{className:"caption text-soft ml-auto tabular-nums",children:f(e)!=null?M(f(e)):"—"})]},e)),D.length===0&&s.jsx("span",{className:"caption text-disabled px-2 py-2",children:d.length===0?"loading universe…":"no Hyperliquid market for that"})]})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:["long","short"].map(e=>{const l=j===e;return s.jsx("button",{type:"button",onClick:()=>Q(e),className:"body-sm flex-1 rounded-md py-1.5 font-bold uppercase tracking-wide transition-colors",style:{color:l?F(e):"var(--color-soft)",background:l?"var(--color-surface)":"rgba(255,255,255,0.03)",border:`1px solid ${l?F(e)+"55":"transparent"}`},children:e},e)})}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:T.map((e,l)=>{const r=x===l;return s.jsx("button",{type:"button",onClick:()=>S(r?null:l),className:"caption rounded-full px-2.5 py-1 transition-colors",style:{color:r?"var(--color-strong)":"var(--color-soft)",background:r?"hsl(var(--zf-accent-hue, 242) 80% 60% / 0.3)":"rgba(255,255,255,0.04)",border:`1px solid ${r?"var(--color-accent-line)":"transparent"}`},children:e.label},e.label)})}),s.jsx("input",{value:b,onChange:e=>w(e.target.value),onKeyDown:e=>e.key==="Enter"&&E(),placeholder:"add a note (optional)",className:`body-sm w-full rounded-md px-2.5 py-1.5 text-strong outline-none placeholder:text-disabled ${$}`}),n&&s.jsxs("span",{className:"caption",style:{color:A?q:X},children:["your last ",n.n," ",V[o.cls]," calls: ",n.hits,"/",n.n,A?" · your edge":" · a leak — size down"]}),s.jsxs("div",{className:"mt-auto flex items-center gap-2.5",children:[s.jsx("span",{className:"caption text-disabled",children:"how sure"}),s.jsx("input",{type:"range",min:50,max:95,step:1,value:h,onChange:e=>W(Number(e.target.value)),className:"h-1 flex-1 cursor-pointer",style:{accentColor:"hsl(var(--zf-accent-hue, 242) 85% 68%)"}}),s.jsxs("span",{className:"body-sm text-strong w-9 tabular-nums",children:[h,"%"]}),s.jsx("button",{type:"button",onClick:E,disabled:!o,className:"caption rounded px-3 py-1.5 font-bold uppercase tracking-wide transition-opacity disabled:opacity-40",style:{color:"var(--color-strong)",background:L?q+"55":"hsl(var(--zf-accent-hue, 242) 80% 60% / 0.35)"},children:L?"logged ✓":"log"})]})]})}const ie=G({...U,component:te});export{ie as journalLogFrame};
@@ -0,0 +1 @@
1
+ import{r as a,j as t}from"./react-qoZPGuNy.js";import{u,r as l}from"./journal-store-KCRoPnI_.js";import{J as f,O as d}from"./journal-ui-CJIuEcIa.js";import{f as w,w as i,k as x}from"./index-DbboK5sz.js";import{s as j}from"./ui-Bq3RQsdJ.js";import"./format-CfAcS4D8.js";import"./content-shared-BZ1XzrJx.js";i.schema;function v({config:m}){const{open:s}=u(),[n,c]=a.useState(()=>Date.now()),r=x(s.map(o=>o.symbol));if(a.useEffect(()=>{const o=window.setInterval(()=>c(Date.now()),1e3);return()=>window.clearInterval(o)},[]),a.useEffect(()=>{for(const o of s){const e=r[o.symbol];n>=o.resolveAt&&e!=null&&l(o.id,e)}},[n,s,r]),s.length===0)return t.jsx(f,{children:"no open calls — log a read in Journal · Log"});const p=s.slice(0,m.max);return t.jsx("div",{className:`flex flex-col gap-2 ${j}`,children:p.map(o=>{const e=r[o.symbol];return t.jsx(d,{call:o,now:n,mid:e,onClose:e!=null?()=>l(o.id,e):void 0},o.id)})})}const b=w({...i,component:v});export{b as journalOpenFrame};
@@ -0,0 +1 @@
1
+ import{j as r}from"./react-qoZPGuNy.js";import{u as t}from"./journal-store-KCRoPnI_.js";import{J as n,R as m}from"./journal-ui-CJIuEcIa.js";import{f as i,x as o}from"./index-DbboK5sz.js";import{s as u}from"./ui-Bq3RQsdJ.js";import"./format-CfAcS4D8.js";import"./content-shared-BZ1XzrJx.js";o.schema;function c({config:a}){const{resolved:s}=t();if(s.length===0)return r.jsx(n,{children:"nothing graded yet — your calls resolve here"});const l=s.slice(0,a.max);return r.jsx("div",{className:`flex flex-col gap-2 ${u}`,children:l.map(e=>r.jsx(m,{call:e},e.id))})}const g=i({...o,component:c});export{g as journalResultsFrame};
@@ -0,0 +1 @@
1
+ import{j as o}from"./react-qoZPGuNy.js";import{U as h,D as x}from"./format-CfAcS4D8.js";import{u as g,a as c,C as n}from"./journal-store-KCRoPnI_.js";import{S as d}from"./journal-ui-CJIuEcIa.js";import{f as b,y as p}from"./index-DbboK5sz.js";import"./content-shared-BZ1XzrJx.js";p.schema;function j(){const r=Object.keys(n).map(e=>({cls:e,rate:n[e].hits/n[e].n}));return r.sort((e,s)=>s.rate-e.rate),{edge:r[0],leak:r[r.length-1]}}function v(r){const{resolved:e}=g(),{edge:s,leak:t}=j(),a=e.length,u=a?Math.round(e.reduce((i,f)=>i+f.confidence,0)/a):0,m=a?Math.round(e.filter(i=>i.verdict==="hit").length/a*100):0,l=u-m;return o.jsxs("div",{className:"flex h-full flex-col gap-2",children:[o.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[o.jsx(d,{label:"your edge",value:`${Math.round(s.rate*100)}%`,sub:c[s.cls],color:h}),o.jsx(d,{label:"your leak",value:`${Math.round(t.rate*100)}%`,sub:`${c[t.cls]} — size down`,color:x}),o.jsx(d,{label:"calibration",value:a?`${u}→${m}`:"—",sub:a?l>4?`overconfident +${l}`:l<-4?`underconfident ${l}`:"well-calibrated":"no calls yet",color:Math.abs(l)>4?"#f4a259":h})]}),o.jsx("div",{className:"rounded-md px-3 py-2",style:{background:"hsl(var(--zf-accent-hue, 242) 80% 60% / 0.1)",border:"1px solid var(--color-accent-line)"},children:o.jsxs("p",{className:"body-sm text-normal leading-snug",children:[o.jsx("span",{className:"font-semibold text-highlight",children:"zAI ·"})," Sharpest on ",c[s.cls],". You leak on ",c[t.cls]," —"," ",n[t.cls].hits,"/",n[t.cls].n,", and your kill rule tripped on most of them. Size those down."]})})]})}const L=b({...p,component:v});export{L as journalScoreFrame};
@@ -0,0 +1 @@
1
+ import{r as h}from"./react-qoZPGuNy.js";import{U as u,D as m}from"./format-CfAcS4D8.js";const A={"mean-reversion":"mean-reversion",breakout:"breakout",positioning:"positioning",macro:"macro"},y={BTC:67250,ETH:3540,SOL:146,HYPE:28.4,"xyz:NVDA":128.4,"xyz:TSLA":251,"xyz:AAPL":195,"xyz:MSFT":415,"xyz:AMZN":184},i=36e5;function L(e){return e==="long"?u:m}function b(e,r){return(r-e.entry)/e.entry*100*(e.dir==="long"?1:-1)}function E(e,r){return e.target===e.entry?0:Math.min(1,Math.max(0,(r-e.entry)/(e.target-e.entry)))}function O(e){const r=Math.max(0,Math.round(e/1e3));return r<3600?`${Math.max(1,Math.round(r/60))}m left`:r<86400?`${Math.round(r/3600)}h left`:`${Math.round(r/86400)}d left`}function v(e){const r=e.toLowerCase();return/(funding|squeeze|oversold|overbought|revert|bounce|reclaim range)/.test(r)?"mean-reversion":/(breakout|break out|reclaim|continuation|new high|momentum|runs)/.test(r)?"breakout":/(cpi|fomc|rate|macro|jobs|earnings|fed)/.test(r)?"macro":"positioning"}const M={"mean-reversion":{n:14,hits:9},breakout:{n:9,hits:3},positioning:{n:11,hits:6},macro:{n:6,hits:3}},p={"mean-reversion":72*i,breakout:168*i,positioning:48*i,macro:168*i};function P(e){return e.verdict==="hit"&&e.signalsFired?{label:"thesis played out · skill",color:u,glyph:"✓"}:e.verdict==="hit"&&!e.signalsFired?{label:"signals never fired · luck, not skill",color:"#f4a259",glyph:"⚠"}:e.verdict==="miss"&&e.signalsFired?{label:"mechanism real, got swamped · near-miss",color:"#f4a259",glyph:"↺"}:{label:"thesis was wrong · clean miss",color:m,glyph:"✗"}}const C=[{id:"r1",symbol:"ETH",dir:"long",confidence:60,claim:"Basis reset + spot bid stepping in under 3.4k.",cls:"mean-reversion",verdict:"hit",returnPct:4.2,signalsFired:!0},{id:"r2",symbol:"xyz:TSLA",dir:"long",confidence:75,claim:"Breakout over 250 holds and extends.",cls:"breakout",verdict:"miss",returnPct:-3.1,signalsFired:!1},{id:"r3",symbol:"BTC",dir:"short",confidence:58,claim:"Crowded longs flush on the funding reset.",cls:"positioning",verdict:"miss",returnPct:-2.4,signalsFired:!0},{id:"r4",symbol:"xyz:AAPL",dir:"long",confidence:65,claim:"Gap fill into the print.",cls:"breakout",verdict:"hit",returnPct:1.8,signalsFired:!1}];let t=[],s=C,f={open:t,resolved:s};const c=new Set;function g(){f={open:t,resolved:s};for(const e of c)e()}function w(e){const r=Date.now(),n=e.cls??v(e.claim),o=e.entry??y[e.sym]??100,a=o*(e.dir==="long"?1.03:.97);t=[{id:`u${r}`,symbol:e.sym,dir:e.dir,confidence:e.confidence,claim:e.claim,cls:n,entry:o,target:a,resolveAt:r+p[n]},...t],g()}function F(e,r){const n=t.find(l=>l.id===e);if(!n)return;const o=b(n,r),a={id:n.id,symbol:n.symbol,dir:n.dir,confidence:n.confidence,claim:n.claim,cls:n.cls,verdict:o>=0?"hit":"miss",returnPct:o};t=t.filter(l=>l.id!==e),s=[a,...s],g()}function S(e){return c.add(e),()=>{c.delete(e)}}function d(){return f}function R(){return h.useSyncExternalStore(S,d,d)}export{M as C,A as a,O as b,b as c,L as d,P as e,w as l,F as r,E as t,R as u};
@@ -0,0 +1 @@
1
+ import{j as s}from"./react-qoZPGuNy.js";import{A as b,h}from"./index-DbboK5sz.js";import{i as j}from"./content-shared-BZ1XzrJx.js";import{U as c,D as d,a as p,d as l}from"./format-CfAcS4D8.js";import{d as x,c as g,t as y,a as N,b as v,e as w}from"./journal-store-KCRoPnI_.js";function m({dir:e}){return s.jsx("span",{className:"caption rounded px-1.5 py-0.5 font-bold uppercase tracking-wide",style:{color:x(e),background:"var(--color-surface)"},children:e})}function u({symbol:e}){return s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(b,{symbol:e,size:16}),s.jsx("span",{className:"body-sm text-strong font-semibold",children:h(e)})]})}function S({label:e,value:a,sub:t,color:n}){return s.jsxs("div",{className:`flex flex-col gap-0.5 px-2.5 py-2 ${j}`,children:[s.jsx("span",{className:"caption text-soft uppercase tracking-wide",children:e}),s.jsx("span",{className:"metric-sm font-bold leading-none tabular-nums",style:{color:n??"var(--color-strong)"},children:a}),t&&s.jsx("span",{className:"caption text-disabled",children:t})]})}function A({call:e,now:a,mid:t,onClose:n}){const o=x(e.dir),r=t!=null?g(e,t):null,i=t!=null?y(e,t):0,f=r==null?"var(--color-soft)":r>=0?c:d;return s.jsxs("div",{className:"flex flex-col gap-2 rounded-md border border-white/[0.06] bg-white/[0.02] px-3 py-2.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(m,{dir:e.dir}),s.jsx(u,{symbol:e.symbol}),s.jsx("span",{className:"caption text-disabled",children:"·"}),s.jsxs("span",{className:"caption text-soft tabular-nums",children:[e.confidence,"%"]}),s.jsx("span",{className:"body-sm ml-auto font-bold tabular-nums",style:{color:f},children:r==null?"…":p(r)})]}),s.jsx("p",{className:"body-sm text-normal leading-snug",children:e.claim}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsxs("div",{className:"relative h-1.5 rounded-full bg-white/[0.06]",children:[s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full opacity-40",style:{width:`${i*100}%`,background:o}}),s.jsx("span",{className:"absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full ring-2 ring-black/30",style:{left:`${i*100}%`,background:o}})]}),s.jsxs("div",{className:"caption text-disabled flex items-center justify-between tabular-nums",children:[s.jsxs("span",{children:["entry ",l(e.entry)]}),s.jsxs("span",{className:"text-soft",children:["now ",t!=null?l(t):"…"]}),s.jsxs("span",{children:["target ",l(e.target)]})]})]}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"caption text-disabled uppercase tracking-wide",children:N[e.cls]}),s.jsxs("span",{className:"caption text-soft flex items-center gap-2 tabular-nums",children:[v(e.resolveAt-a),n&&s.jsx("button",{type:"button",onClick:n,disabled:t==null,className:"caption rounded px-1.5 py-0.5 uppercase tracking-wide transition-opacity hover:text-strong disabled:opacity-40",style:{background:"var(--color-surface)"},children:"close"})]})]})]})}function P({call:e}){const a=e.verdict==="hit"?c:d,t=e.signalsFired===void 0?null:w(e);return s.jsxs("div",{className:"flex flex-col gap-1.5 rounded-md border border-white/[0.04] px-3 py-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(m,{dir:e.dir}),s.jsx(u,{symbol:e.symbol}),s.jsxs("span",{className:"caption text-soft tabular-nums",children:[e.confidence,"%"]}),s.jsx("span",{className:"body-sm ml-auto font-bold tabular-nums",style:{color:a},children:p(e.returnPct)})]}),s.jsx("p",{className:"body-sm text-soft leading-snug",children:e.claim}),t?s.jsxs("span",{className:"caption font-medium",style:{color:t.color},children:[t.glyph," ",t.label]}):s.jsxs("span",{className:"caption text-disabled uppercase tracking-wide",children:[e.verdict," · graded by return"]})]})}function D({children:e}){return s.jsx("div",{className:"body-sm text-soft flex h-full min-h-0 items-center justify-center text-center",children:e})}export{D as J,A as O,P as R,S};
@@ -0,0 +1 @@
1
+ import{r as x,j as t}from"./react-qoZPGuNy.js";import{b,e as h,c as N,g as L}from"./format-CfAcS4D8.js";import{f as M,K as f,L as p}from"./index-DbboK5sz.js";import{F as u}from"./ui-Bq3RQsdJ.js";import{M as S}from"./mini-line-chart-D-i1QqSe.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";f.schema;const y="LNS14000000",E="CES0000000001";function w({config:l}){const i=new Date().getUTCFullYear(),c=i-2,{series:s,isLoading:j}=p(y,c,i),{series:e,isLoading:v}=p(E,c,i),a=x.useMemo(()=>((s==null?void 0:s.points)??[]).slice(-l.months),[l.months,s==null?void 0:s.points]),g=x.useMemo(()=>a.map(d=>({date:new Date(d.time).toISOString(),value:d.value})),[a]);if(j&&v)return t.jsx(u,{loading:!0,children:"loading labor data…"});const r=a.at(-1);if(!s||!r)return t.jsx(u,{children:"no labor data yet"});const o=e==null?void 0:e.points.at(-1),m=e==null?void 0:e.points.at(-2),n=o&&m?o.value-m.value:null;return t.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{children:[t.jsx("div",{className:"caption text-soft uppercase",children:"unemployment rate"}),t.jsx("div",{className:"body-sm text-normal",children:r.date})]}),t.jsx("div",{className:"caption text-soft text-right",children:"monthly"})]}),t.jsxs("div",{className:"flex items-end justify-between gap-3",children:[t.jsxs("div",{children:[t.jsx("div",{className:"metric-xl text-strong leading-none",children:b(r.value,1)}),t.jsxs("div",{className:"caption text-soft mt-1",children:[s.source," · U-3"]})]}),n!==null&&o&&t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"caption text-soft",children:"nonfarm payrolls"}),t.jsxs("div",{className:"body-md font-bold tabular-nums",style:{color:N(n)},children:[n>=0?"+":"",h(n*1e3)]}),t.jsxs("div",{className:"caption text-soft mt-1 tabular-nums",children:[h(o.value*1e3)," jobs"]})]})]}),t.jsx(S,{data:g,width:210,height:44,color:L}),t.jsxs("div",{className:"caption text-soft",children:[s.label," · ",a.length," monthly observations"]})]})}const Y=M({...f,component:w});export{Y as laborMarketFrame};
@@ -0,0 +1 @@
1
+ import{j as e}from"./react-qoZPGuNy.js";import{j as r,a as c,c as d}from"./format-CfAcS4D8.js";import{f as m,aY as i,aZ as u}from"./index-DbboK5sz.js";import{F as o}from"./ui-Bq3RQsdJ.js";i.schema;function s(n,t){return t==null||t===0?null:(n-t)/t*100}function l({label:n,value:t,delta:a}){return e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-md bg-white/[0.04] px-2 py-2 text-center",children:[e.jsx("span",{className:"metric-sm text-strong leading-none",children:t}),e.jsx("span",{className:"caption text-soft mt-1",children:n}),a!==null&&e.jsx("span",{className:"caption mt-0.5 font-bold tabular-nums",style:{color:d(a)},children:c(a)})]})}function g({config:n}){const{stats:t,isLoading:a}=u();return a?e.jsx(o,{loading:!0,children:"loading lightning…"}):t?e.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-2",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-1.5",children:[e.jsx(l,{label:"nodes",value:t.nodeCount.toLocaleString("en-US"),delta:s(t.nodeCount,t.prevNodeCount)}),e.jsx(l,{label:"channels",value:t.channelCount.toLocaleString("en-US"),delta:s(t.channelCount,t.prevChannelCount)}),e.jsx(l,{label:"capacity",value:r(t.totalCapacity),delta:s(t.totalCapacity,t.prevTotalCapacity)})]}),n.showSplit&&e.jsxs("div",{className:"caption text-soft text-center",children:[t.clearnetNodes.toLocaleString("en-US")," clearnet ·"," ",t.torNodes.toLocaleString("en-US")," tor"]})]}):e.jsx(o,{children:"no lightning data yet"})}const j=m({...i,component:g});export{j as lightningStatsFrame};
@@ -0,0 +1 @@
1
+ import{j as t,r as m}from"./react-qoZPGuNy.js";import{i as d}from"./content-shared-BZ1XzrJx.js";import{f as u,aD as i}from"./index-DbboK5sz.js";import{s as f}from"./ui-Bq3RQsdJ.js";i.schema;const p=e=>/^https?:\/\//i.test(e);function h(e){for(const r of[e,`https://${e}`])try{const n=new URL(r).hostname;if(n)return n}catch{}return null}function x(e){const r=h(e);return r?`https://www.google.com/s2/favicons?sz=64&domain=${encodeURIComponent(r)}`:null}function g({link:e}){const[r,n]=m.useState(!1),s=e.icon.trim(),a=s&&p(s)?s:null,o=s&&!a?s:null,l=a??(o?null:x(e.url)),c=l!=null&&!r;return t.jsxs("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",title:e.url,className:`group flex items-center gap-2 px-2.5 py-2 ${d}`,children:[t.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-md bg-white/[0.06] text-base leading-none","aria-hidden":!0,children:o?t.jsx("span",{children:o}):c?t.jsx("img",{src:l,alt:"",className:"h-full w-full object-contain",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>n(!0)}):t.jsx("span",{className:"text-soft font-dmsans font-bold uppercase",children:e.label.charAt(0)})}),t.jsx("span",{className:"body-sm text-normal min-w-0 flex-1 truncate font-medium group-hover:text-strong",children:e.label})]})}function j({config:e}){return t.jsx("div",{className:f,children:t.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`},children:e.links.map((r,n)=>t.jsx(g,{link:r},`${r.url}-${n}`))})})}const N=u({...i,component:j});export{N as linkGridFrame};
@@ -0,0 +1 @@
1
+ import{r as p,j as m}from"./react-qoZPGuNy.js";import{f as i,a as c}from"./format-CfAcS4D8.js";import{f,au as n,av as u}from"./index-DbboK5sz.js";import{T as d,a as h}from"./treemap-leaf-DLQawrx4.js";import{F as s}from"./ui-Bq3RQsdJ.js";import"./utils-DaT-yT0k.js";import"./d3-xK4fOkBU.js";n.schema;function l({width:r,height:o,data:a}){const t=i(a.marketCapUsd);return m.jsx(h,{width:r,height:o,label:a.id,secondary:t,title:`${a.id} · ${t} mcap · ${c(a.changePct24h)}`})}function C({config:r}){const{entries:o,isLoading:a}=u(),t=p.useMemo(()=>o.slice(0,r.topN).map(e=>({id:e.symbol,value:e.marketCapUsd,marketCapUsd:e.marketCapUsd,changePct24h:e.changePct24h??0})),[o,r.topN]);return a?m.jsx(s,{loading:!0,children:"loading market caps…"}):t.length===0?m.jsx(s,{children:"no market data"}):m.jsx(d,{data:t,LeafComponent:l,getColorValue:e=>e.changePct24h})}const F=f({...n,component:C});export{F as marketCapTreemapFrame};
@@ -0,0 +1 @@
1
+ const s=[1,2,3,4,5],k=[0,1,2,3,4],g={US:["2026-01-01","2026-01-19","2026-02-16","2026-04-03","2026-05-25","2026-06-19","2026-07-03","2026-09-07","2026-11-26","2026-12-25"],TSX:["2026-01-01","2026-02-16","2026-04-03","2026-05-18","2026-07-01","2026-08-03","2026-09-07","2026-10-12","2026-12-25","2026-12-28"],B3:["2026-01-01","2026-02-16","2026-02-17","2026-04-03","2026-04-21","2026-05-01","2026-06-04","2026-09-07","2026-10-12","2026-11-02","2026-11-20","2026-12-25"],LSE:["2026-01-01","2026-04-03","2026-04-06","2026-05-04","2026-05-25","2026-08-31","2026-12-25","2026-12-28"],XETRA:["2026-01-01","2026-04-03","2026-04-06","2026-05-01","2026-12-24","2026-12-25","2026-12-31"],EURONEXT:["2026-01-01","2026-04-03","2026-04-06","2026-05-01","2026-12-25"],SIX:["2026-01-01","2026-01-02","2026-04-03","2026-04-06","2026-05-01","2026-05-14","2026-05-25","2026-12-24","2026-12-25","2026-12-31"],TSE:["2026-01-01","2026-01-02","2026-01-12","2026-02-11","2026-02-23","2026-03-20","2026-04-29","2026-05-04","2026-05-05","2026-05-06","2026-07-20","2026-08-11","2026-09-21","2026-09-22","2026-09-23","2026-10-12","2026-11-03","2026-11-23","2026-12-31"],HKEX:["2026-01-01","2026-02-17","2026-02-18","2026-02-19","2026-04-03","2026-04-06","2026-05-01","2026-05-25","2026-06-19","2026-07-01","2026-10-01","2026-10-19","2026-12-25"],CN:["2026-01-01","2026-02-16","2026-02-17","2026-02-18","2026-02-19","2026-02-20","2026-02-23","2026-02-24","2026-04-06","2026-05-01","2026-05-04","2026-05-05","2026-06-19","2026-10-01","2026-10-02","2026-10-05","2026-10-06","2026-10-07","2026-10-08"],NSE:["2026-01-26","2026-04-03","2026-05-01","2026-08-15","2026-10-02","2026-12-25"],KRX:["2026-01-01","2026-03-01","2026-05-05","2026-06-06","2026-08-15","2026-10-03","2026-10-09","2026-12-25"],SGX:["2026-01-01","2026-05-01","2026-08-10","2026-12-25"],SET:["2026-01-01","2026-01-02","2026-03-03","2026-04-06","2026-04-13","2026-04-14","2026-04-15","2026-05-01","2026-05-04","2026-06-01","2026-06-03","2026-07-28","2026-07-29","2026-08-12","2026-10-13","2026-10-23","2026-12-07","2026-12-10","2026-12-31"],ASX:["2026-01-01","2026-01-26","2026-04-03","2026-04-06","2026-04-07","2026-04-25","2026-06-08","2026-12-25","2026-12-28"],JSE:["2026-01-01","2026-03-21","2026-04-03","2026-04-06","2026-04-27","2026-05-01","2026-06-16","2026-08-10","2026-09-24","2026-12-16","2026-12-25"],TADAWUL:["2026-09-23"]},S={NYSE:{code:"NYSE",name:"New York Stock Exchange",city:"New York",country:"US",website:"https://www.nyse.com",mark:"NY",tz:"America/New_York",open:"09:30",close:"16:00",days:s,region:"Americas",holidayGroup:"US"},NASDAQ:{code:"NASDAQ",name:"Nasdaq",city:"New York",country:"US",website:"https://www.nasdaq.com",mark:"NQ",tz:"America/New_York",open:"09:30",close:"16:00",days:s,region:"Americas",holidayGroup:"US"},TSX:{code:"TSX",name:"Toronto Stock Exchange",city:"Toronto",country:"CA",website:"https://www.tsx.com",mark:"TX",tz:"America/Toronto",open:"09:30",close:"16:00",days:s,region:"Americas"},B3:{code:"B3",name:"B3",city:"São Paulo",country:"BR",website:"https://www.b3.com.br/en_us/",mark:"B3",tz:"America/Sao_Paulo",open:"10:00",close:"17:00",days:s,region:"Americas"},LSE:{code:"LSE",name:"London Stock Exchange",city:"London",country:"GB",website:"https://www.londonstockexchange.com",mark:"LS",tz:"Europe/London",open:"08:00",close:"16:30",days:s,region:"Europe"},XETRA:{code:"XETRA",name:"Deutsche Börse Xetra",city:"Frankfurt",country:"DE",website:"https://www.boerse-frankfurt.de/en",mark:"DX",tz:"Europe/Berlin",open:"09:00",close:"17:30",days:s,region:"Europe"},EURONEXT:{code:"EURONEXT",name:"Euronext Paris",city:"Paris",country:"FR",website:"https://www.euronext.com",mark:"EN",tz:"Europe/Paris",open:"09:00",close:"17:30",days:s,region:"Europe"},SIX:{code:"SIX",name:"SIX Swiss Exchange",city:"Zurich",country:"CH",website:"https://www.six-group.com/en/products-services/the-swiss-stock-exchange.html",mark:"SX",tz:"Europe/Zurich",open:"09:00",close:"17:30",days:s,region:"Europe"},TSE:{code:"TSE",name:"Tokyo Stock Exchange",city:"Tokyo",country:"JP",website:"https://www.jpx.co.jp/english/",mark:"JP",tz:"Asia/Tokyo",open:"09:00",close:"15:30",days:s,region:"Asia-Pacific"},HKEX:{code:"HKEX",name:"Hong Kong Exchange",city:"Hong Kong",country:"HK",website:"https://www.hkex.com.hk",mark:"HK",tz:"Asia/Hong_Kong",open:"09:30",close:"16:00",days:s,region:"Asia-Pacific"},SSE:{code:"SSE",name:"Shanghai Stock Exchange",city:"Shanghai",country:"CN",website:"https://english.sse.com.cn",mark:"SH",tz:"Asia/Shanghai",open:"09:30",close:"15:00",days:s,region:"Asia-Pacific",holidayGroup:"CN"},NSE:{code:"NSE",name:"National Stock Exchange",city:"Mumbai",country:"IN",website:"https://www.nseindia.com",mark:"NS",tz:"Asia/Kolkata",open:"09:15",close:"15:30",days:s,region:"Asia-Pacific"},KRX:{code:"KRX",name:"Korea Exchange",city:"Seoul",country:"KR",website:"https://global.krx.co.kr",mark:"KR",tz:"Asia/Seoul",open:"09:00",close:"15:30",days:s,region:"Asia-Pacific"},SGX:{code:"SGX",name:"Singapore Exchange",city:"Singapore",country:"SG",website:"https://www.sgx.com",mark:"SG",tz:"Asia/Singapore",open:"09:00",close:"17:00",days:s,region:"Asia-Pacific"},SET:{code:"SET",name:"Stock Exchange of Thailand",city:"Bangkok",country:"TH",website:"https://www.set.or.th/en/home",mark:"SET",tz:"Asia/Bangkok",open:"10:00",close:"16:30",days:s,region:"Asia-Pacific"},ASX:{code:"ASX",name:"Australian Securities Exchange",city:"Sydney",country:"AU",website:"https://www.asx.com.au",mark:"AS",tz:"Australia/Sydney",open:"10:00",close:"16:00",days:s,region:"Asia-Pacific"},JSE:{code:"JSE",name:"Johannesburg Stock Exchange",city:"Johannesburg",country:"ZA",website:"https://www.jse.co.za",mark:"JS",tz:"Africa/Johannesburg",open:"09:00",close:"17:00",days:s,region:"Middle East / Africa"},TADAWUL:{code:"TADAWUL",name:"Saudi Exchange",city:"Riyadh",country:"SA",website:"https://www.saudiexchange.sa",mark:"SA",tz:"Asia/Riyadh",open:"10:00",close:"15:00",days:k,region:"Middle East / Africa"}},b=["NYSE","NASDAQ","LSE","XETRA","EURONEXT","TSE","HKEX","SSE","NSE","SET","ASX"],T={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function m(e,t){const a=new Intl.DateTimeFormat("en-US",{timeZone:t,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short"}),o={};for(const n of a.formatToParts(e))n.type!=="literal"&&(o[n.type]=n.value);return{ymd:`${o.year}-${o.month}-${o.day}`,dow:T[o.weekday]??0,minutes:Number(o.hour)*60+Number(o.minute)+Number(o.second)/60}}function l(e){const[t,a]=e.split(":").map(Number);return t*60+a}const N=864e5,u=1440;function z(e,t){const a=g[e.holidayGroup??e.code]??[],o=l(e.open),n=l(e.close),i=m(t,e.tz),y=(d,c)=>e.days.includes(d)&&!a.includes(c),h={code:e.code,name:e.name,city:e.city,country:e.country,website:e.website,mark:e.mark,tz:e.tz,open:e.open,close:e.close,region:e.region};if(y(i.dow,i.ymd)&&i.minutes>=o&&i.minutes<n)return{...h,status:"open",nextChangeMin:n-i.minutes};let r;if(y(i.dow,i.ymd)&&i.minutes<o)r=o-i.minutes;else{r=u-i.minutes+o;let d=!1;for(let c=1;c<=10;c++){const w=m(new Date(t.getTime()+c*N),e.tz);if(y(w.dow,w.ymd)){r=u-i.minutes+(c-1)*u+o,d=!0;break}}d||(r=-1)}const f=e.days.includes(i.dow)&&a.includes(i.ymd);return{...h,status:f?"holiday":"closed",nextChangeMin:r}}const E=["Americas","Europe","Asia-Pacific","Middle East / Africa"],p={open:0,holiday:1,closed:2};function D(e,t){const a=[...e];return t==="name"?a.sort((o,n)=>o.name.localeCompare(n.name)):t==="status"?a.sort((o,n)=>p[o.status]-p[n.status]||o.nextChangeMin-n.nextChangeMin):a.sort((o,n)=>E.indexOf(o.region)-E.indexOf(n.region)),a}function x(e){if(e<0)return"—";if(e<1)return"<1m";const t=Math.floor(e),a=Math.floor(t/u),o=Math.floor(t%u/60),n=t%60;return a>0?`${a}d ${o}h`:o>0?`${o}h ${n}m`:`${n}m`}function A(e){const t=S[e];return t?g[t.holidayGroup??t.code]??[]:[]}function R(e,t){return A(e).includes(t)}function M(e,t,a=new Date){const o=S[e];if(!o)return[];const n=m(a,o.tz).ymd;return A(e).filter(i=>i>=n).sort().slice(0,Math.max(0,t))}function P(e,t=new Date){const a=S[e];if(!a)return null;const{ymd:o,dow:n}=m(t,a.tz);return{ymd:o,dow:n}}export{b as D,S as E,P as a,z as e,x as f,R as i,M as n,D as s};
@@ -0,0 +1 @@
1
+ import{j as e,r as d}from"./react-qoZPGuNy.js";import{D as x,E as m,e as g,s as f,f as b}from"./market-data-CvmpLFSo.js";import{U as l}from"./format-CfAcS4D8.js";import{f as w,X as h}from"./index-DbboK5sz.js";import{F as j}from"./ui-Bq3RQsdJ.js";h.schema;const u={open:{color:l,chipBg:"rgba(63, 208, 143, 0.13)",label:"Open",verb:"closes",rail:l,railOpacity:1,wash:"linear-gradient(90deg, rgba(63, 208, 143, 0.08), transparent 40%)"},closed:{color:"#8b92a1",chipBg:"rgba(255, 255, 255, 0.045)",label:"Closed",verb:"opens",rail:"rgba(255, 255, 255, 0.22)",railOpacity:.55,wash:"none"},holiday:{color:"#f2b066",chipBg:"rgba(242, 176, 102, 0.13)",label:"Holiday",verb:"opens",rail:"#f2b066",railOpacity:1,wash:"linear-gradient(90deg, rgba(242, 176, 102, 0.07), transparent 40%)"}};function k(){return e.jsxs("svg",{"aria-hidden":"true",className:"shrink-0",fill:"none",height:"15",viewBox:"0 0 20 20",width:"15",children:[e.jsx("circle",{cx:"10",cy:"10",r:"7.25",stroke:"currentColor",strokeOpacity:"0.75",strokeWidth:"1.5"}),e.jsx("path",{d:"M2.75 10h14.5M10 2.75c2 2 3 4.42 3 7.25s-1 5.25-3 7.25M10 2.75c-2 2-3 4.42-3 7.25s1 5.25 3 7.25",stroke:"currentColor",strokeLinecap:"round",strokeOpacity:"0.55",strokeWidth:"1.2"}),e.jsx("path",{d:"m5.25 12.75 2.6-2.3 2.1 1.55 3.95-4.8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6"})]})}function v(s,r){try{return new Intl.DateTimeFormat("en-US",{timeZone:r,hour:"2-digit",minute:"2-digit",hour12:!1,timeZoneName:"short"}).format(s)}catch{return r}}function y(s){return/^[A-Z]{2}$/i.test(s)?[...s.toUpperCase()].map(r=>String.fromCodePoint(127462+r.charCodeAt(0)-65)).join(""):s}function N(){return e.jsxs("svg",{"aria-hidden":"true",className:"opacity-50 transition group-hover:translate-x-0.5 group-hover:-translate-y-0.5 group-hover:opacity-95",fill:"none",height:"12",viewBox:"0 0 16 16",width:"12",children:[e.jsx("path",{d:"M6 4.5H4.5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V10",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5"}),e.jsx("path",{d:"M9 2.5h4.5V7M8.25 7.75l5-5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function C({state:s}){return e.jsx("span",{"aria-hidden":"true",className:"grid h-[30px] w-[30px] shrink-0 place-items-center overflow-hidden rounded-[9px] border border-white/10 shadow-[inset_0_1px_0_rgba(255,255,255,0.12),0_4px_10px_-7px_rgba(0,0,0,0.8)]",style:{background:"linear-gradient(150deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02) 48%, rgba(0,0,0,0.22))"},children:e.jsx("span",{className:"text-[1.15rem] leading-none drop-shadow-[0_1px_3px_rgba(0,0,0,0.5)]",children:y(s.country)})})}function _({state:s}){const r=u[s.status],n=s.status==="closed";return e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border px-2 py-[3px] font-dmsans text-[0.5rem] font-bold uppercase leading-none tracking-[0.09em]",style:{borderColor:n?"rgba(255,255,255,0.1)":`${r.color}33`,background:r.chipBg,color:n?"rgba(255,255,255,0.62)":r.color},children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:n?"rgba(255,255,255,0.45)":r.color,boxShadow:s.status==="open"?`0 0 6px ${r.color}`:void 0}}),r.label]})}function S({now:s,state:r}){const n=u[r.status],o=b(r.nextChangeMin),c=v(s,r.tz);return e.jsxs("a",{"aria-label":`${r.name} website`,className:"group text-normal relative grid min-h-[42px] grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 overflow-hidden rounded-xl border border-white/[0.06] bg-white/[0.022] py-1.5 pr-2.5 pl-3 transition duration-200 hover:-translate-y-px hover:border-white/[0.14] hover:bg-white/[0.05] hover:text-strong focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white/50",href:r.website,rel:"noreferrer",style:{backgroundImage:n.wash},target:"_blank",title:`${r.name} · ${r.city} · ${r.open}-${r.close}`,children:[e.jsx("span",{"aria-hidden":"true",className:"absolute inset-y-[5px] left-0 w-[3px] rounded-r-full",style:{background:n.rail,opacity:n.railOpacity}}),e.jsx(C,{state:r}),e.jsxs("span",{className:"relative min-w-0 pl-0.5",children:[e.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.jsx("span",{className:"body-sm text-strong truncate font-bold",children:r.name}),e.jsx(N,{})]}),e.jsxs("span",{className:"caption text-soft flex min-w-0 items-center gap-1.5 tabular-nums",children:[e.jsx("span",{className:"truncate",children:r.city}),e.jsx("span",{className:"h-[3px] w-[3px] shrink-0 rounded-full bg-white/25"}),e.jsx("span",{className:"shrink-0",children:c})]})]}),e.jsxs("span",{className:"relative flex min-w-[84px] flex-col items-end gap-1",children:[e.jsx(_,{state:r}),e.jsxs("span",{className:"caption whitespace-nowrap text-right tabular-nums",style:{color:r.status==="closed"?"rgba(255,255,255,0.55)":n.color},children:[n.verb," ",o]})]})]})}function E({config:s}){const[r,n]=d.useState(()=>new Date);d.useEffect(()=>{const a=window.setInterval(()=>n(new Date),3e4);return()=>window.clearInterval(a)},[]);const o=s.exchanges.length?s.exchanges:x,c=o.join(","),i=d.useMemo(()=>{const a=o.map(t=>m[t.toUpperCase()]).filter(t=>!!t).map(t=>g(t,r));return f(a,s.sort)},[c,r,s.sort]);if(i.length===0)return e.jsx(j,{children:"no known exchanges — check the codes"});const p=i.filter(a=>a.status==="open").length;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:[e.jsxs("div",{className:"caption text-soft mb-2 flex items-center justify-between gap-3 uppercase tracking-wide",children:[e.jsx("span",{className:"truncate",children:"exchange sessions"}),e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full border border-white/[0.08] bg-white/[0.045] px-2 py-0.5 tabular-nums",children:[p>0&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:l,boxShadow:`0 0 6px ${l}`}}),e.jsx("span",{className:"text-strong font-bold",children:p}),e.jsxs("span",{className:"text-soft",children:["/ ",i.length," open"]})]})]}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-1 overflow-auto pr-0.5",children:i.map(a=>e.jsx(S,{now:r,state:a},a.code))})]})}const I=w({...h,component:E,titleIcon:k});export{I as marketHoursFrame};
@@ -0,0 +1,28 @@
1
+ import{j as e}from"./react-qoZPGuNy.js";import{f as i,aH as r}from"./index-DbboK5sz.js";r.schema;const s={slow:24,normal:14,fast:8},m=`
2
+ .zf-marquee {
3
+ display: flex;
4
+ align-items: center;
5
+ height: 100%;
6
+ width: 100%;
7
+ overflow: hidden;
8
+ }
9
+ .zf-marquee-track {
10
+ display: flex;
11
+ flex-shrink: 0;
12
+ align-items: center;
13
+ white-space: nowrap;
14
+ will-change: transform;
15
+ animation-name: zf-marquee-scroll;
16
+ animation-timing-function: linear;
17
+ animation-iteration-count: infinite;
18
+ }
19
+ .zf-marquee:hover .zf-marquee-track { animation-play-state: paused; }
20
+ .zf-marquee-item { padding-right: 3rem; }
21
+ @keyframes zf-marquee-scroll {
22
+ from { transform: translateX(0); }
23
+ to { transform: translateX(-50%); }
24
+ }
25
+ @media (prefers-reduced-motion: reduce) {
26
+ .zf-marquee-track { animation: none; }
27
+ }
28
+ `;function o({config:a}){const t=a.accent?"text-highlight":"text-strong",n=s[a.speed];return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:m}),e.jsx("div",{className:"zf-marquee","aria-label":a.text,children:e.jsxs("div",{className:"zf-marquee-track",style:{animationDuration:`${n}s`},children:[e.jsx("span",{className:`zf-marquee-item metric-lg ${t}`,children:a.text}),e.jsx("span",{"aria-hidden":!0,className:`zf-marquee-item metric-lg ${t}`,children:a.text})]})})]})}const f=i({...r,component:o});export{f as marqueeFrame};
@@ -0,0 +1 @@
1
+ import{j as e}from"./react-qoZPGuNy.js";function n({label:t,meta:s,value:r}){return e.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-3 border-b border-white/[0.06] py-1.5 last:border-b-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"body-sm text-normal truncate font-semibold",children:t}),s!=null&&e.jsx("div",{className:"caption text-soft truncate",children:s})]}),e.jsx("div",{className:"metric-sm text-strong shrink-0",children:r})]})}export{n as M};
@@ -0,0 +1 @@
1
+ import{r as v,j as $}from"./react-qoZPGuNy.js";import{s as G,c as H,e as j,l as L,d as N,f as V,g as X}from"./d3-xK4fOkBU.js";import{c as q}from"./utils-DaT-yT0k.js";const Q=({data:n,width:l=120,height:g=40,color:d,className:R,variant:b="default"})=>{const h=v.useRef(null),{strokeColor:x,isPositive:y,variantType:p,customColor:m}=v.useMemo(()=>{var r,s;if(d)return{strokeColor:d,isPositive:!0,variantType:"custom",customColor:d};if(b==="auto"&&n.length>0){const f=((r=n[0])==null?void 0:r.value)??0,o=(((s=n[n.length-1])==null?void 0:s.value)??0)>=f;return{strokeColor:o?"var(--color-green-500)":"var(--color-red-500)",isPositive:o,variantType:o?"green":"red",customColor:void 0}}switch(b){case"green":return{strokeColor:"var(--color-green-500)",isPositive:!0,variantType:"green",customColor:void 0};case"red":return{strokeColor:"var(--color-red-500)",isPositive:!1,variantType:"red",customColor:void 0};case"blue":return{strokeColor:"#75A3FF",isPositive:!0,variantType:"blue",customColor:void 0};default:return{strokeColor:"var(--color-blue-600)",isPositive:!0,variantType:"blue",customColor:void 0}}},[d,b,n]),u=v.useMemo(()=>{if(!n||n.length===0)return[];const r=n.map(o=>({...o,date:new Date(o.date)})),s=Math.max(30,Math.floor(l/4));if(r.length<=s)return r;const f=Math.floor(r.length/s),a=[];for(let o=0;o<r.length;o+=f)a.push(r[o]);return a[a.length-1]!==r[r.length-1]&&a.push(r[r.length-1]),a},[n,l]);return v.useEffect(()=>{if(!h.current||!u.length)return;const r=G(h.current),s={top:2,right:0,bottom:2,left:0},f=l-s.left-s.right,a=g-s.top-s.bottom;r.selectAll("*").remove();const o=H().domain(j(u,t=>t.date)).range([0,f]),[C,k]=j(u,t=>t.value),W=(k-C)*.4,P=L().domain([C-W,k]).range([a,0]),E=N().x(t=>o(t.date)).y(t=>P(t.value)).curve(V),M=r.append("g").attr("transform",`translate(${s.left},${s.top})`),F=X().x(t=>o(t.date)).y0(a).y1(t=>P(t.value)).curve(V),T=`mini-chart-gradient-${Math.random().toString(36).slice(2,11)}`,i=r.append("defs").append("linearGradient").attr("id",T).attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%"),I=(t,c)=>{if(t.startsWith("var("))return t.includes("blue")?`rgba(59, 130, 246, ${c})`:t.includes("green")?`rgba(37, 255, 205, ${c})`:t.includes("red")?`rgba(239, 68, 68, ${c})`:`rgba(59, 130, 246, ${c})`;if(t.startsWith("#")){const e=t.slice(1),A=e.length===3?parseInt(e[0]+e[0],16):parseInt(e.slice(0,2),16),D=e.length===3?parseInt(e[1]+e[1],16):parseInt(e.slice(2,4),16),B=e.length===3?parseInt(e[2]+e[2],16):parseInt(e.slice(4,6),16);return`rgba(${A}, ${D}, ${B}, ${c})`}if(t.startsWith("rgb")){const e=t.match(/\d+/g);if(e&&e.length>=3)return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${c})`}return`rgba(59, 130, 246, ${c})`};p==="custom"&&m?(i.append("stop").attr("offset","45.9%").attr("stop-color",I(m,.16)),i.append("stop").attr("offset","96.67%").attr("stop-color",I(m,0))):p==="blue"?(i.append("stop").attr("offset","45.9%").attr("stop-color","rgba(7, 77, 215, 0.3)"),i.append("stop").attr("offset","96.67%").attr("stop-color","rgba(7, 77, 215, 0.3)")):p==="green"||y&&p!=="red"?(i.append("stop").attr("offset","45.9%").attr("stop-color","rgba(63, 194, 167, 0.1)"),i.append("stop").attr("offset","96.67%").attr("stop-color","rgba(63, 194, 167, 0)")):(i.append("stop").attr("offset","0%").attr("stop-color","rgba(255, 93, 127, 0.1)"),i.append("stop").attr("offset","91.8%").attr("stop-color","rgba(255, 63, 105, 0)")),M.append("path").datum(u).attr("fill",`url(#${T})`).attr("d",F),M.append("path").datum(u).attr("fill","none").attr("stroke",x).attr("stroke-width",1).attr("stroke-linecap","round").attr("stroke-linejoin","round").attr("d",E)},[u,l,g,x,y,p,m]),!n||n.length===0?$.jsx($.Fragment,{}):$.jsx("svg",{ref:h,width:l,height:g,viewBox:`0 0 ${l} ${g}`,className:q("h-auto max-w-full",R),style:{width:l,height:"auto"}})};export{Q as M};
@@ -0,0 +1 @@
1
+ import{r as f,j as a}from"./react-qoZPGuNy.js";import{b as h}from"./format-CfAcS4D8.js";import{f as P,aW as u,aX as g}from"./index-DbboK5sz.js";import{T as x,a as b}from"./treemap-leaf-DLQawrx4.js";import{F as p}from"./ui-Bq3RQsdJ.js";import"./utils-DaT-yT0k.js";import"./d3-xK4fOkBU.js";u.schema;function j({width:o,height:t,data:r}){const s=h(r.sharePct,1);return a.jsx(b,{width:o,height:t,label:r.id,secondary:s,title:`${r.id} · ${s} of blocks`})}function C({config:o}){const{pools:t,isLoading:r}=g(o.window),s=f.useMemo(()=>{const n=(t==null?void 0:t.pools)??[],l=n.slice(0,o.topN).map(e=>({id:e.name,value:e.blockCount,sharePct:e.sharePct})),i=n.slice(o.topN);if(i.length>0){const e=i.reduce((c,m)=>c+m.blockCount,0),d=i.reduce((c,m)=>c+m.sharePct,0);e>0&&l.push({id:"Other",value:e,sharePct:d})}return l},[t,o.topN]);return r?a.jsx(p,{loading:!0,children:"loading pools…"}):s.length===0?a.jsx(p,{children:"no mining data yet"}):a.jsx(x,{data:s,LeafComponent:j,getColorValue:n=>n.sharePct})}const y=P({...u,component:C});export{y as miningPoolsFrame};
@@ -0,0 +1 @@
1
+ import{j as t}from"./react-qoZPGuNy.js";import{A as m}from"./index-DbboK5sz.js";import{d as r,a as n,c as l}from"./format-CfAcS4D8.js";function c({symbol:i,label:a,price:s,changePct:o,logoSize:e=16,gap:d="gap-2"}){return t.jsxs("div",{className:`grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center ${d}`,title:s!==void 0?`${a} · ${r(s)}`:a,children:[t.jsx(m,{symbol:i,size:e}),t.jsx("span",{className:"body-sm truncate font-bold text-strong",children:a}),t.jsx("span",{className:"caption text-soft text-right tabular-nums",children:s!==void 0?r(s):"—"}),t.jsx("span",{className:`caption text-right font-bold tabular-nums${o===void 0?" text-disabled":""}`,style:o!==void 0?{color:l(o)}:void 0,children:o!==void 0?n(o):"…"})]})}export{c as M};
@@ -0,0 +1 @@
1
+ import{r as m,j as t}from"./react-qoZPGuNy.js";import{f as a}from"./format-CfAcS4D8.js";import{f as x,M as o,O as h}from"./index-DbboK5sz.js";import{F as l}from"./ui-Bq3RQsdJ.js";import{M as p}from"./mini-line-chart-D-i1QqSe.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";o.schema;function u({config:n}){const{debt:e,isLoading:d}=h(n.trendDays),c=m.useMemo(()=>((e==null?void 0:e.trend)??[]).map(r=>({date:new Date(r.time).toISOString(),value:r.total})),[e==null?void 0:e.trend]);if(d)return t.jsx(l,{loading:!0,children:"loading national debt…"});if(!e)return t.jsx(l,{children:"no debt data yet"});const s=e.trend[0],i=s?e.total-s.total:null;return t.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{children:[t.jsx("div",{className:"caption text-soft uppercase",children:"total public debt"}),t.jsxs("div",{className:"body-sm text-normal",children:["as of ",e.date]})]}),t.jsx("div",{className:"caption text-soft text-right",children:"daily"})]}),t.jsxs("div",{className:"flex items-end justify-between gap-3",children:[t.jsx("div",{className:"metric-xl text-strong leading-none",children:a(e.total)}),i!==null&&s&&t.jsxs("div",{className:"text-right",children:[t.jsxs("div",{className:"body-md text-normal font-bold tabular-nums",children:[i>=0?"+":"",a(i)]}),t.jsxs("div",{className:"caption text-soft",children:["since ",s.date]})]})]}),t.jsx(p,{data:c,width:210,height:42,color:"hsl(var(--zf-accent-hue, 242) 85% 72%)"}),n.showSplit&&t.jsxs("div",{className:"grid grid-cols-2 gap-1.5 border-t border-white/[0.08] pt-2",children:[t.jsxs("div",{className:"rounded bg-white/[0.04] px-2 py-1.5",children:[t.jsx("div",{className:"caption text-soft truncate",children:"Held by public"}),t.jsx("div",{className:"body-sm text-strong font-bold tabular-nums",children:a(e.heldByPublic)})]}),t.jsxs("div",{className:"rounded bg-white/[0.04] px-2 py-1.5",children:[t.jsx("div",{className:"caption text-soft truncate",children:"Intragovernmental"}),t.jsx("div",{className:"body-sm text-strong font-bold tabular-nums",children:a(e.intragovernmental)})]})]})]})}const w=x({...o,component:u});export{w as nationalDebtFrame};
@@ -0,0 +1 @@
1
+ import{j as s,r as u}from"./react-qoZPGuNy.js";import{F as h}from"./feed-row-mVg1d5Zj.js";import{t as f}from"./format-CfAcS4D8.js";import{f as p,Y as i,Z as x}from"./index-DbboK5sz.js";import{F as t,s as b}from"./ui-Bq3RQsdJ.js";i.schema;const j={coindesk:"CoinDesk",cointelegraph:"Cointelegraph",decrypt:"Decrypt",cnbc:"CNBC Markets",nasdaq:"Nasdaq",stocks:"Google News"};function g({src:e}){const[r,a]=u.useState(!1);return r?null:s.jsx("img",{src:e,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",onError:()=>a(!0),className:"size-12 shrink-0 rounded-md bg-white/[0.04] object-cover ring-1 ring-white/10"})}function y({item:e}){return s.jsx(h,{href:e.url,leading:e.imageUrl?s.jsx(g,{src:e.imageUrl}):void 0,title:e.title,subtitle:e.summary||void 0,meta:e.publishedAt!==void 0?f(e.publishedAt):void 0})}function w({config:e}){var n;const r=e.source==="stocks",a=r&&e.symbols.length===0,c=a?"":e.source,{items:o,isLoading:d}=x(c,r?e.symbols:void 0,e.count);if(a)return s.jsx(t,{children:"add stock symbols to show company headlines"});if(d)return s.jsx(t,{loading:!0,children:"loading headlines…"});const m=((n=o[0])==null?void 0:n.source)??j[e.source]??"news";return s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[s.jsx("span",{className:"caption text-soft truncate",children:m}),s.jsx("span",{className:"caption text-soft shrink-0",children:"headlines"})]}),s.jsx("div",{className:b,children:o.length>0?o.map(l=>s.jsx(y,{item:l},l.url)):s.jsxs(t,{children:["no headlines ",r?"for these symbols":"available"," — the runtime proxy may be offline"]})})]})}const S=p({...i,component:w});export{S as newsFeedFrame};
@@ -0,0 +1 @@
1
+ import{r as a,j as c}from"./react-qoZPGuNy.js";import{f,_ as m,m as d}from"./index-DbboK5sz.js";import{s as p}from"./ui-Bq3RQsdJ.js";m.schema;function h({config:e}){const t=d(),[n,o]=a.useState(!1),[r,l]=a.useState(e.text),i=a.useRef(null);a.useEffect(()=>{l(e.text)},[e.text]),a.useEffect(()=>{var s;n&&((s=i.current)==null||s.focus())},[n]);const u=a.useCallback(()=>{r!==e.text&&(t==null||t({text:r})),o(!1)},[t,r,e.text]),x=e.align==="center"?"flex items-center justify-center text-center":"";return n?c.jsx("textarea",{ref:i,className:`body-sm text-normal h-full w-full resize-none bg-transparent outline-none placeholder:text-disabled ${x}`,value:r,onChange:s=>l(s.target.value),onBlur:u,onKeyDown:s=>{s.key==="Escape"&&(l(e.text),o(!1))},placeholder:"Write a note…"}):c.jsx("div",{className:`body-sm text-normal whitespace-pre-wrap ${p} ${x} ${t?"cursor-text":""}`,onClick:()=>t&&o(!0),title:t?"Click to edit":void 0,children:e.text||c.jsx("span",{className:"text-soft italic",children:t?"Click to add a note…":"New note"})})}const b=f({...m,component:h});export{b as noteFrame};
@@ -0,0 +1 @@
1
+ import{r as n,j as e}from"./react-qoZPGuNy.js";import{f as p,aw as l,ax as x,A as f,h as u}from"./index-DbboK5sz.js";import{f as r}from"./format-CfAcS4D8.js";import{F as i,s as h}from"./ui-Bq3RQsdJ.js";l.schema;const b=25;function g({config:m}){const{entries:a,isLoading:c}=x(m.symbols),t=n.useMemo(()=>a.slice(0,b),[a]),o=n.useMemo(()=>t.reduce((s,d)=>Math.max(s,d.openInterestUsd),0),[t]);return c?e.jsx(i,{loading:!0,children:"loading open interest…"}):t.length===0?e.jsx(i,{children:"no open-interest data"}):e.jsx("div",{className:`flex flex-col gap-1.5 ${h}`,children:t.map(s=>e.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2",title:`${s.symbol} · ${r(s.openInterestUsd)} open interest`,children:[e.jsx(f,{symbol:s.symbol,size:16}),e.jsxs("div",{className:"relative h-4 w-full overflow-hidden rounded-sm bg-white/[0.06]",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 rounded-sm",style:{width:`${o>0?s.openInterestUsd/o*100:0}%`,background:"hsl(var(--zf-accent-hue, 242) 85% 72% / 0.5)"}}),e.jsx("span",{className:"absolute inset-y-0 left-1.5 flex items-center",children:e.jsx("span",{className:"body-sm truncate font-bold text-strong",children:u(s.symbol)})})]}),e.jsx("span",{className:"caption text-soft text-right tabular-nums",children:r(s.openInterestUsd)})]},s.symbol))})}const w=p({...l,component:g});export{w as openInterestFrame};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./react-qoZPGuNy.js";import{c as x}from"./format-CfAcS4D8.js";import{f as p,b0 as m,b1 as v}from"./index-DbboK5sz.js";import{F as c}from"./ui-Bq3RQsdJ.js";import{M as f}from"./mini-line-chart-D-i1QqSe.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";m.schema;const j={"7D":{ms:7*864e5,res:3600},"1M":{ms:30*864e5,res:43200},"3M":{ms:90*864e5,res:86400}};function g({config:a}){const{ms:i,res:o}=j[a.lookback],d=l.useMemo(()=>{const t=o*1e3;return Math.floor((Date.now()-i)/t)*t},[i,o]),{points:s,isLoading:h}=v(a.currency,d,o),u=l.useMemo(()=>s.map(t=>({date:new Date(t.time).toISOString(),value:t.value})),[s]);if(h)return e.jsx(c,{loading:!0,children:"loading volatility…"});if(s.length===0)return e.jsx(c,{children:"no volatility data yet"});const n=s[s.length-1].value,r=n-s[0].value;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"caption text-soft uppercase",children:[a.currency," DVOL · implied vol"]}),e.jsx("div",{className:"metric-lg text-strong leading-none",children:n.toFixed(1)})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:"body-md font-bold tabular-nums",style:{color:x(r)},children:[r>=0?"+":"",r.toFixed(1)]}),e.jsxs("div",{className:"caption text-soft",children:["past ",a.lookback]})]})]}),e.jsx(f,{data:u,width:320,height:54,color:"hsl(var(--zf-accent-hue, 242) 85% 72%)"})]})}const O=p({...m,component:g});export{O as optionsIvFrame};
@@ -0,0 +1 @@
1
+ import{r as L,j as t}from"./react-qoZPGuNy.js";import{U as S,D as E,e as v,d as F}from"./format-CfAcS4D8.js";import{f as P,b2 as N,a$ as R}from"./index-DbboK5sz.js";import{F as g}from"./ui-Bq3RQsdJ.js";N.schema;const w=S,M=E;function B({config:h}){const{summary:p,isLoading:W}=R(h.currency),j=L.useMemo(()=>{if(!p)return null;const s=p.underlyingPrice,x=p.nearestExpiry.strikes;if(x.length===0)return null;const n=[...x].sort((r,y)=>Math.abs(r.strike-s)-Math.abs(y.strike-s)).slice(0,h.strikes).sort((r,y)=>r.strike-y.strike),d=Math.max(1,...n.map(r=>Math.max(r.callOi,r.putOi)));return{near:n,maxOi:d,spot:s,expiry:p.nearestExpiry.expiry}},[p,h.strikes]);if(W)return t.jsx(g,{loading:!0,children:"loading strikes…"});if(!j)return t.jsx(g,{children:"no options data yet"});const{near:e,maxOi:C,spot:a,expiry:H}=j,f=600,O=200,i=6,o=O-i-4,m=e.length,u=f/m,k=Math.max(2,u*.34),l=s=>s*u+u/2,b=s=>s/C*o;let c=null;if(a<=e[0].strike)c=l(0);else if(a>=e[m-1].strike)c=l(m-1);else for(let s=0;s<m-1;s++)if(a>=e[s].strike&&a<=e[s+1].strike){const x=e[s+1].strike-e[s].strike||1,n=(a-e[s].strike)/x;c=l(s)+n*(l(s+1)-l(s));break}return t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsxs("div",{className:"caption text-soft mb-1 flex justify-between",children:[t.jsxs("span",{children:["OI by strike · ",H]}),t.jsxs("span",{children:[t.jsx("span",{style:{color:w},children:"calls"})," ·"," ",t.jsx("span",{style:{color:M},children:"puts"})]})]}),t.jsxs("svg",{viewBox:`0 0 ${f} ${O}`,preserveAspectRatio:"none",className:"min-h-0 w-full flex-1",children:[t.jsx("line",{x1:0,y1:i+o,x2:f,y2:i+o,style:{stroke:"var(--color-disabled)"},strokeWidth:1}),e.map((s,x)=>{const n=l(x),d=b(s.callOi),r=b(s.putOi);return t.jsxs("g",{children:[t.jsx("rect",{x:n-k-1,y:i+o-d,width:k,height:d,fill:w}),t.jsx("rect",{x:n+1,y:i+o-r,width:k,height:r,fill:M})]},s.strike)}),c!==null&&t.jsx("line",{x1:c,y1:i,x2:c,y2:i+o,style:{stroke:"var(--color-soft)"},strokeWidth:1,strokeDasharray:"4 3"})]}),t.jsxs("div",{className:"caption text-soft mt-1 flex justify-between tabular-nums",children:[t.jsx("span",{children:v(e[0].strike)}),t.jsxs("span",{className:"text-normal",children:["spot ",F(a)]}),t.jsx("span",{children:v(e[m-1].strike)})]})]})}const _=P({...N,component:B});export{_ as optionsOiStrikeFrame};
@@ -0,0 +1 @@
1
+ import{j as s}from"./react-qoZPGuNy.js";import{U as h,D as f,b as e}from"./format-CfAcS4D8.js";import{f as j,a_ as u,a$ as v}from"./index-DbboK5sz.js";import{F as d}from"./ui-Bq3RQsdJ.js";u.schema;const i=h,o=f;function y(t){return t>1?o:i}function O({config:t}){const{summary:l,isLoading:m}=v(t.currency);if(m)return s.jsx(d,{loading:!0,children:"loading options…"});if(!l)return s.jsx(d,{children:"no options data yet"});const n=t.basis==="oi"?l.putCallRatioOi:l.putCallRatioVolume,x=t.basis==="oi"?l.putCallRatioVolume:l.putCallRatioOi,r=l.callOi+l.putOi,a=r>0?l.callOi/r*100:50,c=100-a,p=y(n);return s.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-center gap-3",children:[s.jsxs("div",{className:"flex items-end justify-between gap-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"caption text-soft uppercase",children:[t.currency," put/call · ",t.basis==="oi"?"OI":"vol"]}),s.jsx("div",{className:"metric-xl leading-none",style:{color:p},children:n.toFixed(2)})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"body-md text-normal font-bold tabular-nums",children:x.toFixed(2)}),s.jsxs("div",{className:"caption text-soft",children:["by ",t.basis==="oi"?"volume":"OI"]})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex h-3 w-full gap-1 overflow-hidden rounded-full",children:[s.jsx("div",{className:"h-full rounded-l-full",style:{width:`${a}%`,background:i}}),s.jsx("div",{className:"h-full rounded-r-full",style:{width:`${c}%`,background:o}})]}),s.jsxs("div",{className:"caption text-soft mt-1 flex justify-between tabular-nums",children:[s.jsxs("span",{children:[s.jsx("span",{style:{color:i},children:"calls"})," ",e(a,0)]}),s.jsxs("span",{children:[e(c,0)," ",s.jsx("span",{style:{color:o},children:"puts"})]})]})]}),s.jsxs("div",{className:"caption text-soft",children:["avg implied vol ",e(l.avgIv,1)]})]})}const g=j({...u,component:O});export{g as optionsPutCallFrame};
@@ -0,0 +1 @@
1
+ import{r,j as s}from"./react-qoZPGuNy.js";import{i as k}from"./content-shared-BZ1XzrJx.js";import{f as w,ba as y}from"./index-DbboK5sz.js";y.schema;function M(e){const t=Math.floor(e/60),a=e%60;return`${t}:${String(a).padStart(2,"0")}`}function R({config:e}){const t=Math.max(1,Math.round(e.workMin*60)),a=Math.max(1,Math.round(e.breakMin*60)),[n,c]=r.useState("work"),[b,o]=r.useState(t),[l,i]=r.useState(!1),[u,m]=r.useState(1);r.useEffect(()=>{c("work"),o(t),i(!1),m(1)},[t,a]);const p=r.useRef(n);p.current=n;const x=r.useRef(u);x.current=u,r.useEffect(()=>{if(!l)return;const f=setInterval(()=>{o(h=>h>1?h-1:p.current==="work"?(c("break"),a):(c("work"),m(S=>x.current>=e.cycles?1:S+1),t))},1e3);return()=>clearInterval(f)},[l,t,a,e.cycles]);const j=()=>{i(!1),c("work"),o(t),m(1)},d=e.label.trim(),v=n==="work"?"var(--color-highlight)":void 0;return s.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1",children:[d&&s.jsx("div",{className:"caption text-soft uppercase tracking-[0.12em]",children:d}),s.jsxs("div",{className:"caption text-soft uppercase tracking-[0.18em]",children:[n," · ",u,"/",e.cycles]}),s.jsx("div",{className:"metric-xl text-strong",style:{color:v},children:M(b)}),s.jsxs("div",{className:"mt-1 flex gap-1",children:[s.jsx("button",{type:"button",onClick:()=>i(f=>!f),className:`caption text-normal px-3 py-1 ${k}`,children:l?"Pause":"Start"}),s.jsx("button",{type:"button",onClick:j,className:`caption text-soft px-3 py-1 ${k}`,children:"Reset"})]})]})}const $=w({...y,component:R});export{$ as pomodoroFrame};
@@ -0,0 +1 @@
1
+ import{r as m,j as t}from"./react-qoZPGuNy.js";import{f as R,g as j,h as A}from"./index-DbboK5sz.js";import{f as v,b as S}from"./format-CfAcS4D8.js";import{P as F,u as M,a as G}from"./portfolio-common-CVt117Oi.js";import{F as P}from"./ui-Bq3RQsdJ.js";import{C as y}from"./chart-utils-BYIZMM9J.js";import{s as p,p as E,a as h,o as _}from"./d3-xK4fOkBU.js";const B=["#FF1F5F","#81FE90"],L=({data:a,width:r=270,height:o=270,innerRadius:s=90,outerRadius:n=100,colors:e=B,children:l})=>{const d=m.useRef(null);return m.useEffect(()=>{if(!d.current||!a.length)return;p(d.current).selectAll("*").remove();const g=p(d.current),b=r/2,N=o/2,u=g.append("defs");u.append("filter").attr("id","glow").append("feGaussianBlur").attr("stdDeviation","3").attr("result","coloredBlur"),u.select("#glow").append("feMerge").selectAll("feMergeNode").data(["coloredBlur","SourceGraphic"]).enter().append("feMergeNode").attr("in",i=>i),u.append("filter").attr("id","glow-layer").append("feGaussianBlur").attr("stdDeviation","6").attr("result","glowBlur"),u.select("#glow-layer").append("feColorMatrix").attr("type","matrix").attr("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.5 0").attr("result","glowColor");const k=E().value(i=>i.value).padAngle(.02),w=h().innerRadius(s).outerRadius(n).cornerRadius(100),C=h().innerRadius(s).outerRadius(n).cornerRadius(100),x=_().domain(a.map((i,c)=>c.toString())).range(e),f=g.append("g").attr("transform",`translate(${b}, ${N})`).selectAll("g").data(k(a)).enter().append("g");f.append("path").attr("class","glow-layer").attr("d",C).attr("fill",(i,c)=>x(c.toString())).attr("filter","url(#glow-layer)").style("opacity",0).style("pointer-events","none"),f.append("path").attr("class","main-slice").attr("d",w).attr("fill",(i,c)=>x(c.toString())).attr("stroke","none"),f.on("mouseenter",function(){p(this).select(".glow-layer").transition().duration(300).style("opacity",1)}).on("mouseleave",function(){p(this).select(".glow-layer").transition().duration(300).style("opacity",0)})},[a,r,o,s,n,e]),t.jsxs("div",{className:"relative flex flex-col items-center justify-center rounded-full",style:{background:"linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%)"},children:[t.jsx("svg",{ref:d,width:r,height:o,className:"relative z-10"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:l}),t.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-full",style:{background:"linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%)",maskImage:"radial-gradient(farthest-side, transparent calc(100% - 1px),#fff 0)",WebkitMaskComposite:"destination-out",maskComposite:"exclude"}}),t.jsx("div",{className:"pointer-events-none absolute inset-[10%] rounded-full",style:{background:"linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%)",maskImage:"radial-gradient(farthest-side, transparent calc(100% - 1px),#fff 0)",WebkitMaskComposite:"destination-out",maskComposite:"exclude"}})]})};j.schema;function O({portfolio:a,config:r}){const{priced:o}=M(a.holdings),s=m.useMemo(()=>o.map((e,l)=>({name:A(e.symbol),value:e.value??0,color:y[l%y.length]})).filter(e=>e.value>0).sort((e,l)=>l.value-e.value),[o]),n=s.reduce((e,l)=>e+l.value,0);return s.length===0?t.jsx(P,{children:"no live prices yet"}):t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-4",children:[t.jsx(L,{data:s,width:200,height:200,innerRadius:58,outerRadius:92,colors:s.map(e=>e.color),children:t.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[t.jsx(G,{portfolio:a,config:r,className:"caption text-soft"}),t.jsx("span",{className:"metric-lg text-strong",children:v(n)})]})}),t.jsx("div",{className:"flex w-full max-w-xs flex-wrap justify-center gap-x-5 gap-y-1.5",children:s.map(e=>t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full",style:{background:e.color}}),t.jsx("span",{className:"body-sm text-soft",children:e.name}),t.jsx("span",{className:"body-sm text-normal font-bold tabular-nums",children:S(e.value/n*100,1)}),t.jsx("span",{className:"caption text-soft tabular-nums",children:v(e.value)})]},e.name))})]})}function I({config:a}){return t.jsx(F,{config:a,loadingLabel:"loading allocation…",children:r=>t.jsx(O,{portfolio:r,config:a})})}const Y=R({...j,component:I});export{Y as portfolioAllocationFrame};
@@ -0,0 +1 @@
1
+ import{j as s,r as d}from"./react-qoZPGuNy.js";import{j as b,k as j,l as g,A as y,m as w}from"./index-DbboK5sz.js";import{F as h}from"./ui-Bq3RQsdJ.js";function P(n){if(n.source==="wallet"){const o=(n.address??"").trim();return o?{kind:"wallet",address:o}:null}return{kind:"binance"}}const C={WETH:"ETH",WBTC:"BTC"};function x(n){return C[n.toUpperCase()]??n}function D(n){const o=n??[],r=o.map(e=>x(e.symbol)),l=j(r);return d.useMemo(()=>{const e=o.map(a=>{const u=l[x(a.symbol)],c=u!==void 0?a.amount*u:a.valueUsd;return{...a,value:c}}),i=e.reduce((a,u)=>a+(u.value??0),0);return{priced:e,total:i}},[n,l])}function _({portfolio:n,config:o,className:r=""}){var i;const l=n.label??(o.source==="wallet"?"wallet":"portfolio"),e=(i=o.address)==null?void 0:i.trim();return o.source==="wallet"&&e?s.jsx("a",{href:`https://etherscan.io/address/${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",title:"View on Etherscan",className:`hover:text-white hover:underline ${r}`,onClick:a=>a.stopPropagation(),onPointerDown:a=>a.stopPropagation(),children:l}):s.jsx("span",{className:r,children:l})}function v(n,o){const r=(n==null?void 0:n.kind)==="binance",[l,e]=d.useState({loading:r,connected:!1,keyMasked:null});return d.useEffect(()=>{if(!r||!n){e({loading:!1,connected:!1,keyMasked:null});return}let i=!1;return e(a=>({...a,loading:!0})),fetch(`${g}?source=${n.kind}`,{headers:{accept:"application/json"}}).then(a=>a.ok?a.json():{connected:!1,keyMasked:null}).then(a=>{i||e({loading:!1,connected:!!a.connected,keyMasked:a.keyMasked??null})}).catch(()=>{i||e({loading:!1,connected:!1,keyMasked:null})}),()=>{i=!0}},[r,n==null?void 0:n.kind,o]),l}function N(n){const[o,r]=d.useState(0),l=d.useCallback(()=>r(p=>p+1),[]),e=P(n),i=v(e,o),a=(e==null?void 0:e.kind)==="binance",u=!!e&&(!a||i.connected),{portfolio:c,isLoading:f}=b(u?e:null);let t;return e?a&&i.loading?t={state:"checking"}:a&&!i.connected?t={state:"needs-connect",source:e}:f&&!c?t={state:"loading"}:c?c.holdings.length===0?t={state:"empty",portfolio:c}:t={state:"live",portfolio:c}:t={state:"error"}:t={state:"needs-address"},{view:t,refresh:l}}const m="w-full rounded-md border border-white/10 bg-white/[0.04] px-2 py-1.5 text-xs text-white/90 outline-none focus:border-white/25 placeholder:text-white/30",k="rounded-md bg-[hsl(var(--zf-accent-hue,242)_90%_60%)] px-3 py-1.5 text-xs font-semibold text-white disabled:opacity-50";function S({onConnected:n}){const[o,r]=d.useState(""),[l,e]=d.useState(""),[i,a]=d.useState(!1),[u,c]=d.useState(null),f=async()=>{a(!0),c(null);try{const t=await fetch(g,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({source:"binance",key:o.trim(),secret:l.trim()})}),p=await t.json().catch(()=>({}));if(!t.ok||!p.ok)throw new Error(p.error??`HTTP ${t.status}`);r(""),e(""),n()}catch(t){c(t instanceof Error?t.message:String(t))}finally{a(!1)}};return s.jsxs("div",{className:"flex h-full w-full flex-col justify-center gap-2 px-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(y,{symbol:"BNB",size:18}),s.jsx("span",{className:"text-strong text-sm font-bold",children:"Connect Binance"})]}),s.jsxs("p",{className:"caption text-soft",children:["Use a ",s.jsx("strong",{children:"read-only"})," key + secret — create them in Binance"," ",s.jsx("a",{href:"https://www.binance.com/en/my/settings/api-management",target:"_blank",rel:"noopener noreferrer",className:"text-[hsl(var(--zf-accent-hue,242)_90%_72%)] underline underline-offset-2 hover:text-white",onClick:t=>t.stopPropagation(),onPointerDown:t=>t.stopPropagation(),children:"API Management"})," ","(enable Reading only). Both stay on your machine, never shared."]}),s.jsx("input",{className:m,placeholder:"API key",value:o,autoComplete:"off",onChange:t=>r(t.target.value),onPointerDown:t=>t.stopPropagation()}),s.jsx("input",{className:m,placeholder:"API secret",type:"password",value:l,autoComplete:"off",onChange:t=>e(t.target.value),onPointerDown:t=>t.stopPropagation()}),u?s.jsx("p",{className:"caption text-[#ff6b81]",children:u}):null,s.jsx("button",{type:"button",className:k,disabled:i||!o.trim()||!l.trim(),onClick:t=>{t.stopPropagation(),f()},onPointerDown:t=>t.stopPropagation(),children:i?"Verifying…":"Connect"})]})}function E({current:n}){const o=w(),[r,l]=d.useState(n??"");return s.jsxs("div",{className:"flex h-full w-full flex-col justify-center gap-2 px-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(y,{symbol:"ETH",size:18}),s.jsx("span",{className:"text-strong text-sm font-bold",children:"Track a wallet"})]}),s.jsx("p",{className:"caption text-soft",children:"Enter a public Ethereum address or ENS name. No keys — it’s public on-chain data. Sharing this dashboard reveals the holdings."}),s.jsx("input",{className:m,placeholder:"0x… or name.eth",value:r,autoComplete:"off",onChange:e=>l(e.target.value),onPointerDown:e=>e.stopPropagation()}),o?s.jsx("button",{type:"button",className:k,disabled:!r.trim(),onClick:e=>{e.stopPropagation(),o({address:r.trim()})},onPointerDown:e=>e.stopPropagation(),children:"Track"}):s.jsx("p",{className:"caption text-soft",children:"Set the address in the frame’s config to start tracking."})]})}function I({config:n,loadingLabel:o="loading portfolio…",children:r}){const{view:l,refresh:e}=N(n);switch(l.state){case"needs-address":case"needs-connect":return s.jsx(T,{view:l,config:n,onConnected:e});case"checking":case"loading":return s.jsx(h,{loading:!0,children:o});case"error":return s.jsx(h,{children:"couldn’t load — check the address or try again"});case"empty":return s.jsx(h,{children:"no holdings to show"});case"live":return s.jsx(s.Fragment,{children:r(l.portfolio)})}}function T({view:n,config:o,onConnected:r}){return n.state==="needs-connect"&&n.source.kind==="binance"?s.jsx(S,{onConnected:r}):s.jsx(E,{current:o.address})}export{I as P,_ as a,D as u};
@@ -0,0 +1 @@
1
+ import{j as s,r as m}from"./react-qoZPGuNy.js";import{f as d,i as n,A as x,h as f}from"./index-DbboK5sz.js";import{f as i,b as h,a as p,c as u}from"./format-CfAcS4D8.js";import{P as b,u as g,a as j}from"./portfolio-common-CVt117Oi.js";import{s as N}from"./ui-Bq3RQsdJ.js";n.schema;function y(t){return t>=1e3?t.toLocaleString("en-US",{maximumFractionDigits:2}):t>=1?t.toFixed(4).replace(/\.?0+$/,""):t.toPrecision(4)}function v({portfolio:t,config:a}){const{priced:l,total:r}=g(t.holdings),c=m.useMemo(()=>[...l].sort((e,o)=>(o.value??0)-(e.value??0)),[l]);return s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-2",children:[s.jsxs("div",{className:"flex items-baseline justify-between border-b border-white/[0.06] pb-1.5",children:[s.jsx(j,{portfolio:t,config:a,className:"caption text-soft"}),s.jsx("span",{className:"metric-sm text-strong",children:i(r)})]}),s.jsx("div",{className:N,children:s.jsx("table",{className:"w-full text-xs",children:s.jsx("tbody",{children:c.map(e=>{const o=r>0?(e.value??0)/r*100:0;return s.jsxs("tr",{className:"border-b border-white/[0.04]",children:[s.jsx("td",{className:"py-1.5",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(x,{symbol:e.symbol,size:16}),s.jsx("span",{className:"text-normal font-semibold",children:f(e.symbol)})]})}),s.jsx("td",{className:"text-soft py-1.5 text-right tabular-nums",children:y(e.amount)}),s.jsx("td",{className:"text-normal py-1.5 text-right font-semibold tabular-nums",children:e.value!==void 0?i(e.value):"—"}),s.jsx("td",{className:"text-soft py-1.5 text-right tabular-nums",children:h(o,1)}),s.jsx("td",{className:"py-1.5 text-right tabular-nums",children:e.changePct24h!==void 0?s.jsx("span",{style:{color:u(e.changePct24h)},children:p(e.changePct24h)}):s.jsx("span",{className:"text-soft",children:"·"})})]},e.symbol)})})})})]})}function P({config:t}){return s.jsx(b,{config:t,loadingLabel:"loading holdings…",children:a=>s.jsx(v,{portfolio:a,config:t})})}const L=d({...n,component:P});export{L as portfolioHoldingsFrame};
@@ -0,0 +1 @@
1
+ import{j as e,r as n}from"./react-qoZPGuNy.js";import{L as y}from"./liveline-C5zt2WuS.js";import{f as j,a as E,c as S}from"./format-CfAcS4D8.js";import{P as C,u as I,a as L}from"./portfolio-common-CVt117Oi.js";import{f as V,p as N}from"./index-DbboK5sz.js";import"./ui-Bq3RQsdJ.js";const w=720,A=1e3,f=3,D={top:12,right:66,bottom:28,left:8};N.schema;function R(){return typeof document>"u"?"hsl(242 90% 66%)":`hsl(${getComputedStyle(document.documentElement).getPropertyValue("--zf-accent-hue").trim()||"242"} 90% 66%)`}function _({portfolio:a,config:c,windowSec:d}){var b;const{total:t}=I(a.holdings),h=n.useMemo(()=>R(),[]),[s,M]=n.useState([]),x=n.useRef(t);n.useEffect(()=>{x.current=t},[t]);const i=n.useCallback(()=>{const o=x.current;if(!Number.isFinite(o)||o<=0)return;const r=Date.now()/1e3;M(l=>{const m=l[l.length-1];if(m&&Math.abs(r-m.time)<.5&&m.value===o)return l;const u=l.length===0?[{time:r-f,value:o},{time:r,value:o}]:[...l,{time:r,value:o}];return u.length>w?u.slice(-w):u})},[]);n.useEffect(()=>{i()},[i,t]),n.useEffect(()=>{const o=window.setInterval(i,A);return()=>window.clearInterval(o)},[i]);const p=(b=s[0])==null?void 0:b.value,g=p&&t?(t/p-1)*100:0,P=n.useMemo(()=>s.length===0?[]:[{id:"equity",label:"Portfolio",color:h,data:s,value:t}],[s,t,h]),v=n.useMemo(()=>{if(s.length===0)return f;const o=s[s.length-1].time-s[0].time;return Math.min(d,Math.max(f,Math.ceil(o)))},[s,d]);return e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsxs("div",{className:"flex flex-none items-baseline justify-between border-b border-white/[0.06] pb-2",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx(L,{portfolio:a,config:c,className:"caption text-soft"}),e.jsx("span",{className:"metric-md text-strong",children:j(t)})]}),e.jsxs("span",{className:"body-sm font-semibold tabular-nums",style:{color:S(g)},children:[E(g)," ",e.jsx("span",{className:"caption text-soft",children:"session"})]})]}),e.jsx("div",{className:"min-h-0 flex-1 [&>div[style*='align-items']]:!hidden",children:e.jsx(y,{data:[],value:t,series:P,theme:"dark",window:v,grid:!0,loading:s.length<=1,scrub:!1,badge:!1,formatValue:j,padding:D,style:{width:"100%",height:"100%"}})})]})}function F({config:a}){return e.jsx(C,{config:a,loadingLabel:"loading portfolio…",children:c=>e.jsx(_,{portfolio:c,config:a,windowSec:a.windowSec})})}const H=V({...N,component:F});export{H as portfolioValueFrame};
@@ -0,0 +1 @@
1
+ import{j as c,r as i}from"./react-qoZPGuNy.js";import{L as x}from"./liveline-C5zt2WuS.js";import{f as C,$ as f,A as L,a0 as y,k as T}from"./index-DbboK5sz.js";import{d as b}from"./format-CfAcS4D8.js";import{F as E}from"./ui-Bq3RQsdJ.js";const u={"1m":6e4,"5m":5*6e4,"15m":15*6e4,"1h":60*6e4,"4h":240*6e4,"1d":1440*6e4},p=60,j={top:12,right:56,bottom:28,left:12};f.schema;function A({config:t}){const s=u[t.interval],g=i.useMemo(()=>Date.now()-s*p,[s]),{candles:n,isLoading:h}=y(t.symbol,t.interval,g,Math.min(s,6e4)),a=T([t.symbol])[t.symbol],[m,d]=i.useState([]);i.useEffect(()=>{a!==void 0&&d(e=>{const r=[...e,{time:Date.now()/1e3,value:a}];return r.length>900?r.slice(-600):r})},[a]),i.useEffect(()=>d([]),[t.symbol]);const w=i.useMemo(()=>n.slice(0,-1).map(e=>({time:e.time/1e3,open:e.open,high:e.high,low:e.low,close:e.close})),[n]),o=n[n.length-1],M=i.useMemo(()=>{if(!o)return;const e=a??o.close;return{time:o.time/1e3,open:o.open,high:Math.max(o.high,e),low:Math.min(o.low,e),close:e}},[o,a]),v=a??(o==null?void 0:o.close)??0,D=i.useMemo(()=>s>=u["1d"]?e=>new Date(e*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"}):s>=u["1h"]?e=>{const r=new Date(e*1e3);return`${r.toLocaleDateString("en-US",{month:"short",day:"numeric"})} ${String(r.getHours()).padStart(2,"0")}h`}:e=>new Date(e*1e3).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}),[s]),S=i.useMemo(()=>{const e=n.map(l=>({time:l.time/1e3,value:l.close}));if(m.length===0)return e;const r=m[0].time;return[...e.filter(l=>l.time<r),...m]},[n,m]);return h&&n.length===0?c.jsx(E,{loading:!0,children:"loading chart…"}):c.jsx("div",{className:"h-full min-h-0",children:c.jsx(x,{mode:t.mode,data:S,value:v,candles:w,candleWidth:s/1e3,liveCandle:M,window:s/1e3*p,color:t.color,theme:"dark",loading:h,formatValue:e=>b(e),formatTime:D,padding:j,showValue:!0,fill:!0,pulse:!0})})}const U=C({...f,component:A,titleIcon:({config:t})=>c.jsx(L,{symbol:t.symbol,size:14})});export{U as priceChartFrame};
@@ -0,0 +1 @@
1
+ import{r as c,j as t}from"./react-qoZPGuNy.js";import{f as v,a1 as f,a2 as L,a3 as O,h as j}from"./index-DbboK5sz.js";import{a as g,d as D}from"./format-CfAcS4D8.js";import{F as h}from"./ui-Bq3RQsdJ.js";import{a as s,C as u}from"./chart-utils-BYIZMM9J.js";import{M as E}from"./index-jnySFpSv.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";const F={"24h":{ms:1440*60*1e3,interval:"15m",timeframe:s["24h"]},"7D":{ms:10080*60*1e3,interval:"1h",timeframe:s["7D"]},"1M":{ms:720*60*60*1e3,interval:"4h",timeframe:s["1M"]}};f.schema;function I({config:a}){const{ms:m,interval:d,timeframe:C}=F[a.lookback],M=c.useMemo(()=>Date.now()-m,[m]),{candles:o,isLoading:S}=L(a.symbols,d,M),i=c.useMemo(()=>a.symbols.map((e,x)=>{var p;const n=o[e]??[],l=(p=n[0])==null?void 0:p.close;return{id:e,name:j(e),iconImageUrl:O(e),color:u[x%u.length],data:n.map(r=>({date:new Date(r.time).toISOString(),value:a.normalize&&l?(r.close/l-1)*100:r.close}))}}),[a.symbols,a.normalize,o]);return S?t.jsx(h,{loading:!0,children:"loading prices…"}):i.every(e=>e.data.length===0)?t.jsx(h,{children:"no price data yet"}):t.jsx(E,{series:i,timeframe:C,height:250,formatValue:a.normalize?e=>g(e):e=>D(e)})}const w=v({...f,component:I});export{w as priceCompareFrame};
@@ -0,0 +1 @@
1
+ import{r,j as l}from"./react-qoZPGuNy.js";import{L as R}from"./liveline-C5zt2WuS.js";import{f as F,a4 as k,k as T,v as H,h as y,A as W}from"./index-DbboK5sz.js";import{d as P,a as I,c as $}from"./format-CfAcS4D8.js";import{C as M}from"./chart-utils-BYIZMM9J.js";import"./d3-xK4fOkBU.js";const E=720,B=1e3,z=3,V={top:12,right:58,bottom:28,left:8};k.schema;function L(i){return i!==void 0&&Number.isFinite(i)}function G(i,s,w,h){let v=!1;const u={...i};for(const g of s){const d=w[g];if(!L(d))continue;const p=u[g]??[],m=p[p.length-1];if(m&&Math.abs(h-m.time)<.5&&m.value===d)continue;const x=p.length===0?[{time:h-z,value:d},{time:h,value:d}]:[...p,{time:h,value:d}];u[g]=x.length>E?x.slice(-E):x,v=!0}return v?u:i}function _(i,s){return s===0?0:(i/s-1)*100}function K({config:i}){const s=i.symbols,w=s.join("|"),h=T(s),v=H(s),[u,g]=r.useState({}),[d,p]=r.useState(()=>new Set),m=r.useMemo(()=>{var n;const e={};for(const t of s){const a=h[t]??((n=v[t])==null?void 0:n.markPx);L(a)&&(e[t]=a)}return e},[h,v,s]),x=r.useRef(m);r.useEffect(()=>{x.current=m},[m]),r.useEffect(()=>{const e=new Set(s);g(n=>{let t=!1;const a={};for(const[o,f]of Object.entries(n)){if(!e.has(o)){t=!0;continue}a[o]=f}return t?a:n}),p(n=>{const t=new Set([...n].filter(a=>e.has(a)));return t.size===n.size?n:t})},[w,s]);const A=r.useCallback(e=>{p(n=>{const t=new Set(n);return t.has(e)?(t.delete(e),t):s.length-t.size<=1?n:(t.add(e),t)})},[s]),S=r.useCallback(()=>{const e=x.current;if(Object.keys(e).length===0)return;const n=Date.now()/1e3;g(t=>G(t,s,e,n))},[w,s]);r.useEffect(()=>{S()},[S,m]),r.useEffect(()=>{const e=window.setInterval(S,B);return()=>window.clearInterval(e)},[S]);const N=r.useMemo(()=>s.flatMap((e,n)=>{var f,c;if(d.has(e))return[];const t=u[e]??[],a=(f=t[0])==null?void 0:f.value;if(!a||t.length===0)return[];const o=i.normalize?t.map(b=>({time:b.time,value:_(b.value,a)})):t;return[{id:e,label:y(e),color:M[n%M.length],data:o,value:((c=o[o.length-1])==null?void 0:c.value)??0}]}),[u,d,s,i.normalize]),D=r.useMemo(()=>{var a,o;let e=1/0,n=-1/0;for(const f of s){const c=u[f]??[];c.length!==0&&(e=Math.min(e,((a=c[0])==null?void 0:a.time)??1/0),n=Math.max(n,((o=c[c.length-1])==null?void 0:o.time)??-1/0))}const t=Number.isFinite(e)&&Number.isFinite(n)?n-e:0;return Math.min(i.windowSec,Math.max(z,Math.ceil(t)))},[u,s,i.windowSec]),O=N.some(e=>e.data.length>1);return l.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[l.jsx("div",{className:"grid flex-none grid-cols-1 gap-x-3 gap-y-1.5 border-b border-white/[0.06] pb-2 sm:grid-cols-2",children:s.map((e,n)=>{var b,C;const t=m[e],a=(C=(b=u[e])==null?void 0:b[0])==null?void 0:C.value,o=t!==void 0&&a?_(t,a):void 0,f=M[n%M.length],c=d.has(e);return l.jsxs("button",{type:"button","aria-pressed":!c,title:`${c?"Show":"Hide"} ${y(e)}`,className:`caption grid min-w-0 grid-cols-[auto_auto_minmax(0,1fr)_auto] items-center gap-1.5 rounded-md px-1.5 py-0.5 text-left transition ${c?"opacity-40 hover:opacity-70":"bg-white/[0.035] opacity-100 hover:bg-white/[0.06]"}`,onClick:j=>{j.stopPropagation(),A(e)},onPointerDown:j=>j.stopPropagation(),children:[l.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:f}}),l.jsx(W,{symbol:e,size:14}),l.jsx("span",{className:"truncate font-bold text-strong",children:y(e)}),l.jsxs("span",{className:"text-normal tabular-nums",children:[t!==void 0?P(t):"…",o!==void 0?l.jsx("span",{className:"ml-1 tabular-nums",style:{color:$(o)},children:I(o)}):null]})]},e)})}),l.jsx("div",{className:"min-h-0 flex-1 [&>div[style*='align-items']]:!hidden",children:l.jsx(R,{data:[],value:0,series:N,theme:"dark",window:D,grid:!0,loading:!O,scrub:!1,badge:!1,formatValue:i.normalize?I:P,padding:V,seriesToggleCompact:s.length>4,style:{width:"100%",height:"100%"}})})]})}const Z=F({...k,component:K});export{Z as priceLivelineFrame};
@@ -0,0 +1 @@
1
+ import{j as i}from"./react-qoZPGuNy.js";import{f as d,a5 as c,a6 as l,a7 as x,h as g}from"./index-DbboK5sz.js";import{M as f}from"./mover-row-BTeXB98H.js";import{F as u,s as h}from"./ui-Bq3RQsdJ.js";import"./format-CfAcS4D8.js";c.schema;function k({config:e}){const{mids:t,isLoading:m}=l(e.symbols),{stats:r,isLoading:n}=x(e.symbols),p=e.symbols.some(a=>{var s;return t[a]!==void 0||((s=r[a])==null?void 0:s.markPx)!==void 0});return(m||n)&&!p?i.jsx(u,{loading:!0,children:"loading prices…"}):i.jsx("div",{className:`flex flex-col gap-1.5 ${h}`,children:e.symbols.map(a=>{var s,o;return i.jsx(f,{symbol:a,label:g(a),price:t[a]??((s=r[a])==null?void 0:s.markPx),changePct:(o=r[a])==null?void 0:o.changePct,logoSize:18,gap:"gap-3"},a)})})}const L=d({...c,component:k});export{L as priceTickerFrame};
@@ -0,0 +1 @@
1
+ import{r as c,j as s}from"./react-qoZPGuNy.js";import{f as i}from"./format-CfAcS4D8.js";import{f as p,as as n,at as f}from"./index-DbboK5sz.js";import{T as l,a as u}from"./treemap-leaf-DLQawrx4.js";import{F as m}from"./ui-Bq3RQsdJ.js";import"./utils-DaT-yT0k.js";import"./d3-xK4fOkBU.js";n.schema;function h({width:r,height:a,data:o}){const t=i(o.fees24h);return s.jsx(u,{width:r,height:a,label:o.id,secondary:t,title:`${o.id} · ${t} 24h fees`})}function d({config:r}){const{entries:a,isLoading:o}=f(),t=c.useMemo(()=>a.slice(0,r.topN).map(e=>({id:e.name,value:e.fees24h,fees24h:e.fees24h,changePct:e.changePct??0})),[a,r.topN]);return o?s.jsx(m,{loading:!0,children:"loading protocol fees…"}):t.length===0?s.jsx(m,{children:"no protocol fee data"}):s.jsx(l,{data:t,LeafComponent:h,getColorValue:e=>e.changePct})}const L=p({...n,component:d});export{L as protocolFeesTreemapFrame};
@@ -0,0 +1 @@
1
+ import{r as n,j as e}from"./react-qoZPGuNy.js";import{p as C,f as M}from"./format-CfAcS4D8.js";import{f as S,aq as f,ar as T}from"./index-DbboK5sz.js";import{F as p}from"./ui-Bq3RQsdJ.js";import{a,C as c}from"./chart-utils-BYIZMM9J.js";import{M as v}from"./index-jnySFpSv.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";const x={"7D":{ms:10080*60*1e3,timeframe:a["7D"]},"1M":{ms:720*60*60*1e3,timeframe:a["1M"]},"3M":{ms:2160*60*60*1e3,timeframe:a["3M"]}};f.schema;function L({config:o}){const{ms:m,timeframe:u}=x[o.lookback],s=n.useMemo(()=>Date.now()-m,[m]),{history:i,isLoading:h}=T(o.protocols),l=n.useMemo(()=>o.protocols.map((t,d)=>({id:t,name:C(t),color:c[d%c.length],data:(i[t]??[]).filter(r=>r.time>=s).map(r=>({date:new Date(r.time).toISOString(),value:r.value}))})),[o.protocols,i,s]);return h?e.jsx(p,{loading:!0,children:"loading protocol TVL…"}):l.every(t=>t.data.length===0)?e.jsx(p,{children:"no protocol TVL data yet"}):e.jsx(v,{series:l,timeframe:u,height:250,formatValue:t=>M(t)})}const I=S({...f,component:L});export{I as protocolTvlChartFrame};
@@ -0,0 +1 @@
1
+ import{r as n,j as s}from"./react-qoZPGuNy.js";import{f as c}from"./format-CfAcS4D8.js";import{f as p,ao as l,ap as i}from"./index-DbboK5sz.js";import{T as f,a as u}from"./treemap-leaf-DLQawrx4.js";import{F as m}from"./ui-Bq3RQsdJ.js";import"./utils-DaT-yT0k.js";import"./d3-xK4fOkBU.js";l.schema;function T({width:r,height:a,data:t}){const e=c(t.tvl);return s.jsx(u,{width:r,height:a,label:t.id,secondary:e,title:`${t.id} · ${e} TVL`})}function d({config:r}){const{entries:a,isLoading:t}=i(),e=n.useMemo(()=>a.slice(0,r.topN).map(o=>({id:o.name,value:o.tvl,tvl:o.tvl,changePct:o.changePct??0})),[a,r.topN]);return t?s.jsx(m,{loading:!0,children:"loading protocol TVL…"}):e.length===0?s.jsx(m,{children:"no protocol TVL data"}):s.jsx(f,{data:e,LeafComponent:T,getColorValue:o=>o.changePct})}const C=p({...l,component:d});export{C as protocolTvlTreemapFrame};
@@ -0,0 +1 @@
1
+ import{r as s,j as t}from"./react-qoZPGuNy.js";import{f as u,aF as i}from"./index-DbboK5sz.js";i.schema;const c="var(--color-highlight)";function d({config:a}){const e=a.quotes,[r,l]=s.useState(0);s.useEffect(()=>l(0),[a.quotes]),s.useEffect(()=>{if(a.intervalSec<=0||e.length<=1)return;const o=window.setInterval(()=>l(n=>(n+1)%e.length),a.intervalSec*1e3);return()=>window.clearInterval(o)},[a.intervalSec,e.length]);const m=e[Math.min(r,e.length-1)]??"";return t.jsx("div",{className:"flex h-full w-full items-center justify-center [container-type:size]",children:t.jsxs("figure",{className:"relative max-h-full overflow-auto px-3 text-center",children:[t.jsx("span",{"aria-hidden":!0,className:"block font-dmsans font-black leading-none",style:{fontSize:"clamp(1.5rem, 14cqmin, 3rem)",color:c},children:"“"}),t.jsx("blockquote",{className:"body-md text-normal -mt-[0.3em] whitespace-pre-wrap italic leading-snug",style:{fontSize:"clamp(0.85rem, 8cqmin, 1.25rem)"},children:m}),e.length>1&&t.jsx("figcaption",{className:"mt-2 flex justify-center gap-1.5","aria-hidden":!0,children:e.map((o,n)=>t.jsx("span",{className:"h-1 w-1 rounded-full transition-colors",style:{background:n===Math.min(r,e.length-1)?c:"var(--color-disabled)"}},n))})]})})}const x=u({...i,component:d});export{x as quoteFrame};
@@ -0,0 +1 @@
1
+ import{j as e}from"./react-qoZPGuNy.js";import{b as a,f as g}from"./format-CfAcS4D8.js";import{M as v}from"./metric-row-BVVhjsjK.js";import{f as j,a8 as f,a9 as R,aa as y}from"./index-DbboK5sz.js";import{F as m}from"./ui-Bq3RQsdJ.js";f.schema;function b({config:t}){var c,d;const{rates:i,isLoading:x}=R(),{rates:o,isLoading:u}=y();if(x&&u)return e.jsx(m,{loading:!0,children:"loading official rates…"});if(!i.length&&!o.length)return e.jsx(m,{children:"no rates data yet"});const n=i.slice(0,t.maxReferenceRates),r=o.slice(0,t.maxTreasuryRates),l=(c=n[0])==null?void 0:c.date,h=(d=r[0])==null?void 0:d.date;return e.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"caption text-soft uppercase",children:"official rates"}),e.jsx("div",{className:"body-sm text-normal",children:l?`as of ${l}`:"reference rates"})]}),e.jsx("div",{className:"caption text-soft text-right",children:"daily"})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:n.map(s=>{const p=s.targetRateFrom!==void 0&&s.targetRateTo!==void 0?`target ${a(s.targetRateFrom)}-${a(s.targetRateTo)}`:s.volumeInBillions!==void 0?`${g(s.volumeInBillions*1e9)} volume`:s.source;return e.jsx(v,{label:s.label,value:a(s.rate),meta:p},s.code)})}),t.showTreasuryAverageRates&&r.length>0&&e.jsxs("div",{className:"border-t border-white/[0.08] pt-2",children:[e.jsxs("div",{className:"caption text-soft mb-1 flex justify-between",children:[e.jsx("span",{children:"Treasury average rates"}),e.jsx("span",{children:h})]}),e.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:r.map(s=>e.jsxs("div",{className:"rounded bg-white/[0.04] px-2 py-1.5",children:[e.jsx("div",{className:"caption text-soft truncate",children:s.security}),e.jsx("div",{className:"body-sm text-strong font-bold tabular-nums",children:a(s.rate)})]},`${s.date}-${s.security}`))})]})]})}const B=j({...f,component:b});export{B as ratesBoardFrame};
@@ -0,0 +1 @@
1
+ import{r as n,j as e}from"./react-qoZPGuNy.js";import{i as y}from"./content-shared-BZ1XzrJx.js";import{f as g,a as k,c as w}from"./format-CfAcS4D8.js";import{f as F,b7 as b}from"./index-DbboK5sz.js";import{M as R}from"./mini-line-chart-D-i1QqSe.js";import"./d3-xK4fOkBU.js";import"./utils-DaT-yT0k.js";b.schema;function o({label:s,value:t,onChange:l}){return e.jsxs("label",{className:`flex flex-col gap-0.5 px-2 py-1 ${y}`,children:[e.jsx("span",{className:"caption text-soft truncate",children:s}),e.jsx("input",{type:"number",value:Number.isFinite(t)?t:0,onChange:a=>l(Number(a.target.value)),className:"body-sm text-strong w-full bg-transparent outline-none"})]})}function E({config:s}){const[t,l]=n.useState(s.principal),[a,j]=n.useState(s.ratePct),[c,v]=n.useState(s.periods),[i,N]=n.useState(s.contribution),{series:C,ending:P,contributed:p,gain:d}=n.useMemo(()=>{const M=a/100,S=Math.max(0,Math.min(600,Math.floor(c))),f=[{date:"0",value:t}];let r=t,m=t;for(let u=1;u<=S;u++)r=r*(1+M)+i,m+=i,f.push({date:String(u),value:r});return{series:f,ending:r,contributed:m,gain:r-m}},[t,a,c,i]),x=p>0?d/p*100:0,h=s.label.trim();return e.jsxs("div",{className:"flex h-full w-full flex-col gap-2",children:[h&&e.jsx("div",{className:"caption text-soft shrink-0 uppercase tracking-[0.12em]",children:h}),e.jsxs("div",{className:"shrink-0",children:[e.jsx("div",{className:"caption text-soft",children:"projected value"}),e.jsx("div",{className:"metric-lg text-strong",children:g(P)}),e.jsxs("div",{className:"body-sm",style:{color:w(x)},children:[k(x)," · ",g(d)," gain"]})]}),e.jsx("div",{className:"min-h-0 flex-1",children:e.jsx(R,{data:C,width:260,height:48,variant:"green",className:"w-full"})}),e.jsxs("div",{className:"grid shrink-0 grid-cols-2 gap-1.5",children:[e.jsx(o,{label:"principal",value:t,onChange:l}),e.jsx(o,{label:"rate %/period",value:a,onChange:j}),e.jsx(o,{label:"periods",value:c,onChange:v}),e.jsx(o,{label:"contribution",value:i,onChange:N})]})]})}const D=F({...b,component:E});export{D as returnsProjectorFrame};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./react-qoZPGuNy.js";import{i as S}from"./content-shared-BZ1XzrJx.js";import{D as h,U as f,a as y,d as v}from"./format-CfAcS4D8.js";import{f as M,aJ as R}from"./index-DbboK5sz.js";import{s as O}from"./ui-Bq3RQsdJ.js";R.schema;const P="var(--color-highlight)";function b(s){const a=Number(s);return Number.isFinite(a)?a:0}function g({label:s,value:a,onChange:n}){return e.jsxs("label",{className:"flex min-w-0 flex-col gap-1",children:[e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:s}),e.jsxs("span",{className:`flex items-center px-2 py-1.5 ${S}`,children:[e.jsx("span",{className:"body-sm text-soft",children:"$"}),e.jsx("input",{type:"number",inputMode:"decimal",value:a,onChange:c=>n(c.target.value),className:"body-sm text-normal min-w-0 flex-1 bg-transparent text-right tabular-nums outline-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"})]})]})}function L({value:s,onChange:a}){return e.jsx("div",{className:`flex gap-1 p-1 ${S}`,children:["long","short"].map(n=>{const c=n===s;return e.jsx("button",{type:"button",onClick:()=>a(n),className:`caption flex-1 rounded px-2 py-1 text-center uppercase tracking-[0.12em] transition-colors ${c?"bg-white/[0.06] font-semibold":"text-soft"}`,style:c?{color:P}:void 0,children:n},n)})})}function T({config:s}){const[a,n]=l.useState(String(s.entry)),[c,j]=l.useState(String(s.stop)),[m,N]=l.useState(String(s.target)),[o,k]=l.useState(s.direction);l.useEffect(()=>n(String(s.entry)),[s.entry]),l.useEffect(()=>j(String(s.stop)),[s.stop]),l.useEffect(()=>N(String(s.target)),[s.target]),l.useEffect(()=>k(s.direction),[s.direction]);const t=l.useMemo(()=>{const r=b(a),p=b(c),x=b(m),i=Math.abs(r-p),d=Math.abs(x-r),D=i>0?d/i:0,E=r!==0?i/r*100:0,$=r!==0?d/r*100:0,u=i+d,U=u>0?i/u*100:50,F=o==="long"?p<r&&r<x:x<r&&r<p;return{riskPerUnit:i,rewardPerUnit:d,rr:D,riskPct:E,rewardPct:$,riskShare:U,hasRisk:i>0,hasData:u>0,valid:F}},[a,c,m,o]),C=t.hasData?t.hasRisk?`1 : ${t.rr.toFixed(t.rr>=10?0:1)}`:"∞":"—",w=s.label.trim();return e.jsxs("div",{className:`${O} flex flex-col gap-3`,children:[w&&e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:w}),e.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[e.jsx(g,{label:"Entry",value:a,onChange:n}),e.jsx(g,{label:"Stop",value:c,onChange:j}),e.jsx(g,{label:"Target",value:m,onChange:N})]}),e.jsx(L,{value:o,onChange:k}),e.jsxs("div",{className:"flex flex-col gap-2.5 rounded-lg border border-white/[0.07] bg-white/[0.03] p-3",children:[e.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[e.jsx("span",{className:"caption text-soft uppercase tracking-[0.12em]",children:"Risk : Reward"}),e.jsx("span",{className:"metric-md",style:{color:t.hasData?P:void 0},children:C})]}),e.jsxs("div",{className:"flex h-2.5 w-full overflow-hidden rounded-full bg-white/[0.06]",children:[e.jsx("span",{className:"h-full",style:{width:`${t.riskShare}%`,background:h}}),e.jsx("span",{className:"h-full",style:{width:`${100-t.riskShare}%`,background:f}})]}),e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex min-w-0 flex-col",children:[e.jsx("span",{className:"caption uppercase tracking-[0.12em]",style:{color:h},children:"Risk"}),e.jsx("span",{className:"body-sm tabular-nums",style:{color:h},children:y(-t.riskPct)}),e.jsxs("span",{className:"caption text-soft tabular-nums",children:[v(t.riskPerUnit)," / unit"]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col items-end text-right",children:[e.jsx("span",{className:"caption uppercase tracking-[0.12em]",style:{color:f},children:"Reward"}),e.jsx("span",{className:"body-sm tabular-nums",style:{color:f},children:y(t.rewardPct)}),e.jsxs("span",{className:"caption text-soft tabular-nums",children:[v(t.rewardPerUnit)," / unit"]})]})]}),t.hasData&&!t.valid&&e.jsxs("span",{className:"caption text-soft",children:["⚠ Prices don't bracket entry for a ",o," setup."]})]})]})}const z=M({...R,component:T});export{z as riskRewardFrame};
@@ -0,0 +1 @@
1
+ import{j as s}from"./react-qoZPGuNy.js";import{f as m,bb as n}from"./index-DbboK5sz.js";import{F as i,s as o}from"./ui-Bq3RQsdJ.js";n.schema;function c({config:l}){const r=l.rules.filter(e=>e.trim()),a=l.title.trim();return r.length===0?s.jsx(i,{children:"no rules yet"}):s.jsxs("div",{className:"flex h-full w-full flex-col",children:[a&&s.jsx("div",{className:"body-sm text-strong mb-1 shrink-0 font-semibold",children:a}),s.jsx("ol",{className:`min-h-0 flex-1 ${o}`,children:r.map((e,t)=>s.jsxs("li",{className:"flex gap-2 py-1",children:[s.jsx("span",{className:"caption text-highlight shrink-0 tabular-nums",children:t+1}),s.jsx("span",{className:"body-sm text-normal",children:e})]},t))})]})}const u=m({...n,component:c});export{u as rulesCardFrame};
@@ -0,0 +1 @@
1
+ import{r as d,j as e}from"./react-qoZPGuNy.js";import{E as u,e as w,f as h}from"./market-data-CvmpLFSo.js";import{f as N,aL as f}from"./index-DbboK5sz.js";import{F as v}from"./ui-Bq3RQsdJ.js";f.schema;function x(s){const[o,r]=s.split(":").map(Number);return o*60+r}function b(s){return Math.min(1,Math.max(0,s))}function M({config:s}){const[o,r]=d.useState(()=>new Date);d.useEffect(()=>{const j=setInterval(()=>r(new Date),3e4);return()=>clearInterval(j)},[]);const n=u[s.exchange]??u.NYSE;if(!n)return e.jsx(v,{children:"unknown exchange"});const t=w(n,o),a=t.status==="open",c=s.label.trim(),l=x(t.close)-x(t.open),i=a&&l>0?b((l-t.nextChangeMin)/l):0,p=Math.round(i*100),g=t.status==="holiday"?"Holiday":a?`${p}%`:"Closed",m=a?`closes in ${h(t.nextChangeMin)}`:s.showCountdown?`opens in ${h(t.nextChangeMin)}`:null;return e.jsxs("div",{className:"flex h-full w-full flex-col justify-center gap-2",children:[e.jsxs("div",{className:"caption text-soft flex items-center gap-1.5 uppercase tracking-[0.14em]",children:[e.jsx("span",{className:"text-normal font-semibold",children:n.mark}),e.jsx("span",{children:n.code}),c&&e.jsxs("span",{className:"text-disabled truncate tracking-normal normal-case",children:["· ",c]})]}),e.jsx("div",{className:`metric-md leading-none ${a?"text-strong":"text-soft"}`,children:g}),e.jsx("div",{className:"bg-surface h-2 w-full overflow-hidden rounded-full",children:e.jsx("div",{className:"h-full rounded-full transition-[width] duration-500",style:{width:`${i*100}%`,background:"var(--color-highlight)"}})}),m&&e.jsx("div",{className:"caption text-soft",children:m})]})}const $=N({...f,component:M});export{$ as sessionProgressFrame};
@@ -0,0 +1 @@
1
+ import{r as u,j as s}from"./react-qoZPGuNy.js";import{f as x,ad as h,ae as f,A as p}from"./index-DbboK5sz.js";import{b,e as i}from"./format-CfAcS4D8.js";import{F as c,s as j}from"./ui-Bq3RQsdJ.js";h.schema;const d=(e=1)=>`hsl(var(--zf-accent-hue, 242) 85% 72% / ${e})`;function y({symbol:e,entry:o}){const l=e.includes(":")?e:`xyz:${o.symbol}`,r=Math.max(0,Math.min(100,o.shortPct));return s.jsxs("div",{className:"flex min-w-0 items-center gap-3 border-b border-white/[0.06] py-2 last:border-b-0",children:[s.jsx(p,{symbol:l,size:20}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"body-sm text-strong truncate font-semibold",children:o.symbol}),s.jsx("span",{className:"body-md text-strong font-bold tabular-nums",children:b(r,1)})]}),s.jsx("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded-full bg-white/[0.07]",children:s.jsx("div",{className:"h-full rounded-full",style:{width:`${r}%`,background:d(.85),boxShadow:`0 0 8px ${d(.5)}`}})}),s.jsxs("div",{className:"caption text-soft mt-1 tabular-nums",children:["short ",i(o.shortVolume)," /"," ",i(o.totalVolume)]})]})]})}function v({config:e}){const{data:o,isLoading:l}=f(e.symbols),r=u.useMemo(()=>{const a=e.symbols.map(t=>({symbol:t,entry:o[t]})).filter(t=>!!t.entry);return a.sort((t,n)=>e.sort==="symbol"?t.entry.symbol.localeCompare(n.entry.symbol):e.sort==="volume"?n.entry.totalVolume-t.entry.totalVolume:n.entry.shortPct-t.entry.shortPct),a},[o,e.symbols,e.sort]);if(l)return s.jsx(c,{loading:!0,children:"loading short volume…"});if(r.length===0)return s.jsx(c,{children:"no FINRA short-volume data yet"});const m=r[0].entry.date;return s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"caption text-soft uppercase",children:"short volume"}),s.jsx("div",{className:"body-sm text-normal",children:m?`FINRA · ${m}`:"FINRA"})]}),s.jsxs("div",{className:"caption text-soft text-right",children:["reported volume",s.jsx("br",{}),"not short interest"]})]}),s.jsx("div",{className:j,children:r.map(({symbol:a,entry:t})=>s.jsx(y,{symbol:a,entry:t},a))})]})}const F=x({...h,component:v});export{F as shortVolumeFrame};
@@ -0,0 +1 @@
1
+ import{r as a,j as L}from"./react-qoZPGuNy.js";import{a as H,G as M,d as I}from"./game-ui-Dy_QYsPr.js";import{f as j,ay as z}from"./index-DbboK5sz.js";import"./format-CfAcS4D8.js";const g=18,P=14,W=0,N={snakeHead:"rgba(255, 255, 255, 0.95)",food:"hsla(347, 100%, 62%, 1)"};function O(s,r,l,u,f){s.fillStyle=u,s.fillRect(r.originX+l.x*g+f,r.originY+l.y*g+f,g-f*2,g-f*2)}function q(s,r,l,u,f,y){r.clearRect(0,0,s.width,s.height),O(r,l,l.food,N.food,3),l.snake.forEach((d,C)=>O(r,l,d,C===0?N.snakeHead:y,2)),I(s,r,u,f,y)}function X(s,r,l,u,f,y){r.clearRect(0,0,s.width,s.height),r.textAlign="center",l==="idle"?(r.fillStyle=M.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText("Arrow keys or swipe to start",s.width/2,s.height/2)):(r.fillStyle=M.gameOver,r.font='bold 20px "DM Sans", sans-serif',r.fillText("GAME OVER",s.width/2,s.height/2-30),r.fillStyle=M.text,r.font='bold 14px "DM Sans", sans-serif',r.fillText(`Score: ${u}`,s.width/2,s.height/2),r.fillStyle=M.textSoft,r.fillText("Press an arrow or tap to play again",s.width/2,s.height/2+28)),r.textAlign="left",I(s,r,u,f,y)}function v(){const s=a.useRef(null),r=a.useRef(null),[l,u]=a.useState("idle"),[f,y]=a.useState(0),[d,C]=a.useState(()=>{if(typeof window<"u"){const e=localStorage.getItem("zframes-snake-high-score");return e?parseInt(e,10):0}return 0}),[,K]=a.useState(!1),h=a.useRef(0),S=a.useRef(d),x=a.useRef(l),A=a.useRef(null),b=a.useRef(H(null));a.useEffect(()=>{S.current=d,d>0&&localStorage.setItem("zframes-snake-high-score",String(d))},[d]),a.useEffect(()=>{x.current=l},[l]);const w=a.useRef({snake:[],dir:{x:1,y:0},pendingDir:{x:1,y:0},food:{x:0,y:0},cols:0,rows:0,originX:0,originY:0,stepCounter:0}),D=a.useCallback(()=>{const e=w.current;if(e.cols<=0||e.rows<=0)return;let t,o=0;do t={x:Math.floor(Math.random()*e.cols),y:Math.floor(Math.random()*e.rows)},o++;while(e.snake.some(i=>i.x===t.x&&i.y===t.y)&&o<400);e.food=t},[]),T=a.useCallback(()=>{const e=w.current,t=Math.floor(e.cols/2),o=Math.floor(e.rows/2);e.snake=[{x:t,y:o},{x:t-1,y:o},{x:t-2,y:o}],e.dir={x:1,y:0},e.pendingDir={x:1,y:0},e.stepCounter=0,D(),h.current=0,y(0)},[D]),p=a.useCallback(()=>{w.current.cols<=0||(T(),u("playing"))},[T]),m=a.useCallback((e,t)=>{const o=w.current;o.dir.x===-e&&o.dir.y===-t||(o.pendingDir={x:e,y:t})},[]);a.useEffect(()=>{const e=o=>{const i=o.target;if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable)return;const c=x.current==="playing";let n=!0;switch(o.code){case"ArrowUp":case"KeyW":c?m(0,-1):p();break;case"ArrowDown":case"KeyS":c?m(0,1):p();break;case"ArrowLeft":case"KeyA":c?m(-1,0):p();break;case"ArrowRight":case"KeyD":c?m(1,0):p();break;case"Space":c||p();break;default:n=!1}n&&o.preventDefault()},t=r.current;if(t)return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[m,p]),a.useLayoutEffect(()=>{const e=s.current;if(!e)return;const t=()=>{const i=e.parentElement;if(i&&i.clientWidth>0&&i.clientHeight>0){e.width=i.clientWidth,e.height=i.clientHeight-W,b.current=H(e);const c=w.current;c.cols=Math.max(5,Math.floor(e.width/g)),c.rows=Math.max(5,Math.floor(e.height/g)),c.originX=Math.floor((e.width-c.cols*g)/2),c.originY=Math.floor((e.height-c.rows*g)/2);const n=e.getContext("2d");n&&x.current!=="playing"&&X(e,n,x.current,h.current,S.current,b.current),K(E=>!E)}};t();const o=new ResizeObserver(t);return o.observe(e.parentElement),()=>o.disconnect()},[]),a.useEffect(()=>{if(l!=="playing")return;const e=s.current,t=e==null?void 0:e.getContext("2d");if(!e||!t)return;let o;const i=()=>{h.current>S.current&&(S.current=h.current,C(h.current)),u("gameover")},c=()=>{const n=w.current;if(n.stepCounter++,n.stepCounter>=P){n.stepCounter=0,n.dir=n.pendingDir;const E=n.snake[0],k=E.x+n.dir.x,R=E.y+n.dir.y;if(k<0||R<0||k>=n.cols||R>=n.rows){i();return}const G=k===n.food.x&&R===n.food.y;if((G?n.snake:n.snake.slice(0,-1)).some(F=>F.x===k&&F.y===R)){i();return}n.snake.unshift({x:k,y:R}),G?(h.current+=1,y(h.current),D()):n.snake.pop()}q(e,t,n,h.current,S.current,b.current),o=requestAnimationFrame(c)};return o=requestAnimationFrame(c),()=>cancelAnimationFrame(o)},[l]),a.useEffect(()=>{if(l==="playing")return;const e=s.current,t=e==null?void 0:e.getContext("2d");!e||!t||X(e,t,l,f,d,b.current)},[l,f,d]);const U=e=>{const t=e.touches[0];t&&(A.current={x:t.clientX,y:t.clientY})},Y=e=>{var n;const t=A.current;A.current=null;const o=e.changedTouches[0];if((n=r.current)==null||n.focus(),x.current!=="playing"){p();return}if(!t||!o)return;const i=o.clientX-t.x,c=o.clientY-t.y;Math.abs(i)<12&&Math.abs(c)<12||(Math.abs(i)>Math.abs(c)?m(i>0?1:-1,0):m(0,c>0?1:-1))};return L.jsx("div",{ref:r,tabIndex:0,className:"relative h-full w-full cursor-pointer select-none overflow-hidden outline-none",onTouchStart:U,onTouchEnd:Y,onClick:()=>{var e;return(e=r.current)==null?void 0:e.focus()},role:"application","aria-label":"Snake game. Use the arrow keys or swipe to steer.",children:L.jsx("canvas",{ref:s,className:"h-full w-full"})})}const Q=j({...z,component:v});export{Q as snakeFrame};
@@ -0,0 +1 @@
1
+ import{r as s,j as l}from"./react-qoZPGuNy.js";import{f as p,bd as i}from"./index-DbboK5sz.js";import{F as o}from"./ui-Bq3RQsdJ.js";i.schema;const c=["track","album","playlist","artist","episode","show"];function d(t){let a;try{a=new URL(t.trim())}catch{return null}if(a.hostname.replace(/^www\./,"")!=="open.spotify.com")return null;const r=a.pathname.split("/").filter(Boolean),e=r.findIndex(n=>c.includes(n));return e===-1||!r[e+1]?null:`https://open.spotify.com/embed/${r[e]}/${r[e+1]}`}function m({config:t}){const[a,r]=s.useState("loading"),e=s.useMemo(()=>d(t.url),[t.url]);return e?a==="error"?l.jsx(o,{children:"player unavailable"}):l.jsxs("div",{className:"relative h-full w-full overflow-hidden rounded-md",children:[a==="loading"&&l.jsx("div",{className:"absolute inset-0 z-10",children:l.jsx(o,{loading:!0,children:"loading player…"})}),l.jsx("iframe",{src:e,title:"Spotify player",className:"w-full",height:t.compact?152:"100%",style:{border:0,height:t.compact?152:"100%"},loading:"lazy",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",onLoad:()=>r("loaded"),onError:()=>r("error")},e+String(t.compact))]}):l.jsx(o,{children:"paste a Spotify track / album / playlist URL"})}const h=p({...i,component:m});export{h as spotifyEmbedFrame};
@@ -0,0 +1 @@
1
+ import{r as l,j as s}from"./react-qoZPGuNy.js";import{i as h}from"./content-shared-BZ1XzrJx.js";import{f as y,aK as f,m as S}from"./index-DbboK5sz.js";f.schema;const p="var(--color-highlight)",x="0 0 18px hsl(var(--zf-accent-hue, 242) 92% 70% / 0.45)",i=t=>String(t).padStart(2,"0");function g(t){const e=Math.floor(Math.max(0,t)/1e3),c=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return c>0?`${c}:${i(n)}:${i(o)}`:`${i(n)}:${i(o)}`}function k({config:t}){const e=S(),[c,n]=l.useState({startedAt:t.startedAt,accumulatedMs:t.accumulatedMs}),o=e?t.startedAt:c.startedAt,w=e?t.accumulatedMs:c.accumulatedMs,a=o!==0,d=l.useCallback(r=>{e?e(r):n(m=>({...m,...r}))},[e]),[,b]=l.useState(0);l.useEffect(()=>{if(!a)return;const r=window.setInterval(()=>b(m=>m+1),250);return()=>window.clearInterval(r)},[a]);const u=w+(a?Date.now()-o:0),v=()=>d({startedAt:Date.now()}),M=()=>d({startedAt:0,accumulatedMs:u}),j=()=>d({startedAt:0,accumulatedMs:0});return s.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 text-center",children:[t.label&&s.jsxs("div",{className:"caption text-soft inline-flex items-center gap-1.5 uppercase tracking-[0.18em]",children:[s.jsx("span",{"aria-hidden":!0,className:"inline-block h-1 w-1 rounded-full",style:{background:p,boxShadow:a?x:void 0}}),t.label]}),s.jsx("div",{className:"metric-lg text-strong leading-none",style:a?{color:p,textShadow:x}:void 0,children:g(u)}),s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("button",{type:"button",onClick:a?M:v,className:`caption text-normal px-3 py-1 uppercase tracking-[0.12em] ${h}`,style:a?void 0:{color:p},children:a?"Pause":"Start"}),s.jsx("button",{type:"button",onClick:j,disabled:!a&&u===0,className:`caption text-soft px-3 py-1 uppercase tracking-[0.12em] transition-opacity disabled:opacity-40 ${h}`,children:"Reset"})]})]})}const E=y({...f,component:k});export{E as stopwatchFrame};
@@ -0,0 +1 @@
1
+ import{r as d,j as s}from"./react-qoZPGuNy.js";import{f,af as m,a7 as g,h as l}from"./index-DbboK5sz.js";import{M as i}from"./mover-row-BTeXB98H.js";import{F as n}from"./ui-Bq3RQsdJ.js";import"./format-CfAcS4D8.js";m.schema;const h=["xyz:*"];function u({config:t}){const{stats:c,isLoading:p}=g(h,6e4),{gainers:o,losers:x}=d.useMemo(()=>{const e=Object.entries(c).map(([a,r])=>({symbol:a,...r})).filter(a=>a.symbol.includes(":")&&a.markPx>0&&a.prevDayPx>0).sort((a,r)=>r.changePct-a.changePct);return{gainers:e.slice(0,t.count),losers:e.slice(-t.count).reverse()}},[c,t.count]);return p?s.jsx(n,{loading:!0,children:"loading movers…"}):o.length===0?s.jsx(n,{children:"no mover data yet"}):s.jsxs("div",{className:"grid h-full grid-cols-2 gap-x-4 overflow-hidden",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx("div",{className:"caption text-soft uppercase tracking-wide",children:"gainers"}),o.map(e=>s.jsx(i,{symbol:e.symbol,label:l(e.symbol),price:e.markPx,changePct:e.changePct},e.symbol))]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx("div",{className:"caption text-soft uppercase tracking-wide",children:"losers"}),x.map(e=>s.jsx(i,{symbol:e.symbol,label:l(e.symbol),price:e.markPx,changePct:e.changePct},e.symbol))]})]})}const M=f({...m,component:u});export{M as topMoversFrame};
@@ -0,0 +1 @@
1
+ import{j as s}from"./react-qoZPGuNy.js";import{b as c}from"./format-CfAcS4D8.js";import{M as m}from"./metric-row-BVVhjsjK.js";import{f as u,P as a,Q as d}from"./index-DbboK5sz.js";import{F as i,s as x}from"./ui-Bq3RQsdJ.js";a.schema;function f({auction:e}){const t=[e.securityTerm,e.securityType].filter(Boolean).join(" ");return s.jsx(m,{label:t||e.securityType,meta:e.auctionDate+(e.bidToCover!==null?` · ${e.bidToCover.toFixed(2)}× bid-to-cover`:""),value:e.rate!==null?c(e.rate):"—"})}function p({config:e}){const{auctions:t,isLoading:o}=d(e.count);if(o)return s.jsx(i,{loading:!0,children:"loading auctions…"});if(!t.length)return s.jsx(i,{children:"no auction data yet"});const n=t.slice(0,e.count);return s.jsxs("div",{className:"flex h-full min-h-0 flex-col gap-3",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"caption text-soft uppercase",children:"treasury auctions"}),s.jsx("div",{className:"body-sm text-normal",children:"high yield · bid-to-cover"})]}),s.jsx("div",{className:"caption text-soft text-right",children:"results"})]}),s.jsx("div",{className:x,children:n.map((r,l)=>s.jsx(f,{auction:r},`${r.auctionDate}-${r.securityType}-${r.securityTerm}-${l}`))})]})}const T=u({...a,component:p});export{T as treasuryAuctionsFrame};
@@ -0,0 +1 @@
1
+ import{r as d,j as T}from"./react-qoZPGuNy.js";import{c as P}from"./utils-DaT-yT0k.js";import{w as $,x as z,y as H}from"./d3-xK4fOkBU.js";const E="4px",S="4px",k=2.5,U=(b,v,y,g,B)=>{const R=b.children;if(!R||R.length===0)return;const I=(s,i,n,e,l)=>{if(e===0)return 1/0;const c=i/e*l;if(c===0)return 1/0;let r=0;for(const u of s){const o=(u.value||0)/i*n,x=c/o,h=Math.abs(x-k);r=Math.max(r,h)}return r},L=(s,i,n,e,l,c,r)=>{const u=i/n*l;let a=r;for(const o of s){const h=(o.value||0)/i*e;o.x0=c,o.y0=a,o.x1=c+u,o.y1=a+h,a+=h}return u},_=g-v,p=B-y,C=R.reduce((s,i)=>s+(i.value||0),0);if(C===0)return;let w=[...R],m=v,j=_,M=C;for(;w.length>0;){let s=[],i=0;for(let e=0;e<w.length;e++){const l=w[e],c=l.value||0,r=[...s,l],u=i+c;if(s.length===0)s=r,i=u;else{const a=I(s,i,p,M,j);if(I(r,u,p,M,j)<=a)s=r,i=u;else break}}const n=L(s,i,M,p,j,m,y);w=w.slice(s.length),m+=n,j-=n,M-=i}};function F({data:b,className:v,LeafComponent:y,getColorValue:g,tileMode:B="squarify"}){const R=d.useRef(null),I=d.useRef(null),L=d.useRef(null),_=d.useRef(null),p=d.useRef(null),C=d.useRef(null),[,w]=d.useTransition(),[m,j]=d.useState({width:0,height:0});d.useEffect(()=>{const n=R.current;if(n){const e=new ResizeObserver(()=>{w(()=>{j({width:n.offsetWidth,height:n.offsetHeight})})});return e.observe(n),()=>{e.disconnect()}}},[]),d.useEffect(()=>{const n=I.current;if(n){const e=n.children;let l=e[0],c=e[0],r=e[0],u=e[0];for(let a=0;a<e.length;a++){const o=e[a],{x,y:h}=o.getBoundingClientRect(),N=l.getBoundingClientRect(),W=c.getBoundingClientRect(),t=r.getBoundingClientRect(),f=u.getBoundingClientRect();x<=N.x&&h<=N.y&&(l=o),x<=W.x&&h>=W.y&&(c=o),x>=t.x&&h<=t.y&&(r=o),x>=f.x&&h>=f.y&&(u=o)}L.current&&(L.current.style.borderTopLeftRadius=E),L.current=l,L.current.style.borderTopLeftRadius=S,_.current&&(_.current.style.borderBottomLeftRadius=E),_.current=c,_.current.style.borderBottomLeftRadius=S,p.current&&(p.current.style.borderTopRightRadius=E),p.current=r,p.current.style.borderTopRightRadius=S,C.current&&(C.current.style.borderBottomRightRadius=E),C.current=u,C.current.style.borderBottomRightRadius=S}},[m]);const M=d.useMemo(()=>{switch(B){case"vertical-rectangle":return U;case"squarify":default:return $}},[B]),s=d.useMemo(()=>z().size([m.width,m.height]).tile(M).paddingInner(4)(H({id:"root",value:0,children:b}).sum(n=>n.value).sort((n,e)=>e.data.value-n.data.value)),[b,m.width,m.height,M]),i=d.useMemo(()=>{const n=s.leaves(),e=n.map(t=>g?g(t.data):t.data.value),l=e.filter(t=>t>=0),c=e.filter(t=>t<0),r=l.length>0?Math.min(...l):0,u=l.length>0?Math.max(...l):0,a=c.length>0?Math.min(...c):0,o=c.length>0?Math.max(...c):0,x=t=>t<0?o===a?1:(t-o)/(a-o):u===r?1:(t-r)/(u-r),h=(t,f)=>{if(f>=0){const q=Math.round(34+t*16);return`hsl(152 ${Math.round(42+t*20)}% ${q}%)`}const D=Math.round(36+t*15);return`hsl(350 ${Math.round(48+t*22)}% ${D}%)`},N=[...new Set(n.map(t=>t.x0))].sort((t,f)=>t-f),W=new Map(N.map((t,f)=>[t,f]));return n.map(t=>{const f=t.x1-t.x0,D=t.y1-t.y0,V=g?g(t.data):t.data.value,q=x(V),A=W.get(t.x0)??0,O=h(q,V);return T.jsx("div",{className:"group absolute cursor-pointer rounded-sm border border-transparent hover:bg-[radial-gradient(146.13%_118.42%_at_50%_-15.5%,rgba(255,255,255,0.1)_0%,rgba(255,255,255,0)_99.59%)] hover:bg-gradient-to-t",style:{left:t.x0,top:t.y0,width:f,height:D,borderRadius:E,backgroundColor:O},children:T.jsx(y,{width:f,height:D,data:t.data,columnIndex:A})},`${t.data.id}-box`)})},[s,y,g]);return T.jsx("div",{className:P("h-full w-full",v),ref:R,children:T.jsx("div",{className:"relative overflow-hidden rounded-lg",style:{height:m.height,width:m.width},ref:I,children:i})})}const J=F;function K({width:b,height:v,label:y,secondary:g,title:B}){if(b<48||v<30)return null;const R=b<70||v<44;return T.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center overflow-hidden p-1 text-center",title:B,children:[T.jsx("span",{className:"body-sm truncate font-bold text-strong",children:y}),!R&&g&&T.jsx("span",{className:"caption text-soft",children:g})]})}export{J as T,K as a};
@@ -0,0 +1 @@
1
+ import{r as i,j as s}from"./react-qoZPGuNy.js";import{f as l}from"./format-CfAcS4D8.js";import{f as p,ag as n,ah as f}from"./index-DbboK5sz.js";import{T as u,a as c}from"./treemap-leaf-DLQawrx4.js";import{F as m}from"./ui-Bq3RQsdJ.js";import"./utils-DaT-yT0k.js";import"./d3-xK4fOkBU.js";n.schema;function d({width:r,height:o,data:e}){const t=l(e.tvl);return s.jsx(c,{width:r,height:o,label:e.id,secondary:t,title:`${e.id} · ${t}`})}function v({config:r}){const{entries:o,isLoading:e}=f(),t=i.useMemo(()=>o.slice(0,r.topN).map(a=>({id:a.name,value:a.tvl,tvl:a.tvl})),[o,r.topN]);return e?s.jsx(m,{loading:!0,children:"loading TVL…"}):t.length===0?s.jsx(m,{children:"no TVL data"}):s.jsx(u,{data:t,LeafComponent:d,getColorValue:a=>a.tvl})}const F=p({...n,component:v});export{F as tvlTreemapFrame};
@@ -0,0 +1 @@
1
+ import{j as e}from"./react-qoZPGuNy.js";const t="min-h-0 flex-1 overflow-y-auto pr-1 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-white/[0.08] hover:[&::-webkit-scrollbar-thumb]:bg-white/15",r="min-w-0 overflow-x-auto pb-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-white/[0.08] hover:[&::-webkit-scrollbar-thumb]:bg-white/15";function i({loading:a=!1,children:s}){return a?e.jsx("div",{className:"flex h-full min-h-[72px] w-full items-center justify-center overflow-hidden rounded-md",role:"status","aria-live":"polite","aria-busy":"true",children:e.jsxs("div",{className:"flex w-full max-w-sm flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"relative h-2.5 w-2.5 shrink-0 rounded-full",style:{background:"hsl(var(--zf-accent-hue, 242) 90% 76%)",boxShadow:"0 0 12px hsl(var(--zf-accent-hue, 242) 90% 76% / 0.72)"},children:e.jsx("span",{className:"absolute inset-0 animate-ping rounded-full opacity-60",style:{background:"hsl(var(--zf-accent-hue, 242) 90% 76%)"}})}),e.jsx("span",{className:"body-sm text-soft truncate",children:s})]}),e.jsxs("div",{className:"grid min-h-0 grid-cols-4 gap-2",children:[e.jsx("span",{className:"h-11 animate-pulse rounded bg-white/[0.07]"}),e.jsx("span",{className:"h-11 animate-pulse rounded bg-white/[0.05]"}),e.jsx("span",{className:"h-11 animate-pulse rounded bg-white/[0.08]"}),e.jsx("span",{className:"h-11 animate-pulse rounded bg-white/[0.04]"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"h-2.5 w-11/12 animate-pulse rounded-full bg-white/[0.07]"}),e.jsx("span",{className:"h-2.5 w-7/12 animate-pulse rounded-full bg-white/[0.05]"})]})]})}):e.jsx("div",{className:"body-sm text-soft flex h-full min-h-0 items-center justify-center text-center",children:s})}export{i as F,r as a,t as s};