(self.webpackChunk=self.webpackChunk||[]).push([[3259],{80145:(e,t,r)=>{var n={"./v1/bet-builder":[7344,7344],"./v2/bet-builder":[96863,6863]};function o(e){if(!r.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return r.e(t[1]).then((()=>r(o)))}o.keys=()=>Object.keys(n),o.id=80145,e.exports=o},13259:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ce});var n=r(12139),o=r(56747),a=r(82762),l=r(35104),i=r(58061),s=r(91193),d=r(85573),c=r(16575),u=r(85782),m=r(58059);const p=e=>"LIVE"===e.state,v=e=>e.filter((e=>e.outcomes.length)),h=(e,t,r,n)=>m.jV.getEvent(e,{disableErrorNotification:!0},t).subscribe({next:r,error:n});var k=r(46062),b=r.n(k),g=r(44036),f=r.n(g),_=r(96793),N=r.n(_),y=r(17892),E=r.n(y),T=r(11173),x=r.n(T),I=r(42464),S=r.n(I),B=r(98428),Z=r.n(B),O={};O.styleTagTransform=S(),O.setAttributes=E(),O.insert=N().bind(null,"head"),O.domAPI=f(),O.insertStyleElement=x(),b()(Z(),O),Z()&&Z().locals&&Z().locals;var w=r(96e3),L=r(58888),C=r.n(L),A={};A.styleTagTransform=S(),A.setAttributes=E(),A.insert=N().bind(null,"head"),A.domAPI=f(),A.insertStyleElement=x(),b()(C(),A),C()&&C().locals&&C().locals;var G=r(56753);const R=(0,u.dG)("event-market"),P=({isSuspended:e,market:t,oddsClick:r})=>{const n=function(e=[]){const t=[];return e.forEach((e=>{const r=t.find((t=>t.number===e.columnNumber));r?r.outcomes.push(e):t.splice(e.columnNumber-1,0,{number:e.columnNumber,outcomes:[e]})})),t.forEach((e=>{e.outcomes.sort(((e,t)=>e.orderNumber-t.orderNumber))})),t}(t.outcomes),o=Math.max(...n.map((e=>e.outcomes.length))),a=[];for(let i=0;i<o;i++){const o=n.map((e=>{var t;return(null==(t=e.outcomes[i])?void 0:t.id)||e.number})).join("_");a.push((0,G.tZ)("div",{className:R("row"),children:n.map((o=>{const a=o.outcomes[i],s=void 0!==(null==a?void 0:a.active)&&!(null!=a&&a.active)||e,d=!(s&&null!=a&&a.priceId)&&null!==(null==a?void 0:a.value);return(0,G.tZ)("div",{className:(0,u.O5)(R("cell"),{down:d&&(null==a?void 0:a.change)<0,up:d&&(null==a?void 0:a.change)>0,empty:!a}),style:{width:100/n.length+"%"},children:a&&(0,G.BX)(G.HY,{children:[(0,G.tZ)("div",{className:R("cell-title"),children:l.NZ.betslip.showHandicap&&a.handicap?`${a.name} (${a.handicap})`:a.name}),(0,G.tZ)(c.uD,{id:a.priceId||"",value:a.value,selected:a.selected,onClick:()=>r(t,a),change:a.change,suspended:s})]})})}))},o+"_"+i))}return(0,G.tZ)(G.HY,{children:a})},M=(0,u.dG)("event-market"),U=e=>[{text:"-",value:null},...e.map((e=>({text:e,value:e})))],$=({isSuspended:e,eventNames:t,market:r,oddsClick:o})=>{const[a,i]=(0,n.eJ)([null,null]),[s,d]=(0,n.eJ)(!1),m=(0,n.Ye)((()=>U(r.homeScores)),[r.homeScores]),p=(0,n.Ye)((()=>U(r.awayScores)),[r.awayScores]),v=r.outcomes.find((e=>e.homeScore===a[0]&&e.awayScore===a[1]))||{name:(0,w.Ag)("_NA"),value:null},h=void 0!==(null==v?void 0:v.active)&&!(null!=v&&v.active);return(0,G.BX)(G.HY,{children:[(0,G.BX)("div",{className:M("row"),children:[(0,G.BX)("div",{className:(0,u.O5)(M("cell"),"score-selector"),children:[(0,G.tZ)("div",{className:(0,u.O5)(M("cell"),"score-title"),children:t[0]}),(0,G.tZ)(c.l0.Select,{options:m,value:a[0],onChange:e=>i([e,a[1]]),placeholder:"-",native:!0,arrow:!0})]}),(0,G.BX)("div",{className:(0,u.O5)(M("cell"),"score-selector"),children:[(0,G.tZ)("div",{className:(0,u.O5)(M("cell"),"score-title"),children:t[1]}),(0,G.tZ)(c.l0.Select,{options:p,value:a[1],onChange:e=>i([a[0],e]),placeholder:"-",native:!0,arrow:!0})]}),(0,G.BX)("div",{className:M("cell"),children:[(0,G.tZ)("div",{className:M("cell-title"),children:l.NZ.betslip.showHandicap&&v.handicap?`${v.name} (${v.handicap})`:v.name}),(0,G.tZ)(c.uD,{id:v.priceId||"",value:v.value,selected:v.selected,onClick:()=>o(r,v),change:v.change,suspended:h||e})]})]}),(0,G.tZ)("div",{className:M("show-more"),children:(0,G.BX)(c.l0.Button,{onClick:()=>d(!s),color:"primary",children:[(0,w.Ag)(s?"BETSLIP.SHOW_LESS":"BETSLIP.SHOW_MORE"),(0,G.tZ)(c.e0,{type:"chevron",direction:s?"top":"bottom"})]})}),s&&(0,G.tZ)(P,{isSuspended:e,market:r,oddsClick:o})]})},D="event-market",V=(0,u.dG)(D);function H({event:e,market:t,oddsClick:r}){if("UNDISPLAYED"===t.state)return null;const n=void 0!==(null==t?void 0:t.active)&&!(null!=t&&t.active)||"CLOSED"===(null==t?void 0:t.state),o="COMPLETED"===e.state,a="CORRECT_SCORE"===t.template?(0,G.tZ)($,{isSuspended:n||o,eventNames:e.eventNames,market:t,oddsClick:r}):(0,G.tZ)(P,{isSuspended:n||o,market:t,oddsClick:r});return(0,G.BX)("div",{className:D,children:[(0,G.tZ)("div",{className:V("name"),children:t.entityName||t.name}),a]})}var z=r(64763);const j={sports:l.NZ.betBuilder.sports},Y={sports:{type:z.FeatureConfigurationsDataType.List}},J=(0,d._i)({fallbackConfig:j,validations:Y}),X="v1"===l.NZ.apiVersion;var K=r(6855),F=r.n(K),W={};W.styleTagTransform=S(),W.setAttributes=E(),W.insert=N().bind(null,"head"),W.domAPI=f(),W.insertStyleElement=x(),b()(F(),W),F()&&F().locals&&F().locals;const q=({matchId:e,tournamentName:t,isLive:r})=>{const o=(0,n.sO)(),[s,d]=(0,n.eJ)(0);return(0,i.R0)({handler:e=>{d(e.value)},iframeRef:o,origin:l.NZ.zoomScores.baseUrl}),(0,G.tZ)("div",{className:"zoom-scores-widget",children:(0,G.tZ)(c.Od,{type:a.SkeletonType.Loader,visible:!s,forceMountChildren:!0,children:(0,G.tZ)("iframe",{ref:o,src:function(){const n=l.NZ.zoomScores.baseUrl,o=l.NZ.zoomScores.clientId,a=-6e4*(new Date).getTimezoneOffset(),i=(t||"").toLowerCase();return`${n}/${r?"zoom-scoreboard-mobile":`zoom/team-statistics/${i}-zoom`}/?clientId=${o}&offset=${a}&matchId=${e}`}(),title:t,height:`${s}px`,width:"100%"})})})};var Q=r(72709),ee=r(44955),te=r(98548),re=r.n(te),ne={};ne.styleTagTransform=S(),ne.setAttributes=E(),ne.insert=N().bind(null,"head"),ne.domAPI=f(),ne.insertStyleElement=x(),b()(re(),ne),re()&&re().locals&&re().locals;const oe=(0,c.Vo)((()=>r(80145)(`./${l.NZ.apiVersion}/bet-builder`)),{skeletonType:a.SkeletonType.EventDetails,svgSprite:a.SvgSprite.Deferred},l.NZ.betBuilder.enabled);let ae=()=>null;"statscore"===l.NZ.edp.widgetProvider&&(ae=(0,c.Vo)((()=>r.e(9144).then(r.bind(r,59144))),{skeletonType:a.SkeletonType.StatscoreWidget})),"sportRadar"===l.NZ.edp.widgetProvider&&(ae=(0,c.Vo)((()=>r.e(2049).then(r.bind(r,42049))),{skeletonType:a.SkeletonType.Loader}));const le="mobile"===s.Z,ie=l.NZ.edp.marketGroups,se="event-details",de=(0,u.dG)(se),ce=function({isVirtual:e=!1,eventId:t,mainMarketIds:r}){var s,m;(0,i.TK)();const{id:k=t}=(0,o.UO)(),{isLoaded:b,layout:g}=(0,i.$Y)(),f=(()=>{const[e,t]=(0,n.eJ)(Object.assign({},j,{isLoaded:!1}));return(0,n.d4)((()=>{const e=d.PK.getKey(a.FeatureToggleKeys.BetBuilder,{validator:J}).subscribe({next:e=>{t(Object.assign({},e.composedConfig,{isLoaded:!0}))},error:()=>{t((e=>Object.assign({},e,{isLoaded:!0})))}});return()=>e.unsubscribe()}),[]),e})().sports,_=(0,o.k6)(),N=(0,i.qM)(),y=(0,i.Kx)(),[E,T]=(0,n.eJ)(!1),[x,I]=(0,n.eJ)(null),[S,B]=(0,n.eJ)(!1),[Z,O]=(0,n.eJ)(!1),[w,L]=(0,n.eJ)(!1),[C,A]=(0,n.eJ)(null==x||null==(s=x.marketGroups)?void 0:s[0]),[R,P]=(0,n.eJ)(""),M=(0,n.sO)(u.pH.state),U=(0,n.sO)(null),$=(0,n.sO)(null),[D,V]=(0,n.eJ)(!1),z=(0,n.I4)((()=>{T(!0);const t=d.ag.isEmpty();d.Ps.dispatch({type:"warning",body:N("NOTIFICATIONS.EVENT_UNAVAILABLE"),buttonLabel:N(e?"BUTTON.GO_BACK":t?"BUTTON.TO_HOME":"BUTTON.GO_BACK"),closeButton:!1,onAction:()=>e?d.PT.reset():t?_.push(a.APP_ROUTES.home):_.goBack()})}),[_,N]),Y=e=>{var t,r,n,o;if(0===Object.keys(e).length)return void z();if(ie)if(null!=(n=e.marketGroups)&&n.length)e.marketGroups=((o=e.marketGroups).forEach((e=>{e.outrights?e.outrights=e.outrights.filter((e=>e.outcomes.length)):e.markets=v(e.markets)})),o.filter((e=>e.markets?e.markets.length:e)));else{const t=v(e.markets);e.marketGroups=[{name:N("SPORT.OTHERS"),markets:t}],e.markets=t}else e.markets=v(e.markets),e.markets.length||z();const a=l.NZ.betBuilder.enabled&&!p(e)&&f.includes(e.sportId)&&e.isBetBuilderAvailable;a&&(e.marketGroups&&e.marketGroups.find((e=>e.name===N("_MAIN")||"Main"===e.name))?e.marketGroups.splice(1,0,{name:N("BET_BUILDER.BS_SEL_NAME")}):e.marketGroups.unshift({name:N("BET_BUILDER.BS_SEL_NAME")}));const i=a&&"true"===y.get("betBuilder")?null==e||null==(t=e.marketGroups)?void 0:t.find((e=>e.name===N("BET_BUILDER.BS_SEL_NAME"))):null==e||null==(r=e.marketGroups)?void 0:r[0];I(e),A(i),p(e)&&O(!0),null===M.current&&u.pH.dispatch({isLive:p(e)})},K=(0,n.Ye)((()=>{var e;return(null==x?void 0:x.sportName)||b&&(null==(e=g.sportRibbon.allSports.find((e=>e.providerId===(null==x?void 0:x.sportProviderId))))?void 0:e.name)||""}),[x,b,g]),F=(t,r)=>{const n={type:t.playerId?a.BetType.PLAYER:Z?a.BetType.LIVE:a.BetType.PRE_MATCH,event:x,market:t,outcome:r,isTV:w};e&&(n.sportId="VIRTUAL"),(0,ee.Ul)(n)},W=l.NZ.edp.widgetProvider&&x&&!e&&!E,te=e=>e.map(((e,t)=>(0,G.tZ)(H,{event:x,market:e,oddsClick:F},`${e.entityId||e.id}-${t}`))),re=(e=[])=>(0,G.tZ)(c.Uu,{outrights:e,open:!!e.length,oddsClick:(e,t)=>{(0,ee.Ul)({type:a.BetType.OUTRIGHT,outright:e,outcome:t,sportId:x.sportId,categoryId:x.categoryId,competitionId:x.competitionId,isTV:w})}});ie?(0,Q.F8)(null==x?void 0:x.id,null==x?void 0:x.marketGroups):(0,Q.se)(x),(0,i.jr)(x&&`${K} | ${null==x||null==(m=x.eventNames)?void 0:m.join(" - ")}`),(({event:e,setEvent:t,setIsBetBuilderActive:r,onMarketCreate:o,onReconnected:a})=>{const l=(0,i.bx)(a),s=null==e?void 0:e.id,d=(0,n.sO)(e);(0,n.d4)((()=>{d.current=e}),[e]),(0,n.d4)((()=>{if(s){const e=l.eventSubscription(s).subscribe(c);return()=>e.unsubscribe()}}),[s]);const c=n=>{if(n.eventId!==d.current.id)return;const a=Object.assign({},d.current);switch(n.type){case"EVENT_UPDATE":{const o=n.data;"LIVE"!==e.state&&"LIVE"===o.state&&(r(!1),u.pH.dispatch({isLive:!0})),a.state=o.state,t(a);break}case"MARKET_UPDATE":{const e=n.data;let r;var l;a.marketGroups?a.marketGroups.forEach((t=>{!r&&t.markets&&(r=t.markets.find((0,u.TY)({id:e.id})))})):r=a.markets.find((0,u.TY)({id:e.id})),r&&(r.active=e.active,r.state=e.state,null==(l=e.outcomes)||l.forEach((e=>{const t=r.outcomes.find(X?(0,u.TY)({id:e.id}):(0,u.TY)({entityId:e.entityId}));var n;t&&(X?(void 0!==e.change&&e.change!==t.change&&(t.change=e.change),t.value!==e.value&&(t.value=null!=(n=e.value)?n:null)):void 0!==e.value&&e.value!==t.value&&(t.change=Number(e.value)-Number(t.value),t.value=e.value),void 0!==e.priceId&&(t.priceId=e.priceId),t.active=e.active)}))),t(a);break}case"MARKET_CREATE":o()}}})({event:x,setEvent:I,setIsBetBuilderActive:B,onMarketCreate:()=>{var t;null==(t=U.current)||t.unsubscribe(),U.current=h({id:k,mainMarketIds:r},e,Y,z)},onReconnected:()=>V(!0)}),(0,n.d4)((()=>{const t=u.pH.subscribe((t=>{var n;!1===(null==(n=M.current)?void 0:n.isLive)&&null!=t&&t.isLive&&(U.current=h({id:k,mainMarketIds:r},e,Y,z)),M.current=t}));return()=>{var e;t.unsubscribe(),null==(e=U.current)||e.unsubscribe()}}),[k,r]),(0,n.d4)((()=>()=>u.pH.dispatch(null)),[]),(0,n.d4)((()=>{if(k)return U.current=h({id:k,mainMarketIds:r},e,Y,z),()=>{U.current.unsubscribe()}}),[k,z]),(0,n.d4)((()=>{C&&C.name===N("BET_BUILDER.BS_SEL_NAME")?B(!0):B(!1)}),[C]),(0,n.d4)((()=>{if(k&&D)return U.current=h({id:k,mainMarketIds:r},e,(e=>{Y(e),V(!1)}),z),()=>{U.current.unsubscribe()}}),[D]);const ne=x&&"61"===x.sportId;return(0,G.tZ)(c.Od,{visible:!x,type:a.SkeletonType.EventDetails,forceCover:le,children:x&&(0,G.BX)("div",{className:se,children:[(0,G.tZ)("div",{className:de("header"),children:(0,G.tZ)(c.mr,{title:`${x.eventNames.join(" - ")}`,onBack:e?void 0:()=>{_.goBack()},bgColor:"light"})}),(0,G.BX)("main",{children:[W&&!ne&&(0,G.tZ)("div",{className:R,ref:$,children:(0,G.tZ)(ae,{isLive:Z,event:x,containerRef:$,setContainerClassName:P,onStreamToggle:L})}),ne&&(0,G.tZ)("div",{className:R,ref:$,children:(0,G.tZ)(q,{matchId:x.providerId,tournamentName:x.competitionName,isLive:"LIVE"===x.state})}),ie?(0,G.BX)("div",{className:de("market-groups"),children:[x.marketGroups.length>1&&x.marketGroups[0].name!==N("SPORT.OTHERS")&&(0,G.tZ)(c.cO,{options:x.marketGroups,selected:C,onChange:e=>A(e),type:"marketGroups"}),(0,G.tZ)("div",{children:((e,t=!1)=>t?(0,G.tZ)(oe,{event:x}):e.map(((e,t)=>{var r;return(0,G.tZ)("div",{className:(0,u.O5)(de("market-group"),{active:1===(null==x||null==(r=x.marketGroups)?void 0:r.length)||e===C}),children:e.markets?te(e.markets):re(e.outrights)},`${e.name}-${t}`)})))(x.marketGroups,S)})]}):te(x.markets)]})]})})}},98548:e=>{e.exports=[[e.id,".event-details__header{display:flex}.event-details__header .page-header{flex:1}.event-details__market-group{display:none}.event-details__market-group--active{display:block}.event-details .horizontal-selector{padding:9px 0}.event-details .horizontal-selector .horizontal-scroll-box__body{padding:0 8px}","",""]]},58888:e=>{e.exports=[[e.id,".event-market__cell--score-selector{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:4px;border-bottom:1px solid var(--color-secondary-background)}.event-market__cell--score-selector .form-select__placeholder,.event-market__cell--score-selector .form-select__selected-text{padding:10px}.event-market__cell--score-selector .form-input__wrap{position:relative;background-color:var(--color-input-background);border-radius:2px}.event-market__cell--score-title{font-size:12px;text-align:center;margin-bottom:4px;justify-content:center}.event-market__show-more{padding:8px 16px;border-bottom:1px solid var(--color-secondary-background)}.event-market__show-more button{color:var(--color-primary-text);background-color:var(--color-neutral-150);width:auto;min-width:50%;margin:0 auto;min-height:auto;padding:4px 16px;font-size:14px}.event-market__show-more button:not(:disabled):hover{color:var(--color-primary-text);background-color:var(--color-neutral-220)}.event-market__show-more button span{display:flex;flex-direction:row}.event-market__show-more button span .arrow-icon{margin-left:4px}","",""]]},98428:e=>{e.exports=[[e.id,".event-market{padding-bottom:8px}.event-market__name{color:var(--color-white);padding:6px 10px;background-color:var(--color-brand-background);font-size:11px;line-height:13px;font-weight:500;margin-bottom:7px}.event-market__row{display:flex;flex:1;flex-direction:row;gap:1px;margin:1px 10px 0}.event-market .odds-button{margin:0;height:100%;min-height:41px}.event-market__cell{width:100%;display:flex;background-color:var(--color-odds-button-gradient-end);border-radius:2px;padding:2px}.event-market__cell--empty{background:none}.event-market__cell--up{background-color:var(--color-green-8)}.event-market__cell--down{background-color:var(--color-red-8)}.event-market__cell-title{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--color-neutral-950);font-size:12px;line-height:1.3;word-break:break-all}.event-market__cell .odds-button{width:60px}","",""]]},6855:e=>{e.exports=[[e.id,".zoom-scores-widget{display:flex;flex-direction:column}","",""]]}}]);