PageSourceSearch

https://www.afhockey.com/_next/static/chunks/pages/calendar-82c04e7f8ad1863e.js

js afhockey.com collected 2026-09-25 08:29:10 UTC 11,729 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5a6655e-6253-5f06-93b8-840f8b8a1607")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[930],{47899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ee});var l=n(14232),a=n(2171),r=n(38008),o=n(82851);n(70470);var i=n(23200),m=n(55437),c=n(34917),s=n(12461),d=n(30842),u=n(74055),p=n(47104),y=n(75826),E=n(70564),h=n(74854),f=n(82868),g=n(31661),A=n.n(g),v=n(66101),x=n(55141),b=n(93052),w=n(20008),C=n(47753);let I=()=>l.createElement(d.A,{component:"div",maxWidth:1366,center:!0},l.createElement(b.A,{vertical:"medium"},l.createElement(u.A,{all:"small",component:"div"},l.createElement(p.A,{columns:"1fr",rowGap:"medium",columnGap:"large",responsive:[{minWidth:"fullHeader",props:{columns:"minmax(0, 900px) minmax(0, 450px)"}}],style:{padding:"20px 0"}},l.createElement(w.A,{flexDirection:"column",style:{gap:"40px"}},l.createElement(C.A,{width:"100%",height:"80px",radius:"rounded"}),l.createElement(C.A,{width:"100%",height:"400px",radius:"rounded"})),l.createElement("div",null,l.createElement(C.A,{width:"100%",height:"320px",radius:"rounded"}))))));var T=n(35027),M=n(50762),_=n(74163),F=n(52486),z=n(6223),k=n(6653),S=n(4439),N=n(61799);let O=({event:e,club:t})=>{let n=l.createElement(p.A,{columns:"36px 1fr",columnGap:"10px",alignItems:"center"},t.logo?l.createElement(z.A,{src:t.logo,alt:t.name,height:36,width:36,transformation:"square",loading:"lazy"}):l.createElement(k.A,{size:"36"}),l.createElement(w.A,{flexDirection:"column",style:{gap:"5px"},justifyContent:"center"},l.createElement(T.A,{preset:"document",size:14},e.title),e.location&&l.createElement(T.A,{preset:"description",size:12,color:"dustygray"},e.location)));return l.createElement(N.A,{route:"calendar.event",params:{_title:e.title,id:e.id}},l.createElement("a",null,l.createElement(w.A,{flexDirection:"column",style:{minHeight:"150px",backgroundColor:"#fff",boxSizing:"border-box",padding:"16px"},component:"div"},l.createElement(w.A,{justifyContent:"space-between",alignItems:"center",style:{paddingBottom:"20px"}},l.createElement(s.A,{fill:"#F8E8FD",radius:"rounded"},l.createElement(u.A,{all:"xsmall"},l.createElement(T.A,{color:"#A316CF",size:14,weight:600,transform:"uppercase"},"Club Events"))),l.createElement(T.A,{size:14,color:"#666"},`${r.c9.fromISO(e.start).setZone(t.timezone).toFormat("HH:mm")}
4               - ${r.c9.fromISO(e.end).setZone(t.timezone).toFormat("HH:mm")}`)),l.createElement(w.A,{flexDirection:"column",justifyContent:"center",style:{height:"100%",margin:"auto 0"}},l.createElement(p.A,{columns:"1fr auto",rowGap:"small"},l.createElement(p.A,{alignItems:"center",alignContent:"center",style:{paddingRight:"5px"}},n),l.createElement(p.A,{columns:"1fr 20px",alignItems:"center",justifyContent:"end",columnGap:"5px"},l.createElement(T.A,{preset:"body--small",color:"#000"}),l.createElement(S.A,{name:"arrow-right",color:"gray",size:16})))))))},j=({club:e,data:t,selectedDate:n})=>{if(!t)return null;let a=t.find(e=>e.date===n.toFormat("yyyy-MM-dd")),o=(0,M.A)(a),i=null;if(0===o.length){let e=t.findIndex(e=>e.date===n.toFormat("yyyy-MM-dd"));i=t.slice(e).find(e=>(0,M.A)(e).length>0)||null}let m=t=>"fixture"===t.sortType?l.createElement(s.A,{key:`${t.id}-${t.teamId}`,radius:"8px",style:{overflow:"hidden"},component:"div"},l.createElement(_.A,{match:t,club:e,type:t.hasOutcome?"result":"fixture",isMobile:!0})):"training"===t.sortType?l.createElement(s.A,{key:t.id,radius:"8px",style:{overflow:"hidden"},component:"div"},l.createElement(F.A,{club:e,session:t,isLast:!0})):"event"===t.sortType?l.createElement(s.A,{key:t.id,radius:"8px",style:{overflow:"hidden"},component:"div"},l.createElement(O,{club:e,event:t})):null;return l.createElement(u.A,{horizontal:"small",component:"div",style:{width:"100%",boxSizing:"border-box"}},l.createElement(s.A,{fill:"#f5f5f5",radius:"8px",style:{padding:"10px"},component:"div"},l.createElement(w.A,{flexDirection:"column",style:{gap:"10px"}},l.createElement(T.A,{size:16,weight:"bold",color:"#000"},n.toFormat("dd MMM")),o.length>0?o.map(m):l.createElement(l.Fragment,null,l.createElement(s.A,{fill:"#fff",radiu
4s:"8px",style:{padding:"10px"}},l.createElement(T.A,{size:14,color:"#000"},"No events today")),i&&l.createElement(l.Fragment,null,l.createElement(T.A,{size:16,weight:"bold",color:"#000"},`Next Up - ${r.c9.fromFormat(i.date,"yyyy-MM-dd").toFormat("dd MMM")}`),(0,M.A)(i).map(m))))))};var D=n(27416),P=n(78714),L=n(72551),R=n(7975),H=n(43665),W=n(35865),G=n(89015),K=n(27976),q=n(63017);let $={transition:"opacity 0.3s linear",opacity:1,height:"auto"},V={transition:"opacity 0.3s linear",opacity:0,height:0},B=({club:e,eventType:t,eventTypeFilters:n,isMobile:a,sections:r,openFilter:i,onChangeEventType:m,onChangeTeam:c,t:s,teamId:d})=>{let u=d?(0,o.find)((0,o.flatMap)(r,e=>e.teams),{id:d}):null;return l.createElement(l.Fragment,null,l.createElement("div",{style:"team"===i?$:V},l.createElement(K.A,{name:"team",club:e,sections:r,selected:d,label:u&&!a?u.name:s("common:team_filter_label"),onChange:c})),l.createElement("div",{style:"category"===i?$:V},l.createElement(q.A,{name:"category",selected:t,categories:n,label:s("common:events_filter_label"),onChange:m,isShowingInPanel:a})))};B.defaultProps={eventType:null,openFilter:null,teamId:null};let U=({club:e,eventType:t,teamId:n,onChangeEventType:a,onChangeTeam:r,isMobile:i,t:m})=>{let[y,E]=(0,l.useState)(null),h=(0,L.A)(),f=["fixtures","events","training"].map(e=>({label:m(`common:calendar_event_type_${e}`),value:e})),g=e.sections.reduce((e,t)=>e+t.teams.length,0),A=n?(0,o.get)((0,o.find)((0,o.flatMap)(e.sections,e=>e.teams),{id:n}),"name"):null;A&&(f=(0,o.reject)(f,{value:"events"}));let v=e=>{y!==e||i?E(e):E(null)},x=()=>h?l.createElement(w.A,{justifyContent:"flex-end"},g>1&&l.createElement(R.A,{filterName:"team",filterValue:A,onFilterClick:()=>v("team")},l.createElement(S.A,{name:"t-shirt",size:20})),l.createElement(R.A,{filterName:"category",filterValue:t,onFilterClick:()=>v("category")},l.createElement(S.A,{name:"funnel",size:20}))):null,b=[{name:"News",route:"news",params:{},transKey:"news:latest_news"},{name:"Calendar",route:"calendar",params:{},transKey:"common:calendar"}];return l.createElement(l.Fragment,null,i?l.createElement(s.A,{fill:"#fff"},l.createElement(D.A,{shadow:"dark"},l.createElement(H.A,{name:"News",nameTransKey:"common:news_and_events",activeSection:"calendar",activeSectionTransKey:"common:calendar",items:b})),l.createElement(u.A,{vertical:"medium",horizontal:"small"},l.createElement(p.A,{columns:"3fr 2fr",alignItems:"center"},l.createElement(T.A,{preset:"staticSubtitle--large",size:24,weight:"700",color:"black"},l.createElement(c.x6,{i18nKey:"common:calendar"},"Calendar")),x()))):l.createElement(l.Fragment,null,l.createElement(W.A,{title:"News & Events",fullWidth:!1},l.createElement(w.A,{justifyContent:"space-between",alignItems:"center",style:{flex:1}},l.createElement(u.A,{left:32,component:"div"},l.createElement(G.A,{links:b,activeSection:"Calendar"})),x()))),l.createElement(D.A,null,l.createElement(s.A,{fill:"white",borderTop:"thinLightGrey",component:"div"},l.createElement(P.Collapse,{isOpened:!!y},l.createElement(d.A,{component:"div",maxWidth:1366,center:!0},l.createElement(u.A,{horizontal:"large",vertical:"month"===y?"medium":"xlarge",component:"div"},l.createElement(B,{eventType:t,eventTypeFilters:f,club:e,isMobile:i,onChangeTeam:e=>{E(null),r(e)},onChangeEventType:e=>{E(null),a(e)},openFilter:y,sections:e.sections,teamId:n,t:m})))))))};U.defaultProps={eventType:null,teamId:null};let X=({calendar:e,club:t,eventType:n,isLoading:a,month:o,teamId:i,year:m,t:c})=>{let g=r.c9.fromObject({year:m,month:o}),b=r.c9.utc(),w=b.month===g.month?b:g.startOf("month"),[C,T]=(0,l.useState)(w),M=(0,v.A)();(0,l.useEffect)(()=>{let e=r.c9.now();e.month===g.month&&T(e)},[m,o]);let _=e=>{let l=e?g.minus({months:1}):g.plus({months:1});T(l.startOf("month")),A().replaceClubRoute(t,"calendar.month",{year:l.year,month:l.month,teamId:i,eventType:n})},{advertisingTier:F,sportId:z}=t;return l.createElement(l.Fragment,null,l.createElement(f.A,{club:t,descriptionTranslationKey:"common:calendar_description",titleTranslationKey:"common:calendar_title",translationValues:{month:r.c9.fromObject({year:m,month:o,day:1}).toFormat("LLLL yyyy")}
4,route:"calendar.month",routeParams:{month:o,year:m}}),l.createElement(U,{club:t,eventType:n,teamId:i,onChangeTeam:e=>{A().replaceClubRoute(t,"calendar.month",{year:m,month:o,teamId:e,eventType:n})},onChangeMonth:_,onChangeEventType:e=>{A().replaceClubRoute(t,"calendar.month",{year:m,month:o,teamId:i,eventType:e})},isMobile:M,t:c}),l.createElement(s.A,{fill:"#fff",component:"div"},l.createElement(h.A,{isLoading:a}),l.createElement(d.A,{maxWidth:1366,center:!0},l.createElement(u.A,{vertical:"medium"},l.createElement(E.A,{advertisingTier:F,pageType:"calendar.index",sportId:z})),a||!e?l.createElement(I,null):l.createElement(p.A,{columns:"1fr",rowGap:"medium",columnGap:"large",responsive:[{minWidth:"fullHeader",props:{columns:"minmax(0, 900px) minmax(0, 450px)"}}],style:{padding:"20px 0"}},l.createElement(x.A,{month:o,year:m,data:e?.days,validDates:[C.toFormat("yyyy-MM-dd")],onMonthClick:_,onDayClick:e=>{T(r.c9.fromFormat(e,"yyyy-MM-dd"))},isMobile:M}),l.createElement(j,{club:t,data:e?.days,selectedDate:C})),l.createElement(u.A,{vertical:"large"},l.createElement(y.A,null)))))};X.defaultProps={calendar:null,eventType:null,teamId:null};var Z=n(81883);function J(){return(J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}n(80597);class Q extends l.Component{static async getInitialProps({club:e,isServer:t,query:n,reduxStore:l,req:a,res:m}){let{year:c,month:s,eventType:d,teamId:u,viewMode:p}=n,y=r.c9.local(),E=c?parseInt(c,10):y.year,h=s?parseInt(s,10):y.month,f=u?parseInt(u,10):null,g={activeSection:"news",namespacesRequired:["common"],pageType:"calendar.index",year:E,month:h,eventType:d&&(0,o.includes)(["events","fixtures","training"],d)?d:null,teamId:f,viewMode:"list"===p?p:"grid",showCompleteWeeks:1};if(!t)return g;try{let{error:t}=await l.dispatch((0,i.HR)({clubId:e.id,year:E,month:h,request:a,showCompleteWeeks:1}));return t&&t.errorStatusCode&&m&&(m.statusCode=t.errorStatusCode),g}catch(e){return g}}componentDidMount(){this.loadIfRequired()}componentDidUpdate(){this.loadIfRequired()}loadIfRequired=()=>{let{hasLoadedCalendar:e,isLoadingCalendar:t,loadCalendar:n,loadingError:l}=this.props;if(!e&&!t&&!l){let{club:{id:e},year:t,month:l,showCompleteWeeks:a}=this.props;n({clubId:e,year:t,month:l,showCompleteWeeks:a})}};render(){let{loadingError:e,club:t}=this.props;if(e)return l.createElement(Z.A,J({clubId:t.id},e));let{calendar:n,eventType:a,isLoadingCalendar:r,month:o,teamId:i,year:m,t:c,viewMode:s}=this.props;return l.createElement(X,{calendar:n,club:t,eventType:a,isLoading:r,month:o,teamId:i,year:m,viewMode:s,t:c})}}Q.defaultProps={calendar:null,eventType:null,loadingError:null,teamId:null};let Y={loadCalendar:i.HR},ee=(0,a.Ng)((e,t)=>({calendar:(0,m.j5)(e,t.club.id,t.year,t.month,t.teamId,t.eventType),isLoadingCalendar:(0,m.VP)(e),hasLoadedCalendar:(0,m.KB)(e,t.club.id,t.year,t.month),loadingError:(0,m.hW)(e)}),Y)((0,c.CI)(["common"])(Q))},98533:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/calendar",function(){return n(47899)}])}},e=>{e.O(0,[2909,2545,7315,6223,9414,1325,7736,4552,636,6593,8792],()=>e(e.s=98533)),_N_E=e.O()}]);
5//# debugId=c5a6655e-6253-5f06-93b8-840f8b8a1607

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.