(window.webpackJsonp=window.webpackJsonp||[]).push([[132],{"5Sd5":function(e,t,n){"use strict";var r=n("tOpy"),i=n("FvK5"),a=n("Siuj"),o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;s(this,t);for(var i=arguments.length,c=Array(i),d=0;d0){var r=function(e,t){var n=s(e,t,a.Rb),r=n.eventId,i=n.provider;return{videoEventId:r,videoProvider:a.ci[i]||null}}(e,t),i=r.videoEventId,c=r.videoProvider,u=s(e,t,a.Sb),d=u.provider,m=u.eventId;return o.Dd&&(n=e.some((function(e){return"GBVISION"===e.get("provider")&&e.get("type")===a.Qb}))),{vizEventId:d===a.Ob?m:null,performEventId:d===a.ci.PERFORM_V2?m:null,statsEventId:l(e,a.Pb,a.Tb,t),videoEventId:i,videoProvider:c,audioCommentaryAvailable:n}}return{vizEventId:null,statsEventId:null,videoEventId:null,audioCommentaryAvailable:n}}))},Cmpn:function(e,t,n){"use strict";var r=n("tOpy"),i=n("FvK5"),a=n("5Sd5"),o=Object.assign||function(e){for(var t=1;t0?n.get(0,0).toString():"",p2Nsets:n.size>0?n.get(1,0).toString():""})}))},FknV:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF");t.a=i.a.div.withConfig({componentId:"sc-5xo8o4-0"})(["font-size:",";color:",";"],Object(a.J)(24),(function(e){return e.visualizationArea?o.ak:o.nl}))},IgcK:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-1x7ccw5-0"})(["color:",";font-size:",";"],o.uk,Object(a.J)(28));t.a=c},MHjO:function(e,t,n){"use strict";var r=n("tOpy"),i=n("FvK5"),a=n("Siuj"),o=Object.assign||function(e){for(var t=1;th.size&&(h=h.push("empty")),h.size>f.size&&(f=f.push("empty"));f.size>5;)f=f.shift();for(;h.size>5;)h=h.shift()}return o({},e,{hRedCards:l,aRedCards:s,teamOnePenalties:f.toArray(),teamTwoPenalties:h.toArray(),teamOneTotalPenaltyGoals:m,teamTwoTotalPenaltyGoals:p,teamOneScore:a.get(0,""),teamTwoScore:a.get(1,""),score:a.toList()})}))},MSyb:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("iZzW"),o=n("Qi1R"),c=n("wurE"),l=n.n(c),s=n("rOcY"),u=n("g6nF"),d=l.a.div.withConfig({componentId:"sc-1forjg9-0"})(["display:flex;justify-content:center;padding:",";",";"],Object(o.J)(0,4),(function(e){var t=e.headerRow,n=e.periodFinished,r=e.highestScore,i=e.mainScore,a=e.withScore,l=e.currentSetScore,d=e.eventFinished,m=e.firstColumn,p="",f=30;return d?p=u.zl:l?p=s.y?u.u:u.uk:n||t||a||(p=u.u),s.C&&m&&(f=110),Object(c.css)(["",";",";color:",";width:",";"],t&&"padding-bottom: "+Object(o.J)(2),(n&&r||i)&&"font-weight: bold",p,Object(o.J)(f))})),m=l.a.div.withConfig({componentId:"sc-1forjg9-1"})(["position:relative;top:",";right:",";font-size:",";margin:0;"],Object(o.J)(-12),Object(o.J)(4),Object(o.J)(20)),p=function(e){var t=e.gameScore,n=e.tieBreakEnding,o=e.highestScore,c=e.periodFinished,l=e.headerRow,s=e.mainScore,u=e.text,p=e.withScore,f=e.currentSetScore,h=e.eventFinished,g=e.firstColumn;return i.a.createElement(r.Fragment,null,i.a.createElement(d,{highestScore:o,periodFinished:c,headerRow:l,mainScore:s,withScore:p,currentSetScore:f,eventFinished:h,firstColumn:g},i.a.createElement(a.a,{id:t||u})),n&&i.a.createElement(m,null,n))};p.defaultProps={highestScore:!1};var f=p;t.a=f},Rqpn:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-10y2rsg-0"})(["position:relative;left:",";top:",";height:",";width:",";border-radius:50%;background-color:",";visibility:",";"],Object(a.J)(10),Object(a.J)(14),Object(a.J)(12),Object(a.J)(12),(function(e){return e.serve?o.u:"transparent"}),(function(e){return e.servingIndicatorVisible?"visible":"hidden"}));t.a=c},WBb7:function(e,t,n){"use strict";var r=n("mpt1"),i=n("Qi1R"),a=n("mXGw"),o=n.n(a),c=n("wurE"),l=n.n(c),s=n("rOcY"),u=n("g6nF"),d=l.a.iframe.attrs((function(e){return{scrolling:i.Dd||e.showScrolling||e.pageInModal?"auto":"no"}})).withConfig({componentId:"dxxfk7-0"})(["display:block;width:100%;border:0;",";"],(function(e){if(e.fullScreenView)return Object(c.css)(["height:100vh;"]);if(e.pageInModal){var t=e.bottomOffset+s.jc+4;return Object(c.css)(["height:calc(90vh - ",");"],Object(i.J)(t))}if(e.height&&!1===e.rulesLoaded)return Object(c.css)(["height:0;"]);if(e.height)return Object(c.css)(["height:",";"],e.height);if(i.Dd&&!e.height&&!1===e.rulesLoaded)return Object(c.css)(["height:0;"]);var n=e.bottomOffset+(e.hasBottomNavigation?s.x+s.dc:0)+(e.hasLoginBar?s.Fb:0)+(e.hasTopBar?s.ob:4+s.jc);return Object(c.css)(["height:calc(100vh - ",");"],Object(i.J)(n))})),m=l.a.div.withConfig({componentId:"dxxfk7-1"})(["box-sizing:border-box;z-index:1;color:",";background-color:",";",";",";",";",";"],u.uk,u.Dg,(function(e){if(!e.pageInModal&&e.height&&0!==e.height){var t=e.height<600?"100%":Object(i.J)(Object(i.ee)(e.height));return Object(c.css)(["height:",";"],t)}return null}),(function(e){return!e.fullScreenView&&!e.noPaddings&&Object(c.css)(["border:"," solid ",";"],Object(i.J)(2),u.ak)}),(function(e){return e.noMargins?Object(c.css)([""]):Object(c.css)(["margin-bottom:",";"],i.Dd&&Object(i.J)(36))}),(function(e){return e.hasTopNavigation?Object(c.css)(["padding-top:",";"],Object(i.J)(80)):null})),p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["url","onRef","fullScreenView","hasBottomNavigation","hasTopNavigation","hasTopBar","hasLoginBar","bottomOffset","containerHeight","iframeHeight"]);return o.a.createElement(m,p({hasBottomNavigation:i,hasTopNavigation:a,fullScreenView:r,height:u},h),o.a.createElement(d,p({src:t,ref:n,fullScreenView:r,hasBottomNavigation:i,hasTopBar:c,hasLoginBar:l,bottomOffset:s,height:f},h)))}}]),t}(a.PureComponent);v.defaultProps={onRef:function(){},fullScreenView:!1,hasBottomNavigation:!1,hasTopNavigation:!1,hasTopBar:!1,hasLoginBar:!1,bottomOffset:0};var b=v,E={componentDidUpdate:function(e){var t=this.props,n=t.heightPx,r=t.rerenderLocked,i=t.setContainerHeight,a=t.setIframeHeight,o=t.setRerenderLocked;r||e.heightPx===n||(i(n),a("100%"),o(!0),setTimeout((function(){o(!1)}),50))}},O=Object(r.compose)(Object(r.setDisplayName)("IFrameContainer"),Object(r.withState)("rerenderLocked","setRerenderLocked",!1),Object(r.withState)("containerHeight","setContainerHeight",0),Object(r.withState)("iframeHeight","setIframeHeight",(function(e){var t=e.iframeHeight;return t||(i.Dd?null:"100vh")})),Object(r.lifecycle)(E),Object(r.mapProps)((function(e){return{url:e.url,onRef:e.onRef,fullScreenView:e.fullScreenView,hasBottomNavigation:e.hasBottomNavigation,hasTopNavigation:e.hasTopNavigation,hasTopBar:e.hasTopBar,hasLoginBar:e.hasLoginBar,bottomOffset:e.bottomOffset,pageInModal:e.pageInModal,rulesLoaded:e.rulesLoaded,onLoad:e.onLoad,onError:e.onError,showScrolling:e.showScrolling,containerHeight:e.containerHeight,iframeHeight:e.iframeHeight,noPaddings:e.noPaddings,noMargins:e.noMargins}})))(b);t.a=O},WDf2:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("wurE"),o=n.n(a),c=n("Qi1R"),l=n("g6nF"),s=o.a.div.withConfig({componentId:"sc-1ldbxjj-0"})(["display:inline-block;margin-right:",";border-radius:50%;",";",";"],Object(c.J)(6),(function(e){var t=e.mevView?12:16;return Object(a.css)(["height:",";width:",";"],Object(c.J)(t),Object(c.J)(t))}),(function(e){var t=e.goal;return"empty"===t?Object(a.css)(["border:"," solid ",";background-color:",";"],Object(c.J)(2),l.Cl,l.Al):Object(a.css)(["background-color:",";"],Number(t)?l.Bl:l.Cl)})),u=o.a.span.withConfig({componentId:"sc-1ldbxjj-1"})(["margin-left:",";font-weight:bold;color:",";line-height:1;"],Object(c.J)(6),(function(e){return e.inplay?l.u:l.uk})),d=o.a.div.withConfig({componentId:"sc-1ldbxjj-2"})(["display:flex;align-items:center;justify-content:flex-start;width:",";"],(function(e){return e.mevView?Object(c.J)(100):Object(c.J)(120)})),m=o()(d).withConfig({componentId:"sc-1ldbxjj-3"})(["justify-content:flex-end;width:fit-content;"]),p=function(e){var t=e.penaltyShoots,n=void 0===t?[]:t,r=e.mevView,a=void 0!==r&&r,o=e.penaltyScore,c=void 0===o?null:o,l=e.inplay,p=void 0!==l&&l;return i.a.createElement(m,null,i.a.createElement(d,{mevView:a},n.map((function(e,t){return i.a.createElement(s,{key:t,goal:e,mevView:a})}))),c>=0&&i.a.createElement(u,{inplay:p},c))};t.a=p},"Y1g+":function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("XSEl"),o=n("Qi1R"),c=n("tOpy"),l=n("FvK5"),s=n("bVOX"),u=Object(c.createSelector)(s.a,(function(e,t){return e.getIn(["removedEntities","events"],Object(l.Set)()).includes(t)}),(function(e,t){var n=e.get("scoreboard",Object(l.Map)()).get("timer",Object(l.Map)()),r=e.getIn(["eventNotes","isScoreBoardTimerVisible"],!0);return{inplay:e.get("inplay",!1),clockValue:n.get("value",0),clockCountsDown:n.get("countsDown",!1),clockValueTimestamp:Object(o.Mc)(n.get("timestamp","")),clockVisible:n.get("visible",!0)&&r,timerRunning:!t&&!n.get("stopped",!0),timerExist:n.size>0}})),d=n("wurE"),m=n.n(d).a.span.withConfig({componentId:"vnimhi-0"})(["white-space:nowrap;margin-left:0 !important;"]),p=function(){function e(e,t){for(var n=0;n span{",";}"],Object(o.J)(40),Object(o.J)(4),p)),b=i.a.div.withConfig({componentId:"pqag6n-4"})(["display:flex;align-items:center;height:",";font-size:",";padding-top:",";& > span{padding-top:",";line-height:1;}& > span:last-of-type{padding-right:",";}"],Object(o.J)(32),Object(o.J)(28),Object(o.J)(12),Object(o.J)(o.Od===a.yb?0:4),Object(o.J)(16)),E=i.a.div.withConfig({componentId:"pqag6n-5"})(["display:flex;flex-direction:column;justify-content:center;align-items:stretch;",";"],f),O=i()(E).withConfig({componentId:"pqag6n-6"})(["flex:0;align-items:center;justify-content:flex-start;",";"],f),S=i.a.div.withConfig({componentId:"pqag6n-7"})(["display:flex;justify-content:",";align-items:center;padding:",";height:",";margin-bottom:",";",";"],(function(e){return e.centrifyContent?"center":"flex-end"}),Object(o.J)(0,4),Object(o.J)(40),Object(o.J)(4),p),I=i()(S).withConfig({componentId:"pqag6n-8"})(["color:",";"],(function(e){return e.eventFinished?c.zl:c.u})),y=i.a.div.withConfig({componentId:"pqag6n-9"})(["display:flex;flex-direction:column;justify-content:center;font-weight:bold;",";"],f),w=i.a.div.withConfig({componentId:"pqag6n-10"})(["min-width:",";color:",";text-align:center;line-height:",";border-radius:",";"],Object(o.J)(46),(function(e){return e.eventFinished?c.zl:c.u}),Object(o.J)(40),Object(o.J)(4)),j=(i.a.div.withConfig({componentId:"pqag6n-11"})(["font-weight:bold;"]),i.a.div.withConfig({componentId:"pqag6n-12"})(["font-weight:bold;color:",";min-width:",";padding:",";text-align:center;"],c.u,Object(o.J)(32),Object(o.J)(0,4)),i()(m.a).withConfig({componentId:"pqag6n-13"})(["position:inherit;left:auto;top:auto;"]));t.l=i()(s.a).withConfig({componentId:"pqag6n-14"})(["justify-content:space-between;align-items:flex-end;width:100%;color:",";font-size:",";padding-left:",";min-width:0;"],c.uk,Object(o.J)(28),Object(o.J)(32))},aZ8X:function(e,t,n){"use strict";n.d(t,"h",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return m})),n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"e",(function(){return g}));var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=n("IgcK"),l=n("xlnk"),s=n("Rqpn"),u=function(e){return e.sevScoreboard&&Object(r.css)(["text-align:left;white-space:normal;",""],Object(a.qb)(1))},d=i.a.div.withConfig({componentId:"sc-16os30c-0"})(["display:flex;justify-content:space-between;align-items:center;font-size:",";font-weight:",";line-height:1;margin-bottom:",";"],Object(a.J)(28),(function(e){return e.bold?"bold":"normal"}),Object(a.J)(4)),m=i()(d).withConfig({componentId:"sc-16os30c-1"})(["& > span{color:",";}"],o.Dl),p=i.a.span.withConfig({componentId:"sc-16os30c-2"})(["margin-right:",";color:",";"],Object(a.J)(8),(function(e){var t=e.eventFinished,n=e.emptyScoreboard;return t||n?o.zl:o.u})),f=(i.a.div.withConfig({componentId:"sc-16os30c-3"})(["display:flex;align-items:center;"]),i()(l.a).withConfig({componentId:"sc-16os30c-4"})(["margin-right:",";font-size:",";line-height:",";font-weight:bold;text-align:center;color:",";",""],Object(a.J)(8),Object(a.J)(32),Object(a.J)(40),(function(e){return e.eventFinished?o.yl:o.lm}),u));i.a.div.withConfig({componentId:"sc-16os30c-5"})(["display:flex;flex:1;flex-direction:column;justify-content:center;height:100%;"]).defaultProps={twoParticipants:!0};i()(c.a).withConfig({componentId:"sc-16os30c-6"})(["color:",";display:flex;line-height:1;white-space:nowrap;"],o.u),i.a.div.withConfig({componentId:"sc-16os30c-7"})(["display:flex;justify-content:center;margin-bottom:",";color:",";"],Object(a.J)(8),o.uk),i.a.div.withConfig({componentId:"sc-16os30c-8"})(["font-size:",";font-weight:bold;color:",";"],Object(a.J)(36),o.lm);var h=i()(s.a).withConfig({componentId:"sc-16os30c-9"})(["position:inherit;left:auto;top:auto;"]),g=i.a.div.withConfig({componentId:"sc-16os30c-10"})(["display:flex;position:relative;align-items:center;"]);t.g=i.a.div.withConfig({componentId:"sc-16os30c-11"})(["width:100%;color:",";margin-left:",";"],o.u,Object(a.J)(32))},jedm:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("XSEl"),o=n("rOcY"),c=n("5Sd5"),l=n("xlnk"),s=n("9lff"),u=n("wurE"),d=n.n(u),m=n("Qi1R"),p=n("g6nF"),f=n("Rqpn"),h=n("zF6H"),g=n("YuNe"),v=function(e){return!e.inplay&&Object(u.css)(["color:",";"],p.fk)},b=d()(g.f).withConfig({componentId:"sc-1ec3qhn-0"})(["flex:5;justify-content:flex-start;& *:last-child{margin-bottom:0;}"]),E=d()(f.a).withConfig({componentId:"sc-1ec3qhn-1"})(["top:0;left:0;"]),O=d.a.div.withConfig({componentId:"sc-1ec3qhn-2"})(["flex:1;min-width:0;padding-right:",";& *:last-child{margin-bottom:0;}"],Object(m.J)(8)),S=d()(h.a).withConfig({componentId:"sc-1ec3qhn-3"})(["flex:0;justify-content:flex-end;height:",";"],Object(m.J)(80)),I=d.a.div.withConfig({componentId:"sc-1ec3qhn-4"})(["",";padding-right:",";",";"],(function(e){return e.visualizationArea&&Object(u.css)(["color:",";"],p.ak)}),Object(m.J)(6),Object(m.M)()),y=d()(l.a).withConfig({componentId:"sc-1ec3qhn-5"})(["",";"],v),w=d.a.div.withConfig({componentId:"sc-1ec3qhn-6"})(["display:flex;justify-content:space-between;align-items:center;font-size:",";line-height:1;margin-bottom:",";"],Object(m.J)(28),Object(m.J)(12)),j=d()(l.a).withConfig({componentId:"sc-1ec3qhn-7"})(["display:flex;align-items:center;flex:1;margin-right:",";",";"],Object(m.J)(20),v),T=d()(g.h).withConfig({componentId:"sc-1ec3qhn-8"})(["justify-content:flex-start;flex:1;"]),R=d()(g.h).withConfig({componentId:"sc-1ec3qhn-9"})(["flex:0 0 ",";margin-right:",";& >:not(:last-child){margin-bottom:",";}"],Object(m.J)(50),(function(e){return e.margin?Object(m.J)(10):0}),Object(m.J)(8)),M=d()(g.c).withConfig({componentId:"sc-1ec3qhn-10"})(["margin-right:",";font-weight:",";& >:not(:last-child){margin-bottom:",";}"],Object(m.J)(10),(function(e){return e.bold?"bold":"normal"}),Object(m.J)(8)),_=d.a.div.withConfig({componentId:"sc-1ec3qhn-11"})(["display:flex;justify-content:center;align-items:center;line-height:",";",";"],Object(m.J)(32),(function(e){return e.headerRow&&Object(u.css)(["font-weight:normal;font-size:",";color:",";"],Object(m.J)(24),p.Dl)})),C=d()(_).withConfig({componentId:"sc-1ec3qhn-12"})(["margin:0;"]),P=d.a.div.withConfig({componentId:"sc-1ec3qhn-13"})(["display:flex;justify-content:space-between;align-items:center;line-height:",";margin-bottom:",";"],Object(m.J)(32),Object(m.J)(12)),A=d.a.div.withConfig({componentId:"sc-1ec3qhn-14"})(["font-weight:bold;color:",";min-width:",";padding:",";text-align:center;"],p.u,Object(m.J)(32),Object(m.J)(0,4)),N=d.a.div.withConfig({componentId:"sc-1ec3qhn-15"})(["min-width:",";color:",";text-align:center;border-radius:",";"],Object(m.J)(46),(function(e){return e.eventFinished?p.zl:p.u}),Object(m.J)(4)),z=d.a.div.withConfig({componentId:"sc-1ec3qhn-16"})(["display:flex;justify-content:space-between;width:100%;color:",";"],p.uk),x=function(e){var t=e.cricketExist,n=e.eventId,o=Object(a.useSelector)((function(e){return Object(c.a)(e,n)})),u=o.inplay,d=o.twoParticipants,m=o.eventName,p=o.teamOneName,f=o.teamTwoName,h=o.teamOneScore,g=o.teamTwoScore,v=o.showScore,b=o.eventFinished,S=o.p1Serve,y=o.p2Serve,T=o.servingIndicatorVisible;return i.a.createElement(O,null,d?i.a.createElement(r.Fragment,null,i.a.createElement(w,null,i.a.createElement(j,{inplay:u},i.a.createElement(I,null,p)),v&&i.a.createElement(C,null,i.a.createElement(s.a,{eventFinished:b},h||"-"),t&&i.a.createElement(E,{serve:S,servingIndicatorVisible:T}))),i.a.createElement(w,null,i.a.createElement(j,{inplay:u},i.a.createElement(I,null,f)),v&&i.a.createElement(C,null,i.a.createElement(s.a,{eventFinished:b},g||"-"),t&&i.a.createElement(E,{serve:y,servingIndicatorVisible:T})))):i.a.createElement(l.a,{inplay:u},m))},V=n("tGBs"),F=n("MSyb"),k=function(e){var t=e.withPoints,n=e.eventId,c=Object(a.useSelector)((function(e){return Object(V.a)(e,n)})),l=c.inplay,u=c.teamOneName,d=c.teamTwoName,m=c.p1CurrentScore,p=c.p2CurrentScore,f=c.p1Games,h=c.p2Games,g=c.p1Nsets,v=c.p2Nsets,O=c.p1Serve,I=c.p2Serve,w=c.servingIndicatorVisible,j=c.set,T=c.showStarted,C=c.showScore,A=c.eventProvider,x=c.eventFinished,k=x&&A===o.re.LIVESCORE;return i.a.createElement(z,null,i.a.createElement(b,null,i.a.createElement(P,{inplay:l},i.a.createElement(y,{inplay:l},u)),i.a.createElement(P,{inplay:l},i.a.createElement(y,{inplay:l},d))),C&&!T&&i.a.createElement(r.Fragment,null,!k&&i.a.createElement(r.Fragment,null,l&&i.a.createElement(R,null,i.a.createElement(_,null,i.a.createElement(F.a,{gameScore:g,mainScore:!0})),i.a.createElement(_,null,i.a.createElement(F.a,{gameScore:v,mainScore:!0}))),t&&""!==f.get(j-1)&&i.a.createElement(R,null,i.a.createElement(_,null,i.a.createElement(F.a,{currentSetScore:!0,gameScore:f.get(j-1)})),i.a.createElement(_,null,i.a.createElement(F.a,{currentSetScore:!0,gameScore:h.get(j-1)}))),i.a.createElement(M,{bold:t},i.a.createElement(_,null,i.a.createElement(N,null,m),i.a.createElement(E,{serve:O,servingIndicatorVisible:w})),i.a.createElement(_,null,i.a.createElement(N,null,p),i.a.createElement(E,{serve:I,servingIndicatorVisible:w})))),k&&i.a.createElement(S,null,i.a.createElement(s.a,{eventFinished:x},g),i.a.createElement(s.a,{eventFinished:x},v))))};k.defaultProps={withPoints:!0,tableTennis:!1};var D=k,J=n("MHjO"),U=n("oRiN"),L=function(e){var t=e.inplay,n=e.visualizationArea,r=e.showScore,a=e.redCards,o=e.eventFinished,c=e.teamName,l=e.teamScore;return i.a.createElement(w,null,i.a.createElement(j,{inplay:t},i.a.createElement(I,{visualizationArea:n},c),i.a.createElement(U.a,{visualizationArea:n},a)),r&&i.a.createElement(s.a,{visualizationArea:n,eventFinished:o},l))},G=function(e){var t=e.visualizationArea,n=e.eventId,o=Object(a.useSelector)((function(e){return Object(J.a)(e,n)})),c=o.inplay,s=o.eventName,u=o.twoParticipants,d=o.hRedCards,m=o.aRedCards,p=o.showScore,f=o.eventFinished,h=o.teamOneName,g=o.teamTwoName,v=o.teamOneScore,b=o.teamTwoScore;return i.a.createElement(O,null,u?i.a.createElement(r.Fragment,null,i.a.createElement(L,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:d,teamName:h,teamScore:v}),i.a.createElement(L,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:m,teamName:g,teamScore:b})):i.a.createElement(l.a,{inplay:c},s))},B=n("WDf2"),H=function(e){var t=e.inplay,n=e.visualizationArea,r=e.showScore,a=e.eventFinished,o=e.redCards,c=e.teamName,l=e.teamScore,u=e.penaltiesExists,d=e.teamPenalties,m=e.teamTotalPenaltyGoals;return i.a.createElement(w,null,i.a.createElement(j,{inplay:t},i.a.createElement(I,{visualizationArea:n},c),i.a.createElement(U.a,{visualizationArea:n},o)),r&&(u?i.a.createElement(B.a,{mevView:!0,penaltyShoots:d,penaltyScore:m,inplay:t}):i.a.createElement(s.a,{visualizationArea:n,eventFinished:a}," ",l," ",u&&a&&"("+m+")")))},W=function(e){var t=e.visualizationArea,n=e.eventId,o=Object(a.useSelector)((function(e){return Object(J.a)(e,n)})),c=o.inplay,s=o.eventName,u=o.twoParticipants,d=o.hRedCards,m=o.aRedCards,p=o.showScore,f=o.eventFinished,h=o.penaltiesExists,g=o.teamOnePenalties,v=o.teamTwoPenalties,b=o.teamOneTotalPenaltyGoals,E=o.teamTwoTotalPenaltyGoals,S=o.teamOneName,I=o.teamTwoName,y=o.teamOneScore,w=o.teamTwoScore;return i.a.createElement(O,null,u?i.a.createElement(r.Fragment,null,i.a.createElement(H,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:d,teamName:S,teamScore:y,penaltiesExists:h,teamPenalties:g,teamTotalPenaltyGoals:b}),i.a.createElement(H,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:m,teamName:I,teamScore:w,penaltiesExists:h,teamPenalties:v,teamTotalPenaltyGoals:E})):i.a.createElement(l.a,{inplay:c},s))},q=function(e){var t=e.eventId,n=Object(a.useSelector)((function(e){return Object(V.a)(e,t)})),o=n.inplay,c=n.teamOneName,l=n.teamTwoName,s=n.p1CurrentScore,u=n.p2CurrentScore,d=n.p1Nsets,m=n.p2Nsets,p=n.p1Serve,f=n.p2Serve,h=n.servingIndicatorVisible,g=n.showStarted,v=n.showScore,O=n.periodNumber,S=n.periodSuffix;return i.a.createElement(z,null,i.a.createElement(b,null,i.a.createElement(P,{inplay:o},i.a.createElement(y,{inplay:o},c)),i.a.createElement(P,{inplay:o},i.a.createElement(y,{inplay:o},l))),v&&!g&&i.a.createElement(r.Fragment,null,i.a.createElement(R,null,i.a.createElement(_,null,i.a.createElement(A,null,d)),i.a.createElement(_,null,i.a.createElement(A,null,m)),i.a.createElement(_,{headerRow:!0},i.a.createElement(F.a,{headerRow:!0,text:"scoreboards.baseball.runs"}))),i.a.createElement(R,{margin:!0},i.a.createElement(_,null,i.a.createElement(F.a,{gameScore:s}),i.a.createElement(E,{serve:p,servingIndicatorVisible:h})),i.a.createElement(_,null,i.a.createElement(F.a,{gameScore:u}),i.a.createElement(E,{serve:f,servingIndicatorVisible:h})),i.a.createElement(_,{headerRow:!0},i.a.createElement(F.a,{headerRow:!0,text:O,tieBreakEnding:S})))))},K=n("Cmpn"),Q=function(e){var t=e.eventId,n=Object(a.useSelector)((function(e){return Object(K.a)(e,t)})),o=n.inplay,c=n.teamOneName,l=n.teamTwoName,s=n.p1Nsets,u=n.p2Nsets,d=n.p1Serve,m=n.p2Serve,p=n.servingIndicatorVisible,f=n.showScore;return i.a.createElement(z,null,i.a.createElement(b,null,i.a.createElement(P,{inplay:o},i.a.createElement(y,{inplay:o},c)),i.a.createElement(P,{inplay:o},i.a.createElement(y,{inplay:o},l))),f&&i.a.createElement(r.Fragment,null,i.a.createElement(T,null,i.a.createElement(_,null,i.a.createElement(A,null,s),i.a.createElement(E,{serve:d,servingIndicatorVisible:p})),i.a.createElement(_,null,i.a.createElement(A,null,u),i.a.createElement(E,{serve:m,servingIndicatorVisible:p})),i.a.createElement(_,{headerRow:!0},i.a.createElement(F.a,{headerRow:!0,text:"scoreboards.snooker.frame"})))))},Y=function(e){var t=e.sportId,n=e.eventId,r=e.visualizationArea,c=Object(a.useSelector)((function(e){return e.getIn(["appConfig","featureToggles","enableScoreboardV2"],!0)}));switch(t){case o.Pc:return i.a.createElement(D,{eventId:n});case o.id:case o.Nc:return i.a.createElement(D,{eventId:n,withPoints:!1});case o.i:return i.a.createElement(q,{eventId:n});case o.Fc:return c?i.a.createElement(G,{eventId:n,visualizationArea:r}):i.a.createElement(W,{eventId:n,visualizationArea:r});case o.Ec:return i.a.createElement(Q,{eventId:n});case o.cd:case o.dd:return i.a.createElement(x,{eventId:n});case o.M:return i.a.createElement(x,{eventId:n,cricketExist:!0});default:return i.a.createElement(x,{eventId:n})}};t.a=Y},oRiN:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-1ia3x3v-0"})(["",";font-weight:bold;font-size:",";height:",";border-radius:",";padding:",";line-height:",";"],(function(e){var t=e.children;return t?Object(r.css)(["display:block;background:",";color:",";"],o.ol,1===t?o.ol:o.pl):Object(r.css)(["display:none;"])}),Object(a.J)(28),Object(a.J)(34),Object(a.J)(2),Object(a.J)(0,4),Object(a.J)(36));t.a=c},rR46:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("XSEl"),o=n("FvK5"),c=n("tOpy"),l=n("rOcY"),s=n("bVOX"),u=Object(c.createSelector)(s.a,(function(e){var t=e.get("inplay",!1),n=e.getIn(["scoreboard","period","id"],""),r=e.get("outright",!1),i=e.get("categories",Object(o.List)()).last(Object(o.Map)()).get("id"),a=""===n||l.ug.PRE_GAME.includes(n)||r&&t,c=void 0;switch(i){case l.Fc:c=!a;break;case l.Pc:case l.id:case l.i:c=!1;break;default:c=t}return c})),d=n("Y1g+"),m=n("t/rl"),p=n("FknV"),f=function(e){var t=e.eventId,n=e.visualizationArea,r=void 0!==n&&n,o=Object(a.useSelector)((function(e){return u(e,t)}));return i.a.createElement(p.a,{visualizationArea:r,"data-element":"EventTime"},i.a.createElement(m.a,{eventId:t,visualizationArea:r,mevView:!0}),o&&i.a.createElement(d.a,{eventId:t}))};t.a=f},tGBs:function(e,t,n){"use strict";var r,i=n("tOpy"),a=n("FvK5"),o=n("rOcY"),c=n("Siuj"),l=Object.assign||function(e){for(var t=1;t0?b.get(0,0).toString():"",p2Nsets:b.size>0?b.get(1,0).toString():"",p1Serve:r.getIn(["servingIndicator","homeServing"],!1),p2Serve:r.getIn(["servingIndicator","awayServing"],!1),servingIndicatorVisible:r.getIn(["servingIndicator","visible"],!1),periodsList:v,eventProvider:t.get("provider",null),periodNumber:g.match(/\d+/)?g.match(/\d+/)[0]:"",periodSuffix:g.match(/\D+/)?g.match(/\D+/)[0]:""})}))},xlnk:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-1lugp45-0"})(["font-size:",";",";display:block;color:",";"],Object(a.J)(28),Object(a.M)(),o.ek);t.a=c},yIDL:function(e,t,n){"use strict";n.r(t);var r,i=n("XSEl"),a=n("mpt1"),o=n("ymme"),c=n("BmqR"),l=n("FvK5"),s=n("rOcY"),u=n("Qi1R"),d=n("YMdE"),m=n("tOpy"),p=Object(m.createSelector)((function(e,t){return e.getIn(["eventEntities",t],Object(l.Map)())}),(function(e){var t=e.get("participants",Object(l.List)());return{sportId:e.get("categories",Object(l.List)()).last(Object(l.Map)()).get("id"),inplay:e.get("inplay",!1),startTime:e.get("startTime",""),teamOneName:t.size?t.first().get("name",""):"",teamTwoName:t.size?t.last().get("name",""):"",eventName:e.get("name",""),eventType:e.get("type",""),participants:t,twoParticipants:"headtohead"===e.get("type","").toLowerCase()&&2===t.size,racetrackName:e.getIn(["racingData","racetrackName"],""),raceHour:e.getIn(["racingData","raceHour"],""),periodId:e.getIn(["scoreboard","period","id"],""),eventCountryCode:e.get("categories",Object(l.OrderedSet)()).find((function(e){return"Country"===e.get("type")}),null,Object(l.Map)()).get("countryCode","")}})),f=n("Tgit"),h=n("A9fm"),g=n("mXGw"),v=n.n(g),b=n("PBYb"),E=n.n(b),O=(n("Pdmf"),n("g6nF")),S=n("iZzW"),I=n("rR46"),y=n("jedm"),w=n("+wJ6"),j=n("wurE"),T=n.n(j),R=n("uXGu"),M=n("I2FV"),_=n("goda"),C=n("co3k"),P=n("WBb7"),A=s.ii.IFRAME_VIDEO_STREAM,N=s.ii.SPORT_RADAR_WIDGET,z=s.ii.IFRAME_PERFORM_V2_VIDEO_STREAM,x=s.ii.IFRAME_PERFORM_RMG_VIDEO_STREAM,V=function(e){var t=e.mode,n=e.maxPlayerSizePercentage;if(t===z)return Object(j.css)(["width:","px;"],s.xc/100*n);if(t===A||t===x){var r=Object(u.J)(s.hd);return Object(j.css)(["height:calc(","vw / "," + ",");"],n,s.ld,r)}return Object(j.css)([""])},F=T.a.div.withConfig({componentId:"sc-3s96ha-0"})(["",";"],(function(){return u.Dd?Object(j.css)(["border:0 none;transform-origin:top left;will-change:transform;transform:",";"],(function(e){return"scale("+(e.minimized?s.gd:1)+")"})):null})),k=T.a.div.withConfig({componentId:"sc-3s96ha-1"})(["display:flex;flex-direction:column;align-items:flex-start;width:100%;overflow:hidden;padding:",";color:",";"],Object(u.J)(20,0,20,20),O.Tn),D=T()(M.a).withConfig({componentId:"sc-3s96ha-2"})(["display:flex;flex-direction:column;width:100%;"]),J=T.a.div.withConfig({componentId:"sc-3s96ha-3"})(["display:flex;align-items:center;width:100%;"]),U=T.a.div.withConfig({componentId:"sc-3s96ha-4"})(["position:absolute;width:100%;height:",";display:flex;justify-content:flex-end;align-items:start;padding:",";box-sizing:border-box;white-space:nowrap;z-index:10;color:",";background:linear-gradient(179deg,rgba(0,0,0,0.75) -6%,rgba(0,0,0,0) 90%);"],Object(u.J)(194),Object(u.J)(20),O.Un),L=T()(U).withConfig({componentId:"sc-3s96ha-5"})(["align-items:flex-end;flex-direction:row-reverse;justify-content:space-between;bottom:0;background:linear-gradient(359deg,rgba(0,0,0,0.75) -6%,rgba(0,0,0,0) 90%);& > *{color:",";}"],O.Un),G=T()(M.a).withConfig({componentId:"sc-3s96ha-6"})(["display:flex;align-items:center;margin-left:",";font-size:",";"],Object(u.J)(12),Object(u.J)(28)),B=T()(R.a).attrs((function(e){var t=e.fill,n=void 0===t?O.Un:t,r=e.stroke,i=void 0===r?"none":r;return{fill:n,width:Object(u.J)(40),height:Object(u.J)(40),stroke:i}})).withConfig({componentId:"sc-3s96ha-7"})(["margin-left:",";cursor:pointer;"],(function(e){return"arrow02"===e.name?Object(u.J)(4):Object(u.J)(40)})),H=T()(B).attrs((function(e){var t=e.pinned;return{name:t?s.Ef.PIN_SELECTED:s.Ef.PIN,fill:t?O.gk:O.Hn,stroke:t?O.gk:O.ih}})).withConfig({componentId:"sc-3s96ha-8"})([""]),W=T.a.div.withConfig({componentId:"sc-3s96ha-9"})(["display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;flex-shrink:0;padding:",";box-sizing:border-box;z-index:10;"],Object(u.J)(20,20,20,0)),q=T.a.div.withConfig({componentId:"sc-3s96ha-10"})(["display:flex;"]),K=T.a.div.withConfig({componentId:"sc-3s96ha-11"})(["flex:1;margin-left:",";font-size:",";font-weight:bold;",";"],Object(u.J)(12),Object(u.J)(28),Object(u.M)()),Q=T.a.div.withConfig({componentId:"sc-3s96ha-12"})(["",";color:",";"],Object(u.M)(),O.ui),Y=T.a.div.withConfig({componentId:"sc-3s96ha-13"})(["color:",";"],O.ui),X=T.a.div.withConfig({componentId:"sc-3s96ha-14"})(["position:absolute;top:0;left:",";right:0;height:100%;display:flex;justify-content:space-between;background:",";color:",";"],Object(u.J)(s.fd*s.Jc),O.ti,O.ui),Z=T.a.div.withConfig({componentId:"sc-3s96ha-15"})(["width:100%;min-height:",";display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;padding:",";box-sizing:border-box;text-align:center;background:",";color:",";z-index:10;& > a{color:",";}"],Object(u.J)(u.Dd?s.ed:s.X),Object(u.J)(20),O.Tn,O.Un,O.Un),$=T()(_.a).attrs((function(){return{color:O.Un}})).withConfig({componentId:"sc-3s96ha-16"})([""]),ee=T.a.div.withConfig({componentId:"sc-3s96ha-17"})(["display:flex;justify-content:center;align-items:center;min-height:",";width:100%;background:",";"],Object(u.J)(u.Dd?s.ed:s.X),O.Tn),te=T()(R.a).attrs((function(){return{name:"warning",fill:O.Un,width:Object(u.J)(100),height:Object(u.J)(100)}})).withConfig({componentId:"sc-3s96ha-18"})([""]),ne=T()(S.a).withConfig({componentId:"sc-3s96ha-19"})(["text-decoration:underline;"]),re=T.a.div.withConfig({componentId:"sc-3s96ha-20"})(["display:flex;flex-direction:column;align-items:center;"]),ie=T()(C.a).withConfig({componentId:"sc-3s96ha-21"})(["flex:0 0 ",";width:",";margin-top:",";"],Object(u.J)(64),Object(u.J)(349),Object(u.J)(40)),ae=T()(ie).attrs((function(){return{buttonStyle:"secondary"}})).withConfig({componentId:"sc-3s96ha-22"})([""]),oe=T()(ie).attrs((function(){return{buttonStyle:"primary"}})).withConfig({componentId:"sc-3s96ha-23"})([""]),ce=function(e){var t=e.fullScreen,n=e.maxPlayerSizePercentage,r=e.provider,i=e.mode;return r===s.ci.PERFORM_V2&&i!==s.ii.IFRAME_PERFORM_RMG_VIDEO_STREAM?t?"calc("+n+"vw / "+s.nc+")":Object(u.J)(s.lc-s.hd):t?"calc("+n+"vw / "+s.ld+")":Object(u.J)(s.jd-s.hd)},le=T()(P.a).attrs((function(e){var t=e.fullScreen,n=e.maxPlayerSizePercentage,r=e.provider,i=e.mode;return{iframeHeight:ce({fullScreen:t,maxPlayerSizePercentage:n,provider:r,mode:i}),noPaddings:!0,noMargins:!0}})).withConfig({componentId:"sc-3s96ha-24"})([""]),se=T()(U).withConfig({componentId:"sc-3s96ha-25"})(["position:static;align-items:start;height:",";background:",";"],Object(u.J)(s.hd),O.Tn),ue=T.a.div.withConfig({componentId:"sc-3s96ha-26"})(["",";"],(function(e){var t=e.height,n=e.messagesHeight,r=e.maxPlayerSizePercentage,i=e.fullScreen,a=e.mode;return i&&!u.Dd&&a!==N?Object(j.css)(["position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:",";",";z-index:121;"],r?r+"%":"100%",V):u.Dd?Object(j.css)(["position:fixed;top:",";height:",";width:100%;background:",";z-index:15;"],n?Object(u.J)(n):"0",Object(u.J)(t),O.Tn):Object(j.css)(["position:relative;"])}));function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var me=(de(r={},s.Eb,"videoStream.error.youNeedToLogIn"),de(r,s.Zh.NOT_AVAILABLE,"videoStream.error.notAvailable"),de(r,s.Zh.IMG_NOT_AVAILABLE,"videoStream.error.StreamNotAvailableLocation"),de(r,s.Zh.IMG_WILL_START_SOON,"videoStream.error.willStartSoon"),de(r,s.Zh.BET_1_TO_WATCH,"videoStream.error.bet1"),de(r,s.ai.EVENT_NOT_STARTED,"videoStream.error.notYetAvailable"),de(r,s.ai.USAGE_LIMITS_BREACHED,"videoStream.error.maxAttemptsExceeded"),de(r,s.ai.EVENT_OVER,"videoStream.error.streamFinished"),de(r,s.ai.EVENT_NO_STREAMS,"videoStream.error.noStreamAvailable"),de(r,s.ai.GENERIC_ERROR,"videoStream.error.anErrorHasOccurred"),de(r,s.bi.INVALID_EVENT_ID,"videoStream.error.notAvailable"),de(r,s.bi.EVENT_OVER,"videoStream.error.streamFinished"),de(r,s.bi.GEO_BLOCKED,"videoStream.error.streamNotAvailableInThisLocation"),de(r,s.bi.EVENT_NOT_STARTED,"videoStream.error.notYetAvailable"),de(r,s.bi.FAIRUSE_BREACH,"videoStream.error.maxAttemptsExceeded"),r),pe=function(e){return me.hasOwnProperty(e)?me[e]:"videoStream.error.videoEventNotStartedTextForLoggedInUser"},fe=function(e){var t=e.errorCode,n=e.onContactUs,r=e.currency,i=Object(w.a)(),a=i.openLogin,o=i.openRegistration,c=Intl.NumberFormat(s.Yd.locale,{style:"currency",currency:r}).formatToParts(0).find((function(e){return"currency"===e.type})).value;return v.a.createElement(Z,null,function(){switch(t){case s.Zh.NO_MONEY:return v.a.createElement(g.Fragment,null,v.a.createElement(te,null),v.a.createElement("div",{onClick:n},v.a.createElement(S.a,{id:"videoStream.error.noMoney.a"}),v.a.createElement("br",null),v.a.createElement(ne,{id:"videoStream.error.noMoney.b"}),v.a.createElement(S.a,{id:"videoStream.error.noMoney.c"})));case s.Eb:return v.a.createElement(re,null,v.a.createElement(S.a,{id:pe(t),enabled:!0,values:{currency:c}}),v.a.createElement(ae,{onClick:a},v.a.createElement(S.a,{id:"login.button.login"})),v.a.createElement(oe,{onClick:o},v.a.createElement(S.a,{id:"generic.registration"})));default:return v.a.createElement(g.Fragment,null,v.a.createElement(te,null),v.a.createElement(S.a,{id:pe(t),enabled:!0,breakSpaces:!0,values:{currency:c}}))}}())},he=n("5bUc"),ge=T.a.video.withConfig({componentId:"sc-14x81uh-0"})(["display:block;width:100%;",";background:",";"],(function(e){var t=e.maxPlayerSizePercentage;return t?Object(j.css)(["height:'","%';"],t):Object(j.css)(["height:",";"],Object(u.J)(u.Dd?s.ed:s.X))}),O.Qn),ve=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1?t-1:0),r=1;r50||0===i?50:i),(n===p&&Object(u.V)("streaming.enableRUKiFrame",s.Yd.features.streaming.enableRUKiFrame)||n===g)&&0===r.resultCode&&r.data)return n===g?void Ye(xe({},e,{urlFromGateway:r.data.url})):void Ge(xe({},e,{urlRmgIFrame:r.data.urlRmgIFrame}));0===r.resultCode&&r.data&&r.data.url?-1!==[v,f].indexOf(n)?(Be(e,r.data.url),o(!1)):n===b?(Qe(e,r.data),o(!1)):a(r.data.url).then((function(t){switch(n){case p:He(e,t);break;case m:We(e,t);break;case h:qe(e,t);break;default:Ke(e,t)}o(!1)})):(r.response&&r.response.resultCode?c(r.response.resultCode):r.resultCode?c(r.resultCode):c(s.Sc),o(!1))}))},Ge=function(e){var t=e.urlRmgIFrame,n=e.getRmgHtml,r=e.setWatchAndBetIframeUrl,i=e.setSpinner,a=e.setError,o=e.provider,c=e.fullScreen,l=e.maxPlayerSizePercentage,d=s.ci.PERFORM_V2;n(t).then((function(e){try{e.payload.text().then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("html");t.innerHTML=e;var n=t.getElementsByTagName("iframe")[0],a=new URL(n.getAttribute("src"));o===d&&(c?a.searchParams.set("width",s.xc/100*l):(a.searchParams.set("width",Object(u.de)(s.md)),a.searchParams.set("height",Object(u.de)(s.lc)))),r(o===d?a.href:n.getAttribute("src")),i(!1)}))}catch(t){i(!1),a(s.Sc)}}))},Be=function(e,t){e.setVideoStreamUrl(t),Xe(e.setShowBar)},He=function(e,t){if(Object.values(s.bi).indexOf(t.payload)>-1)e.setError(t.payload);else try{var n=(new DOMParser).parseFromString(t.payload,"application/xml").getElementById("854").getElementsByTagName("streamLaunchCode")[0].textContent;e.setVideoStreamUrl(n),Xe(e.setShowBar)}catch(r){e.setError(s.Sc)}},We=function(e,t){if(t.payload.IsOK)try{e.setVideoStreamUrl(t.payload.EventInfo.Streams.find((function(e){return"Adaptive"===e.BitrateLevel&&e.MediaFormat===s.di.HLS})).Url),Xe(e.setShowBar)}catch(r){e.setError(s.Sc)}else{var n=t.payload.Error&&t.payload.Error.ErrorCode||s.Sc;e.setError(n)}},qe=function(e,t){var n=Object(u.ec)("payload.hlsUrl",t);n?e.setVideoStreamUrl(n):e.setError(s.Sc)},Ke=function(e,t){try{200===t.payload.statusCode&&t.payload.hlsUrl?(e.setVideoStreamUrl(t.payload.hlsUrl),Xe(e.setShowBar)):200!==t.payload.statusCode||t.payload.hlsUrl?403===t.payload.response.statusCode?e.setError(t.payload.response.statusCode):e.setError(s.Sc):e.setError(s.Zh.IMG_WILL_START_SOON)}catch(n){e.setError(s.Sc)}},Qe=function(e,t){try{var n=t.protocol===s.di.DASH,r=t.drm;if(t.url&&(!n&&r&&u.je||!n&&!r||n&&!u.je)){var i=n?"application/dash+xml":"application/x-mpegURL",a={src:t.url,type:i,withCredentials:!0};r&&(a.keySystems={"com.apple.fps.1_0":{certificateUri:r.fairplayCertificate,getLicense:function(e,t,n,i){window.videojs&&window.videojs.xhr({url:r.fairplay,method:"POST",responseType:"arraybuffer",body:n,headers:{"Content-type":"application/octet-stream"}},(function(e,t,n){e?i(e):i(null,n)}))}},"com.widevine.alpha":r.widevine,"com.microsoft.playready":r.playready}),e.setBetGeniusStreamSources(a)}else e.setError(s.Sc)}catch(o){e.setError(s.Sc)}},Ye=function(e){var t=e.setWatchAndBetIframeUrl,n=e.setSpinner,r=e.urlFromGateway,i=new URL(r);t(new URL(s.Yd.host+s.Yd.country+s.Yd.performV2TemplatePage+i.search).href),n(!1)},Xe=function(e){e(!0),De&&clearTimeout(De),De=setTimeout((function(){return e(!1)}),2e3)},Ze=function(e){return function(t){var n=rt(e);e.minimizeVisualization(n),t&&!e.minimized&&ke(e,s.Jh.SHRINK,t)}},$e={onPin:function(e){return function(){e.pinned?(e.unpinVisualization(),ke(e,s.Jh.UNPIN,s.Qg.TAP)):(e.pinVisualization(),ke(e,s.Jh.PIN,s.Qg.TAP))}},onVizualization:function(e){return function(){Je?function(e){if(clearTimeout(Je),Je=null,e.error)return e.sendStreamEnd(s.Kh.STREAM),e.resetVisualization(),void(e.fullScreen&&!u.Dd&&e.hideModal("VisualizationAreaModal"));if(u.Dd)if(e.minimized)e.maximizeVisualization(Fe[e.mode]),ke(e,s.Jh.ENLARGE,s.Qg.DOUBLE_TAP);else{var t=rt(e);e.minimizeVisualization(t),ke(e,s.Jh.SHRINK,s.Qg.DOUBLE_TAP)}}(e):Je=setTimeout((function(){Je=null,Xe(e.setShowBar)}),500)}},onClose:function(e){return function(){e.fullScreen?(u.Dd&&e.setFullScreen(!1),!u.Dd&&e.setVideoStreamUrl(null),!u.Dd&&e.hideModal("VisualizationAreaModal")):(e.sendStreamEnd(s.Kh.STREAM),e.resetVisualization())}},onVideoError:function(e){return function(){e.setError(s.Sc)}},onSoundMute:function(e){return function(){e.setSoundMute(!e.soundMute)}},onContactUs:function(e){var t=e.showModal,n=e.showLiveChat,r=e.contactUsEnabled;return function(){r&&Object(u.Jd)({showModal:t,showLiveChat:n})}},onMouseOver:function(e){var t=e.showBar,n=e.setShowBar;return function(e){e.stopPropagation(),!t&&Xe(n)}},onIframeTopBar:function(){return function(e){e.stopPropagation()}},onMinimizeVisualization:Ze,onMaximizeVisualization:function(e){return function(t){e.maximizeVisualization(Fe[e.mode]),e.setShowBar(!1),e.minimized&&ke(e,s.Jh.ENLARGE,t)}},onOpenViewMarkets:function(e){return function(){e.fullScreen&&!u.Dd&&e.hideModal("VisualizationAreaModal"),function(e){ke(e,s.Jh.VIEW_MARKETS,s.Qg.TAP)}(e)}},onFullScreen:function(e){var t=e.showModal,n=e.setFullScreen,r=e.setVideoStreamUrl;return function(){u.Dd||(n(!0),!u.Dd&&r(null),!u.Dd&&t("VisualizationAreaModal",{overlay:!0}))}}},et=function(e){var t=e.eventId,n=e.eventExist,r=e.fetchEvent,i=e.resetVisualization,a=e.sendStreamEnd;t&&!n&&r({eventId:t,alive:!0}).then((function(e){Object(u.ec)("payload.event.sportId",e)||(a(s.Kh.STREAM),i())}))},tt={componentDidMount:function(){var e=this.props,t=e.eventId,n=e.subscribeToEventDetails,r=e.subscribeToEventScoreboard,i=e.eventExist,a=this.props,o=a.videoStream,c=a.videoStreamUrl,l=a.loggedIn,u=a.setError;o&&c&&!l?u(s.Eb):(et(this.props),i&&(n(t),r(t)),o&&!c&&Ue(this.props),nt(this.props),it(this.props))},componentDidUpdate:function(e){var t=this;et(this.props);var n=this.props,r=n.betPlacementResultCode,i=n.minimized,a=n.keyboardShown,o=n.resetVisualization,l=n.sportradarWidgetId,d=this.props,m=d.eventExist,p=d.eventId,f=d.subscribeToEventDetails,h=d.subscribeToEventScoreboard,g=d.error,v=d.loggedIn,b=this.props,E=b.videoStream,O=b.setError,S=b.setSpinner,I=b.setVideoStreamUrl,y=b.setWatchAndBetIframeUrl,w=b.mode,j=this.props,T=j.videoStreamUrl,R=j.watchAndBetIframeUrl,M=j.soundMute,_=j.setSoundMute,C=j.fullScreen,P=j.hideModal,A=this.props,N=A.maximizeVisualization,z=A.sendStreamEnd,x=A.provider,V=A.performMatchTracker,F=A.performWidgetId,k=this.props,D=k.pinned,J=k.location,U=k.betGeniusStreamSources;!e.eventExist&&m&&(f(p),h(p)),function(e,t){var n=e.location,r=e.pinned,i=e.visualizationEnabledState,a=e.resetVisualization,o=e.sendStreamEnd,l=n.pathname,u=t.location.pathname,d=Object(c.matchPath)(l,{path:s.rh}),m=d&&d.params.eventId,p=d&&e.eventId===m,f=!!Object(c.matchPath)(l,{path:s.hg.login}),h=!!Object(c.matchPath)(u,{path:s.hg.login});!r&&(l!==u&&!(f||h))&&!p&&i&&(o(s.Kh.STREAM),a()),e.visEventId||e.videoStream||(o(s.Kh.STREAM),a())}(this.props,e),(g===s.Eb&&!e.loggedIn&&v||g&&e.videoStream&&!E)&&O(null),e.videoStream&&!E&&(O(null),S(!1),I(null),y(null));var L=e.eventId!==p,G=e.mode!==s.ii.UNKNOWN&&w!==s.ii.UNKNOWN&&e.mode!==w,B=e.loggedIn!==v&&E;(L||G||B)&&i&&N(Fe[w]);var H=!e.videoStream&&E,W=L&&E,q=e.performMatchTracker&&!V&&E,K=e.betPlacementResultCode!==r&&g===s.Zh.BET_1_TO_WATCH;if(H||B||W||q){var Q=at(this.props);M!==Q&&_(Q),Ue(this.props)}K&&setTimeout((function(){Ue(t.props)}),1e3),u.Dd&&!i&&!e.keyboardShown&&a&&(g?(z(s.Kh.STREAM),o()):Ze(this.props)()),e.error===g&&e.eventExist===m&&e.videoStream===E&&e.videoStreamUrl===T&&e.sportradarWidgetId===l&&e.watchAndBetIframeUrl===R&&e.performMatchTracker===V&&e.performWidgetId===F&&e.betGeniusStreamSources===U||nt(this.props,e),e.mode!==w&&it(this.props),(E&&!e.provider&&e.provider!==x||!e.performMatchTracker&&e.performMatchTracker!==V)&&Ue(this.props),C&&e.location.pathname!==J.pathname&&(P("VisualizationAreaModal"),!D&&o())},componentWillUnmount:function(){var e=this.props,t=e.eventId,n=e.unsubscribeFromEventDetails,r=e.unsubscribeFromEventScoreboard,i=e.setVisualizationHeight;clearTimeout(De),clearTimeout(Je),n(t),r(t),i(0),Je=null}},nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.error,r=e.videoStream,i=e.videoStreamUrl,a=e.watchAndBetIframeUrl,o=e.sendStreamStart,c=e.sendStreamEnd,l=e.mode,u=e.setMode,d=e.startUIElement,m=e.provider,p=e.performMatchTracker,f=e.betGeniusStreamSources,h=s.ci.RUK,g=s.ci.PERFORM_V2,v=s.ci.BETGENIUS,b=s.ii.UNKNOWN;if(!n)if(r&&i)b=s.ii.VIDEO_STREAM;else if(p||a&&m===g){var E=new URLSearchParams(e.watchAndBetIframeUrl).get("rmg");b="true"===E?s.ii.IFRAME_PERFORM_RMG_VIDEO_STREAM:s.ii.IFRAME_PERFORM_V2_VIDEO_STREAM}else a&&m===h?b=s.ii.IFRAME_VIDEO_STREAM:r&&m===v&&f?b=s.ii.VIDEO_STREAM_BETGENIUS:r||p||(b=s.ii.SPORT_RADAR_WIDGET);l!==b&&(b===s.ii.UNKNOWN&&c(s.Kh.STREAM),u(b));var O=b===s.ii.SPORT_RADAR_WIDGET&&!t.videoStream&&!r,S=b!==s.ii.UNKNOWN&&t.videoStream&&r&&(!!i||!!a);(O||S)&&o(d)},rt=function(e){switch(e.mode){case s.ii.IFRAME_VIDEO_STREAM:case s.ii.IFRAME_PERFORM_RMG_VIDEO_STREAM:return s.kd;case s.ii.IFRAME_PERFORM_V2_VIDEO_STREAM:return s.mc;default:return s.fd}},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.setVisualizationHeight,r=e.mode,i=e.minimized,a=i?rt(e):Fe[r];n(null===t?a:t)},at=function(e){var t=e.autoPlaySoundOnSportVideo,n=e.autoPlaySoundOnHorseVideo,r=e.eventDetails.sportId;return s.vg.includes(r)?!n:!t},ot=Object(a.compose)(Object(a.setDisplayName)("VisualizationAreaContainer"),c.withRouter,Object(i.connect)((function(e){var t=e.getIn(["visualization","eventId"],null),n=p(e,t),r=e.getIn(["eventEntities",t],Object(l.Map)()),i=Object(h.a)(e,t);return{minimized:e.getIn(["visualization","minimized"],!1),height:e.getIn(["visualization","height"],0),pinned:e.getIn(["visualization","pinned"],!1),sportradarWidgetId:e.getIn(["visualization","sportradarWidgetId"],null),performWidgetId:e.getIn(["visualization","performWidgetId"],null),videoStream:e.getIn(["visualization","videoStream"],!1),videoStreamUrl:e.getIn(["visualization","videoStreamUrl"],""),performMatchTracker:e.getIn(["visualization","performMatchTracker"],!1),eventRemoved:e.getIn(["removedEntities","events"],Object(l.Set)()).includes(t),visualizationEnabledState:e.getIn(["visualization","enabled"],!1),visEventId:i.vizEventId,videoProvider:i.videoProvider,videoEventId:i.videoEventId,maxPlayerSizePercentage:e.getIn(["visualization","maxPlayerSizePercentage"],50),disableEventStats:n.sportId===s.Fc,event:r,eventExist:!r.isEmpty(),eventDetails:n,eventId:t,loggedIn:Object(f.a)(e),betPlacementResultCode:e.getIn(["betplacement","resultCode"],null),keyboardShown:e.getIn(["keyboardState","keyboardShown"],!1),mode:e.getIn(["visualization","mode"],0),startUIElement:e.getIn(["visualization","startUIElement"],null),sportRadarWidgetType:n.sportId===s.M?"match.lmtLight":"match.lmtEssential",fullScreen:e.getIn(["visualization","fullScreen"],!1),betGeniusStreamSources:e.getIn(["visualization","betGeniusStreamSources"]),autoPlaySoundOnSportVideo:e.getIn(["userSettings","settings","media","autoPlaySoundOnSportVideo"]),autoPlaySoundOnHorseVideo:e.getIn(["userSettings","settings","media","autoPlaySoundOnHorseVideo"]),contactUsEnabled:e.getIn(["appConfig","featuresEnabled","contactUs"],!0),currency:e.getIn(["user","balance","currency"],"GBP")}}),(function(e){return Object(o.bindActionCreators)({resetVisualization:d.xd.resetVisualization,minimizeVisualization:d.xd.minimizeVisualization,maximizeVisualization:d.xd.maximizeVisualization,pinVisualization:d.xd.pinVisualization,unpinVisualization:d.xd.unpinVisualization,fetchEvent:d.ib.fetchEvent,getVideoUrl:d.xd.getVideoUrl,getVideoStreamingUrl:d.xd.getVideoStreamingUrl,disableVideoStream:d.xd.disableVideoStream,showModal:d.ic.showModal,hideModal:d.ic.hideModal,setVideoStreamUrl:d.xd.setVideoStreamUrl,setBetGeniusStreamSources:d.xd.setBetGeniusStreamSources,setMaxPlayerSizePercentage:d.xd.setMaxPlayerSizePercentage,setVisualizationHeight:d.xd.setVisualizationHeight,getRmgHtml:d.xd.getRmgHtml,setMode:d.xd.setMode,setFullScreen:d.xd.setFullScreen,subscribeToEventDetails:d.N.subscribeToEventDetails,unsubscribeFromEventDetails:d.N.unsubscribeFromEventDetails,subscribeToEventScoreboard:d.N.subscribeToEventScoreboard,unsubscribeFromEventScoreboard:d.N.unsubscribeFromEventScoreboard,sendStreamStart:d.Zc.sendStreamStart,sendStreamEnd:d.Zc.sendStreamEnd,statisticsPush:d.Zc.statisticsPush,showLiveChat:d.Rb.showLiveChat},e)})),Object(a.branch)((function(e){var t=e.visualizationEnabledState,n=e.location;return!Object(u.Tc)(t,n)}),a.renderNothing),Object(a.withState)("showBar","setShowBar",!1),Object(a.withState)("error","setError",null),Object(a.withState)("spinner","setSpinner",!1),Object(a.withState)("soundMute","setSoundMute",at),Object(a.withState)("watchAndBetIframeUrl","setWatchAndBetIframeUrl",null),Object(a.withHandlers)($e),Object(a.withProps)((function(e){var t=e.onVizualization,n=e.minimized,r=e.showBar,i=e.eventId,a=e.location,o=e.eventDetails,d=e.event,m=e.performWidgetId,p=e.performMatchTracker,f=Object(c.matchPath)(a.pathname,{path:[s.hg.horseRacingSev,s.hg.greyhoundsSev,s.hg.sev],exact:!0}),h=f&&f.params.eventId!==i,g=!n&&r&&(!f||h),v=o.sportId===s.pb&&s.hg.horseRacingSev||o.sportId===s.jb&&s.hg.greyhoundsSev||s.hg.sev,b=Object(u.E)({pathname:v,rawParams:{sportName:d.get("categories",Object(l.OrderedSet)()).last(Object(l.Map)()).get("name"),categoryName:d.get("categories",Object(l.OrderedSet)()).first(Object(l.Map)()).get("name"),eventName:d.get("name")},preparedParams:{eventId:i}});return{onVizualizationAttributes:Ve({},u.Dd?"onTouchStart":"onClick",t),noSevOrAnotherSevPage:g,sevUrl:Object(c.matchPath)(a.pathname,{path:b})?null:b,provider:m&&p?s.ci.PERFORM_V2:e.videoProvider,providerEventId:m&&p?m:e.videoEventId}})),Object(a.lifecycle)(tt))(ze);t.default=ot}}]);