1import{az as J,aB as m,aF as r,aK as L,aH as e,aI as p,aS as g,aW as C,aX as X,aG as T,aR as M,aL as I,aJ as S,aT as q,aO as s,b4 as P,b5 as R,aM as Q,aN as Y}from"./entry.18Ab6wtJ.js";import{_ as Z}from"./Spinner.vue.1cOUj6v2.js";import{_ as ee,a as ae}from"./Card.vue.D_L6yWTr.js";import{_ as te}from"./EmptyState.vue.BtBnRQP-.js";import{a as se}from"./asyncData.DIwTZhb-.js";import{d as ne}from"./index.awlp7-2k.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_=new d.Error().stack;_&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[_]="e5c544d8-7bca-4d17-b64e-33c759a03fee",d._sentryDebugIdIdentifier="sentry-dbid-e5c544d8-7bca-4d17-b64e-33c759a03fee")}catch{}})();const oe={class:"text-primary-foreground text-body-1 text-center mb-4 font-bold"},ie={key:0,class:"meetings-list divide-y lg:divide-x lg:divide-y-0 divide-neutral-100 lg:grid","aria-label":"Previous meetings list"},re={key:1,class:"px-4"},le={class:"mt-4 mb-1"},ce={class:"text-primary-foreground text-caption font-step-3"},me={key:0,class:"text-primary-foreground font-step-2 text-caption"},de={class:"grid"},ue={class:"text-3xl font-bold"},pe={key:1},_e={class:"text-3xl font-bold"},ye={key:1},he=J({__name:"RivalryCard",props:{type:{},stats:{},prevMatches:{},match:{},title:{}},setup(d){const _=d,t=m(()=>_.match),x=m(()=>_.type),n=m(()=>_.stats),H=m(()=>{var a;if((a=t.value)!=null&&a.homeTeam)return[{...t.value.homeTeam},{...t.value.awayTeam}]}),u=m(()=>_.prevMatches.map(a=>{var c,D,z,$;const o=(D=(c=H.value)==null?void 0:c.find(k=>k.id===a.homeTeam.id))==null?void 0:D.imageUrl,i=($=(z=H.value)==null?void 0:z.find(k=>k.id===a.awayTeam.id))==null?void 0:$.imageUrl;return{...a,homeTeam:{...a.homeTeam,...o&&{imageUrl:o}},awayTeam:{...a.awayTeam,...i&&{imageUrl:i}}}})),b=m(()=>{var a,o,i,c;return((o=(a=n.value)==null?void 0:a.homeTeam)==null?void 0:o.wins)>((c=(i=n.value)==null?void 0:i.awayTeam)==null?void 0:c.wins)}),w=m(()=>{var a,o,i,c;return((o=(a=n.value)==null?void 0:a.awayTeam)==null?void 0:o.wins)>((c=(i=n.value)==null?void 0:i.homeTeam)==null?void 0:c.wins)}),h=m(()=>x.value==="head-to-head"),l=m(()=>x.value==="standings"),y=m(()=>x.value==="previous-meetings"),v={"head-to-head":"Head-to-head",standings:"As it stands","previous-meetings":_.title||"Previous meetings"},f=a=>{let o="-";const i=["st","nd","rd"];return a&&(o=i[a-1]?a+i[a-1]:a+"th"),o};return(a,o)=>{var z,$,k,E,N,U,A,B,V,j,O,F,K,W;const i=ae,c=ee,D=q;return s(),r("div",{class:L([{"py-4":!e(y),"pt-4":e(y)},"rounded bg-white"])},[p("h3",oe,g(v[e(x)]),1),o[0]||(o[0]=p("div",{class:"w-full h-px bg-neutral-100"},null,-1)),e(y)?(s(),r("ul",ie,[(s(!0),r(C,null,X(e(u),G=>(s(),r("li",{key:`prev-match-${G.id}`,class:"px-4"},[I(i,{match:G,alignLeft:"",rivalry:""},null,8,["match"])]))),128))])):(s(),r("div",re,[p("div",le,[p("p",ce,[e(h)?(s(),r(C,{key:0},[M(" Total wins ")],64)):e(l)?(s(),r(C,{key:1},[M(g(($=(z=e(n))==null?void 0:z.competition)==null?void 0:$.name)+" "+g(`- Round ${(E=(k=e(n))==null?void 0:k.competition)==null?void 0:E.round}`),1)],64)):T("",!0)]),e(h)&&((N=e(n))!=null&&N.draws)?(s(),r("p",me,g((U=e(n))==null?void 0:U.draws)+" draws ",1)):T("",!0)]),p("div",de,[p("div",{class:L(["flex column items-center justify-between",{"opacity-[0.38]":e(w)&&!e(l)}])},[I(c,{match:e(t)||e(n),teamKey:"homeTeam",alignLeft:""},null,8,["match"]),p("p",ue,[e(h)?(s(),r("span",{key:0,class:L([{"text-primary-foreground":e(w)},"flex","items-center"])},[e(b)?(s(),S(D,{key:0,name:"arrow_drop_down",size:"30",class:"-rotate-90"})):T("",!0),M(" "+g((B=(A=e(n))==null?void 0:A.homeTeam)==null?void 0:B.wins),1)],2)):e(l)?(s(),r("span",pe,g(f((j=(V=e(n))==null?void 0:V.homeTeam)==null?void 0:j.position)),1)):T("",!0)])],2),p("div",{class:L(["flex column items-center justify-between",{"opacity-[0.38]":e(b)&&!e(l)}])},[I(c,{match:e(t)||e(n),teamKey:"awayTeam",alignLeft:""},null,8,["match"]),p("p",_e,[e(h)?(s(),r("span",{key:0,class:L([{"text-primary-foreground":e(b)},"flex","items-center"])},[e(w)?(s(),S(D,{key:0,name:"arrow_drop_down",size:"30",class:"-rotate-90"})):T("",!0),M(" "+g((F=(O=e(n))==null?void 0:O.awayTeam)==null?void 0:F.wins),1)],2)):e(l)?(s(),r("span",ye,g(f((W=(K=e(n))==null?void 0:K.awayTeam)==null?void 0:W.position)),1)):T("",!0)])],2)])]))],2)}}}),ve=Q(()=>Y(()=>import("./RivalryCard.DyGvIUcs.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url).then(d=>d.default||d)),fe={key:1},ge={key:0,class:"flex flex-col space-y-4 lg:grid lg:grid-cols-2 lg:gap-x-4 lg:gap-y-4 lg:space-y-0"},we=J({__name:"rivalry",props:{match:{}},setup(d){const _=d,t=m(()=>_.match),x={provider:"rugbyviz",compId:t.value.compId,team1Id:t.value.homeTeam.id,team2Id:t.value.awayTeam.id,images:!0,season:t.value.season},{pending:n,data:H}=se("headToHead",async()=>await ne({params:x})),u=m(()=>{var l;return(l=H.value)==null?void 0:l.data}),b=l=>{var y,v,f;return(f=(v=(y=u.value)==null?void 0:y.standings)==null?void 0:v.find(a=>a.teamId===l))==null?void 0:f.position},w=m(()=>({competition:{name:t.value.compName,round:t.value.round},homeTeam:{...t.value.homeTeam,position:b(t.value.homeTeam.id),wins:u.value.team1Wins},awayTeam:{...t.value.awayTeam,position:b(t.value.awayTeam.id),wins:u.value.team1Losses},draws:u.value.team1Draws})),h=m(()=>{var l,y;return(y=(l=u.value)==null?void 0:l.previousMatches)==null?void 0:y.filter(v=>v.id!==t.value.id).slice(0,3)});return(l,y)=>{var i,c;const v=Z,f=he,a=ve,o=te;return s(),r("section",null,[e(n)?(s(),S(v,{key:0,class:"mx-auto my-4",size:"100"})):e(t)?(s(),r("div",fe,[e(u)?(s(),r("ul",ge,[P(p("li",null,[I(f,{match:e(t),stats:e(w),type:"head-to-head",class:"h-full"},null,8,["match","stats"])],512),[[R,e(u).team1Wins||e(u).team1Losses||e(u).team1Draws]]),P(p("li",null,[I(f,{match:e(t),stats:e(w),type:"standings",class:"h-full"},null,8,["match","stats"])],512),[[R,e(u).standings]]),P(p("li",{class:L([{"col-span-2":((i=e(h))==null?void 0:i.length)>2}])},[I(a,{match:e(t),stats:e(w),prevMatches:e(h),type:"previous-meetings"},null,8,["match","stats","prevMatches"])],2),[[R,(c=e(h))==null?void 0:c.length]])])):(s(),S(o,{key:1,title:"Rivalry stats"}))])):T("",!0)])}}}),De=Object.freeze(Object.defineProperty({__proto__:null,default:we},Symbol.toStringTag,{value:"Module"}));
1export{he as _,De as r}; 2function __vite__mapDeps(indexes) { 3 if (!__vite__mapDeps.viteFileDeps) { 4 __vite__mapDeps.viteFileDeps = ["./RivalryCard.DyGvIUcs.js","./entry.18Ab6wtJ.js","./Spinner.vue.1cOUj6v2.js","./Card.vue.D_L6yWTr.js","./Countdown.vue.acWSwrt9.js","./client-only.BeGIaCWZ.js","./Image.vue.P4G8NEVC.js","./imageUtil.PcyEBP_W.js","./index.awlp7-2k.js","./composables.Djlt7zS-.js","./dateformatter.6IyrwTok.js","./Card.4LEiO2Aq.css","./EmptyState.vue.BtBnRQP-.js","./asyncData.DIwTZhb-.js"] 5 } 6 return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) 7}
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.