PageSourceSearch

https://fantasyhoff.com/assets/Recap-BKW8GhST.js

js fantasyhoff.com collected 2026-10-02 01:29:32 UTC 12,644 bytes, 1 lines download raw bytes

1import{j as e,a as o}from"./vendor-react-Ci8XvypC.js";import{K as ue,y as pe,ao as je,at as xe,au as w,an as ge,av as ee,aj as Ne,ab as be}from"./index-Hx-p8ka4.js";import{E as fe}from"./Paywall-CXefLKpU.js";import{d as we}from"./useLeagueData-XJOiDMMS.js";import{u as ve,c as ke,d as $e}from"./useStats-DoBG0vBn.js";import{c as Se,L as m}from"./vendor-router-DC2shrY2.js";import{d as se,Z as ae,ae as ne,af as re,m as ie,ag as te,c as Ie,C as Fe,n as ye}from"./vendor-icons-CfgbQDMF.js";import"./vendor-react-dom-yPwZA2yX.js";import"./vendor-query-BWIl-I-M.js";import"./OfferPrice-Db303-Lh.js";function v({value:n}){return e.jsx("div",{className:"hjb-flap","aria-label":n,children:n.split("").map((i,k)=>e.jsx("span",{className:`ft${/[0-9]/.test(i)?"":" narrow"}${i==="+"?" brass":""}`,children:i},k))})}const C=n=>/^[-\s]*hidden[-\s]*$/i.test(n),u=n=>n&&!C(n)?n:null;function le(n){return n.winner.franchiseId?`owner:${n.winner.franchiseId}`:`name:${n.winner.managerName??n.winner.name}`}const Me=["first","second","third","fourth","fifth","sixth","seventh","eighth","ninth","tenth"];function Ce({leagueId:n,shareToken:i,season:k}){const[l,I]=o.useState(!1),$=async()=>{const F=be(n,`${window.location.origin}/s/${i}/recap-${k}`);try{await navigator.clipboard.writeText(F),I(!0),window.setTimeout(()=>I(!1),2e3)}catch{window.prompt("Copy this share link:",F)}};return e.jsxs("button",{type:"button",className:"sbrc-share",onClick:$,title:"Copy a share link — it unfurls with the season headline in group chats",children:[l?e.jsx(Fe,{size:13}):e.jsx(ye,{size:13}),l?"Copied":"Share this recap"]})}function Ae(){var G,K,V,Z,_,q,D,J,Q,X;const{season:n=""}=Se(),{leagueId:i,leagues:k}=ue(),l=pe(i),{isFree:I,leagueName:$}=je(i),[F,z]=o.useState(!1),S=we(i),d=ve(i,n),R=ke(i,n),T=$e(i),W=/^\d{4}$/.test(n),B=(G=l.data)==null?void 0:G.league.shareToken,P=((K=l.data)==null?void 0:K.owners)??[],p=o.useMemo(()=>xe(l.data),[l.data]),t=o.useMemo(()=>{var s;return(((s=S.data)==null?void 0:s.champions)??[]).find(r=>r.season===n)??null},[S.data,n]),y=o.useMemo(()=>t?[t.winner,...t.coChampions??[]]:[],[t]),L=o.useMemo(()=>{var r;if(!t)return 0;const s=le(t);return(((r=S.data)==null?void 0:r.champions)??[]).filter(c=>le(c)===s&&Number(c.season)<=Number(n)).length},[S.data,t,n]),M=o.useMemo(()=>{var s;return(((s=d.data)==null?void 0:s.standings)??[]).filter(r=>!C(r.name)&&!p.has(r.groupId))},[d.data,p]),{podium:U,podiumSource:ce}=o.useMemo(()=>{const s=l.data,r=s==null?void 0:s.seasons.find(a=>a.season===n),c=new Map(P.map(a=>[a.id,a.name])),f=r?s.seasonTeams.filter(a=>a.leagueSeasonId===r.id&&a.finalRank!=null).sort((a,me)=>a.finalRank-me.finalRank).map(a=>({rank:a.finalRank,groupId:a.ownerId?`owner:${a.ownerId}`:null,name:(a.ownerId?c.get(a.ownerId):null)??a.managerName??a.name,record:`${a.wins}-${a.losses}${a.ties?`-${a.ties}`:""}`,pointsFor:a.pointsFor!=null?Number(a.pointsFor):null})).filter(a=>!C(a.name)&&!(a.groupId&&p.has(a.groupId))):[];return f.length>=3?{podium:f.slice(0,3),podiumSource:"final"}:{podium:M.slice(0,3).map(a=>({rank:null,groupId:a.groupId,name:a.name,record:`${a.wins}-${a.losses}${a.ties?`-${a.ties}`:""}`,pointsFor:a.pointsFor})),podiumSource:"regular"}},[l.data,P,n,p,M]),j=o.useMemo(()=>[...M].sort((s,r)=>r.pointsFor-s.pointsFor)[0]??null,[M]),oe=s=>s.groupId!=null&&p.has(s.groupId),H=s=>{var r;return(((r=d.data)==null?void 0:r.matchupRecords)??[]).find(c=>c.category===s&&!oe(c))??null},x=H("most_points"),g=H("biggest_blowout"),E=s=>(s??[]).find(r=>r.season===n&&!p.has(r.groupId))??null,h=E((V=T.data)==null?void 0:V.topMoves),N=E(((q=(_=(Z=T.data)==null?void 0:Z.seasonTops)==null?void 0:_[n])==null?void 0:q.topTradeSides)??((D=T.data)==null?void 0:D.topTradeSides)),b=o.useMemo(()=>{var c;const r=[...(((c=R.data)==null?void 0:c.perManager)??[]).filter(f=>!C(f.groupName)&&!p.has(f.groupId))].sort((f,a)=>a.totalTransactions-f.totalTransactions)[0];return r&&r.totalTransactions>0?r:null},[R.data,p]),A=k.isLoading||l.isLoading||S.isLoading||d.isLoading,de=!!((J=l.data)!=null&&J.seasons.some(s=>s.season===n))||t!=null||(((Q=d.data)==null?void 0:Q.meta.matchupCount)??0)>0,O=s=>
1Math.round(s).toLocaleString(),Y=s=>`${s>=0?"+":"−"}${Math.abs(s)>=100?Math.round(Math.abs(s)).toLocaleString():Math.abs(s).toFixed(1)}`,he=e.jsxs("div",{className:"sbrc-grid",children:[e.jsxs("article",{className:"ui-card sbrc-card",children:[e.jsx("header",{className:"ui-card-head",children:e.jsxs("h2",{children:[e.jsx(se,{size:14}),"Points Champ"]})}),j?e.jsxs("div",{className:"sbrc-stat",children:[e.jsx(v,{value:O(j.pointsFor)}),e.jsxs("p",{className:"sbrc-who",children:[e.jsx(m,{to:w(j.groupId,i),children:j.name}),e.jsxs("small",{children:["most points scored · ",j.wins,"-",j.losses,j.ties?`-${j.ties}`:""," on the year"]})]})]}):e.jsx("p",{className:"ui-card-empty",children:"No scoring on record."})]}),e.jsxs("article",{className:"ui-card sbrc-card",children:[e.jsx("header",{className:"ui-card-head",children:e.jsxs("h2",{children:[e.jsx(ae,{size:14}),"Best Single Week"]})}),x?e.jsxs("div",{className:"sbrc-stat",children:[e.jsx(v,{value:x.value.toFixed(1)}),e.jsxs("p",{className:"sbrc-who",children:[e.jsx("strong",{children:x.name??u(x.managerName)??x.teamName}),e.jsxs("small",{children:["Week ",x.week," · vs."," ",x.opponentName||u(x.opponentManagerName)||"Manager unassigned"]})]})]}):e.jsx("p",{className:"ui-card-empty",children:"No single-week marks yet."})]}),e.jsxs("article",{className:"ui-card sbrc-card",children:[e.jsx("header",{className:"ui-card-head",children:e.jsxs("h2",{children:[e.jsx(ne,{size:14}),"Biggest Blowout"]})}),g?e.jsxs("div",{className:"sbrc-stat",children:[e.jsx(v,{value:`+${g.value.toFixed(1)}`}),e.jsxs("p",{className:"sbrc-who",children:[e.jsx("strong",{children:g.name??u(g.managerName)??g.teamName}),e.jsxs("small",{children:["flattened"," ",g.opponentName||u(g.opponentManagerName)||"Manager unassigned"," ","· Week ",g.week]})]})]}):e.jsx("p",{className:"ui-card-empty",children:"Every game stayed close."})]}),e.jsxs("article",{className:"ui-card sbrc-card",children:[e.jsx("header",{className:"ui-card-head",children:e.jsxs("h2",{children:[e.jsx(re,{size:14}),"Waiver Steal of the Year"]})}),h?e.jsxs("div",{className:"sbrc-stat",children:[e.jsx(v,{value:Y(h.value)}),e.jsxs("p",{className:"sbrc-who",children:[e.jsx("strong",{children:h.playersIn.map(s=>s.name).join(", ")||"—"}),e.jsxs("small",{children:[e.jsx(m,{to:w(h.groupId,i),children:u(h.managerName)??"Manager unassigned"}),h.week!=null&&` · Week ${h.week}`,h.faabBid?` · $${h.faabBid} FAAB`:""," · realized starting-lineup points"]})]})]}):e.jsx("p",{className:"ui-card-empty",children:"No valued pickup this season — roster coverage decides."})]}),e.jsxs("article",{className:"ui-card sbrc-card",children:[e.jsx("header",{className:"ui-card-head",children:e.jsxs("h2",{children:[e.jsx(ie,{size:14}),"Trade Heist of the Year"]})}),N?e.jsxs("div",{className:"sbrc-stat",children:[e.jsx(v,{value:Y(N.value)}),e.jsx("small",{children:"Useful points a week above league starter medians, with draft picks at their standard weekly value."}),e.jsxs("p",{className:"sbrc-who",children:[e.jsx(m,{to:w(N.groupId,i),children:u(N.managerName)??"Manager unassigned"}),e.jsxs("small",{children:["fleeced ",N.partnerNames.join(", ")||"the league",N.received.length>0&&` for ${N.received.map(s=>s.name).join(", ")}`]})]})]}):e.jsx("p",{className:"ui-card-empty",children:"No trade settled far enough apart to call a heist."})]}),e.jsxs("article",{className:"ui-card sbrc-card",children:[e.jsx("header",{className:"ui-card-head",children:e.jsxs("h2",{children:[e.jsx(te,{size:14}),"Busiest Mover"]})}),b?e.jsxs("div",{className:"sbrc-stat",children:[e.jsx(v,{value:String(b.totalTransactions)}),e.jsxs("p",{className:"sbrc-who",children:[e.jsx(m,{to:w(b.groupId,i),children:b.groupName}),e.jsxs("small",{children:["transactions on the year",b.trades>0&&` · ${b.trades} ${b.trades===1?"trade":"trades"}`]})]})]}):e.jsx("p",{className:"ui-card-empty",children:"A quiet wire all season."})]})]});return e.jsxs("main",{className:"hofPage hof-sb-recap",children:[e.jsx(ge,{}),e.jsx("div",{className:"hjb-frame",children:e.jsx("section",{"aria-label":`${n} season recap`,children:!W||!A&&!de?e.jsxs("p",{className:"ui-page-state",children:["No ",W?n:""," season on file for this league."," ",e.jsx(m,{to:ee(i),children:"Back to the Hall of Fame →"})]}):A?e.jsx("p",{className:"ui-page-state",children:"Rolling the season tape…"}):e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"sbrc-board","aria-label":"Season poster",children:[e.jsx("div",{className:"sbrc-bulbs","aria-hidden":"true"}),e.jsxs("div",{className:"sbrc-topline",children:[e.jsxs("span",{children:["Season Recap",$?` · ${$}`:""]}),B&&i&&e.jsx(Ce,{leagueId:i,shareToken:B,season:n})]}),e.jsxs("div",{className:"sbrc-hero",children:[e.jsxs("div",{className:"sbrc-hero-title",children:[e.jsx("p",{className:"sbrc-eyebrow",children:"The season, wrapped"}),e.jsx("h1",{className:"hjb-dot",children:n}),(((X=d.data)==null?void 0:X.meta.matchupCount)??0)>0&&e.jsxs("p",{className:"sbrc-hero-meta",children:[e.jsx("b",{className:"hjb-dot",children:d.data.meta.matchupCount})," ","matchups ·"," ",e.jsx("b",{className:"hjb-dot",children:d.data.meta.teamCount})," ","teams ·"," ",e.jsx("b",{className:"hjb-dot",children:d.data.meta.weekCount})," ","weeks"]})]}),e.jsxs("div",{className:"sbrc-plate",children:[e.jsxs("span",{className:"sbrc-plate-tag",children:[e.jsx(Ie,{size:12,"aria-hidden":"true"}),y.length>1?"League Co-champions":"League Champion"]}),t?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"sbrc-plate-nm",children:y.map((s,r)=>e.jsxs("span",{children:[r>0&&" & ",s.franchiseId?e.jsx(m,{to:w(`owner:${s.franchiseId}
1`,i),children:s.franchiseName??u(s.managerName)??s.name}):s.franchiseName??u(s.managerName)??s.name]},s.teamId))}),e.jsxs("p",{className:"sbrc-plate-ln",children:[y.length>1&&"Shared title",y.length===1&&L>0&&e.jsxs(e.Fragment,{children:[Me[L-1]??`${L}th`," title"]}),t.runnerUp&&e.jsxs(e.Fragment,{children:[" ","· def."," ",t.runnerUp.franchiseName??u(t.runnerUp.managerName)??t.runnerUp.name,t.winner.points&&t.runnerUp.points&&e.jsxs(e.Fragment,{children:[" ",e.jsxs("b",{className:"hjb-dot",children:[Number(t.winner.points).toFixed(1),"–",Number(t.runnerUp.points).toFixed(1)]})]})]}),t.finalsWeeks&&t.finalsWeeks.length>1?` · Weeks ${t.finalsWeeks.join(" & ")}`:t.finalsWeek!=null&&` · Week ${t.finalsWeek}`]})]}):e.jsxs("p",{className:"sbrc-plate-ln is-empty",children:["No championship game on record for ",n,"."]})]})]}),U.length>0&&e.jsxs("div",{className:"sbrc-podium","aria-label":"Final standings",children:[e.jsx("span",{className:"sbrc-podium-lbl",children:ce==="final"?"Final standings":"Regular-season standings"}),U.map((s,r)=>e.jsxs("div",{className:`sbrc-step is-${s.rank??r+1}`,children:[e.jsx("span",{className:"sbrc-step-rk hjb-dot",children:s.rank??r+1}),e.jsx("span",{className:"sbrc-step-nm",children:s.groupId?e.jsx(m,{to:w(s.groupId,i),children:s.name}):s.name}),e.jsxs("span",{className:"sbrc-step-ln",children:[s.record,s.pointsFor!=null&&` · ${O(s.pointsFor)} PF`]})]},s.groupId??s.name))]}),e.jsx("div",{className:"sbrc-bulbs","aria-hidden":"true"})]}),I&&i?e.jsxs("section",{className:"ui-card sbrc-upgrade","aria-label":"Season highlights preview",children:[e.jsx("header",{className:"ui-card-head",children:e.jsxs("h2",{children:["The ",n," highlights"]})}),e.jsxs("ul",{className:"sbrc-highlight-labels",children:[e.jsxs("li",{children:[e.jsx(se,{size:16,"aria-hidden":"true"})," Points Champ"]}),e.jsxs("li",{children:[e.jsx(ae,{size:16,"aria-hidden":"true"})," Best Single Week"]}),e.jsxs("li",{children:[e.jsx(ne,{size:16,"aria-hidden":"true"})," Biggest Blowout"]}),e.jsxs("li",{children:[e.jsx(re,{size:16,"aria-hidden":"true"})," Waiver Steal of the Year"]}),e.jsxs("li",{children:[e.jsx(ie,{size:16,"aria-hidden":"true"})," Trade Heist of the Year"]}),e.jsxs("li",{children:[e.jsx(te,{size:16,"aria-hidden":"true"})," Busiest Mover"]})]}),e.jsx("div",{className:"sbrc-upgrade-action",children:e.jsx("button",{type:"button",onClick:()=>z(!0),children:"Explore the full season"})})]}):he,e.jsxs("footer",{className:"sbrc-cta",children:[e.jsx("p",{children:"Every season hangs in the archive — banners, records, and receipts."}),e.jsxs("div",{className:"sbrc-cta-row",children:[e.jsx(m,{className:"ui-btn ui-btn--gold",to:ee(i),children:"See the full archive →"}),e.jsx(m,{className:"ui-btn",to:Ne(i),children:"Open the record book"})]})]})]})})}),F&&i&&e.jsx(fe,{leagueId:i,leagueName:$,surface:"recap",onClose:()=>z(!1)})]})}export{Ae as Recap};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.