1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,27389,e=>{"use strict";let t=new Set(["free agent","fa","unsigned","n/a","na","none","unrestricted free agent","ufa","rfa"]);function a(e){return"string"==typeof e?e.trim():""}function r(e){let r=a(e).toLowerCase();return!r||t.has(r)}function s(e){return"active"===(e||"").trim().toLowerCase()}function l(e){return!!e&&s(e.status)&&!r(e.team)}function i(e){return!!e&&"number"==typeof e.nuggetCount&&e.nuggetCount>0}function n(e,t=!1){return!!e&&(l(e)||t||i(e))}function o(e,t){return 0!==e.length&&!!e.every(e=>n(e,!1))&&("number"!=typeof t||!(t>=3500))}e.s(["ACTIVE_OR_HAS_NUGGETS_PARAM",0,"activeOrHasNuggets","DIRECTORY_FILTER_ACTIVE_OR_NUGGETS",0,"activeOrNuggets","DIRECTORY_FILTER_PARAM",0,"directory","FREE_AGENT_TEAM_LABELS",0,t,"backendHonorsActiveOrHasNuggets",()=>o,"hasKnownNuggets",()=>i,"isActiveOnTeam",()=>l,"isActivePlayerStatus",()=>s,"isFreeAgentTeamLabel",()=>r,"normalizeTeamName",()=>a,"shouldShowInDirectory",()=>n])},26935,e=>{"use strict";var t=e.i(43476),a=e.i(19126);function r({children:e}){let{isAuthenticated:r,isAuthBootstrapComplete:s}=(0,a.useAuth)();return!function({showPublicTeaser:e=!0,isAuthenticated:t,isAuthBootstrapComplete:a}){return!1!==e&&(!a||!t)}({isAuthenticated:r,isAuthBootstrapComplete:s})?null:(0,t.jsx)(t.Fragment,{children:e})}e.s(["PublicHubGuestCopy",()=>r],26935)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},55436,e=>{"use strict";let t=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],55436)},71689,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],71689)},11664,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(55436),s=e.i(37727);function l({placeholder:e="Search...",size:l="md",design:i="",width:n="w-full",className:o="",value:c,onChange:d,buttonLabel:u,onButtonClick:g,buttonVariant:h="orange"}){let[x,m]=(0,a.useState)(""),f=void 0!==c?c:x,p=e=>{void 0===c&&m(e),d?.(e)};return(0,t.jsx)("div",{className:`mb-8 flex ${n} ${o}`,children:(0,t.jsxs)("div",{className:"relative w-full",children:[(0,t.jsx)(r.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 w-5 h-5"}),(0,t.jsx)("input",{type:"text",placeholder:e,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"===e.key&&g&&g()},className:`filter-input w-full pl-10 ${u?"pr-28":"pr-10"} rounded-full placeholder:text-muted-ink focus:outline-none focus:ring-2 focus:ring-[hsl(var(--orange)/0.25)] focus:border-transparent ${"sm"===l?"py-1.5 text-sm":"lg"===l?"py-4 text-lg":"py-3 text-base"} ${i}`}),f&&!u&&(0,t.jsx)("button",{type:"button",onClick:()=>p(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-ink hover:text-[hsl(var(--orange))] focus:outline-none","aria-label":"Clear search",children:(0,t.jsx)(s.X,{className:"w-5 h-5"})}),u&&(0,t.jsx)("button",{type:"button",onClick:g,className:`absolute right-2 top-1/2 -translate-y-1/2 px-4 py-1.5 text-sm rounded-full ${"ink"===h?"bg-ink text-page":"bg-[hsl(var(--orange))] text-white"}`,children:u})]})})}e.s(["default",()=>l])},91896,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(22016),s=e.i(57688),l=e.i(31278),i=e.i(71689),n=e.i(72520),o=e.i(71372),c=e.i(27389),d=e.i(54863),u=e.i(18566),g=e.i(19126),h=e.i(5216),x=e.i(11664);function m({player:e,currentPage:a,teamsData:i,isFollowing:n,onToggleFollow:c,isAuthenticated:u,isLoading:g}){var h;let x=(0,o.getImageUrl)(e.headshotPic),m=(h=e.team||"",i?.teams&&h?i.teams.find(e=>e.abbreviation?.toLowerCase()===h.toLowerCase()||e.name?.toLowerCase()===h.toLowerCase()||e.city?.toLowerCase()===h.toLowerCase()):null);return(0,t.jsxs)(r.default,{href:`/players/${e.id}?page=${a}`,className:"rounded-2xl border border-line bg-card overflow-hidden p-1 hover:bg-soft transition-colors",children:[(0,t.jsx)("div",{className:"relative h-48 bg-soft p-4 rounded-lg",children:(0,t.jsx)(s.default,{src:x||"/default-player.jpg",alt:e.name,fill:!0,className:"object-cover",loader:({src:e})=>e,onError:e=>{e.target.src="/default-player.jpg"}})}),(0,t.jsxs)("div",{className:"p-2",children:[(0,t.jsx)("div",{className:"flex justify-between",children:(0,t.jsx)("h3",{className:"text-lg leading-tight font-semibold text-ink",children:e.name})}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-between",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[m&&(0,t.jsx)(s.default,{src:(0,d.getTeamLogoUrl)(m.logo)||"",alt:`${m.name} logo`,width:24,height:18,className:"object-contain",loader:({src:e})=>e}),(0,t.jsxs)("p",{className:"text-sm text-muted-ink",children:[e.team||"Free Agent"," ",e.position]})]})}),(0,t.jsx)("button",{className:"w-full text-xs border border-transparent bg-[hsl(var(--orange))] text-white text-center px-5 py-2 rounded-full transition-colors hover:cursor-pointer flex items-center justify-center gap-1 hover:opacity-90",onClick:e=>{e.preventDefault(),c()},disabled:g,children:g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.L
1oader2,{className:"w-3 h-3 animate-spin"}),(0,t.jsx)("span",{children:"..."})]}):n?"Following":"Follow"})]})]})]})}function f({initialDirectory:e}){let r=(0,u.useSearchParams)(),s=(0,u.useRouter)(),{isAuthenticated:l}=(0,g.useAuth)(),{showToast:f}=(0,h.useToast)(),[p,y]=(0,a.useState)(()=>r?.get("search")||""),[b,v]=(0,a.useState)(()=>r?.get("position")||"all"),[j,w]=(0,a.useState)(()=>r?.get("conference")||"all"),[N,C]=(0,a.useState)(()=>{let e=r?.get("page");return e?parseInt(e,10):1}),[k,S]=(0,a.useState)({}),[T,A]=(0,a.useState)({}),[E]=(0,o.useFollowPlayerMutation)(),[L]=(0,o.useUnfollowPlayerMutation)(),P=(0,a.useRef)(!1),R=!!(e&&e.query.page===N&&e.query.search===p&&e.query.position===b&&e.query.conference===j),{data:F,isLoading:_}=(0,d.useGetTeamsQuery)(),{data:M,isLoading:I,error:O,refetch:$}=(0,o.useGetPlayersQuery)({page:N,limit:12,pageSize:12,search:p||void 0,position:"all"!==b?b:void 0,conference:"all"!==j?j:void 0,directory:c.DIRECTORY_FILTER_ACTIVE_OR_NUGGETS,activeOrHasNuggets:!0}),G=(e,t,a,r)=>{let l=new URLSearchParams,i=e??N,n=t??p,o=a??b,c=r??j;i>1&&l.set("page",i.toString()),n&&l.set("search",n),"all"!==o&&l.set("position",o),"all"!==c&&l.set("conference",c);let d=l.toString()?`?${l.toString()}`:"/players";s.replace(d,{scroll:!1})},U=e=>{C(e),G(e,p,b,j),window.scrollTo({top:0,behavior:"smooth"})};(0,a.useEffect)(()=>{let e=setTimeout(()=>{p!==(r?.get("search")||"")&&(C(1),G(1,p,b,j))},500);return()=>clearTimeout(e)},[p]),(0,a.useEffect)(()=>
1{let e=r?.get("position")||"all",t=r?.get("conference")||"all";(b!==e||j!==t)&&(C(1),G(1,p,b,j))},[b,j]),(0,a.useEffect)(()=>{M?.data?.players&&S(M.data.players.reduce((e,t)=>(e[t.id]=t.isFollowed||!1,e),{}))},[M]),(0,a.useEffect)(()=>{$()},[N,p,b,j]);let D=async(e,t)=>{if(!l)return void f("Please log in to follow players.","warning");A(t=>({...t,[e]:!0}));try{t?(await L(e).unwrap(),f("Player unfollowed successfully!","success")):(await E(e).unwrap(),f("Player followed successfully!","success")),S(t=>({...t,[e]:!t[e]})),$()}catch(a){console.error("Error toggling follow status:",a),S(a=>({...a,[e]:t})),a?.status===401||a?.data?.message?.includes("Authentication required")?f("Please log in to follow players.","warning"):f("Failed to update follow status. Please try again.","error")}finally{A(t=>({...t,[e]:!1}))}},z=M?.data?.players??(R?e?.players??[]:[]),B=M?.data?.pagination??(R?e?.pagination??void 0:void 0),H=z.length>0||!!O;if((0,a.useLayoutEffect)(()=>{if(H){var e;(e=document.getElementById("players-ssr-directory"))&&(e.hidden=!0),P.current=!0}},[H]),I&&0===z.length)return P.current?(0,t.jsxs)("section",{className:"container mx-auto px-4 py-8",children:[(0,t.jsx)("div",{className:"text-center mb-8",children:(0,t.jsx)("p",{className:"text-lg md:text-xl text-gray-600 dark:text-[#C7C8CB]",children:"Loading players..."})}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:12}).map((e,a)=>(0,t.jsxs)("div",{className:"animate-pulse rounded-2xl border border-line overflow-hidden bg-card p-3",children:[(0,t.jsx)("div",{className:"bg-soft rounded-xl aspect-square mb-4"}),(0,t.jsxs)("div",{className:"space-y-2 px-2 pb-4",children:[(0,t.jsx)("div",{className:"h-4 bg-soft rounded w-5/6"}),(0,t.jsx)("div",{className:"h-3 bg-soft rounded w-3/4"}),(0,t.jsx)("div",{className:"h-3 bg-soft rounded w-2/3"})]})]},a))})]}):null;if(O&&0===z.length)return(0,t.jsx)("section",{className:"container mx-auto px-4 py-8",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-xl text-red-600 dark:text-red-400 mb-4",children:"Failed to load players"}),(0,t.jsx)("p",{className:"text-gray-600 dark:text-[#C7C8CB] mb-6",children:"Please try again later."}),(0,t.jsx)("button",{onClick:()=>window.location.reload(),className:"bg-[var(--color-orange)] text-white dark:text-black px-6 py-2 rounded-full hover:scale-105 transition-transform",children:"Retry"})]})});let q=B?.totalPages||0,K=B?.hasMore??N<q;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("section",{className:"container mx-auto px-3 py-8",children:[(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)("div",{className:"flex justify-center mb-10",children:(0,t.jsx)(x.default,{placeholder:"Search Players",size:"md",width:"w-full md:w-1/2",buttonLabel:"Search here",value:p,onChange:e=>y(e),onButtonClick:()=>{C(1),G(1,p,b,j)}})})}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:z.map(e=>(0,t.jsx)(m,{player:e,currentPage:N,teamsData:F,isFollowing:k[e.id],onToggleFollow:()=>D(e.id.toString(),k[e.id]),isAuthenticated:l,isLoading:T[e.id]||!1},e.id))}),0===z.length&&(0,t.jsxs)("div",{className:"text-center py-12",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold mb-2",children:"No players found"}),(0,t.jsx)("p",{className:"mb-4",children:"Try adjusting your search criteria or filters"}),(0,t.jsx)("button",{onClick:()=>{y(""),v("all"),w("all"),C(1),G(1,"","all","all")},className:"bg-[hsl(var(--orange))] text-white px-6 py-2 rounded-full hover:opacity-90 transition-colors",children:"Clear Filters"})]})]}),(q>1||K||N>1)&&(0,t.jsx)("div",{className:"mt-6 w-full px-3 py-6",children:(0,t.jsxs)("div",{className:"flex w-full max-w-full flex-wrap items-center justify-center gap-1.5 sm:gap-2",children:[(0,t.jsx)("button",{onClick:()=>U(Math.max(1,N-1)),disabled:1===N,className:"px-3 py-2 rounded-full border border-line bg-soft text-ink disabled:opacity-50 disabled:cursor-not-allowed hover:bg-card transition-all","aria-label":"Previous page",children:(0,t.jsx)(i.ArrowLeft,{size:18})}),Array.from({length:Math.min(5,Math.max(q,N+ +!!K))},(e,a)=>{let r=Math.max(1,Math.min(Math.max(1,Math.max(q,N+ +!!K)-4),N-2))+a;return(0,t.jsx)("button",{onClick:()=>U(r),className:`px-2.5 py-2 rounded-full border transition-all sm:px-4 ${r===N?"bg-[hsl(var(--orange))] text-white border-[hsl(var(--orange))]":"text-muted-ink border-line bg-soft hover:bg-card"}`,children:r},r)}),(0,t.jsxs)("button",{onClick:()=>U(N+1),disabled:!K&&N>=q,className:"flex items-center justify-center gap-1.5 px-3 py-2 rounded-full border border-transparent bg-[hsl(var(--orange))] text-white font-medium disabled:opacity-50 disabled:cursor-not-allowed hover:opacity-90 transition-all sm:gap-2 sm:px-4",children:["Next",(0,t.jsx)(n.ArrowRight,{size:18})]})]})})]})}function p({initialDirectory:e}){let[r,s]=(0,a.useState)(!1);return((0,a.useEffect)(()=>{s(!0)},[]),r)?(0,t.jsx)(a.Suspense,{fallback:null,children:(0,t.jsx)(f,{initialDirectory:e})}):null}e.s(["default",()=>p],91896)}]);
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.