!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]="6d1d4a35-03ed-48e6-b0fe-7d05109b6b91",t._sentryDebugIdIdentifier="sentry-dbid-6d1d4a35-03ed-48e6-b0fe-7d05109b6b91")}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 j(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 b(){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;b();let t=window.setInterval(()=>{b()},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)(j,{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:()=>O,easeBackInOut:()=>G,easeBackOut:()=>L,easeBounce:()=>E,easeBounceIn:()=>k,easeBounceInOut:()=>B,easeBounceOut:()=>E,easeCircle:()=>j,easeCircleIn:()=>w,easeCircleInOut:()=>j,easeCircleOut:()=>_,easeCubic:()=>l.wq,easeCubicIn:()=>l.EY,easeCubicInOut:()=>l.wq,easeCubicOut:()=>l.Jx,easeElastic:()=>Q,easeElasticIn:()=>X,easeElasticInOut:()=>N,easeElasticOut:()=>Q,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 j(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var M=4/11,b=6/11,A=8/11,C=3/4,$=9/11,I=10/11,T=15/16,z=21/22,S=63/64,P=1/(4/11)/(4/11);function k(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"}}},27704:(t,e,n)=>{n.d(e,{AM:()=>l,Dg:()=>u,aO:()=>s,lj:()=>o});var r=n(21377),i=n(28446),a=n(35576);function s(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.oQ,n=Number.MIN_SAFE_INTEGER;return t.forEach(t=>{n=Math.max(Math.abs(t.value),n)}),Math.max(n,e)}function l(t,e,n,r){return n-Math.abs(r)*(n-t)/(Math.abs(r)+Math.abs(e))||0}function o(t){return t[t.length-1]}function u(t,e){let{homeScore:n,awayScore:a,status:s,time:l}=t,o=[{minute:0,value:0}],u=1,c=0,d=0,h=0;for(let t=e.length-1;t>=0;t--){let r=e[t];"goal"===r.incidentType?(o.push({minute:u++,value:r.homeScore-r.awayScore}),r.time&&r.time>h&&(h=r.time)):"period"===r.incidentType&&("HT"===r.text?c=(n.period1||0)+(a.period1||0):"FT"===r.text&&(d=(n.normaltime||0)+(a.normaltime||0)))}let f=o.length;if(s.type===r.XUj.Finished&&(f<=10||0===c||0===d||d===c)||!l||s.type===r.XUj.InProgress&&!l.played||s.type===r.XUj.InProgress&&1===f)return null;let p=d>0&&f>d+1,m=t=>(e,n)=>{let i=t(e.minute)||0,a=n===f-1,l=s.type===r.XUj.InProgress&&a?0:.25;return[{value:e.value,minute:i-l},{value:e.value,minute:i+l}]},g=c,x=30,v=d+1,y=d,w=60;if(s.type===r.XUj.InProgress){let t=Math.max(Math.ceil((l.played||0)/60),h);v=f+1,y=f,w=t,0===c&&(g=f,g=x=w)}let _=o.slice(0,g+1).flatMap(m((0,i.A)().domain([0,g]).range([0,x]).clamp(!0))),j=[];c>0&&(j=o.slice(c+1,v).flatMap(m((0,i.A)().domain([c,y]).range([30,w]).clamp(!0))));let M=[];return p&&(M=o.slice(d+1).flatMap(m((0,i.A)().domain([d,f-1]).range([60,70])))),{graphPoints:[..._,...j,...M],periodTime:30,duration:p?70:60}}},35576:(t,e,n)=>{n.d(e,{B4:()=>s,aJ:()=>i,lG:()=>r,oQ:()=>a});let r=80,i=440,a=10,s=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}({})},66986:(t,e,n)=>{n.r(e),n.d(e,{default:()=>x});var r=n(6029),i=n(21377),a=n(55729),s=n(45860),l=n(62859),o=n(970),u=n(95519),c=n(27704),d=n(97341),h=n(5108),f=n(71046),p=n(73324);function m(){let{event:t,leftScore:e,rightScore:n,leftTeam:p,rightTeam:m}=(0,a.useContext)(l.y$),g=(0,u.c)(t),{data:x,isLoading:v}=(0,s.Ay)(i.bnp.incidents(t.id),(0,f.rf)(t)),y=(0,a.useMemo)(()=>x&&t.time&&(t.status.type!==i.XUj.Finished||g||!(x.incidents.length<(e.normaltime||0)+(n.normaltime||0)))?(0,c.Dg)(t,x.incidents):null,[t.id,t.status.type,null==x?void 0:x.incidents,t.time,g]);return y||v?y?(0,r.jsx)(d.A,{event:t,leftTeam:p,rightTeam:m,max:5,periodCount:2,...y,isCard:!0}):(0,r.jsx)(h.W,{}):(0,r.jsx)(o.z,{event:t})}let g=t=>{let{isCard:e}=t,{event:n,leftTeam:i,rightTeam:s}=(0,a.useContext)(l.y$),{graphPoints:u,error:c,periodCount:f,periodTime:m}=(0,p._)(n);return c?(0,r.jsx)(o.z,{event:n}):u?(0,r.jsx)(d.A,{event:n,leftTeam:i,rightTeam:s,periodCount:f||4,periodTime:m||10,graphPoints:u,isCard:e}):(0,r.jsx)(h.W,{})},x=function(t){let{children:e,isCard:n=!0}=t,{event:s}=(0,a.useContext)(l.y$),o=s.tournament.category.sport.slug,u=o===i.QCR.Handball,c=o===i.QCR.AmericanFootball;return u?(0,r.jsx)(m,{}):c?(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)(g,{isCard:n})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(g,{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}}},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)({})},97341:(t,e,n)=>{n.d(e,{D:()=>z,A:()=>S});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),_=n(27704);let j=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 b=n(86933),A=n(93510),C=n(51021),$=n(14269);function I(){var t;let{activeWPTab:e,overtimeLength:n,periodCount:i,periodTime:a,incidents:s}=(0,p.useContext)(A.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!==C.q.All){let t=r.getBoundingClientRect(),l=function(t,e,n,r,i,a){if(!t||!t.length)return[];let s=i===C.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=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=(0,_.lj)(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:(0,_.AM)(t.minute,t.value,a.minute,a.value),value:0});let s=(0,_.lj)(i.points);0===s.value&&n.push({key:Math.floor(s.minute),points:[s]})}),n};function z(t){let{event:e,graphPoints:n,periodCount:x,periodTime:b,max:$,...z}=t,{colors:S,typography:P,settings:k}=(0,g.useTheme)(),{location:E}=(0,p.useContext)(v.y$),B=E===v.cb.Widget,O=(0,m.A)(),L=(0,p.useRef)(null),G=(0,p.useRef)({x:(0,c.A)().range([0,w.aJ]),y:(0,c.A)().range([w.lG,0])}),R=(0,p.useRef)(0),X=(0,p.useRef)(w.aJ),{activeWPTab:Q,isWinProbability:N}=(0,p.useContext)(A.v),U="rtl"===k.textDirection,H=()=>(0,f.transition)().duration(R.current>0?w.B4:0).ease(u.wq);function q(){let t;if(z.duration)t=z.duration;else for(t=b*x;n.length>t;)t+=5;return t}return(0,p.useLayoutEffect)(()=>{(0,d.A)(L.current).style("opacity",.01).transition(H().duration(400)).style("opacity",1)},[]),(0,l.st)(function(){!function(){var t;let e=null==(t=L.current)?void 0:t.getBoundingClientRect().width;e&&e!==X.current&&(X.current=e,G.current.x.range([0,e]),(0,d.A)(L.current).attr("width",e))}(),function(){let t=(0,_.aO)(n,$),r=T(n),i=q();G.current.x.domain([0,i]),G.current.y.domain([-t,t]),function(t){let n=[{fill:S.surface.s1,height:w.lG,y:0},{fill:S.primary.highlight,height:w.lG/2,y:w.lG/2},{fill:S.secondary.highlight,height:w.lG/2,y:0}],r=e.status.type===a.XUj.InProgress,i=(0,d.A)(L.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(H().duration(r?w.B4:0)).attr("width",()=>G.current.x((0,_.lj)(t).minute))}((0,_.lj)(r).points),function(t,n){let r=(0,h.A)().x(t=>G.current.x(t.minute)).y(t=>G.current.y(t.value)),i=(0,d.A)(L.current).select("g.score-group").selectAll("path").data(t,t=>"".concat(e.id,"-").concat(t.key));i.exit().transition(H().duration(300)).attr("stroke","transparent").attr("d",t=>r(t.points.map(t=>({...t,value:0})))).remove(),n&&i.transition(H().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?S.primary.default:t,S.secondary.default)});n?a.attr("stroke","transparent").attr("d",t=>r(t.points.map(t=>({...t,value:0})))).transition(H().delay(400).duration(200)).attr("d",t=>r(t.points)):a.transition(H().delay(300).duration(300)).attr("d",t=>r(t.points))}(r,!1),function(t,n){var r,i;let s=e.tournament.category.sport.slug,l=(null==(r=e.time)?void 0:r.overtimeLength)?(null==(i=e.time)?void 0:i.overtimeLength)/60:0,o=e.status.type===a.XUj.InProgress,u=[];if(2===x&&s===a.QCR.Basketball){let t=G.current.x(b);u.push({x1:t,x2:t,y1:0,y2:w.lG})}else for(let t=1;tb*x&&s===a.QCR.Basketball&&l>0){let e=(t-b*x)/l;for(let t=0;t<=e;t++){let e=G.current.x(b*x+t*l);u.push({x1:e,x2:e,y1:0,y2:w.lG})}}u.push(c);let h=G.current.x((0,_.lj)(n).minute),f=[{x1:h,x2:h,y1:0,y2:w.lG}],p=(0,d.A)(L.current),m=p.select("g.line-group").selectAll(".periodLine").data(u);m.exit().remove(),m.enter().append("line").merge(m).attr("class","periodLine").attr("stroke",(t,e,n)=>B&&e===n.length-1?"none":S.surface.s1).attr("y1",t=>t.y1).attr("y2",t=>t.y2).attr("x1",t=>t.x1).attr("x2",t=>t.x2);let g=p.select("g.line-group").selectAll(".currentMinuteLine").data(f);g.enter().append("line").merge(g).attr("class","currentMinuteLine").attr("stroke",o?S.sofaSingles.live:S.surface.s1).attr("y1",t=>t.y1).attr("y2",t=>t.y2).transition(H().duration(o?w.B4:0)).attr("x1",t=>t.x1).attr("x2",t=>t.x2).attr("clip-path",t=>t.x2>=X.current?"url(#round-corner)":"");let v=p.select("g.line-group").selectAll("circle.start").data([{}]),y=p.select("g.line-group").selectAll("circle.live").data(f);o?(v.enter().append("circle").attr("cy",80).attr("r",3).attr("cx",1).attr("stroke",S.secondary.default).attr("stroke-width",2).attr("fill",S.surface.s1).attr("class","start"),y.enter().append("circle").attr("cy",0).attr("r",0).attr("cx",t=>t.x1).attr("stroke",S.sofaSingles.live).attr("stroke-width",2).attr("fill",S.surface.s1).attr("class","live").attr("r",3),y.merge(y).attr("r",3).transition(H().duration(o?w.B4:0)).attr("cx",t=>t.x1)):(v.remove(),y.remove())}(i,(0,_.lj)(r).points),function(t){if(!L.current)return;let e=L.current.getBoundingClientRect(),n=(0,d.A)(L.current).select("g.info-group").selectAll("text").data([{text:N?"100":t,x:X.current+4,y:12},{text:N?"100":t,x:X.current+4,y:w.lG-4},{text:N?"50":"0",x:X.current+4,y:w.lG/2+4},...N?[{text:"%",x:X.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",S.onSurface.nLv3).attr("font-family",P.family.sofascoreSans).attr("font-weight",P.weight.regular).attr("text-anchor","start").attr("transform",U?"scale(-1,1) translate(-".concat(2*e.width+8,")"):"").attr("font-size",12).text(t=>t.text)}(t),N?function(){let t=L.current,r=(0,d.A)(t);if(!t||!N||Q!==C.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=q(),l=e.status,o=n.length,u=b*x,c=l.type===a.XUj.InProgress;i.append("text").attr("font-size",P.size.small).attr("font-family",P.family.sofascoreSans).attr("font-weight",P.weight.medium).style("fill",S.onSurface.nLv3).attr("x",0).attr("y",-8).attr("text-anchor","start").text(O.formatMessage({id:"am_football_view_incidents"})),Array.from({length:x},(t,e)=>e).forEach(t=>{let e=b*t,n=b*(t+1);i.append("text").attr("font-size",P.size.small).attr("font-family",P.family.sofascoreSans).attr("font-weight",P.weight.medium).style("fill",c&&o>e&&o<=n?S.sofaSingles.live:S.onSurface.nLv3).attr("x",G.current.x(e+b/2)).attr("y",w.lG+16).attr("text-anchor","middle").attr("data-testid","legend-label-".concat(t+1)).text(O.formatMessage({id:"qN"},{n:t+1}))}),s>u&&i.append("text").attr("font-size",P.size.small).attr("font-family",P.family.sofascoreSans).attr("font-weight",P.weight.medium).style("fill",c&&o>u?S.sofaSingles.live:S.onSurface.nLv3).attr("x",G.current.x(u+(s-u)/2)).attr("y",w.lG+16).attr("text-anchor","middle").text(O.formatMessage({id:"overtime.short"}))}():function(){let t=e.status,n=q(),r=L.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>b*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?S.onSurface.nLv3:S.secondary.default).attr("font",P.family.sofascoreSans).attr("font-weight",P.weight.medium).attr("font-size",P.size.small).attr("x",-2).attr("transform",U?"scale(-1,1)":"").attr("y",w.lG+16).text(()=>o?O.formatTime(1e3*e.startTimestamp):(0,s.cK)(1e3*e.startTimestamp)?"".concat(O.formatMessage({id:"today"})," ").concat(O.formatTime(1e3*e.startTimestamp)):O.formatDate(1e3*e.startTimestamp,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"numeric"})),p.append("text").attr("font-size",P.size.small).attr("font-family",P.family.sofascoreSans).attr("font-weight",P.weight.medium).style("fill",S.onSurface.nLv3).attr("transform",U?"scale(-1,1) translate(-".concat(2*l.width,")"):"").attr("x",l.width).attr("text-anchor","end").text(u||c?O.formatMessage({id:"after_extra_time_short"}):O.formatMessage({id:"full_time_short"})),f&&c&&p.append("text").attr("font-size",P.size.small).attr("font-family",P.family.sofascoreSans).attr("font-weight",P.weight.medium).style("fill",S.onSurface.nLv3).attr("x",G.current.x(b*x)).attr("transform",U?"scale(-1,1) translate(-".concat(2*G.current.x(b*x),")"):"").attr("text-anchor","middle").text(O.formatMessage({id:"overtime.short"})),p.selectAll("text").attr("y",96)}(),function(t){let{status:n}=e,r=L.current,i=(0,d.A)(r),s=null==r?void 0:r.getBoundingClientRect();if(!s||N)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:G.current.x((0,_.lj)(t).minute)}]);e.enter().append("text").classed("timer",!0).style("fill",S.sofaSingles.live).attr("font-weight",P.weight.bold).attr("font-size",P.size.regular).merge(e).transition(H().duration(l?w.B4:0)).attr("x",t=>t.x).attr("transform",t=>U?"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")}}((0,_.lj)(r).points),R.current=i}()},100,[e.status.type,n,x,b,$,z.duration,S]),(0,r.jsx)(o.az,{bg:"onSurface.nLv5",children:(0,r.jsxs)(M,{width:w.aJ,height:w.lG,ref:L,transform:U?"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)(j,{className:"graph-info-element",children:[(0,r.jsx)(i.p,{id:z.leftTeam.id,size:24,name:z.leftTeam.name}),(0,r.jsx)(i.p,{id:z.rightTeam.id,size:24,name:z.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"}),N&&(0,r.jsx)(I,{})]})})}function S(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)(z,{...n}),(0,r.jsx)(o.az,{position:"absolute",top:"0",left:"-4",children:(0,r.jsx)(b.S,{isOpen:i,leftTeamId:n.leftTeam.id,leftTeamName:n.leftTeam.name,rightTeamId:n.rightTeam.id,rightTeamName:n.rightTeam.name})})]})})})})}}}]);