secure.widget.cloud.opta.net Open in urlscan Pro
23.56.202.167  Public Scan

URL: https://secure.widget.cloud.opta.net/v3/widget/football/live_action/live_action.js
Submission: On July 24 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

/**
 * opta-widgets - v3.172.0
 * Copyright (c) 2023 Opta Sports
 * Licenses: http://widget.cloud.opta.net/v3/licences.txt
 */
(window.webpackChunkOptaWidgetsV3=window.webpackChunkOptaWidgetsV3||[]).push([["widget/football/live_action/live_action","components/football/football_timeline","components/football/goal_replay_controls","components/football/eventanimations","components/football/goalview","components/football/rbvisevents"],{"./src/components/football/goal_replay_controls/goal_replay_controls.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GoalReplayControls=void 0;const i=a("./src/components/football/goal_replay_controls/goal_replay_controls_svg.ts"),s=a("./src/components/football/goal_replay_controls/goal_replay_icon_svg.ts"),o=a("./src/tsmodules/Opta.ts"),n="Opta-GoalReplay-Enabled",r="Opta-Hidden";class l{constructor(t){this.widget=t.widget,this.replay_callback=t.replay_callback,this.abort_callback=t.abort_callback,this.goal_replay_container=this.widget.dom.find(t.container_selector),this.appendGoalReplayControls(),this.bindEventListeners()}replayGoal(t){this.replayed_goal_id=t,this.goal_replay_container.removeClass(r),this.replay_callback(t),this.widget.dom.addClass(n)}abortReplay(){this.closeButtonEventHandler()}redraw(){this.goal_replay_controls.empty(),this.goal_replay_controls.html(this.drawGoalReplay())}appendGoalReplayControls(){this.goal_replay_controls=this.goal_replay_container.append(this.drawGoalReplay()),this.goal_replay_controls.addClass(r)}drawGoalReplay(){const t=this.widget.getSize().toLowerCase();return`<div class="Opta-GoalReplayControls">\n      <div class="Opta-GoalReplayControls-controls">${(0,i.getGoalReplayControls)(t,"Replay")}</div>\n      <div class="Opta-GoalReplayControls-icon">${(0,s.drawGoalReplayIcon)(t,"Goal","REPLAY")}</div>\n    </div>`}bindEventListeners(){this.widget.dom.on("click",".Opta-GoalReplayControls-controls .Opta-GoalReplayControls-close",o.default._.debounce(this.closeButtonEventHandler.bind(this),250)),this.widget.dom.on("click",".Opta-GoalReplayControls-controls .Opta-GoalReplayControls-replay",o.default._.debounce(this.replayButtonEventHandler.bind(this),250))}closeButtonEventHandler(){this.goal_replay_container.addClass(r),o.default.events.publish("goal_replay.abort"),this.abort_callback(),this.widget.dom.removeClass(n)}replayButtonEventHandler(){this.replayed_goal_id&&(o.default.events.publish("goal_replay.abort"),this.replay_callback(this.replayed_goal_id),this.widget.dom.removeClass(n))}}e.GoalReplayControls=l,o.default.components.football.goal_replay_controls=l},"./src/components/football/goal_replay_controls/goal_replay_controls_svg.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGoalReplayControls=void 0;const i=a("./src/tsmodules/Opta.ts"),s={narrow:76,normal:110,wide:150};e.getGoalReplayControls=(t,e)=>{const a=i.default.AppSettings&&i.default.AppSettings.rtl?"scale(-1,1)":"";return`<?xml version="1.0" encoding="utf-8"?>\n    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n      viewBox="0 0 84.7 65.8" style="enable-background:new 0 0 84.7 65.8;" xml:space="preserve"\n      width="${s[t]}" height="${.8*s[t]}" ${a?`transform="${a}"`:""}>\n    <style type="text/css">\n      .st0{opacity:0.96;}\n      .st1{opacity:0.23;fill:#FFFFFF;enable-background:new    ;}\n      .st2{fill:#FFFFFF;}\n      .st3{fill:#8E8E8E;}\n      .st4{font-family:"Noto Sans",Arial,Helvetica,sans-serif;}\n      .st5{font-size:9.4473px;}\n      .st6{fill:none;stroke:#8E8E8E;stroke-miterlimit:10;}\n      .st7{font-size:6.2653px;}\n    </style>\n    <g id="Replay_x2F_x_x2F_Play">\n      <g id="X" class="Opta-GoalReplayControls-close">\n        <circle class="st1" cx="14.3" cy="14.3" r="11.7"/>\n        <circle class="st2" cx="14.3" cy="14.3" r="8.3"/>\n        <text transform="translate(14, 17)" text-anchor="middle" class="st3 st4 st5">x</text>\n      </g>\n      <g id="Replay" class="Opta-GoalReplayControls-replay">\n        <g class="st0">\n          <circle class="st1" cx="34.8" cy="35.9" r="28"/>\n          <circle class="st2" cx="34.8" cy="35.9" r="24.8"/>\n        </g>\n        <text text-anchor="middle" transform="${`translate(34, 49) ${a}`}" class="st3 st4 st5">${e}</text>\n        <polygon class="st3" points="20.9,30.5 34,38.1 34,23 \t\t"/>\n        <polygon class="st6" points="32.8,30.3 45.8,37.8 45.8,22.8 \t\t"/>\n      </g>\n    </g>\n  </svg>`}},"./src/components/football/goal_replay_controls/goal_replay_icon_svg.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.drawGoalReplayIcon=void 0;const i=a("./src/tsmodules/Opta.ts"),s={narrow:100,normal:134,wide:200};e.drawGoalReplayIcon=(t,e,a)=>{const o=i.default.AppSettings&&i.default.AppSettings.rtl;return`<?xml version="1.0" encoding="utf-8"?>\n  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n    viewBox="0 0 127.7 48.8" style="enable-background:new 0 0 127.7 48.8;" xml:space="preserve"\n    width="${s[t]}" height="${.38*s[t]}">\n  <style type="text/css">\n    .gst0{opacity:0.96;fill:#FFFFFF;enable-background:new    ;}\n    .gst1{fill:#E8E8E8;}\n    .gst2{fill:url(#path2521_1_);}\n    .gst3{fill:url(#path3382_1_);}\n    .gst4{fill:url(#path3400_1_);}\n    .gst5{fill:none;stroke:url(#path3514_1_);stroke-width:0.2156;stroke-linejoin:round;}\n    .gst6{fill:none;stroke:url(#path3516_1_);stroke-width:0.2156;stroke-linejoin:round;}\n    .gst7{fill:none;stroke:url(#path3518_1_);stroke-width:0.22;}\n    .gst8{fill:none;stroke:#666666;stroke-width:4.400224e-02;}\n    .gst9{fill:none;stroke:#ECECEC;stroke-width:0.132;}\n    .gst10{fill:none;stroke:#F2F2F2;stroke-width:0.132;stroke-linecap:square;}\n    .gst11{fill:none;stroke:#FFFFFF;stroke-width:0.132;}\n    .gst12{fill:none;stroke:#999999;stroke-width:4.400224e-02;}\n    .gst13{fill:none;stroke:#ECECEC;stroke-width:4.400224e-02;}\n    .gst14{fill:#8E8E8E;}\n    .gst15{font-family:"Noto Sans",Arial,Helvetica,sans-serif;}\n    .gst16{font-size:5.2929px;}\n    .gst17{font-size:21.9681px;}\n  </style>\n  <g id="Goal_Replay_Icon">\n    <path class="gst0" d="M24.9,7.8h77.7c7.9,0,14.3,6.4,14.3,14.3v1.7c0,7.9-6.4,14.3-14.3,14.3H24.9c-7.9,0-14.3-6.4-14.3-14.3v-1.7\n      C10.6,14.2,17,7.8,24.9,7.8z"/>\n    <circle class="gst1" cx="25.8" cy="22.9" r="15.2"/>\n    <g id="Ball" transform="translate(-236.97296,-366.478)">\n\n        <radialGradient id="path2521_1_" cx="-788.3794" cy="5207.2417" r="5.0299" gradientTransform="matrix(1.767 0 0 0.6484 1654.9569 -2979.498)" gradientUnits="userSpaceOnUse">\n        <stop  offset="0" style="stop-color:#333333"/>\n        <stop  offset="1" style="stop-color:#333333;stop-opacity:0"/>\n      </radialGradient>\n      <path id="path2521" class="gst2" d="M270.7,396.9c0.1,1.7-3.7,3.1-8.5,3.1s-8.9-1.3-9-2.9c0-0.1,0-0.1,0-0.2\n        c-0.1-1.7,3.7-3.1,8.5-3.1s8.9,1.3,9,2.9C270.7,396.8,270.7,396.8,270.7,396.9z"/>\n\n        <radialGradient id="path3382_1_" cx="1849.3809" cy="4133.8008" r="10.8158" gradientTransform="matrix(0.8383 0 0 0.8383 -1286.8356 -3078.6504)" gradientUnits="userSpaceOnUse">\n        <stop  offset="0" style="stop-color:#6A6A6A"/>\n        <stop  offset="1" style="stop-color:#000000"/>\n      </radialGradient>\n      <path id="path3382" class="gst3" d="M272.8,388.8c0,5.5-4.4,9.9-9.9,9.9s-9.9-4.4-9.9-9.9s4.4-9.9,9.9-9.9\n        C268.3,378.9,272.8,383.3,272.8,388.8z"/>\n\n        <radialGradient id="path3400_1_" cx="1044.2881" cy="4347.2871" r="9.9049" gradientTransform="matrix(1 0 0 1.0001 -780.7101 -3960.7363)" gradientUnits="userSpaceOnUse">\n        <stop  offset="0" style="stop-color:#FFFFFF"/>\n        <stop  offset="0.5" style="stop-color:#FFFFFF"/>\n        <stop  offset="1" style="stop-color:#D6D6D6"/>\n      </radialGradient>\n      <path id="path3400" class="gst4" d="M262.9,378.9c-2.2,0-4.2,0.7-5.8,1.9c-0.7,0.9-1.2,1.7-1.2,1.7l-0.9,0.3c-1.3,1.7-2,3.7-2,6\n        c0,0.2,0,0.4,0,0.6c0.2,0.4,0.4,0.7,0.4,0.7l-0.1,1.1c0.6,2.6,2.3,4.8,4.5,6.1c0.2,0.1,0.3,0.2,0.4,0.2c-0.1-0.1-0.1-0.1-0.2-0.1\n        c-0.6-0.6-1.1-1.3-1.1-1.3l1.4-1.3c0,0,0.9,0.7,1.9,1c1,0.4,2.1,0.4,2.1,0.4l0.7,1.8c0,0-0.6,0.3-1.5,0.5c-0.2,0-0.3,0-0.5,0.1\n        c0.5,0.1,1.1,0.1,1.7,0.1c2.3,0,4.4-0.8,6.1-2.1c0.5-0.7,0.9-1.3,0.9-1.3l0.8-0.3c1.4-1.7,2.2-3.8,2.2-6.1\n        c-0.3-0.8-0.6-1.3-0.6-1.3s0.1-0.7,0-1.5c0-0.1,0.1-0.1,0.2-0.1c0-0.1-0.1-0.5-0.2-0.6c-0.2-0.6-0.4-0.9-0.6-1.2c0.3,0.2,0,0,0,0\n        C269.9,381,266.6,378.9,262.9,378.9z M264.1,379.3c0.8,0,1.7,0.3,1.7,0.3s1,0.4,1.7,0.9s1.1,1.2,1.1,1.2l-1.8,1.2c0,0-1-0.7-1.9-1\n        c-1-0.4-2-0.4-2-0.4l-0.5-1.8C262.4,379.7,263.2,379.3,264.1,379.3C264,379.3,264,379.3,264.1,379.3z M258.3,384.1\n        c0.6,0,1.1,0.1,1.1,0.1l0.9,3.9l-2.9,2.8c0,0-0.9-0.6-1.6-1.2s-1.1-1.1-1.1-1.1s0.1-1.1,0.4-2.1s0.7-1.8,0.7-1.8s0.7-0.4,1.6-0.6\n        C257.7,384.2,258,384.1,258.3,384.1z M267.8,386.9c0,0,0.8,0.4,1.5,0.9s1.2,1.2,1.2,1.2s0,1-0.4,2c-0.3,1-0.9,2.1-0.9,2.1\n        s-0.8,0.3-1.7,0.4s-1.8-0.1-1.8-0.1l-0.5-1.9l-0.5-2c0,0,0.6-0.8,1.4-1.4S267.8,386.9,267.8,386.9z"/>\n\n        <linearGradient id="path3514_1_" gradientUnits="userSpaceOnUse" x1="1151.7278" y1="4443.2524" x2="1156.9025" y2="4444.2163" gradientTransform="matrix(0.9741 0 0 0.9741 -856.5491 -3938.3232)">\n        <stop  offset="0" style="stop-color:#000000"/>\n        <stop  offset="1" style="stop-color:#000000;stop-opacity:0"/>\n      </linearGradient>\n      <path id="path3514" class="gst5" d="M270.4,389.1c0,0,0,0.9-0.4,1.9c-0.3,1-0.9,2-0.9,2s-0.8,0.3-1.7,0.4c-0.8,0.1-1.7-0.1-1.7-0.1\n        l-0.4-1.9l-0.5-1.9c0,0,0.6-0.7,1.3-1.4c0.7-0.6,1.6-1.2,1.6-1.2s0.8,0.4,1.5,0.9C269.9,388.4,270.4,389.1,270.4,389.1z"/>\n\n        <linearGradient id="path3516_1_" gradientUnits="userSpaceOnUse" x1="1149.1228" y1="4440.5215" x2="1144.2034" y2="4438.5898" gradientTransform="matrix(0.9748 0 0 0.9748 -860.2939 -3940.4624)">\n        <stop  offset="0" style="stop-color:#000000"/>\n        <stop  offset="1" style="stop-color:#000000;stop-opacity:0"/>\n      </linearGradient>\n      <path id="path3516" class="gst6" d="M257.4,390.8c0,0-0.9-0.6-1.5-1.1c-0.6-0.6-1-1.1-1-1.1s0.1-1.1,0.4-2s0.7-1.7,0.7-1.7\n        s0.7-0.4,1.6-0.5s1.9,0,1.9,0l0.9,3.8L257.4,390.8z"/>\n\n        <linearGradient id="path3518_1_" gradientUnits="userSpaceOnUse" x1="1603.5988" y1="4852.6099" x2="1604.536" y2="4849.5122" gradientTransform="matrix(0.8783 0 0 0.8783 -1143.2251 -3881.0581)">\n        <stop  offset="0" style="stop-color:#333333"/>\n        <stop  offset="1" style="stop-color:#000000;stop-opacity:0"/>\n      </linearGradient>\n      <path id="path3518" class="gst7" d="M265.7,379.7c0,0,0.9,0.3,1.5,0.8s1,1.1,1,1.1l-1.6,1.1c0,0-0.8-0.6-1.7-0.9s-2.1-0.4-2.1-0.4\n        l-0.4-1.6c0,0,0.9-0.3,1.6-0.3C264.8,379.4,265.7,379.7,265.7,379.7z"/>\n      <path id="path3479" class="gst8" d="M259.3,384.3c0,0,1.6-2.1,3.4-2.8"/>\n      <path id="path3506" class="gst9" d="M266.9,382.8c0,0,1.2,1.9,1,4"/>\n      <path id="path3481" class="gst8" d="M266.8,382.8c0,0,1.2,2,1.1,4.1 M268.4,381.6c0,0,2.6,1,3.8,4.3 M270.5,389.1\n        c0,0,0.9-0.1,1.7-1.4 M269.8,395.3c0,0,0.1-0.8-0.6-2.2 M262.5,396.2c0,0,1.4-0.4,3.2-2.9 M257.4,390.9c0,0-0.1,2.2,1,4\n        M257,396.1c0,0-0.3,0-1.6-0.7 M254.7,388.6c0,0-0.9,0.4-1.4,1.4 M255.9,382.5c0,0-0.3,1.2,0,2.3 M256.9,380.9\n        c0,0,2.6-2.2,5.3-1.2 M263.2,398c0,0,2.3,0.6,5.9-1.5"/>\n      <path id="path3504" class="gst10" d="M259.4,384.1c0,0,1.3-1.8,3.3-2.7"/>\n      <path id="path3508" class="gst11" d="M262.5,396.3c0,0,1.4-0.3,3.2-2.8 M257.3,390.9c0,0-0.1,2.2,1,4"/>\n      <path id="path2453" class="gst12" d="M260.3,388.1c0,0,1.2,0.3,4.5,1.4"/>\n      <path id="path3260" class="gst13" d="M260.3,388.1c0,0,1.2,0.3,4.5,1.4"/>\n    </g>\n    <g id="Replay_1_">\n      <text text-anchor="start" transform="${o?"translate(92, 16)":"translate(72, 16)"}" class="gst14 gst15 gst16 Opta-GoalReplayIcon-replay">${a}</text>\n    </g>\n    <text text-anchor="start" transform="${o?"translate(100, 32)":"translate(54, 32)"}" class="gst14 gst15 gst17 Opta-GoalReplayIcon-goal">${e}</text>\n  </g>\n</svg>`}},"./src/components/football/timeline/football_timeline.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FootballTimeline=void 0;const i=a("./src/components/generic/timeline.ts"),s=a("./src/tsmodules/Opta.ts"),o=a("./src/components/football/timeline/sfx.ts"),n=a("./src/enums/model/football/matchevent.ts"),r=a("./src/enums/model/football/match.ts");class l extends i.Timeline{constructor(t){super(t),this.widget=t.widget,this.sfx=new o.Sfx(this.widget,{force_horizontal:!0,show_clock:!1,show_goal_replay_tooltip:!0,timebar_spacing:150}),this.timeline_length=this.sfx.getTimelineLength(),this.indent_factor=20,this.timeline_model=t.timeline_model,this.setEvents()}draw(){const t=!(!this.match.home.name.abbr||!this.match.away.name.abbr);return`\n    <div class="Opta-Clock-TeamNames">\n      ${t?`<div class="Opta-TeamName-home">${this.match.home.name.abbr}</div>`:""}\n      <div class="Opta-Clock-Start">\n        <div class="Opta-ClockInactive">\n          <div class="Opta-ClockTime">\n            0:${s.default.utils.pad(2,0)}\n          </div>\n        </div>\n      </div>\n      ${t?`<div class="Opta-TeamName-away">${this.match.away.name.abbr}</div>`:""}\n    </div>\n    <div class="Opta-Cf Opta-Timeline-Bar ${this.classes}">${this.drawTimelineBar()}</div>\n    <div class="Opta-Clock-End">\n      <div class="Opta-Clock">\n        ${this.drawTime()}\n      </div>\n    </div>`}adjust(t){t&&this.sfx.updateMatch(t),this.sfx.adjustTimeline()}update(t){this.timeline_length=this.sfx.getTimelineLength(),this.event_types=t&&t.event_types||this.event_types}updateEvents(t,e){this.match=t,this.timeline_model=e,this.setEvents()}setEvents(){this.shootout_count=this.timeline_model.shootout_count,this.events.away=this.timeline_model.events.away,this.events.home=this.timeline_model.events.home}redrawTimelineBar(){this.widget.dom.find(".Opta-Timeline-Bar").html(this.drawTimelineBar()),this.runTooltipsSfx()}runTooltipsSfx(){this.sfx.runTooltips({arrow_space:5,dom:`${this.widget.wid} .Opta_W.Opta_F_LA`})}drawTime(){return s.default._.contains([r.MATCH_PERIOD_ID.first_half,r.MATCH_PERIOD_ID.second_half,r.MATCH_PERIOD_ID.extra_first,r.MATCH_PERIOD_ID.extra_second],this.match.period_id)?`${this.match.getMatchMinute()}:${s.default.utils.pad(2,0)}`:this.match.getClockTime(!1,!1)}drawTimelineBar(){this.max_indent=0,this.whistle_events=[];const t=this.drawEvents("home"),e=this.drawEvents("away"),a=this.sfx.getTimelineLength(),i=this.getEventsStyle(a);return`\n      <ul class="Opta-Events Opta-Home" ${i}>${t}</ul>\n      <div class="Opta-Timeline">\n        <div></div>\n        ${this.drawWhistleEvents()}\n      </div>\n      <ul class="Opta-Events Opta-Away" ${i}>${e}</ul>`}getEventsStyle(t){return`style="height: ${this.is_vertical?t:this.max_indent+this.indent_factor}px"`}drawMatchEvent(t,e,a,i){return s.default.components.generic.matchEvent(t,{match:this.match,part:"icon",player:e,player_naming:this.naming,show_assists:this.attr.show_assists||"all",show_images:this.attr.show_images,sport:this.attr.sport,styles:a,tooltip:this.getTooltipContent(t),wrap:i})}getTooltipContent(t){return s.default._.isArray(t)||t.type_id!==n.EVENT_TYPE_ID.goal?"":`<span class="Opta-Hidden">${s.default.Trans.term(24541)}</span>`}}e.FootballTimeline=l,s.default.components.football.football_timeline=t=>new l(t)},"./src/components/football/timeline/sfx.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sfx=void 0;const i=a("./src/tsmodules/Opta.ts");e.Sfx=class{constructor(t,e){this.attr=t.attr,this.match=t.match,this.widget=t,this.vertical_timebar_height=this.attr.vertical_timebar_height||260,this.show_clock=e?e.show_clock:this.attr.show_clock,this.show_goal_replay_tooltip=!!e&&e.show_goal_replay_tooltip,this.timebar_spacing=this.getTimebarSpacing(e),this.force_horizontal=!!e&&e.force_horizontal}run(){this.runTooltips(),this.adjustTimeline(),this.runTheClock(),this.widget.first_time=!1}stopTheClock(){this.clock&&this.clock.stop()}getTimelineLength(){const t=this.timebar_spacing||(this.show_clock?150:100);return this.isVertical()?Number(this.vertical_timebar_height):Math.floor((this.attr.width||this.widget.width)-t)}adjustTimeline(){this.adjustTimelineLength(),this.adjustTimelines()}updateMatch(t){this.match=t}runTooltips(t){(this.attr.show_tooltips||this.show_goal_replay_tooltip)&&i.default.sfx.toolTips({arrow_space:t&&t.arrow_space||18,classes:"Opta-Event-Tooltip",dom:t&&t.dom||`${this.widget.wid} .Opta_W`})}getTimebarSpacing(t){return t&&t.timebar_spacing||(this.show_clock?150:100)}isVertical(){return!this.force_horizontal&&("vertical"===this.attr.orientation||this.widget.is_narrow)}adjustTimelineLength(){this.isVertical()&&(0,i.default)(`${this.widget.wid} .Opta-Events`).height(this.getTimelineLength())}adjustTimelines(){const t=(0,i.default)(this.widget.wid);this.isVertical()?this.adjustVerticalTimelines(t):this.adjustHorizontalTimelines(t)}adjustVerticalTimelines(t){this.vertical_timebar_height&&t.find(".Opta-Timeline").height(Number(this.vertical_timebar_height)),t.find(".Opta-Timeline > div:not(.Opta-MatchEvent)").height(`${this.match.getPercentageTimeElapsed()}%`)}adjustHorizontalTimelines(t){t.find(".Opta-Timeline > div:not(.Opta-MatchEvent)").width(`${this.match.getPercentageTimeElapsed()}%`)}runTheClock(){this.attr.live&&this.show_clock&&this.match.isLive()&&(this.clock=i.default.sfx.runClock({dom:this.widget.dom,match:this.match}))}}},"./src/components/generic/timeline.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;const i=a("./src/tsmodules/Opta.ts"),s=a("./src/enums/model/football/match.ts");class o{constructor(t){this.settings=t,this.attr=t.attr,this.classes=t.classes||"",this.event_types=t.attr.event_types,this.match=t.match,this.events={away:t.data.away_events,home:t.data.home_events},this.naming=t.attr.player_naming||"full",this.shootout_count=t.data.shootout_count,this.is_vertical=void 0!==t.data.is_vertical?t.data.is_vertical:"vertical"===t.attr.orientation||t.data.is_narrow,this.timeline_length=t.data.timeline_length,this.indent_factor=17,this.whistle_events=[],this.max_indent=0}draw(){return this.whistle_events=[],`<div class="Opta-Cf Opta-Timeline-Bar ${this.classes}">\n      <ul class="Opta-Events Opta-Home">\n        ${this.drawEvents("home")}\n      </ul>\n      <div class="Opta-Timeline">\n        <div></div>\n        ${this.drawWhistleEvents()}\n      </div>\n        <ul class="Opta-Events Opta-Away">\n        ${this.drawEvents("away")}\n        </ul>\n    </div>`}drawWhistleEvents(){return 0===this.whistle_events.length?"":this.whistle_events.join("")}drawEvents(t){const e={grouped_substitutions:[],indent:0,previous_event:void 0,shootout_counter:.5};return this.events[t].map((a=>this.event_types&&!i.default._.contains(this.event_types,a.type_id)?"":this.drawEvent(a,t,e))).join("")}getIcon(t){return i.default.components.generic.matchEvent(t,{combined_sub_icon:!0,part:"icontype"})}drawEvent(t,e,a){const s=i.default._.isArray(t)?t[0]:t,o=this.getIcon(s),n=this.getPlayer(s,e,o),r="Whistle"===o,l=r?"div":"li";s.type=o,s.amplitude=this.getEventAmplitude(s,a),this.setIndent(a,s);const d=this.getStyles(s.amplitude,a.indent,e,o);if(!s.type)return a.previous_event=void 0,"";let _;if(s.manager_id){const a=this.getManager(s,e,o);_=this.drawMatchEvent(t,a[0],d,l)}else _=this.drawMatchEvent(t,n,d,l);return r?(this.whistle_events.push(_),""):(a.previous_event=s,_)}setIndent(t,e){t.previous_event&&"Whistle"!==e.type&&"Whistle"!==t.previous_event.type&&e.amplitude-t.previous_event.amplitude<14?(t.indent+=this.indent_factor,t.indent>3*this.indent_factor&&(t.indent=0)):t.indent=0,this.setMaxIndent(t.indent)}setMaxIndent(t){this.max_indent=Math.max(this.max_indent,t)}getStyles(t,e,a,s){const o="home"===a,n=i.default.AppSettings.rtl?"right: ":"left: ";if(!this.is_vertical)return`${n}${t}px; ${o?"bottom: ":"top: "}${e}px;`;return`top: ${t}px; ${o&&"Whistle"!==s?`${i.default.AppSettings.rtl?"left:":"right:"} ${e-6}`:`${n} ${e}`}px;`}getPlayer(t,e,a){return"home"===e&&"Own"!==a||"home"!==e&&"Own"===a?this.match.home.players[t.player_id]:this.match.away.players[t.player_id]}getManager(t,e,a){return"home"===e&&"Own"!==a||"home"!==e&&"Own"===a?this.match.home.managers.filter((e=>e.id===t.manager_id)):this.match.away.managers.filter((e=>e.id===t.manager_id))}getEventAmplitude(t,e){const a=this.match.timings.total_match_time-this.match.getTimingsPeriodValue(10,"duration"),o=this.getTotalPlayableMinutes(),n=o-a;let r;return t.period_id===s.MATCH_PERIOD_ID.shootout?(r=(a+n/(this.shootout_count/2+1)*e.shootout_counter)/o*this.timeline_length,this.match.first_shootout_id!==t.team_id&&"abab"===this.match.shootout_type?r+=11:"abba"===this.match.shootout_type&&t.number%2!=0&&(r+=7),e.shootout_counter+=1):r=t.mins_on_pitch/o*this.timeline_length,"Whistle"!==t.getIconType()&&(r-=this.is_vertical?7:5),i.default.utils.round(r,2)}getTotalPlayableMinutes(){const t=this.match.getTimingsPeriodValue(10,"duration");return this.attr.show_shootouts?this.match.timings.total_match_time-t+3*t:this.match.timings.total_match_time-t}drawMatchEvent(t,e,a,s){return i.default.components.generic.matchEvent(t,{match:this.match,part:"icon",player:e,player_naming:this.naming,show_assists:this.attr.show_assists||"all",show_images:this.attr.show_images,sport:this.attr.sport,styles:a,tooltip:!0,wrap:s})}}e.Timeline=o,i.default.components.generic.timeline=function(t){return new o(t).draw()}},"./src/constants/widget/football/live_action.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.out_of_play_ignore_event_ids=e.shootout_skip_ignore_event_ids=e.position_data=e.key_event_ids=e.animation_speed=e.plot_notification_event_ids=e.noplot_event_ids=e.ignore_event_ids=e.dedupe_event_ids=e.special_event_ids=e.testing_opta_ids=e.testing_sdapi_ids=e.FAST_FORWARD=e.DEFAULT_SPEED=void 0;const i=a("./src/enums/model/football/matchevent.ts");e.DEFAULT_SPEED="DEFAULT_SPEED",e.FAST_FORWARD="FAST_FORWARD",e.testing_sdapi_ids=["6fmzzdycnlvrdmgmimshbreqy","br4ed3zt37k0ojl7owgar09d6","bubpzhqejnixr6qe4quzxwc4q","d6dxan46kghd03eaea2sjbbl6"],e.testing_opta_ids=[1009436,1009462,1032844,915115,942962,978382,982198,987722],e.special_event_ids=[i.EVENT_TYPE_ID.save,i.EVENT_TYPE_ID.attempt_saved,i.EVENT_TYPE_ID.goal,i.EVENT_TYPE_ID.referee_decision],e.dedupe_event_ids=[i.EVENT_TYPE_ID.corner,i.EVENT_TYPE_ID.start_delay,i.EVENT_TYPE_ID.end_delay,i.EVENT_TYPE_ID.end_of_period,i.EVENT_TYPE_ID.start_of_period,i.EVENT_TYPE_ID.team_setup,i.EVENT_TYPE_ID.collection_end,i.EVENT_TYPE_ID.formation_change,i.EVENT_TYPE_ID.referee_drop_ball],e.ignore_event_ids=[i.EVENT_TYPE_ID.good_skill,i.EVENT_TYPE_ID.challenge,i.EVENT_TYPE_ID.error,i.EVENT_TYPE_ID.shield_ball_opp,i.EVENT_TYPE_ID.penalty_faced,62,i.EVENT_TYPE_ID.injury_time_announcement,i.EVENT_TYPE_ID.players_coming_out,i.EVENT_TYPE_ID.players_lined_up,i.EVENT_TYPE_ID.national_anthem_singing,i.EVENT_TYPE_ID.shake_hands,i.EVENT_TYPE_ID.flip_coin,i.EVENT_TYPE_ID.minute_of_silence,i.EVENT_TYPE_ID.prize_ceremony,i.EVENT_TYPE_ID.photo_taking,i.EVENT_TYPE_ID.game_about_to_start,i.EVENT_TYPE_ID.goal_deleted_after_review],e.noplot_event_ids=[i.EVENT_TYPE_ID.card,i.EVENT_TYPE_ID.sub_off,i.EVENT_TYPE_ID.sub_on,i.EVENT_TYPE_ID.player_retired,i.EVENT_TYPE_ID.player_returns,i.EVENT_TYPE_ID.player_becomes_goalkeeper,i.EVENT_TYPE_ID.goalkeeper_becomes_player,i.EVENT_TYPE_ID.condition_change,i.EVENT_TYPE_ID.start_delay,i.EVENT_TYPE_ID.end_delay,i.EVENT_TYPE_ID.end_of_period,i.EVENT_TYPE_ID.start_of_period,i.EVENT_TYPE_ID.team_setup,i.EVENT_TYPE_ID.collection_end,i.EVENT_TYPE_ID.temp_goal,i.EVENT_TYPE_ID.temp_attempt,i.EVENT_TYPE_ID.formation_change,i.EVENT_TYPE_ID.deleted_event,i.EVENT_TYPE_ID.offside_provoked,i.EVENT_TYPE_ID.shield_ball_opp,i.EVENT_TYPE_ID.penalty_faced,i.EVENT_TYPE_ID.referee_decision,i.EVENT_TYPE_ID.referee_drop_ball,i.EVENT_TYPE_ID.injury_time_announcement,i.EVENT_TYPE_ID.game_interruption],e.plot_notification_event_ids=[i.EVENT_TYPE_ID.pass,i.EVENT_TYPE_ID.offside_pass,i.EVENT_TYPE_ID.take_on,i.EVENT_TYPE_ID.foul,i.EVENT_TYPE_ID.out,i.EVENT_TYPE_ID.corner,i.EVENT_TYPE_ID.tackle,i.EVENT_TYPE_ID.interception,i.EVENT_TYPE_ID.turnover,i.EVENT_TYPE_ID.save,i.EVENT_TYPE_ID.claim,i.EVENT_TYPE_ID.clearance,i.EVENT_TYPE_ID.miss,i.EVENT_TYPE_ID.post,i.EVENT_TYPE_ID.attempt_saved,i.EVENT_TYPE_ID.goal,i.EVENT_TYPE_ID.card,i.EVENT_TYPE_ID.player_off,i.EVENT_TYPE_ID.player_on,i.EVENT_TYPE_ID.player_retired,i.EVENT_TYPE_ID.player_returns,i.EVENT_TYPE_ID.player_becomes_goalkeeper,i.EVENT_TYPE_ID.goalkeeper_becomes_player,i.EVENT_TYPE_ID.start_delay,i.EVENT_TYPE_ID.end_delay,i.EVENT_TYPE_ID.end_of_period,i.EVENT_TYPE_ID.start_of_period,i.EVENT_TYPE_ID.player_change_position,i.EVENT_TYPE_ID.player_change_number,i.EVENT_TYPE_ID.temp_goal,i.EVENT_TYPE_ID.temp_attempt,i.EVENT_TYPE_ID.punch,i.EVENT_TYPE_ID.aerial,i.EVENT_TYPE_ID.rescinded_card,i.EVENT_TYPE_ID.ball_recovery,i.EVENT_TYPE_ID.dispossessed,i.EVENT_TYPE_ID.keeper_pickup,i.EVENT_TYPE_ID.smother,i.EVENT_TYPE_ID.offside_provoked,i.EVENT_TYPE_ID.foul_throw_in,i.EVENT_TYPE_ID.temp_save,i.EVENT_TYPE_ID.resume,i.EVENT_TYPE_ID.referee_decision,i.EVENT_TYPE_ID.referee_drop_ball,i.EVENT_TYPE_ID.caught_offside,i.EVENT_TYPE_ID.other_ball_contact,i.EVENT_TYPE_ID.blocked_pass,i.EVENT_TYPE_ID.delayed_start,i.EVENT_TYPE_ID.early_end,i.EVENT_TYPE_ID.player_off_pitch,i.EVENT_TYPE_ID.shootout_goal,i.EVENT_TYPE_ID.shootout_miss],e.animation_speed={fast:700,normal:1200,slow:1700},e.key_event_ids=[i.EVENT_TYPE_ID.save,i.EVENT_TYPE_ID.miss,i.EVENT_TYPE_ID.post,i.EVENT_TYPE_ID.attempt_saved,i.EVENT_TYPE_ID.goal,i.EVENT_TYPE_ID.penalty_faced],e.position_data=[{q:16,x:[2.9,97.1],y:[50,50]},{q:17,x:[11.5,88.5],y:[50,50]},{q:18,x:[75,25],y:[50,50]},{q:19,x:[55.8,41.5],y:[50,50]},{q:60,x:[2.9,97.1],y:[53.7,46.3]},{q:61,x:[2.9,97.1],y:[46.3,53.7]},{q:62,x:[2.9,97.1],y:[71,29]},{q:63,x:[11.5,88.5],y:[71,29]},{q:64,x:[11.5,88.5],y:[29,71]},{q:65,x:[2.9,97.1],y:[29,71]},{q:66,x:[9.5,91.5],y:[89.45,10.55]},{q:67,x:[75,25],y:[10.55,89.45]},{q:68,x:[75,25],y:[89.45,10.55]},{q:69,x:[9.5,91.5],y:[10.55,89.45]},{q:70,x:[41.5,55.8],y:[89.45,10.55]},{q:71,x:[41.5,55.8],y:[10.55,89.45]}],e.shootout_skip_ignore_event_ids=[i.EVENT_TYPE_ID.attempt_saved,i.EVENT_TYPE_ID.goal,i.EVENT_TYPE_ID.end_of_period,i.EVENT_TYPE_ID.start_of_period,i.EVENT_TYPE_ID.temp_attempt,i.EVENT_TYPE_ID.shootout_goal,i.EVENT_TYPE_ID.shootout_miss,i.EVENT_TYPE_ID.miss,i.EVENT_TYPE_ID.save,i.EVENT_TYPE_ID.post],e.out_of_play_ignore_event_ids=[i.EVENT_TYPE_ID.card,i.EVENT_TYPE_ID.sub_off,i.EVENT_TYPE_ID.sub_on,i.EVENT_TYPE_ID.start_of_period]},"./src/enums/model/football/match.ts":(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CARD_TYPE=e.MATCH_RESULT_TYPE=e.PERIOD_END_MINUTE_OBJ=e.PERIOD_END_MINUTE=e.MATCH_PERIOD_TRN_OBJ=e.MATCH_PERIOD_TRN=e.MATCH_PERIOD_ID=e.MATCH_PERIOD=void 0,function(t){t.abandoned="Abandoned",t.end_match="EndOfTheMatch",t.extra_first="ExtraFirstHalf",t.extra_full="ExtraFullTime",t.extra_half="ExtraHalfTime",t.extra_second="ExtraSecondHalf",t.extra_time="ExtraTime",t.first_half="FirstHalf",t.fulltime="FullTime",t.fulltime90="FullTime90",t.fulltimepens="fullTimePens",t.half_time="Halftime",t.live="Live",t.postmatch="PostMatch",t.postponed="Postponed",t.prematch="PreMatch",t.second_half="SecondHalf",t.shootout="Shootout",t.sudden_death="SuddenDeath"}(e.MATCH_PERIOD||(e.MATCH_PERIOD={})),function(t){t[t.live=0]="live",t[t.prematch=1]="prematch",t[t.first_half=2]="first_half",t[t.half_time=3]="half_time",t[t.second_half=4]="second_half",t[t.extra_time=5]="extra_time",t[t.extra_first=6]="extra_first",t[t.extra_half=7]="extra_half",t[t.extra_second=8]="extra_second",t[t.fulltime=9]="fulltime",t[t.shootout=10]="shootout",t[t.postmatch=11]="postmatch",t[t.abandoned=12]="abandoned",t[t.postponed=13]="postponed",t[t.fulltime90=14]="fulltime90",t[t.fulltimepens=15]="fulltimepens",t[t.sudden_death=16]="sudden_death",t[t.extra_full=17]="extra_full",t[t.end_match=18]="end_match"}(e.MATCH_PERIOD_ID||(e.MATCH_PERIOD_ID={})),function(t){t[t.abandoned=391]="abandoned",t[t.extra_first=331]="extra_first",t[t.extra_half=341]="extra_half",t[t.extra_second=351]="extra_second",t[t.extra_time=13171]="extra_time",t[t.first_half=511]="first_half",t[t.fulltime=361]="fulltime",t[t.half_time=301]="half_time",t[t.second_half=8581]="second_half",t[t.shootout=8601]="shootout"}(e.MATCH_PERIOD_TRN||(e.MATCH_PERIOD_TRN={})),function(t){t[t.abandoned=391]="abandoned",t[t.extra_first=331]="extra_first",t[t.extra_half=341]="extra_half",t[t.extra_second=351]="extra_second",t[t.extra_time=13171]="extra_time",t[t.first_half=511]="first_half",t[t.fulltime=361]="fulltime",t[t.half_time=301]="half_time",t[t.second_half=8581]="second_half",t[t.shootout=8601]="shootout"}(e.MATCH_PERIOD_TRN_OBJ||(e.MATCH_PERIOD_TRN_OBJ={})),function(t){t[t.ExtraFirstHalf=105]="ExtraFirstHalf",t[t.ExtraSecondHalf=120]="ExtraSecondHalf",t[t.FirstHalf=45]="FirstHalf",t[t.SecondHalf=90]="SecondHalf"}(e.PERIOD_END_MINUTE||(e.PERIOD_END_MINUTE={})),function(t){t[t.ExtraFirstHalf=105]="ExtraFirstHalf",t[t.ExtraSecondHalf=120]="ExtraSecondHalf",t[t.FirstHalf=45]="FirstHalf",t[t.SecondHalf=90]="SecondHalf"}(e.PERIOD_END_MINUTE_OBJ||(e.PERIOD_END_MINUTE_OBJ={})),function(t){t.abandoned="Abandoned",t.after_extra_time="AfterExtraTime",t.normal_result="NormalResult",t.penalty_shootout="PenaltyShootout",t.postponed="Postponed"}(e.MATCH_RESULT_TYPE||(e.MATCH_RESULT_TYPE={})),function(t){t.yellow_card="YC",t.second_yellow_card="Y2C",t.red_card="RC"}(e.CARD_TYPE||(e.CARD_TYPE={}))},"./src/enums/model/football/matchevent.ts":(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENT_CARD_REASON_ID_OBJ=e.EVENT_CARD_REASON_ID=e.EVENT_QUALIFIER_ID_OBJ=e.EVENT_QUALIFIER_ID=e.BODY_PART_EVENT=e.EVENT_TYPE_ID_OBJ=e.EVENT_TYPE_ID=e.EVENT_TRN_ID_OBJ=e.EVENT_TRN_ID=e.PLAY_TYPE_OBJ=e.PLAY_TYPE=e.EVENT_ID=e.EVENT_TYPE_TITLE=e.EVENT_TYPE=void 0,function(t){t.aerial="aerial",t.aerial_lost="aerial_lost",t.aerial_won="aerial_won",t.ball_recovery="ball_recovery",t.ball_touch="ball_touch",t.blocked_pass="blocked_pass",t.blocked_shot="blocked_shot",t.caught_offside="caught_offside",t.challenge="challenge",t.challenge_lost="challenge_lost",t.chance_missed="chance_missed",t.claim="claim",t.clearance="clearance",t.coach_setup="coach_setup",t.collection_end="collection_end",t.condition_change="condition_change",t.corner="corner",t.cross_not_claimed="cross_not_claimed",t.defensive_block="defensive_block",t.delayed_start="delayed_start",t.deleted_event="deleted_event",t.direct_blocked_shot="direct_blocked_shot",t.direct_shot_on_target="direct_shot_on_target",t.direct_freekick_on_target="direct_freekick_on_target",t.dispossessed="dispossessed",t.drop="drop",t.duel_lost="duel_lost",t.duel_won="duel_won",t.early_end="early_end",t.end_delay="end_delay",t.error="error",t.failed_to_block="failed_to_block",t.fifty_fifty="fifty_fifty",t.formation_change="formation_change",t.foul_lost="foul_lost",t.foul_throw_in="foul_throw_in",t.foul_won="foul_won",t.freekick="freekick",t.freekick_cross="freekick_cross",t.german_duel_lost="german_duel_lost",t.german_duel_won="german_duel_won",t.goal="goal",t.goal_from_freekick="goal_from_freekick",t.goal_kick="goal_kick",t.goalkeeper_player="goalkeeper_player",t.goalkeeper_throw="goalkeeper_throw",t.injury_time_announcement="injury_time_announcement",t.interception="interception",t.keeper_pickup="keeper_pickup",t.keeper_sweeper="keeper_sweeper",t.keypass="keypass",t.off_target="off_target",t.official_change="official_change",t.offside="offside",t.offside_pass="offside_pass",t.offside_provoked="offside_provoked",t.on_target="on_target",t.other_ball_contact="other_ball_contact",t.out="out",t.penalty_faced="penalty_faced",t.penalty_missed="penalty_missed",t.player_change_number="player_change_number",t.player_change_position="player_change_position",t.player_becomes_goalkeeper="player_becomes_goalkeeper",t.player_off="player_off",t.player_on="player_on",t.player_retired="player_retired",t.player_returns="player_returns",t.possession_data="possession_data",t.punch="punch",t.push="push",t.recovery="recovery",t.referee_decision="referee_decision",t.referee_drop_ball="referee_drop_ball",t.rescinded_card="rescinded_card",t.resume="resume",t.save="save",t.shield_ball_opp="shield_ball_opp",t.shot_off_target="shot_off_target",t.shot_on_target="shot_on_target",t.smother="smother",t.successful_dribble="successful_dribble",t.successful_open_play_cross="successful_open_play_cross",t.successful_pass="successful_pass",t.successful_set_play_cross="successful_set_play_cross",t.sweeper="sweeper",t.tackle="tackle",t.tackle_lost="tackle_lost",t.tackle_won="tackle_won",t.take_on="take_on",t.team_setup="team_setup",t.temp_save="temp_save",t.through_ball="through_ball",t.throw_in="throw_in",t.unsuccessful_dribble="unsuccessful_dribble",t.unsuccessful_open_play_cross="unsuccessful_open_play_cross",t.unsuccessful_pass="unsuccessful_pass",t.unsuccessful_set_play_cross="unsuccessful_set_play_cross"}(e.EVENT_TYPE||(e.EVENT_TYPE={})),function(t){t.card="Card",t.end="End",t.goal="Goal",t.miss="Miss",t.penalty_miss="Penalty Miss",t.player_off="Player off",t.player_on="Player on",t.post="Post",t.shootout_goal="Shootout Goal",t.shootout_miss="Shootout Miss",t.start="Start",t.substitution="Substitution",t.whistle="Whistle"}(e.EVENT_TYPE_TITLE||(e.EVENT_TYPE_TITLE={})),function(t){t[t.end=30]="end",t[t.start=32]="start"}(e.EVENT_ID||(e.EVENT_ID={})),function(t){t[t.assisted=29]="assisted",t[t.corner=25]="corner",t[t.fast_break=23]="fast_break",t[t.free_kick=26]="free_kick",t[t.penalty=9]="penalty",t[t.regular=22]="regular",t[t.scramble=112]="scramble",t[t.set_piece=24]="set_piece",t[t.throw_in=160]="throw_in"}(e.PLAY_TYPE||(e.PLAY_TYPE={})),function(t){t[t.assisted=29]="assisted",t[t.corner=25]="corner",t[t.fast_break=23]="fast_break",t[t.free_kick=26]="free_kick",t[t.penalty=9]="penalty",t[t.regular=22]="regular",t[t.scramble=112]="scramble",t[t.set_piece=24]="set_piece",t[t.throw_in=160]="throw_in"}(e.PLAY_TYPE_OBJ||(e.PLAY_TYPE_OBJ={})),function(t){t[t.aerial=6021]="aerial",t[t.attack=13181]="attack",t[t.attempt_saved=5821]="attempt_saved",t.ball_position="Ball Pos",t[t.ball_recovery=6051]="ball_recovery",t[t.ball_touch=6171]="ball_touch",t[t.blocked_pass=6291]="blocked_pass",t.booking="Booking",t[t.breakaway=13191]="breakaway",t[t.caught_offside=6271]="caught_offside",t[t.challenge=6031]="challenge",t[t.chance_missed=6161]="chance_missed",t[t.claim=5781]="claim",t[t.clearance=5791]="clearance",t[t.coach_setup=6261]="coach_setup",t[t.collection_end=5961]="collection_end",t[t.condition_change=5871]="condition_change",t[t.corner_awarded=8611]="corner_awarded",t[t.corner_conceded=11721]="corner_conceded",t[t.corner_taken=8561]="corner_taken",t[t.cross_not_claimed=6091]="cross_not_claimed",t[t.danger_zone=13071]="danger_zone",t[t.dangerous_attack=13071]="dangerous_attack",t[t.defender_block=10521]="defender_block",t[t.delayed_start=11481]="delayed_start",t[t.deleted_event=6011]="deleted_event",t[t.disallowed_goal=1491]="disallowed_goal",t[t.dispossessed=6061]="dispossessed",t[t.double_yellow=671]="double_yellow",t[t.early_end=6301]="early_end",t[t.end=5911]="end",t[t.end_delay=5901]="end_delay",t[t.end_extra_time=8591]="end_extra_time",t[t.error=6071]="error",t[t.extra_half=341]="extra_half",t[t.extra_time=13171]="extra_time",t[t.failed_to_block=6241]="failed_to_block",t[t.fifty_fifty=6221]="fifty_fifty",t[t.first_half=511]="first_half",t[t.first_half_extra=331]="first_half_extra",t[t.flip_coin=13121]="flip_coin",t[t.formation_change=5991]="formation_change",t[t.foul=8291]="foul",t[t.foul_throw_in=6131]="foul_throw_in",t[t.freekick=8571]="freekick",t[t.fulltime=361]="fulltime",t[t.game_start=13161]="game_start",t[t.goal=71]="goal",t[t.goal_kick=8551]="goal_kick",t[t.goalkeeper_player=5861]="goalkeeper_player",t[t.half_time=301]="half_time",t[t.injury=8631]="injury",t[t.injury_time_announcement=6251]="injury_time_announcement",t[t.interception=5761]="interception",t[t.keeper_pickup=6081]="keeper_pickup",t[t.keeper_sweeper=6151]="keeper_sweeper",t[t.keeper_throw=3061]="keeper_throw",t[t.kick_off=511]="kick_off",t[t.minute_of_silence=13131]="minute_of_silence",t[t.miss=5801]="miss",t[t.national_anthem_singing=13101]="national_anthem_singing",t[t.official_change=5881]="official_change",t[t.offside_pass=5721]="offside_pass",t[t.offside_provoked=10531]="offside_provoked",t[t.other_ball_contact=6281]="other_ball_contact",t[t.out=5741]="out",t[t.own_goal=711]="own_goal",t[t.pass=5711]="pass",t[t.penalty_awarded=10541]="penalty_awarded",t[t.penalty_conceded=11891]="penalty_conceded",t[t.penalty_faced=6141]="penalty_faced",t[t.penalty_goal=681]="penalty_goal",t[t.penalty_miss=691]="penalty_miss",t[t.penalty_taken=11261]="penalty_taken",t[t.photo_taking=13151]="photo_taking",t[t.player_change_number=5951]="player_change_number",t[t.player_change_position=5941]="player_change_position",t[t.player_becomes_goalkeeper=5851]="player_becomes_goalkeeper",t[t.player_off=651]="player_off",t[t.player_off_pitch=6311]="player_off_pitch",t[t.player_on=661]="player_on",t[t.player_retired=5831]="player_retired",t[t.player_returns=5841]="player_returns",t[t.players_coming_out=13081]="players_coming_out",t[t.players_lined_up=13091]="players_lined_up",t[t.possession_data=6211]="possession_data",t[t.post=5811]="post",t[t.prize_ceremony=13141]="prize_ceremony",t[t.punch=6001]="punch",t[t.red=631]="red",t[t.referee_decision=6201]="referee_decision",t[t.referee_drop_ball=6231]="referee_drop_ball",t[t.rescinded_card=6041]="rescinded_card",t[t.resume=6191]="resume",t[t.safe_zone=13061]="safe_zone",t[t.save=5771]="save",t[t.second_half=8581]="second_half",t[t.second_half_extra=351]="second_half_extra",t[t.shake_hands=13111]="shake_hands",t[t.shield_ball_opp=6121]="shield_ball_opp",t[t.shootout=371]="shootout",t[t.shootout_end=8601]="shootout_end",t[t.shootout_goal=3951]="shootout_goal",t[t.shootout_miss=3961]="shootout_miss",t[t.shot_on_goal=10161]="shot_on_goal",t[t.smother=6101]="smother",t[t.start=5921]="start",t[t.start_delay=5891]="start_delay",t[t.substitution=8171]="substitution",t[t.tackle=5751]="tackle",t[t.take_on=5731]="take_on",t[t.team_setup=5931]="team_setup",t[t.temp_save=5771]="temp_save",t[t.throw_in=8541]="throw_in",t[t.throw_out=10571]="throw_out",t[t.yellow=641]="yellow"}(e.EVENT_TRN_ID||(e.EVENT_TRN_ID={})),function(t){t[t.aerial=6021]="aerial",t[t.attack=13181]="attack",t[t.attempt_saved=5821]="attempt_saved",t.ball_position="Ball Pos",t[t.ball_recovery=6051]="ball_recovery",t[t.ball_touch=6171]="ball_touch",t[t.blocked_pass=6291]="blocked_pass",t.booking="Booking",t[t.breakaway=13191]="breakaway",t[t.caught_offside=6271]="caught_offside",t[t.challenge=6031]="challenge",t[t.chance_missed=6161]="chance_missed",t[t.claim=5781]="claim",t[t.clearance=5791]="clearance",t[t.coach_setup=6261]="coach_setup",t[t.collection_end=5961]="collection_end",t[t.condition_change=5871]="condition_change",t[t.corner_awarded=8611]="corner_awarded",t[t.corner_conceded=11721]="corner_conceded",t[t.corner_taken=8561]="corner_taken",t[t.cross_not_claimed=6091]="cross_not_claimed",t[t.danger_zone=13071]="danger_zone",t[t.dangerous_attack=13071]="dangerous_attack",t[t.defender_block=10521]="defender_block",t[t.delayed_start=11481]="delayed_start",t[t.deleted_event=6011]="deleted_event",t[t.disallowed_goal=1491]="disallowed_goal",t[t.dispossessed=6061]="dispossessed",t[t.double_yellow=671]="double_yellow",t[t.early_end=6301]="early_end",t[t.end=5911]="end",t[t.end_delay=5901]="end_delay",t[t.end_extra_time=8591]="end_extra_time",t[t.error=6071]="error",t[t.extra_half=341]="extra_half",t[t.extra_time=13171]="extra_time",t[t.failed_to_block=6241]="failed_to_block",t[t.fifty_fifty=6221]="fifty_fifty",t[t.first_half=511]="first_half",t[t.first_half_extra=331]="first_half_extra",t[t.flip_coin=13121]="flip_coin",t[t.formation_change=5991]="formation_change",t[t.foul=8291]="foul",t[t.foul_throw_in=6131]="foul_throw_in",t[t.freekick=8571]="freekick",t[t.fulltime=361]="fulltime",t[t.game_start=13161]="game_start",t[t.goal=71]="goal",t[t.goal_kick=8551]="goal_kick",t[t.goalkeeper_player=5861]="goalkeeper_player",t[t.half_time=301]="half_time",t[t.injury=8631]="injury",t[t.injury_time_announcement=6251]="injury_time_announcement",t[t.interception=5761]="interception",t[t.keeper_pickup=6081]="keeper_pickup",t[t.keeper_sweeper=6151]="keeper_sweeper",t[t.keeper_throw=3061]="keeper_throw",t[t.kick_off=511]="kick_off",t[t.minute_of_silence=13131]="minute_of_silence",t[t.miss=5801]="miss",t[t.national_anthem_singing=13101]="national_anthem_singing",t[t.official_change=5881]="official_change",t[t.offside_pass=5721]="offside_pass",t[t.offside_provoked=10531]="offside_provoked",t[t.other_ball_contact=6281]="other_ball_contact",t[t.out=5741]="out",t[t.own_goal=711]="own_goal",t[t.pass=5711]="pass",t[t.penalty_awarded=10541]="penalty_awarded",t[t.penalty_conceded=11891]="penalty_conceded",t[t.penalty_faced=6141]="penalty_faced",t[t.penalty_goal=681]="penalty_goal",t[t.penalty_miss=691]="penalty_miss",t[t.penalty_taken=11261]="penalty_taken",t[t.photo_taking=13151]="photo_taking",t[t.player_change_number=5951]="player_change_number",t[t.player_change_position=5941]="player_change_position",t[t.player_becomes_goalkeeper=5851]="player_becomes_goalkeeper",t[t.player_off=651]="player_off",t[t.player_off_pitch=6311]="player_off_pitch",t[t.player_on=661]="player_on",t[t.player_retired=5831]="player_retired",t[t.player_returns=5841]="player_returns",t[t.players_coming_out=13081]="players_coming_out",t[t.players_lined_up=13091]="players_lined_up",t[t.possession_data=6211]="possession_data",t[t.post=5811]="post",t[t.prize_ceremony=13141]="prize_ceremony",t[t.punch=6001]="punch",t[t.red=631]="red",t[t.referee_decision=6201]="referee_decision",t[t.referee_drop_ball=6231]="referee_drop_ball",t[t.rescinded_card=6041]="rescinded_card",t[t.resume=6191]="resume",t[t.safe_zone=13061]="safe_zone",t[t.save=5771]="save",t[t.second_half=8581]="second_half",t[t.second_half_extra=351]="second_half_extra",t[t.shake_hands=13111]="shake_hands",t[t.shield_ball_opp=6121]="shield_ball_opp",t[t.shootout=371]="shootout",t[t.shootout_end=8601]="shootout_end",t[t.shootout_goal=3951]="shootout_goal",t[t.shootout_miss=3961]="shootout_miss",t[t.shot_on_goal=10161]="shot_on_goal",t[t.smother=6101]="smother",t[t.start=5921]="start",t[t.start_delay=5891]="start_delay",t[t.substitution=8171]="substitution",t[t.tackle=5751]="tackle",t[t.take_on=5731]="take_on",t[t.team_setup=5931]="team_setup",t[t.temp_save=5771]="temp_save",t[t.throw_in=8541]="throw_in",t[t.throw_out=10571]="throw_out",t[t.yellow=641]="yellow"}(e.EVENT_TRN_ID_OBJ||(e.EVENT_TRN_ID_OBJ={})),function(t){t[t.aerial=44]="aerial",t[t.attack=613]="attack",t[t.attempt_saved=15]="attempt_saved",t[t.ball_position=615]="ball_position",t[t.ball_recovery=49]="ball_recovery",t[t.ball_touch=61]="ball_touch",t[t.blocked_pass=74]="blocked_pass",t[t.breakaway=614]="breakaway",t[t.card=17]="card",t[t.caught_offside=72]="caught_offside",t[t.challenge=45]="challenge",t[t.chance_missed=60]="chance_missed",t[t.claim=11]="claim",t[t.clearance=12]="clearance",t[t.coach_setup=71]="coach_setup",t[t.collection_end=37]="collection_end",t[t.combined_subs=990]="combined_subs",t[t.condition_change=24]="condition_change",t[t.corner=6]="corner",t[t.cross_not_claimed=53]="cross_not_claimed",t[t.danger_zone=602]="danger_zone",t[t.delayed_start=75]="delayed_start",t[t.deleted_event=43]="deleted_event",t[t.dispossessed=50]="dispossessed",t[t.early_end=76]="early_end",t[t.end_of_period=30]="end_of_period",t[t.end_delay=28]="end_delay",t[t.error=51]="error",t[t.extra_time=612]="extra_time",t[t.failed_to_block=69]="failed_to_block",t[t.fifty_fifty=67]="fifty_fifty",t[t.flip_coin=607]="flip_coin",t[t.formation_change=40]="formation_change",t[t.foul=4]="foul",t[t.foul_throw_in=57]="foul_throw_in",t[t.game_about_to_start=611]="game_about_to_start",t[t.game_interruption=79]="game_interruption",t[t.goal=16]="goal",t[t.goalkeeper_becomes_player=23]="goalkeeper_becomes_player",t[t.good_skill=42]="good_skill",t[t.goal_deleted_after_review=84]="goal_deleted_after_review",t[t.injury_time_announcement=70]="injury_time_announcement",t[t.interception=8]="interception",t[t.keeper_pickup=52]="keeper_pickup",t[t.keeper_sweeper=59]="keeper_sweeper",t[t.minute_of_silence=608]="minute_of_silence",t[t.miss=13]="miss",t[t.national_anthem_singing=605]="national_anthem_singing",t[t.official_change=25]="official_change",t[t.offside_pass=2]="offside_pass",t[t.offside_provoked=55]="offside_provoked",t[t.other_ball_contact=73]="other_ball_contact",t[t.out=5]="out",t[t.pass=1]="pass",t[t.penalty_faced=58]="penalty_faced",t[t.photo_taking=610]="photo_taking",t[t.player_change_number=36]="player_change_number",t[t.player_change_position=35]="player_change_position",t[t.player_becomes_goalkeeper=22]="player_becomes_goalkeeper",t[t.player_off=18]="player_off",t[t.player_off_pitch=77]="player_off_pitch",t[t.player_on=19]="player_on",t[t.player_retired=20]="player_retired",t[t.player_returns=21]="player_returns",t[t.players_coming_out=603]="players_coming_out",t[t.players_lined_up=604]="players_lined_up",t[t.possession_data=66]="possession_data",t[t.post=14]="post",t[t.prize_ceremony=609]="prize_ceremony",t[t.punch=41]="punch",t[t.referee_decision=65]="referee_decision",t[t.referee_drop_ball=68]="referee_drop_ball",t[t.rescinded_card=47]="rescinded_card",t[t.resume=64]="resume",t[t.safe_zone=601]="safe_zone",t[t.save=10]="save",t[t.shake_hands=606]="shake_hands",t[t.shield_ball_opp=56]="shield_ball_opp",t[t.shootout_goal=78]="shootout_goal",t[t.shootout_miss=79]="shootout_miss",t[t.smother=54]="smother",t[t.start_of_period=32]="start_of_period",t[t.start_delay=27]="start_delay",t[t.sub_off=18]="sub_off",t[t.sub_on=19]="sub_on",t[t.tackle=7]="tackle",t[t.take_on=3]="take_on",t[t.team_setup=34]="team_setup",t[t.temp_attempt=39]="temp_attempt",t[t.temp_goal=38]="temp_goal",t[t.temp_save=63]="temp_save",t[t.turnover=9]="turnover"}(e.EVENT_TYPE_ID||(e.EVENT_TYPE_ID={})),function(t){t[t.aerial=44]="aerial",t[t.attack=613]="attack",t[t.attempt_saved=15]="attempt_saved",t[t.ball_position=615]="ball_position",t[t.ball_recovery=49]="ball_recovery",t[t.ball_touch=61]="ball_touch",t[t.blocked_pass=74]="blocked_pass",t[t.breakaway=614]="breakaway",t[t.card=17]="card",t[t.caught_offside=72]="caught_offside",t[t.challenge=45]="challenge",t[t.chance_missed=60]="chance_missed",t[t.claim=11]="claim",t[t.clearance=12]="clearance",t[t.coach_setup=71]="coach_setup",t[t.collection_end=37]="collection_end",t[t.combined_subs=990]="combined_subs",t[t.condition_change=24]="condition_change",t[t.corner=6]="corner",t[t.cross_not_claimed=53]="cross_not_claimed",t[t.danger_zone=602]="danger_zone",t[t.delayed_start=75]="delayed_start",t[t.deleted_event=43]="deleted_event",t[t.dispossessed=50]="dispossessed",t[t.early_end=76]="early_end",t[t.end_of_period=30]="end_of_period",t[t.end_delay=28]="end_delay",t[t.error=51]="error",t[t.extra_time=612]="extra_time",t[t.failed_to_block=69]="failed_to_block",t[t.fifty_fifty=67]="fifty_fifty",t[t.flip_coin=607]="flip_coin",t[t.formation_change=40]="formation_change",t[t.foul=4]="foul",t[t.foul_throw_in=57]="foul_throw_in",t[t.game_interruption=79]="game_interruption",t[t.game_about_to_start=611]="game_about_to_start",t[t.goal=16]="goal",t[t.goalkeeper_becomes_player=23]="goalkeeper_becomes_player",t[t.good_skill=42]="good_skill",t[t.goal_deleted_after_review=84]="goal_deleted_after_review",t[t.injury_time_announcement=70]="injury_time_announcement",t[t.interception=8]="interception",t[t.keeper_pickup=52]="keeper_pickup",t[t.keeper_sweeper=59]="keeper_sweeper",t[t.minute_of_silence=608]="minute_of_silence",t[t.miss=13]="miss",t[t.national_anthem_singing=605]="national_anthem_singing",t[t.official_change=25]="official_change",t[t.offside_pass=2]="offside_pass",t[t.offside_provoked=55]="offside_provoked",t[t.other_ball_contact=73]="other_ball_contact",t[t.out=5]="out",t[t.pass=1]="pass",t[t.penalty_faced=58]="penalty_faced",t[t.photo_taking=610]="photo_taking",t[t.player_change_number=36]="player_change_number",t[t.player_change_position=35]="player_change_position",t[t.player_becomes_goalkeeper=22]="player_becomes_goalkeeper",t[t.player_off=18]="player_off",t[t.player_off_pitch=77]="player_off_pitch",t[t.player_on=19]="player_on",t[t.player_retired=20]="player_retired",t[t.player_returns=21]="player_returns",t[t.players_coming_out=603]="players_coming_out",t[t.players_lined_up=604]="players_lined_up",t[t.possession_data=66]="possession_data",t[t.post=14]="post",t[t.prize_ceremony=609]="prize_ceremony",t[t.punch=41]="punch",t[t.referee_decision=65]="referee_decision",t[t.referee_drop_ball=68]="referee_drop_ball",t[t.rescinded_card=47]="rescinded_card",t[t.resume=64]="resume",t[t.safe_zone=601]="safe_zone",t[t.save=10]="save",t[t.shake_hands=606]="shake_hands",t[t.shield_ball_opp=56]="shield_ball_opp",t[t.shootout_goal=78]="shootout_goal",t[t.shootout_miss=79]="shootout_miss",t[t.smother=54]="smother",t[t.start_of_period=32]="start_of_period",t[t.start_delay=27]="start_delay",t[t.tackle=7]="tackle",t[t.take_on=3]="take_on",t[t.team_setup=34]="team_setup",t[t.temp_attempt=39]="temp_attempt",t[t.temp_goal=38]="temp_goal",t[t.temp_save=63]="temp_save",t[t.turnover=9]="turnover"}(e.EVENT_TYPE_ID_OBJ||(e.EVENT_TYPE_ID_OBJ={})),function(t){t[t.head=15]="head",t[t.left_foot=72]="left_foot",t[t.other_body_part=21]="other_body_part",t[t.right_foot=20]="right_foot"}(e.BODY_PART_EVENT||(e.BODY_PART_EVENT={})),function(t){t[t.ball_position=904]="ball_position",t[t.blocked=82]="blocked",t[t.blocked_pass=236]="blocked_pass",t[t.blocked_x=146]="blocked_x",t[t.blocked_y=147]="blocked_y",t[t.cancelled=901]="cancelled",t[t.corner=6]="corner",t[t.corner_taken=6]="corner_taken",t[t.cross=2]="cross",t[t.dangerous=903]="dangerous",t[t.def_block=94]="def_block",t[t.direction_of_play=127]="direction_of_play",t[t.double_yellow=32]="double_yellow",t[t.duel=284]="duel",t[t.foul=264]="foul",t[t.freekick=5]="freekick",t[t.goal_kick=124]="goal_kick",t[t.goal_mouth_y=102]="goal_mouth_y",t[t.goal_mouth_z=103]="goal_mouth_z",t[t.injury=41]="injury",t[t.keeper_throw=123]="keeper_throw",t[t.kick_off=279]="kick_off",t[t.message=905]="message",t[t.offside=247]="offside",t[t.overrun=211]="overrun",t[t.own_goal=28]="own_goal",t[t.pass_end_x=140]="pass_end_x",t[t.pass_end_y=141]="pass_end_y",t[t.penalty=9]="penalty",t[t.possible_event=900]="possible_event",t[t.put_through=266]="put_through",t[t.red=33]="red",t[t.related_event=55]="related_event",t[t.retake_event=902]="retake_event",t[t.saved_offline=101]="saved_offline",t[t.shot_direct_from_freekick=26]="shot_direct_from_freekick",t[t.through_ball=4]="through_ball",t[t.throw_in=107]="throw_in",t[t.throw_out=287]="throw_out",t[t.yellow=31]="yellow",t[t.offside_player_id=7]="offside_player_id"}(e.EVENT_QUALIFIER_ID||(e.EVENT_QUALIFIER_ID={})),function(t){t[t.ball_position=904]="ball_position",t[t.blocked=82]="blocked",t[t.blocked_pass=236]="blocked_pass",t[t.blocked_x=146]="blocked_x",t[t.blocked_y=147]="blocked_y",t[t.corner=6]="corner",t[t.corner_taken=6]="corner_taken",t[t.cross=2]="cross",t[t.dangerous=903]="dangerous",t[t.def_block=94]="def_block",t[t.direction_of_play=127]="direction_of_play",t[t.double_yellow=32]="double_yellow",t[t.duel=284]="duel",t[t.foul=264]="foul",t[t.freekick=5]="freekick",t[t.goal_kick=124]="goal_kick",t[t.goal_mouth_y=102]="goal_mouth_y",t[t.goal_mouth_z=103]="goal_mouth_z",t[t.injury=41]="injury",t[t.keeper_throw=123]="keeper_throw",t[t.kick_off=279]="kick_off",t[t.message=905]="message",t[t.offside=247]="offside",t[t.overrun=211]="overrun",t[t.own_goal=28]="own_goal",t[t.pass_end_x=140]="pass_end_x",t[t.pass_end_y=141]="pass_end_y",t[t.penalty=9]="penalty",t[t.possible_event=900]="possible_event",t[t.put_through=266]="put_through",t[t.red=33]="red",t[t.related_event=55]="related_event",t[t.retake_event=902]="retake_event",t[t.saved_offline=101]="saved_offline",t[t.shot_direct_from_freekick=26]="shot_direct_from_freekick",t[t.through_ball=4]="through_ball",t[t.throw_in=107]="throw_in",t[t.throw_out=287]="throw_out",t[t.yellow=31]="yellow"}(e.EVENT_QUALIFIER_ID_OBJ||(e.EVENT_QUALIFIER_ID_OBJ={})),function(t){t[t.aerial_foul=264]="aerial_foul",t[t.argument=35]="argument",t[t.attempted_tackle=265]="attempted_tackle",t[t.back_pass=95]="back_pass",t[t.block_by_hand=192]="block_by_hand",t[t.crowd_interaction=39]="crowd_interaction",t[t.dangerous_play=12]="dangerous_play",t[t.denied_goal_scoring_opp=289]="denied_goal_scoring_opp",t[t.dissent=184]="dissent",t[t.elbow_violent_conduct=296]="elbow_violent_conduct",t[t.encroachment=161]="encroachment",t[t.entering_field=163]="entering_field",t[t.excessive_celebration=38]="excessive_celebration",t[t.foul=13]="foul",t[t.foul_and_abusive_language=159]="foul_and_abusive_language",t[t.handball=10]="handball",t[t.indirect=241]="indirect",t[t.leaving_field=162]="leaving_field",t[t.no_impact_on_timing=172]="no_impact_on_timing",t[t.not_retreating=244]="not_retreating",t[t.obstruction=242]="obstruction",t[t.off_the_ball_foul=191]="off_the_ball_foul",t[t.other_reason=40]="other_reason",t[t.persistent_infringement=158]="persistent_infringement",t[t.professional_foul_handball=166]="professional_foul_handball",t[t.professional_foul_last_man=165]="professional_foul_last_man",t[t.referee_abuse=34]="referee_abuse",t[t.rescinded_card=171]="rescinded_card",t[t.serious_foul=245]="serious_foul",t[t.shirt_pull_holding=295]="shirt_pull_holding",t[t.shove_push=294]="shove_push",t[t.simulation=132]="simulation",t[t.six_seconds_violation=11]="six_seconds_violation",t[t.spitting=164]="spitting",t[t.time_wasting=37]="time_wasting",t[t.unsporting_behaviour=243]="unsporting_behaviour",t[t.violent_conduct=36]="violent_conduct"}(e.EVENT_CARD_REASON_ID||(e.EVENT_CARD_REASON_ID={})),function(t){t[t.aerial_foul=264]="aerial_foul",t[t.argument=35]="argument",t[t.attempted_tackle=265]="attempted_tackle",t[t.back_pass=95]="back_pass",t[t.block_by_hand=192]="block_by_hand",t[t.crowd_interaction=39]="crowd_interaction",t[t.dangerous_play=12]="dangerous_play",t[t.denied_goal_scoring_opp=289]="denied_goal_scoring_opp",t[t.dissent=184]="dissent",t[t.elbow_violent_conduct=296]="elbow_violent_conduct",t[t.encroachment=161]="encroachment",t[t.entering_field=163]="entering_field",t[t.excessive_celebration=38]="excessive_celebration",t[t.foul=13]="foul",t[t.foul_and_abusive_language=159]="foul_and_abusive_language",t[t.handball=10]="handball",t[t.indirect=241]="indirect",t[t.leaving_field=162]="leaving_field",t[t.no_impact_on_timing=172]="no_impact_on_timing",t[t.not_retreating=244]="not_retreating",t[t.obstruction=242]="obstruction",t[t.off_the_ball_foul=191]="off_the_ball_foul",t[t.other_reason=40]="other_reason",t[t.persistent_infringement=158]="persistent_infringement",t[t.professional_foul_handball=166]="professional_foul_handball",t[t.professional_foul_last_man=165]="professional_foul_last_man",t[t.referee_abuse=34]="referee_abuse",t[t.rescinded_card=171]="rescinded_card",t[t.serious_foul=245]="serious_foul",t[t.shirt_pull_holding=295]="shirt_pull_holding",t[t.shove_push=294]="shove_push",t[t.simulation=132]="simulation",t[t.six_seconds_violation=11]="six_seconds_violation",t[t.spitting=164]="spitting",t[t.time_wasting=37]="time_wasting",t[t.unsporting_behaviour=243]="unsporting_behaviour",t[t.violent_conduct=36]="violent_conduct"}(e.EVENT_CARD_REASON_ID_OBJ||(e.EVENT_CARD_REASON_ID_OBJ={}))},"./src/widget/football/live_action/getcomponents.ts":(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getComponents=void 0;e.getComponents=t=>{const e=void 0===t.show_dfp||Boolean(t.show_dfp),a=["generic/datatags","football/eventanimations","football/goalview","generic/matchHeader","football/rbvisevents","generic/matchEventTicker","football/eventanimations"];return(t.show_clock||t.show_timeline)&&a.push("generic/clockTime"),(t.show_attendance||t.show_referee)&&a.push("generic/matchdata"),e&&a.push("generic/ad"),t.weather_animation&&a.push("generic/weather"),t.goal_replay&&a.push("football/goal_replay_controls"),t.show_timeline&&(a.push("football/football_timeline"),a.push("generic/matchEvent")),a}},"./src/widget/football/live_action/live_action.ts":(t,e,a)=>{"use strict";a("./src/components/football/eventanimations.js"),a("./src/components/football/rbvisevents.js"),a("./src/components/football/goalview.js"),a("./src/components/football/goal_replay_controls/goal_replay_controls.ts"),a("./src/components/football/timeline/football_timeline.ts");const i=a("./src/tsmodules/Opta.ts"),s=a("./src/constants/widget/football/live_action.ts"),o=a("./src/widget/football/live_action/getcomponents.ts"),n=a("./src/widget/football/live_action/normal.ts"),r=a("./src/widget/football/live_action/plot.ts"),l=a("./src/widget/football/live_action/timeline.ts"),d=a("./src/widget/football/live_action/streamedEvent.ts"),_=i.default._;let p;class c extends i.default.m.FlyawayWidget{constructor(t){super(),this.bindNormal(),this.bindPlotEvent(),this.bindTimeline(),this.bindStreamedEvent(),this.show_dfp=void 0===t.attr.show_dfp||Boolean(t.attr.show_dfp),t.libs=["d3","perspectivetransform"],t.components=(0,o.getComponents)(t.attr),t.attr.redraw_on_resize=!1,this.init(t)}bindNormal(){this.addBackground=n.addBackground.bind(this),this.addBanners=n.addBanners.bind(this),this.addPitch=n.addPitch.bind(this),this.addBall=n.addBall.bind(this),this.addArrows=n.addArrows.bind(this),this.addClipPaths=n.addClipPaths.bind(this),this.showDfp=n.showDfp.bind(this),this.sfx=n.sfx.bind(this),this.getHtml=n.getHtml.bind(this),this.getMatchStatsTag=n.getMatchStatsTag.bind(this),this.getMatchCountdownTag=n.getMatchCountdownTag.bind(this),this.dfpPlayerHtml=n.dfpPlayerHtml.bind(this),this.getMatchHeader=n.getMatchHeader.bind(this),this.setSvgSizeClass=n.setSvgSizeClass.bind(this),this.styleLiveAction=n.styleLiveAction.bind(this)}bindPlotEvent(){this.plotEvent=r.plotEvent.bind(this),this.plotNotification=r.plotNotification.bind(this),this.plotConnectBall=r.plotConnectBall.bind(this),this.plotEventBall=r.plotEventBall.bind(this),this.plotConnectLine=r.plotConnectLine.bind(this),this.plotEventLine=r.plotEventLine.bind(this),this.plotSpecialEvent=r.plotSpecialEvent.bind(this),this.getArrowPoints=r.getArrowPoints.bind(this),this.plotArrow=r.plotArrow.bind(this),this.hideMarker=r.hideMarker.bind(this),this.showMarker=r.showMarker.bind(this)}bindTimeline(){this.redrawTimeline=l.redrawTimeline.bind(this),this.initTimeline=l.initTimeline.bind(this),this.setupTimeline=l.setupTimeline.bind(this),this.drawTimeline=l.drawTimeline.bind(this),this.getTimelineEventTypes=l.getTimelineEventTypes.bind(this),this.addTimelineEventHandler=l.addTimelineEventHandler.bind(this)}bindStreamedEvent(){this.isKeyEvent=d.isKeyEvent.bind(this),this.isClearEvent=d.isClearEvent.bind(this),this.isBreakInPlay=d.isBreakInPlay.bind(this),this.eventSideUp=d.eventSideUp.bind(this),this.eventSideUpWithPartner=d.eventSideUpWithPartner.bind(this),this.modifyEvent=d.modifyEvent.bind(this),this.modifyPem=d.modifyPem.bind(this),this.addPitchPos=d.addPitchPos.bind(this),this.isShowStatsEvent=d.isShowStatsEvent.bind(this),this.isEventBehindEndlines=d.isEventBehindEndlines.bind(this),this.getMarkerType=d.getMarkerType.bind(this),this.getHideDirectionOfPlay=d.getHideDirectionOfPlay.bind(this),this.getEventNoBall=d.getEventNoBall.bind(this),this.getShowSide=d.getShowSide.bind(this),this.positionEventSwitcher=d.positionEventSwitcher.bind(this),this.insertOnDuplicateUpdate=d.insertOnDuplicateUpdate.bind(this),this.sortEvents=d.sortEvents.bind(this),this.isNewOrWorthyEdit=d.isNewOrWorthyEdit.bind(this),this.newSpecialEvent=d.newSpecialEvent.bind(this),this.shootoutSkipEvent=d.shootoutSkipEvent.bind(this),this.streamedEvent=d.streamedEvent.bind(this)}onInit(){const t=i.default.Trans.getText({title:11251,vs:431,dfp_text:14861});this.text=t,"optimal"===this.attr.data_type?this.checkMatchCoverage(this.attr).done((()=>this.runWidget())):this.runWidget()}checkMatchCoverage(t){const e=i.default.Deferred();return i.default.api.getFootballMatch({origin:"OW",source:"csb_coverage",params:{sport:"football",competition_id:t.competition,season_id:t.season,match_id:t.match,data_type:["coverage"]},done:t=>{this.getMatchCoverage(t),e.resolve(t)},fail:t=>{this.handleError(t,this.text.title),e.reject(t)}}),e}getMatchCoverage(t){const e=this.attr;t.coverage.forEach((t=>{t.opta_id!==Number(e.match)&&t.sdapi_id!==e.match||(e.data_type=this.setDataType(t))})),_.contains(s.testing_sdapi_ids,e.match)?e.data_type="runningball":_.contains(s.testing_opta_ids,e.match)&&(e.data_type="opta")}setAnimationSpeed(t){const e=s.animation_speed[this.attr.animation_speed]||s.animation_speed.normal;return t===s.FAST_FORWARD?400:e}runWidget(){const t=this.attr;let e,a;const o=i.default.Deferred(),n=i.default.Deferred(),r=i.default.Deferred();switch(p=i.default.d3,this.dfp_autoplay=void 0===t.dfp_autoplay||t.dfp_autoplay,this.dfp_muted=void 0===t.dfp_mute||t.dfp_mute,!0===t.playback_mode&&(i.default.AppSettings.hive_prod_test=!0),t.dfp_playstate){case"Autoplay, mute":this.dfp_autoplay=!0,this.dfp_muted=!0;break;case"Manually play, unmute":this.dfp_autoplay=!1,this.dfp_muted=!1;break;case"Manually play, mute":this.dfp_autoplay=!1,this.dfp_muted=!0}this.dfp_autoplay&&!this.dfp_muted&&(this.dfp_muted=!0),this.is_3D="2D"!==t.dimension,this.use_flattened=this.is_3D&&!0===t.flattened_background,this.has_ticker=!this.is_3D&&"runningball"!==t.data_type,this.layer={},this.sprite={},this.goal_replay=this.attr.goal_replay&&"runningball"!==this.attr.data_type,this.resources={},this.image_breakpoints=[300,600],this.hive_event_type="runningball"===t.data_type?"PEM":"POEM",this.is_premium="POEM"===this.hive_event_type,this.in_replay_mode=!1,this.plot_events=i.default.utils.minMax(Number(t.plot_events)||5,1,5),this.last_third_pos=2,this.last_vertical_pos=2,this.highest_event_time_key="0",this.pitch_ratio=16/9,this.home_score={},this.away_score={},this.last_match_period_id=1,this.zoom_enabled=!!this.attr.zoom&&"runningball"!==t.data_type,this.is_panning_mode=this.is_narrow&&"runningball"!==t.data_type,this.event_animation_duration=this.setAnimationSpeed(s.DEFAULT_SPEED),this.highest_res=this.getSize(),this.perspT=new i.default.perspective.PerspT([0,100,100,100,100,0,0,0],this.is_3D?[149,229,651,229,777,378,23,378]:[55,22,745,22,745,430,55,430]),this.perspTVLeft=new i.default.perspective.PerspT([0,0,0,100,100,100,100,0],this.is_3D?[22,379,22,324,150,189,150,226]:[55,430,55,22,50,22,50,430]),this.perspTVRight=new i.default.perspective.PerspT([0,0,0,100,100,100,100,0],this.is_3D?[779,379,779,324,648,189,648,226]:[745,430,745,22,750,22,750,430]),p.selection.prototype.moveToFront=function(){return this.each((function(){this.parentNode.appendChild(this)}))},this.match_stats_id=this.id+"_a",this.match_countdown_id=this.id+"_b",this.nested_html={matchstats:this.getMatchStatsTag()},!1!==t.show_match_countdown&&(this.nested_html.match_countdown=this.getMatchCountdownTag()),this.events_panels={},this.events=[],this.event_buffer=[],this.highest_time=0,this.played_event_ids={},this.currently_drawing=!1,this.special_event_ids=[...s.special_event_ids],this.dedupe_event_ids=[...s.dedupe_event_ids],this.ignore_event_ids=[...s.ignore_event_ids],this.is_premium||this.ignore_event_ids.push(28),this.noplot_event_ids=[...s.noplot_event_ids],this.players={},i.default.api.getFootballMatch({origin:"OW",params:{sport:"football",competition_id:t.competition,season_id:t.season,match_id:t.match,data_type:["match"],prematch:!0,fixed_sides:!0,lineups:!0,trn:{comps:!0,teams:!0,team_players:!0,venues:this.attr.show_venue},live:!0,max_age:30},done:t=>{this.match&&!this.match.isPreMatch()||(this.match=t.match,this.players=i.default.extend(!0,{},this.match.home.players,this.match.away.players),this.match.isPreMatch()||e.cancel(),n.resolve())},fail:t=>{n.reject(),this.handleError(t,this.text.title)}}).done((t=>{e=t,this.subscriptions.push(t)})),t.team_colours?(this.tk_timeout=setTimeout((()=>{r.resolve()}),3e3),i.default.api.getTeamKit({origin:"OW",params:{sport:t.sport,competition_id:t.competition,season_id:t.season,match_id:t.match},done:t=>{clearTimeout(this.tk_timeout),this.team_kits=t,this.EventAnimations&&this.EventAnimations.setTeamKits(t),this.first_time||(this.styleLiveAction(),this.EventTicker&&this.EventTicker.addTeamKits(t)),r.resolve()},fail:()=>{clearTimeout(this.tk_timeout),r.resolve()}}).done((t=>{this.subscriptions.push(t)}))):r.resolve(),t.show_weather||t.weather_animation?i.default.api.getFootballMatch({origin:"OW",source:"hive",data_type:"GCC",params:{competition_id:t.competition,season_id:t.season,match_id:t.match,max_age:30},done:t=>{const e=t.match.conditions;a.cancel(),this.conditions=e,e&&this.dom.find("> .Opta-Cf").data("weather",this.getWeather()).data("ground",this.getGroundCondition()),o.resolve()}}).done((t=>{a=t,this.subscriptions.push(t)})):o.resolve(),i.default.when(n,r,o).done((()=>{this.conditions||!t.weather_id&&!t.ground_id||(this.conditions=new i.default.m.GenericMatchConditions({})),t.weather_id&&(this.conditions.weather=t.weather_id),t.ground_id&&(this.conditions.ground=t.ground_id),this.match.isFinished()&&(this.has_ticker=!1),this.preloadImages("initial").always((()=>{this.draw()}))}))}setDataType(t){return t.coverage>=13?"opta":t.rbid?"runningball":void 0}preloadImages(t){const e=i.default.Deferred();let a,s,o=0;const n=()=>{o+=1,o===a&&e.resolve()},r=(e,a)=>{let s,o;switch(a){case 1:o={weather:"normal",ground_condition:"normal"};break;case 2:o={defaults:!0}}return s=this.getResources(t,o)[e],this.resources[e]=s,i.default.preload(s)};return s=this.getResources(t),a=_.size(s),_.each(s,((t,e)=>{i.default.preload(t).done((()=>{this.resources[e]=t,n()})).fail((()=>{r(e,1).done(n).fail((()=>{r(e,2).always(n)}))}))})),e}getPos(t,e){return this.perspT.transform(t,e)}getRBVisPos(t,e){return this.perspT.transform(t,e)}getVPos(t,e,a){return t<50?this.perspTVLeft.transform(e,a):this.perspTVRight.transform(e,a)}getWeather(){const t=this.conditions;let e="normal";return t&&(t.isSnowyWeather()?e="snow":t.isRainyWeather()&&(e="rain")),e}getGroundCondition(){const t=this.conditions;let e="normal";return t&&(t.isSnowyGround()?e="snow":t.isFrostyGround()&&(e="frost")),e}getResources(t,e){const a=this.width,i=e||{},s=this.image_breakpoints,o=i.weather||this.getWeather(),n=i.ground_condition||this.getGroundCondition();let r="narrow";const l={all:(this.is_3D?this.use_flattened?["flattened_background"]:["premium_background","premium_banner","premium_pitch"]:["flat_pitch"]).concat(["premium_goal","premium_ball"]),after_load:["premium_goal"]},d={};return l.initial=l.all,a>s[1]?r="wide":a>s[0]&&(r="normal"),l[t||"all"].forEach((e=>{const a="initial"===t?"narrow":r,s=this.getConfig("football.image."+e,{SIZE:a,WEATHER:o,GROUND_CONDITION:n,BRANDING:this.attr.branding||"stats_perform"},i.defaults);d[e]=s}),this),d}dedupeEvents(t,e){const a=[18,19],i=a.indexOf(t.type_id)>-1&&a.indexOf(e.type_id)>-1&&t.type_id!==e.type_id;return!(!this.is_panning_mode||!(this.dedupe_event_ids.indexOf(t.type_id)>-1&&t.type_id===e.type_id||i))&&(t.partner=e,i&&(t.paired_sub_event=!0),t)}getThirdPos(t){let e=2;const a=this.last_third_pos;return 2===a&&t>22&&t<78?e=2:1===a&&t<40?e=1:3===a&&t>60?e=3:t<25?e=1:t>75&&(e=3),e}getVerticalPos(t){let e=2;const a=this.last_vertical_pos;return 2===a&&t>22&&t<78?e=2:1===a&&t<40?e=1:3===a&&t>60?e=3:t<25?e=1:t>75&&(e=3),e}clear(){this.dom.find(".Opta-linegroup").remove(),this.RbVisEvents.clear(),this.sprite.ball.classed("Opta-Hidden",!0),this.PreviousEvent&&this.hideMarker(this.PreviousEvent,!0),this.attr.show_direction_of_play&&[this.sprite.arrow_home,this.sprite.arrow_away].forEach((t=>{t.attr("opacity",0)})),this.EventAnimations&&this.EventAnimations.clearNotifications()}goalReplay(t){const e=this.match.replay.replay.replay_items[t],a=e&&e.events;if(a){this.pauseLiveState();for(let t=0;t<a.length;t++){const e=a[t];e.is_last_replay_event=t+1===a.length,e.is_replay_event=!0,this.streamedEvent(e)}}}pauseLiveState(){this.in_replay_mode=!0,this.clear(),this.PreviousEvent=void 0,this.highest_event_time_key="0",this.played_event_ids={},this.events=[],this.event_buffer=[],this.currently_drawing=!1}resumeLiveState(){this.currently_drawing=!1,this.event_buffer=[],this.in_replay_mode=!1,this.clear(),i.default.events.publish("goal_replay.finished"),this.isMatchBetweenPeriods(this.match.period_id)&&this.showMatchStats()}limitEventTrail(t){const e=this.layer.lines.selectAll("g.Opta-linegroup")[0],a=this.event_animation_duration;let s,o,n;e.length>this.plot_events&&(s=p.select(e[0]),o=s.selectAll("path"),n=o[0].length,s.select("ellipse.Opta-connectpath").remove(),n?o.each((function(e,o){const r=p.select(this),l=r.attr("d").split(" ");l[1]=l[4],l[2]=l[5],r.attr("data-idx",o).transition().duration(t?a/n:0).delay(t?a/n*o:0).ease("cubit-out").attr("d",l.join(" ")).style("opacity",0).each("end",(()=>{+(0,i.default)(this).data("idx")==n-1&&s.remove()})).remove()})):s.remove())}updateNestedWidgets(t){this.nested_widgets&&this.nested_widgets.forEach((e=>{e instanceof i.default.widget.football.matchstats||(e.match=t||this.match,e.draw())}))}isOnTheLeftSideOfPitch(t){return"home"===t&&!i.default.AppSettings.rtl||i.default.AppSettings.rtl&&"away"===t}async eventLoop(){if(this.event_buffer&&this.event_buffer.length<=1&&(this.event_animation_duration=this.setAnimationSpeed(s.DEFAULT_SPEED)),this.currently_drawing||!this.event_buffer||!this.event_buffer.length)return;this.currently_drawing=!0,this.currentEvent=this.event_buffer.shift();const t=this.in_replay_mode&&this.currentEvent.is_replay_event||!1===this.in_replay_mode;if(this.currentEvent.clear_event&&this.clear(),t){const t=setTimeout((()=>{this.currently_drawing=!1,this.eventLoop()}),12e4);if(this.hideMatchStats(),await this.plotEvent(this.currentEvent,!0),this.PreviousEvent=this.currentEvent,i.default.events.drawn(this),this.currently_drawing=!1,clearTimeout(t),this.currentEvent.is_last_replay_event)return}this.currently_drawing=!1,this.eventLoop()}fastForwardLive(){const t=(this.event_buffer||[]).length,e=this.is_premium?this.attr.resume_events_limit||5:2;t>e&&(this.event_buffer.splice(0,t-e),this.clear(),this.EventAnimations&&this.EventAnimations.clearNotifications(),this.currently_drawing=!1,this.PreviousEvent=void 0,this.event_animation_duration=this.setAnimationSpeed(s.FAST_FORWARD),this.eventLoop())}upgradeResourceSize(){this.highest_res=this.getSize(),this.preloadImages("all").always((()=>{const t=this.dom;this.use_flattened?t.find('[data-layer="pitch"] > image').attr("href",this.resources.flattened_background):this.is_3D?(t.find('[data-layer="background"] > image').attr("href",this.resources.premium_background),t.find('[data-layer="banners"] > image').attr("href",this.resources.premium_banner),t.find('[data-layer="pitch"] > image').attr("href",this.resources.premium_pitch)):t.find('[data-layer="pitch"] > image').attr("href",this.resources.flat_pitch)}))}isFlyawayPoppedInNarrow(){return!(!this.poppable||!this.popped)&&(this.is_narrow||Math.min(window.innerWidth,window.innerHeight)<=this.getBreakPoints()[0])}updateMatchHeader(t){this.attr.show_match_header&&this.dom.find(".Opta_F_LA > .Opta-matchheader").html(this.getMatchHeader(t))}onResize(){var t;const e=this.dom.find(".Opta-FootballPerspectivePitch"),a=e.find("svg"),i=this.getSize(),s=this.highest_res;a.attr({width:e.width(),height:e.width()/this.pitch_ratio}),this.setSvgSizeClass(),this.is_narrow&&"runningball"!==this.attr.data_type?this.is_panning_mode=!0:this.is_wide&&(this.is_panning_mode=!1),this.dom.find('.Opta-zoom[data-type="'+(this.is_panning_mode?"+":"-")+'"]').addClass("Opta-Disabled"),this.dom.find('.Opta-zoom[data-type="'+(this.is_panning_mode?"-":"+")+'"]').removeClass("Opta-Disabled"),this.updateViewbox(),this.EventAnimations&&this.EventAnimations.resize(this.width),"Narrow"!==s||"Normal"!==i&&"Wide"!==i?"Normal"===s&&"Wide"===i&&this.upgradeResourceSize():this.upgradeResourceSize(),this.dom.find(".Opta-EventTicker-List").css("height",this.is_wide?this.dom.find(".Opta-FootballPerspectivePitch").height():""),this.updateMatchHeader(),this.advertisement&&this.advertisement.resize(),this.goal_replay&&this.goal_replay_controls&&this.goal_replay_controls.redraw(),this.football_timeline&&(this.football_timeline.update({event_types:this.getTimelineEventTypes()}),this.drawTimeline(),this.addTimelineEventHandler(),this.football_timeline.runTooltipsSfx(),this.football_timeline.adjust(),null===(t=this.clockTicker)||void 0===t||t.update(this.match))}updateViewbox(t,e,a){const i=this.layer.svg,s=450;let o=0,n=0,r=800,l=s;if(this.first_time||t!==this.last_third_pos||e!==this.last_vertical_pos||this.is_panning_mode!==this.last_panning_mode){if(t=t||this.last_third_pos,e=e||this.last_vertical_pos,this.is_panning_mode){switch(r*=.5,l*=.5,t){case 2:o=r/2;break;case 3:o=r}if(this.is_3D)switch(e){case 1:n=157.5;break;case 2:n=112.5;break;case 3:n=67.5}else switch(e){case 1:n=225;break;case 2:n=112.5;break;case 3:n=0}}this.first_time?i.attr("viewBox",o+" "+n+" "+r+" "+l):i.transition().duration(a||0).attr("viewBox",o+" "+n+" "+r+" "+l),this.dom.toggleClass("Opta-PanningMode",this.is_panning_mode),this.last_third_pos=t,this.last_vertical_pos=e,this.last_panning_mode=this.is_panning_mode}}showMatchCountdown(){this.dom.find(".Opta-countdownoverlay").hasClass("Opta-Hidden")&&(this.hideMatchStats(),this.dom.find(".Opta-layer1").css("visibility","hidden"),this.dom.find(".Opta-countdownoverlay").removeClass("Opta-Hidden"),i.default.widgets[this.match_countdown_id]&&i.default.widgets[this.match_countdown_id].resume())}hideMatchCountdown(){this.dom.find(".Opta-countdownoverlay").hasClass("Opta-Hidden")||(this.dom.find(".Opta-countdownoverlay").addClass("Opta-Hidden"),this.dom.find(".Opta-layer1").css("visibility","visible"),i.default.widgets[this.match_countdown_id]&&i.default.widgets[this.match_countdown_id].pause())}showMatchStats(){const t=()=>{this.clear(),this.hideMatchCountdown(),this.dom.find(".Opta-layer1").css("visibility","hidden");const t=this.match.getPeriodStr();t&&t[0]&&this.dom.find(".Opta-statsoverlay > h3").text(t[0]),this.dom.find(".Opta-statsoverlay").removeClass("Opta-Hidden")};if(!i.default.widgets[this.match_stats_id])return t();i.default.widgets[this.match_stats_id].resume(i.default.widgets[this.match_stats_id].attr.live,i.default.widgets[this.match_stats_id].first_time),this.matchstats_draw_subscription||(this.matchstats_draw_subscription=i.default.events.subscribe("widget.drawn",(e=>{this.match_stats_id===e.widget.id&&t()})))}onDestroy(){var t;null===(t=this.matchstats_draw_subscription)||void 0===t||t.unsubscribe(),this.matchstats_draw_subscription=void 0}hideMatchStats(){this.dom.find(".Opta-statsoverlay").addClass("Opta-Hidden"),this.dom.find(".Opta-layer1").css("visibility","visible"),i.default.widgets[this.match_stats_id]&&i.default.widgets[this.match_stats_id].pause()}addEventFeedSubscription(){if(this.hive_sub)return;this.hive_sub=!0;const t=this.attr;let e,a;const o=t=>{let i=!1;this.is_premium&&this.dedupe_event_ids.indexOf(t.type_id)>-1?(a&&a.type_id===t.type_id&&(a.partner=t,clearTimeout(e),e=null,this.streamedEvent(a),a=null,i=!0),i||(e&&(clearTimeout(e),e=null,this.streamedEvent(a),a=null),a=t,e=setTimeout((()=>{e=null,this.streamedEvent(a),a=null}),3e3))):(e&&(clearTimeout(e),e=null),a&&(this.streamedEvent(a),a=null),this.streamedEvent(t))};i.default.api.getFootballMatch({origin:"OW",data_type:this.goal_replay?"matcheventstats":this.hive_event_type,source:this.goal_replay?"sddp":"hive",sync:!0,params:{competition_id:t.competition,data_type:this.goal_replay?"matcheventstats":this.hive_event_type,fixed_sides:!0,goal_replay:this.goal_replay,live:this.live,match_id:t.match,max_age:this.goal_replay?8400:30,sddp_replay:t.sddp_replay,season_id:t.season,trn:{teams:!0,team_players:!0,venues:!0}},done:t=>{if(this.match=t.match,(this.home_score.half_time!==t.match.home.score.half_time||this.away_score.half_time!==t.match.away.score.half_time||this.home_score.total!==t.match.home.score.total||this.away_score.total!==t.match.away.score.total||this.match.period_id&&this.match.period_id!==this.last_match_period_id||t.event&&30===t.event.type_id)&&(t.match.period_id||(t.match.period_id=this.match.period_id),this.match=t.match,this.home_score=Object.assign({},this.match.home.score),this.away_score=Object.assign({},this.match.away.score),this.last_match_period_id=this.match.period_id.valueOf(),this.updateMatchHeader(t.match)),!t.update_only_header)if(this.match.isPreMatch())this.showMatchCountdown();else{if(this.hideMatchCountdown(),this.clockTicker&&this.clockTicker.update(this.match),this.football_timeline&&t.event&&this.football_timeline.adjust(this.match),t.event&&t.event.out_of_play&&-1===s.out_of_play_ignore_event_ids.indexOf(t.event.type_id))return this.updateNestedWidgets(t.match),this.showMatchStats(),void this.updateMatchHeader(t.match);!t.event||this.in_replay_mode||this.isMatchBetweenPeriods(t.match.period_id)||o(t.event)}},fail:t=>{this.handleError(t,this.text.title)}}).done((t=>{this.subscriptions.push(t)}))}isMatchBetweenPeriods(t){switch(t){case 3:case 7:case 9:return!0;default:return!1}}initGoalReplay(){this.goal_replay&&(this.goal_replay_controls=new i.default.components.football.goal_replay_controls({abort_callback:this.resumeLiveState.bind(this),container_selector:".Opta-goalreplay-controls",replay_callback:this.goalReplay.bind(this),widget:this}),this.attr.show_timeline&&(i.default.events.subscribe("goal_replay.init",(t=>this.goalReplayInitHandler(t))),i.default.events.subscribe("goal_replay.update_whistle_events",(t=>this.redrawTimeline(t)))),i.default.events.subscribe("goal_replay.period_update",(t=>{32===t.type_id?this.hideMatchStats():(this.updateNestedWidgets(),this.showMatchStats())})))}goalReplayInitHandler(t){this.football_timeline?this.redrawTimeline(t):this.initTimeline(t)}updateClockTicker(){var t;null===(t=this.clockTicker)||void 0===t||t.update(this.match)}onResume(){this.fastForwardLive()}template_normal(){return{title:this.text.title[0],html:this.getHtml(),sfx:()=>this.sfx()}}}i.default.widget.football.live_action=c},"./src/widget/football/live_action/normal.ts":(t,e,a)=>{"use strict";var i=a("./src/bootstrap_opta.ts").Z._;Object.defineProperty(e,"__esModule",{value:!0}),e.getMatchCountdownTag=e.getMatchStatsTag=e.getHtml=e.getMatchHeader=e.dfpPlayerHtml=e.sfx=e.styleLiveAction=e.setSvgSizeClass=e.showDfp=e.addClipPaths=e.addArrows=e.addBall=e.addPitch=e.addBanners=e.addBackground=void 0;const s=a("./src/tsmodules/Opta.ts");e.addBackground=function(){const t=this.layer.background,e=this.resources;t.append("image").attr({"xlink:href":e.premium_background,width:"800px",height:"450px"})},e.addBanners=function(){const t=this.layer.banners,e=this.resources;t.append("image").attr({"xlink:href":e.premium_banner,width:"842px",height:"198.7px",x:"-21px",y:"193.5px"})},e.addPitch=function(){const t=this.layer.pitch,e=this.resources;this.use_flattened?t.append("image").attr({"xlink:href":e.flattened_background,width:"800px",height:"450px"}):this.is_3D?t.append("image").attr({"xlink:href":e.premium_pitch,width:"860px",height:"261.28px",x:"-30px",y:"215px"}):t.append("image").attr({"xlink:href":e.flat_pitch,width:"800px",height:"450px"})},e.addBall=function(){const t=this.getPos(50,50),e=this.layer.events,a=this.layer.defs,i=this.resources,s=()=>{this.sprite.ball=e.append("image").attr({class:"Opta-ball Opta-Hidden","xlink:href":i.premium_ball,width:"13px",height:"13px",x:t[0],y:t[1],transform:this.is_3D?"translate(-6.5, -12)":"translate(-6.5, -6.5)"})};this.is_3D||s();const o=e.append("g").attr({class:"Opta-playermarker",transform:"translate("+t[0]+","+t[1]+") scale(0)"}),n=o.append("g").attr({class:"Opta-playerbubble"});this.sprite.marker=o,this.sprite.bubble=n,this.is_3D&&n.append("path").attr({class:"Opta-bubblemain",d:"M 0 0 L 20 -22 A 29 29, 0, 1, 0, -20 -22 Z",fill:"rgba(255,255,255,0.2)"}),n.append("circle").attr({class:"Opta-bubbleoutercircle",cx:0,cy:this.is_3D?-43:0,r:20.5,fill:"#d8d8d8"}),n.append("circle").attr({class:"Opta-bubbleinnercircle",cx:0,cy:this.is_3D?-43:0,r:16.5,fill:"#fff"});const r=a.append("linearGradient").attr({id:this.id+"-cylinderbottomgradientdef",class:"Opta-cyclindergradient"});r.append("stop").attr({class:"stop1",offset:"0%"}),r.append("stop").attr({class:"stop2",offset:"100%"}),this.sprite.cylindergradient=r,o.append("path").attr({class:"Opta-cylinderbottom",d:this.is_3D?"M -7.5 0 L -7.5 2 A 1 0.3, 0, 1, 0 7.5 2 L 7.5 0 Z":"",fill:"url(#"+this.id+"-cylinderbottomgradientdef)"}),this.sprite.cylindertop=o.append("ellipse").attr({class:"Opta-cylindertop",cx:0,cy:0,rx:this.is_3D?7.5:0,ry:this.is_3D?2:0}),this.sprite.bubbleText=n.append("text").attr({transform:this.is_3D?"translate(0, -35)":"translate(0, 7)"}).text(""),this.is_3D&&s()},e.addArrows=function(){const t=this.layer.defs,e=this.layer.arrows;let a=t.append("radialGradient").attr({id:this.id+"-homedirectionofplaygradientdef",class:"Opta-directionofplaygradient",cx:-.2,r:1});a.append("stop").attr({class:"stop1",offset:"50%"}),a.append("stop").attr({class:"stop2",offset:"100%"}),this.sprite.arrow_home=e.append("polygon").classed("Opta-directionofplay Opta-HomeTeam",!0).attr({points:this.getArrowPoints(50,"home"),fill:"url(#"+this.id+"-homedirectionofplaygradientdef)",opacity:0}),a=t.append("radialGradient").attr({id:this.id+"-awaydirectionofplaygradientdef",class:"Opta-directionofplaygradient",cx:1.2,r:1}),a.append("stop").attr({class:"stop1",offset:"50%"}),a.append("stop").attr({class:"stop2",offset:"100%"}),this.sprite.arrow_away=e.append("polygon").classed("Opta-directionofplay Opta-AwayTeam",!0).attr({points:this.getArrowPoints(50,"away"),fill:"url(#"+this.id+"-awaydirectionofplaygradientdef)",opacity:0}),e.attr("clip-path","url(#"+this.id+"-clippathpitch)")},e.addClipPaths=function(){const t=this.getPos(0,0),e=this.getPos(100,0),a=this.getPos(100,100),i=this.getPos(0,100);this.layer.defs.append("clipPath").attr({id:this.id+"-clippathpitch"}).append("polygon").attr({points:[t.join(","),e.join(","),a.join(","),i.join(",")].join(" ")})},e.showDfp=function(){const t=this.attr;if(this.dom.find(".Opta-Ad-Player > span").remove(),this.show_dfp){let e,a,i,o,n,r;const l=(t,e)=>{null==t||t.toggleClass("Opta-Hidden",e)},d=()=>{e=this.dom.find(".Opta-statsoverlay"),a=this.dom.find(".Opta-countdownoverlay"),i=this.dom.find(".Opta-EventAnimations"),o=this.dom.find(".Opta-RbVisEvents"),n=!e.hasClass("Opta-Hidden"),r=!a.hasClass("Opta-Hidden")},_=t=>{l(i,t),l(o,t),n&&l(e,t),r&&l(a,t)};this.advertisement=s.default.components.generic.ad({containerElement:(0,s.default)(this.wid+"_ad")[0],params:{autoplay:this.dfp_autoplay,dfp_controls:!0,dfp_initial_delay:Number(t.dfp_initial_delay),dfp_iu:t.dfp_iu,dfp_mode:t.dfp_mode,dfp_partner_id:s.default.AppSettings.dfp_partner_id,dfp_ad_url:t.dfp_ad_url,dfp_region:s.default.AppSettings.dfp_region,dfp_ad_spacing:t.dfp_ad_spacing,environment:s.default.AppSettings.dfp_env,muted:this.dfp_muted,position:"preroll",sport:s.default.utils.getDFPSport(t.sport_id),videocontrols:!0},uid:this.uid}),s.default.events.subscribe("advertisement.request",(()=>{this.advertisement.hasRecentDfp()||this.dom.find(".Opta-Ad").removeClass("Opta-Hidden")})),s.default.events.subscribe("advertisement.start",(()=>{d(),this.advertisement.resize(),_(!0)})),s.default.events.subscribe("advertisement.skip",(()=>{this.dom.find(".Opta-Ad").addClass("Opta-Hidden"),_(!1)})),s.default.events.subscribe("advertisement.stop",(()=>{this.dom.find(".Opta-Ad").addClass("Opta-Hidden"),_(!1),this.advertisement.setAdStorage()})),s.default.events.subscribe("advertisement.block",(()=>{this.dom.find(".Opta-Ad").addClass("Opta-Hidden")}))}},e.setSvgSizeClass=function(){const t=this.dom.find(".Opta-FootballPerspectivePitch");t.removeClass("Opta-Container-Narrow Opta-Container-Normal Opta-Container-Wide"),this.is_narrow?t.addClass("Opta-Container-Narrow"):this.is_wide?t.addClass("Opta-Container-Wide"):t.addClass("Opta-Container-Normal")},e.styleLiveAction=function(){const t=this.wid+".Opta .Opta_F_LA ";let e='<style class="Opta-embeddedstyles">';e+=t+".Opta-EventAnimations .Opta-GoalTarget { background-image: url("+this.resources.premium_goal+") }",i.each(this.team_kits,((a,i)=>{const o=s.default.utils.ucFirst(i);e+=t+".Opta-MatchHeader .Opta-"+o+" .Opta-Team-Score { background-color: "+a.getColor()+"; color: "+a.getColor("text")+" }",e+=t+".Opta-cylindertop.Opta-"+o+" {",e+="fill: "+a.getColor(),e+="}",e+=t+".Opta-cyclindergradient.Opta-"+o+" .stop1 {",e+="stop-color: "+a.getColor("shirt",0,{to:"hex",darken:.45}),e+="}",e+=t+".Opta-cyclindergradient.Opta-"+o+" .stop2 {",e+="stop-color: "+a.getColor("shirt",0,{to:"hex"}),e+="}",e+=t+".Opta-"+o+" .Opta-bubbleoutercircle { fill: "+a.getColor("shirt",0,{to:"hex"})+" }",e+=t+".Opta-Overlay .Opta .Opta-Stats-Bars .Opta-Bars-Full .Opta-Percent.Opta-"+o+" { background-color: "+a.getColor("shirt",0,{to:"hex"})+" }",e+=t+".Opta-ballpath.Opta-"+o+" { stroke: "+a.getColor("shirt",0,{to:"hex"})+"; fill: "+a.getColor("shirt",0,{to:"hex"})+"; }"})),e+="</style>",this.dom.find(".Opta-embeddedstyles").length?this.dom.find(".Opta-embeddedstyles").html(e):this.dom.append(e)},e.sfx=function(){const t=this.attr,e=this.dom,a=s.default.utils.isSdapiId(this.match.id)?"match_name":"last_name",i=()=>{this.EventAnimations=new s.default.components.football.eventanimations({breakpoints:t.breakpoints,dom_id:`${this.wid}-eventanimations`,dom:`${this.wid} .Opta-layer1`,is_premium:this.is_premium,player_naming:a,show_crests:t.show_crests,show_event_counters:t.show_event_counters,show_event_message_logo:t.show_event_message_logo,team_kits:this.team_kits,width:this.width})},o=()=>{this.EventTicker=new s.default.components.generic.matchEventTicker(e.find(".Opta-event-strip-container"),this.match,{replay_only:!0,player_naming:a,layout:"strip",team_kits:this.team_kits}),e.find(".Opta-EventTicker-List").css("height",this.is_wide?e.find(".Opta-FootballPitch").height():"")},n=()=>{const e=new s.default.components.generic.weather(`${this.wid} .Opta-layer0`,this.conditions);e.run(5e3),!0===t.weather_animation?setTimeout((()=>{e.fadeOut(5e3,.3)}),1e4):isNaN(Number(t.weather_animation))||setTimeout((()=>{e.fadeOut(5e3,0,(()=>{e.destroy()}))}),1e3*Number(t.weather_animation))},r=()=>{const e=new s.default.m.ExternalLink({type:"External",base_url:t.external_link,competition:this.match.competition.id,season:this.match.season_id,title:t.external_link_title}).getHref();this.dom.find(".Opta-nestcontainer").on("click",(a=>{if(!(0,s.default)(a.target).closest(".Opta_F_MC ").length)if("_blank"===t.external_link_target)window.open(e);else window.location.href=e}))};(()=>{const a=e.find(".Opta-FootballPerspectivePitch"),i=s.default.d3.select(a.get(0)).append("svg").attr({xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"Opta-Responsive-Svg",version:1.1,preserveAspectRatio:"xMidYMid slice",width:a.width(),height:a.width()/this.pitch_ratio}),o=i.append("defs"),n=i.append("g"),r=this.use_flattened?void 0:n.append("g").attr({"data-layer":"background"}),l=this.use_flattened?void 0:n.append("g").attr({"data-layer":"banners"}),d=n.append("g").attr({"data-layer":"pitch"}),_=n.append("g").attr({"data-layer":"rbevents"}),p=n.append("g").attr({"data-layer":"events"}),c=p.append("g").attr("data-layer","arrows"),h=p.append("g").attr("data-layer","lines"),u=n.append("g").attr({"data-layer":"weather"}),f=n.append("g").attr({"data-layer":"goal"});this.layer={svg:i,defs:o,goal:f,weather:u,arrows:c,lines:h,events:p,rbevents:_,pitch:d},this.use_flattened||(this.layer.banners=l,this.layer.background=r),this.addClipPaths(),this.use_flattened||(this.addBackground(),this.addBanners()),this.addPitch(),this.addBall(),this.RbVisEvents=new s.default.components.football.rbvisevents({dom:_,widget_id:this.id,getPos:(t,e)=>this.getRBVisPos(t,e),getVPos:(t,e,a)=>this.getVPos(t,e,a),premium:this.is_premium,is_3D:this.is_3D,resource_paths:this.resources}),t.show_direction_of_play&&this.addArrows(),this.updateViewbox(2,2)})(),(t.show_match_header&&t.show_clock||this.goal_replay&&t.show_timeline)&&(this.clockTicker=s.default.sfx.runClock({dom:this.dom,match:this.match,responsive:!t.show_timeline,ignore_locale:s.default.AppSettings.rtl})),this.show_dfp&&this.showDfp(),this.addEventFeedSubscription(),(()=>{const t=document.querySelector(".Opta-zoom:nth-of-type(1)"),e=document.querySelector(".Opta-zoom:nth-of-type(2)"),a=t=>{t&&t.addEventListener("click",(()=>{t.classList.contains("Opta-Disabled")||(document.querySelector(".Opta-zoom.Opta-Disabled").classList.remove("Opta-Disabled"),t.classList.add("Opta-Disabled"),this.is_panning_mode=t===e,this.updateViewbox(!1,!1,1e3))}))};a(e),a(t)})(),this.has_ticker?o():i(),t.weather_animation&&this.conditions&&this.conditions.weather&&n(),(()=>{this.events.slice(-5).forEach((t=>{this.plotEvent(t,!1)}))})(),this.upgradeResourceSize(),this.setSvgSizeClass(),this.styleLiveAction(),this.nested_html&&(this.match.isPreMatch()&&!1!==t.show_match_countdown&&this.match.getSecondsUntilKickoff()>0?this.showMatchCountdown():(this.match.isFinished()||this.isMatchBetweenPeriods(this.match.period_id))&&this.showMatchStats(),s.default.processOptaTags(this.dom).done((t=>{this.nested_widgets=t}))),t.external_link&&r(),this.initGoalReplay()},e.dfpPlayerHtml=function(){let t="";const e=[this.match.toString(this.attr.team_naming),this.text.dfp_text].join(" ");return t+='<div class="Opta-Ad Opta-Hidden'+("overlay"===this.attr.dfp_mode?" Opta-Ad-Full":"")+'">',t+="<h2"+(s.default.has.touch?' class="Opta-Hidden">':">")+e+"</h2>",t+='<div id="'+this.ID+'_ad" class="Opta-Ad Opta-Ad-Player"></div>',t+="</div>",t},e.getMatchHeader=function(t){if(!this.attr.show_match_header||this.isFlyawayPoppedInNarrow())return"";let e='<div class="Opta-Cf Opta-matchheader">';return e+=s.default.components.generic.matchHeader(t||this.match,s.default.extend({},this.attr,{is_narrow:this.is_narrow,show_halftime_score:"runningball"!==this.attr.data_type&&this.attr.show_halftime_score})),(this.attr.show_attendance||this.attr.show_referee)&&(e+=s.default.components.generic.matchdata(this.match,{show_attendance:this.attr.show_attendance,show_referee:this.attr.show_referee,show_venue:!1})),e+="</div>",e},e.getHtml=function(){const t=s.default.has.touch?" Opta-TouchControls":"",e=s.default.AppSettings.res.base+"assets/visualisation/football/premium/";let a="";return a+=this.getMatchHeader(),a+='<div class="Opta-Cf '+t+'" data-weather="'+this.getWeather()+'" data-ground="'+this.getGroundCondition()+'">',this.show_dfp&&(a+=this.dfpPlayerHtml()),a+='<div class="Opta-layoutcontainer">',a+='<div class="Opta-nestcontainer '+(this.attr.external_link?"Opta-haslink":"")+'" title="'+(this.attr.external_link_title||"")+'">',a+='<div class="Opta-Overlay Opta-Nest Opta-statsoverlay Opta-Hidden Opta-JS-Nest-Content">',a+="<h3></h3>",a+=s.default.utils.tagReplacements(this.nested_html.matchstats,s.default.extend({},this.attr)),a+="</div>",!1!==this.attr.show_match_countdown&&(a+='<div class="Opta-Overlay Opta-Nest Opta-countdownoverlay Opta-Hidden Opta-JS-Nest-Content" title="">',a+=s.default.utils.tagReplacements(this.nested_html.match_countdown,s.default.extend({},this.attr)),a+="</div>"),a+="</div>",a+='<div class="Opta-Visualisation-Holder">',a+='<div class="Opta-layer1" data-layer="messages"></div>',a+='<div class="Opta-goalreplay-controls"></div>',this.zoom_enabled&&(a+='<div class="Opta-zoomcontrols">',a+='<img class="Opta-zoom Opta-Disabled" data-type="-" src="'+e+'zoom_minus.svg">',a+='<img class="Opta-zoom" data-type="+" src="'+e+'zoom_plus.svg">',a+="</div>"),a+='<div class="Opta-layer0 Opta-FootballPerspectivePitch"></div>',a+="</div>",a+="</div>",this.attr.show_timeline&&(a+='<div class="Opta-Football-Timeline"></div>'),this.has_ticker&&(a+='<div class="Opta-event-strip-container"></div>'),a+="</div>",a};const o='<opta-widget sport="football" competition="" season="" match="" live="true" show_competition_name="true" competition_naming="full" show_title="false" ',n="></opta-widget>";e.getMatchStatsTag=function(){return o+'widget_id="'+this.match_stats_id+'" fast_data="true" data_type="'+this.attr.data_type+'" widget="matchstats" template="custom" navigation="tabs_more" default_nav="1" show_match_header="false" show_score="true" show_halftime_score="false" show_crests="false" show_team_formation="true" graph_style="full" show_date="false" date_format="dddd D MMMM YYYY" rounding="1" team_naming="full" stats_categories="Category 1|goals,'+("PEM"===this.hive_event_type?"attacks_dangerous":"possession")+',shots,shots_on_target,corners_won" breakpoints="300, 570" use_container_width="true"'+n},e.getMatchCountdownTag=function(){return o+'widget_id="'+this.match_countdown_id+'" widget="match_countdown" template="normal" date_format="D MMM" time_format="HH:mm" show_crests="" show_form="'+(this.is_narrow?3:5)+'" show_tooltips="false" player_naming="'+(this.attr.match_countdown_player_naming?this.attr.match_countdown_player_naming:"full")+'"  breakpoints="400, 700" use_container_width="true"'+n}},"./src/widget/football/live_action/plot.ts":(t,e,a)=>{"use strict";var i=a("./src/bootstrap_opta.ts").Z._;Object.defineProperty(e,"__esModule",{value:!0}),e.plotEvent=e.showMarker=e.hideMarker=e.plotSpecialEvent=e.plotEventLine=e.plotConnectLine=e.plotEventBall=e.plotConnectBall=e.plotNotification=e.plotArrow=e.getArrowPoints=void 0;const s=a("./src/tsmodules/Opta.ts"),o=a("./src/constants/widget/football/live_action.ts");e.getArrowPoints=function(t,e){const a=(t,e)=>this.getPos(t,e),i=this.isOnTheLeftSideOfPitch(e),s=(t=>{const e=[[12.5,5],[37.5,25],[62.5,50+(i?5:-5)],[87.5,75],[200,95]];let a;for(a=0;a<e.length;a++)if(t<=e[a][0])return e[a][1]})(t),o=i?-1:1;return[a(s,50).join(","),a(s+40*o,0).join(","),a(s+100*o,0).join(","),a(s+100*o,100).join(","),a(s+40*o,100).join(",")].join(" ")},e.plotArrow=function(t,e,a){return new Promise((i=>{const s="home"===t.side,o=this.isOnTheLeftSideOfPitch(t.side),n=(t=>{const e=[[12.5,5],[37.5,25],[62.5,50+(o?5:-5)],[87.5,75],[200,95]];let a;for(a=0;a<e.length;a++)if(t<=e[a][0])return e[a][1]})(a?t.x:t.x2),r=this.sprite,l=r["arrow_"+t.side],d=r["arrow_"+(s?"away":"home")],_=t=>{t.transition().duration(e?this.event_animation_duration/2:0).attr({points:this.getArrowPoints(n,s?"away":"home"),opacity:0}).each("end",(()=>{i()}))};if(!this.attr.show_direction_of_play)return i();t.side&&!t.hide_dop?(l.transition().duration(e?this.event_animation_duration/2:0).delay(100).ease("sin-out").attr({points:this.getArrowPoints(n,t.side),opacity:.35}).each("end",(()=>{i()})),_(d)):[r.arrow_home,r.arrow_away].forEach((t=>{_(t)}))}))},e.plotNotification=function(t,e){return new Promise((a=>(i.contains(o.plot_notification_event_ids,t.type_id)&&this.hideMatchCountdown(),this.has_ticker?this.EventTicker.addEvent(t,!0).done((()=>a())):this.EventAnimations.addEvent(t,this.match,e).done((()=>a())))))},e.plotConnectBall=function(t,e){return new Promise((a=>{const i=t.start_pos;this.sprite.ball.transition().duration(e?this.event_animation_duration/2:0).attr(i).each("end",(()=>{a()})),this.updateViewbox(this.getThirdPos(t.x),this.getVerticalPos(t.y),e?this.event_animation_duration/2:0)}))},e.plotEventBall=function(t,e){return new Promise((a=>{const i=t.end_pos,s=this.sprite.ball;t.no_ball||isNaN(i.x)?(s.classed("Opta-Hidden",!0),a()):(s.classed("Opta-Hidden",!1),this.is_premium?s.transition().duration(e?this.event_animation_duration/2:0).attr(i).each("end",(()=>{a()})):(s.attr(i),a())),this.updateViewbox(this.getThirdPos(t.x2),this.getVerticalPos(t.y2),e?this.event_animation_duration/2:0)}))},e.plotConnectLine=function(t,e,a){return new Promise((i=>{const o=this.PreviousEvent,n=o&&!o.noplot?o.end_pos:t.start_pos,r=t.start_pos,l=(()=>{let e="Opta-ballpath Opta-connectpath";return!this.is_3D&&t.side&&(e+=" Opta-"+s.default.utils.ucFirst(t.side)),e})();if(t.clear_event)return i();a.append("path").classed(l,!0).attr("d",["M",n.x,n.y,"L",n.x,n.y].join(" ")).transition().duration(e?this.event_animation_duration/2:0).attr("d",["M",n.x,n.y,"L",r.x,r.y].join(" ")).each("end",(()=>{a.append("ellipse").classed(l,!0).attr({cx:r.x,cy:r.y,rx:3,ry:this.is_3D?1:3}),i()}))}))},e.plotEventLine=function(t,e,a){return new Promise((i=>{const o=t.start_pos,n=t.end_pos,r=(()=>{let e="Opta-ballpath Opta-eventpath";return!this.is_3D&&t.side&&(e+=" Opta-"+s.default.utils.ucFirst(t.side)),e})(),l=()=>{a.append("path").classed(r,!0).attr("d",["M",o.x,o.y,"L",o.x,o.y].join(" ")).transition().duration(e?this.event_animation_duration/2:0).attr("d",["M",o.x,o.y,"L",n.x,n.y].join(" ")).each("end",(()=>{this.is_3D||a.append("circle").classed(r,!0).attr({cx:n.x,cy:n.y,r:3}),i()}))};o.x!==n.x&&o.y!==n.y?l():i()}))},e.plotSpecialEvent=function(t,e){const a="opta"===this.attr.data_type;return e?new Promise((e=>{this.RbVisEvents.plotEvent(t,a).done((()=>e()))})):Promise.resolve()},e.hideMarker=function(t,e){return new Promise((a=>{const i=this.PreviousEvent,s=i&&i.start_pos?i.start_pos:t.start_pos,o=this.sprite,n=o.marker,r=o.bubble;if(5===t.type_id||isNaN(s.x))return a();n.transition().duration(e?500:0).attr({transform:"translate("+s.x+","+s.y+") scale(0) translate("+-s.x+","+-s.y+")"}).each("end",(()=>{r.classed("Opta-Hidden",!1),a()}))}))},e.showMarker=function(t,e){return new Promise((a=>{const i=t.start_pos,o=this.sprite,n=o.marker,r=o.bubble,l=o.bubbleText,d=this.sprite.cylindergradient,_=this.sprite.cylindertop;switch(t.marker_type){case 0:return a();case 1:r.classed("Opta-Hidden",!0)}if([n,d,_].forEach((e=>{e.classed("Opta-Home",!1),e.classed("Opta-Away",!1),t.output_side&&e.classed("Opta-"+s.default.utils.ucFirst(t.output_side),!0)})),t.player?l.text(t.player.jersey_num):l.text(""),l.classed("Opta-Hidden",!0),isNaN(i.x)||isNaN(i.y))return a();n.attr({transform:"translate("+i.x+","+i.y+") scale(0) translate("+-i.x+","+-i.y+")"}).transition().duration(e?500:0).attr({transform:"translate("+i.x+","+i.y+") scale(1)"}).each("end",(()=>{l.classed("Opta-Hidden",!1),a()}))}))},e.plotEvent=function(t,e){return new Promise((a=>{let i,o=!0;this.RbVisEvents.clear(),(()=>{const e=this.PreviousEvent;16===t.type_id&&e&&38===e.type_id&&((0,s.default)('.Opta-linegroup[data-oid="'+e.oid+'"]').remove(),o=!1)})(),i=this.layer.lines.append("g").attr({class:"Opta-linegroup","data-oid":t.oid}),t.show_stats_popup?(this.updateNestedWidgets(),this.showMatchStats()):this.hideMatchStats(),t.noplot?this.plotNotification(t,e).then((()=>{if(this.attr.show_dfp_in_breaks&&this.advertisement&&30===t.type_id)return setTimeout((()=>{this.advertisement.play(),a()}),1e3);a()})):this.is_premium?this.hideMarker(t,e).then((()=>{Promise.all([o?this.plotConnectLine(t,e,i):Promise.resolve(),this.plotConnectBall(t,e),this.plotArrow(t,e,!0)]).then((()=>{this.showMarker(t,e).then((()=>{const s=[this.plotEventBall(t,e),this.plotEventLine(t,e,i),this.plotArrow(t,e,!1),this.plotNotification(t,e),this.plotSpecialEvent(t,e)];this.limitEventTrail(e),Promise.all(s).then((()=>a()))}))}))})):(this.sprite.ball.classed("Opta-Hidden",!0),this.hideMarker(t,e).then((()=>{Promise.all([1===t.marker_type?this.showMarker(t,e):Promise.resolve(),1===t.marker_type?this.plotEventBall(t,e):Promise.resolve(),this.plotNotification(t,e),this.plotSpecialEvent(t,e)]).then((()=>a()))})))}))}},"./src/widget/football/live_action/streamedEvent.ts":(t,e,a)=>{"use strict";var i=a("./src/bootstrap_opta.ts").Z._;Object.defineProperty(e,"__esModule",{value:!0}),e.streamedEvent=e.shootoutSkipEvent=e.newSpecialEvent=e.isNewOrWorthyEdit=e.sortEvents=e.insertOnDuplicateUpdate=e.positionEventSwitcher=e.getShowSide=e.getEventNoBall=e.getHideDirectionOfPlay=e.getMarkerType=e.isEventBehindEndlines=e.isShowStatsEvent=e.addPitchPos=e.modifyPem=e.modifyEvent=e.eventSideUpWithPartner=e.eventSideUp=e.isBreakInPlay=e.isClearEvent=e.isKeyEvent=void 0;const s=a("./src/tsmodules/Opta.ts"),o=a("./src/enums/model/football/matchevent.ts"),n=a("./src/constants/widget/football/live_action.ts");e.isKeyEvent=function(t){if(n.key_event_ids.includes(t.type_id))return!0},e.isClearEvent=function(t,e){if(!this.is_3D&&e&&e.side!==t.side)return!0;switch(t.type_id){case o.EVENT_TYPE_ID.pass:if(t.hasQ(5)||t.hasQ(6)||t.hasQ(107)||t.hasQ(123)||t.hasQ(124)||t.hasQ(279)||e&&16===e.type_id)return!0;break;case o.EVENT_TYPE_ID.out:return!0;case o.EVENT_TYPE_ID.attempt_saved:case o.EVENT_TYPE_ID.goal:if(10===t.period_id)return!0;break;case o.EVENT_TYPE_ID.card:case o.EVENT_TYPE_ID.offside_pass:case o.EVENT_TYPE_ID.foul:case o.EVENT_TYPE_ID.corner:case o.EVENT_TYPE_ID.start_delay:case o.EVENT_TYPE_ID.end_delay:case o.EVENT_TYPE_ID.end_of_period:case o.EVENT_TYPE_ID.start_of_period:case o.EVENT_TYPE_ID.offside_provoked:case o.EVENT_TYPE_ID.foul_throw_in:case o.EVENT_TYPE_ID.penalty_faced:case o.EVENT_TYPE_ID.referee_drop_ball:return!0;case o.EVENT_TYPE_ID.referee_decision:if(t.hasQ(329)||t.hasQ(330)||t.hasQ(331)||t.hasQ(332)||t.hasQ(3332)||t.hasQ(333)||t.hasQ(334)||t.hasQ(341)||t.hasQ(342))return!0;break;case o.EVENT_TYPE_ID.temp_attempt:if(t.hasQ(9))return!0}if(e)switch(e.type_id){case o.EVENT_TYPE_ID.out:case o.EVENT_TYPE_ID.foul_throw_in:if(e.outcome)return!0}},e.isBreakInPlay=function(t){switch(t.type_id){case o.EVENT_TYPE_ID.pass:if(t.hasQ(5)||t.hasQ(6)||t.hasQ(107)||t.hasQ(123)||t.hasQ(124)||t.hasQ(279))return!0;break;case o.EVENT_TYPE_ID.foul:case o.EVENT_TYPE_ID.card:case o.EVENT_TYPE_ID.keeper_pickup:if(t.outcome)return!0;break;case o.EVENT_TYPE_ID.out:case o.EVENT_TYPE_ID.claim:case o.EVENT_TYPE_ID.player_off:case o.EVENT_TYPE_ID.player_on:case o.EVENT_TYPE_ID.start_delay:case o.EVENT_TYPE_ID.end_delay:case o.EVENT_TYPE_ID.start_of_period:case o.EVENT_TYPE_ID.end_of_period:case o.EVENT_TYPE_ID.foul_throw_in:return!0;default:return}},e.eventSideUp=function(t,e){return t.team_id===e.home.id?(t.side="home",t.Side="Home"):t.team_id===e.away.id?(t.side="away",t.Side="Away"):t.Side="SideNeutral",t},e.eventSideUpWithPartner=function(t){const e=t,a=t.partner;return-1===[o.EVENT_TYPE_ID.foul,o.EVENT_TYPE_ID.out,o.EVENT_TYPE_ID.corner].indexOf(e.type_id)&&a?(t.actual_side=t.side,t.side=null,t.Side="SideNeutral"):6===e.type_id&&e.outcome&&((t=a).partner=e),t},e.modifyEvent=function(t,e){if((t=this.eventSideUp(t,e)).partner&&(t.partner=this.eventSideUp(t.partner,e)),t.partner&&t.side!==t.partner.side&&(t=this.eventSideUpWithPartner(t)),t.player_id&&(t.match_player=this.players[t.player_id],t.match_player&&(t.player.jersey_num=t.match_player.jersey_num)),t.partner&&t.partner.player_id&&(t.partner.match_player=e.home.players[t.partner.player_id]||e.away.players[t.partner.player_id],t.partner.match_player&&(t.partner.player.jersey_num=t.partner.match_player.jersey_num)),this.ignore_event_ids.indexOf(t.type_id)>-1&&(t.ignore=!0),[o.EVENT_TYPE_ID.out,o.EVENT_TYPE_ID.foul_throw_in].indexOf(t.type_id)>-1&&t.outcome&&(t.ignore=!0),[o.EVENT_TYPE_ID.aerial].indexOf(t.type_id)>-1&&!t.outcome&&(t.ignore=!0),t.hasQ(900)&&(t.ignore=!0),this.noplot_event_ids.indexOf(t.type_id)>-1&&(t.noplot=!0),t.type_id===o.EVENT_TYPE_ID.start_of_period&&10===t.period_id&&(t.noplot=!0),t.type_id===o.EVENT_TYPE_ID.start_of_period)t.x=50,t.y=50,t.x2=50,t.y2=50;return t.type_id===o.EVENT_TYPE_ID.temp_goal&&(t.x2="home"===t.side&&!t.hasQ(28)||"away"===t.side&&t.hasQ(28)?100.5:-.5,t.y2=50),t},e.modifyPem=function(t){switch(t.type_id){case o.EVENT_TYPE_ID.pass:t.hasQ(107)&&(t.x=50,t.y=100,t.x2=50,t.y2=100);break;case o.EVENT_TYPE_ID.foul:this.is_3D?t.noplot=!0:t.hasQ(9)&&(t.x="home"===t.side?88.5:11.5,t.y=50)}return this.is_3D||(t.x2=t.x,t.y2=t.y),t},e.addPitchPos=function(t){let e=this.getPos(t.x,t.y),a=this.getPos(t.x2,t.y2);return t.type_id===o.EVENT_TYPE_ID.out&&t.y>44.2&&t.y<55.8?(e=this.getVPos(t.x,t.y,60),a=e):t.type_id===o.EVENT_TYPE_ID.corner&&(e=this.getPos(t.x>50?100:0,t.y>50?100:0),a=e),t.start_pos={x:e[0],y:e[1]},t.end_pos={x:a[0],y:a[1]},this.is_3D||(t.start_pos.cx=e[0],t.start_pos.cy=e[1],t.end_pos.cx=a[0],t.end_pos.cy=a[1]),t},e.isShowStatsEvent=function(t){return t.out_of_play&&-1===[o.EVENT_TYPE_ID.card,o.EVENT_TYPE_ID.sub_off,o.EVENT_TYPE_ID.sub_on].indexOf(t.type_id)},e.isEventBehindEndlines=function(t){return!s.default.AppSettings.rtl&&("home"===t.side&&t.x2>100||"away"===t.side&&t.x2<0)||s.default.AppSettings.rtl&&("away"===t.side&&t.x2>100||"home"===t.side&&t.x2<0)},e.getMarkerType=function(t){switch(t.type_id){case o.EVENT_TYPE_ID.pass:if(t.hasQ(5)||t.hasQ(107))return 1;break;case o.EVENT_TYPE_ID.foul:if(!t.outcome)return 1;break;case o.EVENT_TYPE_ID.out:return this.isEventBehindEndlines(t)?0:1;case o.EVENT_TYPE_ID.corner:return 0}return this.is_premium?void 0===t.match_player?1:void 0:0},e.getHideDirectionOfPlay=function(t){switch(t.type_id){case o.EVENT_TYPE_ID.foul:case o.EVENT_TYPE_ID.out:case o.EVENT_TYPE_ID.corner:return!0}},e.getEventNoBall=function(t){return!(t.type_id!==o.EVENT_TYPE_ID.out||!this.isEventBehindEndlines(t))||(!(this.is_3D||!(t.type_id===o.EVENT_TYPE_ID.pass&&t.hasQ(5)||t.type_id===o.EVENT_TYPE_ID.foul&&!t.hasQ(9)))||void 0)},e.getShowSide=function(t){const e=t.side,a="home"===e?"away":"home";switch(t.type_id){case o.EVENT_TYPE_ID.out:case o.EVENT_TYPE_ID.foul_throw_in:return t.outcome?e:a;case o.EVENT_TYPE_ID.offside_provoked:return t.outcome?a:e}return e},e.positionEventSwitcher=function(t,e){let a,i,r,l,d=!1;const _=[...n.position_data],p=e=>{t.hasQ(e.q)&&(t.x=e.x[r?0:1],t.y=e.y[r?0:1])};if(t.type_id===o.EVENT_TYPE_ID.ball_position&&t.hasQ(55)){for(i=e.length-1;i>=0;i--)if(a=e[i],a.id===t.qualifiers[55].value){if(s.default.extend(a.qualifiers,t.qualifiers),t=a,r=this.isOnTheLeftSideOfPitch(t.side),t.hasQ(56))switch(t.qualifiers[56].value){case"Back":t.x=r?38:62,t.y=50;break;case"Center":t.x=50;break;case"Left":case"Right":r?(t.x=100,t.y="Left"===t.qualifiers[56].value?100:0):(t.x=0,t.y="Left"===t.qualifiers[56].value?0:100)}_.forEach(p),void 0===t.y&&(t.y=0),t.x2=t.x,t.y2=t.y,l=this.getPos(t.x,t.y),t.start_pos={x:l[0],y:l[1]},t.end_pos=t.start_pos;break}}else this.is_premium||!(t.type_id===o.EVENT_TYPE_ID.pass&&t.hasQ(5)||[6].indexOf(t.type_id)>-1)||t.hasQ(56)||(d=!0);return d},e.insertOnDuplicateUpdate=function(t){const e=this.events;let a,i,s=-1;if(!this.first_time)for(i=e.length;i>0;i--)if(this.is_premium&&e[i-1].oid===t.oid||!this.is_premium&&e[i-1].id===t.id){s=i,t.type_id===o.EVENT_TYPE_ID.deleted_event?(a=t,(t=e[i-1]).deleted=!0):(a=e[i-1],e[i-1]=t);break}return(-1===s||this.first_time)&&e.push(t),{events:e,replacedEvent:a,idx:s}},e.sortEvents=function(t,e,a){return t.time_sort_key<this.highest_time?(this.highest_time=t.time_sort_key,a.sortEvents(e)):e},e.isNewOrWorthyEdit=function(t,e,a){return-1===e||(i.contains([o.EVENT_TYPE_ID.temp_goal,o.EVENT_TYPE_ID.temp_attempt,o.EVENT_TYPE_ID.save,o.EVENT_TYPE_ID.miss,o.EVENT_TYPE_ID.goal],t.type_id)||i.contains([o.EVENT_TYPE_ID.temp_goal,o.EVENT_TYPE_ID.temp_goal,o.EVENT_TYPE_ID.save,o.EVENT_TYPE_ID.miss,o.EVENT_TYPE_ID.goal],a.type_id)?t.type_id!==a.type_id:void 0)},e.newSpecialEvent=function(t){return this.special_event_ids.indexOf(t.type_id)>-1&&!!this.played_event_ids[t.oid]},e.shootoutSkipEvent=function(t){return 10===t.period_id&&-1===n.shootout_skip_ignore_event_ids.indexOf(t.type_id)},e.streamedEvent=function(t){const e=this.match;let a;if(t=this.modifyEvent(t,e),this.is_premium||(t=this.modifyPem(t)),(t=this.addPitchPos(t)).ignore)return;t.key_event=this.isKeyEvent(t);let{events:i,replacedEvent:s,idx:n}=this.insertOnDuplicateUpdate(t);if(!this.first_time){if(i=this.sortEvents(t,i,e),a=i[i.length-2],4===t.type_id&&!t.outcome&&a&&4===a.type_id&&a.outcome)return;if(this.positionEventSwitcher(t,i))return;t.show_stats_popup=this.isShowStatsEvent(t),t.clear_event=this.isClearEvent(t,a),t.marker_type=this.getMarkerType(t),t.hide_dop=this.getHideDirectionOfPlay(t),t.no_ball=this.getEventNoBall(t),t.output_side=this.getShowSide(t),t.break_event=t.clear_event||this.isBreakInPlay(t),(t.type_id!==o.EVENT_TYPE_ID.deleted_event&&this.isNewOrWorthyEdit(t,n,s)&&!t.ignore&&!this.shootoutSkipEvent(t)&&(t.time_key>=this.highest_event_time_key||this.newSpecialEvent(t))||t.type_id===o.EVENT_TYPE_ID.referee_decision)&&(this.newSpecialEvent(t)&&(this.played_event_ids[t.oid]=!0),this.highest_event_time_key=t.time_key,this.event_buffer.push(t),this.eventLoop())}}},"./src/widget/football/live_action/timeline.ts":(t,e,a)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addTimelineEventHandler=e.getTimelineEventTypes=e.drawTimeline=e.setupTimeline=e.initTimeline=e.redrawTimeline=void 0;const i=a("./src/tsmodules/Opta.ts");e.redrawTimeline=function(t){this.football_timeline&&(this.football_timeline.updateEvents(t,t.replay.replay.timeline_model),this.football_timeline.redrawTimelineBar(),this.football_timeline.adjust())},e.initTimeline=function(t){t.replay&&t.replay.replay&&(this.setupTimeline(t),this.drawTimeline(),this.addTimelineEventHandler(),this.updateClockTicker(),this.football_timeline.adjust())},e.setupTimeline=function(t){const e=i.default.extend({show_period_dividers:!0,event_types:this.getTimelineEventTypes()},this.attr);this.football_timeline=i.default.components.football.football_timeline({attr:e,classes:"",data:{is_narrow:this.is_narrow,is_vertical:!1},match:t,widget:this,timeline_model:t.replay.replay.timeline_model})},e.drawTimeline=function(){const t=this.dom.find(".Opta-Football-Timeline");t.empty(),t.html(this.football_timeline.draw()),this.football_timeline.runTooltipsSfx()},e.getTimelineEventTypes=function(){return this.is_narrow?[16,30]:[16,17,18,19,30]},e.addTimelineEventHandler=function(){this.dom.find(".Opta-Football-Timeline").on("click tap touchstart",".Opta-Event-Type-16",(()=>{const t=this.dataset&&this.dataset.eventId;this.goal_replay_controls&&void 0!==t&&(this.goal_replay_controls.abortReplay(),this.goal_replay_controls.replayGoal(t))}))}},"./src/components/football/eventanimations.js":()=>{!function(t){"use strict";var e=function(e){var a=this,i=t.extend({image_size:"large",player_naming:"last_name",show_crests:!1,show_event_counters:!1,team_naming:"brief"},e),s=t(i.dom),o=t.AppSettings;a.resources=o.config.football.image,a.options=i,a.dom=s,a.dom_id=i.dom_id,a.breakpoints=t.utils.trimSplit(i.breakpoints,",","number").sort((function(t,e){return t-e})),a.player_naming=i.player_naming,a.team_naming=i.team_naming,a.team_kits=i.team_kits,a.resize(i.width),s.html('<div class="Opta-EventAnimations'+(i.is_premium?"":" Opta-EventAnimations-Lite")+'"><div class="Opta-GoalViewOuter"></div><div class="Opta-goalview"></div><div class="Opta-EventNotifications"><div class="Opta-GoalNet"></div><div class="Opta-GoalTarget"><div class="Opta-GoalTargetShadow"></div><div class="Opta-GoalTargetBallHolder"></div><div class="Opta-GoalTargetBall"></div></div><div class="Opta-EventBanners"></div><div class="Opta-EventCounterBanners"></div><div class="Opta-GoalBanners'+(i.is_premium?" Opta-PremiumGoalBanners":"")+'"></div></div></div>'),a.goal_view_outer=s.find(".Opta-GoalViewOuter"),a.event_notifications=s.find(".Opta-EventNotifications"),a.event_banners=s.find(".Opta-EventBanners"),a.event_counter_banners=s.find(".Opta-EventCounterBanners"),a.goal_target=s.find(".Opta-GoalTarget")[0],a.goal_banners=s.find(".Opta-GoalBanners"),a.goal_ball=s.find(".Opta-GoalTargetBall"),a.goal_ball_holder=s.find(".Opta-GoalTargetBallHolder"),a.goal_net=s.find(".Opta-GoalNet"),a.temp_attempt_animation=!1,a.goal_target.addEventListener("animationstart",a.clearNotifications),a.text=t.Trans.getText({corner:8561,free_kick:8571,goal_kick:8551,mins:81,offside:10531,penalty_awarded:10541,throw_in:8541,var_goal:19841,var_penalty:19851,var_no_penalty:19861,var_card_upgrade:19871,var_mistaken_identity:19881,var_other:19891,var_no_goal:19911,var_red_card:19901,var_referee_confirmed:19921,var_referee_cancelled:19931,var_card:21511})};e.prototype.setTeamKits=function(t){this.team_kits=t},e.prototype.resize=function(t){var e=this,a=e.breakpoints,i=t/1200;e.is_narrow=!1,e.is_wide=!1,t>(a[1]||1200)?(i=t/1920,e.is_wide=!0):t<=(a[0]||600)&&(i=t/600,e.is_narrow=!0),e.dom.css("transform","scale("+Math.round(1e3*i)/1e3+")")},e.prototype.clearNotifications=function t(){var e=this;e.event_banners.html(""),e.event_counter_banners.html(""),e.goal_banners.html(""),e.goal_target.removeEventListener("animationstart",t)},e.prototype.getGoalPosition=function(e){var a,i,s=e.hasQ(103)?e.qualifiers[103].value:0,o=e.hasQ(102)?e.qualifiers[102].value:0;return a=!this.is_narrow||t.utils.isIE()||t.utils.isEdge()?[32.5,52,32.5,36,66,36,66,52]:[32.5,63,32.5,48,66,48,66,63],i=new Opta.perspective.PerspT([54.8,0,54.8,38,45.2,38,45.2,0],a).transform(o,s),{x:Math.round(10*i[0])/10,y:Math.round(10*i[1])/10}},e.prototype.animateTempGoal=function(t,e){var a,i=this;i.temp_attempt_animation=!0,i.event_banners.prepend(i.getNotification(t,e,"minutes")),(a=i.event_banners.find(".Opta-EventBanner")[0]).addEventListener("animationend",(function t(){a.removeEventListener("animationend",t),i.event_notifications.addClass("Opta-TempGoalAnimations")}))},e.prototype.getNotification=function(e,a,i){var s=!0,o=this,n=e.type_id,r=o.text,l=e.output_side||e.side,d=function(){switch(n){case 601:return"Safe";case 1:if(e.hasQ(124))return"Safe";if(e.hasQ(6))return"Danger";if(e.hasQ(107))return"Mid";if(e.hasQ(5))return"Danger";break;case 613:return e.hasQ(903)?"Danger":"Mid";case 10:case 602:case 15:case 13:case 72:case 14:return"Danger";case 6:if(e.outcome)return"Danger";break;case 4:if(e.hasQ(9))return"Danger";break;case 65:if(e.hasQ(329)||e.hasQ(330)||e.hasQ(331)||e.hasQ(341))return"Danger"}return!1}();return o.notificationTemplate({Match:a,direction:!o.options.is_premium&&!(!d||"Safe"===d)&&t.utils.ucFirst(e.side||""),header:function(){switch(n){case 2:return r.offside;case 4:if(!e.hasQ(9)&&e.outcome)return r.free_kick;break;case 5:return"home"===e.side&&e.x2>100||"away"===e.side&&e.x2<0?r.goal_kick:e.x2<0?r.corner:r.throw_in;case 65:if(e.hasQ(329))return r.var_goal;if(e.hasQ(330))return r.var_penalty;if(e.hasQ(331))return r.var_no_penalty;if(e.hasQ(332))return r.var_card_upgrade;if(e.hasQ(333))return r.var_mistaken_identity;if(e.hasQ(334))return r.var_other;if(e.hasQ(341))return r.var_no_goal;if(e.hasQ(342))return r.var_red_card;if(e.hasQ(3332))return r.var_card}return e.toString()[0]}(),icon_type:function(){if([4,16,27,28,30,32].indexOf(n)>-1)return"Whistle";switch(n){case 17:return e.hasQ(32)?"Double":e.hasQ(33)?"Red":"Yellow";case 27:if(e.hasQ(41))return"Injury";break;case 65:if(e.hasQ(329)||e.hasQ(330)||e.hasQ(331)||e.hasQ(332)||e.hasQ(333)||e.hasQ(3332)||e.hasQ(334)||e.hasQ(335)||e.hasQ(336)||e.hasQ(341)||e.hasQ(342))return"VAR"}return o.options.show_crests?"Crest":"Jersey"}(),legend:function(){if(!o.options.is_premium&&65!==n)return e.side?o.getTeamName(a[e.side].id,a):"";if(65===n){if(s=!1,e.hasQ(335))return r.var_referee_confirmed;if(e.hasQ(336))return r.var_referee_cancelled}return[24,25,27,28,30,32,64,68,75,76].indexOf(n)>-1?"":[2,6,40,57].indexOf(n)>-1||1===n&&e.hasQ(279)||4===n&&e.outcome?(s=!1,o.getTeamName(e.team_id,a)):[5,55].indexOf(n)>-1?(s=!1,o.getTeamName(e.team_id,a,!0)):("minutes"===i?e.getTimeStr()+" ":"")+(e.match_player?e.match_player.toString(o.player_naming):"")}(),jersey_num:e.match_player&&s?e.match_player.jersey_num:"",side:l,team_id:!!l&&a[l].id,zone:d})},e.prototype.getCounterNotification=function(e,a){return this.counterNotificationTemplate({home:{name:a.home.name.abbr||a.home.name.toString(),total:t.AppSettings.rtl?e.event_counter[1]:e.event_counter[0]},away:{name:a.away.name.abbr||a.away.name.toString(),total:t.AppSettings.rtl?e.event_counter[0]:e.event_counter[1]}})},e.prototype.notificationTemplate=function(e){var a,i=this,s=t.extend({},e),o=i.dom_id,n=!!s.side&&t.utils.ucFirst(s.side),r='<div class="Opta-EventBanner'+(i.options.is_premium||!s.direction?"":" Opta-"+s.direction)+(s.zone?" Opta-Zone"+s.zone:"")+'"><div class="Opta-EventBannerInner"><div class="Opta-EventIconHolder"><div class="Opta-EventIconCircle"></div><div class="Opta-EventIcon Opta-EventIcon-'+s.icon_type;if(r+=s.team_id?" Opta-Team-"+s.team_id:"",r+=n?" Opta-"+n+'">':'">',"Crest"===s.icon_type)a=i.getTeamName(s.team_id,s.Match),r+=t.components.image({id:s.team_id,alt:a,size:"large",image_size:i.options.image_size,title:a});else if("Jersey"===s.icon_type){var l,d="",_="";i.team_kits&&s.side&&i.team_kits[s.side]&&(_="fill:"+(d=i.team_kits[s.side]).getColor("shirt",0,{to:"hex"}),l="fill:"+d.getColor("text",0,{to:"hex"})),r+='<svg viewBox="0 0 102 84" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient id="'+o+'-collar" x1="2.61%" y1="50%" x2="98.71%" y2="50%" id="linearGradient-1"><stop stop-color="#999999" offset="0%"></stop><stop stop-color="#FFFFFF" offset="30%"></stop><stop stop-color="#FFFFFF" offset="70%"></stop><stop stop-color="#999999" offset="100%"></stop></linearGradient><linearGradient id="'+o+'-GradArmLeft" x1="90.53%" y1="67.29%" x2="-0.15%" y2="20.32%" id="linearGradient-2"><stop stop-color="#000000" stop-opacity="0.4" offset="0%"></stop><stop stop-color="#000000" stop-opacity="0" offset="50%"></stop></linearGradient><linearGradient id="'+o+'-GradArmRight" x1="2.74%" y1="63.33%" x2="117.64%" y2="21.94%" id="linearGradient-3"><stop stop-color="#000000" stop-opacity="0.4" offset="0%"></stop><stop stop-color="#000000" stop-opacity="0" offset="50%"></stop></linearGradient></defs><g transform="translate(3, 2)"><g class="Opta-SvgJersey-Outline"><path d="M61.2938529,5.08650836 C59.476454,2.03018537 55.0488449,0.66434072 48,1 C41.2624864,0.679166021 36.9197742,1.91285218 34.962235,4.69143025 C27.7312165,6.31695224 20.9026407,9.41980882 15,14 C9.1,20.1 3.9,26.6 0,33 L14,44 L19,44 L19,79 L77,79 L77,44 L82,44 L96,33 C92.1,26.6 86.9,20.1 81,14 C74.8889245,9.76696231 68.1824578,6.79579843 61.2938529,5.08650836 Z" id="Shape" stroke="#000000" stroke-width="4" opacity="0.800000012" stroke-linecap="round" stroke-linejoin="round"></path><path d="M43,17 C39,11 38.3,6.7 41,4 C45.7,3.9 50.3,3.9 55,4 C57.7,6.7 57,11 53,17 C56.3,17.3 58,18.7 58,21 C66,7 62.7,0.3 48,1 C33.3,0.3 30,7 38,21 C38,18.7 39.7,17.3 43,17 Z" class="Opta-SvgJersey-Collar" fill="url(#'+o+'-collar)" fill-rule="nonzero"></path></g><path d="M19,79.3516193 L77,79.3516193 L77,43.8380701 L82,43.8380701 L96,32.7871778 C92.1,26.3575677 86.9,19.827495 81,13.699273 C60.5,-0.56642432 33.3,-0.56642432 15,13.699273 C9.1,19.827495 3.9,26.3575677 0,32.7871778 L14,43.8380701 L19,43.8380701 L19,79.3516193 Z" class="Opta-SvgJersey-Body" style="'+_+'" fill-rule="nonzero"></path><text class="Opta-jerseynum" transform="translate(48, 50)" style="'+l+'">'+(s.jersey_num||"")+'</text><g transform="translate(0, 15)" fill-rule="nonzero"><path d="M19,4.61538462 L15,0 C9.2,5.7 4.1,11.9 0,18 L14,29 L19,29 L19,4.61538462 Z" class="Opta-SvgJersey-Arm Opta-SvgJersey-ArmLeft" fill="url(#'+o+'-GradArmLeft)"></path><path d="M77,29 L82,29 L96,18 C90.2,12.3 85.1,6.1 81,0 L77,4.61538462 L77,29 Z" class="Opta-SvgJersey-Arm Opta-SvgJersey-ArmRight" fill="url(#'+o+'-GradArmRight)"></path></g></g></svg>'}return r+='</div></div><div class="Opta-EventText'+(s.icon_type?" Opta-with-icon":"")+'"><div class="Opta-EventHeader"><span>'+s.header+'</span></div><div class="Opta-EventDetails"><span>'+s.legend+"</span></div></div>",i.options.show_event_message_logo&&i.resources.event_message_logo&&t.preload(i.resources.event_message_logo).done((function(){r+='<div class="Opta-EventLogoHolder"><div class="Opta-EventLogoCircle"/><div class="Opta-EventLogo',r+=s.team_id?" Opta-Team-"+s.team_id:"",r+=n?" Opta-"+n+'">':'">',r+='<span><img src="'+i.resources.event_message_logo+'"/></span>',r+="</div></div></div></div></div>"})),r},e.prototype.counterNotificationTemplate=function(e){var a=t.extend({},e),i="";return i+='<div class="Opta-EventCounterBanner">',i+='<div class="Opta-EventCounterBannerInner">',i+='<div class="Opta-EventCounterText">',i+="<div>",i+='<span class="Opta-EventCounterTextHomeTeam">'+a.home.name+"</span>",i+='<span class="Opta-EventCounterTextAwayTeam">'+a.away.name+"</span>",i+="</div>",i+="<div>",i+='<span class="Opta-EventCounterTextHome">'+a.home.total+"</span>",i+='<span class="Opta-EventCounterTextSeparator">-</span>',i+='<span class="Opta-EventCounterTextAway">'+a.away.total+"</span>",i+="</div>",i+="</div>",i+="</div>",i+="</div>"},e.prototype.getScoreNotification=function(e,a){var i,s,o=this,n=o.getTeamId(e,a),r=o.getTeamName(n,a),l=o.options.show_crests?"Crest":"Jersey",d=o.getTeamSide(n,e,a);return o.notificationTemplate({Match:a,icon_type:l,header:(i=e.is_replay_event?a.replay.replay.replay_items[e.id].clock_score.home:a.home.score.total,s=e.is_replay_event?a.replay.replay.replay_items[e.id].clock_score.away:a.away.score.total,t.AppSettings.rtl?s+" - "+i:i+" - "+s),legend:r,team_id:n,side:d})},e.prototype.isOwnGoal=function(e){return void 0!==t._.findWhere(e.qualifiers,{type_id:28})},e.prototype.getTeamSide=function(e,a,i){var s=t._.findWhere(i.team,{id:e});return this.isOwnGoal(a)?s.side:a.output_side||a.side},e.prototype.getTeamId=function(t,e){return this.isOwnGoal(t)?"away"===t.side.toLowerCase()?e.home.id:e.away.id:t.team_id},e.prototype.getTeamName=function(t,e,a){var i=t===e[a?"away":"home"].id?e.home:e.away;return t?i.toString(this.options.team_naming):""},e.prototype.addEvent=function(e,a,i){var s=this,o=t.Deferred(),n=function(t){t.addEventListener("animationend",(function e(a){a.target===t&&(t.removeEventListener("animationend",e),o.resolve())}))},r=e.type_id,l=[1,4,6,10,13,14,15,17,18,19,27,30,32,65,72];function d(){var i;function n(t){(t&&t.target===s.goal_target||!s.options.is_premium)&&(s.event_notifications.removeClass("Opta-GoalAnimations"),s.goal_target.removeEventListener("animationend",n),s.temp_attempt_animation=!1),s.options.is_premium||o.resolve()}function r(){s.event_notifications.addClass("Opta-GoalAnimations"),s.event_notifications.removeClass("Opta-TempGoalAnimations"),s.clearNotifications(),s.goal_target.addEventListener("animationend",n),s.goal_banners[0].removeEventListener("animationend",r)}function l(){s.event_banners.prepend(s.getNotification(e,a)),s.goal_ball[0].removeEventListener("animationend",l)}t.events.subscribe("goal_replay.abort",(function(){s.goal_banners[0].removeEventListener("animationend",r),s.goal_net[0].removeEventListener("animationend",d),s.goal_ball[0].removeEventListener("animationend",l),s.event_notifications.removeClass("Opta-TempGoalAnimations"),n({target:s.goal_target}),s.clearNotifications()})),s.goal_ball[0].addEventListener("animationend",l),s.goal_net[0].removeEventListener("animationend",d),i=s.getGoalPosition(e),s.goal_ball.css({top:i.y+"%",left:i.x+"%"}),s.goal_ball_holder.css({top:i.y+"%",left:i.x+"%"}),10===e.period_id?r():(s.goal_banners.prepend(s.getScoreNotification(e,a)),s.goal_banners[0].addEventListener("animationend",s.options.is_premium?r:n))}return s.options.is_premium?l.push(2,3,5,7,8,11,12,20,21,22,23,28,35,36,39,41,44,47,49,50,52,54,55,57,61,63,64,65,68,73,74,75,76,77,78,79):(l.push(601,602,612,613),s.event_notifications.removeClass("Opta-TempGoalAnimations"),s.clearNotifications()),i?s.dom.find(".Opta-EventAnimations").removeClass("Opta-NoAnimation"):s.dom.find(".Opta-EventAnimations").addClass("Opta-NoAnimation"),s.event_banners.find(".Opta-EventBanner").slice(2).remove(),l.indexOf(r)>-1?(s.temp_attempt_animation&&(s.event_notifications.removeClass("Opta-GoalAnimations"),s.event_notifications.removeClass("Opta-TempGoalAnimations"),s.clearNotifications()),s.temp_attempt_animation=!1,s.event_banners.prepend(s.getNotification(e,a)),s.options.show_event_counters&&e.event_counter&&s.event_counter_banners.prepend(s.getCounterNotification(e,a)),n(s.event_banners.find(".Opta-EventBanner")[0])):16===r&&i?(s.temp_attempt_animation?d():(s.goal_net[0].addEventListener("animationend",d),s.animateTempGoal(e,a)),s.temp_attempt_animation=!1,n(s.goal_target)):38===r?(s.animateTempGoal(e,a),n(s.goal_net[0])):o.resolve(),10===e.period_id&&[10,13,14,15,16].indexOf(e.type_id)>-1&&(new t.components.football.goalview(s.dom.find(".Opta-goalview"),{widget:"live_action",match:a}).plotEvent(e,{value:0}),s.goal_view_outer.addClass("Opta-GoalViewOuterVisible")),o},Opta.components.football.eventanimations=e}(Opta)},"./src/components/football/goalview.js":()=>{!function(t){"use strict";var e,a,i=function(i,s){var o=this;e=t.d3,o.opts=t.extend({width:1e3,height:110,goal_image:t.AppSettings.res.base+"assets/images/backgrounds/football_goal_view.svg",penalty_successful:t.AppSettings.res.base+"assets/images/icons/football_events/icon-ShootoutScored.svg",penalty_unsuccessful:t.AppSettings.res.base+"assets/images/icons/football_events/icon-ShootoutMissed.svg",widget:s&&s.widget?s.widget:"match_action"},s),"live_action"===o.opts.widget&&(a=o.opts.match),o.dom=i,o.dom.html(o.getHTML()),o.svg=e.select(o.dom.find("svg").get(0)),o.drawGoal()};i.prototype.getHTML=function(){var t="",e=this.opts,a=e.width,i=e.height,s=.42*a,o=.4*i;return t+='<svg class="Opta-GoalView Opta-Responsive-Svg" xmlns="http://www.w3.org/2000/svg" ',t+='xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" preserveAspectRatio="xMidYMid meet" ',t+='viewBox="'+[s,o,.58*a-s,i-o].join(" ")+'"',t+="></svg>"},i.prototype.getX=function(t,e){return e||(t=100-t),t/100*this.opts.width},i.prototype.getY=function(t){var e=this.opts,a=.1*e.height,i=e.height-a;return this.opts.height-a-t/100*i},i.prototype.drawGoal=function(){var t=this,e=t.svg,a=e.append("g").attr("class","Opta-GoalView-View"),i=e.append("g").attr("class","Opta-GoalView-Plot"),s={home:e.append("g").attr({class:"Opta-ShootView-Home",x:420,y:44,width:14,height:66}),away:e.append("g").attr({class:"Opta-ShootView-Away",x:566,y:44,width:14,height:66})};a.append("image").attr({"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":t.opts.goal_image,width:130,height:55,x:435,y:54}),t.goalgroup=a,t.plotgroup=i,t.shootout=s},i.prototype.drawShootoutTally=function(e){var i=this,s=e.shootout_history.home.length===e.shootout_history.away.length,o=Math.max(5,e.shootout_history.home.length,e.shootout_history.away.length),n=-13*(o-5),r=n-13,l="home"===e.side?"away":"home",d=e.shootout_history[l].length;["home","away"].forEach((function(s){"live_action"===i.opts.widget&&(i.shootout[s].append("text").attr({x:"home"===s?487:513,y:50,class:"Opta-ShootoutName","text-anchor":"home"===s?"end":"start"}).text(a[s].toString()),"home"===s?(i.shootout.home.append("text").attr({x:497,y:52,class:"Opta-ShootoutScoreHome","text-anchor":"end"}).text(a.home.score.shootout),i.shootout.home.append("text").attr({x:500,y:52,class:"Opta-ShootoutScoreDivider","text-anchor":"middle"}).text("-")):i.shootout.away.append("text").attr({x:503,y:52,class:"Opta-ShootoutScoreAway","text-anchor":"start"}).text(a.away.score.shootout)),t._.times("live_action"===i.opts.widget?o:o+1,(function(a){var o=s===e.side&&a===e.shootout_history[s].length-1&&"current";s===l&&a===d&&(o="next"),"live_action"===i.opts.widget?function(a,s){var o="home"===s?485-5*a:515+5*a,n=e.shootout_history[s][a];void 0===n?(i.shootout[s].append("circle").attr({cx:o,cy:54,r:2,class:"Opta-ShootoutNumberHolder"}),i.shootout[s].append("text").attr({x:o,y:t.utils.isIE()||t.utils.isEdge()?55:54,class:"Opta-ShootoutNumber","text-anchor":"middle"}).text(a+1)):i.shootout[s].append("image").attr({"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":1===n?i.opts.penalty_successful:i.opts.penalty_unsuccessful,width:4,height:4,x:o-2,y:52})}(a,s):function(t,a,s){var o,n="home"===a?427:573,r=51+13*t,l=e.shootout_history[a][t];void 0===l?(o=i.shootout[a].append("circle").attr({cx:n,cy:r,r:5,class:"Opta-ShootoutNumberHolder"}),i.shootout[a].append("text").attr({x:n,y:r,class:"Opta-ShootoutNumber","text-anchor":"middle"}).text(t+1),"next"===s&&o.transition().delay(1e4).attr({r:6,class:"Opta-ShootoutNumberHolder-Next"})):(o=i.shootout[a].append("image").attr({"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":1===l?i.opts.penalty_successful:i.opts.penalty_unsuccessful,width:10,height:10,x:n-5,y:r-5}),"current"===s&&o.transition().duration(500).attr({width:12,height:12,x:n-6,y:r-6}).transition().delay(5e3).duration(500).attr({width:10,height:10,x:n-5,y:r-6}))}(a,s,o)}))})),"live_action"!==i.opts.widget&&o>5&&(s?(i.shootout.home.attr("transform","translate(0,"+n+")"),i.shootout.away.attr("transform","translate(0,"+n+")"),i.shootout.home.transition().delay(6e3).duration(1e3).attr("transform","translate(0, "+r+")"),i.shootout.away.transition().delay(6e3).duration(1e3).attr("transform","translate(0, "+r+")")):(n+=13,i.shootout.home.attr("transform","translate(0,"+n+")").transition().attr("transform","translate(0,"+(n-13)+")"),i.shootout.away.attr("transform","translate(0,"+n+")").transition().attr("transform","translate(0,"+(n-13)+")")))},i.prototype.plotEvent=function(a,i){var s=this,o=t.Deferred(),n=s.plotgroup,r=s.opts.height,l=a.y,d=a.qualifiers[102]?a.qualifiers[102].value:0,_=a.qualifiers[103]?a.qualifiers[103].value:0,p=0===a.x2,c=function(t){return 16===a.type_id&&(t>54?t=54:t<46&&(t=46)),s.getX(t,p)},h=function(t){return 16===a.type_id&&(t<7?t=7:t>30&&(t=30)),s.getY(t)},u=Math.abs(c(l)-c(d)),f=h(_),m=Math.sqrt(Math.pow(u,2)+Math.pow(f,2)),g=i?Math.max(1e3,m/.05)||1e3:0,y=5*m;return(l<d&&!p||l>d&&p)&&(y*=-1),a.shootout_history&&s.drawShootoutTally(a),n.append("image").attr({"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":t.AppSettings.res.base+"assets/images/icons/football_events/icon-3dBall.svg",width:8,height:8,x:c(l)-4,y:r-4}).transition().duration(g).ease("cubic-out").attr({x:c(d)-4,y:h(_)-4}).attrTween("transform",(function(){return e.interpolateString("rotate(0, "+c(l)+","+r+")","rotate("+y+", "+c(d)+","+h(_)+")")})).each("end",(function(){10===a.period_id&&n.insert("circle",":first-child").attr({cx:c(d),cy:h(_),r:4.8}).classed(a.isGoal()?"Opta-GoalViewShootoutgoal":"Opta-GoalViewShootoutmiss",!0),o.resolve()})),o},t.components.football.goalview=i}(Opta)},"./src/components/football/rbvisevents.js":()=>{!function(t){"use strict";var e=t._,a=t.utils.minMax;function i(a){var i,s,o=this;o.assets=(i={generic:{ball:"../../football.svg"},shot_on_goal:{arrow:"03_arrow.svg",cone:"02_bg_drop.svg",goal:"04_goal.svg"}},s=t.AppSettings.res.base+"assets/visualisation/football/premium/events/",e.each(i,(function(t,a){e.each(t,(function(t,e){i[a][e]=s+a+"/"+t}))})),i),o.dom=a.dom,o.widget_id=a.widget_id,o.is_3D=void 0===a.is_3D||a.is_3D,o.preloaded=o.preloadEvents(),o.getPos=a.getPos,o.getVPos=a.getVPos,o.is_premium=!!a.premium,o.resource_paths=a.resource_paths,o.dom.classed("Opta-RbVisEvents",!0)}i.prototype.preloadEvents=function(){var a=[];return e.each(this.assets,(function(i){e.each(i,(function(e){a.push(t.preload(e))}))})),t.whenAll(a)},i.prototype.clear=function(){this.dom.selectAll("*").remove(),this.dom.attr("transform",null),this.Event=null},i.prototype.plotEvent=function(e,a){var i,s=e.side,o=e.x2,n=!this.is_premium;switch(this.clear(),this.Event=e,e.type_id){case 1:n&&(e.hasQ(5)?i="freeKick":e.hasQ(107)?i="throwIn":e.hasQ(124)?i="goalKick":e.hasQ(279)&&(i="kickOff"));break;case 4:this.is_premium&&e.outcome&&(e.hasQ(9)?i="penalty":e.hasQ(9)||(i="freeKick"));break;case 5:i=!t.AppSettings.rtl&&("home"===s&&o>100||"away"===s&&o<0)||t.AppSettings.rtl&&("away"===s&&o>100||"home"===s&&o<0)?"goalKick":o<0||o>100?"corner":"throwIn";break;case 6:i="corner";break;case 10:n?i=e.hasQ(94)?"blockedShot":"shotOnTarget":e.hasQ(9)&&(i="penaltyMiss");break;case 13:n?i=e.hasQ(9)?"penaltyMiss":"shotOffTarget":e.hasQ(9)&&(i="penaltyMiss");break;case 14:n?i="post":e.hasQ(9)&&(i="penaltyMiss");break;case 15:n&&(i="shotOnTarget");break;case 39:n&&(i="shotOnGoal");break;case 57:i="throwIn";break;case 72:i="offside";break;case 601:n&&(i="possession");break;case 613:i=e.hasQ(903)?"dangerousAttack":"attack";break;case 614:i="counterAttack"}return"function"==typeof this[i]?this[i](e,a):t.Deferred().resolve()},i.prototype.doGrayoutFillDef=function(t){var e=this.getPos,a=t.append("radialGradient").attr("id",this.widget_id+"-pitchgrayout");return a.append("stop").attr({offset:"10%","stop-color":"transparent"}),a.append("stop").attr({offset:"95%","stop-color":"black"}),this.dom.append("polygon").attr({points:[e(0,0).join(","),e(100,0).join(","),e(100,100).join(","),e(0,100).join(",")].join(" ")}).style({fill:"url(#"+this.widget_id+"-pitchgrayout)",opacity:0})},i.prototype.standardFadeLoop=function(t,e,a){var i=this;e.transition().duration(500).style("opacity",0).each("end",(function(){i.Event===t&&(e.style("opacity",1),a())}))},i.prototype.attack=function(e){var a,i,s=this,o=s.dom,n=s.getPos,r=t.Deferred(),l=o.append("defs"),d=o.append("g").attr("clip-path","url(#"+s.widget_id+"-clippathpitch)"),_=0,p=[n(100,50).join(","),n(134,100).join(","),n(224,100).join(","),n(224,0).join(","),n(134,0).join(",")],c=[n(26,50).join(","),n(60,100).join(","),n(150,100).join(","),n(150,0).join(","),n(60,0).join(",")],h=d.append("polygon"),u=d.append("polygon"),f=function(){_=0,i(h),i(u)};return i=function(t){t.attr({points:p.join(" "),"data-n":_+1}).style({fill:"url(#"+s.widget_id+"-attacklineargradientblack)",opacity:.3}).transition().delay(2e3*_/2).duration(1e3).ease("back-out").attr({points:c.join(" ")}).each("end",(function(){"2"===this.getAttribute("data-n")&&(r.resolve(),s.standardFadeLoop(e,d,f))})),_+=1},s.flipDom("home"===e.side),l.append("clipPath").attr({id:s.widget_id+"-clippathattack"}).append("polygon").attr("points",[n(26,50).join(","),n(60,100).join(","),n(0,100).join(","),n(0,0).join(","),n(60,0).join(",")].join(" ")),(a=l.append("linearGradient").attr("id",s.widget_id+"-attacklineargradientblack")).append("stop").attr({offset:"10%","stop-color":"black"}),a.append("stop").attr({offset:"65%","stop-color":"transparent"}),i(h),i(u),r},i.prototype.blockedShot=function(e){var a,i=this,s=i.dom,o=i.getPos,n=t.Deferred(),r=s.append("defs"),l=["M",o(50,50),"L",o(54,44),"L",o(53,47),"L",o(69,45),"L",o(69,55),"L",o(53,53),"L",o(54,56),"Z"].join(" "),d=["M",o(6,50),"L",o(10,44),"L",o(9,47),"L",o(25,45),"L",o(25,55),"L",o(9,53),"L",o(10,56),"Z"].join(" "),_=["M",o(50,50),"L",o(66,76),"Q",o(79,50),o(66,24),"Z"].join(" "),p=["M",o(6,50),"L",o(22,76),"Q",o(35,50),o(22,24),"Z"].join(" "),c=[o(5.5,50),o(5.5,50),o(5.5,50),o(5.5,50),o(5.5,50)],h=[o(5.5,50),o(7,40),o(0,40),o(0,60),o(7,60)];return i.flipDom(this.shouldFlipLeftSideEvent(e)),(a=r.append("mask").attr({id:i.widget_id+"-clippathblockedshot"})).append("rect").attr({width:"100%",height:"100%",fill:"white"}),a.append("polygon").attr("points",[o(50,0),o(50,100),o(100,100),o(100,0)].join(" ")).style({fill:"black"}),r.append("pattern").attr({id:i.widget_id+"-stripepatternblockedshot",width:5,height:4,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"}).append("rect").attr({width:2.5,height:4,fill:"white"}),r.append("mask").attr({id:i.widget_id+"-stripemaskblockedshot"}).append("rect").attr({x:0,y:0,width:"100%",height:"100%",fill:"url(#"+i.widget_id+"-stripepatternblockedshot)"}),s.append("path").attr({d:_,mask:"url(#"+i.widget_id+"-clippathblockedshot)"}).style({fill:"black",opacity:.4}).transition().delay(1e3).duration(1e3).ease("back-out").attr("d",p),s.append("path").attr({d:l,mask:"url(#"+i.widget_id+"-clippathblockedshot)"}).style({fill:"#CE0D15",opacity:.6}).transition().duration(1e3).attr("d",d),s.append("polygon").attr({points:[o(5,31.1),o(12,31.1),o(12,68.9),o(5,68.9)].join(" ")}).style({fill:"#CE0D15",opacity:0}).transition().delay(1e3).duration(1e3).attr({points:[o(0,21.1),o(17,21.1),o(17,78.9),o(0,78.9)].join(" ")}).style({opacity:.3}),s.append("polygon").attr({points:c,mask:"url(#"+i.widget_id+"-stripemaskblockedshot)"}).style({fill:"#CE0D15",opacity:0}).transition().delay(1e3).duration(1e3).attr({points:h}).style({opacity:.8}).each("end",(function(){n.resolve()})),n},i.prototype.corner=function(e){var a=this.dom,i=this.getPos,s=this.is_3D,o=t.Deferred(),n=e.x>50?100:0,r=e.y>50?100:0,l=i(n,r),d=i(0===n?7.5:92.5,0===r?12:88),_=i(0===n?1:99,0===r?1.5:98),p=a.append("g").attr("clip-path","url(#"+this.widget_id+"-clippathpitch)");return this.doGrayoutFillDef(a.append("defs")).transition().duration(500).delay(500).style("opacity",.25).each("end",(function(){o.resolve()})),p.append("ellipse").attr({cx:l[0],cy:l[1],rx:Math.abs(d[0]-l[0]),ry:Math.abs(d[0]-l[0])*(s?.3:1)}).style({fill:"black",opacity:.5}),this.is_premium||a.append("image").attr({class:"Opta-ball","xlink:href":this.resource_paths.premium_ball,width:"13px",height:"13px",x:_[0],y:_[1],transform:"translate(-7.5, -7.5)"}),o},i.prototype.counterAttack=function(e){var a,i,s=this,o=s.dom,n=s.getPos,r=t.Deferred(),l=o.append("defs"),d=o.append("g").attr("clip-path","url(#"+s.widget_id+"-clippathpitch)"),_=d.append("polygon"),p=d.append("polygon"),c=d.append("path");return i=function t(){_.attr("points",[n(120,50),n(154,100),n(214,100),n(214,0),n(154,0)].join(" ")).style({fill:"black",opacity:.4}).transition().duration(1e3).delay(500).ease("back-out").attr("points",[n(26,50),n(60,100),n(120,100),n(120,0),n(60,0)].join(" ")),p.attr("points",[n(26,50),n(60,100),n(60,100),n(26,50),n(60,0),n(60,0)].join(" ")).style({fill:"black",opacity:.2}).transition().duration(500).delay(1500).ease("back-out").attr("points",[n(6,50),n(40,100),n(60,100),n(26,50),n(60,0),n(40,0)].join(" ")).each("end",(function(){r.resolve(),s.standardFadeLoop(e,d,t)})),c.attr({d:["M",n(100,50),"L",n(104,43),"Q",n(134,50),n(194,0),"L",n(194,100),"Q",n(134,50),n(104,57),"Z"].join(" ")}).style({fill:"url(#"+s.widget_id+"-counterattacklineargradientred)",opacity:.5}).transition().duration(1e3).attr({d:["M",n(6,50),"L",n(10,43),"Q",n(40,50),n(100,0),"L",n(100,100),"Q",n(40,50),n(10,57),"Z"].join(" ")})},s.flipDom(this.shouldFlipLeftSideEvent(e)),(a=l.append("linearGradient").attr("id",s.widget_id+"-counterattacklineargradientred")).append("stop").attr({offset:"60%","stop-color":"#B90000"}),a.append("stop").attr({offset:"96%","stop-color":"transparent"}),i(),r},i.prototype.dangerousAttack=function(e){var a,i,s,o=this,n=o.dom,r=o.getPos,l=t.Deferred(),d=n.append("defs"),_=n.append("g").attr("clip-path","url(#"+o.widget_id+"-clippathpitch)"),p=_.append("polygon"),c=_.append("polygon"),h=[r(26,50).join(","),r(60,100).join(","),r(150,100).join(","),r(150,0).join(","),r(60,0).join(",")],u=function(){c.style("opacity",0),s()},f=function(){c.attr({points:h.join(" "),"clip-path":"url(#"+o.widget_id+"-clippathdangerousattack)"}).style({fill:"url(#"+o.widget_id+"-dangerousattacklineargradientred)",opacity:.6}).transition().duration(1e3).ease("back-out").attr({points:[r(6,50).join(","),r(40,100).join(","),r(150,100).join(","),r(150,0).join(","),r(40,0).join(",")].join(" ")}).each("end",(function(){l.resolve(),o.standardFadeLoop(e,_,u)}))};return s=function(){p.attr({points:[r(100,50).join(","),r(134,100).join(","),r(224,100).join(","),r(224,0).join(","),r(134,0).join(",")].join(" ")}).style({fill:"url(#"+o.widget_id+"-dangerousattacklineargradientblack)",opacity:.6}).transition().duration(1e3).ease("back-out").attr({points:h.join(" ")}).each("end",f)},o.flipDom(this.shouldFlipLeftSideEvent(e)),d.append("clipPath").attr({id:o.widget_id+"-clippathdangerousattack"}).append("polygon").attr("points",[r(26,50).join(","),r(60,100).join(","),r(0,100).join(","),r(0,0).join(","),r(60,0).join(",")].join(" ")),(a=d.append("linearGradient").attr("id",this.widget_id+"-dangerousattacklineargradientblack")).append("stop").attr({offset:"10%","stop-color":"black"}),a.append("stop").attr({offset:"65%","stop-color":"transparent"}),(i=d.append("linearGradient").attr("id",this.widget_id+"-dangerousattacklineargradientred")).append("stop").attr({offset:"10%","stop-color":"#660000"}),i.append("stop").attr({offset:"65%","stop-color":"transparent"}),s(),l},i.prototype.freeKick=function(e){var a,i,s=this,o=s.dom,n=s.is_3D,r=s.getPos,l=t.Deferred(),d=this.shouldFlipLeftSideEvent(e),_=e.x,p=e.y-1,c=r(_,p),h=[d?100:0,50],u=d?1:-1,f=o.append("g").attr("clip-path","url(#"+s.widget_id+"-clippathpitch)"),m=f.append("g"),g=f.append("g"),y=o.append("defs"),v=g.append("ellipse"),E=g.append("ellipse"),w=g.append("ellipse");function b(e,i){var o=t.Deferred();return a=r(_+i,p-i),e.attr({cx:c[0],cy:c[1],rx:0,ry:0}).transition().duration(250).delay(250).ease("back-out").attr({cx:c[0],cy:c[1],rx:a[0]-c[0],ry:(a[0]-c[0])*(n?.3:1),"clip-path":"url(#"+s.widget_id+"-clippathfreekick)"}).style({fill:"none",stroke:"white","stroke-width":"1px",opacity:.8}).each("end",o.resolve),o}function T(){var t={rx:0,ry:0};v.attr(t),E.attr(t),w.attr(t),i()}return i=function(){b(v,n?2.3:4.6).then((function(){return b(E,n?4.6:6.3)})).then((function(){return b(w,8)})).then((function(){l.resolve(),s.standardFadeLoop(e,g,T)}))},function(){function t(t){var e=Math.sqrt(Math.pow(_-h[0],2)+Math.pow(p-h[1],2)),a=(90-180*Math.sin((p-h[1])/e)/Math.PI+t)*u,i=[13*Math.sin(a/180*Math.PI)*-1,13*Math.cos(a/180*Math.PI)*-1],s=[_-i[0],p+i[1]];return r.apply(void 0,s)}var e=t(67.5*u),a=t(-67.5*u),i=["M",c[0],c[1],"L",e[0],e[1],"A 3 1 5 0 1",a[0],a[1],"Z"];y.append("clipPath").attr({id:s.widget_id+"-clippathfreekick"}).append("path").attr("d",i.join(" "))}(),m.classed("Opta-Freekick",!0),a=r(_+9,p-9),m.append("ellipse").attr({cx:c[0],cy:c[1],rx:0,ry:0}).transition().duration(250).attr({cx:c[0],cy:c[1],rx:a[0]-c[0],ry:(a[0]-c[0])*(n?.3:1)}).style({opacity:.5}),i(),s.is_premium||n||m.append("image").attr({class:"Opta-ball","xlink:href":s.resource_paths.premium_ball,width:"13px",height:"13px",x:e.start_pos.x,y:e.start_pos.y,transform:"translate(-4, -4)"}),l},i.prototype.flipDom=function(t){t&&this.dom.attr({transform:"translate(800,0),scale(-1,1)"})},i.prototype.goalKick=function(e){var a=this.dom,i=this.getPos,s=1e3,o=t.Deferred(),n=!t.AppSettings.rtl&&"away"===(e.output_side||e.side)||t.AppSettings.rtl&&"home"===(e.output_side||e.side),r=.5,l=this.doGrayoutFillDef(a.append("defs"));return this.flipDom(n),a.append("polygon").attr({points:[i(r,37).join(","),i(r,37).join(","),i(r,63).join(","),i(r,63).join(",")].join(" ")}).style({fill:"green",opacity:.6}).transition().duration(s).attr({points:[i(r,37).join(","),i(5.8,37).join(","),i(5.8,63).join(","),i(r,63).join(",")].join(" ")}),l.transition().duration(500).delay(500).style("opacity",.25).each("end",(function(){o.resolve()})),o},i.prototype.offside=function(e){var a,i=this,s=i.dom,o=i.getPos,n=2e3,r=t.Deferred(),l=s.append("defs"),d=["M",o(70,50),"L",o(74,44),"L",o(73,47),"Q",o(94,45),o(104,40),"Q",o(110,50),o(104,60),"Q",o(94,55),o(73,53),"L",o(74,56),"Z"].join(" "),_=["M",o(26,50),"L",o(30,44),"L",o(29,47),"Q",o(50,45),o(60,40),"Q",o(66,50),o(60,60),"Q",o(50,55),o(29,53),"L",o(30,56),"Z"].join(" "),p=["M",o(70,50),"L",o(92,80),"Q",o(129,50),o(92,20),"Z"].join(" "),c=["M",o(26,50),"L",o(48,80),"Q",o(85,50),o(48,20),"Z"].join(" "),h=[o(23.5,0),o(23.5,0),o(23.5,100),o(23.5,100)],u=[o(0,0),o(23.5,0),o(23.5,100),o(0,100)];return i.flipDom(this.shouldFlipLeftSideEvent(e)),(a=l.append("mask").attr({id:i.widget_id+"-clippathoffside"})).append("rect").attr({width:"100%",height:"100%",fill:"white"}),a.append("polygon").attr("points",[o(70,0),o(70,100),o(120,100),o(120,0)].join(" ")).style({fill:"black"}),l.append("pattern").attr({id:i.widget_id+"-stripepatternoffside",width:5,height:4,patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)"}).append("rect").attr({width:2.5,height:4,fill:"white"}),l.append("mask").attr({id:i.widget_id+"-stripemaskoffside"}).append("rect").attr({x:0,y:0,width:"100%",height:"100%",fill:"url(#"+i.widget_id+"-stripepatternoffside)"}),s.append("path").attr({d:p,mask:"url(#"+i.widget_id+"-clippathoffside)"}).style({fill:"black",opacity:.4}).transition().delay(n/3).duration(n/3).ease("back-out").attr("d",c),s.append("path").attr({d,mask:"url(#"+i.widget_id+"-clippathoffside)"}).style({fill:"#CE0D15",opacity:.6}).transition().duration(n/3).attr("d",_),s.append("polygon").attr({points:u}).style({fill:"#CE0D15",opacity:0}).transition().delay(1e3).duration(500).style({opacity:.2}),s.append("polygon").attr({points:h,mask:"url(#"+i.widget_id+"-stripemaskoffside)"}).style({fill:"#CE0D15",opacity:0}).transition().delay(1500).duration(500).attr({points:u}).style({opacity:.3}).each("end",(function(){r.resolve()})),r},i.prototype.shouldFlipLeftSideEvent=function(e){return!t.AppSettings.rtl&&"home"===e.side||"away"===e.side&&t.AppSettings.rtl},i.prototype.penalty=function(e){var a=this.dom,i=this.getPos,s=t.Deferred(),o=a.append("defs").append("linearGradient").attr("id",this.widget_id+"-penaltygradientblack");return this.flipDom(this.shouldFlipLeftSideEvent(e)),o.append("stop").attr({offset:"0%","stop-color":"black"}),o.append("stop").attr({offset:"50%","stop-color":"transparent"}),a.append("polygon").attr({points:[i(0,0),i(50,0),i(50,100),i(0,100)].join(" ")}).style({fill:"url(#"+this.widget_id+"-penaltygradientblack)",opacity:0}).transition().duration(990).style("opacity",.75),a.append("polygon").attr({points:[i(2,26.1),i(15,26.1),i(15,73.9),i(2,73.9)].join(" ")}).style({fill:"#CE0D15",opacity:0}).transition().duration(750).delay(750).attr({points:[i(0,21.1),i(17,21.1),i(17,78.9),i(0,78.9)].join(" ")}).style("opacity",.35).each("end",(function(){s.resolve()})),s},i.prototype.penaltyMiss=function(e){var a,i,s,o,n=this,r=n.dom,l=n.getPos,d=n.getVPos,_=t.Deferred(),p=r.append("defs"),c=["M",l(17,50),"L",l(17,50),"Q",l(17,50),l(17,50),"Z"].join(" "),h=["M",l(17,50),"L",l(5.8,40),"Q",l(0,50),l(5.8,60),"Z"].join(" "),u=[d(0,10,10),d(0,44.2,10),d(0,44.2,42),d(0,55.8,42),d(0,55.8,0),d(0,90,0),d(0,90,90),d(0,10,90)].join(" "),f=[d(0,0,0),d(0,44.2,0),d(0,44.2,42),d(0,55.8,42),d(0,55.8,0),d(0,100,0),d(0,100,100),d(0,0,100)].join(" "),m=[d(0,50,21),d(0,50,21),d(0,50,21),d(0,50,21)].join(" "),g=[d(0,44.2,0),d(0,44.2,42),d(0,55.8,42),d(0,55.8,0)].join(" "),y=p.append("linearGradient").attr("id",this.widget_id+"-penaltymissgradientblack");return 10===e.period_id&&"away"===e.side&&r.attr({transform:"translate(800,0),scale(-1,1)"}),y.append("stop").attr({offset:"0%","stop-color":"black"}),y.append("stop").attr({offset:"50%","stop-color":"transparent"}),r.append("polygon").attr({points:[l(0,0),l(50,0),l(50,100),l(0,100)].join(" ")}).style({fill:"url(#"+this.widget_id+"-penaltymissgradientblack)",opacity:0}).transition().duration(1e3).style("opacity",.5),this.is_premium||(r.append("path").attr({d:c}).style({fill:"black",opacity:.4}).transition().duration(1e3).attr("d",h),i=l((a=[11.5,50])[0],a[1]),s=l(a[0]+1.40625,a[1]),o=l(a[0],a[1]-2.5),r.append("ellipse").attr({cx:i[0],cy:i[1],rx:0,ry:0}).style({fill:"#CE0D15",opacity:0}).transition().duration(1e3).attr({rx:s[0]-i[0],ry:o[1]-i[1]}).style({opacity:.5})),r.append("polygon").attr({points:u}).style({fill:"#CE0D15",opacity:0}).transition().delay(1e3).duration(1e3).attr({points:f}).style({opacity:.3}).each("end",(function(){_.resolve()})),r.append("polygon").attr({points:m}).style({fill:"#CE0D15",opacity:0}).transition().delay(1e3).duration(1e3).attr({points:g}).style({opacity:.5}).each("end",(function(){_.resolve()})),_},i.prototype.possession=function(e){var a,i=this,s=i.dom,o=i.getPos,n=t.Deferred(),r=!t.AppSettings.rtl&&"away"===(e.output_side||e.side)||t.AppSettings.rtl&&"home"===(e.output_side||e.side),l=s.append("defs"),d=s.append("g").attr("clip-path","url(#"+i.widget_id+"-clippathpitch)"),_=d.append("path"),p=d.append("path");return i.flipDom(r),(a=l.append("linearGradient").attr("id",i.widget_id+"-possessiongradientblack")).append("stop").attr({offset:"0%","stop-color":"transparent"}),a.append("stop").attr({offset:"90%","stop-color":"black"}),function t(){_.attr("d",["M",o(-13,0),"Q",[o(10,50).join(" "),o(-13,100).join(" ")].join(", "),"L",o(-23,100),"Q",[o(0,50).join(" "),o(-23,0).join(" ")].join(", "),"Z"].join(" ")).style({fill:"black",opacity:.5}).transition().duration(2e3).attr("d",["M",o(37,0),"Q",[o(60,50).join(" "),o(37,100).join(" ")].join(", "),"L",o(27,100),"Q",[o(50,50).join(" "),o(27,0).join(" ")].join(", "),"Z"].join(" ")),p.attr("d",["M",o(-50,0),"L",o(-23,0),"Q",[o(0,50).join(" "),o(-23,100).join(" ")].join(", "),"L",o(-50,100),"Z"].join(" ")).style({fill:"url(#"+i.widget_id+"-possessiongradientblack)",opacity:.4}).transition().duration(2e3).attr("d",["M",o(0,0),"L",o(27,0),"Q",[o(50,50).join(" "),o(27,100).join(" ")].join(", "),"L",o(0,100),"Z"].join(" ")).each("end",(function(){n.resolve(),i.standardFadeLoop(e,d,t)}))}(),n},i.prototype.post=function(){var e,a=this,i=a.dom,s=a.getPos,o=a.getVPos,n=t.Deferred(),r=i.append("defs"),l=["M",s(50,50),"L",s(54,44),"L",s(53,47),"L",s(69,45),"L",s(69,55),"L",s(53,53),"L",s(54,56),"Z"].join(" "),d=["M",s(6,50),"L",s(10,44),"L",s(9,47),"L",s(25,45),"L",s(25,55),"L",s(9,53),"L",s(10,56),"Z"].join(" "),_=["M",s(50,50),"L",s(66,76),"Q",s(79,50),s(66,24),"Z"].join(" "),p=["M",s(6,50),"L",s(22,76),"Q",s(35,50),s(22,24),"Z"].join(" "),c=["M",o(0,44.2,0),"L",o(0,44.2,42),"L",o(0,56.8,42),"L",o(0,56.8,0)].join(" ");return a.flipDom(this.shouldFlipLeftSideEvent(Event)),(e=r.append("mask").attr({id:a.widget_id+"-clippathpost"})).append("rect").attr({width:"100%",height:"100%",fill:"white"}),e.append("polygon").attr("points",[s(50,0),s(50,100),s(100,100),s(100,0)].join(" ")).style({fill:"black"}),i.append("path").attr({d:_,mask:"url(#"+a.widget_id+"-clippathpost)"}).style({fill:"black",opacity:.4}).transition().delay(1e3).duration(1e3).ease("back-out").attr("d",p),i.append("path").attr({d:l,mask:"url(#"+a.widget_id+"-clippathpost)"}).style({fill:"#CE0D15",opacity:.6}).transition().duration(1e3).attr("d",d),i.append("polygon").attr({points:[s(5,31.1),s(12,31.1),s(12,68.9),s(5,68.9)].join(" ")}).style({fill:"#CE0D15",opacity:0}).transition().delay(1e3).duration(1e3).attr({points:[s(0,21.1),s(17,21.1),s(17,78.9),s(0,78.9)].join(" ")}).style({opacity:.3}),i.append("path").attr({d:c}).style({stroke:"#CE0D15","stroke-width":2,fill:"none",opacity:0}).transition().delay(1e3).duration(1e3).style({opacity:1}).each("end",(function(){n.resolve()})),n},i.prototype.shotOffTarget=function(e){var a,i=this,s=i.dom,o=i.getPos,n=i.getVPos,r=t.Deferred(),l=s.append("defs"),d=["M",o(50,50),"L",o(54,44),"L",o(53,47),"Q",o(74,45),o(84,40),"Q",o(90,50),o(84,60),"Q",o(74,55),o(53,53),"L",o(54,56),"Z"].join(" "),_=["M",o(6,50),"L",o(10,44),"L",o(9,47),"Q",o(30,45),o(40,40),"Q",o(46,50),o(40,60),"Q",o(30,55),o(9,53),"L",o(10,56),"Z"].join(" "),p=["M",o(50,50),"L",o(72,80),"Q",o(109,50),o(72,20),"Z"].join(" "),c=["M",o(6,50),"L",o(28,80),"Q",o(65,50),o(28,20),"Z"].join(" "),h=[n(0,10,10),n(0,44.2,10),n(0,44.2,42),n(0,55.8,42),n(0,55.8,0),n(0,90,0),n(0,90,90),n(0,10,90)].join(" "),u=[n(0,0,0),n(0,44.2,0),n(0,44.2,42),n(0,55.8,42),n(0,55.8,0),n(0,100,0),n(0,100,100),n(0,0,100)].join(" ");return i.flipDom(this.shouldFlipLeftSideEvent(e)),(a=l.append("mask").attr({id:i.widget_id+"-clippathshotofftarget"})).append("rect").attr({width:"100%",height:"100%",fill:"white"}),a.append("polygon").attr("points",[o(50,0),o(50,100),o(100,100),o(100,0)].join(" ")).style({fill:"black"}),s.append("path").attr({d:p,mask:"url(#"+i.widget_id+"-clippathshotofftarget)"}).style({fill:"black",opacity:.4}).transition().delay(1e3).duration(1e3).ease("back-out").attr("d",c),s.append("path").attr({d,mask:"url(#"+i.widget_id+"-clippathshotofftarget)"}).style({fill:"#CE0D15",opacity:.6}).transition().duration(1e3).attr("d",_),s.append("polygon").attr({points:h}).style({fill:"#CE0D15",opacity:0}).transition().delay(1e3).duration(1e3).ease("back-out").attr({points:u}).style({opacity:.3}).each("end",(function(){r.resolve()})),r},i.prototype.shotOnTarget=function(e){var a=this,i=a.dom,s=a.getPos,o=2e3,n=t.Deferred(),r=0,l=0,d=i.append("defs"),_=["M",s(32,50),"L",s(36,42),"L",s(35,47),"L",s(57,44),"L",s(57,56),"L",s(35,53),"L",s(36,58),"Z"].join(" "),p=["M",s(6,50),"L",s(10,42),"L",s(9,47),"L",s(31,44),"L",s(31,56),"L",s(9,53),"L",s(10,58),"Z"].join(" "),c=["M",s(1,50),"L",s(28,50),"Q",[s(35,50).join(" "),s(28,50).join(" ")].join(","),"Z"].join(" "),h=["M",s(1,50),"L",s(28,90),"Q",[s(35,50).join(" "),s(28,10).join(" ")].join(","),"Z"].join(" "),u=["M",s(6,50),"L",s(30,70),"Q",[s(33,50).join(" "),s(30,30).join(" ")].join(","),"Z"].join(" "),f=function(){i.append("path").attr("d",_).style({fill:"#CE0D15",opacity:.6}).transition().delay(r*o/4).duration(500).attr("d",p),r+=1},m=function(){t.d3.select(this).transition().duration(500).attr("d",u).each("end",(function(){"2"===this.getAttribute("data-n")&&n.resolve()}))},g=function(){i.append("path").attr({d:c,"data-n":l+1}).style({fill:"#CE0D15",opacity:.2}).transition().delay((r+l)*o/4).duration(500).attr("d",h).each("end",m),l+=1};return a.flipDom(this.shouldFlipLeftSideEvent(e)),d.append("clipPath").attr({id:a.widget_id+"-clippathshotontarget"}).append("path").attr("d",h),i.attr("clip-path","url(#"+a.widget_id+"-clippathshotontarget)"),f(),f(),g(),g(),n},i.prototype.shotOnGoal=function(e){var a,i=this,s=i.dom,o=i.getPos,n=i.assets.shot_on_goal,r=t.Deferred(),l=o(-10,0),d=o(50,0),_=o(50,100),p=o(-10,100),c=s.append("defs");return a=o(0,50),i.flipDom(this.shouldFlipLeftSideEvent(e)),c.append("clipPath").attr({id:i.widget_id+"-clippathshotongoal"}).append("polygon").attr({points:[l.join(","),d.join(","),_.join(","),p.join(",")].join(" ")}),s.attr("clip-path","url(#"+i.widget_id+"-clippathshotongoal)"),s.append("svg:image").attr({x:a[0],y:a[1],width:15,height:36.08,transform:"matrix("+[0,0,0,0,a[0],a[1]-10].join(",")+")","xlink:href":n.goal,opacity:.5}).transition().duration(500).ease("quad-in").attr({transform:"matrix("+[1,0,0,1,-6.5,-27].join(",")+")"}),s.append("svg:image").attr({x:a[0],y:a[1],width:270,height:156.76,transform:"matrix("+[1,0,0,0,30,a[1]].join(",")+")","xlink:href":n.cone,opacity:.2}).transition().duration(500).delay(1e3).ease("back-out").attr({transform:"matrix("+[1,0,0,1,30,-63].join(",")+")"}),s.append("svg:image").attr({x:a[0],y:a[1],width:270,height:156.76,transform:"matrix("+[1,0,0,0,30,a[1]].join(",")+")","xlink:href":n.cone,opacity:.2}).transition().duration(500).delay(1500).ease("back-out").attr({transform:"matrix("+[1,0,0,1,30,-63].join(",")+")"}).each("end",(function(){r.resolve()})),s.append("svg:image").attr({x:a[0],y:a[1],width:260,height:42.8,transform:"matrix("+[1,0,0,1,330,-20].join(",")+")","xlink:href":n.arrow,opacity:.5}).transition().duration(500).ease("quad-in").attr({transform:"matrix("+[1,0,0,1,30,-20].join(",")+")"}),s.append("svg:image").attr({x:a[0],y:a[1],width:260,height:42.8,transform:"matrix("+[1,0,0,1,330,-20].join(",")+")","xlink:href":n.arrow,opacity:.5}).transition().duration(500).delay(500).ease("quad-in").attr({transform:"matrix("+[1,0,0,1,30,-20].join(",")+")"}),r},i.prototype.throwIn=function(e){var i,s,o,n,r=this,l=r.dom,d=r.getPos,_=r.is_3D,p=t.Deferred(),c=d(e.x,e.y),h=c,u=c,f=e.y>50,m=f?-1:1,g=f?0:1,y=e.x<8,v=e.x>92,E=l.append("g"),w=E.append("path"),b=E.append("path"),T=E.append("path"),k=function(t,o){var n=v?2:o,r=y?2:o;return i=h,s=u,h=d(a(e.x-t,1,99),e.y+n*m),u=d(a(e.x+t,1,99),e.y+r*m),{start:["M",i[0],i[1],"A",1,_?.3:1,0,0,g,s[0],s[1]],end:["M",h[0],h[1],"A",1,_?.3:1,0,0,g,u[0],u[1]]}},x=function(){o=k(_?6:8,8),T.attr({d:o.start.join(" "),"stroke-width":1.1}).transition().ease("back-out").duration(500).attr({d:o.end.join(" "),"stroke-width":1.2}).each("end",(function(){p.resolve(),r.Event===e&&(o=k(2,4),T.transition().duration(500).attr("stroke-width",0),b.transition().duration(500).attr("stroke-width",0),w.transition().duration(500).attr("stroke-width",0).each("end",(function(){w.attr("d",o.start.join(" ")),n()})))}))},O=function(){o=k(_?4:6,6),b.attr({d:o.start.join(" "),"stroke-width":1}).transition().ease("back-out").duration(500).attr({d:o.end.join(" "),"stroke-width":1.1}).each("end",x)};return n=function(){o=k(_?2:4,4),w.attr({d:o.start.join(" "),"stroke-width":0}).transition().duration(1e3).attr({d:o.end.join(" "),"stroke-width":1}).each("end",O)},E.classed("Opta-Throwin",!0),n(),p},t.components.football.rbvisevents=i}(Opta)}},t=>{var e;e="./src/widget/football/live_action/live_action.ts",t(t.s=e)}]);
//# sourceURL=https://secure.widget.cloud.opta.net/v3/widget/football/live_action/live_action.js
//# sourceMappingURL=https://secure.widget.cloud.opta.net/v3/sourcemap/widget/football/live_action/live_action.js.map