PageSourceSearch

https://www.bromleyfc.co.uk/_nuxt/BizvrVho.js

js bromleyfc.co.uk collected 2026-10-02 12:46:34 UTC 30,756 bytes, 1 lines download raw bytes

1import{c2 as pe,H as ge,z as ye,k as se,r as Y,bZ as wt,I as gt,ai as it,bC as ut,a4 as dt,G as mt,d as yt,aE as bt,R as ce,cn as ht,aD as ft,m as we,J as vt,bA as Dt,bB as Tt,o as et,c as ot,u as Ye,F as St,i as Pt,j as Ct,as as Ft,$ as At,h as kt}from"./BXyHz8gJ.js";import{g as X}from"./BTKq3PKN.js";import{u as lt,t as $t,p as It}from"./BZqjCZjd.js";import{u as tt,n as nt,a as Lt,b as Nt}from"./n2jazeYN.js";import{n as Et}from"./DG9oM4Yz.js";import{u as Mt}from"./D_pYV7Ti.js";import"./Dk4x-eT6.js";import"./CTfzp0o-.js";import"./CATxlt2j.js";import"./CXTOca8g.js";import"./0xmjySIm.js";import"./ghde6Rcn.js";import"./DmhmIDUS.js";import"./BS3Of7l_.js";import"./CTDGn_aI.js";import"./BlmjBYnH.js";import"./CSninBZ9.js";import"./BUm2qux6.js";import"./CaOB_RdE.js";import"./DhOWJ3tu.js";import"./WUj_y4n6.js";import"./CrX2__Gh.js";import"./T-kpnD9n.js";import"./DA0pkXRu.js";import"./C8oKskU6.js";import"./u49kvY5k.js";import"./D_6K3OQ2.js";import"./zJgmKq7E.js";import"./CTUEipdV.js";import"./CmI1PyQ4.js";import"./CwhJz9GQ.js";import"./DstcOuR5.js";import"./BuD9p4xc.js";import"./Dd1UIn11.js";import"./CA-jESdt.js";import"./B6A3p0wu.js";import"./CWl8UwIz.js";import"./BS9yl5ZT.js";import"./DcETsEPX.js";import"./uIVzBVq8.js";import"./BK1JsQ3s.js";import"./Bh0wxH7u.js";import"./D1qB2YTK.js";import"./SB0tNuZ9.js";import"./CQN_RYON.js";import"./B8KvXp0k.js";import"./CgldbOTM.js";import"./DLXSkQG-.js";import"./6millENj.js";import"./DiGExN0T.js";import"./BcoPOiCN.js";import"./B18ihzyN.js";import"./CSM4Qf9P.js";import"./DeSj2563.js";import"./CUdq_2Zn.js";import"./CgC9lDd_.js";import"./D5FhIIAO.js";import"./D0TiGsWz.js";import"./DROQawb9.js";import"./92kVfLFY.js";import"./BYbFz05Z.js";import"./CkZoi5Yp.js";import"./pWuOacnm.js";import"./CBIg9gi-.js";import"./C-UhAylH.js";import"./DFG1PjX5.js";import"./PdZNuyof.js";import"./D8T1A2vA.js";import"./C_HIc7Uk.js";import"./DTFQo_f8.js";import"./DXqJ4TXN.js";import"./3ldlJRM4.js";import"./DIiFZxvl.js";import"./CVRINzGW.js";import"./CpUYMcKv.js";import"./Bsgv6Pcs.js";import"./Cgi4R-Kp.js";import"./sRz0lFF5.js";import"./CHpZH-90.js";import"./DS6hiYJE.js";import"./BQYsoHu4.js";import"./b49aVprM.js";import"./3BCwR8BO.js";import"./CJzHydVh.js";import"./wxiHhBU7.js";import"./WgrHAMeC.js";import"./Dtp6HHsi.js";import"./CgwkDfbG.js";import"./VfgY6cza.js";import"./DOjcoqJI.js";import"./ecp8SACg.js";import"./DNOIJhvB.js";import"./B2WtIe1U.js";import"./D221Yl1L.js";import"./CKzddzrq.js";import"./DTlqhTq7.js";import"./C17ILB0I.js";import"./CVyMVmcu.js";import"./B-hj9iL_.js";import"./Bg7StWfw.js";import"./C-yQSQE_.js";import"./CZyM-rNT.js";const st=async(I,t)=>{try{const g=await t.templates.web().getTemplateBySlug(I);return{widgets:(g.attributes.content||g.attributes.templateData.content||[]).map($=>{try{return X($.widgetType,"root",$,"return-plain-object").serializeElementForFanside()}catch(a){return console.error(`Error normalizing element of type ${$.widgetType}:`,a),null}}).filter($=>$!==null)}}catch{throw pe({statusCode:404,statusMessage:"Page Not Found"})}},at=async I=>{var c,b,y,e,p,v,u,o,C,T,i,f,N,x;const t=ge(),{$gc:g}=ye(),n=se(),$=((c=n.public.club.features)==null?void 0:c["streaming-site"])||!1,a=Y(),w=Y(),r=Y(),S=n.public.club.sport,O=n.public.servicesURL,L=await fetch(`https://page-templates.cms.web.gc.${O}/v2/player-listing`),h=await L.json(),R=(e=(y=(b=h==null?void 0:h.data)==null?void 0:b.attributes)==null?void 0:y.templateData)==null?void 0:e.content;t.setChildFriendly(!0);const d=m=>{switch(m){case"Goalkeeper":return"Goalkeepers";case"Defender":return"Defenders";case"Midfielder":return"Midfielders";case"Forward":return"Forwards";case"Staff":return"Staff";default:return m.charAt(0).toUpperCase()+m.slice(1)}};return await(async()=>{try{const m=await g()[S].web().getTeams(),E=lt({key:"TeamDetailsPlural",value:m}),F=E[0],B=E.find(H=>(H==null?void 0:H.slugTeamName)===I)||F;a.value=I?B:F}catch(m){console.error("usePlayerListing error: fetching teams!",r),r.value=m}})(),await(async()=>{try{if(!a.value)return;const m=await g()[S].web().getSquad(a.value.teamName),E=lt({key:"SquadSingle",value:m,options:a.value});w.value=E}catch(m){console.error("usePlayerListing error: fetching squads!",m),r.value=m}})(),R[0]=X("HeroSimple","root",R[0]).serializeElementForFanside(),{widgets:(()=>{var Z,V,G;const m=[...R],E=(({squad:z})=>{const oe=[];if(z)return Object.keys(z).forEach(ee=>{if(z[ee].length<=0)return;const re={widgetType:"ContentContainerGrid",uuid:wt(),title:d(ee),widgetData:{split:{x:4,y:1},responsive:!0,contents:[]}};z[ee].forEach(J=>{const ue=J.knownName?J.knownName.split(" ").join("+").toLowerCase():null,de=J.firstName&&J.lastName?(J.firstName+" "+J.lastName).split(" ").join("+").toLowerCase():null,me={cardType:"player",contents:{...J,...$&&{actionUrl:`/videos/browse?search=${ue??de}`}},layout:{style:"stacked"},style:{style:"stacked",cardFormat:"portrait"},position:{}};re.widgetData.contents.push(me)}),oe.push(re)}),oe})({squad:w.value}),F=X("section","root",{contents:E},void 0,E).serializeElementForFanside(),B=[{widgetType:"WidgetAdvertisingSlot",widgetData:{widgetData:{slotID:"teams_page_slot"}}}],H=X("section","root",{contents:B},void 0,B).serializeElementForFanside(),A=(Z=n.public.club)==null?void 0:Z.managedAds,K={widgetType:"WidgetManagedAds",style:{background:{color:{shade:300,value:"gray"}}},widgetData:{advertID:A==null?void 0:A.banner,mobileAdvertID:A==null?void 0:A.mobileBanner,adsLength:1}},_={widgetType:"TeamsLoaned",widgetData:{teamId:(V=a.value)==null?void 0:V.id}},k={widgetType:"EmbedFantasy"};return m.push(F),S==="football"&&m.push(_),m.push(H),t.useManagedAds&&m.splice(2,0,K),(G=n.public.sport.football)!=null&&G.clubShortcode&&m.splice(2,0,k),m})(),title:((p=a.value)==null?void 0:p.name)||((v=a.value)==null?void 0:v.teamName)||((T=(C=(o=(u=h==null?void 0:h.data)==null?void 0:u.attributes)==null?void 0:o.templateData)==null?void 0:C.meta)==null?void 0:T.title)||"Players",description:((x=(N=(f=(i=h==null?void 0:h.data)==null?void 0:i.attributes)==null?void 0:f.templateData)==null?void 0:N.meta)==null?void 0:x.description)||void 0}},Xe=async I=>{var L,h,R,d,c,b,y,e,p,v,u,o,C,T,i;const t=se(),g=ge(),{setChildFriendly:n}=g;n(!1);const $="news-listing"+(I?`-${I}`:""),a=await fetch(`https://page-templates.cms.web.gc.${t.public.servicesURL}/v2/${$}`),w=await a.json(),r=(R=(h=(L=w==null?void 0:w.data)==null?void 0:L.attributes)==null?void 0:h.templateData)==null?void 0:R.content;r.forEach(f=>{f.widgetType==="HeroSimple"&&(f.widgetType="HeroSimpleLegacy")});const S=r==null?void 0:r[0];
1S.widgetData.showSponsor=!0;const O=(d=t.public.sport.football)!=null&&d.clubShortcode?[S,{widgetType:"EmbedFantasy"},...r==null?void 0:r.slice(1)]:[S,...r==null?void 0:r.slice(1)];return g.setChildFriendly(((y=(b=(c=w==null?void 0:w.data)==null?void 0:c.attributes)==null?void 0:b.templateData)==null?void 0:y.childFriendly)||!1),{widgets:O,title:((u=(v=(p=(e=w==null?void 0:w.data)==null?void 0:e.attributes)==null?void 0:p.templateData)==null?void 0:v.meta)==null?void 0:u.title)||"News",description:((i=(T=(C=(o=w==null?void 0:w.data)==null?void 0:o.attributes)==null?void 0:C.templateData)==null?void 0:T.meta)==null?void 0:i.description)||void 0}},ct=async(I,t)=>{var h,R,d;const{$gc:g}=ye(),n=g().football.web(),$=se(),a=await fetch(`https://page-templates.cms.web.gc.${$.public.servicesURL}/v2/fixture-listing`),w=await a.json();let r;if(I===void 0?(r=(await n.getTeams())[0],I=r==null?void 0:r.teamName):(r=await n.getTeamBySlug(I),r={...r}),r===void 0)return{widgets:[]};const S=(r==null?void 0:r.seasons)!==void 0?r.seasons[0]:r.season[0];let O=(d=(R=(h=w==null?void 0:w.data)==null?void 0:h.attributes)==null?void 0:R.templateData)==null?void 0:d.content;O[0]=X("HeroSimple","root",O[0]).serializeElementForFanside();const L=[];return O.forEach(c=>{c.widgetType==="ListingFixtures"?L.push({...c,widgetType:"ListingsFixtures",widgetData:{...c.widgetData,team:r.teamName,season:S.seasonID}}):L.push(c)}),{widgets:L,title:`Fixtures - ${r.formattedTeamName||(c=>{const b=["lionesses"];return c.replace(/-/g," ").replace(/\b\w/g,y=>y.toUpperCase()).replace(/\b(\w+)s\b/g,(y,e)=>b.includes(y.toLowerCase())?y:`${e}'s`)})(I)}`}},pt=async()=>{var w,r,S;const I=ge();I.setChildFriendly(!1);const t=se(),g=await fetch(`https://page-templates.cms.web.gc.${t.public.servicesURL}/v2/video-single`),n=await g.json(),$=(S=(r=(w=n==null?void 0:n.data)==null?void 0:w.attributes)==null?void 0:r.templateData)==null?void 0:S.content;let a=[];if(a=$[0].version?Et($):[...$],I.useManagedAds){const O=(()=>{var h;const L=(h=t.public.club)==null?void 0:h.managedAds;return{widgetType:"WidgetManagedAds",style:{background:{color:{shade:300,value:"gray"}}},widgetData:{advertID:L==null?void 0:L.banner,mobileAdvertID:L==null?void 0:L.mobileBanner,adsLength:1}}})();a.splice(2,0,O)}return{widgets:a,title:"Watch"}},Wt=async(I,t,g,n)=>{var h,R;const $=dt(),{propertyIds:a}=mt($),w=n.public.video,r=t.params.slug.filter(d=>d.length>0).length===1,S=t.params.slug.filter(d=>d.length>0).length===2,O=t.params.slug.filter(d=>d.length>0).length===3,L=[...[w.feed1PageSlug,w.feed2PageSlug,w.feed3PageSlug,w.feed4PageSlug].filter(d=>d!==void 0),"browse","categories"].map(d=>d.split("/").at("-1"));switch(I){case"profile":return r?await at():{widgets:[{widgetType:"Profile",contents:[{widgetType:"ProfileRoot",slug:t.params.slug.at(-1),sport:n.public.club.sport??"football",slots:[{widgetType:"ProfileHero",actions:[],fields:[{label:"Country",id:"description"},{label:"Date Joined",id:"joinDate"},{label:"Age",id:"age"}]},{widgetType:"ProfileBiography",fields:[{label:"Country",id:"description"},{label:"Date Joined",id:"joinDate"},{label:"Age",id:"age"}]},{widgetType:"ProfileStats"},{widgetType:"ProfileGallery"},{widgetType:"ProfileMedia",tabs:[{label:"News",id:"news"},{label:"Videos",id:"video"}]}]}]}]};case"news":const d=t.params.slug[1];return r?await Xe():S&&a.value.includes(d)?await Xe(d):S?await Xe():O?await Xe(d):await(async(c,b,y)=>{var B,H,A,K,_;const e=ge(),p=c.params.slug.slice(1),v=`/news/${p.join("/")}`;let u,o;p[1]==="preview"?(u=await b.news.web().getPreview(p[2]),o=u):(u=await b.news.web().getBySlug(v),o=u==null?void 0:u[0],e.setChildFriendly((o==null?void 0:o.childFriendly)??!1));const C=!!Array.isArray(u)&&((u==null?void 0:u[0].disableAdvertising)??!1),T=(B=y.public.club)==null?void 0:B.managedAds,i=await fetch(`https://page-templates.cms.web.gc.${y.public.servicesURL}/v2/news-single`),f=await i.json(),N=(K=(A=(H=f==null?void 0:f.data)==null?void 0:H.attributes)==null?void 0:A.templateData)==null?void 0:K.content;N[0].widgetData.contents.title=o==null?void 0:o.postTitle,N[0].widgetData.contents.background=(_=o==null?void 0:o.imageData)==null?void 0:_.key;const x={widgetType:"WidgetManagedAds",style:{background:{color:{shade:300,value:"gray"}}},widgetData:{advertID:T==null?void 0:T.mpu,mobileAdvertID:T==null?void 0:T.mobileMpu,adsLength:2}},m=[{widgetType:"WidgetAdvertisingSlot",widgetData:{contents:{widgetData:{slotID:"news_article_slot",contain:!0}}}}],E=X("section","root",{contents:m},void 0,m).serializeElementForFanside(),F=[];
1return N.forEach((k,Z)=>{k.widgetType==="NewsArticleContents"?(k.variant==="offset"&&N[0].widgetType==="HeroSimple"&&(N[0].widgetData.contents.title="",N[0].widgetData.contents.article=void 0),F.push({...k,article:o})):k.widgetType==="HeroSimple"?F.push({...k,widgetType:"HeroSimpleLegacy",type:"news",article:o,style:{sizeLarge:o.heroStyleLarge,sizeSmall:o.heroStyleSmall},imageOrigins:o.imageOrigins}):(k.widgetName==="News Carousel"&&k.widgetData.category==="{{newsCat}}"&&(k.widgetData.category=o.postCategory,k.widgetData.exclude=o.postID),F.push(k))}),C||e.eflCollective||F.push(E),!C&&e.eflCollective&&F.push(x),{widgets:F,title:o==null?void 0:o.postTitle,page:o}})(t,g,n);case"fixtures":return r?await ct():S?n.public.club.sport==="darts"?{widgets:[{widgetType:"WidgetMatchCentreDarts"}]}:await ct(t.params.slug[1]):await(async c=>{var N,x,m,E,F,B,H,A,K,_,k,Z,V,G;ge().setChildFriendly(!0);const{$gc:b}=ye(),y=b().football.web(),e=se(),p=await fetch(`https://page-templates.cms.web.gc.${e.public.servicesURL}/v2/fixtures-single`),v=await p.json(),u=(m=(x=(N=v==null?void 0:v.data)==null?void 0:N.attributes)==null?void 0:x.templateData)==null?void 0:m.content[0];u.widgetData.contents[1].contents=(H=(F=(E=u.widgetData.contents)==null?void 0:E[1])==null?void 0:F.contents)==null?void 0:H.replace("{{matchId}}|0",`${c.params.slug[3]}/${(B=c.params.slug[1])==null?void 0:B.replace("-"," ")}/${c.params.slug[2]}`),u.widgetData.contents[1].theme=((_=(K=(A=u==null?void 0:u.widgetData)==null?void 0:A.contents)==null?void 0:K[1])==null?void 0:_.theme)||"dark",u.widgetData.contents[1].backgroundKey=e.public.placeholders.upcomingMatch,u.widgetData.contents[1].showSponsor=!0;let o=(V=(Z=(k=v==null?void 0:v.data)==null?void 0:k.attributes)==null?void 0:Z.templateData)==null?void 0:V.content.slice(1);const C=await y.getMatch(c.params.slug[3],c.params.slug[1],c.params.slug[2]),T=await b().news.web().getSearchResults(`tagsData.fixtureTags.id:${c.params.slug[3]}`),i={widgetType:"ContentCarousel",title:T.length>2?"Related News":"Latest News",widgetData:{contents:[],showPeek:!1}};for(let z=0;z<12;z++)T.length>2?i.widgetData.contents.push(`news:getSearchResults=tagsData.fixtureTags.id:${c.params.slug[3]}|${z}`):i.widgetData.contents.push(`news:getLatest=|${z}`);C.period==="FullTime"&&T.length>2?o=[i,...o]:o.push(i);const f=((G=e.public.club)==null?void 0:G.managedAds)||void 0;return o=[{widgetType:"WidgetAdvertisingSlot",widgetData:{contents:{widgetData:{slotID:"match_centre_slot"}}}},{widgetType:"WidgetManagedAds",widgetData:{advertID:f==null?void 0:f.mpu,mobileAdvertID:f==null?void 0:f.mobileMpu,adsLength:3}},...o],{hero:u,widgets:o}})(t);case"players":return r?await at():S?await at(t.params.slug[1]):await(async(c,b,y)=>{var be,he,fe,ve,De,Te,Se,Pe,Ce,Fe,Ae,ke,$e,Ie,Le,Ne,Ee,Me,We,Ue,Re,He,Be,_e,je,xe,ze,Oe;const e=ge(),p=se(),v=p.public.club.sport,u=c.params.slug[c.params.slug.length-1],o=c.params.slug[1],C=(be=p.public.club)==null?void 0:be.managedAds,T=Y(),i=Y(),f=Y(),N=Y(),x=Y(),m=Y();if(e.setChildFriendly(!0),await(async()=>{try{const l=await fetch(`https://page-templates.cms.web.gc.${p.public.servicesURL}/v2/${y??"player-single"}`);N.value=await l.json()}catch(l){f.value=l,console.error("UsePlayerSingle, error fetching Page Data!",l)}})(),((Se=(Te=(De=(ve=(fe=(he=N.value)==null?void 0:he.data)==null?void 0:fe.attributes)==null?void 0:ve.templateData)==null?void 0:De.content)==null?void 0:Te[0])==null?void 0:Se.widgetType)==="Profile")return st("player-single",b);await(async()=>{try{const l=await fetch(`https://client-settings.cms.web.gc.${p.public.servicesURL}/v1/get?settingID=web`);m.value=await l.json()}catch(l){f.value=l,console.error("UsePlayerSingle, error fetching legacy settings",l)}})(),await(async()=>{try{const l=await b[v].web().getTeamBySlug(o);T.value=$t({value:l,config:p,sport:v})}catch(l){f.value=l,console.error("UsePlayerSingle, error fetching team!",l)}})(),await(async()=>{var l;try{const q=await b[v].web().getPlayerBySlug(u,(l=T.value)==null?void 0:l.teamName),le={...T.value,...m.value.body.settings};i.value=It({value:q,options:le,config:p,sport:v})}catch(q){f.value=q,console.error("UsePlayerSingle, error fetching Player!",q)}})(),await(async()=>{var l;try{x.value=await b.news.web().getSearchResults((l=i.value)==null?void 0:l.id)}catch(q){f.value=q,console.error("UsePlayerSingle, error fetching Player News!",q)}})();const E=(Ae=(Fe=(Ce=(Pe=N.value)==null?void 0:Pe.data)==null?void 0:Ce.attributes)==null?void 0:Fe.templateData)==null?void 0:Ae.content,F=[{widgetType:"ContentContainerSplit",widgetData:{contents:[{widgetType:"WidgetPlayerCard",playerData:i.value}]}}],B=X("section","root",{contents:F},void 0,F).serializeElementForFanside(),H={widgetType:"ContentContainerSplit",widgetData:{contents:[{widgetType:"WidgetPlayerStats"}]}},A=(($e=(ke=i.value)==null?void 0:ke.playerProfile)==null?void 0:$e.bio)||"",K=A?"BIO":"",_=(Le=(Ie=i.value)==null?void 0:Ie.playerProfile)==null?void 0:Le.bioImageKey,k=A&&_?"2":"1",Z=_?"1":"0",V=A?"1":"0",G=[];A&&G.push({widgetType:"WidgetTextBlock",span:V,contents:{title:K,body:A,isBio:!0,placement:"profile"}}),_&&G.push({widgetType:"WidgetImageBlock",span:Z,contents:{placement:"profile",imageKey:_}});const z={widgetType:"ContentContainerSplit",widgetData:{id:"bio",grid:{layout:"row",length:k,carousel:!1},placement:"profile",contents:G}},oe={widgetType:"ContentContainerSplit",widgetData:{id:"retail",grid:{layout:"row",length:"3",carousel:!1},placement:"profile",contents:[{widgetType:"WidgetImageBlock",span:1,contents:{imageKey:(Ee=(Ne=i.value)==null?void 0:Ne.playerProfile)==null?void 0:Ee.retailImage,isRetail:!0}},{widgetType:"WidgetTextBlock",span:1,contents:{title:(We=(Me=i.value)==null?void 0:Me.playerProfile)==null?void 0:We.retailHeading,isRetail:!0,actions:[{buttonText:"shop now",buttonLink:(Re=(Ue=i.value)==null?void 0:Ue.playerProfile)==null?void 0:Re.primaryRetailLink}]}}]}},ee={widgetType:"ContentCarousel",widgetData:{title:"Related News",contents:[],showPeek:!1},style:{fontColor:"primary"}},re=x.value.length;for(let l=0;l<12;l++)l<re?ee.widgetData.contents.push({contents:`news:getNewsSingle=${x.value[l].id}`}):ee.widgetData.contents.push({contents:"news:getLatest=|"+(l-re)});const J={widgetType:"WidgetPlayerSocials",widgetData:{data:(He=i.value)==null?void 0:He.playerProfile}},ue={widgetType:"WidgetPlayerRetail"},de={widgetType:"ContentContainerSplit",widgetData:{contents:[{widgetType:"WidgetManagedAds",widgetData:{advertID:C==null?void 0:C.banner,mobileAdvertID:C==null?void 0:C.mobileBanner,adsLength:1}}]}}
1,me={widgetType:"ContentContainerSplit",widgetData:{grid:{layout:"row",length:"1"},contents:[{span:1,widgetType:"WidgetQuote",widgetData:{contents:(_e=(Be=i.value)==null?void 0:Be.playerProfile)==null?void 0:_e.quote,quoteSource:(xe=(je=i.value)==null?void 0:je.playerProfile)==null?void 0:xe.quoteSource,placement:"profile"}}]}},M=[];return E==null||E.forEach(l=>{var q,le,qe,Ke,Ge,Je,Qe,Ze,s,W,P,j,Q,D,te,ne,U;if(l.widgetType==="playerBio")((qe=(le=(q=i==null?void 0:i.value)==null?void 0:q.playerProfile)==null?void 0:le.pageStructure)==null?void 0:qe.bio)!=="hide"&&M.push(z),(Ge=(Ke=i.value)==null?void 0:Ke.playerProfile)!=null&&Ge.quote&&M.push(me);else if(l.widgetType==="WidgetPlayerStats")((Ze=(Qe=(Je=i==null?void 0:i.value)==null?void 0:Je.playerProfile)==null?void 0:Qe.pageStructure)==null?void 0:Ze.stats)!=="hide"&&M.push(H);else if(l.widgetType==="WidgetHorizontalSponsor")M.push(l);else if(l.widgetType==="HeroDynamic")M.push(B);else if(l.widgetType==="playerRetail")((P=(W=(s=i==null?void 0:i.value)==null?void 0:s.playerProfile)==null?void 0:W.pageStructure)==null?void 0:P.retail)!=="hide"&&M.push(oe);else if(l.widgetType==="WidgetPlayerRetail")((D=(Q=(j=i==null?void 0:i.value)==null?void 0:j.playerProfile)==null?void 0:Q.pageStructure)==null?void 0:D.retail)!=="hide"&&M.push(ue);else if(l.widgetType==="playerSocials")M.push(J);else if(l.widgetType==="ListingsNews")((U=(ne=(te=i==null?void 0:i.value)==null?void 0:te.playerProfile)==null?void 0:ne.pageStructure)==null?void 0:U.news)!=="hide"&&M.push(ee);else if(l.widgetType==="Profile"){const ae=l;ae.contents[0].slots=ae.contents[0].slots.map(ie=>ie.widgetType==="Section"?X("section","root",ie,void 0,ie.contents).serializeElementForFanside():ie),M.push(ae)}else M.push(l)}),M.push({widgetType:"WidgetAdvertisingSlot",widgetData:{contents:{widgetData:{slotID:"players_page_slot"}}}}),M.push(de),{widgets:(ze=p.public.sport.football)!=null&&ze.clubShortcode?[...M.slice(0,2),{widgetType:"EmbedFantasy"},...M.slice(2)]:M,title:(Oe=i.value)==null?void 0:Oe.title}})(t,g);case"video":if(r)return await tt();if(S&&L.includes(t.params.slug[1]))return await tt();if(S)return await pt();break;case"live":if(r)return await tt();if(S)return await pt();break;case"match-hub":return(()=>{const c=se(),b=c.public.club.sport,y=c.public.club.features.multiClub;return b==="darts"?{title:"Match Hub",widgets:[{widgetType:"WidgetMatchHubDarts"}]}:b==="football"&&y?{title:"Match Hub",widgets:[{widgetType:"WidgetMatchHubMultiClubFootball"}]}:{widgets:[{widgetType:"WidgetMatchHub"}]}})();case"sso":return await(async()=>{const{$auth:c}=ye(),b=gt(),y=it(),e=y.params.slug[1],p=y.query.returnUrl;b.setPreventNavigation(!0);const v=[{widgetType:"SSOSideBar",inline:!0,showRegister:e==="register",forgotPassword:e==="forgot-password",showAccount:e==="account",returnUrl:p}],u=X("section","root",{contents:v},void 0,v).serializeElementForFanside(),o=[{widgetType:"cleengAccount"}],C=X("section","root",{contents:o},void 0,o).serializeElementForFanside();if(e==="logout"){const T=ut();await c.signout(T),b.setUser(void 0)}return{widgets:e==="manage-billing"?[C]:[u],title:"Account"}})();case"checkout":if(((R=(h=n.public.club)==null?void 0:h.features)==null?void 0:R.paymentProvider)==="cleeng")return await(()=>{const c=it(),b=se(),y=[{widgetType:"cleengCheckout",offerID:c.query.offerID,publisherID:b.public.apiKeys.cleengPublisherID}];return{widgets:[X("section","root",{contents:y},void 0,y).serializeElementForFanside()],title:"Checkout"}})();case"calendar":return{widgets:[{widgetType:"ListingsEvent",theme:"light",defaultEventCategoryIDs:[{id:"2",title:"Premier"},{id:"3",title:"World Series"},{id:"4",title:"Pro Tour"}]}]};default:return await st(I,g)}},Ut={class:"page bg-surface"},Li=yt({__name:"[...slug]",async setup(I){var N,x,m,E,F,B,H,A,K,_,k,Z,V,G,z,oe,ee,re,J,ue,de,me,M,be,he,fe,ve,De,Te,Se,Pe,Ce,Fe,Ae,ke,$e,Ie,Le,Ne,Ee,Me,We,Ue,Re,He,Be,_e,je,xe,ze,Oe,l,q,le,qe,Ke,Ge,Je,Qe,Ze;let t,g;const n=it(),$=bt(),a=se(),w=gt(),r=dt(),{defaultProperty:S}=mt(r),{setProperty:O}=r,{$gc:L,$auth:h}=ye(),R=L();let d;const c=a.public.club.fixedPages||[],b=Array.isArray(n.params.slug)?n.params.slug.filter(s=>s.length>0).length:1,y=c.find(s=>n.params.slug[0]===s.path.split("/")[0]&&b===s.path.split("/").length);y?d=y.templateID:d=Object.keys({...a.public.club.slugs,profile:"profile",pdc:"pdc",checkout:"checkout",...!((N=a.public.club.ssoOptions)!=null&&N.provider)&&{sso:"sso"}}).find(W=>{var P;return n.params.slug[0]==={...a.public.club.slugs,profile:"profile",pdc:"pdc",checkout:"checkout",...!((P=a.public.club.ssoOptions)!=null&&P.provider)&&{sso:"sso"}}[W]});let e;const p=Y(void 0),v=Y("default");if(y&&d)try{[t,g]=ce(()=>st(d,R)),t=await t,g(),e=t,p.value=[...e.hero?[e.hero]:[],...e.widgets]}catch(s){throw console.error(`usePageTemplate, error fetching template for templateID "${d}"!`,s),pe({statusCode:404,statusMessage:"Page Not Found",fatal:!0})}else if(d!==void 0){try{[t,g]=ce(()=>Wt(d,n,R,a)),t=await t,g(),e=t}catch(s){throw console.error(`useLayout, error fetching layout for templateID "${d}"!`,s),pe({statusCode:404,statusMessage:"Page Not Found",fatal:!0})}p.value=[...e!=null&&e.hero?[e.hero]:[],...(e==null?void 0:e.widgets)||[]]}else if(n.params.slug[0]==="embed"){const s=a.public.club.features.streamline?"PlayerStreamlineEmbed":"PlayerStreamAMGEmbed";p.value=[{widgetType:s}],v.value="embed"}else if(n.params.slug[0]==="preview")try{const s=([t,g]=ce(()=>R.pages.web().getPreview(n.params.slug[1])),t=await t,g(),t);if(e={attributes:s.page},s.page.footer){const{content:W}=([t,g]=ce(()=>Lt()),t=await t,g(),t);p.value=W}else p.value=nt(e.attributes.content)}catch{throw pe({statusCode:404,statusMessage:"Page Not Found",fatal:!0})}else if(((m=(x=a.public.club)==null?void 0:x.ssoOptions)==null?void 0:m.provider)==="OIDC"&&n.params.slug[0]==="auth"){if(h!==void 0){const s=([t,g]=ce(()=>h.userCallback()),t=await t,g(),t);w.setUser({userDetails:(s==null?void 0:s.profile)||((E=s==null?void 0:s.zp)==null?void 0:E.profile)}),$.push("/")}}else if(((B=(F=a.public.club)==null?void 0:F.ssoOptions)==null?void 0:B.provider)==="OIDC"&&n.params.slug[0]==="auth-logout")h!==void 0&&([t,g]=ce(()=>h.userSignoutCallback()),await t,g(),w.setUser(void 0),$.push("/"));else try{const s=([t,g]=ce(()=>(async W=>{const P=ge(),{$gc:j}=ye();let Q,D;try{let te=function(ne){return ne.filter(U=>{var ae,ie,rt;return!(Array.isArray((ae=U==null?void 0:U.widgetData)==null?void 0:ae.contents)&&((ie=U==null?void 0:U.widgetData)!=null&&ie.contents.some(Ve=>(Ve==null?void 0:Ve.widgetType)==="WidgetAdvertisingSlot"))||((rt=U==null?void 0:U.widgetData)!=null&&rt.contents&&(U.widgetData.contents=te(U.widgetData.contents)),0))})};if(D=await j().pages.web().getByFullPath(W),!D)throw pe({statusCode:404,statusMessage:"Page Not Found"});Q=nt(D.attributes.content),P.setChildFriendly(D.attributes.childFriendlyMode??!0),D.attributes.advertising||(Q=te(Q))}catch{throw pe({statusCode:404,statusMessage:"Page Not Found"})}return{content:Q,page:D}})(n.params.slug.filter(W=>W.length>0).join("/").toLowerCase())),t=await t,g(),t);p.value=s.content,e=s.page}catch{throw pe({statusCode:404,statusMessage:"Page Not Found",fatal:!0})}ht(v.value);const u=(s=>{var P;const W=(P=s==null?void 0:s.split(","))==null?void 0:P.filter(j=>j.length>0);if(!W)return[];try{const j=[];return W.forEach(Q=>{const D=new DOMParser().parseFromString(Q,"text/html").querySelector("script");j.push({src:D==null?void 0:D.getAttribute("src"),defer:D==null?void 0:D.getAttribute("defer"),async:D==null?void 0:D.getAttribute("async"),type:D==null?void 0:D.getAttribute("type")})}),j}catch{return console.log("Parse Unavailable"),[]}})((H=e==null?void 0:e.attributes)==null?void 0:H.headScripts),o=ut(),C=o.origin.concat(o.pathname);let T=Array.isArray(p==null?void 0:p.value)?p==null?void 0:p.value.map(s=>Mt(s)):[];Nt(e==null?void 0:e.attributes,d==="news");const i=(A=e==null?void 0:e.widgets)==null?void 0:A.filter(s=>(s==null?void 0:s.widgetName)==="Text Block")[0];let f;if(window&&i)try{const s=new DOMParser,W=s.parseFromString((K=i==null?void 0:i.widgetData)==null?void 0:K.content,"text/html").querySelector("body").innerText.substr(0,170).split(" ");f=W.slice(0,W.length-1).join(" ")}catch{console.error("Failed to initialize parser")}return ft({__dangerouslyDisableSanitizers:["script"],title:(e==null?void 0:e.title)||((_=e==null?void 0:e.attributes)==null?void 0:_.postTitle)||"Home",script:[...u],meta:[{hid:"description",name:"description",content:((k=e==null?void 0:e.attributes)==null?void 0:k.description)||(e==null?void 0:e.description)||f||((V=(Z=a.public)==null?void 0:Z.seo)==null?void 0:V.metaPageDesc)||"NOT SET"},{hid:"keywords",name:"keywords",content:(G=e==null?void 0:e.attributes)==null?void 0:G.keywords},{hid:"author",name:"author",content:a.public.club.name},{hid:"apple-mobile-web-app-title",name:"apple-mobile-web-app-title",content:((z=e==null?void 0:e.attributes)==null?void 0:z.metaTitle)||((ee=(oe=a.public)==null?void 0:oe.seo)==null?void 0:ee.metaPageTitle)||`${e==null?void 0:e.title} ${(re=a.public.seo)==null?void 0:re.metaPageTitleAfter}`||`Home ${(J=a.public.seo)==null?void 0:J.metaPageTitleAfter}`},{hid:"og:title",name:"og:title",content:((ue=e==null?void 0:e.attributes)==null?void 0:ue.metaTitle)||((me=(de=a.public)==null?void 0:de.seo)==null?void 0:me.metaPageTitle)||`${e==null?void 0:e.title} ${(M=a.public.seo)==null?void 0:M.metaPageTitleAfter}`||`Home ${(be=a.public.seo)==null?void 0:be.metaPageTitleAfter}`},{hid:"og:description",name:"og:description",content:((he=e==null?void 0:e.attributes)==null?void 0:he.description)||f||((ve=(fe=a.public)==null?void 0:fe.seo)==null?void 0:ve.metaPageDesc)||"NOT SET"},{hid:"og:url",name:"og:url",content:C},{hid:"og:type",name:"og:type",content:"website"},{hid:"og:image",name:"og:image",property:"og:image",content:(Te=(De=e==null?void 0:e.attributes)==null?void 0:De.imageData)!=null&&Te.key?we(!0,800,800,(Pe=(Se=e==null?void 0:e.attributes)==null?void 0:Se.imageData)==null?void 0:Pe.key):(Fe=(Ce=a.public)==null?void 0:Ce.social)!=null&&Fe.socialSharingImageKey?we(!0,800,800,(ke=(Ae=a.public)==null?void 0:Ae.social)==null?void 0:ke.socialSharingImageKey):void 0},{hid:"og:image:secure_url",name:"og:image:secure_url",property:"og:image:secure_url",content:(Ie=($e=e==null?void 0:e.attributes)==null?void 0:$e.imageData)!=null&&Ie.key?we(!0,800,800,(Ne=(Le=e==null?void 0:e.attributes)==null?void 0:Le.imageData)==null?void 0:Ne.key):(Me=(Ee=a.public)==null?void 0:Ee.social)!=null&&Me.socialSharingImageKey?we(!0,800,800,(Ue=(We=a.public)==null?void 0:We.social)==null?void 0:Ue.socialSharingImageKey):void 0},{hid:"og:image:type",name:"og:image:type",property:"og:image:type",content:(He=(Re=e==null?void 0:e.attributes)==null?void 0:Re.imageData)!=null&&He.ke
1y?we(!0,800,800,(_e=(Be=e==null?void 0:e.attributes)==null?void 0:Be.imageData)==null?void 0:_e.key):(xe=(je=a.public)==null?void 0:je.social)!=null&&xe.socialSharingImageKey?we(!0,800,800,(Oe=(ze=a.public)==null?void 0:ze.social)==null?void 0:Oe.socialSharingImageKey):void 0},{hid:"og:image:alt",name:"og:image:alt",property:"og:image:alt",content:((le=(q=(l=e==null?void 0:e.attributes)==null?void 0:l.imageData)==null?void 0:q.description)==null?void 0:le.length)>0?(Ke=(qe=e==null?void 0:e.attributes)==null?void 0:qe.imageData)==null?void 0:Ke.description:"Social sharing image"},{hid:"og:site_name",name:"og:site_name",content:a.public.club.name},{hid:"twitter:card",name:"twitter:card",content:"summary_large_image"},{hid:"twitter:site",name:"twitter:site",content:((Ze=(Qe=(((Je=(Ge=a.public)==null?void 0:Ge.social)==null?void 0:Je.links)||[]).filter(s=>s.category==="X"))==null?void 0:Qe[0])==null?void 0:Ze.link)||""}]}),vt(async()=>{var Q,D,te,ne,U,ae;const{userData:s}=await Dt();n.params.slug[0]!=="news"&&O(((Q=e==null?void 0:e.attributes)==null?void 0:Q.propertyID)||S.value),window.loadTime=new Date().toTimeString();const W=new Event("loadTimeUpdateEvent");window.dispatchEvent(W),window.contentLoaded=!0,document.querySelectorAll("link[rel='canonical']").forEach(ie=>ie.remove());const P=document.createElement("link");P.setAttribute("rel","canonical"),P.setAttribute("href",window.location.href),document.head.prepend(P);const j={pageName:(D=e==null?void 0:e.attributes)!=null&&D.metaTitle||e!=null&&e.title?`${e==null?void 0:e.title} ${(te=a.public.seo)==null?void 0:te.metaPageTitleAfter}`:((U=(ne=a.public)==null?void 0:ne.seo)==null?void 0:U.metaPageTitle)||`Home ${(ae=a.public.seo)==null?void 0:ae.metaPageTitleAfter}`,siteSection:n.params.slug[0],destinationURL:window.location.href,referringURL:`${window.location.origin}/${n.params.slug[0]}`,environment:navigator.userAgent,language:navigator.language||navigator.languages[0]};Tt("page_view",{page:j,user:s})}),(s,W)=>(et(),ot("div",Ut,[Ye(p)!==void 0?(et(!0),ot(St,{key:0},Pt(Ye(p),(P,j)=>(et(),Ct(At(P.widgetType||P.rowType),Ft({key:`${Ye(n).path}${P.widgetType||P.rowType}${j}`,data:Ye(T)[j],style:P.style,widget:P},{ref_for:!0},P),null,16,["data","style","widget"]))),128)):kt("",!0)]))}});export{Li as default};

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.