1"use strict";(self["webpackChunkhbf_frontend"]=self["webpackChunkhbf_frontend"]||[]).push([[564],{1365:function(t,e,a){a.r(e),a.d(e,{default:function(){return S}});var s=a(6768),i=a(4232),h=a(5130);const r={key:0,class:"league"},l={key:1,class:"container"},n={class:"grid"},c={class:"col-sm-12"},u={class:"grid"},o={class:"col-xs-12 col-sm-8 col-bleed-y"},d={class:"stepper"},f={class:"stepper__title"},m=["value"],D=["value"],p=["value"],y={class:"col-xs-12 col-sm-4 align-self-center col-bleed-y"},M={class:"filterSelection"},k={key:0,value:"1",dir:"ltr"},g={key:1,value:"1",dir:"ltr"},v=(0,s.Lk)("option",{value:"3",dir:"ltr"},"Nach Datum",-1),L={class:"grid",id:"matchlist"},_={key:2,class:"container"};function b(t,e,a,b,W,C){const B=(0,s.g2)("LeagueSubNavigation"),I=(0,s.g2)("MatchCard");return W.league&&W.detailData?((0,s.uX)(),(0,s.CE)("div",r,[W.dataReady?((0,s.uX)(),(0,s.Wv)(B,{key:0,onReinit:C.init,league:W.league,season:W.seasonInfo,baseUrl:C.baseUrl,otherSeasons:W.detailData.seasons,showPlayoffs:Boolean(W.playOffData&&W.playOffData.mainPhaseId)},null,8,["onReinit","league","season","baseUrl","otherSeasons","showPlayoffs"])):(0,s.Q3)("",!0),W.detailData&&W.detailData.schedule&&W.detailData.schedule.length>0?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("div",n,[(0,s.Lk)("div",c,[(0,s.Lk)("div",u,[(0,s.Lk)("div",o,[(0,s.Lk)("div",d,[(0,s.Lk)("div",{onClick:e[0]||(e[0]=(...t)=>C.prevMatchDay&&C.prevMatchDay(...t)),class:(0,i.C4)(C.canRewind?"stepper__button stepper__button--left":"stepper__button stepper__button--left stepper__button--disabled")},null,2),(0,s.Lk)("div",f,[1==W.sortBy?(0,s.bo)(((0,s.uX)(),(0,s.CE)("select",{key:0,"onUpdate:modelValue":e[1]||(e[1]=t=>W.currentMatchDay=t),dir:"rtl"},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(C.matchDayList,(t=>((0,s.uX)(),(0,s.CE)("option",{key:t,value:t,dir:"ltr"},(0,i.v_)(C.matchDayName(t)),9,m)))),128))],512)),[[h.u1,W.currentMatchDay]]):(0,s.Q3)("",!0),2==W.sortBy?(0,s.bo)(((0,s.uX)(),(0,s.CE)("select",{key:1,"onUpdate:modelValue":e[2]||(e[2]=t=>W.currentMatchDate=t),dir:"rtl"},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(C.matchDateList,(t=>((0,s.uX)(),(0,s.CE)("option",{key:t,value:t,dir:"ltr"},(0,i.v_)(C.formatDate(t)),9,D)))),128))],512)),[[h.u1,W.currentMatchDate]]):(0,s.Q3)("",!0),3==W.sortBy?(0,s.bo)(((0,s.uX)(),(0,s.CE)("select",{key:2,"onUpdate:modelValue":e[3]||(e[3]=t=>W.currentMatchWeek=t),dir:"rtl"},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(C.matchWeekList,(t=>((0,s.uX)(),(0,s.CE)("option",{key:t,value:t,dir:"ltr"},(0,i.v_)(C.matchWeekName(t)),9,p)))),128))],512)),[[h.u1,W.currentMatchWeek]]):(0,s.Q3)("",!0),(0,s.Q3)("",!0)]),(0,s.Lk)("div",{onClick:e[4]||(e[4]=(...t)=>C.nextMatchDay&&C.nextMatchDay(...t)),class:(0,i.C4)(C.canForward?"stepper__button stepper__button--right":"stepper__button stepper__button--right stepper__button--disabled")},null,2)])]),(0,s.Lk)("div",y,[(0,s.Lk)("div",M,[(0,s.bo)((0,s.Lk)("select",{"onUpdate:modelValue":e[5]||(e[5]=t=>W.sortBy=t),dir:"rtl"},[1==W.league.competitionType?((0,s.uX)(),(0,s.CE)("option",k,"Nach Spieltag")):2==W.league.competitionType?((0,s.uX)(),(0,s.CE)("option",g,"Nach Runde")):(0,s.Q3)("",!0),v],512),[[h.u1,W.sortBy]])])])]),(0,s.Lk)("div",L,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(C.matchList,(t=>((0,s.uX)(),(0,s.CE)("div",{class:"col-xs-12 col-sm-6 col-md-4",key:t.fmpMatchId},[(0,s.bF)(I,{matchInfo:t,teams:W.detailData.teams,competition:W.league,linkToLiveStream:!0,playOffData:W.playOffData,playOffMatches:C.playOffMatches},null,8,["matchInfo","teams","competition","playOffData","playOffMatches"])])))),128))])])])])):((0,s.uX)(),(0,s.CE)("div",_," Keine Livestreams vorhanden. "))])):(0,s.Q3)("",!0)}var W=a(2178),C=a(7566),B=a(9148),I=a.n(B),O=a(1560),w={name:"LeagueLiveStreamsView",components:{LeagueSubNavigation:W.A,MatchCard:C.A},data(){return{league:null,competitions:null,seasonInfo:null,detailData:null,maxMatchDay:null,currentMatchDay:1,currentMatchDate:null,currentMatchWeek:null,livestreams:null,sortBy:3,dataReady:!1,playOffData:null}},mounted(){this.init(this.$route.params.id)},unmounted(){document.body.classList.remove("league")},methods:{prevMatchDay(){if(1==this.sortBy)this.currentMatchDay=Math.max(1,this.currentMatchDay-1);else if(2==this.sortBy){let t=this.matchDateList;this.currentMatchDate?this.currentMatchDate=t[Math.max(0,t.indexOf(this.currentMatchDate)-1)]:this.currentMatchDate=t[0]}else if(3==this.sortBy){let t=this.matchWeekList;this.currentMatchWeek?this.currentMatchWeek=t[Math.max(0,t.indexOf(this.currentMatchWeek)-1)]:this.currentMatchWeek=t[0]}},nextMatchDay(){if(1==this.sortBy){let t=this.matchDayList;this.currentMatchDay=Math.min(this.currentMatchDay+1,t.length)}else if(2==this.sortBy){let t=this.matchDateList;this.currentMatchDate?this.currentMatchDate=t[Math.min(t.indexOf(this.currentMatchDate)+1,t.length-1)]:this.currentMatchDate=t[0]}else if(3==this.sortBy){let t=this.matchWeekList;this.currentMatchWeek?this.currentMatchWeek=t[Math.min(t.indexOf(this.currentMatchWeek)+1,t.length-1)]:this.currentMatchWeek=t[0]}},init(t){this.dataReady=!1,document.body.classList.add("league"),this.leagueId=parseInt(t),this.$store.dispatch("fetchCompet
1itions").then((()=>{this.competitions=this.$store.getters.getCompetitions,this.league=this.competitions.find((t=>t.id==this.leagueId)),this.league&&(this.$store.dispatch("fetchData",{filename:(0,O.LR)(this.league.fmpSeasonId)}).then((t=>{this.playOffData=t&&"object"===typeof t?t:null})),this.$store.dispatch("fetchData",{filename:"leagues/league_"+this.league.fmpSeasonId+".json"}).then((t=>{this.detailData=t;var e=this.league.fmpSeasonId;this.seasonInfo=this.detailData.seasons.find((t=>t.fmpSeasonId==e)),this.$nextTick((()=>{this.dataReady=!0})),this.$store.dispatch("fetchFile",{filename:"livestreams/livestream_list.json"}).then((t=>{this.livestreams=t,this.detailData.schedule=this.detailData.schedule.filter((t=>{if(this.livestreams.find((e=>e.fmpMatchId==t.fmpMatchId)))return!0}));var e=null,a=null,s=null,i=null,h=I()();this.detailData.schedule.forEach((t=>{t._daysAgo=Math.abs(h.diff(I()(t.matchDate),"days"));let r=I()(t.matchDate).locale("de").startOf("week");const l=(t,e)=>String(t).padStart(e,"0");t._week=l(r.isoWeekYear(),4)+"-"+l(r.isoWeek(),2),(null==e||t._daysAgo<e)&&(e=t._daysAgo,a=t.matchDay,s=t._week,i=t.matchDate.split("T")[0])})),this.currentMatchDay=a,this.currentMatchWeek=s,this.currentMatchDate=i}))})))}))},formatDate(t){return I()(t).format("DD.MM.YYYY")},matchDayName(t){return 2==this.league.competitionType?t>1&&t==this.maxMatchDay?"Finale":t+". Runde":t+". Spieltag"},matchWeekName(t){let e=this.detailData.schedule.find((e=>e._week==t));if(!e)return"Unbekannt";let a=I()(e.matchDate).locale("de"),s=a.startOf("week").format("DD.MM."),i=a.endOf("week").format("DD.MM.YYYY");return s+" - "+i}},beforeRouteUpdate(t,e,a){this.init(t.params.id),a()},computed:{playOffMatches(){return this.playOffData?this.detailData.schedule.filter((t=>parseInt(t.fmpPhaseId)!=this.playOffData.mainPhaseId)):[]},canRewind(){if(1==this.sortBy)return this.currentMatchDay>1;if(2==this.sortBy){let t=this.matchDateList.indexOf(this.currentMatchDate);return-1!=t&&t>0}if(3==this.sortBy){let t=this.matchWeekList.indexOf(this.currentMatchWeek);return-1!=t&&t>0}return!1},canForward(){if(1==this.sortBy)return this.currentMatchDay<this.matchDayList.length;if(2==this.sortBy){let t=this.matchDateList.indexOf(this.currentMatchDate);return-1!=t&&t<this.matchDateList.length-1}if(3==this.sortBy){let t=this.matchWeekList.indexOf(this.currentMatchWeek);return-1!=t&&t<this.matchWeekList.length-1}return!1},matchList(){if(this.currentMatchDay,this.sortBy,this.currentMatchDate,this.detailData&&this.detailData.schedule){if(1==this.sortBy)return this.detailData.schedule.filter((t=>t.matchDay==this.currentMatchDay)).sort(((t,e)=>I()(t.matchDate)-I()(e.matchDate)));if(2==this.sortBy)return this.detailData.schedule.filter((t=>t.matchDate.split("T")[0]==this.currentMatchDate)).sort(((t,e)=>I()(t.matchDate)-I()(e.matchDate)));if(3==this.sortBy)return this.detailData.schedule.filter((t=>t._week==this.currentMatchWeek)).sort(((t,e)=>I()(t.matchDate)-I()(e.matchDate)))}return[]},matchDayList(){var t=new Set;return this.detailData&&this.detailData.schedule&&this.detailData.schedule.forEach((e=>{t.add(parseInt(e.matchDay))})),[...t].sort()},matchWeekList(){var t=new Set;return this.detailData&&this.detailData.schedule&&this.detailData.schedule.forEach((e=>{t.add(e._week)})),[...t].sort()},matchDateList(){var t=new Set;return this.detailData&&this.detailData.schedule&&this.detailData.schedule.forEach((e=>{t.add(e.matchDate.split("T")[0])})),[...t].sort()},baseUrl(){return this.$store.getters.getBaseUrl}}},x=a(1241);const E=(0,x.A)(w,[["render",b]]);var S=E}}]); 2//# sourceMappingURL=livestreams.7e66b35f.js.map
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.