!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f6672d4d-1ec7-45c9-a5c4-f2592f107896",t._sentryDebugIdIdentifier="sentry-dbid-f6672d4d-1ec7-45c9-a5c4-f2592f107896")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7663],{970:(t,e,n)=>{n.d(e,{z:()=>M});var r=n(6029),i=n(21377),a=n(95083),s=n(76356),l=n(6695),o=n(59411),u=n(27956),c=n(14632),d=n(55729),h=n(90248),f=n(947),p=n(41735),m=n(8703),g=n(14395),x=n(19168),v=n(74843),y=n(65789),w=n(73022);let _=Object.assign({},u,c,l,o);function b(t){let{event:e}=t;return e.time&&!x.p2.includes(e.status.code)?(0,r.jsx)(w.lx,{time:e.time,status:e.status,hasMinuteBlinker:!0}):e.status.code===i.sum["Extra time halftime"]?(0,r.jsx)(h.A,{id:"extraTimeHalftime.short"}):e.status.code===i.sum["Awaiting penalties"]?(0,r.jsx)(h.A,{id:"awaitingPenalties.short"}):e.status.code===i.sum.Penalties||e.status.code===i.sum["Penalties alt."]?(0,r.jsx)(h.A,{id:"penalties"}):(0,r.jsx)(r.Fragment,{children:(0,m.Sw)(e)})}function M(t){var e;let{event:n}=t,l=(0,d.useRef)(null),o=(0,d.useRef)(null),{colors:u,typography:c,spacing:h,settings:m}=(0,p.useTheme)(),x=(0,f.A)(),w="rtl"===m.textDirection,M=n.status.type===i.XUj.InProgress;function A(){let t=l.current;if(!t)return;let e=_.select(t),r=t.getBoundingClientRect(),i=v.rj(n);if(i<0)return;let a=v.Ol(n);if(!a)return;let s=_.scaleLinear().domain([0,a]).range([0,r.width]),d=e.selectAll("rect").data([i]);d.enter().append("rect").merge(d).attr("fill",M?u.sofaSingles.live:u.secondary.default).attr("x",0).attr("y",0).transition().duration(200).ease(_.easeCubicInOut).attr("width",t=>s(t)).attr("height",2);let h=v.EX(n,x),f=e.selectAll("circle").data(h);f.exit().remove(),f.enter().append("circle").merge(f).attr("fill",u.surface.s1).attr("r",3).transition().duration(200).ease(_.easeCubicInOut).attr("stroke",t=>s(i)>=s(t.x)?M?u.sofaSingles.live:u.secondary.default:u.neutral.default).attr("stroke-width",2).attr("cx",t=>s(t.x)).attr("cy",1);let p=e.selectAll("text").data(h);if(p.exit().remove(),p.enter().append("text").merge(p).attr("font",c.family.sofascoreSans).attr("font-weight",c.weight.medium).attr("font-size",c.size.small).attr("text-anchor",t=>0===t.x?"start":"middle").transition().duration(200).ease(_.easeCubicInOut).attr("fill",u.neutral.default).attr("x",t=>t.x>0?s(t.x):-4).attr("transform",t=>w?"scale(-1,1) translate(-".concat(2*s(t.x),",0)"):"").attr("y",20).text(t=>t.label),o.current){let t=o.current.getBoundingClientRect().width;_.select(o.current).style("display","inline-block").transition().duration(200).ease(_.easeCubicInOut).style("transform",()=>{let e=s(i);return(e=e{if(n.status.type!==i.XUj.InProgress)return;A();let t=window.setInterval(()=>{A()},1e3);return()=>window.clearInterval(t)},[l.current,n.time,n.startTimestamp,u]),n.tournament.category.sport.slug===i.QCR.Football||(null==(e=n.time)?void 0:e.totalPeriodCount)&&n.time.periodLength)?n.status.type!==i.XUj.InProgress?(0,r.jsx)(g.n,{event:n}):(0,r.jsx)(y.Zp,{isInverseDesktop:!0,children:(0,r.jsxs)(s.az,{pt:"xs",h:"5xl",children:[(0,r.jsx)(a.Ym,{ref:o,textStyle:"assistive.default",color:"status.live",textAlign:"center",children:(0,r.jsx)(b,{event:n})}),(0,r.jsx)("svg",{ref:l,width:"calc(100% - 32px)",height:"2",style:{backgroundColor:u.onSurface.nLv4,display:"block",margin:"auto",marginTop:h.xs,overflow:"visible",transform:w?"scale(-1,1)":void 0}})]})}):null}},6695:(t,e,n)=>{n.r(e),n.d(e,{easeBack:()=>G,easeBackIn:()=>L,easeBackInOut:()=>G,easeBackOut:()=>O,easeBounce:()=>E,easeBounceIn:()=>P,easeBounceInOut:()=>B,easeBounceOut:()=>E,easeCircle:()=>b,easeCircleIn:()=>w,easeCircleInOut:()=>b,easeCircleOut:()=>_,easeCubic:()=>l.wq,easeCubicIn:()=>l.EY,easeCubicInOut:()=>l.wq,easeCubicOut:()=>l.Jx,easeElastic:()=>N,easeElasticIn:()=>Q,easeElasticInOut:()=>H,easeElasticOut:()=>N,easeExp:()=>y,easeExpIn:()=>x,easeExpInOut:()=>y,easeExpOut:()=>v,easeLinear:()=>r,easePoly:()=>c,easePolyIn:()=>o,easePolyInOut:()=>c,easePolyOut:()=>u,easeQuad:()=>s,easeQuadIn:()=>i,easeQuadInOut:()=>s,easeQuadOut:()=>a,easeSin:()=>m,easeSinIn:()=>f,easeSinInOut:()=>m,easeSinOut:()=>p});let r=t=>+t;function i(t){return t*t}function a(t){return t*(2-t)}function s(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var l=n(36729),o=function t(e){function n(t){return Math.pow(t,e)}return e*=1,n.exponent=t,n}(3),u=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e*=1,n.exponent=t,n}(3),c=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e*=1,n.exponent=t,n}(3),d=Math.PI,h=d/2;function f(t){return 1==+t?1:1-Math.cos(t*h)}function p(t){return Math.sin(t*h)}function m(t){return(1-Math.cos(d*t))/2}function g(t){return(Math.pow(2,-10*t)-9765625e-10)*1.0009775171065494}function x(t){return g(1-t)}function v(t){return 1-g(t)}function y(t){return((t*=2)<=1?g(1-t):2-g(t-1))/2}function w(t){return 1-Math.sqrt(1-t*t)}function _(t){return Math.sqrt(1- --t*t)}function b(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var M=4/11,A=6/11,C=8/11,j=3/4,$=9/11,I=10/11,T=15/16,z=21/22,S=63/64,k=1/(4/11)/(4/11);function P(t){return 1-E(1-t)}function E(t){return(t*=1){function r(t){return function(){return t}}n.d(e,{A:()=>h}),Array.prototype.slice;var i=n(88251);let a=Math.PI,s=2*a,l=s-1e-6;function o(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw Error(`invalid digits: ${t}`);if(e>15)return o;let n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e1e-6)if(Math.abs(d*o-u*c)>1e-6&&i){let f=n-s,p=r-l,m=o*o+u*u,g=Math.sqrt(m),x=Math.sqrt(h),v=i*Math.tan((a-Math.acos((m+h-(f*f+p*p))/(2*g*x)))/2),y=v/x,w=v/g;Math.abs(y-1)>1e-6&&this._append`L${t+y*c},${e+y*d}`,this._append`A${i},${i},0,0,${+(d*f>c*p)},${this._x1=t+w*o},${this._y1=e+w*u}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t*=1,e*=1,n*=1,o=!!o,n<0)throw Error(`negative radius: ${n}`);let u=n*Math.cos(r),c=n*Math.sin(r),d=t+u,h=e+c,f=1^o,p=o?r-i:i-r;null===this._x1?this._append`M${d},${h}`:(Math.abs(this._x1-d)>1e-6||Math.abs(this._y1-h)>1e-6)&&this._append`L${d},${h}`,n&&(p<0&&(p=p%s+s),p>l?this._append`A${n},${n},0,1,${f},${t-u},${e-c}A${n},${n},0,1,${f},${this._x1=d},${this._y1=h}`:p>1e-6&&this._append`A${n},${n},0,${+(p>=a)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n*=1}v${+r}h${-n}Z`}toString(){return this._}}function c(t){return t[0]}function d(t){return t[1]}function h(t,e){let n;var a=r(!0),s=null,l=i.A,o=null,h=(n=3,f.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return f},()=>new u(n));function f(n){var r,i,u,c,d=(n="object"==typeof(r=n)&&"length"in r?r:Array.from(r)).length,f=!1;for(null==s&&(o=l(c=h())),i=0;i<=d;++i)!(i{n.d(e,{GZ:()=>s,Jm:()=>l,bi:()=>a,ej:()=>r,gI:()=>i});let r=15,i=4,a=16,s=8,l={touchdown:{viewBox:"0 0 24 24",d:"M2.02 16.48c.17-3.83 1.67-7.33 4.37-10.11 2.77-2.68 6.25-4.18 10.09-4.35 1.53-.07 3.26 0 4.43.98l.1.1c.78.93 1.07 2.32.97 4.42-.17 3.84-1.67 7.33-4.37 10.11-2.77 2.68-6.25 4.18-10.08 4.35-1.54.06-3.26 0-4.43-.98l-.1-.1c-.69-.82-1-1.94-1-3.65 0-.25 0-.51.02-.78v.01zm4.32-.23 1.41 1.41 1.41-1.41 1.41 1.41 1.41-1.41-1.41-1.41 1.41-1.41 1.41 1.41 1.41-1.41-1.41-1.41 1.41-1.41 1.41 1.41 1.41-1.41-1.41-1.41 1.41-1.41-1.41-1.41-1.41 1.41-1.41-1.41-1.41 1.41 1.41 1.41-1.41 1.41-1.41-1.41-1.41 1.41 1.41 1.41-1.41 1.41-1.41-1.41-1.41 1.41 1.41 1.41-1.41 1.41z"},touchdownAndOnePoint:{viewBox:"0 0 16 16",d:"M7.008 12.577s.03-.08.08-.08h1.3v-1.46s.03-.08.08-.08h.82s.08.03.08.08v1.46h1.29s.08.03.08.08v.82s-.03.08-.08.08h-1.29v1.46s-.03.08-.08.08h-.82s-.08-.03-.08-.08v-1.46h-1.3s-.08-.03-.08-.08v-.82zm4.21 1.55s.03-.08.08-.08h1.3v-2.97h-1.3s-.08-.03-.08-.08v-.8s.03-.08.08-.08h.94c.22 0 .37-.11.37-.37v-.34s.03-.08.08-.08h.85s.08.03.08.08v4.65h1.28s.08.03.08.08v.8s-.03.08-.08.08h-3.6s-.08-.03-.08-.08v-.81zm-.71-12.57-.05-.05c-.47-.4-1.16-.54-2.21-.5-1.92.08-3.67.84-5.06 2.19a7.683 7.683 0 0 0-2.18 5.05c-.03.77 0 1.63.49 2.22l.05.05c.41.34.97.5 1.82.5h.39c1.92-.08 3.66-.84 5.05-2.19a7.637 7.637 0 0 0 2.18-5.04c.03-.77 0-1.63-.49-2.21l.01-.02zm-2.38 4.45-.71-.71-.71.71.71.71-.71.71-.71-.71-.71.71.71.71-.71.71-.71-.71-.53.53-.71-.71.53-.53-.71-.71.71-.71.71.71.71-.71-.71-.71.71-.71.71.71.71-.71-.71-.71.71-.71.71.71.53-.53.71.71-.53.53.71.71-.71.71z"},touchdownAndTwoPoint:{viewBox:"0 0 16 16",d:"M8.838 12.497v-1.46c0-.05-.03-.08-.08-.08h-.82c-.05 0-.08.03-.08.08v1.46h-1.3c-.05 0-.08.03-.08.08v.82c0 .05.03.08.08.08h1.3v1.46c0 .05.03.08.08.08h.82c.05 0 .08-.03.08-.08v-1.46h1.29c.05 0 .08-.03.08-.08v-.82c0-.05-.03-.08-.08-.08h-1.29zm6.09 1.55h-2.97v-.26c0-.23.04-.4.12-.52.08-.12.19-.21.35-.26.16-.06.36-.11.6-.16.38-.07.72-.18 1.01-.33.29-.15.51-.35.68-.6.16-.25.24-.57.24-.96 0-.36-.08-.67-.25-.93-.17-.26-.4-.45-.69-.58-.29-.13-.63-.2-1.02-.2-.63 0-1.13.16-1.49.49-.36.33-.57.78-.64 1.35-.01.05.01.08.07.08h.86s.08-.03.09-.08c.04-.28.14-.49.32-.65.18-.15.43-.23.76-.23.29 0 .52.07.68.22.16.15.24.33.24.56 0 .24-.07.45-.22.62-.15.17-.38.28-.7.33-.44.07-.82.18-1.13.32-.31.15-.54.35-.7.62-.16.27-.24.61-.24 1.04v1.03c0 .05.03.08.08.08h3.94c.05 0 .08-.03.08-.08v-.8c0-.05-.03-.08-.08-.08l.01-.02zm-4.42-12.49-.05-.05c-.47-.4-1.16-.54-2.21-.5-1.92.08-3.67.84-5.06 2.19a7.683 7.683 0 0 0-2.18 5.05c-.03.77 0 1.63.49 2.22l.05.05c.41.34.97.5 1.82.5h.39c1.92-.08 3.66-.84 5.05-2.19a7.637 7.637 0 0 0 2.18-5.04c.03-.77 0-1.63-.49-2.21l.01-.02zm-2.38 4.45-.71-.71-.71.71.71.71-.71.71-.71-.71-.71.71.71.71-.71.71-.71-.71-.53.53-.71-.71.53-.53-.71-.71.71-.71.71.71.71-.71-.71-.71.71-.71.71.71.71-.71-.71-.71.71-.71.71.71.53-.53.71.71-.53.53.71.71-.71.71z"},fieldGoal:{viewBox:"0 0 24 24",d:"M16.847 3v10.567H7.153V3H5v12.236h5.923V21h2.153v-5.764H19V3z"},safety:{viewBox:"0 0 24 24",d:"M10.54 8.75 9.12 13H7.54l1.92-5.75h1.79V2H10l-4.5 8 .5 7-3 5h6l2.25-4.5V8.75h-.71zM18 17l.5-7L14 2h-1.25v5.25h1.79L16.46 13h-1.58l-1.42-4.25h-.71v8.75L15 22h6l-3-5z"},rouge:{viewBox:"0 0 24 24",d:"m2 12.607 1.414 1.414L14.021 3.414 12.607 2 2 12.607zM21.26 8.79l-.07-.07c-.82-.68-2.03-.73-3.1-.68-2.68.12-5.12 1.17-7.06 3.05-1.89 1.95-2.94 4.39-3.06 7.07 0 .19-.01.37-.01.54 0 1.19.22 1.98.7 2.55l.07.07c.82.68 2.03.73 3.1.68 2.68-.12 5.12-1.17 7.06-3.05 1.89-1.95 2.94-4.39 3.06-7.08.07-1.47-.13-2.44-.68-3.1l-.01.02zm-2.49 5.47-.76.76-1.14-1.14-1.14 1.14 1.14 1.14-.76.76-1.14-1.14-1.14 1.14 1.14 1.14-.76.76-1.14-1.14-1.14 1.14-.76-.76 1.14-1.14-1.14-1.14.76-.76 1.14 1.14 1.14-1.14-1.14-1.14.76-.76 1.14 1.14 1.14-1.14-1.14-1.14.76-.76 1.14 1.14 1.14-1.14.76.76-1.14 1.14 1.14 1.14z"}}},35576:(t,e,n)=>{n.d(e,{Ao:()=>s,B4:()=>l,aJ:()=>i,lG:()=>r,oQ:()=>a});let r=80,i=440,a=10,s=5,l=300},51021:(t,e,n)=>{n.d(e,{q:()=>r});var r=function(t){return t[t.OT=-1]="OT",t[t.All=0]="All",t[t.Q1=1]="Q1",t[t.Q2=2]="Q2",t[t.Q3=3]="Q3",t[t.Q4=4]="Q4",t}({})},51953:(t,e,n)=>{n.d(e,{D:()=>S,A:()=>k});var r=n(6029),i=n(33144),a=n(21377),s=n(4967),l=n(21501),o=n(41249),u=n(36729),c=n(28446),d=n(56591),h=n(10533),f=n(14632),p=n(55729),m=n(947),g=n(41735),x=n(65789),v=n(62859),y=n(71046),w=n(35576);function _(t){return t[t.length-1]}let b=g.default.div.withConfig({componentId:"sc-22d5b459-0"})(["position:absolute;height:","px;display:flex;align-items:center;flex-direction:column;justify-content:space-around;width:32px;> img{width:80%;}"],w.lG),M=g.default.svg.withConfig({componentId:"sc-22d5b459-1"})(["cursor:pointer;position:relative;overflow:visible;height:","px;width:100%;user-select:none;-webkit-tap-highlight-color:transparent;::after{content:'';display:block;width:100%;position:absolute;top:40px;left:0;height:1px;background-color:red;}.midLine,.periodLine,.currentMinuteLine{shape-rendering:crispEdges;}"],w.lG);var A=n(86933),C=n(93510),j=n(51021),$=n(14269);function I(){var t;let{activeWPTab:e,overtimeLength:n,periodCount:i,periodTime:a,incidents:s}=(0,p.useContext)(C.v),o=(0,g.useTheme)(),u=(0,p.useRef)(null);return(0,l.st)(function(){var t;if(!(null==s?void 0:s.length))return;let r=null==(t=u.current)?void 0:t.parentElement;if((0,d.A)(u.current).selectAll("*").remove(),r&&e!==j.q.All){let t=r.getBoundingClientRect(),l=function(t,e,n,r,i,a){if(!t||!t.length)return[];let s=i===j.q.OT,l=t.map(e=>{let{incidentClass:n,time:r,isHome:i}=e;if("touchdown"===n){let a=n;t.some(t=>(a="extraPoint"===t.incidentClass?"touchdownAndOnePoint":"touchdownAndTwoPoint",t.time===r&&t.isHome===i&&("twoPointConversion"===t.incidentClass||"extraPoint"===t.incidentClass)))&&(e.incidentClass=a)}return e}),o=[];return l.forEach(t=>{if(!t.incidentClass||!t.time||!$.Jm[t.incidentClass])return;let l=s?r*n:(i-1)*r;if(t.time>(s?r*n+a:i*r)||t.time<=l)return;let u=(t.time-l)/(s?a:r)*e-$.bi;o.push({incidentClass:t.incidentClass,isHome:!!t.isHome,x:u})}),o}(s,t.width,i,a,e,n);(0,d.A)(r).select("g.wp-incident-group").selectAll("svg").data(l,t=>"".concat(t.x,"-").concat(t.incidentClass,"-").concat(t.isHome)).enter().append("svg").attr("width",$.bi).attr("height",$.bi).attr("viewBox",t=>$.Jm[t.incidentClass].viewBox).style("fill",t=>t.isHome?o.colors.secondary.default:o.colors.primary.default).attr("x",t=>t.x).attr("y",e=>e.isHome?-$.GZ-$.bi:t.height+$.GZ).append("path").attr("d",t=>$.Jm[t.incidentClass].d)}},100,[null==(t=u.current)?void 0:t.parentElement]),(0,r.jsx)("g",{className:"wp-incident-group","data-testid":"wp-incident-group",ref:u})}let T=[a.QCR.Basketball,a.QCR.Handball,a.QCR.AmericanFootball],z=t=>{let e=t.find(t=>0===t.minute),n=[{key:-1,points:[{minute:-.5,value:0},{minute:0,value:(null==e?void 0:e.value)||0}]}];return t.forEach((t,e,r)=>{let i=_(n),a=r[e+1];if(t.minute>0&&i.points.push(t),!a)return void i.points.push({minute:t.minute,value:0});t.value*a.value<0&&i.points.push({minute:function(t,e,n,r){return n-Math.abs(r)*(n-t)/(Math.abs(r)+Math.abs(e))||0}(t.minute,t.value,a.minute,a.value),value:0});let s=_(i.points);0===s.value&&n.push({key:Math.floor(s.minute),points:[s]})}),n};function S(t){let{event:e,graphPoints:n,periodCount:x,periodTime:A,overtimeLength:$,max:S,...k}=t,{colors:P,typography:E,settings:B}=(0,g.useTheme)(),{location:L}=(0,p.useContext)(v.y$),O=L===v.cb.Widget,G=(0,m.A)(),R=(0,p.useRef)(null),Q=(0,p.useRef)({x:(0,c.A)().range([0,w.aJ]),y:(0,c.A)().range([w.lG,0])}),N=(0,p.useRef)(0),H=(0,p.useRef)(w.aJ),{activeWPTab:X,isWinProbability:q}=(0,p.useContext)(C.v),D="rtl"===B.textDirection,U=()=>(0,f.transition)().duration(N.current>0?w.B4:0).ease(u.wq);function J(){let t;if(k.duration)t=k.duration;else for(t=A*x;n.length>t;)t+=5;return t}return(0,p.useLayoutEffect)(()=>{(0,d.A)(R.current).style("opacity",.01).transition(U().duration(400)).style("opacity",1)},[]),(0,l.st)(function(){!function(){var t;let e=null==(t=R.current)?void 0:t.getBoundingClientRect().width;e&&e!==H.current&&(H.current=e,Q.current.x.range([0,e]),(0,d.A)(R.current).attr("width",e))}(),function(){let t=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.oQ,n=Number.MIN_SAFE_INTEGER;return t.forEach(t=>{n=Math.max(Math.abs(t.value),n)}),Math.max(n,e)}(n,S),r=z(n),i=J();Q.current.x.domain([0,i]),Q.current.y.domain([-t,t]),function(t){let n=[{fill:P.surface.s1,height:w.lG,y:0},{fill:P.primary.highlight,height:w.lG/2,y:w.lG/2},{fill:P.secondary.highlight,height:w.lG/2,y:0}],r=e.status.type===a.XUj.InProgress,i=(0,d.A)(R.current).select("g.background-group").selectAll("rect").data(n);i.enter().append("rect").merge(i).attr("fill",t=>t.fill).attr("height",t=>t.height).attr("y",t=>t.y).attr("x",0).transition(U().duration(r?w.B4:0)).attr("width",()=>Q.current.x(_(t).minute))}(_(r).points),function(t,n){let r=(0,h.A)().x(t=>Q.current.x(t.minute)).y(t=>Q.current.y(t.value)),i=(0,d.A)(R.current).select("g.score-group").selectAll("path").data(t,t=>"".concat(e.id,"-").concat(t.key));i.exit().transition(U().duration(300)).attr("stroke","transparent").attr("d",t=>r(t.points.map(t=>({...t,value:0})))).remove(),n&&i.transition(U().duration(200)).attr("stroke","transparent").attr("d",t=>r(t.points.map(t=>({...t,value:0}))));let a=i.enter().append("path").merge(i).attr("fill",t=>{let{points:e}=t;return e.reduce((t,e)=>e.value<0?P.primary.default:t,P.secondary.default)});n?a.attr("stroke","transparent").attr("d",t=>r(t.points.map(t=>({...t,value:0})))).transition(U().delay(400).duration(200)).attr("d",t=>r(t.points)):a.transition(U().delay(300).duration(300)).attr("d",t=>r(t.points))}(r,!1),function(t,n){let r=e.tournament.category.sport.slug,i=null!=$?$:0,s=e.status.type===a.XUj.InProgress,l=[];if(2===x&&r===a.QCR.Basketball){let t=Q.current.x(A);l.push({x1:t,x2:t,y1:0,y2:w.lG})}else for(let t=1;tA*x&&T.includes(r)&&i>0){let e=(t-A*x)/i;for(let t=0;t<=e;t++){let e=Q.current.x(A*x+t*i);l.push({x1:e,x2:e,y1:0,y2:w.lG})}}l.push(o);let u=Q.current.x(_(n).minute),c=[{x1:u,x2:u,y1:0,y2:w.lG}],h=(0,d.A)(R.current),f=h.select("g.line-group").selectAll(".periodLine").data(l);f.exit().remove(),f.enter().append("line").merge(f).attr("class","periodLine").attr("stroke",(t,e,n)=>O&&e===n.length-1?"none":P.surface.s1).attr("y1",t=>t.y1).attr("y2",t=>t.y2).attr("x1",t=>t.x1).attr("x2",t=>t.x2);let p=h.select("g.line-group").selectAll(".currentMinuteLine").data(c);p.enter().append("line").merge(p).attr("class","currentMinuteLine").attr("stroke",s?P.sofaSingles.live:P.surface.s1).attr("y1",t=>t.y1).attr("y2",t=>t.y2).transition(U().duration(s?w.B4:0)).attr("x1",t=>t.x1).attr("x2",t=>t.x2).attr("clip-path",t=>t.x2>=H.current?"url(#round-corner)":"");let m=h.select("g.line-group").selectAll("circle.start").data([{}]),g=h.select("g.line-group").selectAll("circle.live").data(c);s?(m.enter().append("circle").attr("cy",80).attr("r",3).attr("cx",1).attr("stroke",P.secondary.default).attr("stroke-width",2).attr("fill",P.surface.s1).attr("class","start"),g.enter().append("circle").attr("cy",0).attr("r",0).attr("cx",t=>t.x1).attr("stroke",P.sofaSingles.live).attr("stroke-width",2).attr("fill",P.surface.s1).attr("class","live").attr("r",3),g.merge(g).attr("r",3).transition(U().duration(s?w.B4:0)).attr("cx",t=>t.x1)):(m.remove(),g.remove())}(i,_(r).points),function(t){if(!R.current)return;let e=R.current.getBoundingClientRect(),n=(0,d.A)(R.current).select("g.info-group").selectAll("text").data([{text:q?"100":t,x:H.current+4,y:12},{text:q?"100":t,x:H.current+4,y:w.lG-4},{text:q?"50":"0",x:H.current+4,y:w.lG/2+4},...q?[{text:"%",x:H.current+4,y:-8}]:[]]);n.enter().append("text").merge(n).attr("x",t=>t.x).attr("y",t=>t.y).classed("graph-info-element",!0).attr("fill",P.onSurface.nLv3).attr("font-family",E.family.sofascoreSans).attr("font-weight",E.weight.regular).attr("text-anchor","start").attr("transform",D?"scale(-1,1) translate(-".concat(2*e.width+8,")"):"").attr("font-size",12).text(t=>t.text)}(t),q?function(){let t=R.current,r=(0,d.A)(t);if(!t||!q||X!==j.q.All)return;r.select("g.time-group").selectAll("g.legend-group").remove();let i=r.select("g.time-group").append("g").attr("class","legend-group"),s=J(),l=e.status,o=n.length,u=A*x,c=l.type===a.XUj.InProgress;i.append("text").attr("font-size",E.size.small).attr("font-family",E.family.sofascoreSans).attr("font-weight",E.weight.medium).style("fill",P.onSurface.nLv3).attr("x",0).attr("y",-8).attr("text-anchor","start").text(G.formatMessage({id:"am_football_view_incidents"})),Array.from({length:x},(t,e)=>e).forEach(t=>{let e=A*t,n=A*(t+1);i.append("text").attr("font-size",E.size.small).attr("font-family",E.family.sofascoreSans).attr("font-weight",E.weight.medium).style("fill",c&&o>e&&o<=n?P.sofaSingles.live:P.onSurface.nLv3).attr("x",Q.current.x(e+A/2)).attr("y",w.lG+16).attr("text-anchor","middle").attr("data-testid","legend-label-".concat(t+1)).text(G.formatMessage({id:"qN"},{n:t+1}))}),s>u&&i.append("text").attr("font-size",E.size.small).attr("font-family",E.family.sofascoreSans).attr("font-weight",E.weight.medium).style("fill",c&&o>u?P.sofaSingles.live:P.onSurface.nLv3).attr("x",Q.current.x(u+(s-u)/2)).attr("y",w.lG+16).attr("text-anchor","middle").text(G.formatMessage({id:"overtime.short"}))}():function(){let t=e.status,n=J(),r=R.current,i=(0,d.A)(r);if(!t||!r)return;let l=r.getBoundingClientRect(),o=t.type===a.XUj.InProgress,u=t.code===a.sum.AET,c=n>A*x,h=t.type===a.XUj.Finished,f=t.type===a.XUj.InProgress;i.select("g.time-group").selectAll("g.legend-group").remove();let p=i.select("g.time-group").append("g").attr("class","legend-group");p.append("text").style("fill",h?P.onSurface.nLv3:P.secondary.default).attr("font",E.family.sofascoreSans).attr("font-weight",E.weight.medium).attr("font-size",E.size.small).attr("x",-2).attr("transform",D?"scale(-1,1)":"").attr("y",w.lG+16).text(()=>o?G.formatTime(1e3*e.startTimestamp):(0,s.cK)(1e3*e.startTimestamp)?"".concat(G.formatMessage({id:"today"})," ").concat(G.formatTime(1e3*e.startTimestamp)):G.formatDate(1e3*e.startTimestamp,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"numeric"})),p.append("text").attr("font-size",E.size.small).attr("font-family",E.family.sofascoreSans).attr("font-weight",E.weight.medium).style("fill",P.onSurface.nLv3).attr("transform",D?"scale(-1,1) translate(-".concat(2*l.width,")"):"").attr("x",l.width).attr("text-anchor","end").text(u||c?G.formatMessage({id:"after_extra_time_short"}):G.formatMessage({id:"full_time_short"})),f&&c&&p.append("text").attr("font-size",E.size.small).attr("font-family",E.family.sofascoreSans).attr("font-weight",E.weight.medium).style("fill",P.onSurface.nLv3).attr("x",Q.current.x(A*x)).attr("transform",D?"scale(-1,1) translate(-".concat(2*Q.current.x(A*x),")"):"").attr("text-anchor","middle").text(G.formatMessage({id:"overtime.short"})),p.selectAll("text").attr("y",96)}(),function(t){let{status:n}=e,r=R.current,i=(0,d.A)(r),s=null==r?void 0:r.getBoundingClientRect();if(!s||q)return;let l=n.type===a.XUj.InProgress,o=(0,y.Sw)(e)||(null==n?void 0:n.description)||"";if(l){let e=i.select("g.time-group").selectAll("text.timer").data([{x:Q.current.x(_(t).minute)}]);e.enter().append("text").classed("timer",!0).style("fill",P.sofaSingles.live).attr("font-weight",E.weight.bold).attr("font-size",E.size.regular).merge(e).transition(U().duration(l?w.B4:0)).attr("x",t=>t.x).attr("transform",t=>D?"scale(-1,1) translate(-".concat(2*t.x,")"):"").attr("y",-8).text(o).attr("text-anchor",t=>t.xs.width-s.width/8?"end":"middle")}}(_(r).points),N.current=i}()},100,[e.status.type,n,x,A,S,k.duration,P]),(0,r.jsx)(o.az,{bg:"onSurface.nLv5",children:(0,r.jsxs)(M,{width:w.aJ,height:w.lG,ref:R,transform:D?"scale(-1,1)":void 0,children:[(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clamp-lines",children:(0,r.jsx)("rect",{x:"0",y:"-2",width:"100%",height:"84"})})}),(0,r.jsxs)(b,{className:"graph-info-element",children:[(0,r.jsx)(i.p,{id:k.leftTeam.id,size:24,name:k.leftTeam.name}),(0,r.jsx)(i.p,{id:k.rightTeam.id,size:24,name:k.rightTeam.name})]}),(0,r.jsx)("g",{className:"background-group"}),(0,r.jsx)("g",{className:"score-group",clipPath:"url(#clamp-lines)"}),(0,r.jsx)("g",{className:"line-group"}),(0,r.jsx)("g",{className:"time-group"}),(0,r.jsx)("g",{className:"periods-group"}),(0,r.jsx)("g",{className:"info-group"}),q&&(0,r.jsx)(I,{})]})})}function k(t){let{isCard:e=!0,...n}=t,[i,a]=(0,p.useState)(!1);return(0,r.jsx)(x.HH,{isCard:e,isInverseDesktop:!0,children:(0,r.jsx)(o.az,{px:"sm",children:(0,r.jsx)(o.az,{h:"136",py:"28",pr:"20",children:(0,r.jsxs)(o.az,{position:"relative",onClick:()=>a(!i),children:[(0,r.jsx)(S,{...n}),(0,r.jsx)(o.az,{position:"absolute",top:"0",left:"-4",children:(0,r.jsx)(A.S,{isOpen:i,leftTeamId:n.leftTeam.id,leftTeamName:n.leftTeam.name,rightTeamId:n.rightTeam.id,rightTeamName:n.rightTeam.name})})]})})})})}},66986:(t,e,n)=>{n.r(e),n.d(e,{default:()=>f});var r=n(6029),i=n(21377),a=n(55729),s=n(62859),l=n(970),o=n(35576),u=n(51953),c=n(5108),d=n(73324);let h=t=>{let{isCard:e}=t,{event:n,leftTeam:h,rightTeam:f}=(0,a.useContext)(s.y$),{graphPoints:p,error:m,periodCount:g,periodTime:x,overtimeLength:v}=(0,d._)(n);return m?(0,r.jsx)(l.z,{event:n}):p?(0,r.jsx)(u.A,{event:n,leftTeam:h,rightTeam:f,periodCount:g||4,periodTime:x||10,overtimeLength:v,graphPoints:p,isCard:e,max:n.tournament.category.sport.slug===i.QCR.Handball?o.Ao:void 0}):(0,r.jsx)(c.W,{})},f=function(t){let{children:e,isCard:n=!0}=t,{event:l}=(0,a.useContext)(s.y$);return l.tournament.category.sport.slug===i.QCR.AmericanFootball?(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)(h,{isCard:n})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h,{isCard:n}),e]})}},73324:(t,e,n)=>{n.d(e,{_:()=>l});var r=n(21377),i=n(45860),a=n(65078),s=n(71046);function l(t,e){let n=e?r.bnp.graphDataWinProbability(t.id):r.bnp.graphData(t.id),l=(0,s.rf)(t),o=(0,a.g3)(),{data:u,error:c}=(0,i.Ay)(n,l);return{graphPoints:o?null==u?void 0:u.graphPoints.map(t=>({...t,value:-1*t.value})):null==u?void 0:u.graphPoints,error:c,periodCount:null==u?void 0:u.periodCount,periodTime:null==u?void 0:u.periodTime,overtimeLength:null==u?void 0:u.overtimeLength}}},75394:(t,e,n)=>{n.d(e,{A:()=>r});function r(t){let e;for(;e=t.sourceEvent;)t=e;return t}},86244:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(75394);function i(t,e){if(t=(0,r.A)(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}}return[t.pageX,t.pageY]}},86933:(t,e,n)=>{n.d(e,{S:()=>u});var r=n(6029),i=n(33144),a=n(41735),s=n(19168);let l=a.default.div.withConfig({componentId:"sc-c1e8b62e-0"})(["position:relative;::before{content:'';position:absolute;top:-4px;left:",";right:",";width:112px;height:88px;background-image:",";}pointer-events:none;opacity:",";transition:opacity 0.16s ease-in;"],(0,s.UR)("0","unset"),(0,s.UR)("unset","0"),t=>"linear-gradient(to ".concat("rtl"===t.theme.settings.textDirection?"right":"left",", ").concat(t.theme.setAlpha(t.theme.colors.surface.s1,0),", ").concat(t.theme.colors.surface.s1,");"),t=>t.isOpen?1:1e-4),o=a.default.div.withConfig({componentId:"sc-c1e8b62e-1"})(["position:absolute;width:100%;top:-4px;height:88px;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-around;user-select:none;padding:2px 6px;"]),u=t=>{let{leftTeamId:e,leftTeamName:n,rightTeamId:a,rightTeamName:s,isOpen:u}=t;return(0,r.jsx)(l,{isOpen:u,children:(0,r.jsxs)(o,{children:[(0,r.jsx)(i.p,{id:e,size:24,name:n}),(0,r.jsx)(i.p,{id:a,size:24,name:s})]})})}},88251:(t,e,n)=>{function r(t){this._context=t}function i(t){return new r(t)}n.d(e,{A:()=>i}),r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}}},93510:(t,e,n)=>{n.d(e,{v:()=>r});let r=(0,n(55729).createContext)({})}}]);