@golstats/gsc-table-scrollable 1.0.18 → 1.0.19

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.
@@ -1 +1 @@
1
- (function(w,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(w=typeof globalThis<"u"?globalThis:w||self,e(w.GSCTableScrollable={},w.Vue))})(this,function(w,e){"use strict";const M=(t,i)=>{const o=t.__vccOpts||t;for(const[d,p]of i)o[d]=p;return o},F={key:1},R={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D=["fill"],O={key:0,class:"checkbox__teams"},P={class:"checkbox__teams__logo"},A=["src"],W={class:"checkbox__teams__logo"},j=["src"],Z={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(t){return["left","right","top","bottom"].includes(t)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(t,{emit:i}){const o=t;e.useCssVars(c=>({"7bd9d47b":t.width,"34dc7ddc":t.height}));const d=e.ref(!1),p=e.computed(()=>{const c={color:o.boxValueColor,"font-family":o.fontFamily,height:o.boxWidthAndHeight,width:o.boxWidthAndHeight,minWidth:o.boxWidthAndHeight,"border-radius":o.boxBorderRadius,"margin-top":o.boxMarginTop};return d.value?(c["background-color"]=o.boxBackgroundColor,c.border=`solid ${o.boxBorderWidth} ${o.boxBackgroundColor}`):c.border=`solid ${o.boxBorderWidth} ${o.boxBorderColor}`,c}),r=e.computed(()=>({"font-family":o.boxValueFontFamily,"font-size":o.boxValueFontSize,color:o.boxValueColor,"line-height":1})),g=e.computed(()=>{const c={color:o.labelColor,"font-family":o.fontFamily,"font-size":o.labelFontSize,"white-space":o.labelWhiteSpace,"text-align":o.boxPosition==="top"||o.boxPosition==="bottom"?"center":o.boxPosition};return(o.boxPosition==="left"||o.boxPosition==="right")&&(c[`margin-${o.boxPosition}`]=o.isBoxOnly?"0":o.teamsIds?"8px":"10px"),c});e.watch(()=>o.modelValue,c=>{c!==d.value&&(d.value=c)},{immediate:!0});function C(){o.avoidInteraction||!d.value&&o.avoidToCheck||(d.value=!d.value,i("update:modelValue",d.value))}function u(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox",`box-${t.boxPosition}`]),onClick:C},[e.createElementVNode("div",{class:"checkbox__box",style:e.normalizeStyle(p.value)},[d.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.boxValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"checkbox__box__value",style:e.normalizeStyle(r.value)},e.toDisplayString(t.boxValue),5)):(e.openBlock(),e.createElementBlock("div",F,[(e.openBlock(),e.createElementBlock("svg",R,[e.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:t.boxValueColor},null,8,D)]))]))],64)):e.createCommentVNode("",!0)],4),t.teamsIds&&t.teamsIds.length?(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",P,[e.createElementVNode("img",{src:u(t.teamsIds[0]),alt:""},null,8,A)]),e.createElementVNode("div",W,[e.createElementVNode("img",{src:u(t.teamsIds[1]),alt:""},null,8,j)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"checkbox__label",style:e.normalizeStyle(g.value)},e.toDisplayString(t.label),5)],2))}},H=M(Z,[["__scopeId","data-v-b6f124d8"]]),G=(t,i)=>{const o=t.__vccOpts||t;for(const[d,p]of i)o[d]=p;return o},E={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(t){this.status=t}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(t){this.$emit("click",t),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},B=()=>{e.useCssVars(t=>({"9d01acb4":t.height,"14e95081":t.borderWidthBtn,"38fec285":t.borderType,34353510:t.borderColor,"20d20dc6":t.borderRadius,17130967:t.width,"4ccb7d36":t.backgroundColor,"5d1e86a2":t.cursorType,ce65d4a2:t.fontSize,fe4ac47a:t.fontStyle,f98e44dc:t.fontFamily,"93b87770":t.marginLeftStat,c7f7beba:t.fontSizeStat}))},N=E.setup;E.setup=N?(t,i)=>(B(),N(t,i)):B;const q=t=>(e.pushScopeId("data-v-f3ee6b2b"),t=t(),e.popScopeId(),t),U=["src"],J={key:1,class:"text"},K=["src"],Q={class:"stats"},X=q(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),Y={class:"numstats"},v={class:"leyend"};function ee(t,i,o,d,p,r){return e.openBlock(),e.createElementBlock("div",null,[o.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",p.status&&o.typeOnOff&&"button-active"]),style:e.normalizeStyle([r.customStyle,p.status&&o.typeOnOff&&r.customActive]),onClick:i[0]||(i[0]=(...g)=>r.btnClick&&r.btnClick(...g))},[o.icon&&o.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:o.iconSize}),src:o.icon},null,12,U)):e.createCommentVNode("",!0),o.textValue?(e.openBlock(),e.createElementBlock("div",J,e.toDisplayString(o.textValue),1)):e.createCommentVNode("",!0),o.icon&&o.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:o.iconSize}),src:o.icon},null,12,K)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),o.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:i[1]||(i[1]=(...g)=>r.btnClick&&r.btnClick(...g))},[e.createElementVNode("div",Q,[X,e.createElementVNode("div",Y,e.toDisplayString(o.textStat),1)]),e.createElementVNode("div",v,e.toDisplayString(o.textCategory),1)])):e.createCommentVNode("",!0)])}const te=G(E,[["render",ee],["__scopeId","data-v-f3ee6b2b"]]),L=(t,i)=>{const o=t.__vccOpts||t;for(const[d,p]of i)o[d]=p;return o},oe=t=>(e.pushScopeId("data-v-d03b93c8"),t=t(),e.popScopeId(),t),le={key:0,class:"overlay"},se=oe(()=>e.createElementVNode("div",{class:"column-title-2"},null,-1)),ne=["onClick"],ie=L({__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1}},emits:["expand","open-media"],setup(t,{expose:i,emit:o}){const d=t,p=e.ref(null),r=e.ref(null),g=e.ref(0);e.ref(!1);const C=e.computed(()=>{const f=d.availablePlayers[0];return f?f.stats:[]}),u=e.computed(()=>{const f=`repeat(${C.value.length}, max-content) 36px`;let m="";return g.value>0&&document.querySelectorAll(".column-title-2").forEach(k=>{m+=`${k.offsetWidth}px `}),{"--grid-template-columns":f,"--grid-template-columns-totals":m||f}});function c(){p.value=new ResizeObserver(f=>{for(const m of f){const{width:_}=m.contentRect;g.value=_}}),p.value.observe(r.value)}function S(f,m){const k=document.querySelectorAll(".scrollable-row-totals")[f+1];k&&(k.style.marginTop=`${m}px`)}function x({player:f,stat:m}){!m.total||m==="0%"||!m.seasons||!m.seasons.length||o("open-media",{...f,stat:m})}return e.onMounted(()=>{c()}),i({setMarginTopDetails:S}),(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"scroll-columns",style:e.normalizeStyle(u.value)},[t.isEditMode?(e.openBlock(),e.createElementBlock("div",le)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"titlesRow",ref:r,class:"scrollable-row-2"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,_=>(e.openBlock(),e.createElementBlock("div",{key:`t-${_.category_id}`,class:"column-title-2"},e.toDisplayString(_.name),1))),128)),se],512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availablePlayers,(_,k)=>(e.openBlock(),e.createElementBlock("div",{key:`i-${_.id}`,class:"row scrollable-row-totals"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.stats,b=>(e.openBlock(),e.createElementBlock("div",{key:b.category_id,class:e.normalizeClass(["row data-info",{odd:k%2!==0,underline:!!b.total&&b.total!=="0%"&&b.seasons&&b.seasons.length}]),onClick:z=>x({player:_,stat:b})},e.toDisplayString(b.total),11,ne))),128))]))),128))],4))}},[["__scopeId","data-v-d03b93c8"]]),h=t=>(e.pushScopeId("data-v-378d650a"),t=t(),e.popScopeId(),t),ae={class:"table__static-column"},de=h(()=>e.createElementVNode("div",{class:"static-title column-title"},null,-1)),re={class:"container"},ce={class:"details-row__info"},me={class:"details-row__info__personal"},pe={class:"bold"},he={class:"bold"},fe={class:"bold"},_e={class:"bold"},ge={class:"details-row__info__games"},ke={class:"bold"},be={class:"bold"},ye=["onClick"],Ce=[h(()=>e.createElementVNode("div",null,"Ver gráfica",-1)),h(()=>e.createElementVNode("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{"clip-path":"url(#clip0_3514_71971)"},[e.createElementVNode("path",{d:"M16.3338 6.02932L8.65108 0.447539C8.56099 0.38207 8.43896 0.38207 8.34886 0.447539C8.34292 0.451852 1.97661 5.07726 0.6663 6.02926C0.498706 6.09269 0.445831 6.30248 0.563113 6.43788L3.48277 15.4238C3.51717 15.5297 3.61589 15.6014 3.72727 15.6014H13.2635C13.3911 15.6014 13.484 15.5258 13.5172 15.4238L16.4368 6.43788C16.5544 6.3022 16.501 6.09269 16.3338 6.02932ZM13.1818 14.792L12.2937 13.5604C12.4178 13.3198 12.4262 13.0472 12.3402 12.813L13.4007 8.12035C13.7342 7.97885 13.9718 7.64673 13.9682 7.25316L15.8203 6.67173L13.1818 14.792ZM1.18005 6.67273L2.54311 7.10316C2.52677 7.60485 2.90696 8.01919 3.39221 8.06116L5.37836 11.3233C5.0798 11.6827 5.09336 12.2096 5.41452 12.5533L3.8173 14.7894L1.18005 6.67273ZM7.02283 11.9909C7.03952 11.7764 6.98346 11.5718 6.86936 11.4011L8.47839 9.14851L10.8495 12.4367C10.7173 12.5536 10.6187 12.7075 10.5697 12.8821L7.02283 11.9909ZM7.62217 4.78338C7.74714 5.00898 7.96299 5.17704 8.22033 5.23844V8.35679L4.40411 7.15166C4.40767 6.95926 4.35377 6.77813 4.25196 6.6232L7.62217 4.78338ZM12.2474 6.77016C12.151 6.92429 12.0998 7.10551 12.1071 7.29851L8.73449 8.35735V5.21526C8.94317 5.14495 9.11883 5.00291 9.23183 4.8182L12.2474 6.77016ZM4.25277 7.64307L8.06249 8.84613L6.47533 11.0681C6.26327 10.973 6.02383 10.9611 5.80383 11.0334L3.92524 7.94795C4.05761 7.87432 4.17008 7.76935 4.25277 7.64307ZM11.9237 12.3234C11.7375 12.2181 11.526 12.1827 11.3228 12.214L8.8943 8.84613L12.2678 7.78701C12.4038 7.98623 12.6151 8.12979 12.8607 8.17698L11.9237 12.3234ZM12.648 6.41704L9.36721 4.29329C9.35074 3.90045 9.09089 3.57073 8.73449 3.45063V1.14366L15.6674 6.18076L13.8211 6.76041C13.5672 6.3651 13.0654 6.22463 12.648 6.41704ZM8.22033 3.42748C7.83383 3.5197 7.54105 3.8527 7.50917 4.25923L3.8238 6.27107C3.42227 6.10782 2.95152 6.24232 2.70096 6.61379L1.33164 6.18138L8.22033 1.17648V3.42748ZM5.85711 12.8183C6.22189 12.9143 6.61096 12.7823 6.84071 12.4753L10.5778 13.4143C10.7578 13.9855 11.4215 14.2369 11.9331 13.9395L12.7607 15.0872H4.23642L5.85711 12.8183Z",fill:"white"})]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"clip0_3514_71971"},[e.createElementVNode("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.5)"})])])],-1))],ue=["onClick"],we=[h(()=>e.createElementVNode("div",null,"Eliminar de lista",-1)),h(()=>e.createElementVNode("svg",{width:"17",height:"15",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Se=["onClick"],xe=[h(()=>e.createElementVNode("div",null,"Agregar a lista",-1)),h(()=>e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Ee=["onClick"],Ve=[h(()=>e.createElementVNode("div",null,"Ver perfil",-1))],Be={class:"static-row__info-player"},Ne={class:"position"},Le=["onClick"],ze=[h(()=>e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),h(()=>e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),h(()=>e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],$e=["onClick"],Te=[h(()=>e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),h(()=>e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),h(()=>e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],Ie={class:"player-photo"},Me=["src"],Fe={class:"player-name"},Re={class:"arrow"},De=["onClick"],Oe=[h(()=>e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:"#D9D9D9"},null,-1))],Pe={class:"table__scrollable-columns"},Ae=e.createStaticVNode('<div class="titles scrollable-row" data-v-378d650a><div class="column-title" data-v-378d650a>Equipo</div><div class="column-title" data-v-378d650a>Posición</div><div class="column-title" data-v-378d650a>Edad</div><div class="column-title" data-v-378d650a>País</div><div class="column-title" data-v-378d650a>Partidos Jugados</div><div class="column-title" data-v-378d650a>Minutos Jugados</div><div class="column-title" data-v-378d650a>Liga</div><div class="column-title" data-v-378d650a>Videos</div><div class="column-title" data-v-378d650a></div></div>',1),We={class:"team-logo"},je=["src"],Ze={class:"team-name data-info"},He=["src"],Ge=L({__name:"GSC-TableScrollable",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},isTableFromList:{type:Boolean,default:!1}},emits:["change-selected-players","view-profile","add-to-list","view-graph","open-media"],setup(t,{emit:i}){const o=t;let d=null,p=null;const r=e.ref([]),g=e.ref(null),C=e.ref(null),u=e.ref(0),c=e.ref(0),S=e.ref(-1);e.ref(!1);const x=e.ref(null),f=e.computed(()=>({"--width-details":`${u.value}px`,"--gap-static-row":`${m.value?"8px":"18px"}`,"--width-static-column":`${m.value?"50%":"256px"}`})),m=e.computed(()=>u.value<600);e.watch(()=>o.players,l=>{l&&l.length&&(r.value=l.map((n,s)=>{const a=s+1;return{...n,position:a<10?`0${a}`:`${a}`,isSelected:!1,isExpanded:!1,isOdd:s%2!==0,index:s}}))},{immediate:!0}),e.watch(()=>o.isEditMode,l=>{l&&r.value.forEach(n=>{n.isSelected=!1})}),e.watch(c,l=>{const s=document.querySelectorAll(".static-row")[S.value+1];s&&(s.style.marginTop=`${l}px`),o.isGeneral?_(S.value,l):C.value&&C.value.setMarginTopDetails(S.value,l),l===0&&x.value&&I(x.value)});function _(l,n){const a=document.querySelectorAll(".scrollable-row")[l+2];a&&(a.style.marginTop=`${n}px`)}function k(l){const n=l.player||l.objeto_player,s=n?n.player_id||n.id||n.playerId:l.id||l.player_id,a=n?n.team_id||n.teamId:l.team_id||l.teamId,y={isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:s?[s]:[],goalkeeperIds:[],teamId:a||0,matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};if(l.stat&&l.stat.seasons&&l.stat.seasons.length||l.seasons&&l.seasons.length){const V=[...l.stat&&l.stat.seasons&&l.stat.seasons.length?l.stat.seasons:l.seasons];V.sort((Qe,Xe)=>Qe-Xe),y.seasonId=V.shift(),y.seasonsIds=V}else(l.season_id||l.seasonId)&&(y.seasonId=l.season_id||l.seasonId);l.stat?l.stat.category_id?y.categoryIds=l.stat.category_id:l.stat.custom_category_id&&(y.customCategoryIds=[l.stat.custom_category_id]):y.categoryIds=qe(l.player_position),i("open-media",y)}function b(){d=new ResizeObserver(l=>{for(const n of l)u.value=n.contentRect.width}),d.observe(g.value)}function z(l){p=new ResizeObserver(n=>{for(const s of n)c.value=s.contentRect.height}),p.observe(l)}function qe(l){return l==="POR"?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]}function Ue(l,n){n.isSelected=l;const s=r.value.filter(a=>a.isSelected);i("change-selected-players",s)}function Je(l){i("view-profile",l)}function $(l){i("delete-from-list",l)}function T(l){i("add-to-list",l)}function Ke(l){i("show-graph",l)}function I(l){if(l.isExpanded){l.isExpanded=!1,x.value=null;return}const n=r.value.find(y=>y.isExpanded);if(n&&(n.isExpanded=!1),n){x.value=l;return}const a=document.querySelectorAll(".details-row")[l.index];S.value=l.index,z(a),l.isExpanded=!0}return e.onMounted(()=>{b()}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"table",ref_key:"tableSC",ref:g,style:e.normalizeStyle(f.value)},[e.createElementVNode("div",ae,[de,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,s=>(e.openBlock(),e.createElementBlock("div",{key:`s-${s.id}`,class:e.normalizeClass(["row static-row",{odd:s.isOdd}])},[e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["details-row",{odd:s.isOdd}])},[e.createElementVNode("div",re,[e.createElementVNode("div",ce,[e.createElementVNode("div",me,[e.createElementVNode("div",null,[e.createTextVNode("Equipo: "),e.createElementVNode("span",pe,e.toDisplayString(s.team_name),1)]),e.createElementVNode("div",null,[e.createTextVNode("Edad: "),e.createElementVNode("span",he,e.toDisplayString(s.player_age)+" Años",1)]),e.createElementVNode("div",null,[e.createTextVNode("Nacionalidad: "),e.createElementVNode("span",fe,e.toDisplayString(s.player_country),1)]),e.createElementVNode("div",null,[e.createTextVNode("Posición: "),e.createElementVNode("span",_e,e.toDisplayString(s.position_name),1)])]),e.createElementVNode("div",ge,[e.createElementVNode("div",null,[e.createTextVNode("Partidos Jugados: "),e.createElementVNode("span",ke,e.toDisplayString(s.player_games),1)]),e.createElementVNode("div",null,[e.createTextVNode("Minutos Jugados: "),e.createElementVNode("span",be,e.toDisplayString(s.player_min),1)])])]),e.createElementVNode("div",{class:"details-row__buttons",style:e.normalizeStyle(m.value?"margin-left: 0; gap: 8px;":"")},[e.createElementVNode("div",{role:"button",class:"button",onClick:a=>Ke(s)},Ce,8,ye),t.isTableFromList?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"button",onClick:a=>$(s)},we,8,ue)):(e.openBlock(),e.createElementBlock("div",{key:1,role:"button",class:"button",onClick:a=>T(s)},xe,8,Se)),e.createElementVNode("div",{role:"button",class:"button green",onClick:a=>Je(s)},Ve,8,Ee)],4)])],2),[[e.vShow,s.isExpanded]])]),_:2},1024),t.isEditMode?(e.openBlock(),e.createBlock(e.unref(H),{key:0,fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":s.isSelected,"onUpdate:modelValue":a=>Ue(a,s)},null,8,["model-value","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.createElementVNode("div",Be,[e.createElementVNode("div",Ne,e.toDisplayString(s.position),1),t.isTableFromList?(e.openBlock(),e.createElementBlock("svg",{key:0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:a=>$(s)},ze,8,Le)):(e.openBlock(),e.createElementBlock("svg",{key:1,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:a=>T(s)},Te,8,$e)),e.createElementVNode("div",Ie,[e.createElementVNode("div",null,[e.createElementVNode("img",{src:s.player_photo,alt:"player photo"},null,8,Me)])]),e.createElementVNode("div",Fe,e.toDisplayString(s.player_name),1)]),e.createElementVNode("div",Re,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["_arrowExpandIcon_6ak64_1115 _rotate_6ak64_5",{expanded:s.isExpanded}]),width:"12",height:"8",viewBox:"0 0 12 8",fill:"#D9D9D9",xmlns:"http://www.w3.org/2000/svg",onClick:a=>I(s)},Oe,10,De))])],2))),128))]),e.createElementVNode("div",Pe,[t.isGeneral?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Ae,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,s=>(e.openBlock(),e.createElementBlock("div",{key:`i-${s.id}`,class:"row scrollable-row"},[e.createElementVNode("div",{class:e.normalizeClass(["row team-info",{odd:s.isOdd}])},[e.createElementVNode("div",We,[e.createElementVNode("img",{src:s.team_logo,alt:"team logo"},null,8,je)]),e.createElementVNode("div",Ze,e.toDisplayString(s.team_abrev),1)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_position),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_age),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},[e.createElementVNode("img",{src:s.player_country_flag,alt:"player country flag",class:"country-flag"},null,8,He)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_games),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_min),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.league_name),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},[e.createVNode(e.unref(te),{icon:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png","icon-size":"19px","icon-position":"left",width:"98px",height:"30px","border-radius":"30px","border-width":"1","background-color":"#ffffff1a","font-family":"Poppins-Regular","border-color":"#55636e","text-value":"Ver videos","font-size":"10px",onClick:a=>k(s)},null,8,["onClick"])],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},null,2)]))),128))],64)):(e.openBlock(),e.createBlock(ie,{key:1,ref_key:"scrollColumns",ref:C,"available-players":r.value,"is-edit-mode":t.isEditMode,onOpenMedia:k},null,8,["available-players","is-edit-mode"]))])],4))}},[["__scopeId","data-v-378d650a"]]);w.GSCTableScrollable=Ge,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
1
+ (function(S,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(S=typeof globalThis<"u"?globalThis:S||self,e(S.GSCTableScrollable={},S.Vue))})(this,function(S,e){"use strict";const Q=(l,d)=>{const s=l.__vccOpts||l;for(const[m,_]of d)s[m]=_;return s},Y={key:1},ee={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},te=["fill"],oe={key:0,class:"checkbox__teams"},le={class:"checkbox__teams__logo"},se=["src"],ne={class:"checkbox__teams__logo"},ie=["src"],ae={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(l){return["left","right","top","bottom"].includes(l)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(l,{emit:d}){const s=l;e.useCssVars(h=>({"7bd9d47b":l.width,"34dc7ddc":l.height}));const m=e.ref(!1),_=e.computed(()=>{const h={color:s.boxValueColor,"font-family":s.fontFamily,height:s.boxWidthAndHeight,width:s.boxWidthAndHeight,minWidth:s.boxWidthAndHeight,"border-radius":s.boxBorderRadius,"margin-top":s.boxMarginTop};return m.value?(h["background-color"]=s.boxBackgroundColor,h.border=`solid ${s.boxBorderWidth} ${s.boxBackgroundColor}`):h.border=`solid ${s.boxBorderWidth} ${s.boxBorderColor}`,h}),f=e.computed(()=>({"font-family":s.boxValueFontFamily,"font-size":s.boxValueFontSize,color:s.boxValueColor,"line-height":1})),E=e.computed(()=>{const h={color:s.labelColor,"font-family":s.fontFamily,"font-size":s.labelFontSize,"white-space":s.labelWhiteSpace,"text-align":s.boxPosition==="top"||s.boxPosition==="bottom"?"center":s.boxPosition};return(s.boxPosition==="left"||s.boxPosition==="right")&&(h[`margin-${s.boxPosition}`]=s.isBoxOnly?"0":s.teamsIds?"8px":"10px"),h});e.watch(()=>s.modelValue,h=>{h!==m.value&&(m.value=h)},{immediate:!0});function b(){s.avoidInteraction||!m.value&&s.avoidToCheck||(m.value=!m.value,d("update:modelValue",m.value))}function c(h){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${h}.png`}return(h,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox",`box-${l.boxPosition}`]),onClick:b},[e.createElementVNode("div",{class:"checkbox__box",style:e.normalizeStyle(_.value)},[m.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.boxValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"checkbox__box__value",style:e.normalizeStyle(f.value)},e.toDisplayString(l.boxValue),5)):(e.openBlock(),e.createElementBlock("div",Y,[(e.openBlock(),e.createElementBlock("svg",ee,[e.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:l.boxValueColor},null,8,te)]))]))],64)):e.createCommentVNode("",!0)],4),l.teamsIds&&l.teamsIds.length?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",le,[e.createElementVNode("img",{src:c(l.teamsIds[0]),alt:""},null,8,se)]),e.createElementVNode("div",ne,[e.createElementVNode("img",{src:c(l.teamsIds[1]),alt:""},null,8,ie)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"checkbox__label",style:e.normalizeStyle(E.value)},e.toDisplayString(l.label),5)],2))}},re=Q(ae,[["__scopeId","data-v-b6f124d8"]]),ce=(l,d)=>{const s=l.__vccOpts||l;for(const[m,_]of d)s[m]=_;return s},R={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(l){this.status=l}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(l){this.$emit("click",l),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},P=()=>{e.useCssVars(l=>({"9d01acb4":l.height,"14e95081":l.borderWidthBtn,"38fec285":l.borderType,34353510:l.borderColor,"20d20dc6":l.borderRadius,17130967:l.width,"4ccb7d36":l.backgroundColor,"5d1e86a2":l.cursorType,ce65d4a2:l.fontSize,fe4ac47a:l.fontStyle,f98e44dc:l.fontFamily,"93b87770":l.marginLeftStat,c7f7beba:l.fontSizeStat}))},v=R.setup;R.setup=v?(l,d)=>(P(),v(l,d)):P;const de=l=>(e.pushScopeId("data-v-f3ee6b2b"),l=l(),e.popScopeId(),l),me=["src"],fe={key:1,class:"text"},pe=["src"],he={class:"stats"},_e=de(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),ge={class:"numstats"},ke={class:"leyend"};function ue(l,d,s,m,_,f){return e.openBlock(),e.createElementBlock("div",null,[s.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",_.status&&s.typeOnOff&&"button-active"]),style:e.normalizeStyle([f.customStyle,_.status&&s.typeOnOff&&f.customActive]),onClick:d[0]||(d[0]=(...E)=>f.btnClick&&f.btnClick(...E))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,me)):e.createCommentVNode("",!0),s.textValue?(e.openBlock(),e.createElementBlock("div",fe,e.toDisplayString(s.textValue),1)):e.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,pe)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),s.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...E)=>f.btnClick&&f.btnClick(...E))},[e.createElementVNode("div",he,[_e,e.createElementVNode("div",ge,e.toDisplayString(s.textStat),1)]),e.createElementVNode("div",ke,e.toDisplayString(s.textCategory),1)])):e.createCommentVNode("",!0)])}const Ce=ce(R,[["render",ue],["__scopeId","data-v-f3ee6b2b"]]),O=(l,d)=>{const s=l.__vccOpts||l;for(const[m,_]of d)s[m]=_;return s},F=l=>(e.pushScopeId("data-v-df83603b"),l=l(),e.popScopeId(),l),Ee={key:0,class:"overlay"},ye=["onClick"],we=[F(()=>e.createElementVNode("svg",{width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M7.50558 0C6.78112 0 6.10558 0.475441 5.89478 1.14401L1.21987 1.14286C0.904267 1.14286 0.648438 1.39886 0.648438 1.71429C0.648438 2.02972 0.904267 2.28572 1.21987 2.28572L5.89478 2.28516C6.15083 2.98516 6.78112 3.42858 7.50558 3.42858C8.23004 3.42858 8.86678 2.98402 9.1273 2.28059L10.3627 2.28572C10.6783 2.28572 10.9342 2.02972 10.9342 1.71429C10.9342 1.39886 10.6783 1.14286 10.3627 1.14286H9.12244C8.8473 0.446287 8.23004 0 7.50558 0ZM7.50558 1.14286C7.82118 1.14286 8.07701 1.39886 8.07701 1.71429C8.07701 2.02972 7.82118 2.28572 7.50558 2.28572C7.18998 2.28572 6.93415 2.02972 6.93415 1.71429C6.93415 1.39886 7.18998 1.14286 7.50558 1.14286ZM4.07701 4.28572C3.32387 4.28572 2.69347 4.7543 2.4633 5.42971C2.38295 5.43485 1.21987 5.42856 1.21987 5.42856C0.904267 5.42856 0.648438 5.68456 0.648438 5.99999C0.648438 6.31542 0.904267 6.57142 1.21987 6.57142C1.21987 6.57142 2.39267 6.55942 2.46575 6.56685C2.69593 7.24228 3.32387 7.71428 4.07701 7.71428C4.80146 7.71428 5.42226 7.27028 5.69381 6.57314L10.3627 6.57142C10.6783 6.57142 10.9342 6.31542 10.9342 5.99999C10.9342 5.68456 10.6783 5.42856 10.3627 5.42856L5.69083 5.42348C5.44038 4.74174 4.80146 4.28572 4.07701 4.28572ZM4.07701 5.42856C4.39261 5.42856 4.64844 5.68456 4.64844 5.99999C4.64844 6.31542 4.39261 6.57142 4.07701 6.57142C3.76141 6.57142 3.50558 6.31542 3.50558 5.99999C3.50558 5.68456 3.76141 5.42856 4.07701 5.42856ZM7.50558 8.57142C6.78112 8.57142 6.11844 9.04857 5.89438 9.70857L1.21987 9.71428C0.904267 9.71428 0.648438 9.97028 0.648438 10.2857C0.648438 10.6011 0.904267 10.8571 1.21987 10.8571L5.88592 10.8577C6.12301 11.5349 6.78112 12 7.50558 12C8.23004 12 8.85467 11.5469 9.12987 10.8577L10.3627 10.8571C10.6783 10.8571 10.9342 10.6011 10.9342 10.2857C10.9342 9.97028 10.6783 9.71428 10.3627 9.71428L9.12467 9.71091C8.87798 9.03491 8.23004 8.57142 7.50558 8.57142ZM7.50558 9.71428C7.82118 9.71428 8.07701 9.97028 8.07701 10.2857C8.07701 10.6011 7.82118 10.8571 7.50558 10.8571C7.18998 10.8571 6.93415 10.6011 6.93415 10.2857C6.93415 9.97028 7.18998 9.71428 7.50558 9.71428Z",fill:"white"})],-1))],be={class:"name"},Ve=["onClick"],xe=[F(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1))],Se=F(()=>e.createElementVNode("div",{class:"column-title-2"},null,-1)),Ne=["onClick"],Be=O({__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1}},emits:["expand","open-media","click-parameters","sort"],setup(l,{expose:d,emit:s}){const m=l,_=e.ref(null),f=e.ref(null),E=e.ref(0);e.ref(!1);const b=e.computed(()=>{const a=m.availablePlayers[0];return a?a.stats:[]}),c=e.computed(()=>{const a=`repeat(${b.value.length}, max-content) 36px`;let u="";return E.value>0&&document.querySelectorAll(".column-title-2").forEach(C=>{u+=`${C.offsetWidth}px `}),{"--grid-template-columns":a,"--grid-template-columns-totals":u||a}});function h(){_.value=new ResizeObserver(a=>{for(const u of a){const{width:p}=u.contentRect;E.value=p}}),_.value.observe(f.value)}function L(a,u){const C=document.querySelectorAll(".scrollable-row-totals")[a+1];C&&(C.style.marginTop=`${u}px`)}function N({player:a,stat:u}){!u.total||u==="0%"||!u.seasons||!u.seasons.length||s("open-media",{...a,stat:u})}function $(a){!a||a==="no"||s("click-parameters",a)}function B(a){s("sort",a)}return e.onMounted(()=>{h()}),d({setMarginTopDetails:L}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:"scroll-columns",style:e.normalizeStyle(c.value)},[l.isEditMode?(e.openBlock(),e.createElementBlock("div",Ee)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"titlesRow",ref:f,class:"scrollable-row-2"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(p,C)=>(e.openBlock(),e.createElementBlock("div",{key:`t-${C}`,class:"column-title-2"},[p.parameters&&p.parameters!=="no"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"parameters",role:"button",onClick:y=>$(p.parameters)},we,8,ye)):e.createCommentVNode("",!0),e.createElementVNode("div",be,e.toDisplayString(p.name),1),(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:y=>B(p)},xe,8,Ve))]))),128)),Se],512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.availablePlayers,(p,C)=>(e.openBlock(),e.createElementBlock("div",{key:`i-${p.id}`,class:"row scrollable-row-totals"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.stats,y=>(e.openBlock(),e.createElementBlock("div",{key:y.category_id,class:e.normalizeClass(["row data-info",{odd:C%2!==0,underline:!!y.total&&y.total!=="0%"&&y.seasons&&y.seasons.length}])},[e.createElementVNode("span",{onClick:D=>N({player:p,stat:y})},e.toDisplayString(y.total),9,Ne)],2))),128))]))),128))],4))}},[["__scopeId","data-v-df83603b"]]),r=l=>(e.pushScopeId("data-v-04e96d04"),l=l(),e.popScopeId(),l),Le=r(()=>e.createElementVNode("div",{class:"top-scroll-spacer"},null,-1)),Me={class:"table__static-column"},$e={class:"static-title column-title restore"},De=r(()=>e.createElementVNode("div",{class:"titles-left"},[e.createElementVNode("div",{class:"title"},"Ranking"),e.createElementVNode("div",{class:"title"},"Agregar a lista")],-1)),Te=[r(()=>e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{opacity:".6",stroke:"#fff","stroke-width":"1.333","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M15.333 2.667v4h-4M.667 13.333v-4h4"}),e.createElementVNode("path",{d:"M2.34 6a6 6 0 0 1 9.9-2.24l3.094 2.906M.667 9.333l3.093 2.906a6 6 0 0 0 9.9-2.24"})])],-1)),r(()=>e.createElementVNode("div",null,"Restaurar orden",-1))],ze=["id"],Re={class:"container"},Fe={class:"details-row__info"},Ie={class:"details-row__info__personal"},Pe={class:"bold"},ve={class:"bold"},Oe={class:"bold"},je={class:"bold"},Ae={class:"details-row__info__games"},We={class:"bold"},Ze={class:"bold"},He=["onClick"],Ge=[r(()=>e.createElementVNode("div",null,"Ver gráfica",-1)),r(()=>e.createElementVNode("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{"clip-path":"url(#clip0_3514_71971)"},[e.createElementVNode("path",{d:"M16.3338 6.02932L8.65108 0.447539C8.56099 0.38207 8.43896 0.38207 8.34886 0.447539C8.34292 0.451852 1.97661 5.07726 0.6663 6.02926C0.498706 6.09269 0.445831 6.30248 0.563113 6.43788L3.48277 15.4238C3.51717 15.5297 3.61589 15.6014 3.72727 15.6014H13.2635C13.3911 15.6014 13.484 15.5258 13.5172 15.4238L16.4368 6.43788C16.5544 6.3022 16.501 6.09269 16.3338 6.02932ZM13.1818 14.792L12.2937 13.5604C12.4178 13.3198 12.4262 13.0472 12.3402 12.813L13.4007 8.12035C13.7342 7.97885 13.9718 7.64673 13.9682 7.25316L15.8203 6.67173L13.1818 14.792ZM1.18005 6.67273L2.54311 7.10316C2.52677 7.60485 2.90696 8.01919 3.39221 8.06116L5.37836 11.3233C5.0798 11.6827 5.09336 12.2096 5.41452 12.5533L3.8173 14.7894L1.18005 6.67273ZM7.02283 11.9909C7.03952 11.7764 6.98346 11.5718 6.86936 11.4011L8.47839 9.14851L10.8495 12.4367C10.7173 12.5536 10.6187 12.7075 10.5697 12.8821L7.02283 11.9909ZM7.62217 4.78338C7.74714 5.00898 7.96299 5.17704 8.22033 5.23844V8.35679L4.40411 7.15166C4.40767 6.95926 4.35377 6.77813 4.25196 6.6232L7.62217 4.78338ZM12.2474 6.77016C12.151 6.92429 12.0998 7.10551 12.1071 7.29851L8.73449 8.35735V5.21526C8.94317 5.14495 9.11883 5.00291 9.23183 4.8182L12.2474 6.77016ZM4.25277 7.64307L8.06249 8.84613L6.47533 11.0681C6.26327 10.973 6.02383 10.9611 5.80383 11.0334L3.92524 7.94795C4.05761 7.87432 4.17008 7.76935 4.25277 7.64307ZM11.9237 12.3234C11.7375 12.2181 11.526 12.1827 11.3228 12.214L8.8943 8.84613L12.2678 7.78701C12.4038 7.98623 12.6151 8.12979 12.8607 8.17698L11.9237 12.3234ZM12.648 6.41704L9.36721 4.29329C9.35074 3.90045 9.09089 3.57073 8.73449 3.45063V1.14366L15.6674 6.18076L13.8211 6.76041C13.5672 6.3651 13.0654 6.22463 12.648 6.41704ZM8.22033 3.42748C7.83383 3.5197 7.54105 3.8527 7.50917 4.25923L3.8238 6.27107C3.42227 6.10782 2.95152 6.24232 2.70096 6.61379L1.33164 6.18138L8.22033 1.17648V3.42748ZM5.85711 12.8183C6.22189 12.9143 6.61096 12.7823 6.84071 12.4753L10.5778 13.4143C10.7578 13.9855 11.4215 14.2369 11.9331 13.9395L12.7607 15.0872H4.23642L5.85711 12.8183Z",fill:"white"})]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"clip0_3514_71971"},[e.createElementVNode("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.5)"})])])],-1))],qe=["onClick"],Ue=[r(()=>e.createElementVNode("div",null,"Eliminar de lista",-1)),r(()=>e.createElementVNode("svg",{width:"17",height:"15",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Je=["onClick"],Xe=[r(()=>e.createElementVNode("div",null,"Agregar a lista",-1)),r(()=>e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],Ke=["onClick"],Qe=[r(()=>e.createElementVNode("div",null,"Ver perfil",-1))],Ye={class:"static-row__info-player"},et={class:"position"},tt=["onClick"],ot=[r(()=>e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),r(()=>e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),r(()=>e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],lt={key:1,class:"add-to-list"},st=["onClick"],nt=[r(()=>e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),r(()=>e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),r(()=>e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],it={class:"player-photo"},at=["src"],rt={class:"player-name"},ct={class:"arrow"},dt=["onClick"],mt=[r(()=>e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:"#D9D9D9"},null,-1))],ft={class:"titles scrollable-row"},pt={class:"column-title"},ht=r(()=>e.createElementVNode("div",null," Equipo ",-1)),_t=[r(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1))],gt={class:"column-title"},kt=r(()=>e.createElementVNode("div",null," Posición ",-1)),ut=[r(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1))],Ct={class:"column-title"},Et=r(()=>e.createElementVNode("div",null," Edad ",-1)),yt=[r(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1))],wt=r(()=>e.createElementVNode("div",{class:"column-title"},"País",-1)),bt={class:"column-title"},Vt=r(()=>e.createElementVNode("div",null," Partidos Jugados ",-1)),xt=[r(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1))],St={class:"column-title"},Nt=r(()=>e.createElementVNode("div",null," Minutos Jugados ",-1)),Bt=[r(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1))],Lt={class:"column-title"},Mt=r(()=>e.createElementVNode("div",null," Liga ",-1)),$t=[r(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1))],Dt=r(()=>e.createElementVNode("div",{class:"column-title"},"Videos",-1)),Tt={class:"team-logo"},zt=["src"],Rt={class:"team-name data-info"},Ft=["src"],It=O({__name:"GSC-TableScrollable",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},isTableFromList:{type:Boolean,default:!1},isGraphButtonVisible:{type:Boolean,default:!0},isAddToListButtonVisible:{type:Boolean,default:!0}},emits:["change-selected-players","view-profile","add-to-list","view-graph","open-media","click-parameters"],setup(l,{emit:d}){const s=l;let m=null,_=null;const f=e.ref([]),E=e.ref(null),b=e.ref(null),c=e.ref(null),h=e.ref(0),L=e.ref(0),N=e.ref(-1),$=e.ref(!1),B=e.ref(null),a=e.ref(null),u=e.ref(null),p=e.ref([]),C=e.ref([{name:"team_abrev",isDesc:!1,isRoot:!0},{name:"player_position",isDesc:!1,isRoot:!0},{name:"player_age",isDesc:!1,isRoot:!0},{name:"player_games",isDesc:!1,isRoot:!0},{name:"player_min",isDesc:!1,isRoot:!0},{name:"league_name",isDesc:!1,isRoot:!0}]),y=e.ref(0),D=e.ref("922px"),j=e.computed(()=>({"--width-details":`${h.value}px`,"--gap-static-row":`${I.value?"8px":"18px"}`,"--width-static-column":`${I.value?"50%":"436px"}`})),I=e.computed(()=>h.value<600);e.watch(()=>s.players,t=>{t&&t.length&&(f.value=t.map((n,o)=>{const i=o+1,g={...n,position:i<10?`0${i}`:`${i}`,isSelected:!1,isExpanded:!1,isOdd:o%2!==0,index:o};return n.stats&&n.stats.length&&(g.stats=n.stats.map(k=>({...k,isDesc:!1,isRoot:!1}))),g.parameters&&Object.entries(g.parameters).forEach(([k,w])=>{const K=g.stats.find(qt=>qt.custom_category_id===Number(k));K&&(K.parameters=w)}),g}),p.value=f.value.map(n=>({...n})))},{immediate:!0,deep:!0}),e.watch(()=>s.isEditMode,t=>{t&&f.value.forEach(n=>{n.isSelected=!1})}),e.watch(()=>u.value,t=>{if(t){let n=[...p.value];t.isRoot?n.sort((o,i)=>typeof o[t.name]=="string"?t.isDesc?o[t.name].localeCompare(i[t.name]):o[t.name].localeCompare(i[t.name])*-1:t.isDesc?i[t.name]-o[t.name]:o[t.name]-i[t.name]):n.sort((o,i)=>{const g=o.stats.find(w=>w.name===t.name),k=i.stats.find(w=>w.name===t.name);return typeof g.value=="string"?t.isDesc?g.total.localeCompare(k.total):g.total.localeCompare(k.total)*-1:t.isDesc?k.total-g.total:g.total-k.total}),n.forEach((o,i)=>{o.isOdd=i%2!==0}),p.value=n}else p.value.sort((n,o)=>n.index-o.index).forEach((n,o)=>{n.isOdd=o%2!==0})},{immediate:!0,deep:!0}),e.watch(L,t=>{const o=document.querySelectorAll(".static-row")[N.value+1];o&&(o.style.marginTop=`${t}px`),s.isGeneral?Pt(N.value,t):b.value&&b.value.setMarginTopDetails(N.value,t),t===0&&B.value&&G(B.value)});function Pt(t,n){const i=document.querySelectorAll(".scrollable-row")[t+2];i&&(i.style.marginTop=`${n}px`)}function vt(t){d("click-parameters",t)}function V(t){t&&(t.isDesc=!t.isDesc),u.value=t}function A(t){const n=t.player||t.objeto_player,o=n?n.player_id||n.id||n.playerId:t.id||t.player_id,i={isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:o?[o]:[],goalkeeperIds:[],matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};if(t.stat&&t.stat.parameters&&(i.parameters=t.stat.parameters),t.stat&&t.stat.seasons&&t.stat.seasons.length||t.seasons&&t.seasons.length){const g=[...t.stat&&t.stat.seasons&&t.stat.seasons.length?t.stat.seasons:t.seasons];g.sort((k,w)=>k-w),i.seasonId=g.shift(),i.seasonsIds=g}else(t.season_id||t.seasonId)&&(i.seasonId=t.season_id||t.seasonId);t.stat?t.stat.category_id&&t.stat.category_id.length?i.categoryIds=t.stat.category_id:t.stat.custom_category_id&&(i.customCategoryIds=[t.stat.custom_category_id]):i.categoryIds=jt(t.player_position),d("open-media",i)}function Ot(){m=new ResizeObserver(t=>{for(const n of t)h.value=n.contentRect.width}),m.observe(E.value)}function W(t){_=new ResizeObserver(n=>{for(const o of n)L.value=o.contentRect.height}),_.observe(t)}function jt(t){return t==="POR"?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]}function At(t,n){n.isSelected=t;const o=f.value.filter(i=>i.isSelected);d("change-selected-players",o)}function Wt(t){d("view-profile",t)}function Z(t){d("delete-from-list",t)}function H(t){d("add-to-list",t)}function Zt(t){d("show-graph",t)}function G(t){if(t.isExpanded){t.isExpanded=!1,B.value=null;return}const n=f.value.find(k=>k.isExpanded);if(n&&(n.isExpanded=!1),n){B.value=t;return}const o=document.querySelectorAll(".details-row");let i=-1;o.forEach((k,w)=>{k.id===`dr-${t.id}`&&(i=w)});const g=o[i];N.value=i,W(g),t.isExpanded=!0,f.value.forEach(k=>{k.isExpanded=!1}),setTimeout(()=>{if(!$.value){const w=document.querySelectorAll(".details-row")[t.index];N.value=t.index,W(w)}t.isExpanded=!$.value},1)}let M=!1,T,z,q=function(t){M=!0,T=t.pageX-a.value.offsetLeft,z=a.value.scrollLeft},U=function(t){M=!0,T=t.pageX-c.value.offsetLeft,z=c.value.scrollLeft},x=function(){M=!1};function J(t){a.value&&(a.value.scrollLeft=t.target.scrollLeft)}function X(t){c.value&&(c.value.scrollLeft=t.target.scrollLeft)}function Ht(){a.value&&(a.value.addEventListener("mousemove",t=>{if(!M)return;const o=t.pageX-a.value.offsetLeft-T,i=z-o;a.value.scrollLeft=i,c.value&&(c.value.scrollLeft=i)}),a.value.addEventListener("mousedown",q,!1),a.value.addEventListener("mouseup",x,!1),a.value.addEventListener("mouseleave",x,!1),a.value.addEventListener("scroll",X)),c.value&&(c.value.addEventListener("mousemove",t=>{if(!M)return;const o=t.pageX-c.value.offsetLeft-T,i=z-o;c.value.scrollLeft=i,a.value&&(a.value.scrollLeft=i)}),c.value.addEventListener("mousedown",U,!1),c.value.addEventListener("mouseup",x,!1),c.value.addEventListener("mouseleave",x,!1),c.value.addEventListener("scroll",J))}function Gt(){if(s.isGeneral)D.value="922px";else if(f.value.length&&f.value[0].stats){const t=f.value[0].stats.length,n=120;D.value=`${(t+1)*n}px`}}return e.watch(()=>[s.players,s.isGeneral],()=>{Gt()},{immediate:!0}),e.onMounted(()=>{Ot(),Ht()}),e.onBeforeUnmount(()=>{m&&m.disconnect(),_&&_.disconnect(),a.value&&(a.value.removeEventListener("mousemove",q,!1),a.value.removeEventListener("mouseup",x,!1),a.value.removeEventListener("mouseleave",x,!1),a.value.removeEventListener("scroll",X)),c.value&&(c.value.removeEventListener("mousemove",U,!1),c.value.removeEventListener("mouseup",x,!1),c.value.removeEventListener("mouseleave",x,!1),c.value.removeEventListener("scroll",J))}),(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"top-scroll-container",style:e.normalizeStyle(j.value)},[Le,e.createElementVNode("div",{ref_key:"topScrollableColumns",ref:c,class:"top-scroll"},[e.createElementVNode("div",{class:"top-scroll-content",style:e.normalizeStyle({width:D.value})},null,4)],512)],4),(e.openBlock(),e.createElementBlock("div",{class:"table",ref_key:"tableSC",ref:E,style:e.normalizeStyle(j.value),key:y.value},[e.createElementVNode("div",Me,[e.createElementVNode("div",$e,[De,e.createElementVNode("div",{role:"button",class:"restore-button",onClick:n[0]||(n[0]=o=>V(null))},Te)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,o=>(e.openBlock(),e.createElementBlock("div",{key:`s-${o.id}`,class:e.normalizeClass(["row static-row",{odd:o.isOdd}])},[e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:`dr-${o.id}`,class:e.normalizeClass(["details-row",{odd:o.isOdd}])},[e.createElementVNode("div",Re,[e.createElementVNode("div",Fe,[e.createElementVNode("div",Ie,[e.createElementVNode("div",null,[e.createTextVNode("Equipo: "),e.createElementVNode("span",Pe,e.toDisplayString(o.team_name),1)]),e.createElementVNode("div",null,[e.createTextVNode("Edad: "),e.createElementVNode("span",ve,e.toDisplayString(o.player_age)+" Años",1)]),e.createElementVNode("div",null,[e.createTextVNode("Nacionalidad: "),e.createElementVNode("span",Oe,e.toDisplayString(o.player_country),1)]),e.createElementVNode("div",null,[e.createTextVNode("Posición: "),e.createElementVNode("span",je,e.toDisplayString(o.position_name),1)])]),e.createElementVNode("div",Ae,[e.createElementVNode("div",null,[e.createTextVNode("Partidos Jugados: "),e.createElementVNode("span",We,e.toDisplayString(o.player_games),1)]),e.createElementVNode("div",null,[e.createTextVNode("Minutos Jugados: "),e.createElementVNode("span",Ze,e.toDisplayString(o.player_min),1)])])]),e.createElementVNode("div",{class:"details-row__buttons",style:e.normalizeStyle(I.value?"margin-left: 0; gap: 8px;":"")},[l.isGraphButtonVisible?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"button",onClick:i=>Zt(o)},Ge,8,He)):e.createCommentVNode("",!0),l.isTableFromList?(e.openBlock(),e.createElementBlock("div",{key:1,role:"button",class:"button",onClick:i=>Z(o)},Ue,8,qe)):l.isAddToListButtonVisible?(e.openBlock(),e.createElementBlock("div",{key:2,role:"button",class:"button",onClick:i=>H(o)},Xe,8,Je)):e.createCommentVNode("",!0),e.createElementVNode("div",{role:"button",class:"button green",onClick:i=>Wt(o)},Qe,8,Ke)],4)])],10,ze),[[e.vShow,o.isExpanded]])]),_:2},1024),l.isEditMode?(e.openBlock(),e.createBlock(e.unref(re),{key:0,fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":o.isSelected,"onUpdate:modelValue":i=>At(i,o)},null,8,["model-value","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ye,[e.createElementVNode("div",et,e.toDisplayString(o.position),1),l.isTableFromList?(e.openBlock(),e.createElementBlock("svg",{key:0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:i=>Z(o)},ot,8,tt)):(e.openBlock(),e.createElementBlock("div",lt,[(e.openBlock(),e.createElementBlock("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:i=>H(o)},nt,8,st))])),e.createElementVNode("div",it,[e.createElementVNode("div",null,[e.createElementVNode("img",{src:o.player_photo,alt:"player photo"},null,8,at)])]),e.createElementVNode("div",rt,e.toDisplayString(o.player_name),1)]),e.createElementVNode("div",ct,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["_arrowExpandIcon_6ak64_1115 _rotate_6ak64_5",{expanded:o.isExpanded}]),width:"12",height:"8",viewBox:"0 0 12 8",fill:"#D9D9D9",xmlns:"http://www.w3.org/2000/svg",onClick:i=>G(o)},mt,10,dt))])],2))),128))]),e.createElementVNode("div",{ref_key:"scrollableColumns",ref:a,class:"table__scrollable-columns"},[l.isGeneral?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",ft,[e.createElementVNode("div",pt,[ht,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[1]||(n[1]=o=>V(C.value[0]))},_t))]),e.createElementVNode("div",gt,[kt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[2]||(n[2]=o=>V(C.value[1]))},ut))]),e.createElementVNode("div",Ct,[Et,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[3]||(n[3]=o=>V(C.value[2]))},yt))]),wt,e.createElementVNode("div",bt,[Vt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[4]||(n[4]=o=>V(C.value[3]))},xt))]),e.createElementVNode("div",St,[Nt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[5]||(n[5]=o=>V(C.value[4]))},Bt))]),e.createElementVNode("div",Lt,[Mt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[6]||(n[6]=o=>V(C.value[5]))},$t))]),Dt]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,o=>(e.openBlock(),e.createElementBlock("div",{key:`i-${o.id}`,class:"row scrollable-row"},[e.createElementVNode("div",{class:e.normalizeClass(["row team-info",{odd:o.isOdd}])},[e.createElementVNode("div",Tt,[e.createElementVNode("img",{src:o.team_logo,alt:"team logo"},null,8,zt)]),e.createElementVNode("div",Rt,e.toDisplayString(o.team_abrev),1)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_position),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_age),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},[e.createElementVNode("img",{src:o.player_country_flag,alt:"player country flag",class:"country-flag"},null,8,Ft)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_games),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_min),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.league_name),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},[e.createVNode(e.unref(Ce),{icon:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png","icon-size":"19px","icon-position":"left",width:"98px",height:"30px","border-radius":"30px","border-width":"1","background-color":"#ffffff1a","font-family":"Poppins-Regular","border-color":"#55636e","text-value":"Ver videos","font-size":"10px",onClick:i=>A(o)},null,8,["onClick"])],2)]))),128))],64)):(e.openBlock(),e.createBlock(Be,{key:1,ref_key:"scrollColumns",ref:b,"available-players":p.value,"is-edit-mode":l.isEditMode,onOpenMedia:A,onClickParameters:vt,onSort:V},null,8,["available-players","is-edit-mode"]))],512)],4))],64))}},[["__scopeId","data-v-04e96d04"]]);S.GSCTableScrollable=It,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golstats/gsc-table-scrollable",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"