@golstats/gsc-game-data 1.1.31 → 1.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8204,4 +8204,4 @@ uniform ${Fe} ${Ge} u_${rt};
8204
8204
  * vuex v4.0.2
8205
8205
  * (c) 2021 Evan You
8206
8206
  * @license MIT
8207
- */var hW="store";function fUt(e){return e===void 0&&(e=null),t.inject(e!==null?e:hW)}function Rg(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function pW(e){return e!==null&&typeof e=="object"}function mUt(e){return e&&typeof e.then=="function"}function o0(e,o){if(!e)throw new Error("[vuex] "+o)}function gUt(e,o){return function(){return e(o)}}function fW(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var B=o.indexOf(e);B>-1&&o.splice(B,1)}}function mW(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;Zw(e,s,[],e._modules.root,!0),dA(e,s,o)}function dA(e,o,s){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var U=e._wrappedGetters,m={};Rg(U,function(g,a){m[a]=gUt(g,e),Object.defineProperty(e.getters,a,{get:function(){return m[a]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&xUt(e),B&&s&&e._withCommit(function(){B.data=null})}function Zw(e,o,s,B,U){var m=!s.length,g=e._modules.getNamespace(s);if(B.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[g]=B),!m&&!U){var a=hA(o,s.slice(0,-1)),y=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&y in a&&console.warn('[vuex] state field "'+y+'" was overridden by a module with the same name at "'+s.join(".")+'"'),a[y]=B.state})}var h=B.context=yUt(e,g,s);B.forEachMutation(function(r,_){var v=g+_;vUt(e,v,r,h)}),B.forEachAction(function(r,_){var v=r.root?_:g+_,x=r.handler||r;bUt(e,v,x,h)}),B.forEachGetter(function(r,_){var v=g+_;_Ut(e,v,r,h)}),B.forEachChild(function(r,_){Zw(e,o,s.concat(_),r,U)})}function yUt(e,o,s){var B=o==="",U={dispatch:B?e.dispatch:function(m,g,a){var y=Ww(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+y.type+", global type: "+_);return}return e.dispatch(_,h)},commit:B?e.commit:function(m,g,a){var y=Ww(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+y.type+", global type: "+_);return}e.commit(_,h,r)}};return Object.defineProperties(U,{getters:{get:B?function(){return e.getters}:function(){return gW(e,o)}},state:{get:function(){return hA(e.state,s)}}}),U}function gW(e,o){if(!e._makeLocalGettersCache[o]){var s={},B=o.length;Object.keys(e.getters).forEach(function(U){if(U.slice(0,B)===o){var m=U.slice(B);Object.defineProperty(s,m,{get:function(){return e.getters[U]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function vUt(e,o,s,B){var U=e._mutations[o]||(e._mutations[o]=[]);U.push(function(m){s.call(e,B.state,m)})}function bUt(e,o,s,B){var U=e._actions[o]||(e._actions[o]=[]);U.push(function(m){var g=s.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},m);return mUt(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):g})}function _Ut(e,o,s,B){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(U){return s(B.state,B.getters,U.state,U.getters)}}function xUt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&o0(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function hA(e,o){return o.reduce(function(s,B){return s[B]},e)}function Ww(e,o,s){return pW(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&o0(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var wUt="vuex bindings",yW="vuex:mutations",pA="vuex:actions",y2="vuex",kUt=0;function SUt(e,o){pUt({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[wUt]},function(s){s.addTimelineLayer({id:yW,label:"Vuex Mutations",color:vW}),s.addTimelineLayer({id:pA,label:"Vuex Actions",color:vW}),s.addInspector({id:y2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===y2)if(B.filter){var U=[];wW(U,o._modules.root,B.filter,""),B.rootNodes=U}else B.rootNodes=[xW(o._modules.root,"")]}),s.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId;gW(o,U),B.state=AUt(MUt(o._modules,U),U==="root"?o.getters:o._makeLocalGettersCache,U)}}),s.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId,m=B.path;U!=="root"&&(m=U.split("/").filter(Boolean).concat(m)),o._withCommit(function(){B.set(o._state.data,m,B.state.value)})}}),o.subscribe(function(B,U){var m={};B.payload&&(m.payload=B.payload),m.state=U,s.notifyComponentUpdate(),s.sendInspectorTree(y2),s.sendInspectorState(y2),s.addTimelineEvent({layerId:yW,event:{time:Date.now(),title:B.type,data:m}})}),o.subscribeAction({before:function(B,U){var m={};B.payload&&(m.payload=B.payload),B._id=kUt++,B._time=Date.now(),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:m}})},after:function(B,U){var m={},g=Date.now()-B._time;m.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},B.payload&&(m.payload=B.payload),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:m}})}})})}var vW=8702998,CUt=6710886,TUt=16777215,bW={label:"namespaced",textColor:TUt,backgroundColor:CUt};function _W(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function xW(e,o){return{id:o||"root",label:_W(o),tags:e.namespaced?[bW]:[],children:Object.keys(e._children).map(function(s){return xW(e._children[s],o+s+"/")})}}function wW(e,o,s,B){B.includes(s)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:o.namespaced?[bW]:[]}),Object.keys(o._children).forEach(function(U){wW(e,o._children[U],s,B+U+"/")})}function AUt(e,o,s){o=s==="root"?o:o[s];var B=Object.keys(o),U={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(B.length){var m=EUt(o);U.getters=Object.keys(m).map(function(g){return{key:g.endsWith("/")?_W(g):g,editable:!1,value:fA(function(){return m[g]})}})}return U}function EUt(e){var o={};return Object.keys(e).forEach(function(s){var B=s.split("/");if(B.length>1){var U=o,m=B.pop();B.forEach(function(g){U[g]||(U[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),U=U[g]._custom.value}),U[m]=fA(function(){return e[s]})}else o[s]=fA(function(){return e[s]})}),o}function MUt(e,o){var s=o.split("/").filter(function(B){return B});return s.reduce(function(B,U,m){var g=B[U];if(!g)throw new Error('Missing module "'+U+'" for path "'+o+'".');return m===s.length-1?g:g._children},o==="root"?e:e.root._children)}function fA(e){try{return e()}catch(o){return o}}var s0=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},kW={namespaced:{configurable:!0}};kW.namespaced.get=function(){return!!this._rawModule.namespaced},s0.prototype.addChild=function(e,o){this._children[e]=o},s0.prototype.removeChild=function(e){delete this._children[e]},s0.prototype.getChild=function(e){return this._children[e]},s0.prototype.hasChild=function(e){return e in this._children},s0.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},s0.prototype.forEachChild=function(e){Rg(this._children,e)},s0.prototype.forEachGetter=function(e){this._rawModule.getters&&Rg(this._rawModule.getters,e)},s0.prototype.forEachAction=function(e){this._rawModule.actions&&Rg(this._rawModule.actions,e)},s0.prototype.forEachMutation=function(e){this._rawModule.mutations&&Rg(this._rawModule.mutations,e)},Object.defineProperties(s0.prototype,kW);var Vg=function(e){this.register([],e,!1)};Vg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},Vg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,B){return o=o.getChild(B),s+(o.namespaced?B+"/":"")},"")},Vg.prototype.update=function(e){SW([],this.root,e)},Vg.prototype.register=function(e,o,s){var B=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&AW(e,o);var U=new s0(o,s);if(e.length===0)this.root=U;else{var m=this.get(e.slice(0,-1));m.addChild(e[e.length-1],U)}o.modules&&Rg(o.modules,function(g,a){B.register(e.concat(a),g,s)})},Vg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],B=o.getChild(s);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}B.runtime&&o.removeChild(s)},Vg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function SW(e,o,s){if(process.env.NODE_ENV!=="production"&&AW(e,s),o.update(s),s.modules)for(var B in s.modules){if(!o.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}SW(e.concat(B),o.getChild(B),s.modules[B])}}var CW={assert:function(e){return typeof e=="function"},expected:"function"},IUt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},TW={getters:CW,mutations:CW,actions:IUt};function AW(e,o){Object.keys(TW).forEach(function(s){if(o[s]){var B=TW[s];Rg(o[s],function(U,m){o0(B.assert(U),PUt(e,s,m,U,B.expected))})}})}function PUt(e,o,s,B,U){var m=o+" should be "+U+' but "'+o+"."+s+'"';return e.length>0&&(m+=' in module "'+e.join(".")+'"'),m+=" is "+JSON.stringify(B)+".",m}var $p=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(o0(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),o0(this instanceof e,"store must be called with the new operator."));var B=o.plugins;B===void 0&&(B=[]);var U=o.strict;U===void 0&&(U=!1);var m=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Vg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=m;var g=this,a=this,y=a.dispatch,h=a.commit;this.dispatch=function(_,v){return y.call(g,_,v)},this.commit=function(_,v,x){return h.call(g,_,v,x)},this.strict=U;var r=this._modules.root.state;Zw(this,r,[],this._modules.root),dA(this,r),B.forEach(function(_){return _(s)})},mA={state:{configurable:!0}};$p.prototype.install=function(e,o){e.provide(o||hW,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&SUt(e,this)},mA.state.get=function(){return this._state.data},mA.state.set=function(e){process.env.NODE_ENV!=="production"&&o0(!1,"use store.replaceState() to explicit replace store state.")},$p.prototype.commit=function(e,o,s){var B=this,U=Ww(e,o,s),m=U.type,g=U.payload,a=U.options,y={type:m,payload:g},h=this._mutations[m];if(!h){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+m);return}this._withCommit(function(){h.forEach(function(r){r(g)})}),this._subscribers.slice().forEach(function(r){return r(y,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+m+". Silent option has been removed. Use the filter functionality in the vue-devtools")},$p.prototype.dispatch=function(e,o){var s=this,B=Ww(e,o),U=B.type,m=B.payload,g={type:U,payload:m},a=this._actions[U];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+U);return}try{this._actionSubscribers.slice().filter(function(h){return h.before}).forEach(function(h){return h.before(g,s.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(h))}var y=a.length>1?Promise.all(a.map(function(h){return h(m)})):a[0](m);return new Promise(function(h,r){y.then(function(_){try{s._actionSubscribers.filter(function(v){return v.after}).forEach(function(v){return v.after(g,s.state)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(v))}h(_)},function(_){try{s._actionSubscribers.filter(function(v){return v.error}).forEach(function(v){return v.error(g,s.state,_)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(v))}r(_)})})},$p.prototype.subscribe=function(e,o){return fW(e,this._subscribers,o)},$p.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return fW(s,this._actionSubscribers,o)},$p.prototype.watch=function(e,o,s){var B=this;return process.env.NODE_ENV!=="production"&&o0(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},o,Object.assign({},s))},$p.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},$p.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(o0(Array.isArray(e),"module path must be a string or an Array."),o0(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),Zw(this,this.state,e,this._modules.get(e),s.preserveState),dA(this,this.state)},$p.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&o0(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=hA(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),mW(this)},$p.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&o0(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},$p.prototype.hotUpdate=function(e){this._modules.update(e),mW(this,!0)},$p.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties($p.prototype,mA);var LUt=zUt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!EW(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),BUt(o).forEach(function(B){var U=B.key,m=B.val;s[U]=function(){for(var g=[],a=arguments.length;a--;)g[a]=arguments[a];var y=this.$store.commit;if(e){var h=OUt(this.$store,"mapMutations",e);if(!h)return;y=h.context.commit}return typeof m=="function"?m.apply(this,[y].concat(g)):y.apply(this.$store,[m].concat(g))}}),s});function BUt(e){return EW(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function EW(e){return Array.isArray(e)||pW(e)}function zUt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function OUt(e,o,s){var B=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+o+"(): "+s),B}const DUt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function NUt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",m.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",m.showTooltip]),onClick:o[1]||(o[1]=(...g)=>m.tooltipClick&&m.tooltipClick(...g))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...g)=>m.closeClick&&m.closeClick(...g))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const FUt=x_(DUt,[["render",NUt],["__scopeId","data-v-cc97d3a4"]]),RUt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,VUt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,jUt="https://apis.golstats.com",UUt="https://dev-apis.golstats.com";function GUt(e,o,s=!1){if(!o||o===1)return e;const B=s?UUt:jUt,U=e.match(RUt);if(U){const g=e.replace(U[0],"");return`${B}/${o}/${g}`}const m=e.match(VUt);if(m){const g=e.replace(m[0],"");return`${B}/${o}/${g}`}return e}const HUt=1e3,MW=HUt*60,gA=MW*60,IW=gA*24,ZUt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/IW);o=o-s*IW;const B=Math.floor(o/gA);o=o-B*gA;const U=Math.floor(o/MW);return`${s?`${s} dias `:""}${B<10?`0${B}`:B}:${U<10?`0${U}`:U} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function WUt(e,o){return`${o==1?{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/":"https://golstatsimages.blob.core.windows.net/teams-80/"+o+"/"}${e}.png`}function qUt(e,o){return`${o==1?{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/":"https://golstatsimages.blob.core.windows.net/players-profile/"+o+"/"}${e}.png`}const yA={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},JUt="/icn-play.svg",YUt="/icn-tiros-de-esquina.svg",XUt="/icn-tiro-a-porteria.svg",$Ut="/icn-cambio.svg",KUt="/icn-falta.svg",QUt="/atajada.svg",eGt="/fuera-de-lugar.svg",vA="/gol.svg",tGt="/var.png",aGt="/tiempo-agregado.svg",rGt="/jugada-peligrosa.svg",nGt="/penal-marcado.svg",iGt="/penal-fallado.svg",oGt="/inicia-el-partido.svg",sGt="/fin-del-partido.svg",lGt="/icn-tarjeta-amarilla.svg",cGt="/icn-tarjeta-roja.svg",uGt=[1,2,3,4,6],dGt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},provider:{type:Number,default:0},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return yA.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):yA.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):yA.RED_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(o=>qUt(o,this.provider))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||uGt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...LUt("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},hGt=e=>(t.pushScopeId("data-v-dff2f5b8"),e=e(),t.popScopeId(),e),pGt={class:"time-line-event__details"},fGt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},mGt=["src"],gGt=hGt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),yGt={class:"time-line-event__details__info"},vGt={key:0,class:"time-line-event__details__info__header__players"},bGt={class:"time-line-event__details__info__header__players__div-img"},_Gt=["src"],xGt={class:"time-line-event__details__info__body"},wGt={class:"time-line-event__details__info__body__comment"},kGt={class:"time-line-event__minute__container"},SGt={class:"time-line-event__minute__container__text"},CGt={class:"time-line-event__minute__container__icon-container"},TGt={class:"time-line-event__minute__container__icon-container__icon"},AGt={key:0,src:YUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},EGt={key:1,src:XUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MGt={key:2,src:$Ut,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},IGt={key:3,src:KUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},PGt={key:4,src:QUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},LGt={key:5,src:eGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},BGt={key:6,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zGt={key:7,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OGt={key:8,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DGt={key:9,src:tGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},NGt={key:10,src:aGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FGt={key:11,src:rGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RGt={key:12,src:nGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},VGt={key:13,src:iGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jGt={key:14,src:oGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},UGt={key:15,src:sGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GGt={key:16,src:lGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HGt={key:17,src:cGt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},ZGt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function WGt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",m.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:U.gameEventKey},[t.createElementVNode("div",pGt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",fGt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,mGt)]),gGt])):t.createCommentVNode("",!0),t.createElementVNode("div",yGt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",m.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",vGt,[m.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.srcImgPlayers,(g,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",bGt,[t.createElementVNode("img",{src:g,alt:""},null,8,_Gt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",m.nameClasses]),onClick:o[1]||(o[1]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:JUt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",xGt,[t.createElementVNode("div",wGt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",m.minuteClasses])},[t.createElementVNode("div",kGt,[t.createElementVNode("div",SGt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",CGt,[t.createElementVNode("div",TGt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",AGt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",EGt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",MGt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",IGt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",PGt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",LGt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",BGt)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",zGt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",OGt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",DGt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",NGt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",FGt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",RGt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",VGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",jGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",UGt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",GGt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",HGt)):(t.openBlock(),t.createElementBlock("img",ZGt))])])])],2)],6)}const qGt=x_(dGt,[["render",WGt],["__scopeId","data-v-dff2f5b8"]]),JGt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},YGt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let qw=null;const XGt={name:"TimeLine",components:{Tooltip:FUt,TimeLineEvent:qGt},mixins:[ZUt],props:{gameData:{type:Object,required:!0},providerId:{type:Number,default:0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":JGt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,B=GUt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:U}}=await uW.get(B);return U}catch(o){throw new Error(o)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)qw=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),qw.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],B=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,U=e+12;s&&(s.style.height=`${U}px`),B&&(B.style.height=`${U}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=YGt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return WUt(o,this.$store.getters.getProviderId)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){qw&&qw.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},PW=e=>(t.pushScopeId("data-v-a81f7bcf"),e=e(),t.popScopeId(),e),$Gt={ref:"timeLine",class:"time-line"},KGt={class:"time-line__header"},QGt={class:"time-line__header__dot"},eHt={class:"time-line__header__dot__home-team team-logo"},tHt=["src"],aHt={class:"time-line__header__dot__away-team team-logo"},rHt=["src"],nHt={key:1,class:"start-line"},iHt=PW(()=>t.createElementVNode("div",null,null,-1)),oHt=PW(()=>t.createElementVNode("div",null,null,-1)),sHt=[iHt,oHt],lHt={key:1,class:"noEventText"},cHt={class:"tooltip-data"},uHt=["src"];function dHt(e,o,s,B,U,m){const g=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",$Gt,[t.createElementVNode("div",KGt,[t.createElementVNode("div",QGt,[t.createElementVNode("div",eHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("homeTeam"),alt:""},null,8,tHt)]),t.createElementVNode("div",aHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("awayTeam"),alt:""},null,8,rHt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${U.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:U.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.gameEventsToShow,(y,h)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:y.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${h}`,class:t.normalizeClass(m.getGameEventClassAndSetIcon(y,h))},[t.createElementVNode("div",{class:t.normalizeClass(m.getEventContainerClass(y))},[t.createVNode(g,{"game-event":y,"is-mobile":m.isMobile,provider:e.$store.getters.getProviderId,"time-line-width":U.timeLineWidth,width:m.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:r=>m.updateContainerHeight(r,h),onPlayerChanged:o[0]||(o[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:m.thumbnailClick},null,8,["game-event","is-mobile","provider","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),h>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${h}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&h===m.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",nHt,sHt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",lHt,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:U.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",cHt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:U.dataVideo.link,format:"video/mp4"},null,8,uHt)])])]),_:1},8,["data"])],64)}const hHt=x_(XGt,[["render",dHt],["__scopeId","data-v-a81f7bcf"]]),pHt={class:"game-time-line__options"},fHt={class:"game-time-line__timeline"},mHt={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;uW.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),B=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let U=null;const m=fUt();m.commit("setProviderId",o.providerId),m.commit("setIsDevApis",o.isDevApis);const g=t.ref(["Todo","1er tiempo","2do tiempo"]),a=t.ref("Todo"),y=t.ref({}),h=t.ref(null),r=t.ref(0),_=t.computed(()=>{let i="all";return a.value==="1er tiempo"||a.value==="1er"?i="firstHalf":(a.value==="2do tiempo"||a.value==="2do")&&(i="secondHalf"),i}),v=t.computed(()=>r.value<500);function x(i){a.value=i}function f(i){y.value=i}function n(){if(window.ResizeObserver)U=new ResizeObserver(()=>{r.value=h.value.clientWidth}),U.observe(h.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{U&&U.unobserve(h.value)}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:h,class:"game-time-line"},[t.createElementVNode("div",pHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(rVt,t.mergeProps(r.value<390?B.value:s.value,{text:l=="Todo"?l:r.value<390?l.substring(0,3):l,"is-active":a.value===l,onClick:d=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",fHt,[t.createVNode(hHt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":v.value,socket:e.socket,provider:e.providerId,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:f},null,8,["game-data","time-line-period","is-mobile","socket","provider","can-play-videos"])])],512))}},gHt=x_(mHt,[["__scopeId","data-v-691198f5"]]),Saa="",yHt={class:"game-data__header"},vHt={class:"game-data__header__tournament-season-dropdown"},bHt={class:"game-data__header__teams-carousel"},_Ht={class:"game-data__body"},xHt={key:0,class:"no-stats-container"},wHt={key:1,class:"no-stats-container-mobile"},kHt={class:"game-data__body__menu"},SHt={class:"game-data__body__menu__contmenuswitch"};pu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const CHt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Fue,GSCGameTimeLine:gHt,GscSwitchComponent:sC,GSCLineupsMain:o4e,GSCPositining:Y_t,GSCDatosGSMain:DEe,GSCVideoGame:cUe,ModalEvents:CN,GSCTacticaFijaMain:tVt,GSCProminentMain:yut,GSCComparative:kpt}}),THt=Ki(Object.assign(CHt,{props:{tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=gp();let B=null;Rd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)});const U=e,m=t.ref(z2(Mx));t.watch(()=>U.providerId,async mt=>{s.commit("setProviderId",mt),s.commit("setIsDevApis",U.isDevApis),m.value=await Wne(mt)},{immediate:!0}),t.provide("playOffAbbreviationsStructure",m);const g=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),a=t.ref({season:[]}),y=t.ref({}),h=t.ref(!1),r=t.ref({}),_=t.ref(1),v=t.ref(0),x=3e4,f=3e4,n=3e4,i=3e4,c=3e4,l=3e4,d=3e4,b=3e4,w=6e4,C=t.ref(null),E=t.ref(null),A=t.ref(null),P=t.ref([]),L=t.ref(null),T=t.ref(!0),I=t.ref(new Set([1,2])),M=t.ref({}),S=t.ref({minute:"",recent_lapse:0,score:{}}),z=t.ref(0),k=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),O=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),N=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),j=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const Z=t.ref(0);let G=null;const H=t.ref(null),$=t.ref(0),ie=t.ref(N.value[0]),q=t.ref([]);let K=t.ref("");const Q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const mt=[];return y.value&&y.value.id&&(mt.push({id:y.value.id,name:y.value.name,type:y.value.type}),y.value.related_seasons&&y.value.related_seasons.forEach(bt=>{mt.push({id:bt.id,type:bt.type})})),mt}),ee=t.computed(()=>{if(U.clientPrivilegesBySeasons){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return mt.teamId}return 0});function ce(){h.value=!1}function de(mt){const bt=mt.split(",");return!(bt.length<2||bt[1].split(" ").length<2)}function he(mt){C.value=mt}function pe(mt){P.value.push(mt)}function re(mt){L.value=mt}function se(mt){A.value=mt}function ne(mt){E.value=mt}function me(mt){if(!de(mt))return"";const bt=ve(mt);return`${ye(mt)}. ${bt}`}function ye(mt){return mt.split(",")[1].split(" ")[1][0]}function ve(mt){const bt=mt.split(",")[0].split(" ");return bt[0].length<=3&&bt.length>1?`${bt[0]} ${bt[1]}`:bt[0]}async function we(mt){if(!(!mt||!mt.game_id))try{const bt=pu.create({headers:{Authorization:`${g.value}`}});M.value={};const It=await bt.get(uu("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+mt.game_id,U.providerId,U.isDevApis));if(M.value[mt.home_team.team_id]=[],M.value[mt.home_team.team_id].team={name:mt.home_team.acronym,logo:mt.home_team.logo},M.value[mt.home_team.team_id].goals=[],M.value[mt.home_team.team_id].red=[],M.value[mt.home_team.team_id].yellow=[],M.value[mt.visiting_team.team_id]=[],M.value[mt.visiting_team.team_id].team={name:mt.visiting_team.acronym,logo:mt.visiting_team.logo},M.value[mt.visiting_team.team_id].goals=[],M.value[mt.visiting_team.team_id].red=[],M.value[mt.visiting_team.team_id].yellow=[],It.data.minute!=null&&(S.value={minute:It.data.minute,recent_lapse:It.data.recent_lapse,score:It.data.score}),It.data.plays)for(let Ot=0;Ot<It.data.plays.length;Ot++)It.data.plays[Ot].category_name=="Roja"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].red||(M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].red||(M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].category_name=="Amarilla"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].yellow||(M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].yellow||(M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].event_type_name=="Gol"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)))}catch(bt){return Promise.reject(bt)}}function Se(mt){h.value=!0,mt.is_live!=1&&mt.game_status!=0&&(mt.game_status==4||Object.keys(mt.minutes).length>0)?(z.value=1,M.value={plays:mt.minutes,home_team:mt.home_team,visiting_team:mt.visiting_team}):(z.value=0,we(mt))}function Ce(){G=new ResizeObserver(mt=>{for(const bt of mt)$.value=bt.contentRect.width}),G.observe(H.value)}const Me=t.computed(()=>{let mt={};return r.value&&r.value.game_id&&(mt={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,regularSeasonId:r.value.regularSeasonId,matchday_name:r.value.matchday_name,status:r.value.game_status,score:r.value.score,game_status:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live,minutes:r.value.minutes}),mt});t.watch(()=>r.value.game_id,He,{immediate:!0}),t.watch(()=>r.value.is_live,Pe,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)},{deep:!0,immediate:!0});function Le(mt){_.value=mt.is_captured,v.value=mt.is_female,T.value=mt.is_captured!==0,a.value.id!==mt.id&&(a.value=mt,s.commit("gameGlobal/setTournamentType",mt.tournament_type))}const ze=o;function He(mt,bt){s.commit("nextGeneral/updateShowLiveData",!0);const It=v.value?"Destacados":"Destacadas";N.value.forEach(Ot=>{Ot.name===It&&(Ot.name=v.value?"Destacadas":"Destacados")}),we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team}),Ie(),Z.value+=1}function Pe(mt,bt){if(Ie(),s.state.nextGeneral.gameForAnalysis.is_live!==mt&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:r.value.is_live,game_status:r.value.game_status}),mt){const It=r8();It.disconnected?n8():It.connected&&r.value.game_id&&o8(`game.${r.value.game_id}.v2`),Ve(),B=setInterval(()=>{z.value=0,we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team})},6e4)}else Ve(),i8();mt!==bt&&(Z.value+=1)}function Ve(){B&&clearInterval(B)}function Ie(){N.value=[],r.value.is_live||r.value.game_status===4?N.value=[...O.value]:N.value=[...j.value],U.isWidget||((y.value.is_tactic_available===0||r.value.is_live||r.value.game_status===0)&&N.value.pop(),r.value.has_tracking===1&&!(r.value.is_live||r.value.game_status===4)&&N.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),ie.value=N.value[0]}function ge(mt){console.log("objVR: -------------Z",mt),mt.gameSeasonId=r.value.season_id,mt.gameRegularSeasonId=r.value.regularSeasonId,Array.isArray(mt.gameIds)&&(mt.gameIds=mt.gameIds.map(bt=>Number(bt))),mt.seasonId!=null&&(mt.seasonId=Number(mt.seasonId)),!(!mt.auxwidget&&Be.value&&!Be.value.canPrivilegesTeamPlayVideos)&&((r.value.is_live||r.value.game_status===0||r.value.game_status===1)&&(mt.gameIdsToFilter=[r.value.game_id]),mt.isLiveAccumulated&&(mt.gameIdsToFilter=null),(r.value.is_live||r.value.game_status===0)&&!mt.isLiveAccumulated&&(mt.liveGameConfig={gameId:r.value.game_id}),mt.fakeLiveConfig={gameId:r.value.game_id},ze("openmedia",mt))}function Ae(mt){ze("onOpenProfile",mt)}function ke(mt){ze("openProfileTeam",mt)}function je(mt){ze("openProfilePlayer",mt)}function De(mt){et(mt),mt=="Estadísticas"&&(K.value="Comparativa")}function Ne(){K.value=""}function qe(mt){y.value.id!==mt.id&&(y.value=mt,ze("change-season-id",mt.id))}const Ze=t.computed(()=>N.value.reduce((mt,bt)=>(U.disabledSectionsIds.includes(bt.id)||Be.value&&!Be.value.isVideoTabVisible&&bt.id===2||U.clientPrivilegesBySeasons&&bt.id===7||(T.value||bt.id!==5&&bt.id!==6)&&mt.push(bt.name),mt),[]));function _e(mt){if(r.value.is_live||r.value.game_status===1||r.value.game_status===0){const bt=mt.playingAs.has(r.value.playingAs);return U.clientPrivilegesBySeasons.canPlayVideos&&bt}else{const bt=Re.value.filter(It=>mt.playingAs.has(It.playingAs));return U.clientPrivilegesBySeasons.canPlayVideos&&bt.length>0}}const Be=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value&&r.value&&r.value.game_id){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)if(We(mt.playingAs),(r.value.is_live||r.value.game_status===1||r.value.game_status===0)&&s.state.nextGeneral.showLiveData){const bt=mt.playingAs.has(r.value.playingAs);return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:r.value.home_team.team_id===mt.teamId,homeTeamDetails:{canPlayVideos:bt,team:r.value.home_team},awayTeamDetails:{canPlayVideos:bt,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}else{const bt=r.value.home_team.team_id===mt.teamId,It=Re.value.filter(Gt=>mt.playingAs.has(Gt.playingAs));return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&It.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:bt,homeTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt&&It.length>0,team:r.value.home_team},awayTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&!bt&&It.length>0,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}We(new Set)}return Q}return null}),Re=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return q.value.filter(bt=>bt.game_status===1&&mt.playingAs.has(bt.playingAs))}return[]}return[]});t.watch(Ze,()=>{Be.value&&!Be.value.canPrivilegesTeamPlayVideos&&(ie.value.id===2||ie.value.id===7||ie.value.id===8)&&et("Resumen")},{deep:!0,immediate:!0});function We(mt){I.value=mt}function et(mt){if(s.commit("nextGeneral/updateShowLiveData",!0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}U.isWidget?ie.value=N.value.find(bt=>bt.name===mt)||N.value[1]:ie.value=N.value.find(bt=>bt.name===mt)||N.value[0]}t.onMounted(()=>{Ce(),t.nextTick(()=>{U.isSynchronization&&et("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(G&&G.disconnect(),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let mt of P.value)clearInterval(mt);P.value=[]}s8()});function tt(mt){if(mt.playingAs||(mt.playingAs=ee.value?mt.home_team.team_id===ee.value?1:2:0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}r.value=mt,mt.is_live&&mt.game_status===4?n8():i8()}function ht(mt){q.value=mt.map(bt=>{const It={...bt};return ee.value&&(It.playingAs=It.home_team.team_id===ee.value?1:2),It})}return(mt,bt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:H},[t.createElementVNode("div",yHt,[t.withDirectives(t.createElementVNode("div",vHt,[t.createVNode(t.unref(NA),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentSelectProps?void 0:e.tournamentsApiUrl,items:e.tournamentSelectProps?e.tournamentSelectProps.items:void 0,"default-item-by-prop":e.tournamentSelectProps?e.tournamentSelectProps.defaultItemByProp:void 0,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,token:e.token,onInput:Le,onChangeTournaments:Le},null,8,["current-season-id","tournaments-ids-to-include","api-url","items","default-item-by-prop","are-female-visible","is-clubes-active","is-female-mode","token"]),t.createVNode(t.unref(VA),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:a.value.seasons,onInput:qe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",bHt,[t.createVNode(t.unref(_ee),{"plays-live":M.value,"info-live":S.value,token:k.value,is_captured:_.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":ee.value,"only-games-team-id":ee.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onChangeGameCarousel:tt,onOpenModalEvent:Se,onChangeGamesByClientPrivileges:ht},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type","provider-id","is-dev-apis"])])]),h.value?(t.openBlock(),t.createBlock(CN,{key:0,width:$.value,onCloseModalEventsLive:ce,plays:M.value,game:r.value,type:z.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",_Ht,[r.value&&"live_stats"in r.value&&r.value.live_stats==0&&r.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",xHt,bt[0]||(bt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",wHt,bt[1]||(bt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",kHt,[t.createElementVNode("div",SHt,[t.createVNode(t.unref(sC),{type:2,buttons:Ze.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":ie.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:et},null,8,["buttons","width","selected-option"])])]),Me.value&&Me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ie.value.componentName),{key:Z.value,game:Me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ne,onIntervalidhighlive:se,onIntervalidtops:pe,onIntervalidgs:re,subsection:t.unref(K),seasonSelected:y.value,tournamentSelected:a.value,"tournament-select-props":e.tournamentSelectProps,showLineups:T.value,socket:e.socket,"time-live-prominent-data":x,"time-live-highlights-prominent-and-video":f,"time-live-possesion":n,"time-live-video-goals":i,"time-live-video-best-plays":c,"time-live-video-this-game":l,"time-live-video-specific-plays":d,"time-live-comparative-best-players":b,"time-live-comparative-avanced":w,is_captured:_.value,"is-tactic-visible":!!y.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":Be.value?Be.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":I.value,"client-privileges-team-id":ee.value,"play-videos-privileges":Be.value,token:k.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onResetSubsection:Ne,onOpenmedia:ge,onOnOpenProfile:Ae,onOpenProfileTeam:ke,onOpenProfilePlayer:je,onChangeToTab:De,onOpenMediaPlayer:ge,onIntervalid:he},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","tournament-select-props","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-fe496821"]]);async function LW({seasonId:e,providerId:o,isDevApis:s},B=!0){try{const U=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`;return(await(await fetch(Wy(U,o))).json()).data}catch(U){if(B)return LW({seasonId:e,providerId:o,isDevApis:s},!1);throw new Error(U)}}async function AHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function EHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}function MHt(e,o,s,B,U,m,g=!1){const a=s.map(y=>y===1?2:y===2?1:3);return e.filter(y=>{const h=m&&y[U.teamId]?y[U.teamId]!==m:!1,r=o===1?2:1;return(g||B.includes(y[U.gameId]))&&(!o||(h?r:o)===y[U.playingAs])&&(s.includes(y[U.matchResult])&&y[U.teamId]===m||a.includes(y[U.matchResult])&&y[U.teamId]!==m)})}function BW(e,o,s,B,U){return o.length===2&&s.length===3&&B.length===6?e:e.filter(m=>o.includes(m[U.playingAs])&&s.includes(m[U.matchResult])&&B.includes(m[U.section]))}async function zW({seasonId:e,providerId:o,isDevApis:s}){try{const B=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data}catch(B){return Promise.reject(B)}}async function IHt({seasonId:e,gameId:o,providerId:s,isDevApis:B}){try{const U=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:m}=await Uu({url:U,providerId:s,isDevApis:B});return m}catch(U){return Promise.reject(U)}}async function PHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function LHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data||[]}catch(B){return Promise.reject(B)}}const BHt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let bA=null;function OW(){return bA||(bA=Jy(BHt)),bA}async function zHt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})).data}catch(o){return Promise.reject(o)}}async function DW({seasonId:e,teamId:o,providerId:s,isDevApis:B}){try{return await Uu({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`,providerId:s,isDevApis:B})}catch(U){return Promise.reject(U)}}async function OHt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}async function DHt(e){try{return await Uu({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}const NHt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,B){return MHt(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],OW(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,B)=>{const U={...B};return U.home_team=e.currentSeasonTeams.find(m=>m.team_id===B.home_team),U.visiting_team=e.currentSeasonTeams.find(m=>m.team_id===B.visiting_team),s[B.matchday_abbreviation]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(U):s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[U]:s[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[U]},s},{});for(let[s,B]of Object.entries(o))o[s]=Object.entries(B).map(([U,m])=>({date:U,games:m})),o[s].sort((U,m)=>U.date<m.date?-1:U.date>m.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let B=Object.keys(o.nextGamesSchedule);for(let U of B){let m=Number(U.replace("M","")),g=o.nextGamesSchedule[U].map(a=>({matchday:m,date:new Date(a.date)}));s=s.concat(g)}}return s},closestMatchDay(e,o){let s=new Date,B=0,U=-new Date(0,0,0).valueOf(),m=o.matchdaysDates,g=m.length;for(let a=0;a<m.length;a++)B=Math.abs(m[a].date-s),B<U&&(g=a,U=B);return m[g]?m[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const B=o.getProviderId,U=o.getIsDevApis,m=await LW({seasonId:o["filterGeneral/getSeasonId"],providerId:B,isDevApis:U});if(s)return m;e("updateSeasonPlays",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zW({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonGames",U)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zHt({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonTeams",U.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=o("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function FHt({filter:e,providerId:o,isDevApis:s}){try{const B=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:U}=await Uu({url:B,providerId:o,isDevApis:s});return U}catch(B){return Promise.reject(B)}}const RHt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let _A=null;function VHt(){return _A||(_A=Jy(RHt)),_A}const xA=6;let NW=xA;function jHt(e){NW=Math.max(xA,Number(e)||xA)}class Jw{constructor(){_u(this,"maximumLiveSection",1);_u(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});_u(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}getZeroTotalsTrendSections(){return new Array(NW).fill(0)}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,B){for(;o.accumulated.length<s;)o.accumulated.push(0);for(let U=s-1;U<o.accumulated.length;U++)o.accumulated[U]+=B}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,B){for(let U=o.accumulated.length-1;U>=s-1;U--)o.accumulated[U]-=B}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(B=>B/s)}calculateRanking(o,s,B,U,m,g,a,y){let h=[];U===3&&o&&o.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?h=Array.from(o.reduce((_,v)=>{const x=v[s.playingAs]===1,f=x?"1":"2",n=_.get(v[s.gameId]);if(n)n[f]?n[f].arrayPlays.push(v):n[f]={numberTeamId:v[s.teamId],arrayPlays:[v]};else{const i={numberMatchResult:v[s.matchResult]};x&&(i[1]={numberTeamId:v[s.teamId],arrayPlays:[v]}),_.set(v[s.gameId],i)}return _},new Map).values()).reduce((_,v)=>{const x=B.playingAs.length===2?"both":B.playingAs[0].toString();return(x==="both"&&(v[1].numberTeamId===B.teamId||v[2].numberTeamId===B.teamId)||x!=="both"&&v[x].numberTeamId===B.teamId)&&B.matchResult.includes(v.numberMatchResult)&&_.push(...v[1].arrayPlays,...v[2].arrayPlays),_},[]).filter(_=>B.sections.includes(_[s.section])):(h=o?[...o]:[],a&&o&&(h=o.filter(r=>B.playingAs.includes(r[s.playingAs])&&B.matchResult.includes(r[s.matchResult])&&B.sections.includes(r[s.section])))),this.setTeamRanking(h,U,s,B.teamId,g,"accomplished",y)}setTeamRanking(o,s,B,U,m,g,a){let y=null,h=null;s===3&&(y=new Map,h={},o.forEach(v=>{const x=y.get(v[B.gameId]);x?x[v[B.teamId.toString()]]?x[v[B.teamId.toString()]]+=v[B.total]:x[v[B.teamId.toString()]]=v[B.total]:y.set(v[B.gameId],{[v[B.teamId.toString()]]:v[B.total]})}),Array.from(y.values()).forEach(v=>{const[x,f]=Object.keys(v).map(i=>i),n=v[x]+v[f];this.addPassesAvgByTeam(h,x,n?v[x]/n:0),this.addPassesAvgByTeam(h,f,n?v[f]/n:0)}));const r=m.sort((v,x)=>v.team_id-x.team_id).map(v=>{if(s===3){const x=h[v.team_id.toString()];return{teamId:v.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((f,n)=>n[B.teamId]===v.team_id&&s===n[B.categoryId]?f+n[B.total]:f,0);return{teamId:v.team_id,points:v[`${a}FilterGames`]?x/v[`${a}FilterGames`]:0,total:x}}}).sort((v,x)=>x.points-v.points);this.accomplished.arrayRankings=r;const _=r.findIndex(v=>v.teamId===U);s===3&&(this.accomplished.avgPreGame=r[_].points),this[g].ranking=_+1,this[g].leader=r[0]}addPassesAvgByTeam(o,s,B){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=B):o[s]={numberGamesCount:1,numberTotalPassesAvg:B}}}class UHt{constructor(o,s,B,U,m,g,a,y,h,r,_=!0){_u(this,"id","");_u(this,"generalId",0);_u(this,"name","");_u(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"accomplishedCategoryIds",[]);_u(this,"receivedCategoryIds",[]);_u(this,"generalCategoriesIds",{accomplished:0,received:0});_u(this,"specialMention","");_u(this,"homeTeam",new Jw);_u(this,"visitingTeam",new Jw);_u(this,"isLeagueDataCalculated",!1);_u(this,"leagueAccomplishedMax",0);_u(this,"leagueReceivedMax",0);_u(this,"leagueAccomplishedAvg",0);_u(this,"leagueReceivedAvg",0);_u(this,"leagueAccomplishedAccumulator",0);_u(this,"leagueReceivedAccumulator",0);_u(this,"homeTeamType","homeTeam");_u(this,"visitingTeamType","visitingTeam");_u(this,"betOnly",!1);_u(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=U,this.names["0-0"]=U||"",this.names["1-1"]=m||"",this.names["0-1"]=g||"",this.names["1-0"]=a||"",this.generalId=y||0,this.betOnly=h||!1,this.isPercent=r||!1,this.isVisible=_}addLeaguePlays(o,s,B){o.length===0||!B||this.isLeagueDataCalculated||(o.forEach(U=>{this.isAccomplishedLeaguePlay(U[s.categoryId])&&(this.leagueAccomplishedAccumulator+=U[s.total]),this.isReceivedLeaguePlay(U[s.categoryId])&&(this.leagueReceivedAccumulator+=U[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,B){let U="-";for(const[m,g]of Object.entries(this.generalCategoriesIds))o===g&&(U=`${m==="accomplished"?"0":"1"}${U}`),s===g&&(U=`${U}${m==="accomplished"?"0":"1"}`);U.length===3&&(this.mentions[U]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,B,U,m){!B||!m||o!==this.homeTeamType&&o!==this.visitingTeamType||(B.forEach(g=>{this.isAccomplishedPlay(g[U.categoryId])?this[o].increaseAccomplishedByOne(g[U.section],g[U.total]):this.isReceivedPlay(g[U.categoryId])&&this[o].increaseReceivedByOne(g[U.section],g[U.total])}),this[o].calculateAvg(m))}addLivePlay(o,s,B,U,m=!1,g=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(B[U.section],B[U.total],!0)}subtractLivePlay(o,s,B,U,m){(o===this.homeTeamType||o===this.visitingTeamType)&&(B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&!m?this[o].decreaseAccomplishedLiveByOne(B[U.section],B[U.total]):B[U.categoryId].includes(this.generalCategoriesIds.received)&&m&&this[o].decreaseReceivedLiveByOne(B[U.section],B[U.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>o===B||`${o}_r`===B)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,B,U,m,g=!1){this[this.homeTeamType].calculateRanking(o,s,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,U,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.visitingTeamType)}resetData(){this.homeTeam=new Jw,this.visitingTeam=new Jw,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}function GHt(e){for(const o of Object.values(e))for(let s of Object.keys(o.subcategories)){const B=o.subcategories[s];o.subcategories[s]=new UHt(B.accomplishedCategoryIds,B.receivedCategoryIds,B.generalCategoriesIds,B.accomplishedName,B.receivedName,B.accomplishedReceivedName,B.receivedAccomplishedName,B.generalId,B.betOnly,B.isPercent,B.isVisible===void 0?!0:B.isVisible)}return e}const HHt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],ZHt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let wA=null;function WHt(){return wA||(wA=Jy(ZHt)),wA}const qHt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let kA=null;function JHt(){return kA||(kA=Jy(qHt)),kA}function Yw(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function FW(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function SA(e,o,s){let B=[...o];return e[s.categoryId]===2&&(B[0]=14),e[s.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}function RW(e){const o=e.indexesTSP.section;let s=0;for(const B of[e.homeTeamPlays,e.visitingTeamPlays])if(Array.isArray(B))for(const U of B){const m=U[o];m>s&&(s=m)}jHt(s)}function E_(e,o){const s=o[e.indexesTLP.playId];return e.isLive&&e.providerId===2?`${s}-${o[e.indexesTLP.categoryId]}`:s}const YHt=r8(),XHt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],$Ht={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:OW(),indexesTSP:VHt(),indexesLS:WHt(),indexesTLP:JHt(),nextGamesDataStructure:{},currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,providerId:0,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return HHt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return BW(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return BW(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,B)=>s.priority-B.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateNextGamesDataStructure(e,o){e.nextGamesDataStructure=o},setProviderId(e,o){e.providerId=Number(o)||0},updateGameForAnalysisByProps(e,o){for(const[s,B]of Object.entries(o))e.gameForAnalysis[s]=B},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&e.gameForAnalysis.game_id&&o8(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((B,U)=>{if(U.game_status===1&&(U.home_team===s.team_id||U.visiting_team===s.team_id)){const m=U.score[0]-U.score[1],g=U.home_team===s.team_id;B.push({playingAs:g?1:2,matchResult:m===0?3:g?m>0?1:2:m<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.isSocketConnected&&o.is_live&&o.game_status===4&&o.game_id&&o8(`game.${o.game_id}.v2`)},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=PI(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=PI(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o,RW(e)},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o,RW(e)},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(B=>{for(const U of Object.values(B.subcategories))U.resetMentions()}),s.forEach(B=>{for(const U of o)for(const m of Object.values(B.subcategories))m.addSpecialMention(U[0],U[1],U[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){const B=E_(e,o);if(!e.livePlays.has(B)){e.livePlays.set(B,o);const U=Yw(o,e.indexesTLP,e.categoriesMap);for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))g.addLivePlay(e.gameForAnalysis.home_team===U[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",U[e.indexesTSP.teamId],U,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));if(Die(B,o))return;let U="";const m=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=Yw(B,e.indexesTLP,e.categoriesMap),a=SA(B,g,e.indexesTLP),y=Yw(o,e.indexesTLP,e.categoriesMap),h=SA(o,y,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(r.subcategories))B&&(_.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s),a&&_.subtractLivePlay(U,a[e.indexesTSP.teamId],a,e.indexesTSP,s)),_.addLivePlay(m,y[e.indexesTSP.teamId],y,e.indexesTSP,e.isLive,s),h&&_.addLivePlay(m,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,s);e.livePlays.set(E_(e,o),o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));let U="";if(B){U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(E_(e,B));const m=Yw(B,e.indexesTLP,e.categoriesMap),g=SA(o,m,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const y of Object.values(a.subcategories))y.subtractLivePlay(U,m[e.indexesTSP.teamId],m,e.indexesTSP,s),g&&y.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(m=>{m.homeTeamFilterGames=m.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,m.visitingTeamFilterGames=m.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const B=[],U=new Map;for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))B.push(g);o.rankingData.forEach(m=>{for(const g of B)if(g.isInGeneralCategory(m[e.indexesLS.categoryId])){U.has(g.id)?U.get(g.id).push(m):U.set(g.id,[m]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=FW(o)},setVisitingGames(e,o){e.visitingGames=FW(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(B=>{const U=e.categoriesMap.get(B);U?U.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{async fillNextGameDataStructure({commit:e},{provider:o}){try{e("setProviderId",o);const s=await jne(o),B=GHt(s);e("updateNextGamesDataStructure",B)}catch(s){return Promise.reject(s)}},turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e,rootGetters:o},s){try{const a=o.getProviderId,y=o.getIsDevApis,h=await DHt({gameId:s.gameId,providerId:a,isDevApis:y});if(h){var B=[],U=[],m={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},g={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};if(Object.keys(h.data).length!==0){const r=_=>{const v=_.slice(),x=Number(v[0]);return Number.isNaN(x)||(v[0]=x),v};B=h.data.data.filter(_=>_[1]==s.homeTeam).map(r),U=h.data.data.filter(_=>_[1]==s.awayTeam).map(r),m=h.data.games,g=h.data.games}e("updateHomeTeamPlays",B),e("updateVisitingTeamPlays",U),e("setHomeGames",m),e("setVisitingGames",g)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(a){return Promise.reject(a)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",s.gameInfo),B.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s,rootGetters:B},{gameId:U,isTeamsAnalysis:m,currentSeasonId:g,isLoginChanged:a=!1,defaultFilter:y=null,gameInfo:h=null,isCupGame:r=!1}){try{let _={},v=e.seasonId!==Number(g);const x=B.getProviderId;await o("fillNextGameDataStructure",{provider:x});const f=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),v&&s("setSeasonId",g),s("updateGameId",Number(U)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const n=await o("getCurrentSeasonGames",Number(U));if(s("leagueGeneral/updateCurrentSeasonGames",n,{root:!0}),_=n.find(i=>i.game_id===Number(U)),!_&&h&&(_=h),_&&h&&(_.game_status=_.game_status??h.game_status,_.is_live=_.is_live??h.is_live),_&&s("updateGameForAnalysis",_),_.game_status!==1&&((a||e.categoriesMap.size===0)&&s("generateCategoriesMap"),r||await o("checkTeamsData",{gameId:U,isFromBet:!!y}),(a||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&f.push(o("getSeasonStatistics"))),e.usePastSeasonId){const i=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",i,{root:!0})}(a||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(i=>_.home_team===i.team_id))&&f.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",_.score[0]),s("setAwayResultGame",_.score[1]),m?_.game_status!==1?(await o("fillStatisticData",{gameId:U,gameinfo:_,promises:f,defaultFilter:y}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),f.push(o("fillStatisticDataPostMatch",{game:U,homeTeam:_.home_team,awayTeam:_.visiting_team,gameInfo:_})),await Promise.all(f)):s("setIsSectionLoading",!1,{root:!0})}catch(_){return Promise.reject(_)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:B,state:U},{gameId:m,gameinfo:g,promises:a=[],defaultFilter:y=null}){let h=null;try{const r=B.getProviderId,_=B.getIsDevApis;e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),(g.is_live||g.game_status===0)&&a.push(o("getCurrentLiveGamePlays",m)),a.push(o("getSpecialMentionsByGame",m)),a.push(o("getHomeTeamPlays")),a.push(o("getVisitingTeamPlays")),a.push(o("getCurrentSeasonPlays")),y&&a.push(FHt({...y,providerId:r,isDevApis:_})),h=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),y){const[r]=h.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:U.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:B},{gameId:U,isFromBet:m}){try{const g=Number(U);if(e.pastSeasonId){B("setPastSeasonId",e.pastSeasonId,{root:!0});const a=s.leagueGeneral.currentSeasonGames.find(y=>y.game_id===g);a&&B("updateGameForAnalysis",a),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),B("setUsePastSeasonId",m||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else B("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e,rootGetters:o},s){try{const B=o.getProviderId,U=o.getIsDevApis,m=await LHt({gameId:s,providerId:B,isDevApis:U});e("addSpecialMentions",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,state:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,{teams:g,games:a,past_season_id:y,tournament_id:h}=await IHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:B,providerId:U,isDevApis:m}),r=XHt.find(_=>_.id===h);return r&&e("setCurrentTournamentName",r.name),e("setHome",g[0]),e("setAway",g[1]),o.usePastSeasonId||e("setPastSeasonId",y),await e("updateCurrentSeasonGames",a),a&&Array.isArray(a)&&e("updateFinishedGames",a.reduce((_,v)=>(v.game_status===1&&(_+=1),_),0)),a}catch(U){return Promise.reject(U)}},async getCurrentSeasonGamesLast({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,{games:m,past_season_id:g}=await zW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});return o.usePastSeasonId||e("setPastSeasonId",g),await e("updateCurrentSeasonGames",m),m&&Array.isArray(m)&&e("updateFinishedGames",m.reduce((a,y)=>(y.game_status===1&&(a+=1),a),0)),m}catch(B){return Promise.reject(B)}},async getCurrentSeasonTeams({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await OHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateCurrentSeasonTeams",m.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=o.usePastSeasonId?o.pastSeasonId:o.seasonId,g=await EHt({seasonId:m,providerId:B,isDevApis:U});e("updateSeasonStatistics",g),e("updateOldSeasonId",m)}catch(B){return Promise.reject(B)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:B}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await DW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team,providerId:B,isDevApis:U});m.data&&(e("updateHomeTeamPlays",m.data.data),e("setHomeGames",m.data.games))}catch(B){return Promise.reject(B)}},async getVisitingTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await DW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team,providerId:B,isDevApis:U});m.data&&(e("updateVisitingTeamPlays",m.data.data),e("setVisitingGames",m.data.games))}catch(B){return Promise.reject(B)}},async getCurrentSeasonPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await AHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateStats",m)}catch(B){return Promise.reject(new Error(B))}},async getCurrentLiveGamePlays({state:e,commit:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,g=await PHt({gameId:B,providerId:U,isDevApis:m});e.livePlays=new Map,g.forEach(a=>{e.gameForAnalysis.game_id===a[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===a[e.indexesTLP.teamId])&&o("addLiveGamePlay",a)})}catch(U){throw new Error(U)}},socket_new({state:e,commit:o},s){const B=s[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("addLiveGamePlay",B)},socket_update({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&o("updateLiveGamePlay",B)},socket_delete({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",B)},exitChannel({state:e,getters:o,rootState:s,rootGetters:B,commit:U}){const m=B["loginGeneral/getPremiumAccount"];o.isLive&&m&&(U("updateShowLiveData",!0),U("clearLiveTotals"),e.livePlays.clear(),YHt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function KHt({providerId:e,isDevApis:o}={}){try{const{data:s}=await Uu({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",providerId:e,isDevApis:o});return s}catch(s){throw new Error(s)}}const QHt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o,rootGetters:s}){try{if(e.tournaments.length===0){const B=s.getProviderId,U=s.getIsDevApis,m=await KHt({providerId:B,isDevApis:U});o("setTournaments",m)}}catch(B){throw new Error(B)}}}}};async function eZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}async function tZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}const VW=(e,o)=>{let s={};return e.forEach((B,U)=>{U==3&&(o[0]==35||o[0]==54)&&(o[U]==2?o[U]=1:o[U]=2),U==2&&(o[0]==35||o[0]==54)&&(o[U]==1?o[U]=2:o[U]==2&&(o[U]=1)),s[B]=o[U]}),s},jW=(e,o)=>e.filter(B=>{const U=o.playingAs.includes(B.playing_as),m=o.matchResult.includes(B.match_result),g=o.sections.includes(B.section);return U&&m&&g});(function(){function e(o,s,B){return typeof B>"u"||+B==0?Math[o](s):(s=+s,B=+B,isNaN(s)||!(typeof B=="number"&&B%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-B:-B))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+B:B))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function UW(e,o){let s=o*-1;return Math.ceil10(e,s)}const zf={goals:"Goles",shots:"Tiros a gol",head:"Remates con cabeza",penalties:"Penales"};function Of(e,o){const s=(e||[]).find(B=>B.name===o);return new Set((s==null?void 0:s.categories)||[])}const aZt={...QHt,...NHt,...$Ht,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[],xgCategories:O2},getters:{playsLocal:(e,o,s)=>{const B=e.xGLocalPlays,U="homeTeamFilter",m=s.nextGeneral[U];return jW(B,m)||[]},playsAway:(e,o,s)=>{const B=e.xGVisitingPlays,U="visitingTeamFilter",m=s.nextGeneral[U];return jW(B,m)},getXgCategories:e=>e.xgCategories||[],goalsQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsLocal.filter(B=>s.has(B.category_id)).length},goalsQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsAway.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsLocal.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsAway.filter(B=>s.has(B.category_id)).length},headQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsLocal.filter(B=>s.has(B.category_id)).length},headQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsAway.filter(B=>s.has(B.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsLocal.filter(B=>s.has(B.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsAway.filter(B=>s.has(B.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let B=o.playsLocal.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return UW(B,2)},xGAway:(e,o)=>{const s=new Set;let B=o.playsAway.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return UW(B,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setXgCategories(e,o){e.xgCategories=o},setPlays(e,o){const s=Of(e.xgCategories,zf.goals),B=Of(e.xgCategories,zf.shots),U=Of(e.xgCategories,zf.head),m=Of(e.xgCategories,zf.penalties),g=o.local_team.map(l=>VW(o.data_headers,l)),a=[],y=[],h=[],r=[],_=new Set;g.forEach(l=>{s.has(l.category_id)?_.has(l.moment_of_play)||(_.add(l.moment_of_play),a.push(l)):B.has(l.category_id)?y.push(l):U.has(l.category_id)?h.push(l):m.has(l.category_id)&&r.push(l)}),e.xGLocalPlays=[...y,...a,...h,...r];const v=o.visiting_team.map(l=>VW(o.data_headers,l)),x=new Set,f=[],n=[],i=[],c=[];v.forEach(l=>{s.has(l.category_id)?x.has(l.moment_of_play)||(x.add(l.moment_of_play),f.push(l)):B.has(l.category_id)?n.push(l):U.has(l.category_id)?i.push(l):m.has(l.category_id)&&c.push(l)}),e.xGVisitingPlays=[...n,...f,...i,...c]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async loadXgCategories({commit:e,rootGetters:o}){const s=o.getProviderId,B=await Zne(s);e("setXgCategories",(B==null?void 0:B.categories)??O2)},async getXgPlays({commit:e,dispatch:o,rootGetters:s},{seasonId:B,localTeamId:U,visitingTeamId:m,postMatch:g=!1}){try{if(!B||!U||!m)return;const a=s.getProviderId,y=s.getIsDevApis;await o("loadXgCategories");let h={};g?h=await tZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}):h=await eZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}),e("setPlays",h)}catch(a){return Promise.reject(a)}}}}}};function rZt(e){for(const[o,s]of Object.entries(aZt))e.hasModule(o)||e.registerModule(o,s)}const nZt={class:"subcategory-group"},iZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",nZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Zl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},oZt=ic(iZt,[["__scopeId","data-v-ae6f3d72"]]),sZt={class:"filter-subcategories"},lZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",sZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(oZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Xw=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),cZt={class:"details__header"},uZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),dZt={class:"details__header__checkbox"},hZt={class:"details__body"},pZt={class:"details__body__playing-as"},fZt=["onClick"],mZt={class:"details__header"},gZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),yZt={class:"details__header__checkbox"},vZt={class:"details__body"},bZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),_Zt={class:"details__body__game-section"},xZt=["onClick"],wZt={class:"details__body"},kZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),SZt={class:"details__body__game-section"},CZt=["onClick"],TZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",cZt,[uZt,t.createElementVNode("div",dZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",hZt,[t.createElementVNode("div",pZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,fZt))),128))])]),t.createElementVNode("div",mZt,[gZt,t.createElementVNode("div",yZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",vZt,[bZt,t.createElementVNode("div",_Zt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,xZt))),128))])]),t.createElementVNode("div",wZt,[kZt,t.createElementVNode("div",SZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,CZt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),AZt={class:"filter-field"},EZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",AZt,[t.createVNode(t.unref(ZF),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),MZt={class:"subcategory-group"},IZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",MZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Wl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},PZt=oc(IZt,[["__scopeId","data-v-85bc2114"]]),LZt={class:"filter-subcategories"},BZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",LZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(PZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),$w=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),zZt={class:"details__header"},OZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),DZt={class:"details__header__checkbox"},NZt={class:"details__body"},FZt={class:"details__body__playing-as"},RZt=["onClick"],VZt={class:"details__header"},jZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),UZt={class:"details__header__checkbox"},GZt={class:"details__body"},HZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),ZZt={class:"details__body__game-section"},WZt=["onClick"],qZt={class:"details__body"},JZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),YZt={class:"details__body__game-section"},XZt=["onClick"],$Zt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",zZt,[OZt,t.createElementVNode("div",DZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",NZt,[t.createElementVNode("div",FZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,RZt))),128))])]),t.createElementVNode("div",VZt,[jZt,t.createElementVNode("div",UZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",GZt,[HZt,t.createElementVNode("div",ZZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,WZt))),128))])]),t.createElementVNode("div",qZt,[JZt,t.createElementVNode("div",YZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,XZt))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),KZt={class:"filter-field"},QZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",KZt,[t.createVNode(t.unref(RG),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));Nd.GSCGameData=THt,Nd.connectSocket=n8,Nd.disconnectSocket=i8,Nd.getSocket=r8,Nd.registerStoreModules=rZt,Object.defineProperty(Nd,Symbol.toStringTag,{value:"Module"})});
8207
+ */var hW="store";function fUt(e){return e===void 0&&(e=null),t.inject(e!==null?e:hW)}function Rg(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function pW(e){return e!==null&&typeof e=="object"}function mUt(e){return e&&typeof e.then=="function"}function o0(e,o){if(!e)throw new Error("[vuex] "+o)}function gUt(e,o){return function(){return e(o)}}function fW(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var B=o.indexOf(e);B>-1&&o.splice(B,1)}}function mW(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;Zw(e,s,[],e._modules.root,!0),dA(e,s,o)}function dA(e,o,s){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var U=e._wrappedGetters,m={};Rg(U,function(g,a){m[a]=gUt(g,e),Object.defineProperty(e.getters,a,{get:function(){return m[a]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&xUt(e),B&&s&&e._withCommit(function(){B.data=null})}function Zw(e,o,s,B,U){var m=!s.length,g=e._modules.getNamespace(s);if(B.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[g]=B),!m&&!U){var a=hA(o,s.slice(0,-1)),y=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&y in a&&console.warn('[vuex] state field "'+y+'" was overridden by a module with the same name at "'+s.join(".")+'"'),a[y]=B.state})}var h=B.context=yUt(e,g,s);B.forEachMutation(function(r,_){var v=g+_;vUt(e,v,r,h)}),B.forEachAction(function(r,_){var v=r.root?_:g+_,x=r.handler||r;bUt(e,v,x,h)}),B.forEachGetter(function(r,_){var v=g+_;_Ut(e,v,r,h)}),B.forEachChild(function(r,_){Zw(e,o,s.concat(_),r,U)})}function yUt(e,o,s){var B=o==="",U={dispatch:B?e.dispatch:function(m,g,a){var y=Ww(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+y.type+", global type: "+_);return}return e.dispatch(_,h)},commit:B?e.commit:function(m,g,a){var y=Ww(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+y.type+", global type: "+_);return}e.commit(_,h,r)}};return Object.defineProperties(U,{getters:{get:B?function(){return e.getters}:function(){return gW(e,o)}},state:{get:function(){return hA(e.state,s)}}}),U}function gW(e,o){if(!e._makeLocalGettersCache[o]){var s={},B=o.length;Object.keys(e.getters).forEach(function(U){if(U.slice(0,B)===o){var m=U.slice(B);Object.defineProperty(s,m,{get:function(){return e.getters[U]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function vUt(e,o,s,B){var U=e._mutations[o]||(e._mutations[o]=[]);U.push(function(m){s.call(e,B.state,m)})}function bUt(e,o,s,B){var U=e._actions[o]||(e._actions[o]=[]);U.push(function(m){var g=s.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},m);return mUt(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):g})}function _Ut(e,o,s,B){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(U){return s(B.state,B.getters,U.state,U.getters)}}function xUt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&o0(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function hA(e,o){return o.reduce(function(s,B){return s[B]},e)}function Ww(e,o,s){return pW(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&o0(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var wUt="vuex bindings",yW="vuex:mutations",pA="vuex:actions",y2="vuex",kUt=0;function SUt(e,o){pUt({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[wUt]},function(s){s.addTimelineLayer({id:yW,label:"Vuex Mutations",color:vW}),s.addTimelineLayer({id:pA,label:"Vuex Actions",color:vW}),s.addInspector({id:y2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===y2)if(B.filter){var U=[];wW(U,o._modules.root,B.filter,""),B.rootNodes=U}else B.rootNodes=[xW(o._modules.root,"")]}),s.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId;gW(o,U),B.state=AUt(MUt(o._modules,U),U==="root"?o.getters:o._makeLocalGettersCache,U)}}),s.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId,m=B.path;U!=="root"&&(m=U.split("/").filter(Boolean).concat(m)),o._withCommit(function(){B.set(o._state.data,m,B.state.value)})}}),o.subscribe(function(B,U){var m={};B.payload&&(m.payload=B.payload),m.state=U,s.notifyComponentUpdate(),s.sendInspectorTree(y2),s.sendInspectorState(y2),s.addTimelineEvent({layerId:yW,event:{time:Date.now(),title:B.type,data:m}})}),o.subscribeAction({before:function(B,U){var m={};B.payload&&(m.payload=B.payload),B._id=kUt++,B._time=Date.now(),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:m}})},after:function(B,U){var m={},g=Date.now()-B._time;m.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},B.payload&&(m.payload=B.payload),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:m}})}})})}var vW=8702998,CUt=6710886,TUt=16777215,bW={label:"namespaced",textColor:TUt,backgroundColor:CUt};function _W(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function xW(e,o){return{id:o||"root",label:_W(o),tags:e.namespaced?[bW]:[],children:Object.keys(e._children).map(function(s){return xW(e._children[s],o+s+"/")})}}function wW(e,o,s,B){B.includes(s)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:o.namespaced?[bW]:[]}),Object.keys(o._children).forEach(function(U){wW(e,o._children[U],s,B+U+"/")})}function AUt(e,o,s){o=s==="root"?o:o[s];var B=Object.keys(o),U={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(B.length){var m=EUt(o);U.getters=Object.keys(m).map(function(g){return{key:g.endsWith("/")?_W(g):g,editable:!1,value:fA(function(){return m[g]})}})}return U}function EUt(e){var o={};return Object.keys(e).forEach(function(s){var B=s.split("/");if(B.length>1){var U=o,m=B.pop();B.forEach(function(g){U[g]||(U[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),U=U[g]._custom.value}),U[m]=fA(function(){return e[s]})}else o[s]=fA(function(){return e[s]})}),o}function MUt(e,o){var s=o.split("/").filter(function(B){return B});return s.reduce(function(B,U,m){var g=B[U];if(!g)throw new Error('Missing module "'+U+'" for path "'+o+'".');return m===s.length-1?g:g._children},o==="root"?e:e.root._children)}function fA(e){try{return e()}catch(o){return o}}var s0=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},kW={namespaced:{configurable:!0}};kW.namespaced.get=function(){return!!this._rawModule.namespaced},s0.prototype.addChild=function(e,o){this._children[e]=o},s0.prototype.removeChild=function(e){delete this._children[e]},s0.prototype.getChild=function(e){return this._children[e]},s0.prototype.hasChild=function(e){return e in this._children},s0.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},s0.prototype.forEachChild=function(e){Rg(this._children,e)},s0.prototype.forEachGetter=function(e){this._rawModule.getters&&Rg(this._rawModule.getters,e)},s0.prototype.forEachAction=function(e){this._rawModule.actions&&Rg(this._rawModule.actions,e)},s0.prototype.forEachMutation=function(e){this._rawModule.mutations&&Rg(this._rawModule.mutations,e)},Object.defineProperties(s0.prototype,kW);var Vg=function(e){this.register([],e,!1)};Vg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},Vg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,B){return o=o.getChild(B),s+(o.namespaced?B+"/":"")},"")},Vg.prototype.update=function(e){SW([],this.root,e)},Vg.prototype.register=function(e,o,s){var B=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&AW(e,o);var U=new s0(o,s);if(e.length===0)this.root=U;else{var m=this.get(e.slice(0,-1));m.addChild(e[e.length-1],U)}o.modules&&Rg(o.modules,function(g,a){B.register(e.concat(a),g,s)})},Vg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],B=o.getChild(s);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}B.runtime&&o.removeChild(s)},Vg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function SW(e,o,s){if(process.env.NODE_ENV!=="production"&&AW(e,s),o.update(s),s.modules)for(var B in s.modules){if(!o.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}SW(e.concat(B),o.getChild(B),s.modules[B])}}var CW={assert:function(e){return typeof e=="function"},expected:"function"},IUt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},TW={getters:CW,mutations:CW,actions:IUt};function AW(e,o){Object.keys(TW).forEach(function(s){if(o[s]){var B=TW[s];Rg(o[s],function(U,m){o0(B.assert(U),PUt(e,s,m,U,B.expected))})}})}function PUt(e,o,s,B,U){var m=o+" should be "+U+' but "'+o+"."+s+'"';return e.length>0&&(m+=' in module "'+e.join(".")+'"'),m+=" is "+JSON.stringify(B)+".",m}var $p=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(o0(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),o0(this instanceof e,"store must be called with the new operator."));var B=o.plugins;B===void 0&&(B=[]);var U=o.strict;U===void 0&&(U=!1);var m=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Vg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=m;var g=this,a=this,y=a.dispatch,h=a.commit;this.dispatch=function(_,v){return y.call(g,_,v)},this.commit=function(_,v,x){return h.call(g,_,v,x)},this.strict=U;var r=this._modules.root.state;Zw(this,r,[],this._modules.root),dA(this,r),B.forEach(function(_){return _(s)})},mA={state:{configurable:!0}};$p.prototype.install=function(e,o){e.provide(o||hW,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&SUt(e,this)},mA.state.get=function(){return this._state.data},mA.state.set=function(e){process.env.NODE_ENV!=="production"&&o0(!1,"use store.replaceState() to explicit replace store state.")},$p.prototype.commit=function(e,o,s){var B=this,U=Ww(e,o,s),m=U.type,g=U.payload,a=U.options,y={type:m,payload:g},h=this._mutations[m];if(!h){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+m);return}this._withCommit(function(){h.forEach(function(r){r(g)})}),this._subscribers.slice().forEach(function(r){return r(y,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+m+". Silent option has been removed. Use the filter functionality in the vue-devtools")},$p.prototype.dispatch=function(e,o){var s=this,B=Ww(e,o),U=B.type,m=B.payload,g={type:U,payload:m},a=this._actions[U];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+U);return}try{this._actionSubscribers.slice().filter(function(h){return h.before}).forEach(function(h){return h.before(g,s.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(h))}var y=a.length>1?Promise.all(a.map(function(h){return h(m)})):a[0](m);return new Promise(function(h,r){y.then(function(_){try{s._actionSubscribers.filter(function(v){return v.after}).forEach(function(v){return v.after(g,s.state)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(v))}h(_)},function(_){try{s._actionSubscribers.filter(function(v){return v.error}).forEach(function(v){return v.error(g,s.state,_)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(v))}r(_)})})},$p.prototype.subscribe=function(e,o){return fW(e,this._subscribers,o)},$p.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return fW(s,this._actionSubscribers,o)},$p.prototype.watch=function(e,o,s){var B=this;return process.env.NODE_ENV!=="production"&&o0(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},o,Object.assign({},s))},$p.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},$p.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(o0(Array.isArray(e),"module path must be a string or an Array."),o0(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),Zw(this,this.state,e,this._modules.get(e),s.preserveState),dA(this,this.state)},$p.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&o0(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=hA(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),mW(this)},$p.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&o0(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},$p.prototype.hotUpdate=function(e){this._modules.update(e),mW(this,!0)},$p.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties($p.prototype,mA);var LUt=zUt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!EW(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),BUt(o).forEach(function(B){var U=B.key,m=B.val;s[U]=function(){for(var g=[],a=arguments.length;a--;)g[a]=arguments[a];var y=this.$store.commit;if(e){var h=OUt(this.$store,"mapMutations",e);if(!h)return;y=h.context.commit}return typeof m=="function"?m.apply(this,[y].concat(g)):y.apply(this.$store,[m].concat(g))}}),s});function BUt(e){return EW(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function EW(e){return Array.isArray(e)||pW(e)}function zUt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function OUt(e,o,s){var B=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+o+"(): "+s),B}const DUt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function NUt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",m.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",m.showTooltip]),onClick:o[1]||(o[1]=(...g)=>m.tooltipClick&&m.tooltipClick(...g))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...g)=>m.closeClick&&m.closeClick(...g))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const FUt=x_(DUt,[["render",NUt],["__scopeId","data-v-cc97d3a4"]]),RUt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,VUt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,jUt="https://apis.golstats.com",UUt="https://dev-apis.golstats.com";function GUt(e,o,s=!1){if(!o||o===1)return e;const B=s?UUt:jUt,U=e.match(RUt);if(U){const g=e.replace(U[0],"");return`${B}/${o}/${g}`}const m=e.match(VUt);if(m){const g=e.replace(m[0],"");return`${B}/${o}/${g}`}return e}const HUt=1e3,MW=HUt*60,gA=MW*60,IW=gA*24,ZUt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/IW);o=o-s*IW;const B=Math.floor(o/gA);o=o-B*gA;const U=Math.floor(o/MW);return`${s?`${s} dias `:""}${B<10?`0${B}`:B}:${U<10?`0${U}`:U} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function WUt(e,o){return`${o==1?{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/":"https://golstatsimages.blob.core.windows.net/teams-80/"+o+"/"}${e}.png`}function qUt(e,o){return`${o==1?{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/":"https://golstatsimages.blob.core.windows.net/players-profile/"+o+"/"}${e}.png`}const yA={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},JUt="/icn-play.svg",YUt="/icn-tiros-de-esquina.svg",XUt="/icn-tiro-a-porteria.svg",$Ut="/icn-cambio.svg",KUt="/icn-falta.svg",QUt="/atajada.svg",eGt="/fuera-de-lugar.svg",vA="/gol.svg",tGt="/var.png",aGt="/tiempo-agregado.svg",rGt="/jugada-peligrosa.svg",nGt="/penal-marcado.svg",iGt="/penal-fallado.svg",oGt="/inicia-el-partido.svg",sGt="/fin-del-partido.svg",lGt="/icn-tarjeta-amarilla.svg",cGt="/icn-tarjeta-roja.svg",uGt=[1,2,3,4,6],dGt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},provider:{type:Number,default:0},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return yA.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):yA.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):yA.RED_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(o=>qUt(o,this.provider))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||uGt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...LUt("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},hGt=e=>(t.pushScopeId("data-v-dff2f5b8"),e=e(),t.popScopeId(),e),pGt={class:"time-line-event__details"},fGt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},mGt=["src"],gGt=hGt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),yGt={class:"time-line-event__details__info"},vGt={key:0,class:"time-line-event__details__info__header__players"},bGt={class:"time-line-event__details__info__header__players__div-img"},_Gt=["src"],xGt={class:"time-line-event__details__info__body"},wGt={class:"time-line-event__details__info__body__comment"},kGt={class:"time-line-event__minute__container"},SGt={class:"time-line-event__minute__container__text"},CGt={class:"time-line-event__minute__container__icon-container"},TGt={class:"time-line-event__minute__container__icon-container__icon"},AGt={key:0,src:YUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},EGt={key:1,src:XUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MGt={key:2,src:$Ut,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},IGt={key:3,src:KUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},PGt={key:4,src:QUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},LGt={key:5,src:eGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},BGt={key:6,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zGt={key:7,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OGt={key:8,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DGt={key:9,src:tGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},NGt={key:10,src:aGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FGt={key:11,src:rGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RGt={key:12,src:nGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},VGt={key:13,src:iGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jGt={key:14,src:oGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},UGt={key:15,src:sGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GGt={key:16,src:lGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HGt={key:17,src:cGt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},ZGt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function WGt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",m.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:U.gameEventKey},[t.createElementVNode("div",pGt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",fGt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,mGt)]),gGt])):t.createCommentVNode("",!0),t.createElementVNode("div",yGt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",m.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",vGt,[m.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.srcImgPlayers,(g,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",bGt,[t.createElementVNode("img",{src:g,alt:""},null,8,_Gt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",m.nameClasses]),onClick:o[1]||(o[1]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:JUt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",xGt,[t.createElementVNode("div",wGt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",m.minuteClasses])},[t.createElementVNode("div",kGt,[t.createElementVNode("div",SGt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",CGt,[t.createElementVNode("div",TGt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",AGt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",EGt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",MGt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",IGt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",PGt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",LGt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",BGt)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",zGt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",OGt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",DGt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",NGt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",FGt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",RGt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",VGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",jGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",UGt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",GGt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",HGt)):(t.openBlock(),t.createElementBlock("img",ZGt))])])])],2)],6)}const qGt=x_(dGt,[["render",WGt],["__scopeId","data-v-dff2f5b8"]]),JGt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},YGt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let qw=null;const XGt={name:"TimeLine",components:{Tooltip:FUt,TimeLineEvent:qGt},mixins:[ZUt],props:{gameData:{type:Object,required:!0},providerId:{type:Number,default:0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":JGt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,B=GUt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:U}}=await uW.get(B);return U}catch(o){throw new Error(o)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)qw=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),qw.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],B=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,U=e+12;s&&(s.style.height=`${U}px`),B&&(B.style.height=`${U}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=YGt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return WUt(o,this.$store.getters.getProviderId)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){qw&&qw.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},PW=e=>(t.pushScopeId("data-v-a81f7bcf"),e=e(),t.popScopeId(),e),$Gt={ref:"timeLine",class:"time-line"},KGt={class:"time-line__header"},QGt={class:"time-line__header__dot"},eHt={class:"time-line__header__dot__home-team team-logo"},tHt=["src"],aHt={class:"time-line__header__dot__away-team team-logo"},rHt=["src"],nHt={key:1,class:"start-line"},iHt=PW(()=>t.createElementVNode("div",null,null,-1)),oHt=PW(()=>t.createElementVNode("div",null,null,-1)),sHt=[iHt,oHt],lHt={key:1,class:"noEventText"},cHt={class:"tooltip-data"},uHt=["src"];function dHt(e,o,s,B,U,m){const g=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",$Gt,[t.createElementVNode("div",KGt,[t.createElementVNode("div",QGt,[t.createElementVNode("div",eHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("homeTeam"),alt:""},null,8,tHt)]),t.createElementVNode("div",aHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("awayTeam"),alt:""},null,8,rHt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${U.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:U.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.gameEventsToShow,(y,h)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:y.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${h}`,class:t.normalizeClass(m.getGameEventClassAndSetIcon(y,h))},[t.createElementVNode("div",{class:t.normalizeClass(m.getEventContainerClass(y))},[t.createVNode(g,{"game-event":y,"is-mobile":m.isMobile,provider:e.$store.getters.getProviderId,"time-line-width":U.timeLineWidth,width:m.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:r=>m.updateContainerHeight(r,h),onPlayerChanged:o[0]||(o[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:m.thumbnailClick},null,8,["game-event","is-mobile","provider","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),h>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${h}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&h===m.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",nHt,sHt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",lHt,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:U.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",cHt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:U.dataVideo.link,format:"video/mp4"},null,8,uHt)])])]),_:1},8,["data"])],64)}const hHt=x_(XGt,[["render",dHt],["__scopeId","data-v-a81f7bcf"]]),pHt={class:"game-time-line__options"},fHt={class:"game-time-line__timeline"},mHt={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;uW.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),B=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let U=null;const m=fUt();m.commit("setProviderId",o.providerId),m.commit("setIsDevApis",o.isDevApis);const g=t.ref(["Todo","1er tiempo","2do tiempo"]),a=t.ref("Todo"),y=t.ref({}),h=t.ref(null),r=t.ref(0),_=t.computed(()=>{let i="all";return a.value==="1er tiempo"||a.value==="1er"?i="firstHalf":(a.value==="2do tiempo"||a.value==="2do")&&(i="secondHalf"),i}),v=t.computed(()=>r.value<500);function x(i){a.value=i}function f(i){y.value=i}function n(){if(window.ResizeObserver)U=new ResizeObserver(()=>{r.value=h.value.clientWidth}),U.observe(h.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{U&&U.unobserve(h.value)}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:h,class:"game-time-line"},[t.createElementVNode("div",pHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(rVt,t.mergeProps(r.value<390?B.value:s.value,{text:l=="Todo"?l:r.value<390?l.substring(0,3):l,"is-active":a.value===l,onClick:d=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",fHt,[t.createVNode(hHt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":v.value,socket:e.socket,provider:e.providerId,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:f},null,8,["game-data","time-line-period","is-mobile","socket","provider","can-play-videos"])])],512))}},gHt=x_(mHt,[["__scopeId","data-v-691198f5"]]),Saa="",yHt={class:"game-data__header"},vHt={class:"game-data__header__tournament-season-dropdown"},bHt={class:"game-data__header__teams-carousel"},_Ht={class:"game-data__body"},xHt={key:0,class:"no-stats-container"},wHt={key:1,class:"no-stats-container-mobile"},kHt={class:"game-data__body__menu"},SHt={class:"game-data__body__menu__contmenuswitch"};pu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const CHt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Fue,GSCGameTimeLine:gHt,GscSwitchComponent:sC,GSCLineupsMain:o4e,GSCPositining:Y_t,GSCDatosGSMain:DEe,GSCVideoGame:cUe,ModalEvents:CN,GSCTacticaFijaMain:tVt,GSCProminentMain:yut,GSCComparative:kpt}}),THt=Ki(Object.assign(CHt,{props:{tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=gp();let B=null;Rd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)});const U=e,m=t.ref(z2(Mx));t.watch(()=>U.providerId,async mt=>{s.commit("setProviderId",mt),s.commit("setIsDevApis",U.isDevApis),m.value=await Wne(mt)},{immediate:!0}),t.provide("playOffAbbreviationsStructure",m);const g=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),a=t.ref({season:[]}),y=t.ref({}),h=t.ref(!1),r=t.ref({}),_=t.ref(1),v=t.ref(0),x=3e4,f=3e4,n=3e4,i=3e4,c=3e4,l=3e4,d=3e4,b=3e4,w=6e4,C=t.ref(null),E=t.ref(null),A=t.ref(null),P=t.ref([]),L=t.ref(null),T=t.ref(!0),I=t.ref(new Set([1,2])),M=t.ref({}),S=t.ref({minute:"",recent_lapse:0,score:{}}),z=t.ref(0),k=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),O=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),N=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),j=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const Z=t.ref(0);let G=null;const H=t.ref(null),$=t.ref(0),ie=t.ref(N.value[0]),q=t.ref([]);let K=t.ref("");const Q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const mt=[];return y.value&&y.value.id&&(mt.push({id:y.value.id,name:y.value.name,type:y.value.type}),y.value.related_seasons&&y.value.related_seasons.forEach(bt=>{mt.push({id:bt.id,type:bt.type})})),mt}),ee=t.computed(()=>{if(U.clientPrivilegesBySeasons){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return mt.teamId}return 0});function ce(){h.value=!1}function de(mt){const bt=mt.split(",");return!(bt.length<2||bt[1].split(" ").length<2)}function he(mt){C.value=mt}function pe(mt){P.value.push(mt)}function re(mt){L.value=mt}function se(mt){A.value=mt}function ne(mt){E.value=mt}function me(mt){if(!de(mt))return"";const bt=ve(mt);return`${ye(mt)}. ${bt}`}function ye(mt){return mt.split(",")[1].split(" ")[1][0]}function ve(mt){const bt=mt.split(",")[0].split(" ");return bt[0].length<=3&&bt.length>1?`${bt[0]} ${bt[1]}`:bt[0]}async function we(mt){if(!(!mt||!mt.game_id))try{const bt=pu.create({headers:{Authorization:`${g.value}`}});M.value={};const It=await bt.get(uu("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+mt.game_id,U.providerId,U.isDevApis));if(console.log("nombre de los datos live plays",It),M.value[mt.home_team.team_id]=[],M.value[mt.home_team.team_id].team={name:mt.home_team.acronym,logo:mt.home_team.logo},M.value[mt.home_team.team_id].goals=[],M.value[mt.home_team.team_id].red=[],M.value[mt.home_team.team_id].yellow=[],M.value[mt.visiting_team.team_id]=[],M.value[mt.visiting_team.team_id].team={name:mt.visiting_team.acronym,logo:mt.visiting_team.logo},M.value[mt.visiting_team.team_id].goals=[],M.value[mt.visiting_team.team_id].red=[],M.value[mt.visiting_team.team_id].yellow=[],It.data.minute!=null&&(S.value={minute:It.data.minute,recent_lapse:It.data.recent_lapse,score:It.data.score}),It.data.plays)for(let Ot=0;Ot<It.data.plays.length;Ot++)(It.data.plays[Ot].category_id==42||It.data.plays[Ot].category_id==9)&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].red||(M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].red||(M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].category_id==8&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].yellow||(M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].yellow||(M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].event_type_name=="Gol"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)))}catch(bt){return Promise.reject(bt)}}function Se(mt){h.value=!0,mt.is_live!=1&&mt.game_status!=0&&(mt.game_status==4||Object.keys(mt.minutes).length>0)?(z.value=1,M.value={plays:mt.minutes,home_team:mt.home_team,visiting_team:mt.visiting_team}):(z.value=0,we(mt))}function Ce(){G=new ResizeObserver(mt=>{for(const bt of mt)$.value=bt.contentRect.width}),G.observe(H.value)}const Me=t.computed(()=>{let mt={};return r.value&&r.value.game_id&&(mt={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,regularSeasonId:r.value.regularSeasonId,matchday_name:r.value.matchday_name,status:r.value.game_status,score:r.value.score,game_status:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live,minutes:r.value.minutes}),mt});t.watch(()=>r.value.game_id,He,{immediate:!0}),t.watch(()=>r.value.is_live,Pe,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)},{deep:!0,immediate:!0});function Le(mt){_.value=mt.is_captured,v.value=mt.is_female,T.value=mt.is_captured!==0,a.value.id!==mt.id&&(a.value=mt,s.commit("gameGlobal/setTournamentType",mt.tournament_type))}const ze=o;function He(mt,bt){s.commit("nextGeneral/updateShowLiveData",!0);const It=v.value?"Destacados":"Destacadas";N.value.forEach(Ot=>{Ot.name===It&&(Ot.name=v.value?"Destacadas":"Destacados")}),we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team}),Ie(),Z.value+=1}function Pe(mt,bt){if(Ie(),s.state.nextGeneral.gameForAnalysis.is_live!==mt&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:r.value.is_live,game_status:r.value.game_status}),mt){const It=r8();It.disconnected?n8():It.connected&&r.value.game_id&&o8(`game.${r.value.game_id}.v2`),Ve(),B=setInterval(()=>{z.value=0,we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team})},6e4)}else Ve(),i8();mt!==bt&&(Z.value+=1)}function Ve(){B&&clearInterval(B)}function Ie(){N.value=[],r.value.is_live||r.value.game_status===4?N.value=[...O.value]:N.value=[...j.value],U.isWidget||((y.value.is_tactic_available===0||r.value.is_live||r.value.game_status===0)&&N.value.pop(),r.value.has_tracking===1&&!(r.value.is_live||r.value.game_status===4)&&N.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),ie.value=N.value[0]}function ge(mt){console.log("objVR: -------------Z",mt),mt.gameSeasonId=r.value.season_id,mt.gameRegularSeasonId=r.value.regularSeasonId,Array.isArray(mt.gameIds)&&(mt.gameIds=mt.gameIds.map(bt=>Number(bt))),mt.seasonId!=null&&(mt.seasonId=Number(mt.seasonId)),!(!mt.auxwidget&&Be.value&&!Be.value.canPrivilegesTeamPlayVideos)&&((r.value.is_live||r.value.game_status===0||r.value.game_status===1)&&(mt.gameIdsToFilter=[r.value.game_id]),mt.isLiveAccumulated&&(mt.gameIdsToFilter=null),(r.value.is_live||r.value.game_status===0)&&!mt.isLiveAccumulated&&(mt.liveGameConfig={gameId:r.value.game_id}),mt.fakeLiveConfig={gameId:r.value.game_id},ze("openmedia",mt))}function Ae(mt){ze("onOpenProfile",mt)}function ke(mt){ze("openProfileTeam",mt)}function je(mt){ze("openProfilePlayer",mt)}function De(mt){et(mt),mt=="Estadísticas"&&(K.value="Comparativa")}function Ne(){K.value=""}function qe(mt){y.value.id!==mt.id&&(y.value=mt,ze("change-season-id",mt.id))}const Ze=t.computed(()=>N.value.reduce((mt,bt)=>(U.disabledSectionsIds.includes(bt.id)||Be.value&&!Be.value.isVideoTabVisible&&bt.id===2||U.clientPrivilegesBySeasons&&bt.id===7||(T.value||bt.id!==5&&bt.id!==6)&&mt.push(bt.name),mt),[]));function _e(mt){if(r.value.is_live||r.value.game_status===1||r.value.game_status===0){const bt=mt.playingAs.has(r.value.playingAs);return U.clientPrivilegesBySeasons.canPlayVideos&&bt}else{const bt=Re.value.filter(It=>mt.playingAs.has(It.playingAs));return U.clientPrivilegesBySeasons.canPlayVideos&&bt.length>0}}const Be=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value&&r.value&&r.value.game_id){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)if(We(mt.playingAs),(r.value.is_live||r.value.game_status===1||r.value.game_status===0)&&s.state.nextGeneral.showLiveData){const bt=mt.playingAs.has(r.value.playingAs);return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:r.value.home_team.team_id===mt.teamId,homeTeamDetails:{canPlayVideos:bt,team:r.value.home_team},awayTeamDetails:{canPlayVideos:bt,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}else{const bt=r.value.home_team.team_id===mt.teamId,It=Re.value.filter(Gt=>mt.playingAs.has(Gt.playingAs));return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&It.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:bt,homeTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt&&It.length>0,team:r.value.home_team},awayTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&!bt&&It.length>0,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}We(new Set)}return Q}return null}),Re=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return q.value.filter(bt=>bt.game_status===1&&mt.playingAs.has(bt.playingAs))}return[]}return[]});t.watch(Ze,()=>{Be.value&&!Be.value.canPrivilegesTeamPlayVideos&&(ie.value.id===2||ie.value.id===7||ie.value.id===8)&&et("Resumen")},{deep:!0,immediate:!0});function We(mt){I.value=mt}function et(mt){if(s.commit("nextGeneral/updateShowLiveData",!0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}U.isWidget?ie.value=N.value.find(bt=>bt.name===mt)||N.value[1]:ie.value=N.value.find(bt=>bt.name===mt)||N.value[0]}t.onMounted(()=>{Ce(),t.nextTick(()=>{U.isSynchronization&&et("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(G&&G.disconnect(),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let mt of P.value)clearInterval(mt);P.value=[]}s8()});function tt(mt){if(mt.playingAs||(mt.playingAs=ee.value?mt.home_team.team_id===ee.value?1:2:0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}r.value=mt,mt.is_live&&mt.game_status===4?n8():i8()}function ht(mt){q.value=mt.map(bt=>{const It={...bt};return ee.value&&(It.playingAs=It.home_team.team_id===ee.value?1:2),It})}return(mt,bt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:H},[t.createElementVNode("div",yHt,[t.withDirectives(t.createElementVNode("div",vHt,[t.createVNode(t.unref(NA),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentSelectProps?void 0:e.tournamentsApiUrl,items:e.tournamentSelectProps?e.tournamentSelectProps.items:void 0,"default-item-by-prop":e.tournamentSelectProps?e.tournamentSelectProps.defaultItemByProp:void 0,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,token:e.token,onInput:Le,onChangeTournaments:Le},null,8,["current-season-id","tournaments-ids-to-include","api-url","items","default-item-by-prop","are-female-visible","is-clubes-active","is-female-mode","token"]),t.createVNode(t.unref(VA),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:a.value.seasons,onInput:qe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",bHt,[t.createVNode(t.unref(_ee),{"plays-live":M.value,"info-live":S.value,token:k.value,is_captured:_.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":ee.value,"only-games-team-id":ee.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onChangeGameCarousel:tt,onOpenModalEvent:Se,onChangeGamesByClientPrivileges:ht},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type","provider-id","is-dev-apis"])])]),h.value?(t.openBlock(),t.createBlock(CN,{key:0,width:$.value,onCloseModalEventsLive:ce,plays:M.value,game:r.value,type:z.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",_Ht,[r.value&&"live_stats"in r.value&&r.value.live_stats==0&&r.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",xHt,bt[0]||(bt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",wHt,bt[1]||(bt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",kHt,[t.createElementVNode("div",SHt,[t.createVNode(t.unref(sC),{type:2,buttons:Ze.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":ie.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:et},null,8,["buttons","width","selected-option"])])]),Me.value&&Me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ie.value.componentName),{key:Z.value,game:Me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ne,onIntervalidhighlive:se,onIntervalidtops:pe,onIntervalidgs:re,subsection:t.unref(K),seasonSelected:y.value,tournamentSelected:a.value,"tournament-select-props":e.tournamentSelectProps,showLineups:T.value,socket:e.socket,"time-live-prominent-data":x,"time-live-highlights-prominent-and-video":f,"time-live-possesion":n,"time-live-video-goals":i,"time-live-video-best-plays":c,"time-live-video-this-game":l,"time-live-video-specific-plays":d,"time-live-comparative-best-players":b,"time-live-comparative-avanced":w,is_captured:_.value,"is-tactic-visible":!!y.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":Be.value?Be.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":I.value,"client-privileges-team-id":ee.value,"play-videos-privileges":Be.value,token:k.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onResetSubsection:Ne,onOpenmedia:ge,onOnOpenProfile:Ae,onOpenProfileTeam:ke,onOpenProfilePlayer:je,onChangeToTab:De,onOpenMediaPlayer:ge,onIntervalid:he},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","tournament-select-props","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-ed7f2403"]]);async function LW({seasonId:e,providerId:o,isDevApis:s},B=!0){try{const U=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`;return(await(await fetch(Wy(U,o))).json()).data}catch(U){if(B)return LW({seasonId:e,providerId:o,isDevApis:s},!1);throw new Error(U)}}async function AHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function EHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}function MHt(e,o,s,B,U,m,g=!1){const a=s.map(y=>y===1?2:y===2?1:3);return e.filter(y=>{const h=m&&y[U.teamId]?y[U.teamId]!==m:!1,r=o===1?2:1;return(g||B.includes(y[U.gameId]))&&(!o||(h?r:o)===y[U.playingAs])&&(s.includes(y[U.matchResult])&&y[U.teamId]===m||a.includes(y[U.matchResult])&&y[U.teamId]!==m)})}function BW(e,o,s,B,U){return o.length===2&&s.length===3&&B.length===6?e:e.filter(m=>o.includes(m[U.playingAs])&&s.includes(m[U.matchResult])&&B.includes(m[U.section]))}async function zW({seasonId:e,providerId:o,isDevApis:s}){try{const B=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data}catch(B){return Promise.reject(B)}}async function IHt({seasonId:e,gameId:o,providerId:s,isDevApis:B}){try{const U=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:m}=await Uu({url:U,providerId:s,isDevApis:B});return m}catch(U){return Promise.reject(U)}}async function PHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function LHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data||[]}catch(B){return Promise.reject(B)}}const BHt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let bA=null;function OW(){return bA||(bA=Jy(BHt)),bA}async function zHt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})).data}catch(o){return Promise.reject(o)}}async function DW({seasonId:e,teamId:o,providerId:s,isDevApis:B}){try{return await Uu({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`,providerId:s,isDevApis:B})}catch(U){return Promise.reject(U)}}async function OHt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}async function DHt(e){try{return await Uu({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}const NHt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,B){return MHt(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],OW(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,B)=>{const U={...B};return U.home_team=e.currentSeasonTeams.find(m=>m.team_id===B.home_team),U.visiting_team=e.currentSeasonTeams.find(m=>m.team_id===B.visiting_team),s[B.matchday_abbreviation]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(U):s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[U]:s[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[U]},s},{});for(let[s,B]of Object.entries(o))o[s]=Object.entries(B).map(([U,m])=>({date:U,games:m})),o[s].sort((U,m)=>U.date<m.date?-1:U.date>m.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let B=Object.keys(o.nextGamesSchedule);for(let U of B){let m=Number(U.replace("M","")),g=o.nextGamesSchedule[U].map(a=>({matchday:m,date:new Date(a.date)}));s=s.concat(g)}}return s},closestMatchDay(e,o){let s=new Date,B=0,U=-new Date(0,0,0).valueOf(),m=o.matchdaysDates,g=m.length;for(let a=0;a<m.length;a++)B=Math.abs(m[a].date-s),B<U&&(g=a,U=B);return m[g]?m[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const B=o.getProviderId,U=o.getIsDevApis,m=await LW({seasonId:o["filterGeneral/getSeasonId"],providerId:B,isDevApis:U});if(s)return m;e("updateSeasonPlays",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zW({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonGames",U)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zHt({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonTeams",U.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=o("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function FHt({filter:e,providerId:o,isDevApis:s}){try{const B=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:U}=await Uu({url:B,providerId:o,isDevApis:s});return U}catch(B){return Promise.reject(B)}}const RHt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let _A=null;function VHt(){return _A||(_A=Jy(RHt)),_A}const xA=6;let NW=xA;function jHt(e){NW=Math.max(xA,Number(e)||xA)}class Jw{constructor(){_u(this,"maximumLiveSection",1);_u(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});_u(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}getZeroTotalsTrendSections(){return new Array(NW).fill(0)}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,B){for(;o.accumulated.length<s;)o.accumulated.push(0);for(let U=s-1;U<o.accumulated.length;U++)o.accumulated[U]+=B}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,B){for(let U=o.accumulated.length-1;U>=s-1;U--)o.accumulated[U]-=B}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(B=>B/s)}calculateRanking(o,s,B,U,m,g,a,y){let h=[];U===3&&o&&o.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?h=Array.from(o.reduce((_,v)=>{const x=v[s.playingAs]===1,f=x?"1":"2",n=_.get(v[s.gameId]);if(n)n[f]?n[f].arrayPlays.push(v):n[f]={numberTeamId:v[s.teamId],arrayPlays:[v]};else{const i={numberMatchResult:v[s.matchResult]};x&&(i[1]={numberTeamId:v[s.teamId],arrayPlays:[v]}),_.set(v[s.gameId],i)}return _},new Map).values()).reduce((_,v)=>{const x=B.playingAs.length===2?"both":B.playingAs[0].toString();return(x==="both"&&(v[1].numberTeamId===B.teamId||v[2].numberTeamId===B.teamId)||x!=="both"&&v[x].numberTeamId===B.teamId)&&B.matchResult.includes(v.numberMatchResult)&&_.push(...v[1].arrayPlays,...v[2].arrayPlays),_},[]).filter(_=>B.sections.includes(_[s.section])):(h=o?[...o]:[],a&&o&&(h=o.filter(r=>B.playingAs.includes(r[s.playingAs])&&B.matchResult.includes(r[s.matchResult])&&B.sections.includes(r[s.section])))),this.setTeamRanking(h,U,s,B.teamId,g,"accomplished",y)}setTeamRanking(o,s,B,U,m,g,a){let y=null,h=null;s===3&&(y=new Map,h={},o.forEach(v=>{const x=y.get(v[B.gameId]);x?x[v[B.teamId.toString()]]?x[v[B.teamId.toString()]]+=v[B.total]:x[v[B.teamId.toString()]]=v[B.total]:y.set(v[B.gameId],{[v[B.teamId.toString()]]:v[B.total]})}),Array.from(y.values()).forEach(v=>{const[x,f]=Object.keys(v).map(i=>i),n=v[x]+v[f];this.addPassesAvgByTeam(h,x,n?v[x]/n:0),this.addPassesAvgByTeam(h,f,n?v[f]/n:0)}));const r=m.sort((v,x)=>v.team_id-x.team_id).map(v=>{if(s===3){const x=h[v.team_id.toString()];return{teamId:v.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((f,n)=>n[B.teamId]===v.team_id&&s===n[B.categoryId]?f+n[B.total]:f,0);return{teamId:v.team_id,points:v[`${a}FilterGames`]?x/v[`${a}FilterGames`]:0,total:x}}}).sort((v,x)=>x.points-v.points);this.accomplished.arrayRankings=r;const _=r.findIndex(v=>v.teamId===U);s===3&&(this.accomplished.avgPreGame=r[_].points),this[g].ranking=_+1,this[g].leader=r[0]}addPassesAvgByTeam(o,s,B){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=B):o[s]={numberGamesCount:1,numberTotalPassesAvg:B}}}class UHt{constructor(o,s,B,U,m,g,a,y,h,r,_=!0){_u(this,"id","");_u(this,"generalId",0);_u(this,"name","");_u(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"accomplishedCategoryIds",[]);_u(this,"receivedCategoryIds",[]);_u(this,"generalCategoriesIds",{accomplished:0,received:0});_u(this,"specialMention","");_u(this,"homeTeam",new Jw);_u(this,"visitingTeam",new Jw);_u(this,"isLeagueDataCalculated",!1);_u(this,"leagueAccomplishedMax",0);_u(this,"leagueReceivedMax",0);_u(this,"leagueAccomplishedAvg",0);_u(this,"leagueReceivedAvg",0);_u(this,"leagueAccomplishedAccumulator",0);_u(this,"leagueReceivedAccumulator",0);_u(this,"homeTeamType","homeTeam");_u(this,"visitingTeamType","visitingTeam");_u(this,"betOnly",!1);_u(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=U,this.names["0-0"]=U||"",this.names["1-1"]=m||"",this.names["0-1"]=g||"",this.names["1-0"]=a||"",this.generalId=y||0,this.betOnly=h||!1,this.isPercent=r||!1,this.isVisible=_}addLeaguePlays(o,s,B){o.length===0||!B||this.isLeagueDataCalculated||(o.forEach(U=>{this.isAccomplishedLeaguePlay(U[s.categoryId])&&(this.leagueAccomplishedAccumulator+=U[s.total]),this.isReceivedLeaguePlay(U[s.categoryId])&&(this.leagueReceivedAccumulator+=U[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,B){let U="-";for(const[m,g]of Object.entries(this.generalCategoriesIds))o===g&&(U=`${m==="accomplished"?"0":"1"}${U}`),s===g&&(U=`${U}${m==="accomplished"?"0":"1"}`);U.length===3&&(this.mentions[U]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,B,U,m){!B||!m||o!==this.homeTeamType&&o!==this.visitingTeamType||(B.forEach(g=>{this.isAccomplishedPlay(g[U.categoryId])?this[o].increaseAccomplishedByOne(g[U.section],g[U.total]):this.isReceivedPlay(g[U.categoryId])&&this[o].increaseReceivedByOne(g[U.section],g[U.total])}),this[o].calculateAvg(m))}addLivePlay(o,s,B,U,m=!1,g=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(B[U.section],B[U.total],!0)}subtractLivePlay(o,s,B,U,m){(o===this.homeTeamType||o===this.visitingTeamType)&&(B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&!m?this[o].decreaseAccomplishedLiveByOne(B[U.section],B[U.total]):B[U.categoryId].includes(this.generalCategoriesIds.received)&&m&&this[o].decreaseReceivedLiveByOne(B[U.section],B[U.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>o===B||`${o}_r`===B)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,B,U,m,g=!1){this[this.homeTeamType].calculateRanking(o,s,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,U,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.visitingTeamType)}resetData(){this.homeTeam=new Jw,this.visitingTeam=new Jw,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}function GHt(e){for(const o of Object.values(e))for(let s of Object.keys(o.subcategories)){const B=o.subcategories[s];o.subcategories[s]=new UHt(B.accomplishedCategoryIds,B.receivedCategoryIds,B.generalCategoriesIds,B.accomplishedName,B.receivedName,B.accomplishedReceivedName,B.receivedAccomplishedName,B.generalId,B.betOnly,B.isPercent,B.isVisible===void 0?!0:B.isVisible)}return e}const HHt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],ZHt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let wA=null;function WHt(){return wA||(wA=Jy(ZHt)),wA}const qHt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let kA=null;function JHt(){return kA||(kA=Jy(qHt)),kA}function Yw(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function FW(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function SA(e,o,s){let B=[...o];return e[s.categoryId]===2&&(B[0]=14),e[s.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}function RW(e){const o=e.indexesTSP.section;let s=0;for(const B of[e.homeTeamPlays,e.visitingTeamPlays])if(Array.isArray(B))for(const U of B){const m=U[o];m>s&&(s=m)}jHt(s)}function E_(e,o){const s=o[e.indexesTLP.playId];return e.isLive&&e.providerId===2?`${s}-${o[e.indexesTLP.categoryId]}`:s}const YHt=r8(),XHt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],$Ht={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:OW(),indexesTSP:VHt(),indexesLS:WHt(),indexesTLP:JHt(),nextGamesDataStructure:{},currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,providerId:0,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return HHt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return BW(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return BW(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,B)=>s.priority-B.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateNextGamesDataStructure(e,o){e.nextGamesDataStructure=o},setProviderId(e,o){e.providerId=Number(o)||0},updateGameForAnalysisByProps(e,o){for(const[s,B]of Object.entries(o))e.gameForAnalysis[s]=B},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&e.gameForAnalysis.game_id&&o8(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((B,U)=>{if(U.game_status===1&&(U.home_team===s.team_id||U.visiting_team===s.team_id)){const m=U.score[0]-U.score[1],g=U.home_team===s.team_id;B.push({playingAs:g?1:2,matchResult:m===0?3:g?m>0?1:2:m<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.isSocketConnected&&o.is_live&&o.game_status===4&&o.game_id&&o8(`game.${o.game_id}.v2`)},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=PI(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=PI(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o,RW(e)},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o,RW(e)},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(B=>{for(const U of Object.values(B.subcategories))U.resetMentions()}),s.forEach(B=>{for(const U of o)for(const m of Object.values(B.subcategories))m.addSpecialMention(U[0],U[1],U[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){const B=E_(e,o);if(!e.livePlays.has(B)){e.livePlays.set(B,o);const U=Yw(o,e.indexesTLP,e.categoriesMap);for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))g.addLivePlay(e.gameForAnalysis.home_team===U[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",U[e.indexesTSP.teamId],U,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));if(Die(B,o))return;let U="";const m=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=Yw(B,e.indexesTLP,e.categoriesMap),a=SA(B,g,e.indexesTLP),y=Yw(o,e.indexesTLP,e.categoriesMap),h=SA(o,y,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(r.subcategories))B&&(_.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s),a&&_.subtractLivePlay(U,a[e.indexesTSP.teamId],a,e.indexesTSP,s)),_.addLivePlay(m,y[e.indexesTSP.teamId],y,e.indexesTSP,e.isLive,s),h&&_.addLivePlay(m,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,s);e.livePlays.set(E_(e,o),o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));let U="";if(B){U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(E_(e,B));const m=Yw(B,e.indexesTLP,e.categoriesMap),g=SA(o,m,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const y of Object.values(a.subcategories))y.subtractLivePlay(U,m[e.indexesTSP.teamId],m,e.indexesTSP,s),g&&y.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(m=>{m.homeTeamFilterGames=m.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,m.visitingTeamFilterGames=m.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const B=[],U=new Map;for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))B.push(g);o.rankingData.forEach(m=>{for(const g of B)if(g.isInGeneralCategory(m[e.indexesLS.categoryId])){U.has(g.id)?U.get(g.id).push(m):U.set(g.id,[m]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=FW(o)},setVisitingGames(e,o){e.visitingGames=FW(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(B=>{const U=e.categoriesMap.get(B);U?U.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{async fillNextGameDataStructure({commit:e},{provider:o}){try{e("setProviderId",o);const s=await jne(o),B=GHt(s);e("updateNextGamesDataStructure",B)}catch(s){return Promise.reject(s)}},turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e,rootGetters:o},s){try{const a=o.getProviderId,y=o.getIsDevApis,h=await DHt({gameId:s.gameId,providerId:a,isDevApis:y});if(h){var B=[],U=[],m={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},g={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};if(Object.keys(h.data).length!==0){const r=_=>{const v=_.slice(),x=Number(v[0]);return Number.isNaN(x)||(v[0]=x),v};B=h.data.data.filter(_=>_[1]==s.homeTeam).map(r),U=h.data.data.filter(_=>_[1]==s.awayTeam).map(r),m=h.data.games,g=h.data.games}e("updateHomeTeamPlays",B),e("updateVisitingTeamPlays",U),e("setHomeGames",m),e("setVisitingGames",g)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(a){return Promise.reject(a)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",s.gameInfo),B.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s,rootGetters:B},{gameId:U,isTeamsAnalysis:m,currentSeasonId:g,isLoginChanged:a=!1,defaultFilter:y=null,gameInfo:h=null,isCupGame:r=!1}){try{let _={},v=e.seasonId!==Number(g);const x=B.getProviderId;await o("fillNextGameDataStructure",{provider:x});const f=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),v&&s("setSeasonId",g),s("updateGameId",Number(U)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const n=await o("getCurrentSeasonGames",Number(U));if(s("leagueGeneral/updateCurrentSeasonGames",n,{root:!0}),_=n.find(i=>i.game_id===Number(U)),!_&&h&&(_=h),_&&(_.home_team==null&&_.homeTeam!=null&&(_.home_team=_.homeTeam.team_id??_.homeTeam),_.visiting_team==null&&_.awayTeam!=null&&(_.visiting_team=_.awayTeam.team_id??_.awayTeam)),_&&h&&(_.game_status=_.game_status??h.game_status,_.is_live=_.is_live??h.is_live),_&&s("updateGameForAnalysis",_),_.game_status!==1&&((a||e.categoriesMap.size===0)&&s("generateCategoriesMap"),r||await o("checkTeamsData",{gameId:U,isFromBet:!!y}),(a||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&f.push(o("getSeasonStatistics"))),e.usePastSeasonId){const i=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",i,{root:!0})}(a||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(i=>_.home_team===i.team_id))&&f.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",_.score[0]),s("setAwayResultGame",_.score[1]),m?_.game_status!==1?(await o("fillStatisticData",{gameId:U,gameinfo:_,promises:f,defaultFilter:y}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),f.push(o("fillStatisticDataPostMatch",{game:U,homeTeam:_.home_team,awayTeam:_.visiting_team,gameInfo:_})),await Promise.all(f)):s("setIsSectionLoading",!1,{root:!0})}catch(_){return Promise.reject(_)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:B,state:U},{gameId:m,gameinfo:g,promises:a=[],defaultFilter:y=null}){let h=null;try{const r=B.getProviderId,_=B.getIsDevApis;e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),(g.is_live||g.game_status===0)&&a.push(o("getCurrentLiveGamePlays",m)),a.push(o("getSpecialMentionsByGame",m)),a.push(o("getHomeTeamPlays")),a.push(o("getVisitingTeamPlays")),a.push(o("getCurrentSeasonPlays")),y&&a.push(FHt({...y,providerId:r,isDevApis:_})),h=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),y){const[r]=h.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:U.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:B},{gameId:U,isFromBet:m}){try{const g=Number(U);if(e.pastSeasonId){B("setPastSeasonId",e.pastSeasonId,{root:!0});const a=s.leagueGeneral.currentSeasonGames.find(y=>y.game_id===g);a&&B("updateGameForAnalysis",a),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),B("setUsePastSeasonId",m||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else B("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e,rootGetters:o},s){try{const B=o.getProviderId,U=o.getIsDevApis,m=await LHt({gameId:s,providerId:B,isDevApis:U});e("addSpecialMentions",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,state:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,{teams:g,games:a,past_season_id:y,tournament_id:h}=await IHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:B,providerId:U,isDevApis:m}),r=XHt.find(_=>_.id===h);return r&&e("setCurrentTournamentName",r.name),e("setHome",g[0]),e("setAway",g[1]),o.usePastSeasonId||e("setPastSeasonId",y),await e("updateCurrentSeasonGames",a),a&&Array.isArray(a)&&e("updateFinishedGames",a.reduce((_,v)=>(v.game_status===1&&(_+=1),_),0)),a}catch(U){return Promise.reject(U)}},async getCurrentSeasonGamesLast({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,{games:m,past_season_id:g}=await zW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});return o.usePastSeasonId||e("setPastSeasonId",g),await e("updateCurrentSeasonGames",m),m&&Array.isArray(m)&&e("updateFinishedGames",m.reduce((a,y)=>(y.game_status===1&&(a+=1),a),0)),m}catch(B){return Promise.reject(B)}},async getCurrentSeasonTeams({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await OHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateCurrentSeasonTeams",m.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=o.usePastSeasonId?o.pastSeasonId:o.seasonId,g=await EHt({seasonId:m,providerId:B,isDevApis:U});e("updateSeasonStatistics",g),e("updateOldSeasonId",m)}catch(B){return Promise.reject(B)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:B}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await DW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team,providerId:B,isDevApis:U});m.data&&(e("updateHomeTeamPlays",m.data.data),e("setHomeGames",m.data.games))}catch(B){return Promise.reject(B)}},async getVisitingTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await DW({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team,providerId:B,isDevApis:U});m.data&&(e("updateVisitingTeamPlays",m.data.data),e("setVisitingGames",m.data.games))}catch(B){return Promise.reject(B)}},async getCurrentSeasonPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await AHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateStats",m)}catch(B){return Promise.reject(new Error(B))}},async getCurrentLiveGamePlays({state:e,commit:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,g=await PHt({gameId:B,providerId:U,isDevApis:m});e.livePlays=new Map,g.forEach(a=>{e.gameForAnalysis.game_id===a[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===a[e.indexesTLP.teamId])&&o("addLiveGamePlay",a)})}catch(U){throw new Error(U)}},socket_new({state:e,commit:o},s){const B=s[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("addLiveGamePlay",B)},socket_update({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&o("updateLiveGamePlay",B)},socket_delete({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",B)},exitChannel({state:e,getters:o,rootState:s,rootGetters:B,commit:U}){const m=B["loginGeneral/getPremiumAccount"];o.isLive&&m&&(U("updateShowLiveData",!0),U("clearLiveTotals"),e.livePlays.clear(),YHt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function KHt({providerId:e,isDevApis:o}={}){try{const{data:s}=await Uu({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",providerId:e,isDevApis:o});return s}catch(s){throw new Error(s)}}const QHt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o,rootGetters:s}){try{if(e.tournaments.length===0){const B=s.getProviderId,U=s.getIsDevApis,m=await KHt({providerId:B,isDevApis:U});o("setTournaments",m)}}catch(B){throw new Error(B)}}}}};async function eZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}async function tZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}const VW=(e,o)=>{let s={};return e.forEach((B,U)=>{U==3&&(o[0]==35||o[0]==54)&&(o[U]==2?o[U]=1:o[U]=2),U==2&&(o[0]==35||o[0]==54)&&(o[U]==1?o[U]=2:o[U]==2&&(o[U]=1)),s[B]=o[U]}),s},jW=(e,o)=>e.filter(B=>{const U=o.playingAs.includes(B.playing_as),m=o.matchResult.includes(B.match_result),g=o.sections.includes(B.section);return U&&m&&g});(function(){function e(o,s,B){return typeof B>"u"||+B==0?Math[o](s):(s=+s,B=+B,isNaN(s)||!(typeof B=="number"&&B%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-B:-B))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+B:B))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function UW(e,o){let s=o*-1;return Math.ceil10(e,s)}const zf={goals:"Goles",shots:"Tiros a gol",head:"Remates con cabeza",penalties:"Penales"};function Of(e,o){const s=(e||[]).find(B=>B.name===o);return new Set((s==null?void 0:s.categories)||[])}const aZt={...QHt,...NHt,...$Ht,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[],xgCategories:O2},getters:{playsLocal:(e,o,s)=>{const B=e.xGLocalPlays,U="homeTeamFilter",m=s.nextGeneral[U];return jW(B,m)||[]},playsAway:(e,o,s)=>{const B=e.xGVisitingPlays,U="visitingTeamFilter",m=s.nextGeneral[U];return jW(B,m)},getXgCategories:e=>e.xgCategories||[],goalsQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsLocal.filter(B=>s.has(B.category_id)).length},goalsQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsAway.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsLocal.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsAway.filter(B=>s.has(B.category_id)).length},headQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsLocal.filter(B=>s.has(B.category_id)).length},headQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsAway.filter(B=>s.has(B.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsLocal.filter(B=>s.has(B.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsAway.filter(B=>s.has(B.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let B=o.playsLocal.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return UW(B,2)},xGAway:(e,o)=>{const s=new Set;let B=o.playsAway.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return UW(B,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setXgCategories(e,o){e.xgCategories=o},setPlays(e,o){const s=Of(e.xgCategories,zf.goals),B=Of(e.xgCategories,zf.shots),U=Of(e.xgCategories,zf.head),m=Of(e.xgCategories,zf.penalties),g=o.local_team.map(l=>VW(o.data_headers,l)),a=[],y=[],h=[],r=[],_=new Set;g.forEach(l=>{s.has(l.category_id)?_.has(l.moment_of_play)||(_.add(l.moment_of_play),a.push(l)):B.has(l.category_id)?y.push(l):U.has(l.category_id)?h.push(l):m.has(l.category_id)&&r.push(l)}),e.xGLocalPlays=[...y,...a,...h,...r];const v=o.visiting_team.map(l=>VW(o.data_headers,l)),x=new Set,f=[],n=[],i=[],c=[];v.forEach(l=>{s.has(l.category_id)?x.has(l.moment_of_play)||(x.add(l.moment_of_play),f.push(l)):B.has(l.category_id)?n.push(l):U.has(l.category_id)?i.push(l):m.has(l.category_id)&&c.push(l)}),e.xGVisitingPlays=[...n,...f,...i,...c]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async loadXgCategories({commit:e,rootGetters:o}){const s=o.getProviderId,B=await Zne(s);e("setXgCategories",(B==null?void 0:B.categories)??O2)},async getXgPlays({commit:e,dispatch:o,rootGetters:s},{seasonId:B,localTeamId:U,visitingTeamId:m,postMatch:g=!1}){try{if(!B||!U||!m)return;const a=s.getProviderId,y=s.getIsDevApis;await o("loadXgCategories");let h={};g?h=await tZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}):h=await eZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}),e("setPlays",h)}catch(a){return Promise.reject(a)}}}}}};function rZt(e){for(const[o,s]of Object.entries(aZt))e.hasModule(o)||e.registerModule(o,s)}const nZt={class:"subcategory-group"},iZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",nZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Zl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},oZt=ic(iZt,[["__scopeId","data-v-ae6f3d72"]]),sZt={class:"filter-subcategories"},lZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",sZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(oZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Xw=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),cZt={class:"details__header"},uZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),dZt={class:"details__header__checkbox"},hZt={class:"details__body"},pZt={class:"details__body__playing-as"},fZt=["onClick"],mZt={class:"details__header"},gZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),yZt={class:"details__header__checkbox"},vZt={class:"details__body"},bZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),_Zt={class:"details__body__game-section"},xZt=["onClick"],wZt={class:"details__body"},kZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),SZt={class:"details__body__game-section"},CZt=["onClick"],TZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",cZt,[uZt,t.createElementVNode("div",dZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",hZt,[t.createElementVNode("div",pZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,fZt))),128))])]),t.createElementVNode("div",mZt,[gZt,t.createElementVNode("div",yZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",vZt,[bZt,t.createElementVNode("div",_Zt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,xZt))),128))])]),t.createElementVNode("div",wZt,[kZt,t.createElementVNode("div",SZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,CZt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),AZt={class:"filter-field"},EZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",AZt,[t.createVNode(t.unref(ZF),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),MZt={class:"subcategory-group"},IZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",MZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Wl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},PZt=oc(IZt,[["__scopeId","data-v-85bc2114"]]),LZt={class:"filter-subcategories"},BZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",LZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(PZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),$w=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),zZt={class:"details__header"},OZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),DZt={class:"details__header__checkbox"},NZt={class:"details__body"},FZt={class:"details__body__playing-as"},RZt=["onClick"],VZt={class:"details__header"},jZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),UZt={class:"details__header__checkbox"},GZt={class:"details__body"},HZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),ZZt={class:"details__body__game-section"},WZt=["onClick"],qZt={class:"details__body"},JZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),YZt={class:"details__body__game-section"},XZt=["onClick"],$Zt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",zZt,[OZt,t.createElementVNode("div",DZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",NZt,[t.createElementVNode("div",FZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,RZt))),128))])]),t.createElementVNode("div",VZt,[jZt,t.createElementVNode("div",UZt,[t.createVNode(t.unref(Wl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",GZt,[HZt,t.createElementVNode("div",ZZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,WZt))),128))])]),t.createElementVNode("div",qZt,[JZt,t.createElementVNode("div",YZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,XZt))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),KZt={class:"filter-field"},QZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",KZt,[t.createVNode(t.unref(RG),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));Nd.GSCGameData=THt,Nd.connectSocket=n8,Nd.disconnectSocket=i8,Nd.getSocket=r8,Nd.registerStoreModules=rZt,Object.defineProperty(Nd,Symbol.toStringTag,{value:"Module"})});