1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95187,(e,a,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={callServer:function(){return o.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return n.findSourceMapURL}};for(var l in r)Object.defineProperty(t,l,{enumerable:!0,get:r[l]});let o=e.r(32120),n=e.r(92245),s=e.r(35326)},57535,85501,e=>{"use strict";var a=e.i(43476),t=e.i(7670),r=e.i(18566),l=e.i(71645),o=e.i(71793),n=e.i(74527);function s(e,a){if(e.length<=1||!a)return e;let t=[...e].sort((e,a)=>e.name.localeCompare(a.name)),r=t.findIndex(e=>e.name===a);if(-1===r)return e;let l=new Set([t[r-1],t[r],t[r+1]].filter(e=>!!e).map(e=>e.name));return e.filter(e=>l.has(e.name))}e.s(["getActivePageFromPathname",0,function(e){let a=e.split("/").filter(Boolean).pop();return"roster"===a||"schedule"===a||"scores"===a?a:"home"},"getYearsForDropdown",0,s],85501);var i=e.i(77222),c=e.i(73791),d=e.i(40460);function m({programTeams:e,availableYears:u}){let h=(0,r.useSearchParams)(),x=(0,r.useRouter)(),p=(0,r.usePathname)(),{school:f}
1=(0,n.useSchoolStore)(),g=(0,c.getSchoolTimezone)(f),[y,b]=(0,l.useState)(!1),[v,S]=(0,l.useState)(!1),j=(0,d.getSchoolYearFromUrl)(h?.get("year")??null,g),w=(0,d.parseValidTeamQueryIdForSportsRedirect)(h?.get("team")??"")??"",N=u.find(e=>e.name===j)??u[0],C=N?.id??"",T=N?.name??j,$=(0,i.getTeamsForYearDropdown)(e,T,w),P=$.find(e=>e.id===w)?.id??"",k=s(u,T),F=e=>{let a=new URLSearchParams(h?.toString());Object.entries(e).forEach(([e,t])=>{a.set(e,t)}),x.replace(`${p}?${a.toString()}`)};return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(o.Select,{onValueChange:a=>{let t=u.find(e=>e.id===a);if(!t)return;let r=(0,i.getDefaultTeamForYear)(e,t.name),l={year:(0,d.formatSchoolYearForUrl)(t.name)};r?.id&&(l.team=r.id),F(l)},onOpenChange:S,value:C,children:[(0,a.jsx)(o.SelectTrigger,{"aria-label":"Select school year",className:(0,t.default)("h-10 w-32 bg-zinc-100 text-sm font-medium text-zinc-900 md:w-40",{"rounded-b-none":v}),"data-testid":"team-year-dropdown-trigger",children:(0,a.jsx)(o.SelectValue,{placeholder:"Select year"})}),(0,a.jsx)(o.SelectContent,{position:"popper",className:"-top-[5px] m-0 w-32 rounded-t-none bg-zinc-100 p-0 md:w-40",children:(0,a.jsx)(o.SelectGroup,{children:k.map((e,r)=>(0,a.jsx)(o.SelectItem,{value:e.id,className:(0,t.default)("w-full cursor-pointer",{"border-b border-zinc-200":r!==k.length-1}),"aria-label":e.name,"data-testid":`team-year-dropdown-${r}`,children:(0,d.formatSchoolYearForUrl)(e.name)},e.id))})})]}),(0,a.jsxs)(o.Select,{onValueChange:e=>{F({team:e,year:(0,d.formatSchoolYearForUrl)(T)})},onOpenChange:b,value:P,children:[(0,a.jsx)(o.SelectTrigger,{"aria-label":"Select team",className:(0,t.default)("h-10 w-44 bg-zinc-100 text-sm font-medium text-zinc-900 md:w-64",{"rounded-b-none":y}),"data-testid":"team-dropdown-trigger",children:(0,a.jsx)(o.SelectValue,{placeholder:"Select a team"})}),(0,a.jsx)(o.SelectContent,{position:"popper",className:"-top-[5px] m-0 w-44 rounded-t-none bg-zinc-100 p-0 md:w-64",children:(0,a.jsx)(o.SelectGroup,{children:$.map((e,r)=>(0,a.jsx)(o.SelectItem,{value:e.id,className:(0,t.default)("w-full cursor-pointer",{"border-b border-zinc-200":r!==$.length-1}),"aria-label":e.displayName??void 0,"data-testid":`team-dropdown-${r}`,children:e.displayName},e.id))})})]})]})}let u=16/9,h=l.useLayoutEffect;function x(e,a){if(e<=0||a<=0)return null;let t=e/a;return t>=u?t:null}function p({photoUrl:e,altText:r,isStandalone:o}){let[n,s]=(0,l.useState)(!1),[i,c]=(0,l.useState)(null),d=(0,l.useRef)(null);h(()=>{s(!1),c(null);let e=d.current;e&&e.complete&&(c(x(e.naturalWidth,e.naturalHeight)),s(!0))},[e]);let m=n&&null!==i&&i>=u;return(0,a.jsxs)("div",{className:(0,t.default)("relative w-full overflow-hidden bg-white",!o&&!m&&"xl:h-[630px]"),children:[(0,a.jsx)("div",{"aria-hidden":"true",className:(0,t.default)("absolute inset-0 scale-110 bg-cover bg-center blur-2xl",{"xl:absolute xl:inset-0":!o,"opacity-0":!n||m}),style:{backgroundImage:`url("${e}")`}}),(0,a.jsx)("img",{ref:d,src:e,alt:r,style:m?{aspectRatio:i}:void 0,className:(0,t.default)("mx-auto block h-auto w-auto",{"max-h-[500px] max-w-full":n&&m,"xl:h-auto xl:max-h-none xl:w-full":n&&m&&!o,"relative z-10 max-h-[500px] max-w-full":n&&!m,"xl:absolute xl:inset-0 xl:h-full xl:max-h-none xl:w-full xl:object-contain":n&&!m&&!o,hidden:!n}),onLoad:e=>{c(x(e.currentTarget.naturalWidth,e.currentTarget.naturalHeight)),s(!0)},onError:()=>s(!0)}),!n&&(0,a.jsx)("div",{className:"min-h-40"})]})}var f=e.i(93748),g=e.i(17218),y=e.i(29857),b=e.i(67479),v=e.i(45974);e.s(["TeamPageHeaderComponent",0,function({school:e,program:o,programSlug:n,team:s,programTeams:i,availableYears:c,activePage:u="home",showUnidatValuesFlag:h}){let[x,S]=(0,l.useState)(!1),j=(0,y.useStandaloneDisplayMode)(),w=(0,r.useSearchParams)(),N=w?.get("year")??(s?.year?.name?(0,d.formatSchoolYearForUrl)(s.year.name):null),C=s?`?team=${s.id}${N?`&year=${N}`:""}`:N?`?year=${N}`:"",T=s?.photoUrl||null,$=(0,b.isColorWhite)(e.secondaryColor),P=function({programSlug:e,teamSearchParam:a}){return[{label:"Home",href:`/sport/${e}${a}`,key:"home"},{label:"Roster",href:`/sport/${e}/roster${a}
1`,key:"roster"},{label:"Schedule",href:`/sport/${e}/schedule${a}`,key:"schedule"},{label:"Scores",href:`/sport/${e}/scores${a}`,key:"scores"}]}({programSlug:n,teamSearchParam:C});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("header",{className:(0,t.default)("relative flex w-full flex-col items-center justify-center bg-school-primary-300 text-school-primary-contrast",!j&&!T&&"xl:min-h-80"),children:[j&&(0,a.jsxs)("div",{className:(0,t.default)("flex min-h-20 w-full flex-col items-stretch justify-center gap-2 bg-school-secondary px-4 py-5 text-center text-school-secondary-contrast",{"border-b-[6px] border-school-primary":$}),"data-testid":"pwa-team-page-header",children:[(0,a.jsx)("div",{className:"self-start",children:(0,a.jsx)(f.PwaSmartBackButtonComponent,{})}),(0,a.jsx)("h1",{className:"font-heading text-3xl uppercase",children:o?.name})]}),T?(0,a.jsx)(p,{photoUrl:T,altText:`${o.name} banner`,isStandalone:j}):(0,a.jsxs)("div",{className:"flex flex-col items-center px-6 py-16",children:[e?.logoUrl&&(0,a.jsx)("img",{src:e?.logoUrl,alt:`${(0,v.getSchoolName)(e,h)} logo banner`,className:"mb-4 w-40"}),(0,a.jsxs)("h1",{className:"text-center font-heading text-3xl",children:[(0,v.getSchoolName)(e,h)," ",o?.name]})]})]}),(0,a.jsxs)("nav",{className:"container relative -top-8 z-20 mx-auto flex-col items-center rounded-lg bg-school-secondary px-4 text-school-secondary-contrast sm:px-8 xl:flex xl:min-h-16 xl:flex-row xl:justify-between","data-testid":"team-page-header-nav",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 pt-4 md:flex-row xl:justify-start xl:gap-8 xl:py-0",children:[(0,a.jsx)("h3",{className:"text-center font-heading text-lg xl:text-2xl","data-testid":"team-name-text",children:o?.name}),(0,a.jsx)(m,{programTeams:i,availableYears:c},`${i.length}-${c.length}-${w?.toString()??""}`)]}),(0,a.jsx)("ul",{className:"flex flex-wrap justify-center gap-2 py-4 font-body text-sm font-medium xl:flex-nowrap xl:justify-start xl:py-0",children:P.map(r=>{let l=(0,t.default)("inline-flex cursor-pointer items-center rounded-2xl p-2",{"bg-core text-core-contrast":u===r.key&&!(0,b.isColorWhite)(e.secondaryColor),"bg-school-primary text-school-primary-contrast":u===r.key&&(0,b.isColorWhite)(e.secondaryColor),"hover:bg-core hover:text-core-contrast":!(0,b.isColorWhite)(e.secondaryColor),"hover:bg-school-primary hover:text-school-primary-contrast":(0,b.isColorWhite)(e.secondaryColor)});return(0,a.jsx)("li",{children:r.href?(0,a.jsx)("a",{href:r.href,className:l,"data-testid":`nav-${r.key}`,children:r.label}):(0,a.jsx)("button",{type:"button",onClick:r.onClick,className:l,"aria-haspopup":"dialog","aria-expanded":"more"===r.key?x:void 0,"aria-controls":"more"===r.key?"more-dialog":void 0,"data-testid":`nav-${r.key}`,children:r.label})},r.key)})})]}),(0,a.jsx)(g.Dialog,{open:x,onOpenChange:S,children:(0,a.jsxs)(g.DialogContent,{className:"w-full max-w-md",id:"more-dialog",children:[(0,a.jsx)(g.DialogHeader,{children:(0,a.jsx)(g.DialogTitle,{children:"More"})}),(0,a.jsx)("ul",{className:"space-y-2",children:[].map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:e.href,onClick:()=>S(!1),className:(0,t.default)("block w-full rounded-lg p-3 text-center font-medium transition-colors",{"bg-school-primary text-school-primary-contrast":u===e.key,"text-gray-700 hover:bg-gray-100":u!==e.key}),children:e.label})},e.key))})]})})]})}],57535)},1970,e=>{"use strict";var a=e.i(43476),t=e.i(18566),r=e.i(71645),l=e.i(57535),o=e.i(95187);let n=(0,o.createServerReference)("60d2036d773b07b9269c285999288ad75abfddac9b",o.callServer,void 0,o.findSourceMapURL,"getTeamPageFilterDataAction");var s=e.i(48169),i=e.i(85501),c=e.i(40460);e.s(["TeamPageHeaderShellWrapperComponent",0,function({school:e,programsData:o,programSlug:d,showUnidatValuesFlag:m,initialFilterData:u}){let h=(0,t.useSearchParams)(),x=(0,t.usePathname)(),p=(0,c.parseValidTeamQueryIdForSportsRedirect)(h?.get("team")??"")??"",f=(0,i.getActivePageFromPathname)(x),g=(0,r.useMemo)(()=>(0,s.resolveTeamPageProgram)(o,d,p||void 0),[o,d,p]),[y,b]=(0,r.useState)(u);(0,r.useEffect)(()=>{let a=!1,t=g?.id;
1return t&&n(t,e.id).then(e=>{a||b(e)}).catch(()=>{}),()=>{a=!0}},[g?.id,e.id,x]),(0,r.useEffect)(()=>{let a=g?.id;if(!a)return()=>void 0;let t=t=>{t.persisted&&n(a,e.id).then(b).catch(()=>void 0)};return window.addEventListener("pageshow",t),()=>{window.removeEventListener("pageshow",t)}},[g?.id,e.id]);let v=(0,r.useMemo)(()=>{if(p&&g)return y.programTeams.find(e=>e.id===p)??g.teams?.find(e=>e.id===p)},[y.programTeams,g,p]);return g?(0,a.jsx)(l.TeamPageHeaderComponent,{school:e,program:g,team:v,programSlug:d,programTeams:y.programTeams,availableYears:y.availableYears,activePage:f,showUnidatValuesFlag:m}):(0,a.jsx)(a.Fragment,{})}],1970)}]);
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.