@golstats/gsc-landing 1.0.189 → 1.0.190

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.
@@ -29,12 +29,12 @@
29
29
  * Vue 3 Carousel 0.3.4
30
30
  * (c) 2024
31
31
  * @license MIT
32
- */const Je={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},th={itemsToShow:{default:Je.itemsToShow,type:Number},itemsToScroll:{default:Je.itemsToScroll,type:Number},wrapAround:{default:Je.wrapAround,type:Boolean},throttle:{default:Je.throttle,type:Number},snapAlign:{default:Je.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:Je.transition,type:Number},breakpoints:{default:Je.breakpoints,type:Object},autoplay:{default:Je.autoplay,type:Number},pauseAutoplayOnHover:{default:Je.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Je.mouseDrag,type:Boolean},touchDrag:{default:Je.touchDrag,type:Boolean},dir:{default:Je.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:Je.i18n,type:Object},settings:{default(){return{}},type:Object}};function YA({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function JA({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function to({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function XA({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){case"center":case"center-odd":o-=(r-1)/2;break;case"center-even":o-=(r-2)/2;break;case"end":o-=r-1;break}return i?o:to({val:o,max:t-r,min:0})}function sh(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...sh(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function so({val:s,max:e,min:t=0}){return s>e?so({val:s-(e+1),max:e,min:t}):s<t?so({val:s+(e+1),max:e,min:t}):s}function ZA(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function QA(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function eL(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var tL=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},Je))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},eL(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),sL=a.defineComponent({name:"Carousel",props:th,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},Je));let u=Object.assign({},Je),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=QA(()=>{C(),R(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=YA({config:c,slidesCount:d.value}),y.value=JA({config:c,slidesCount:d.value}),c.wrapAround||(f.value=to({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=ZA(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:to({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=so({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>XA({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(th).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=sh(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(tL)])}}}),no;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(no||(no={}));const nL={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function aL(s){return s in no}const ao=s=>{const e=a.inject("config",a.reactive(Object.assign({},Je))),t=String(s.name),n=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!aL(t))return;const i=nL[t],r=a.h("path",{d:i}),o=e.i18n[n]||s.title||t,l=a.h("title",o);return a.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":o},[l,r])};ao.props={name:String,title:String};const iL=(s,{slots:e,attrs:t})=>{const{next:n,prev:i}=e||{},r=a.inject("config",a.reactive(Object.assign({},Je))),o=a.inject("maxSlide",a.ref(1)),l=a.inject("minSlide",a.ref(1)),d=a.inject("currentSlide",a.ref(1)),c=a.inject("nav",{}),{dir:u,wrapAround:m,i18n:f}=r,p=u==="rtl",h=a.h("button",{type:"button",class:["carousel__prev",!m&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||a.h(ao,{name:p?"arrowRight":"arrowLeft"})),g=a.h("button",{type:"button",class:["carousel__next",!m&&d.value>=o.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(n==null?void 0:n())||a.h(ao,{name:p?"arrowLeft":"arrowRight"}));return[h,g]};var rL=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},Je))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=a.computed(()=>s.index===n.value),l=a.computed(()=>s.index===n.value-1),d=a.computed(()=>s.index===n.value+1),c=a.computed(()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m});return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":o.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":r.value},"aria-hidden":!c.value},(u=e.default)===null||u===void 0?void 0:u.call(e,{isActive:o.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:r.value,isVisible:c.value}))}}});const nh=s=>(a.pushScopeId("data-v-f97685f3"),s=s(),a.popScopeId(),s),oL={key:1,class:"match-day__live"},lL=[nh(()=>a.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),nh(()=>a.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1))],cL=et({__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,n=a.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=a.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),r=a.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function o(l){e("click-match-day",l)}return(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day",style:a.normalizeStyle({...n.value}),onClick:d[0]||(d[0]=c=>o(s.matchDay))},[a.createElementVNode("div",{class:"match-day__value",style:a.normalizeStyle(i.value)},a.toDisplayString(s.matchDay.valueText),5),!Number.isNaN(s.matchDay.value)&&!s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",{key:0,class:"match-day__text",style:a.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",r.value])},a.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5)):s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",oL,lL)):a.createCommentVNode("",!0)],4))}},[["__scopeId","data-v-f97685f3"]]),ah=et({__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},disableMatchdays:{type:Boolean,default:!1},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:[Number,String],default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;a.useCssVars(u=>({"179f4a74":o.value,"17a178f4":l.value}));const n=a.ref(null),i=a.ref(-1),r=a.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),o=a.computed(()=>n.value.data.currentSlide.value===0?"none":"inline"),l=a.computed(()=>n.value.data.currentSlide.value===n.value.data.maxSlide.value?"none":"inline"),d=a.ref({});a.watch(()=>t.closestMatchDay,u=>{if(u){const m=t.matchDays.find(f=>f.key===u);c(m||t.matchDays[0],!0)}}),a.watch(()=>t.matchDays,u=>{if(!t.closestMatchDay&&u&&u.length){const m=u.find(f=>f.key===t.defaultMatchDayKey);i.value=u.findIndex(f=>f.key===t.defaultMatchDayKey),d.value=m||u[0],e("change-match-day",d.value)}},{immediate:!0}),a.watch(()=>t.defaultMatchDayKey,u=>{if(u){let m=-1;const f=t.matchDays.find((p,h)=>p.key===u?(m=h,!0):!1);f&&(d.value=f),m>-1&&n.value&&n.value.slideTo(m)}});function c(u,m=!1){m&&n.value.slideTo(u.index),t.disableMatchdays?u.avaible==!0&&(d.value=u,e("change-match-day",d.value)):(d.value=u,e("change-match-day",d.value))}return(u,m)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day-picker",style:a.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(a.openBlock(),a.createBlock(a.unref(sL),a.mergeProps(r.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:n,key:i.value}),{addons:a.withCtx(()=>[a.createVNode(a.unref(iL))]),default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.matchDays,f=>(a.openBlock(),a.createBlock(a.unref(rL),{key:f.key},{default:a.withCtx(()=>[a.createVNode(cL,a.mergeProps({style:s.disableMatchdays&&!f.avaible?"opacity: 0.6 !important; cursor: default !important;":""},t,{"match-day":f,"match-day-selected":d.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:c}),null,16,["style","match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},[["__scopeId","data-v-d4bf2975"]]),dL=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function ih(){return"https://golstatsimages.blob.core.windows.net/golstats-app/"}function uL(s){return dL[s]}function hL(){let s=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}function io(){let s=window.navigator.userAgent.toLowerCase(),e=/(macintosh|macintel|macppc|mac68k|macos)/i,t=/(win32|win64|windows|wince)/i,n=/(iphone|ipad|ipod)/i,i=null;return e.test(s)?i="macos":n.test(s)?i="ios":t.test(s)?i="windows":/android/.test(s)?i="android":!i&&/linux/.test(s)&&(i="linux"),i}function mL(s){const[e,t]=s.split(","),n=e.split(" ");let i="";for(const r of n)if(i+=` ${r}`,r.length>3)break;return t&&e?`${t.trim().charAt(0)}.${i}`:""}const xs=s=>(a.pushScopeId("data-v-c26e8c06"),s=s(),a.popScopeId(),s),fL={class:"quadrant-matches"},gL={class:"quadrant-matches__header"},pL={class:"quadrant-matches__header__pc"},yL={class:"title-and-switch"},bL={class:"quadrant-matches__title"},wL={key:0,class:"quadrant-matches__header__games-type"},SL=xs(()=>a.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),_L={class:"quadrant-matches__header__games-type__logo"},kL=["src"],EL={class:"quadrant-matches__header__games-type__switch"},TL={class:"quadrant-matches__header__games-type__logo"},CL=["src"],xL={key:0,class:"quadrant-matches__header__my-team"},AL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],LL={key:1,class:"quadrant-matches__header__my-team"},IL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],BL={class:"quadrant-matches__header__mobile"},RL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],vL={key:0,class:"quadrant-matches__body"},NL={class:"quadrant-matches__body",style:{"column-gap":"16px"}},DL={class:"quadrant-matches__body matches"},PL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},OL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},FL=et({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},currentSeason:{type:Number,default:0},isFull:{type:Boolean,default:!1},comingMatches:{type:Array,default:()=>[]},data:{type:Object,default:()=>{}},previousMatches:{type:Array,default:()=>[]},componentWidth:{type:[Number,String],default:768},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},emits:["change-match-day","change-is-league-selected","click-live"],setup(s,{emit:e}){const t=s,n=a.ref(!0),i=a.toRef(t,"componentWidth"),r=a.computed(()=>i.value<768);a.watch(n,c=>{e("change-is-league-selected",c)}),a.watch(()=>t.currentSeason,c=>{c&&(n.value=!0)}),a.watch(()=>t.currentTournament,c=>{c&&(n.value=!c.id===t.user.tournament,c.id===t.user.tournament&&setTimeout(()=>{n.value=!0,e("change-is-league-selected",!0)},300))});function o(c){e("change-match-day",c)}function l(c){n.value=c}function d(){n.value=!0,setTimeout(()=>{e("click-live")},500)}return(c,u)=>(a.openBlock(),a.createElementBlock("section",fL,[a.createElementVNode("div",gL,[a.createElementVNode("div",pL,[a.createElementVNode("div",yL,[a.createElementVNode("h2",bL,a.toDisplayString((s.isFull,"Partidos")),1)]),s.isFull?s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",LL,[a.createElementVNode("div",{role:"button",class:"btn-live",onClick:d},IL)])):a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",wL,[SL,a.createElementVNode("div",_L,[s.user&&s.user.team?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.user.team}.png`},null,8,kL)):a.createCommentVNode("",!0)]),a.createElementVNode("div",EL,[a.createVNode(qA,{"model-value":n.value,"onUpdate:modelValue":l},null,8,["model-value"])]),a.createElementVNode("div",TL,[s.currentTournament&&s.currentTournament.id?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/todoelfut/${s.currentTournament.id}.png`},null,8,CL)):a.createCommentVNode("",!0)]),s.currentTournament?(a.openBlock(),a.createElementBlock("div",xL,[a.createElementVNode("div",null,a.toDisplayString(s.currentTournament.name),1),s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},AL)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]))]),a.createElementVNode("div",BL,[s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},RL)):a.createCommentVNode("",!0)])]),(s.isFull||n.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(a.openBlock(),a.createBlock(ah,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!r.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:o},null,8,["match-days","is-landing-mode","default-match-day-key"])):a.createCommentVNode("",!0),!s.isFull&&!n.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",NL,[a.createVNode(Gs,{small:"",data:s.data.data.prematch,onClickMatch:u[3]||(u[3]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[4]||(u[4]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[5]||(u[5]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])]),_:1})):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",vL,[a.createVNode(Gs,{data:s.data.data.prematch,onClickMatch:u[0]||(u[0]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[1]||(u[1]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[2]||(u[2]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])):a.createCommentVNode("",!0)],64))],64)):s.data?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[s.data.length>1?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",DL,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.data,(m,f)=>(a.openBlock(),a.createBlock(KA,{key:f,game:m,onClickMatch:p=>c.$emit("clickMatch",m)},null,8,["game","onClickMatch"]))),128))])]),_:1})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",OL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[8]||(u[8]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[9]||(u[9]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",PL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[6]||(u[6]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[7]||(u[7]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64))],64))],64)):a.createCommentVNode("",!0)]))}},[["__scopeId","data-v-c26e8c06"]]),ML={__name:"gsc-games",props:{componentWidth:{type:[Number,String],default:768},isplayer:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentSeason:{type:Number,default:0},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(a.openBlock(),a.createElementBlock("main",null,[a.createVNode(FL,{data:s.data,"component-width":s.componentWidth,"is-full":s.isFull,"has-team":!s.isplayer,"tournament-schedule-keys":s.tournamentScheduleKeys,"default-match-day-key":s.defaultMatchDayKey,user:s.user,"current-season":s.currentSeason,"current-tournament":s.currentTournament,"is-live-button-visible":s.isLiveButtonVisible,onClickLive:t[0]||(t[0]=n=>e.$emit("click-live")),onClickCalendar:t[1]||(t[1]=n=>e.$emit("clickCalendar")),onClickMatch:t[2]||(t[2]=n=>e.$emit("clickMatch",n)),onChangeMatchDay:t[3]||(t[3]=n=>e.$emit("change-match-day",n)),onChangeIsLeagueSelected:t[4]||(t[4]=n=>e.$emit("change-is-league-selected",n))},null,8,["data","component-width","is-full","has-team","tournament-schedule-keys","default-match-day-key","user","current-season","current-tournament","is-live-button-visible"])]))}},VL="_toniKroos_ov00i_18",$L="_centralMidfielder_ov00i_28",UL="_icnPlayIcon_ov00i_38",zL="_verVideos_ov00i_45",GL="_btnVideosOptions_ov00i_55",jL="_btnVideosOptionsTeams_ov00i_70",HL="_info_ov00i_90",WL="_goalUnlock_ov00i_102",KL="_teamsAmerica_ov00i_115",qL="_imageIcon_ov00i_125",YL="_imageIconTeam_ov00i_136",JL="_playerTops_ov00i_148",XL={toniKroos:VL,centralMidfielder:$L,icnPlayIcon:UL,verVideos:zL,btnVideosOptions:GL,btnVideosOptionsTeams:jL,info:HL,goalUnlock:WL,teamsAmerica:KL,imageIcon:qL,imageIconTeam:YL,playerTops:JL},ZL=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},QL={props:{height:{type:String,default:"194px"},background:{type:String,default:"#122735"},borderRadius:{type:String,default:"4px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#ffffff"},namePlayerFont:{type:String,default:"Montserrat-SemiBold"},namePlayerFontColor:{type:String,default:"#ffffff"},namePlayerFontSize:{type:String,default:"18px"},namePlayerFontStyle:{type:String,default:"Normal"},namePositionFont:{type:String,default:"Poppins-Regular"},namePositionFontColor:{type:String,default:"#8ea2ab"},namePositionFontSize:{type:String,default:"14px"},namePositionFontStyle:{type:String,default:"Normal"},totalFont:{type:String,default:"Poppins-Regular"},totalFontColor:{type:String,default:"#ffffff"},totalFontSize:{type:String,default:"8px"},totalFontStyle:{type:String,default:"Normal"},totalHeight:{type:String,default:"22px"},totalWidth:{type:String,default:"80px"},totalBorderRadius:{type:String,default:"64px"},totalBorderWidth:{type:Number,default:1},totalBorderColor:{type:String,default:"#cbee6b"},iconPlay:{type:String,default:"/icnplay1.svg"},teamWidth:{type:String,default:"34px"},teamPositionLeft:{type:String,default:"12px"},teamPositionTop:{type:String,default:""},playerOrTeamPhotoWidth:{type:String,default:"99px"},numbertopLeft:{type:String,default:"-8px"},numbertopBottom:{type:String,default:"-25px"},numbertopTop:{type:String},numbertopRight:{type:String},numbertopColor:{type:String,default:"#ffffff"},numbertopFontSize:{type:String,default:"98px"},numbertopOpacity:{type:String,default:"0.18"},numberFontFamily:{type:String,default:"Montserrat-SemiBold"},showShieldTeam:{type:Boolean,default:!0},showIconVideo:{type:Boolean,default:!0},showPositionPlayer:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},freemiumActive:{type:Boolean,default:!1},isPlayer:{type:Boolean,default:!0},data:{type:Object,default:()=>{}}},computed:{customMosaic(){return{height:this.height,background:this.background,borderRadius:`${this.borderRadius} !important`,border:`solid ${this.borderWidth}px ${this.borderColor}`}},customNamePlayer(){return{fontFamily:this.namePlayerFont,fontSize:this.namePlayerFontSize,color:this.namePlayerFontColor,fontStyle:this.namePlayerFontStyle}},customNamePosition(){return{fontFamily:this.namePositionFont,fontSize:this.namePositionFontSize,color:this.namePositionFontColor,fontStyle:this.namePositionFontStyle}},customTotal(){return{fontFamily:this.totalFont,fontSize:this.totalFontSize,color:this.totalFontColor,fontStyle:this.totalFontStyle}},customTotalCont(){return{MinHeight:this.totalHeight,width:this.totalWidth,borderRadius:`${this.totalBorderRadius} !important`,border:`solid ${this.totalBorderWidth}px ${this.totalBorderColor}`}},customShieldTeam(){return{width:this.teamWidth,top:this.teamPositionTop,left:this.teamPositionLeft}},customPhotoPlayerOrTeam(){return{width:this.playerOrTeamPhotoWidth}},customNumberTop(){return{fontSize:this.numbertopFontSize,color:this.numbertopColor,left:this.numbertopLeft,right:this.numbertopRight,top:this.numbertopTop,bottom:this.numbertopBottom,opacity:this.numbertopOpacity,fontFamily:this.numberFontFamily}}},methods:{onPlayerTopsClick(s){this.activeVideos&&(this.$emit("clickMosaic",s),this.$emit("freemium",this.freemiumActive))},onButtonVideos(s){this.activeVideos&&(this.$emit("openmedia",s),this.$emit("clickvideos",s.id),this.$emit("freemium",this.freemiumActive))}}},e5=["src"],t5=["src"],s5=["src"];function n5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("section",{class:a.normalizeClass(s.$style.playerTops),style:a.normalizeStyle(r.customMosaic),id:"player-mosaico",onClick:e[1]||(e[1]=o=>r.onPlayerTopsClick(t.data.player_id))},[a.createElementVNode("div",{class:a.normalizeClass(s.$style.info)},[a.createElementVNode("h3",{class:a.normalizeClass(s.$style.toniKroos),style:a.normalizeStyle(r.customNamePlayer)},a.toDisplayString(t.data.player_name),7),t.showPositionPlayer?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(s.$style.centralMidfielder),style:a.normalizeStyle(r.customNamePosition)},a.toDisplayString(t.data.player_position),7)):a.createCommentVNode("",!0),a.createElementVNode("button",{class:a.normalizeClass(this.isPlayer?s.$style.btnVideosOptions:s.$style.btnVideosOptionsTeams),style:a.normalizeStyle(r.customTotalCont),id:"button-actions",onClick:e[0]||(e[0]=o=>r.onButtonVideos(t.data))},[t.showIconVideo?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.icnPlayIcon),src:t.iconPlay},null,10,e5)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(s.$style.verVideos),style:a.normalizeStyle(r.customTotal)},a.toDisplayString(t.data.player_stat)+" "+a.toDisplayString(t.data.category),7)],6)],2),a.createElementVNode("b",{style:a.normalizeStyle(r.customNumberTop),class:a.normalizeClass(s.$style.goalUnlock)},a.toDisplayString(t.data.top),7),t.showShieldTeam?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.teamsAmerica),style:a.normalizeStyle(r.customShieldTeam),loading:"lazy",src:t.data.team_logo},null,14,t5)):a.createCommentVNode("",!0),a.createElementVNode("img",{style:a.normalizeStyle(r.customPhotoPlayerOrTeam),class:a.normalizeClass(this.isPlayer?s.$style.imageIcon:s.$style.imageIconTeam),loading:"lazy",src:t.data.player_photo},null,14,s5)],6)}const a5={$style:XL},i5=ZL(QL,[["render",n5],["__cssModules",a5]]),r5=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},rh=()=>{a.useCssVars(s=>({"9d01acb4":s.height,"14e95081":s.borderWidthBtn,"38fec285":s.borderType,34353510:s.borderColor,"20d20dc6":s.borderRadius,17130967:s.width,"4ccb7d36":s.backgroundColor,"5d1e86a2":s.cursorType,ce65d4a2:s.fontSize,fe4ac47a:s.fontStyle,f98e44dc:s.fontFamily,"93b87770":s.marginLeftStat,c7f7beba:s.fontSizeStat}))},oh=ro.setup;ro.setup=oh?(s,e)=>(rh(),oh(s,e)):rh;const o5=s=>(a.pushScopeId("data-v-f3ee6b2b"),s=s(),a.popScopeId(),s),l5=["src"],c5={key:1,class:"text"},d5=["src"],u5={class:"stats"},h5=o5(()=>a.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),m5={class:"numstats"},f5={class:"leyend"};function g5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,l5)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",c5,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,d5)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",u5,[h5,a.createElementVNode("div",m5,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",f5,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const p5=r5(ro,[["render",g5],["__scopeId","data-v-f3ee6b2b"]]);function y5(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const oo={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Light"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(s){try{s==this.textOptionLeft&&(this.OptionDefault=!1),s==this.textOptionRight&&(this.OptionDefault=!0)}catch(e){throw new Error(e)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(s){s.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},lh=()=>{a.useCssVars(s=>({"5d15d746":s.backgroundColor,"0bc50bbe":s.widthCircle,"7ad0df62":s.heightCircle}))},ch=oo.setup;oo.setup=ch?(s,e)=>(lh(),ch(s,e)):lh;const b5={key:0,class:"text-left"},w5=["width","src"],S5=["checked"],_5=["width","src"],k5={key:3,class:"text-right"};function E5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",{class:"gsc-switch-radio",style:a.normalizeStyle(r.customText)},[t.textOptionLeft!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",b5,a.toDisplayString(t.textOptionLeft),1)):a.createCommentVNode("",!0),t.iconA!=""?(a.openBlock(),a.createElementBlock("img",{key:1,width:t.widthIcons,src:t.iconA},null,8,w5)):a.createCommentVNode("",!0),a.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:e[0]||(e[0]=(...o)=>r.handleSwitchChange&&r.handleSwitchChange(...o)),checked:i.OptionDefault},null,40,S5),a.createElementVNode("label",{for:"toggle-btn",style:a.normalizeStyle([r.customStyle,{"--circle-color":t.circleColorSwitch}])},null,4),t.iconB!=""?(a.openBlock(),a.createElementBlock("img",{key:2,width:t.widthIcons,src:t.iconB},null,8,_5)):a.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",k5,a.toDisplayString(t.textOptionRight),1)):a.createCommentVNode("",!0)],4)}const lo={components:{GSCSlider:un,GSCMosaicthebest:i5,GscSwitchComponent:vr,GSCButton:p5,GSCRadioToggle:et(oo,[["render",E5],["__scopeId","data-v-f9c67ce5"]])},setup(){const s=a.ref("myDivRef"),{elementSize:e}=y5(s);return{myDivRef:s,elementSize:e}},props:{backgroundColor:{type:String,default:"#0D1D29"},tournamentSelected:{type:Object,default:()=>({id:0})},showSwitch:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},showSelect:{type:Boolean,default:!0},league:{type:Number,default:0},showMore:{type:Boolean,default:!0},fontFamily:{type:String,default:"Poppins-Semibold"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"24px"},marginMosaic:{type:String,default:"24px"},tournament:{type:Number,default:1},season:{type:Number,default:1772},teamId:{type:Number,default:0}},watch:{tournamentSelected:{handler(s){s.is_female==1?this.optionSelected="Jugadoras":this.optionSelected="Jugadores"},immediate:!0},season:{async handler(s){const e=this.categorySelected!==null?this.categorySelected:1;this.showSwitch||(this.filterSelected=1),await this.getCategoryStats(s,this.filterSelected,e)},immediate:!0}},data:()=>({url:"https://kgfaxdv624.execute-api.us-east-2.amazonaws.com/prod/tops/seasons/",showTops:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",categoriesDefault:["Goles","Pases acertados","Balones recuperados en disputa","Asistencias","Participaciones en gol","Tiros a gol","Tiros a gol que llegaron a la portería","Cabeceos en área rival","Cabeceos en área propia","Centros","Centros acertados","1vs1 exitosos ofensivos","1vs1 exitosos ofensivos que terminaron en gol","1vs1 defensivos exitoso","Rechaces","Balones ganados en área propia","Balones ganados en área rival","Faltas cometidas","Faltas recibidas","Tarjetas amarillas","Tarjetas rojas","Atajadas","Tiros de Esquina"],categories:[{id:1,name:"Goles"},{id:2,name:"Pases acertados"},{id:3,name:"Balones recuperados en disputa"},{id:4,name:"Asistencias"},{id:5,name:"Participaciones en gol"},{id:6,name:"Tiros a gol"},{id:7,name:"Tiros a gol que llegaron a la portería"},{id:8,name:"Cabeceos en área rival"},{id:9,name:"Cabeceos en área propia"},{id:10,name:"Centros"},{id:11,name:"Centros acertados"},{id:12,name:"1vs1 exitosos ofensivos"},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol"},{id:14,name:"1vs1 defensivos exitoso"},{id:15,name:"Rechaces"},{id:16,name:"Balones ganados en área propia"},{id:17,name:"Balones ganados en área rival"},{id:18,name:"Faltas cometidas"},{id:19,name:"Faltas recibidas"},{id:20,name:"Tarjetas amarillas"},{id:21,name:"Tarjetas rojas"},{id:22,name:"Atajadas"},{id:23,name:"Tiros de Esquina"}],categoryData:[],categorySelected:null,filterSelected:1,isTeam:!1,categoryName:"Goles",optionSelected:"Jugadores",positions:[{name:"Portero"},{name:"Defensa central"},{name:"Lateral por izquierda"},{name:"Lateral por derecha"},{name:"Volante por izquierda"},{name:"Volante por derecha"},{name:"Volante defensivo"},{name:"Volante ofensivo"},{name:"Delantero"},{name:"Desconocida"}]}),async created(){await this.getCategoryStats(this.season,this.league)},computed:{topData(){var s=[];return this.categorySelected!=null&&this.categoryData[this.categorySelected]!==void 0&&(this.isTeam?s=this.categoryData[this.categorySelected].top__teams:s=this.categoryData[this.categorySelected].top__players),s}},methods:{formatPlayerName(s){var n;const e=s.split(",");let t="";if(e[1]&&(t=`${e[1].trim()[0]}.`,e[0])){const i=(n=e[0])==null?void 0:n.trim().split(" ");for(let r of i)if(t=`${t} ${r.trim()}`,r.trim().length>3)break}return t},translateTopCategories(s){return{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]}[s]||[]},onOpenMedia(s){const e=this.translateTopCategories(this.categorySelected),t=2,n=3;let i=[],r=0,o=0;this.isTeam?(r=s.player_id,o=n):(i=[s.player_id],o=t);const l={seasonId:this.season,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:o,gameIds:null,playerIds:i,goalkeeperIds:[],categoryIds:e,teamId:r,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s.category},objectPlaySync:null};this.$emit("openmedia",l)},async ChangeRadio(s){const e=this.categorySelected!==null?this.categorySelected:1;s==="Mi equipo"&&(this.filterSelected=0,await this.getCategoryStats(this.season,0,e)),s==="Liga MX"&&(this.filterSelected=1,await this.getCategoryStats(this.season,1,e))},clickMosaic(s){this.$emit("boxinput",s)},clickMore(){this.$emit("more")},async changeType(s){const e=this.categorySelected!==null?this.categorySelected:1;this.optionSelected=s,s=="Equipos"?(await this.getCategoryStats(this.season,1,e),this.isTeam=!0):this.isTeam=!1},compareObjectsMinutes(s,e){return s.total>e.total?-1:s.total<e.total?1:s.minutes<e.minutes?-1:s.minutes>e.minutes?1:0},changeCategory(s){this.categoryName=s;const e=this.categories.find(t=>t.name===s);this.categorySelected=e.id},async getCategoryStats(s,e,t=0){try{let r={},o={},l=[];const d=Le.create({headers:{Authorization:`${this.token}`}});var n={};if(e==0&&(n=await d.get(this.url+this.season+"/teams/"+this.teamId)),e==1&&(n=await d.get(this.url+s)),n.data.players.length==0?this.showTops=!1:this.showTops=!0,n&&n.data){n.data.teams.map(c=>{r[c[0]]={},r[c[0]].id=c[0],r[c[0]].name=c[1],r[c[0]].img=c[3],r[c[0]].abrv=c[2],r[c[0]].logo=c[3]}),n.data.players.map(c=>{o[c[0]]={},o[c[0]].id=c[0],o[c[0]].name=c[1],o[c[0]].img=c[2],o[c[0]].position=c[6],o[c[0]].minutes=c[13],o[c[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+c[10][0].team_id+".png"});var i=1;n.data.tops.map(c=>{l[c.category?c.category:i]={};var u={},m={};c.teams.map(h=>{u[h[0]]={},u[h[0]].total=h[1],u[h[0]].id=r[h[0]].id,u[h[0]].name=r[h[0]].name,u[h[0]].img="https://golstatsimages.blob.core.windows.net/teams-150/"+h[0]+".png",u[h[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+h[0]+".png"}),c.players.map(h=>{m[h[0]]={},m[h[0]].minutes=o[h[0]].minutes,m[h[0]].total=h[1],m[h[0]].name=o[h[0]].name,m[h[0]].img=o[h[0]].img.replace("players-profile/","players-profile/"),m[h[0]].id=o[h[0]].id,m[h[0]].position=this.tournamentSelected.is_female==1?this.positions[o[h[0]].position-1].name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):this.positions[o[h[0]].position-1].name,m[h[0]].logo=o[h[0]].logo});var f=[],p=[];for(const h in u)f.push(u[h]);for(const h in m)p.push(m[h]);f.sort((h,g)=>h.total<g.total?1:-1),p=p.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=p,l[c.category?c.category:i].top__teams=f,i++})}else this.showTops=!1;t===0?this.categorySelected=1:this.categorySelected=t,this.categoryData=l}catch(r){return Promise.reject(r)}}}},dh=()=>{a.useCssVars(s=>({"755bc1d4":s.backgroundColor,"7748a398":s.fontFamily,"9f60b25e":s.fontSize,"58c64293":s.fontColor,24655139:s.marginMosaic}))},uh=lo.setup;lo.setup=uh?(s,e)=>(dh(),uh(s,e)):dh;const T5={key:0,class:"gsc-best",ref:"myDivRef"},C5={class:"gsc-best__line-bar-tools"},x5={key:0,class:"gsc-best__line-bar-tools__title"},A5={key:1,class:"gsc-best__line-bar-tools__titlefull"},L5={class:"unit-items"},I5={key:2,class:"gsc-best__line-bar-tools__tools"},B5={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},R5={key:1,class:"gsc-best__line-bar-tools__tools__btn"},v5={key:0,class:"gsc-best__line-bar-tools-movil"},N5={class:"gsc-best__line-bar-tools-movil__tabs"},D5={class:"gsc-best__categories"},P5={class:"gsc-best__players"};function O5(s,e,t,n,i,r){const o=a.resolveComponent("GSCRadioToggle"),l=a.resolveComponent("GSCButton"),d=a.resolveComponent("GscSwitchComponent"),c=a.resolveComponent("GSCMosaicthebest"),u=a.resolveComponent("GSCSlider");return s.showTops?(a.openBlock(),a.createElementBlock("div",T5,[a.createElementVNode("div",C5,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",x5,[a.createElementVNode("span",null,[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))]),s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createElementBlock("div",A5,[a.createElementVNode("span",{style:a.normalizeStyle(n.elementSize.width<=380?"font-size: 15px; margin-top:0px; width:60px;":"")},[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))],4),a.createElementVNode("span",L5,[s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","hidden-labels":!0,"value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createBlock(l,{key:1,style:{"margin-top":"4px"},width:"75px","text-value":"Ver más","font-color":n.elementSize.width<=680?"rgba(255,255,255, 0.7)":"#fff","font-size":n.elementSize.width<=680?"11px":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["font-color","font-size","onClick"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",I5,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",B5,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.showMore?(a.openBlock(),a.createElementBlock("div",R5,[a.createVNode(l,{width:"75px","text-value":"Ver más","font-size":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["onClick"]),a.createVNode(l,{width:"10px","text-value":"→","font-size":"14px","font-color":"#cbee6b",onClick:r.clickMore},null,8,["onClick"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),n.elementSize.width<=900&&t.showSelect?(a.openBlock(),a.createElementBlock("div",v5,[a.createElementVNode("div",N5,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"10px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("div",D5,[a.createVNode(d,{type:2,background:t.backgroundColor,"arrows-background":t.backgroundColor,"background-option-active":t.backgroundColor,arrow:!0,"font-family":"Poppins-Light",buttons:s.categoriesDefault,height:"40px","selected-option":"Goles","font-size":n.elementSize.width<=900?"12px":"14px",width:"max-content",onInput:r.changeCategory,pxScroll:200,scrollColor:"none",arrowsScrollHide:!1,arrowsMargin:0,borderWidth:"2px"},null,8,["background","arrows-background","background-option-active","buttons","font-size","onInput"])]),a.createElementVNode("div",P5,[a.createVNode(u,{pxScroll:198,scrollColor:"none","background-color":t.backgroundColor,arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.topData,(m,f)=>(a.openBlock(),a.createElementBlock("div",{key:f,class:a.normalizeClass(["gsc-best__players__item",f==0?"margin-none":""])},[a.createVNode(c,{data:{player_id:m.id,player_name:this.isTeam?m.name:r.formatPlayerName(m.name),player_position:m.position,player_stat:m.total,category:"Total",top:f<9?"0"+(f+1):f+1,team_logo:m.logo,player_photo:m.img},"show-shield-team":!0,"active-videos":!!t.activeVideos,"show-icon-video":!!t.activeVideos,onClickMosaic:r.clickMosaic,onOpenmedia:r.onOpenMedia,namePlayerFontSize:"13px",namePositionFontSize:"10px",numbertopLeft:"-15px",numberFontFamily:"Oswald-SemiBold",totalFontSize:"12px",totalFont:"Poppins-Light!important",totalHeight:"21px","is-player":!this.isTeam},null,8,["data","active-videos","show-icon-video","onClickMosaic","onOpenmedia","is-player"])],2))),128))]),_:1},8,["background-color"])])],512)):a.createCommentVNode("",!0)}const F5=et(lo,[["render",O5],["__scopeId","data-v-824ba31b"]]);/**
32
+ */const Je={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},th={itemsToShow:{default:Je.itemsToShow,type:Number},itemsToScroll:{default:Je.itemsToScroll,type:Number},wrapAround:{default:Je.wrapAround,type:Boolean},throttle:{default:Je.throttle,type:Number},snapAlign:{default:Je.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:Je.transition,type:Number},breakpoints:{default:Je.breakpoints,type:Object},autoplay:{default:Je.autoplay,type:Number},pauseAutoplayOnHover:{default:Je.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Je.mouseDrag,type:Boolean},touchDrag:{default:Je.touchDrag,type:Boolean},dir:{default:Je.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:Je.i18n,type:Object},settings:{default(){return{}},type:Object}};function YA({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function JA({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function to({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function XA({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){case"center":case"center-odd":o-=(r-1)/2;break;case"center-even":o-=(r-2)/2;break;case"end":o-=r-1;break}return i?o:to({val:o,max:t-r,min:0})}function sh(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...sh(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function so({val:s,max:e,min:t=0}){return s>e?so({val:s-(e+1),max:e,min:t}):s<t?so({val:s+(e+1),max:e,min:t}):s}function ZA(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function QA(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function eL(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var tL=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},Je))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},eL(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),sL=a.defineComponent({name:"Carousel",props:th,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},Je));let u=Object.assign({},Je),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=QA(()=>{C(),R(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=YA({config:c,slidesCount:d.value}),y.value=JA({config:c,slidesCount:d.value}),c.wrapAround||(f.value=to({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=ZA(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:to({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=so({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>XA({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(th).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=sh(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(tL)])}}}),no;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(no||(no={}));const nL={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function aL(s){return s in no}const ao=s=>{const e=a.inject("config",a.reactive(Object.assign({},Je))),t=String(s.name),n=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!aL(t))return;const i=nL[t],r=a.h("path",{d:i}),o=e.i18n[n]||s.title||t,l=a.h("title",o);return a.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":o},[l,r])};ao.props={name:String,title:String};const iL=(s,{slots:e,attrs:t})=>{const{next:n,prev:i}=e||{},r=a.inject("config",a.reactive(Object.assign({},Je))),o=a.inject("maxSlide",a.ref(1)),l=a.inject("minSlide",a.ref(1)),d=a.inject("currentSlide",a.ref(1)),c=a.inject("nav",{}),{dir:u,wrapAround:m,i18n:f}=r,p=u==="rtl",h=a.h("button",{type:"button",class:["carousel__prev",!m&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||a.h(ao,{name:p?"arrowRight":"arrowLeft"})),g=a.h("button",{type:"button",class:["carousel__next",!m&&d.value>=o.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(n==null?void 0:n())||a.h(ao,{name:p?"arrowLeft":"arrowRight"}));return[h,g]};var rL=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},Je))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=a.computed(()=>s.index===n.value),l=a.computed(()=>s.index===n.value-1),d=a.computed(()=>s.index===n.value+1),c=a.computed(()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m});return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":o.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":r.value},"aria-hidden":!c.value},(u=e.default)===null||u===void 0?void 0:u.call(e,{isActive:o.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:r.value,isVisible:c.value}))}}});const nh=s=>(a.pushScopeId("data-v-f97685f3"),s=s(),a.popScopeId(),s),oL={key:1,class:"match-day__live"},lL=[nh(()=>a.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),nh(()=>a.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1))],cL=et({__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,n=a.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=a.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),r=a.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function o(l){e("click-match-day",l)}return(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day",style:a.normalizeStyle({...n.value}),onClick:d[0]||(d[0]=c=>o(s.matchDay))},[a.createElementVNode("div",{class:"match-day__value",style:a.normalizeStyle(i.value)},a.toDisplayString(s.matchDay.valueText),5),!Number.isNaN(s.matchDay.value)&&!s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",{key:0,class:"match-day__text",style:a.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",r.value])},a.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5)):s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",oL,lL)):a.createCommentVNode("",!0)],4))}},[["__scopeId","data-v-f97685f3"]]),ah=et({__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},disableMatchdays:{type:Boolean,default:!1},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:[Number,String],default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;a.useCssVars(u=>({"179f4a74":o.value,"17a178f4":l.value}));const n=a.ref(null),i=a.ref(-1),r=a.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),o=a.computed(()=>n.value.data.currentSlide.value===0?"none":"inline"),l=a.computed(()=>n.value.data.currentSlide.value===n.value.data.maxSlide.value?"none":"inline"),d=a.ref({});a.watch(()=>t.closestMatchDay,u=>{if(u){const m=t.matchDays.find(f=>f.key===u);c(m||t.matchDays[0],!0)}}),a.watch(()=>t.matchDays,u=>{if(!t.closestMatchDay&&u&&u.length){const m=u.find(f=>f.key===t.defaultMatchDayKey);i.value=u.findIndex(f=>f.key===t.defaultMatchDayKey),d.value=m||u[0],e("change-match-day",d.value)}},{immediate:!0}),a.watch(()=>t.defaultMatchDayKey,u=>{if(u){let m=-1;const f=t.matchDays.find((p,h)=>p.key===u?(m=h,!0):!1);f&&(d.value=f),m>-1&&n.value&&n.value.slideTo(m)}});function c(u,m=!1){m&&n.value.slideTo(u.index),t.disableMatchdays?u.avaible==!0&&(d.value=u,e("change-match-day",d.value)):(d.value=u,e("change-match-day",d.value))}return(u,m)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day-picker",style:a.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(a.openBlock(),a.createBlock(a.unref(sL),a.mergeProps(r.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:n,key:i.value}),{addons:a.withCtx(()=>[a.createVNode(a.unref(iL))]),default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.matchDays,f=>(a.openBlock(),a.createBlock(a.unref(rL),{key:f.key},{default:a.withCtx(()=>[a.createVNode(cL,a.mergeProps({style:s.disableMatchdays&&!f.avaible?"opacity: 0.6 !important; cursor: default !important;":""},t,{"match-day":f,"match-day-selected":d.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:c}),null,16,["style","match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},[["__scopeId","data-v-d4bf2975"]]),dL=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function ih(){return"https://golstatsimages.blob.core.windows.net/golstats-app/"}function uL(s){return dL[s]}function hL(){let s=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}function io(){let s=window.navigator.userAgent.toLowerCase(),e=/(macintosh|macintel|macppc|mac68k|macos)/i,t=/(win32|win64|windows|wince)/i,n=/(iphone|ipad|ipod)/i,i=null;return e.test(s)?i="macos":n.test(s)?i="ios":t.test(s)?i="windows":/android/.test(s)?i="android":!i&&/linux/.test(s)&&(i="linux"),i}function mL(s){const[e,t]=s.split(","),n=e.split(" ");let i="";for(const r of n)if(i+=` ${r}`,r.length>3)break;return t&&e?`${t.trim().charAt(0)}.${i}`:""}const xs=s=>(a.pushScopeId("data-v-c26e8c06"),s=s(),a.popScopeId(),s),fL={class:"quadrant-matches"},gL={class:"quadrant-matches__header"},pL={class:"quadrant-matches__header__pc"},yL={class:"title-and-switch"},bL={class:"quadrant-matches__title"},wL={key:0,class:"quadrant-matches__header__games-type"},SL=xs(()=>a.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),_L={class:"quadrant-matches__header__games-type__logo"},kL=["src"],EL={class:"quadrant-matches__header__games-type__switch"},TL={class:"quadrant-matches__header__games-type__logo"},CL=["src"],xL={key:0,class:"quadrant-matches__header__my-team"},AL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],LL={key:1,class:"quadrant-matches__header__my-team"},IL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],BL={class:"quadrant-matches__header__mobile"},RL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],vL={key:0,class:"quadrant-matches__body"},NL={class:"quadrant-matches__body",style:{"column-gap":"16px"}},DL={class:"quadrant-matches__body matches"},PL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},OL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},FL=et({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},currentSeason:{type:Number,default:0},isFull:{type:Boolean,default:!1},comingMatches:{type:Array,default:()=>[]},data:{type:Object,default:()=>{}},previousMatches:{type:Array,default:()=>[]},componentWidth:{type:[Number,String],default:768},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},emits:["change-match-day","change-is-league-selected","click-live"],setup(s,{emit:e}){const t=s,n=a.ref(!0),i=a.toRef(t,"componentWidth"),r=a.computed(()=>i.value<768);a.watch(n,c=>{e("change-is-league-selected",c)}),a.watch(()=>t.currentSeason,c=>{c&&(n.value=!0)}),a.watch(()=>t.currentTournament,c=>{c&&(n.value=!c.id===t.user.tournament,c.id===t.user.tournament&&setTimeout(()=>{n.value=!0,e("change-is-league-selected",!0)},300))});function o(c){e("change-match-day",c)}function l(c){n.value=c}function d(){n.value=!0,setTimeout(()=>{e("click-live")},500)}return(c,u)=>(a.openBlock(),a.createElementBlock("section",fL,[a.createElementVNode("div",gL,[a.createElementVNode("div",pL,[a.createElementVNode("div",yL,[a.createElementVNode("h2",bL,a.toDisplayString((s.isFull,"Partidos")),1)]),s.isFull?s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",LL,[a.createElementVNode("div",{role:"button",class:"btn-live",onClick:d},IL)])):a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",wL,[SL,a.createElementVNode("div",_L,[s.user&&s.user.team?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.user.team}.png`},null,8,kL)):a.createCommentVNode("",!0)]),a.createElementVNode("div",EL,[a.createVNode(qA,{"model-value":n.value,"onUpdate:modelValue":l},null,8,["model-value"])]),a.createElementVNode("div",TL,[s.currentTournament&&s.currentTournament.id?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/todoelfut/${s.currentTournament.id}.png`},null,8,CL)):a.createCommentVNode("",!0)]),s.currentTournament?(a.openBlock(),a.createElementBlock("div",xL,[a.createElementVNode("div",null,a.toDisplayString(s.currentTournament.name),1),s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},AL)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]))]),a.createElementVNode("div",BL,[s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},RL)):a.createCommentVNode("",!0)])]),(s.isFull||n.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(a.openBlock(),a.createBlock(ah,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!r.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:o},null,8,["match-days","is-landing-mode","default-match-day-key"])):a.createCommentVNode("",!0),!s.isFull&&!n.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",NL,[a.createVNode(Gs,{small:"",data:s.data.data.prematch,onClickMatch:u[3]||(u[3]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[4]||(u[4]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[5]||(u[5]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])]),_:1})):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",vL,[a.createVNode(Gs,{data:s.data.data.prematch,onClickMatch:u[0]||(u[0]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[1]||(u[1]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[2]||(u[2]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])):a.createCommentVNode("",!0)],64))],64)):s.data?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[s.data.length>1?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",DL,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.data,(m,f)=>(a.openBlock(),a.createBlock(KA,{key:f,game:m,onClickMatch:p=>c.$emit("clickMatch",m)},null,8,["game","onClickMatch"]))),128))])]),_:1})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",OL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[8]||(u[8]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[9]||(u[9]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",PL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[6]||(u[6]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[7]||(u[7]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64))],64))],64)):a.createCommentVNode("",!0)]))}},[["__scopeId","data-v-c26e8c06"]]),ML={__name:"gsc-games",props:{componentWidth:{type:[Number,String],default:768},isplayer:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentSeason:{type:Number,default:0},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(a.openBlock(),a.createElementBlock("main",null,[a.createVNode(FL,{data:s.data,"component-width":s.componentWidth,"is-full":s.isFull,"has-team":!s.isplayer,"tournament-schedule-keys":s.tournamentScheduleKeys,"default-match-day-key":s.defaultMatchDayKey,user:s.user,"current-season":s.currentSeason,"current-tournament":s.currentTournament,"is-live-button-visible":s.isLiveButtonVisible,onClickLive:t[0]||(t[0]=n=>e.$emit("click-live")),onClickCalendar:t[1]||(t[1]=n=>e.$emit("clickCalendar")),onClickMatch:t[2]||(t[2]=n=>e.$emit("clickMatch",n)),onChangeMatchDay:t[3]||(t[3]=n=>e.$emit("change-match-day",n)),onChangeIsLeagueSelected:t[4]||(t[4]=n=>e.$emit("change-is-league-selected",n))},null,8,["data","component-width","is-full","has-team","tournament-schedule-keys","default-match-day-key","user","current-season","current-tournament","is-live-button-visible"])]))}},VL="_toniKroos_lmln3_18",$L="_centralMidfielder_lmln3_28",UL="_icnPlayIcon_lmln3_38",zL="_verVideos_lmln3_45",GL="_btnVideosOptions_lmln3_55",jL="_btnVideosOptionsTeams_lmln3_70",HL="_info_lmln3_90",WL="_goalUnlock_lmln3_102",KL="_teamsAmerica_lmln3_115",qL="_imageIcon_lmln3_125",YL="_imageIconTeam_lmln3_136",JL="_playerTops_lmln3_148",XL={toniKroos:VL,centralMidfielder:$L,icnPlayIcon:UL,verVideos:zL,btnVideosOptions:GL,btnVideosOptionsTeams:jL,info:HL,goalUnlock:WL,teamsAmerica:KL,imageIcon:qL,imageIconTeam:YL,playerTops:JL},ZL=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},QL={props:{height:{type:String,default:"194px"},background:{type:String,default:"#122735"},borderRadius:{type:String,default:"4px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#ffffff"},namePlayerFont:{type:String,default:"Montserrat-SemiBold"},namePlayerFontColor:{type:String,default:"#ffffff"},namePlayerFontSize:{type:String,default:"18px"},namePlayerFontStyle:{type:String,default:"Normal"},namePositionFont:{type:String,default:"Poppins-Regular"},namePositionFontColor:{type:String,default:"#8ea2ab"},namePositionFontSize:{type:String,default:"14px"},namePositionFontStyle:{type:String,default:"Normal"},totalFont:{type:String,default:"Poppins-Regular"},totalFontColor:{type:String,default:"#ffffff"},totalFontSize:{type:String,default:"8px"},totalFontStyle:{type:String,default:"Normal"},totalHeight:{type:String,default:"22px"},totalWidth:{type:String,default:"80px"},totalBorderRadius:{type:String,default:"64px"},totalBorderWidth:{type:Number,default:1},totalBorderColor:{type:String,default:"#cbee6b"},iconPlay:{type:String,default:"/icnplay1.svg"},teamWidth:{type:String,default:"34px"},teamPositionLeft:{type:String,default:"12px"},teamPositionTop:{type:String,default:""},playerOrTeamPhotoWidth:{type:String,default:"99px"},numbertopLeft:{type:String,default:"-8px"},numbertopBottom:{type:String,default:"-25px"},numbertopTop:{type:String},numbertopRight:{type:String},numbertopColor:{type:String,default:"#ffffff"},numbertopFontSize:{type:String,default:"98px"},numbertopOpacity:{type:String,default:"0.18"},numberFontFamily:{type:String,default:"Montserrat-SemiBold"},showShieldTeam:{type:Boolean,default:!0},showIconVideo:{type:Boolean,default:!0},showPositionPlayer:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},freemiumActive:{type:Boolean,default:!1},isPlayer:{type:Boolean,default:!0},data:{type:Object,default:()=>{}}},computed:{customMosaic(){return{height:this.height,background:this.background,borderRadius:`${this.borderRadius} !important`,border:`solid ${this.borderWidth}px ${this.borderColor}`}},customNamePlayer(){return{fontFamily:this.namePlayerFont,fontSize:this.namePlayerFontSize,color:this.namePlayerFontColor,fontStyle:this.namePlayerFontStyle}},customNamePosition(){return{fontFamily:this.namePositionFont,fontSize:this.namePositionFontSize,color:this.namePositionFontColor,fontStyle:this.namePositionFontStyle}},customTotal(){return{fontFamily:this.totalFont,fontSize:this.totalFontSize,color:this.totalFontColor,fontStyle:this.totalFontStyle}},customTotalCont(){return{MinHeight:this.totalHeight,width:this.totalWidth,borderRadius:`${this.totalBorderRadius} !important`,border:`solid ${this.totalBorderWidth}px ${this.totalBorderColor}`}},customShieldTeam(){return{width:this.teamWidth,top:this.teamPositionTop,left:this.teamPositionLeft}},customPhotoPlayerOrTeam(){return{width:this.playerOrTeamPhotoWidth}},customNumberTop(){return{fontSize:this.numbertopFontSize,color:this.numbertopColor,left:this.numbertopLeft,right:this.numbertopRight,top:this.numbertopTop,bottom:this.numbertopBottom,opacity:this.numbertopOpacity,fontFamily:this.numberFontFamily}}},methods:{onPlayerTopsClick(s){this.activeVideos&&(this.$emit("clickMosaic",s),this.$emit("freemium",this.freemiumActive))},onButtonVideos(s){this.activeVideos&&(this.$emit("openmedia",s),this.$emit("clickvideos",s.id),this.$emit("freemium",this.freemiumActive))}}},e5=["src"],t5=["src"],s5=["src"];function n5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("section",{class:a.normalizeClass(s.$style.playerTops),style:a.normalizeStyle(r.customMosaic),id:"player-mosaico",onClick:e[1]||(e[1]=o=>r.onPlayerTopsClick(t.data.player_id))},[a.createElementVNode("div",{class:a.normalizeClass(s.$style.info)},[a.createElementVNode("h3",{class:a.normalizeClass(s.$style.toniKroos),style:a.normalizeStyle(r.customNamePlayer)},a.toDisplayString(t.data.player_name),7),t.showPositionPlayer?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(s.$style.centralMidfielder),style:a.normalizeStyle(r.customNamePosition)},a.toDisplayString(t.data.player_position),7)):a.createCommentVNode("",!0),a.createElementVNode("button",{class:a.normalizeClass(this.isPlayer?s.$style.btnVideosOptions:s.$style.btnVideosOptionsTeams),style:a.normalizeStyle(r.customTotalCont),id:"button-actions",onClick:e[0]||(e[0]=o=>r.onButtonVideos(t.data))},[t.showIconVideo?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.icnPlayIcon),src:t.iconPlay},null,10,e5)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(s.$style.verVideos),style:a.normalizeStyle(r.customTotal)},a.toDisplayString(t.data.player_stat)+" "+a.toDisplayString(t.data.category),7)],6)],2),a.createElementVNode("b",{style:a.normalizeStyle(r.customNumberTop),class:a.normalizeClass(s.$style.goalUnlock)},a.toDisplayString(t.data.top),7),t.showShieldTeam?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.teamsAmerica),style:a.normalizeStyle(r.customShieldTeam),loading:"lazy",src:t.data.team_logo},null,14,t5)):a.createCommentVNode("",!0),a.createElementVNode("img",{style:a.normalizeStyle(r.customPhotoPlayerOrTeam),class:a.normalizeClass(this.isPlayer?s.$style.imageIcon:s.$style.imageIconTeam),loading:"lazy",src:t.data.player_photo},null,14,s5)],6)}const a5={$style:XL},i5=ZL(QL,[["render",n5],["__cssModules",a5]]),r5=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},rh=()=>{a.useCssVars(s=>({"9d01acb4":s.height,"14e95081":s.borderWidthBtn,"38fec285":s.borderType,34353510:s.borderColor,"20d20dc6":s.borderRadius,17130967:s.width,"4ccb7d36":s.backgroundColor,"5d1e86a2":s.cursorType,ce65d4a2:s.fontSize,fe4ac47a:s.fontStyle,f98e44dc:s.fontFamily,"93b87770":s.marginLeftStat,c7f7beba:s.fontSizeStat}))},oh=ro.setup;ro.setup=oh?(s,e)=>(rh(),oh(s,e)):rh;const o5=s=>(a.pushScopeId("data-v-f3ee6b2b"),s=s(),a.popScopeId(),s),l5=["src"],c5={key:1,class:"text"},d5=["src"],u5={class:"stats"},h5=o5(()=>a.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),m5={class:"numstats"},f5={class:"leyend"};function g5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,l5)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",c5,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,d5)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",u5,[h5,a.createElementVNode("div",m5,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",f5,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const p5=r5(ro,[["render",g5],["__scopeId","data-v-f3ee6b2b"]]);function y5(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const oo={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Light"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(s){try{s==this.textOptionLeft&&(this.OptionDefault=!1),s==this.textOptionRight&&(this.OptionDefault=!0)}catch(e){throw new Error(e)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(s){s.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},lh=()=>{a.useCssVars(s=>({"5d15d746":s.backgroundColor,"0bc50bbe":s.widthCircle,"7ad0df62":s.heightCircle}))},ch=oo.setup;oo.setup=ch?(s,e)=>(lh(),ch(s,e)):lh;const b5={key:0,class:"text-left"},w5=["width","src"],S5=["checked"],_5=["width","src"],k5={key:3,class:"text-right"};function E5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",{class:"gsc-switch-radio",style:a.normalizeStyle(r.customText)},[t.textOptionLeft!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",b5,a.toDisplayString(t.textOptionLeft),1)):a.createCommentVNode("",!0),t.iconA!=""?(a.openBlock(),a.createElementBlock("img",{key:1,width:t.widthIcons,src:t.iconA},null,8,w5)):a.createCommentVNode("",!0),a.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:e[0]||(e[0]=(...o)=>r.handleSwitchChange&&r.handleSwitchChange(...o)),checked:i.OptionDefault},null,40,S5),a.createElementVNode("label",{for:"toggle-btn",style:a.normalizeStyle([r.customStyle,{"--circle-color":t.circleColorSwitch}])},null,4),t.iconB!=""?(a.openBlock(),a.createElementBlock("img",{key:2,width:t.widthIcons,src:t.iconB},null,8,_5)):a.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",k5,a.toDisplayString(t.textOptionRight),1)):a.createCommentVNode("",!0)],4)}const lo={components:{GSCSlider:un,GSCMosaicthebest:i5,GscSwitchComponent:vr,GSCButton:p5,GSCRadioToggle:et(oo,[["render",E5],["__scopeId","data-v-f9c67ce5"]])},setup(){const s=a.ref("myDivRef"),{elementSize:e}=y5(s);return{myDivRef:s,elementSize:e}},props:{backgroundColor:{type:String,default:"#0D1D29"},tournamentSelected:{type:Object,default:()=>({id:0})},showSwitch:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},showSelect:{type:Boolean,default:!0},league:{type:Number,default:0},showMore:{type:Boolean,default:!0},fontFamily:{type:String,default:"Poppins-Semibold"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"24px"},marginMosaic:{type:String,default:"24px"},tournament:{type:Number,default:1},season:{type:Number,default:1772},teamId:{type:Number,default:0}},watch:{tournamentSelected:{handler(s){s.is_female==1?this.optionSelected="Jugadoras":this.optionSelected="Jugadores"},immediate:!0},season:{async handler(s){const e=this.categorySelected!==null?this.categorySelected:1;this.showSwitch||(this.filterSelected=1),await this.getCategoryStats(s,this.filterSelected,e)},immediate:!0}},data:()=>({url:"https://kgfaxdv624.execute-api.us-east-2.amazonaws.com/prod/tops/seasons/",showTops:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",categoriesDefault:["Goles","Pases acertados","Balones recuperados en disputa","Asistencias","Participaciones en gol","Tiros a gol","Tiros a gol que llegaron a la portería","Cabeceos en área rival","Cabeceos en área propia","Centros","Centros acertados","1vs1 exitosos ofensivos","1vs1 exitosos ofensivos que terminaron en gol","1vs1 defensivos exitoso","Rechaces","Balones ganados en área propia","Balones ganados en área rival","Faltas cometidas","Faltas recibidas","Tarjetas amarillas","Tarjetas rojas","Atajadas","Tiros de Esquina"],categories:[{id:1,name:"Goles"},{id:2,name:"Pases acertados"},{id:3,name:"Balones recuperados en disputa"},{id:4,name:"Asistencias"},{id:5,name:"Participaciones en gol"},{id:6,name:"Tiros a gol"},{id:7,name:"Tiros a gol que llegaron a la portería"},{id:8,name:"Cabeceos en área rival"},{id:9,name:"Cabeceos en área propia"},{id:10,name:"Centros"},{id:11,name:"Centros acertados"},{id:12,name:"1vs1 exitosos ofensivos"},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol"},{id:14,name:"1vs1 defensivos exitoso"},{id:15,name:"Rechaces"},{id:16,name:"Balones ganados en área propia"},{id:17,name:"Balones ganados en área rival"},{id:18,name:"Faltas cometidas"},{id:19,name:"Faltas recibidas"},{id:20,name:"Tarjetas amarillas"},{id:21,name:"Tarjetas rojas"},{id:22,name:"Atajadas"},{id:23,name:"Tiros de Esquina"}],categoryData:[],categorySelected:null,filterSelected:1,isTeam:!1,categoryName:"Goles",optionSelected:"Jugadores",positions:[{name:"Portero"},{name:"Defensa central"},{name:"Lateral por izquierda"},{name:"Lateral por derecha"},{name:"Volante por izquierda"},{name:"Volante por derecha"},{name:"Volante defensivo"},{name:"Volante ofensivo"},{name:"Delantero"},{name:"Desconocida"}]}),async created(){await this.getCategoryStats(this.season,this.league)},computed:{topData(){var s=[];return this.categorySelected!=null&&this.categoryData[this.categorySelected]!==void 0&&(this.isTeam?s=this.categoryData[this.categorySelected].top__teams:s=this.categoryData[this.categorySelected].top__players),s}},methods:{formatPlayerName(s){var n;const e=s.split(",");let t="";if(e[1]&&(t=`${e[1].trim()[0]}.`,e[0])){const i=(n=e[0])==null?void 0:n.trim().split(" ");for(let r of i)if(t=`${t} ${r.trim()}`,r.trim().length>3)break}return t},translateTopCategories(s){return{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]}[s]||[]},onOpenMedia(s){const e=this.translateTopCategories(this.categorySelected),t=2,n=3;let i=[],r=0,o=0;this.isTeam?(r=s.player_id,o=n):(i=[s.player_id],o=t);const l={seasonId:this.season,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:o,gameIds:null,playerIds:i,goalkeeperIds:[],categoryIds:e,teamId:r,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s.category},objectPlaySync:null};this.$emit("openmedia",l)},async ChangeRadio(s){const e=this.categorySelected!==null?this.categorySelected:1;s==="Mi equipo"&&(this.filterSelected=0,await this.getCategoryStats(this.season,0,e)),s==="Liga MX"&&(this.filterSelected=1,await this.getCategoryStats(this.season,1,e))},clickMosaic(s){this.$emit("boxinput",s)},clickMore(){this.$emit("more")},async changeType(s){const e=this.categorySelected!==null?this.categorySelected:1;this.optionSelected=s,s=="Equipos"?(await this.getCategoryStats(this.season,1,e),this.isTeam=!0):this.isTeam=!1},compareObjectsMinutes(s,e){return s.total>e.total?-1:s.total<e.total?1:s.minutes<e.minutes?-1:s.minutes>e.minutes?1:0},changeCategory(s){this.categoryName=s;const e=this.categories.find(t=>t.name===s);this.categorySelected=e.id},async getCategoryStats(s,e,t=0){try{let r={},o={},l=[];const d=Le.create({headers:{Authorization:`${this.token}`}});var n={};if(e==0&&(n=await d.get(this.url+this.season+"/teams/"+this.teamId)),e==1&&(n=await d.get(this.url+s)),n.data.players.length==0?this.showTops=!1:this.showTops=!0,n&&n.data){n.data.teams.map(c=>{r[c[0]]={},r[c[0]].id=c[0],r[c[0]].name=c[1],r[c[0]].img=c[3],r[c[0]].abrv=c[2],r[c[0]].logo=c[3]}),n.data.players.map(c=>{o[c[0]]={},o[c[0]].id=c[0],o[c[0]].name=c[1],o[c[0]].img=c[2],o[c[0]].position=c[6],o[c[0]].minutes=c[13],o[c[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+c[10][0].team_id+".png"});var i=1;n.data.tops.map(c=>{l[c.category?c.category:i]={};var u={},m={};c.teams.map(h=>{u[h[0]]={},u[h[0]].total=h[1],u[h[0]].id=r[h[0]].id,u[h[0]].name=r[h[0]].name,u[h[0]].img="https://golstatsimages.blob.core.windows.net/teams-150/"+h[0]+".png",u[h[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+h[0]+".png"}),c.players.map(h=>{m[h[0]]={},m[h[0]].minutes=o[h[0]].minutes,m[h[0]].total=h[1],m[h[0]].name=o[h[0]].name,m[h[0]].img=o[h[0]].img.replace("players-profile/","players-profile/"),m[h[0]].id=o[h[0]].id,m[h[0]].position=this.tournamentSelected.is_female==1?this.positions[o[h[0]].position-1].name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):this.positions[o[h[0]].position-1].name,m[h[0]].logo=o[h[0]].logo});var f=[],p=[];for(const h in u)f.push(u[h]);for(const h in m)p.push(m[h]);f.sort((h,g)=>h.total<g.total?1:-1),p=p.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=p,l[c.category?c.category:i].top__teams=f,i++})}else this.showTops=!1;t===0?this.categorySelected=1:this.categorySelected=t,this.categoryData=l}catch(r){return Promise.reject(r)}}}},dh=()=>{a.useCssVars(s=>({"755bc1d4":s.backgroundColor,"7748a398":s.fontFamily,"9f60b25e":s.fontSize,"58c64293":s.fontColor,24655139:s.marginMosaic}))},uh=lo.setup;lo.setup=uh?(s,e)=>(dh(),uh(s,e)):dh;const T5={key:0,class:"gsc-best",ref:"myDivRef"},C5={class:"gsc-best__line-bar-tools"},x5={key:0,class:"gsc-best__line-bar-tools__title"},A5={key:1,class:"gsc-best__line-bar-tools__titlefull"},L5={class:"unit-items"},I5={key:2,class:"gsc-best__line-bar-tools__tools"},B5={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},R5={key:1,class:"gsc-best__line-bar-tools__tools__btn"},v5={key:0,class:"gsc-best__line-bar-tools-movil"},N5={class:"gsc-best__line-bar-tools-movil__tabs"},D5={class:"gsc-best__categories"},P5={class:"gsc-best__players"};function O5(s,e,t,n,i,r){const o=a.resolveComponent("GSCRadioToggle"),l=a.resolveComponent("GSCButton"),d=a.resolveComponent("GscSwitchComponent"),c=a.resolveComponent("GSCMosaicthebest"),u=a.resolveComponent("GSCSlider");return s.showTops?(a.openBlock(),a.createElementBlock("div",T5,[a.createElementVNode("div",C5,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",x5,[a.createElementVNode("span",null,[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))]),s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createElementBlock("div",A5,[a.createElementVNode("span",{style:a.normalizeStyle(n.elementSize.width<=380?"font-size: 15px; margin-top:0px; width:60px;":"")},[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))],4),a.createElementVNode("span",L5,[s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","hidden-labels":!0,"value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createBlock(l,{key:1,style:{"margin-top":"4px"},width:"75px","text-value":"Ver más","font-color":n.elementSize.width<=680?"rgba(255,255,255, 0.7)":"#fff","font-size":n.elementSize.width<=680?"11px":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["font-color","font-size","onClick"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",I5,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",B5,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.showMore?(a.openBlock(),a.createElementBlock("div",R5,[a.createVNode(l,{width:"75px","text-value":"Ver más","font-size":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["onClick"]),a.createVNode(l,{width:"10px","text-value":"→","font-size":"14px","font-color":"#cbee6b",onClick:r.clickMore},null,8,["onClick"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),n.elementSize.width<=900&&t.showSelect?(a.openBlock(),a.createElementBlock("div",v5,[a.createElementVNode("div",N5,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"10px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("div",D5,[a.createVNode(d,{type:2,background:t.backgroundColor,"arrows-background":t.backgroundColor,"background-option-active":t.backgroundColor,arrow:!0,"font-family":"Poppins-Light",buttons:s.categoriesDefault,height:"40px","selected-option":"Goles","font-size":n.elementSize.width<=900?"12px":"14px",width:"max-content",onInput:r.changeCategory,pxScroll:200,scrollColor:"none",arrowsScrollHide:!1,arrowsMargin:0,borderWidth:"2px"},null,8,["background","arrows-background","background-option-active","buttons","font-size","onInput"])]),a.createElementVNode("div",P5,[a.createVNode(u,{pxScroll:198,scrollColor:"none","background-color":t.backgroundColor,arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.topData,(m,f)=>(a.openBlock(),a.createElementBlock("div",{key:f,class:a.normalizeClass(["gsc-best__players__item",f==0?"margin-none":""])},[a.createVNode(c,{data:{player_id:m.id,player_name:this.isTeam?m.name:r.formatPlayerName(m.name),player_position:m.position,player_stat:m.total,category:"Total",top:f<9?"0"+(f+1):f+1,team_logo:m.logo,player_photo:m.img},"show-shield-team":!0,"active-videos":!!t.activeVideos,"show-icon-video":!!t.activeVideos,onClickMosaic:r.clickMosaic,onOpenmedia:r.onOpenMedia,namePlayerFontSize:"13px",namePositionFontSize:"10px",numbertopLeft:"-15px",numberFontFamily:"Oswald-SemiBold",totalFontSize:"12px",totalFont:"Poppins-Light!important",totalHeight:"21px","is-player":!this.isTeam},null,8,["data","active-videos","show-icon-video","onClickMosaic","onOpenmedia","is-player"])],2))),128))]),_:1},8,["background-color"])])],512)):a.createCommentVNode("",!0)}const F5=et(lo,[["render",O5],["__scopeId","data-v-824ba31b"]]);/**
33
33
  * Vue 3 Carousel 0.3.1
34
34
  * (c) 2023
35
35
  * @license MIT
36
36
  */const lt={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},hh={itemsToShow:{default:lt.itemsToShow,type:Number},itemsToScroll:{default:lt.itemsToScroll,type:Number},wrapAround:{default:lt.wrapAround,type:Boolean},throttle:{default:lt.throttle,type:Number},snapAlign:{default:lt.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:lt.transition,type:Number},breakpoints:{default:lt.breakpoints,type:Object},autoplay:{default:lt.autoplay,type:Number},pauseAutoplayOnHover:{default:lt.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:lt.mouseDrag,type:Boolean},touchDrag:{default:lt.touchDrag,type:Boolean},dir:{default:lt.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:lt.i18n,type:Object},settings:{default(){return{}},type:Object}};function M5({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function V5({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function co({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function $5({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){case"center":case"center-odd":o-=(r-1)/2;break;case"center-even":o-=(r-2)/2;break;case"end":o-=r-1;break}return i?o:co({val:o,max:t-r,min:0})}function mh(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...mh(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function uo({val:s,max:e,min:t=0}){return s>e?uo({val:s-(e+1),max:e,min:t}):s<t?uo({val:s+(e+1),max:e,min:t}):s}function U5(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function z5(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function G5(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var j5=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},lt))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},G5(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),H5=a.defineComponent({name:"Carousel",props:hh,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},lt));let u=Object.assign({},lt),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=z5(()=>{C(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=M5({config:c,slidesCount:d.value}),y.value=V5({config:c,slidesCount:d.value}),c.wrapAround||(f.value=co({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=U5(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{Qe.stopPropagation(),window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:co({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=uo({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>$5({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(hh).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=mh(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(j5)])}}}),fh;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(fh||(fh={}));var W5=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},lt))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=()=>s.index===n.value,l=()=>s.index===n.value-1,d=()=>s.index===n.value+1,c=()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m};return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c(),"carousel__slide--active":o(),"carousel__slide--prev":l(),"carousel__slide--next":d(),"carousel__slide--sliding":r.value},"aria-hidden":!c()},(u=e.default)===null||u===void 0?void 0:u.call(e))}}});const K5=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},q5=s=>(a.pushScopeId("data-v-54620d25"),s=s(),a.popScopeId(),s),Y5={class:"gsc-carousel"},J5={key:0},X5=q5(()=>a.createElementVNode("div",null,"no hay",-1)),Z5=[X5],Q5={class:"gsc-carousel__2d__slides"},eI={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tI=["fill"],sI={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nI=["fill"],aI={class:"gsc-carousel__2d__navigation"},iI={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rI=["stroke"],oI={key:1,class:"gsc-carousel__2d__navigation__pagination"},lI=["onClick"],cI={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dI=["stroke"],uI={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},arrowsMaxWidth:{type:String,default:"20px"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(s,{expose:e,emit:t}){const n=s;a.useCssVars(g=>({"2c72d674":s.slideLeftArrowBackgroundImage,"90a63f40":s.slidesArrowsLeftAndRight,"2627d097":s.slideRightArrowBackgroundImage,"1904d43f":s.marginTop,cfb58986:s.secondarySlidesOpacity}));const i=a.ref(null),r=a.ref({}),o=a.ref(0),l=a.ref(!1);a.watch(i,g=>{g&&l.value?(l.value=!1,d(n.items)):g&&g.slideTo&&g.slideTo(o.value)},{deep:!0}),a.watch(()=>n.currentItemIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.defaultItemByIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.items,g=>{i.value?d(g):l.value=!0},{immediate:!0});function d(g){g&&g.length&&i.value&&setTimeout(()=>{if(n.defaultItemByProp){const y=n.items.findIndex(b=>b[n.defaultItemByProp.propName]===n.defaultItemByProp.value);y!==-1?(o.value=y,r.value=g[y]):(o.value=0,r.value=g[0])}else o.value=n.defaultItemByIndex,r.value=g[n.defaultItemByIndex];i.value.slideTo&&i.value.slideTo(o.value),r.value&&o.value===0&&t("input",{selectedItem:r.value,selectedItemIndex:o.value})},500)}function c(){i.value&&i.value.next()}function u(){i.value&&i.value.prev()}function m(){i.value&&i.value.updateSlideWidth()}function f(g){i.value&&i.value.slideTo(g)}function p(g){i.value.slideTo(g)}function h(g){const y=g.slidingToIndex<0?n.items.length-1:g.slidingToIndex===n.items.length?0:g.slidingToIndex;o.value=y,r.value=n.items[y],t("update:currentItemIndex",y),t("input",{selectedItem:r.value,selectedItemIndex:o.value})}return e({prev:u,next:c,updateSlideWidth:m,slideTo:f}),(g,y)=>(a.openBlock(),a.createElementBlock("div",Y5,[n.is3d?(a.openBlock(),a.createElementBlock("div",J5,Z5)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":s.isMainSlidePriority}])},[a.createElementVNode("div",Q5,[a.createVNode(a.unref(H5),{ref_key:"carousel2d",ref:i,"items-to-show":s.itemsToShow,"wrap-around":s.wrapAround,onSlideStart:h},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createBlock(a.unref(W5),{key:w},{default:a.withCtx(()=>[a.renderSlot(g.$slots,"default",{item:b},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[0]||(y[0]=b=>i.value.prev())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",eI,[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:s.arrowsColor},null,8,tI)]))],2)],4)):a.createCommentVNode("",!0),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[1]||(y[1]=b=>c())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",sI,[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:s.arrowsColor},null,8,nI)]))],2)],4)):a.createCommentVNode("",!0),a.createElementVNode("div",aI,[s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:y[2]||(y[2]=b=>u())},[(a.openBlock(),a.createElementBlock("svg",iI,[a.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:n.arrowsColor},null,8,rI)]))])):a.createCommentVNode("",!0),s.isPaginationVisible?(a.openBlock(),a.createElementBlock("div",oI,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createElementBlock("div",{key:`i-${w}`,class:"gsc-carousel__2d__navigation__pagination__item",style:a.normalizeStyle({height:`${n.navigationHeight}px`,width:`${o.value===w?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${o.value===w?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:_=>p(w)},null,12,lI))),128))])):a.createCommentVNode("",!0),s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:y[3]||(y[3]=b=>i.value.next())},[(a.openBlock(),a.createElementBlock("svg",cI,[a.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:n.arrowsColor},null,8,dI)]))])):a.createCommentVNode("",!0)])],2))]))}},hI=K5(uI,[["__scopeId","data-v-54620d25"]]),gh=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function Z(s,e,t){return(e=fI(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function mI(s,e){if(typeof s!="object"||s===null)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var n=t.call(s,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function fI(s){var e=mI(s,"string");return typeof e=="symbol"?e:String(e)}function gI(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(s,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function pI(s,e,t){return ph(s.prototype,e),ph(s,t),s}function yI(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function yh(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(s);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable})),t.push.apply(t,n)}return t}function bh(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yh(Object(t),!0).forEach(function(n){yI(s,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):yh(Object(t)).forEach(function(n){Object.defineProperty(s,n,Object.getOwnPropertyDescriptor(t,n))})}return s}var wh={addCSS:!0,thumbWidth:15,watch:!0};function bI(s,e){return(function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function wI(s,e){if(s&&e){var t=new Event(e,{bubbles:!0});s.dispatchEvent(t)}}var Sn=function(s){return s!=null?s.constructor:null},ho=function(s,e){return!!(s&&e&&s instanceof e)},Sh=function(s){return s==null},_h=function(s){return Sn(s)===Object},SI=function(s){return Sn(s)===Number&&!Number.isNaN(s)},kh=function(s){return Sn(s)===String},_I=function(s){return Sn(s)===Boolean},kI=function(s){return Sn(s)===Function},Eh=function(s){return Array.isArray(s)},Th=function(s){return ho(s,NodeList)},EI=function(s){return ho(s,Element)},TI=function(s){return ho(s,Event)},CI=function(s){return Sh(s)||(kh(s)||Eh(s)||Th(s))&&!s.length||_h(s)&&!Object.keys(s).length},pt={nullOrUndefined:Sh,object:_h,number:SI,string:kh,boolean:_I,function:kI,array:Eh,nodeList:Th,element:EI,event:TI,empty:CI};function xI(s){var e="".concat(s).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function AI(s,e){if(1>e){var t=xI(e);return parseFloat(s.toFixed(t))}return Math.round(s/e)*e}var LI=function(){function s(e,t){gI(this,s),pt.element(e)?this.element=e:pt.string(e)&&(this.element=document.querySelector(e)),pt.element(this.element)&&pt.empty(this.element.rangeTouch)&&(this.config=bh({},wh,{},t),this.init())}return pI(s,[{key:"init",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(i){t.element[n](i,function(r){return t.set(r)},!1)})}},{key:"get",value:function(e){if(!s.enabled||!pt.event(e))return null;var t,n=e.target,i=e.changedTouches[0],r=parseFloat(n.getAttribute("min"))||0,o=parseFloat(n.getAttribute("max"))||100,l=parseFloat(n.getAttribute("step"))||1,d=n.getBoundingClientRect(),c=100/d.width*(this.config.thumbWidth/2)/100;return 0>(t=100/d.width*(i.clientX-d.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*c:50<t&&(t+=2*(t-50)*c),r+AI(t/100*(o-r),l)}},{key:"set",value:function(e){s.enabled&&pt.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),wI(e.target,e.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(pt.empty(e)||pt.string(e)?n=Array.from(document.querySelectorAll(pt.string(e)?e:'input[type="range"]')):pt.element(e)?n=[e]:pt.nodeList(e)?n=Array.from(e):pt.array(e)&&(n=e.filter(pt.element)),pt.empty(n))return null;var i=bh({},wh,{},t);if(pt.string(e)&&i.watch){var r=new MutationObserver(function(o){Array.from(o).forEach(function(l){Array.from(l.addedNodes).forEach(function(d){pt.element(d)&&bI(d,e)&&new s(d,i)})})});r.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(o){return new s(o,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),s}();const _n=s=>s!=null?s.constructor:null,is=(s,e)=>!!(s&&e&&s instanceof e),mo=s=>s==null,Ch=s=>_n(s)===Object,II=s=>_n(s)===Number&&!Number.isNaN(s),Ba=s=>_n(s)===String,BI=s=>_n(s)===Boolean,xh=s=>typeof s=="function",Ah=s=>Array.isArray(s),RI=s=>is(s,WeakMap),Lh=s=>is(s,NodeList),vI=s=>_n(s)===Text,NI=s=>is(s,Event),DI=s=>is(s,KeyboardEvent),PI=s=>is(s,window.TextTrackCue)||is(s,window.VTTCue),OI=s=>is(s,TextTrack)||!mo(s)&&Ba(s.kind),FI=s=>is(s,Promise)&&xh(s.then),MI=s=>s!==null&&typeof s=="object"&&s.nodeType===1&&typeof s.style=="object"&&typeof s.ownerDocument=="object",Ih=s=>mo(s)||(Ba(s)||Ah(s)||Lh(s))&&!s.length||Ch(s)&&!Object.keys(s).length;var k={nullOrUndefined:mo,object:Ch,number:II,string:Ba,boolean:BI,function:xh,array:Ah,weakMap:RI,nodeList:Lh,element:MI,textNode:vI,event:NI,keyboardEvent:DI,cue:PI,track:OI,promise:FI,url:s=>{if(is(s,window.URL))return!0;if(!Ba(s))return!1;let e=s;s.startsWith("http://")&&s.startsWith("https://")||(e=`http://${s}`);try{return!Ih(new URL(e).hostname)}catch{return!1}},empty:Ih};const fo=(()=>{const s=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(e).find(n=>s.style[n]!==void 0);return!!k.string(t)&&e[t]})();function Bh(s,e){setTimeout(()=>{try{s.hidden=!0,s.offsetHeight,s.hidden=!1}catch{}},e)}const VI=!!window.document.documentMode,$I=/Edge/g.test(navigator.userAgent),UI="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),zI=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,GI=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,jI=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var tt={isIE:VI,isEdge:$I,isWebKit:UI,isIPhone:zI,isIPadOS:GI,isIos:jI};function HI(s){return JSON.parse(JSON.stringify(s))}function Rh(s,e){return e.split(".").reduce((t,n)=>t&&t[n],s)}function Ue(s={},...e){if(!e.length)return s;const t=e.shift();return k.object(t)?(Object.keys(t).forEach(n=>{k.object(t[n])?(Object.keys(s).includes(n)||Object.assign(s,{[n]:{}}),Ue(s[n],t[n])):Object.assign(s,{[n]:t[n]})}),Ue(s,...e)):s}function vh(s,e){const t=s.length?s:[s];Array.from(t).reverse().forEach((n,i)=>{const r=i>0?e.cloneNode(!0):e,o=n.parentNode,l=n.nextSibling;r.appendChild(n),l?o.insertBefore(r,l):o.appendChild(r)})}function go(s,e){k.element(s)&&!k.empty(e)&&Object.entries(e).filter(([,t])=>!k.nullOrUndefined(t)).forEach(([t,n])=>s.setAttribute(t,n))}function fe(s,e,t){const n=document.createElement(s);return k.object(e)&&go(n,e),k.string(t)&&(n.innerText=t),n}function WI(s,e){k.element(s)&&k.element(e)&&e.parentNode.insertBefore(s,e.nextSibling)}function Nh(s,e,t,n){k.element(e)&&e.appendChild(fe(s,t,n))}function rs(s){k.nodeList(s)||k.array(s)?Array.from(s).forEach(rs):k.element(s)&&k.element(s.parentNode)&&s.parentNode.removeChild(s)}function Ra(s){if(!k.element(s))return;let{length:e}=s.childNodes;for(;e>0;)s.removeChild(s.lastChild),e-=1}function va(s,e){return k.element(e)&&k.element(e.parentNode)&&k.element(s)?(e.parentNode.replaceChild(s,e),s):null}function Yt(s,e){if(!k.string(s)||k.empty(s))return{};const t={},n=Ue({},e);return s.split(",").forEach(i=>{const r=i.trim(),o=r.replace(".",""),l=r.replace(/[[\]]/g,"").split("="),[d]=l,c=l.length>1?l[1].replace(/["']/g,""):"";switch(r.charAt(0)){case".":k.string(n.class)?t.class=`${n.class} ${o}`:t.class=o;break;case"#":t.id=r.replace("#","");break;case"[":t[d]=c}}),Ue(n,t)}function As(s,e){if(!k.element(s))return;let t=e;k.boolean(t)||(t=!s.hidden),s.hidden=t}function Ne(s,e,t){if(k.nodeList(s))return Array.from(s).map(n=>Ne(n,e,t));if(k.element(s)){let n="toggle";return t!==void 0&&(n=t?"add":"remove"),s.classList[n](e),s.classList.contains(e)}return!1}function Na(s,e){return k.element(s)&&s.classList.contains(e)}function Ls(s,e){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function KI(s,e){const{prototype:t}=Element;return(t.closest||function(){let n=this;do{if(Ls.matches(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(s,e)}function kn(s){return this.elements.container.querySelectorAll(s)}function Xe(s){return this.elements.container.querySelector(s)}function po(s=null,e=!1){k.element(s)&&s.focus({preventScroll:!0,focusVisible:e})}const Dh={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ze={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(s,e){const t=ze[s]||e!=="html5";return{api:t,ui:t&&ze.rangeInput}},pip:!(tt.isIPhone||!k.function(fe("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||fe("video").disablePictureInPicture)),airplay:k.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(s){if(k.empty(s))return!1;const[e]=s.split("/");let t=s;if(!this.isHTML5||e!==this.type)return!1;Object.keys(Dh).includes(t)&&(t+=`; codecs="${Dh[s]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const s=document.createElement("input");return s.type="range",s.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:fo!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},qI=(()=>{let s=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(s=!0,null)});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return s})();function En(s,e,t,n=!1,i=!0,r=!1){if(!s||!("addEventListener"in s)||k.empty(e)||!k.function(t))return;const o=e.split(" ");let l=r;qI&&(l={passive:i,capture:r}),o.forEach(d=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:s,type:d,callback:t,options:l}),s[n?"addEventListener":"removeEventListener"](d,t,l)})}function Ie(s,e="",t,n=!0,i=!1){En.call(this,s,e,t,!0,n,i)}function Da(s,e="",t,n=!0,i=!1){En.call(this,s,e,t,!1,n,i)}function yo(s,e="",t,n=!0,i=!1){const r=(...o)=>{Da(s,e,r,n,i),t.apply(this,o)};En.call(this,s,e,r,!0,n,i)}function pe(s,e="",t=!1,n={}){if(!k.element(s)||k.empty(e))return;const i=new CustomEvent(e,{bubbles:t,detail:{...n,plyr:this}});s.dispatchEvent(i)}function YI(){this&&this.eventListeners&&(this.eventListeners.forEach(s=>{const{element:e,type:t,callback:n,options:i}=s;e.removeEventListener(t,n,i)}),this.eventListeners=[])}function JI(){return new Promise(s=>this.ready?setTimeout(s,0):Ie.call(this,this.elements.container,"ready",s)).then(()=>{})}function Jt(s){k.promise(s)&&s.then(null,()=>{})}function bo(s){return k.array(s)?s.filter((e,t)=>s.indexOf(e)===t):s}function Ph(s,e){return k.array(s)&&s.length?s.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):null}function Oh(s){return!(!window||!window.CSS)&&window.CSS.supports(s)}const Fh=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((s,[e,t])=>({...s,[e/t]:[e,t]}),{});function Mh(s){return k.array(s)||k.string(s)&&s.includes(":")?(k.array(s)?s:s.split(":")).map(Number).every(k.number):!1}function Pa(s){if(!k.array(s)||!s.every(k.number))return null;const[e,t]=s,n=(r,o)=>o===0?r:n(o,r%o),i=n(e,t);return[e/i,t/i]}function wo(s){const e=n=>Mh(n)?n.split(":").map(Number):null;let t=e(s);if(t===null&&(t=e(this.config.ratio)),t===null&&!k.empty(this.embed)&&k.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:n,videoHeight:i}=this.media;t=[n,i]}return Pa(t)}function js(s){if(!this.isVideo)return{};const{wrapper:e}=this.elements,t=wo.call(this,s);if(!k.array(t))return{};const[n,i]=Pa(t),r=100/n*i;if(Oh(`aspect-ratio: ${n}/${i}`)?e.style.aspectRatio=`${n}/${i}`:e.style.paddingBottom=`${r}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const o=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(o-r)/(o/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform=`translateY(-${l}%)`}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:r,ratio:t}}function Vh(s,e,t=.05){const n=s/e,i=Ph(Object.keys(Fh),n);return Math.abs(i-n)<=t?Fh[i]:[s,e]}function XI(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const us={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(s=>{const e=s.getAttribute("type");return!!k.empty(e)||ze.mime.call(this,e)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:us.getSources.call(this).map(s=>Number(s.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const s=this;s.options.speed=s.config.speed.options,k.empty(this.config.ratio)||js.call(s),Object.defineProperty(s.media,"quality",{get(){const e=us.getSources.call(s).find(t=>t.getAttribute("src")===s.source);return e&&Number(e.getAttribute("size"))},set(e){if(s.quality!==e){if(s.config.quality.forced&&k.function(s.config.quality.onChange))s.config.quality.onChange(e);else{const t=us.getSources.call(s).find(d=>Number(d.getAttribute("size"))===e);if(!t)return;const{currentTime:n,paused:i,preload:r,readyState:o,playbackRate:l}=s.media;s.media.src=t.getAttribute("src"),(r!=="none"||o)&&(s.once("loadedmetadata",()=>{s.speed=l,s.currentTime=n,i||Jt(s.play())}),s.media.load())}pe.call(s,s.media,"qualitychange",!1,{quality:e})}}})},cancelRequests(){this.isHTML5&&(rs(us.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function ZI(s){return`${s}-${Math.floor(1e4*Math.random())}`}function So(s,...e){return k.empty(s)?s:s.toString().replace(/{(\d+)}/g,(t,n)=>e[n].toString())}function QI(s,e){return s===0||e===0||Number.isNaN(s)||Number.isNaN(e)?0:(s/e*100).toFixed(2)}const Tn=(s="",e="",t="")=>s.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),$h=(s="")=>s.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function e4(s=""){let e=s.toString();return e=Tn(e,"-"," "),e=Tn(e,"_"," "),e=$h(e),Tn(e," ","")}function t4(s=""){let e=s.toString();return e=e4(e),e.charAt(0).toLowerCase()+e.slice(1)}function s4(s){const e=document.createDocumentFragment(),t=document.createElement("div");return e.appendChild(t),t.innerHTML=s,e.firstChild.innerText}function n4(s){const e=document.createElement("div");return e.appendChild(s),e.innerHTML}const Uh={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},st={get(s="",e={}){if(k.empty(s)||k.empty(e))return"";let t=Rh(e.i18n,s);if(k.empty(t))return Object.keys(Uh).includes(s)?Uh[s]:"";const n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach(([i,r])=>{t=Tn(t,i,r)}),t}};class Cn{constructor(e){Z(this,"get",t=>{if(!Cn.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(k.empty(n))return null;const i=JSON.parse(n);return k.string(t)&&t.length?i[t]:i}),Z(this,"set",t=>{if(!Cn.supported||!this.enabled||!k.object(t))return;let n=this.get();k.empty(n)&&(n={}),Ue(n,t);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function xn(s,e="text"){return new Promise((t,n)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if(e==="text")try{t(JSON.parse(i.responseText))}catch{t(i.responseText)}else t(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",s,!0),i.responseType=e,i.send()}catch(i){n(i)}})}function zh(s,e){if(!k.string(s))return;const t="cache",n=k.string(e);let i=!1;const r=()=>document.getElementById(e)!==null,o=(l,d)=>{l.innerHTML=d,n&&r()||document.body.insertAdjacentElement("afterbegin",l)};if(!n||!r()){const l=Cn.supported,d=document.createElement("div");if(d.setAttribute("hidden",""),n&&d.setAttribute("id",e),l){const c=window.localStorage.getItem(`${t}-${e}`);if(i=c!==null,i){const u=JSON.parse(c);o(d,u.content)}}xn(s).then(c=>{if(!k.empty(c)){if(l)try{window.localStorage.setItem(`${t}-${e}`,JSON.stringify({content:c}))}catch{}o(d,c)}}).catch(()=>{})}}const Gh=s=>Math.trunc(s/60/60%60,10),a4=s=>Math.trunc(s/60%60,10),i4=s=>Math.trunc(s%60,10);function Oa(s=0,e=!1,t=!1){if(!k.number(s))return Oa(void 0,e,t);const n=l=>`0${l}`.slice(-2);let i=Gh(s);const r=a4(s),o=i4(s);return i=e||i>0?`${i}:`:"",`${t&&s>0?"-":""}${i}${n(r)}:${n(o)}`}const X={getIconUrl(){const s=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,t=s.host!==e||tt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=Xe.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:kn.call(this,this.config.selectors.buttons.play),pause:Xe.call(this,this.config.selectors.buttons.pause),restart:Xe.call(this,this.config.selectors.buttons.restart),rewind:Xe.call(this,this.config.selectors.buttons.rewind),fastForward:Xe.call(this,this.config.selectors.buttons.fastForward),mute:Xe.call(this,this.config.selectors.buttons.mute),pip:Xe.call(this,this.config.selectors.buttons.pip),airplay:Xe.call(this,this.config.selectors.buttons.airplay),settings:Xe.call(this,this.config.selectors.buttons.settings),captions:Xe.call(this,this.config.selectors.buttons.captions),fullscreen:Xe.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Xe.call(this,this.config.selectors.progress),this.elements.inputs={seek:Xe.call(this,this.config.selectors.inputs.seek),volume:Xe.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Xe.call(this,this.config.selectors.display.buffer),currentTime:Xe.call(this,this.config.selectors.display.currentTime),duration:Xe.call(this,this.config.selectors.display.duration)},k.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(s){return this.debug.warn("It looks like there is a problem with your custom controls HTML",s),this.toggleNativeControls(!0),!1}},createIcon(s,e){const t="http://www.w3.org/2000/svg",n=X.getIconUrl.call(this),i=`${n.cors?"":n.url}#${this.config.iconPrefix}`,r=document.createElementNS(t,"svg");go(r,Ue(e,{"aria-hidden":"true",focusable:"false"}));const o=document.createElementNS(t,"use"),l=`${i}-${s}`;return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",l),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),r.appendChild(o),r},createLabel(s,e={}){const t=st.get(s,this.config);return fe("span",{...e,class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(s){if(k.empty(s))return null;const e=fe("span",{class:this.config.classNames.menu.value});return e.appendChild(fe("span",{class:this.config.classNames.menu.badge},s)),e},createButton(s,e){const t=Ue({},e);let n=t4(s);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(o=>{Object.keys(t).includes(o)&&(i[o]=t[o],delete t[o])}),i.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(o=>o===this.config.classNames.control)||Ue(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,s){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,n="play",i.label="play",i.icon="play";break;default:k.empty(i.label)&&(i.label=n),k.empty(i.icon)&&(i.icon=s)}const r=fe(i.element);return i.toggle?(r.appendChild(X.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),r.appendChild(X.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),r.appendChild(X.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),r.appendChild(X.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(r.appendChild(X.createIcon.call(this,i.icon)),r.appendChild(X.createLabel.call(this,i.label))),Ue(t,Yt(this.config.selectors.buttons[n],t)),go(r,t),n==="play"?(k.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(r)):this.elements.buttons[n]=r,r},createRange(s,e){const t=fe("input",Ue(Yt(this.config.selectors.inputs[s]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":st.get(s,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[s]=t,X.updateRangeFill.call(this,t),LI.setup(t),t},createProgress(s,e){const t=fe("progress",Ue(Yt(this.config.selectors.display[s]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if(s!=="volume"){t.appendChild(fe("span",null,"0"));const n={played:"played",buffer:"buffered"}[s],i=n?st.get(n,this.config):"";t.innerText=`% ${i.toLowerCase()}`}return this.elements.display[s]=t,t},createTime(s,e){const t=Yt(this.config.selectors.display[s],e),n=fe("div",Ue(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":st.get(s,this.config),role:"timer"}),"00:00");return this.elements.display[s]=n,n},bindMenuItemShortcuts(s,e){Ie.call(this,s,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const n=Ls(s,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(t.key))X.showMenuPanel.call(this,e,!0);else{let i;t.key!==" "&&(t.key==="ArrowDown"||n&&t.key==="ArrowRight"?(i=s.nextElementSibling,k.element(i)||(i=s.parentNode.firstElementChild)):(i=s.previousElementSibling,k.element(i)||(i=s.parentNode.lastElementChild)),po.call(this,i,!0))}},!1),Ie.call(this,s,"keyup",t=>{t.key==="Return"&&X.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:s,list:e,type:t,title:n,badge:i=null,checked:r=!1}){const o=Yt(this.config.selectors.inputs[t]),l=fe("button",Ue(o,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${o.class?o.class:""}`.trim(),"aria-checked":r,value:s})),d=fe("span");d.innerHTML=n,k.element(i)&&d.appendChild(i),l.appendChild(d),Object.defineProperty(l,"checked",{enumerable:!0,get:()=>l.getAttribute("aria-checked")==="true",set(c){c&&Array.from(l.parentNode.children).filter(u=>Ls(u,'[role="menuitemradio"]')).forEach(u=>u.setAttribute("aria-checked","false")),l.setAttribute("aria-checked",c?"true":"false")}}),this.listeners.bind(l,"click keyup",c=>{if(!k.keyboardEvent(c)||c.key===" "){switch(c.preventDefault(),c.stopPropagation(),l.checked=!0,t){case"language":this.currentTrack=Number(s);break;case"quality":this.quality=s;break;case"speed":this.speed=parseFloat(s)}X.showMenuPanel.call(this,"home",k.keyboardEvent(c))}},t,!1),X.bindMenuItemShortcuts.call(this,l,t),e.appendChild(l)},formatTime(s=0,e=!1){return k.number(s)?Oa(s,Gh(this.duration)>0,e):s},updateTimeDisplay(s=null,e=0,t=!1){k.element(s)&&k.number(e)&&(s.innerText=X.formatTime(e,t))},updateVolume(){this.supported.ui&&(k.element(this.elements.inputs.volume)&&X.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),k.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(s,e=0){k.element(s)&&(s.value=e,X.updateRangeFill.call(this,s))},updateProgress(s){if(!this.supported.ui||!k.event(s))return;let e=0;const t=(n,i)=>{const r=k.number(i)?i:0,o=k.element(n)?n:this.elements.display.buffer;if(k.element(o)){o.value=r;const l=o.getElementsByTagName("span")[0];k.element(l)&&(l.childNodes[0].nodeValue=r)}};if(s)switch(s.type){case"timeupdate":case"seeking":case"seeked":e=QI(this.currentTime,this.duration),s.type==="timeupdate"&&X.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(s){const e=k.event(s)?s.target:s;if(k.element(e)&&e.getAttribute("type")==="range"){if(Ls(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const t=X.formatTime(this.currentTime),n=X.formatTime(this.duration),i=st.get("seekLabel",this.config);e.setAttribute("aria-valuetext",i.replace("{currentTime}",t).replace("{duration}",n))}else if(Ls(e,this.config.selectors.inputs.volume)){const t=100*e.value;e.setAttribute("aria-valuenow",t),e.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else e.setAttribute("aria-valuenow",e.value);(tt.isWebKit||tt.isIPadOS)&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip(s){var e,t;if(!this.config.tooltips.seek||!k.element(this.elements.inputs.seek)||!k.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,r=u=>Ne(n,i,u);if(this.touch)return void r(!1);let o=0;const l=this.elements.progress.getBoundingClientRect();if(k.event(s))o=100/l.width*(s.pageX-l.left);else{if(!Na(n,i))return;o=parseFloat(n.style.left,10)}o<0?o=0:o>100&&(o=100);const d=this.duration/100*o;n.innerText=X.formatTime(d);const c=(e=this.config.markers)===null||e===void 0||(t=e.points)===null||t===void 0?void 0:t.find(({time:u})=>u===Math.round(d));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${o}%`,k.event(s)&&["mouseenter","mouseleave"].includes(s.type)&&r(s.type==="mouseenter")},timeUpdate(s){const e=!k.element(this.elements.display.duration)&&this.config.invertTime;X.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),s&&s.type==="timeupdate"&&this.media.seeking||X.updateProgress.call(this,s)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return As(this.elements.display.currentTime,!0),void As(this.elements.progress,!0);k.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const s=k.element(this.elements.display.duration);!s&&this.config.displayDuration&&this.paused&&X.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),s&&X.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&X.setMarkers.call(this),X.updateSeekTooltip.call(this)},toggleMenuButton(s,e){As(this.elements.settings.buttons[s],!e)},updateSetting(s,e,t){const n=this.elements.settings.panels[s];let i=null,r=e;if(s==="captions")i=this.currentTrack;else{if(i=k.empty(t)?this[s]:t,k.empty(i)&&(i=this.config[s].default),!k.empty(this.options[s])&&!this.options[s].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${s}`);if(!this.config[s].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${s}`)}if(k.element(r)||(r=n&&n.querySelector('[role="menu"]')),!k.element(r))return;this.elements.settings.buttons[s].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=X.getLabel.call(this,s,i);const o=r&&r.querySelector(`[value="${i}"]`);k.element(o)&&(o.checked=!0)},getLabel(s,e){switch(s){case"speed":return e===1?st.get("normal",this.config):`${e}&times;`;case"quality":if(k.number(e)){const t=st.get(`qualityLabel.${e}`,this.config);return t.length?t:`${e}p`}return $h(e);case"captions":return Be.getLabel.call(this);default:return null}},setQualityMenu(s){if(!k.element(this.elements.settings.panels.quality))return;const e="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');k.array(s)&&(this.options.quality=bo(s).filter(r=>this.config.quality.options.includes(r)));const n=!k.empty(this.options.quality)&&this.options.quality.length>1;if(X.toggleMenuButton.call(this,e,n),Ra(t),X.checkMenu.call(this),!n)return;const i=r=>{const o=st.get(`qualityBadge.${r}`,this.config);return o.length?X.createBadge.call(this,o):null};this.options.quality.sort((r,o)=>{const l=this.config.quality.options;return l.indexOf(r)>l.indexOf(o)?1:-1}).forEach(r=>{X.createMenuItem.call(this,{value:r,list:t,type:e,title:X.getLabel.call(this,"quality",r),badge:i(r)})}),X.updateSetting.call(this,e,t)},setCaptionsMenu(){if(!k.element(this.elements.settings.panels.captions))return;const s="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=Be.getTracks.call(this),n=!!t.length;if(X.toggleMenuButton.call(this,s,n),Ra(e),X.checkMenu.call(this),!n)return;const i=t.map((r,o)=>({value:o,checked:this.captions.toggled&&this.currentTrack===o,title:Be.getLabel.call(this,r),badge:r.language&&X.createBadge.call(this,r.language.toUpperCase()),list:e,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:st.get("disabled",this.config),list:e,type:"language"}),i.forEach(X.createMenuItem.bind(this)),X.updateSetting.call(this,s,e)},setSpeedMenu(){if(!k.element(this.elements.settings.panels.speed))return;const s="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const t=!k.empty(this.options.speed)&&this.options.speed.length>1;X.toggleMenuButton.call(this,s,t),Ra(e),X.checkMenu.call(this),t&&(this.options.speed.forEach(n=>{X.createMenuItem.call(this,{value:n,list:e,type:s,title:X.getLabel.call(this,"speed",n)})}),X.updateSetting.call(this,s,e))},checkMenu(){const{buttons:s}=this.elements.settings,e=!k.empty(s)&&Object.values(s).some(t=>!t.hidden);As(this.elements.settings.menu,!e)},focusFirstMenuItem(s,e=!1){if(this.elements.settings.popup.hidden)return;let t=s;k.element(t)||(t=Object.values(this.elements.settings.panels).find(i=>!i.hidden));const n=t.querySelector('[role^="menuitem"]');po.call(this,n,e)},toggleMenu(s){const{popup:e}=this.elements.settings,t=this.elements.buttons.settings;if(!k.element(e)||!k.element(t))return;const{hidden:n}=e;let i=n;if(k.boolean(s))i=s;else if(k.keyboardEvent(s)&&s.key==="Escape")i=!1;else if(k.event(s)){const r=k.function(s.composedPath)?s.composedPath()[0]:s.target,o=e.contains(r);if(o||!o&&s.target!==t&&i)return}t.setAttribute("aria-expanded",i),As(e,!i),Ne(this.elements.container,this.config.classNames.menu.open,i),i&&k.keyboardEvent(s)?X.focusFirstMenuItem.call(this,null,!0):i||n||po.call(this,t,k.keyboardEvent(s))},getMenuSize(s){const e=s.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),s.parentNode.appendChild(e);const t=e.scrollWidth,n=e.scrollHeight;return rs(e),{width:t,height:n}},showMenuPanel(s="",e=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${s}`);if(!k.element(t))return;const n=t.parentNode,i=Array.from(n.children).find(r=>!r.hidden);if(ze.transitions&&!ze.reducedMotion){n.style.width=`${i.scrollWidth}px`,n.style.height=`${i.scrollHeight}px`;const r=X.getMenuSize.call(this,t),o=l=>{l.target===n&&["width","height"].includes(l.propertyName)&&(n.style.width="",n.style.height="",Da.call(this,n,fo,o))};Ie.call(this,n,fo,o),n.style.width=`${r.width}px`,n.style.height=`${r.height}px`}As(i,!0),As(t,!1),X.focusFirstMenuItem.call(this,t,e)},setDownloadUrl(){const s=this.elements.buttons.download;k.element(s)&&s.setAttribute("href",this.download)},create(s){const{bindMenuItemShortcuts:e,createButton:t,createProgress:n,createRange:i,createTime:r,setQualityMenu:o,setSpeedMenu:l,showMenuPanel:d}=X;this.elements.controls=null,k.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const c=fe("div",Yt(this.config.selectors.controls.wrapper));this.elements.controls=c;const u={class:"plyr__controls__item"};return bo(k.array(this.config.controls)?this.config.controls:[]).forEach(m=>{if(m==="restart"&&c.appendChild(t.call(this,"restart",u)),m==="rewind"&&c.appendChild(t.call(this,"rewind",u)),m==="play"&&c.appendChild(t.call(this,"play",u)),m==="fast-forward"&&c.appendChild(t.call(this,"fast-forward",u)),m==="progress"){const f=fe("div",{class:`${u.class} plyr__progress__container`}),p=fe("div",Yt(this.config.selectors.progress));if(p.appendChild(i.call(this,"seek",{id:`plyr-seek-${s.id}`})),p.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const h=fe("span",{class:this.config.classNames.tooltip},"00:00");p.appendChild(h),this.elements.display.seekTooltip=h}this.elements.progress=p,f.appendChild(this.elements.progress),c.appendChild(f)}if(m==="current-time"&&c.appendChild(r.call(this,"currentTime",u)),m==="duration"&&c.appendChild(r.call(this,"duration",u)),m==="mute"||m==="volume"){let{volume:f}=this.elements;if(k.element(f)&&c.contains(f)||(f=fe("div",Ue({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),m==="mute"&&f.appendChild(t.call(this,"mute")),m==="volume"&&!tt.isIos&&!tt.isIPadOS){const p={max:1,step:.05,value:this.config.volume};f.appendChild(i.call(this,"volume",Ue(p,{id:`plyr-volume-${s.id}`})))}}if(m==="captions"&&c.appendChild(t.call(this,"captions",u)),m==="settings"&&!k.empty(this.config.settings)){const f=fe("div",Ue({},u,{class:`${u.class} plyr__menu`.trim(),hidden:""}));f.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${s.id}`,"aria-expanded":!1}));const p=fe("div",{class:"plyr__menu__container",id:`plyr-settings-${s.id}`,hidden:""}),h=fe("div"),g=fe("div",{id:`plyr-settings-${s.id}-home`}),y=fe("div",{role:"menu"});g.appendChild(y),h.appendChild(g),this.elements.settings.panels.home=g,this.config.settings.forEach(b=>{const w=fe("button",Ue(Yt(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(this,w,b),Ie.call(this,w,"click",()=>{d.call(this,b,!1)});const _=fe("span",null,st.get(b,this.config)),C=fe("span",{class:this.config.classNames.menu.value});C.innerHTML=s[b],_.appendChild(C),w.appendChild(_),y.appendChild(w);const E=fe("div",{id:`plyr-settings-${s.id}-${b}`,hidden:""}),A=fe("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});A.appendChild(fe("span",{"aria-hidden":!0},st.get(b,this.config))),A.appendChild(fe("span",{class:this.config.classNames.hidden},st.get("menuBack",this.config))),Ie.call(this,E,"keydown",T=>{T.key==="ArrowLeft"&&(T.preventDefault(),T.stopPropagation(),d.call(this,"home",!0))},!1),Ie.call(this,A,"click",()=>{d.call(this,"home",!1)}),E.appendChild(A),E.appendChild(fe("div",{role:"menu"})),h.appendChild(E),this.elements.settings.buttons[b]=w,this.elements.settings.panels[b]=E}),p.appendChild(h),f.appendChild(p),c.appendChild(f),this.elements.settings.popup=p,this.elements.settings.menu=f}if(m==="pip"&&ze.pip&&c.appendChild(t.call(this,"pip",u)),m==="airplay"&&ze.airplay&&c.appendChild(t.call(this,"airplay",u)),m==="download"){const f=Ue({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:p}=this.config.urls;!k.url(p)&&this.isEmbed&&Ue(f,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(t.call(this,"download",f))}m==="fullscreen"&&c.appendChild(t.call(this,"fullscreen",u))}),this.isHTML5&&o.call(this,us.getQualityOptions.call(this)),l.call(this),c},inject(){if(this.config.loadSprite){const i=X.getIconUrl.call(this);i.cors&&zh(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let s=null;this.elements.controls=null;const e={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;k.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,e)),this.config.controls||(this.config.controls=[]),k.element(this.config.controls)||k.string(this.config.controls)?s=this.config.controls:(s=X.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Be.getLabel.call(this)}),t=!1);let n;if(t&&k.string(this.config.controls)&&(s=(i=>{let r=i;return Object.entries(e).forEach(([o,l])=>{r=Tn(r,`{${o}}`,l)}),r})(s)),k.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),k.element(n)||(n=this.elements.container),n[k.element(s)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",s),k.element(this.elements.controls)||X.findElements.call(this),!k.empty(this.elements.buttons)){const i=r=>{const o=this.config.classNames.controlPressed;r.setAttribute("aria-pressed","false"),Object.defineProperty(r,"pressed",{configurable:!0,enumerable:!0,get:()=>Na(r,o),set(l=!1){Ne(r,o,l),r.setAttribute("aria-pressed",l?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(r=>{k.array(r)||k.nodeList(r)?Array.from(r).filter(Boolean).forEach(i):i(r)})}if(tt.isEdge&&Bh(n),this.config.tooltips.controls){const{classNames:i,selectors:r}=this.config,o=`${r.controls.wrapper} ${r.labels} .${i.hidden}`,l=kn.call(this,o);Array.from(l).forEach(d=>{Ne(d,this.config.classNames.hidden,!1),Ne(d,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var s,e;if(!this.duration||this.elements.markers)return;const t=(s=this.config.markers)===null||s===void 0||(e=s.points)===null||e===void 0?void 0:e.filter(({time:d})=>d>0&&d<this.duration);if(t==null||!t.length)return;const n=document.createDocumentFragment(),i=document.createDocumentFragment();let r=null;const o=`${this.config.classNames.tooltip}--visible`,l=d=>Ne(r,o,d);t.forEach(d=>{const c=fe("span",{class:this.config.classNames.marker},""),u=d.time/this.duration*100+"%";r&&(c.addEventListener("mouseenter",()=>{d.label||(r.style.left=u,r.innerHTML=d.label,l(!0))}),c.addEventListener("mouseleave",()=>{l(!1)})),c.addEventListener("click",()=>{this.currentTime=d.time}),c.style.left=u,i.appendChild(c)}),n.appendChild(i),this.config.tooltips.seek||(r=fe("span",{class:this.config.classNames.tooltip},""),n.appendChild(r)),this.elements.markers={points:i,tip:r},this.elements.progress.appendChild(n)}};function jh(s,e=!0){let t=s;if(e){const n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch{return null}}function Hh(s){const e=new URLSearchParams;return k.object(s)&&Object.entries(s).forEach(([t,n])=>{e.set(t,n)}),e}const Be={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!ze.textTracks)return void(k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&X.setCaptionsMenu.call(this));if(k.element(this.elements.captions)||(this.elements.captions=fe("div",Yt(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),WI(this.elements.captions,this.elements.wrapper)),tt.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(i=>{const r=i.getAttribute("src"),o=jh(r);o!==null&&o.hostname!==window.location.href.hostname&&["http:","https:"].includes(o.protocol)&&xn(r,"blob").then(l=>{i.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{rs(i)})})}const s=bo((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();e==="auto"&&([e]=s);let t=this.storage.get("captions");if(k.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:e,languages:s}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";Ie.call(this,this.media.textTracks,n,Be.update.bind(this))}setTimeout(Be.update.bind(this),0)},update(){const s=Be.getTracks.call(this,!0),{active:e,language:t,meta:n,currentTrackNode:i}=this.captions,r=!!s.find(o=>o.language===t);this.isHTML5&&this.isVideo&&s.filter(o=>!n.get(o)).forEach(o=>{this.debug.log("Track added",o),n.set(o,{default:o.mode==="showing"}),o.mode==="showing"&&(o.mode="hidden"),Ie.call(this,o,"cuechange",()=>Be.updateCues.call(this))}),(r&&this.language!==t||!s.includes(i))&&(Be.setLanguage.call(this,t),Be.toggle.call(this,e&&r)),this.elements&&Ne(this.elements.container,this.config.classNames.captions.enabled,!k.empty(s)),k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&X.setCaptionsMenu.call(this)},toggle(s,e=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,n=this.config.classNames.captions.active,i=k.nullOrUndefined(s)?!t:s;if(i!==t){if(e||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!e){const r=Be.getTracks.call(this),o=Be.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=o.language,void Be.set.call(this,r.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Ne(this.elements.container,n,i),this.captions.toggled=i,X.updateSetting.call(this,"captions"),pe.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(s,e=!0){const t=Be.getTracks.call(this);if(s!==-1)if(k.number(s))if(s in t){if(this.captions.currentTrack!==s){this.captions.currentTrack=s;const n=t[s],{language:i}=n||{};this.captions.currentTrackNode=n,X.updateSetting.call(this,"captions"),e||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),pe.call(this,this.media,"languagechange")}Be.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Be.updateCues.call(this)}else this.debug.warn("Track not found",s);else this.debug.warn("Invalid caption argument",s);else Be.toggle.call(this,!1,e)},setLanguage(s,e=!0){if(!k.string(s))return void this.debug.warn("Invalid language argument",s);const t=s.toLowerCase();this.captions.language=t;const n=Be.getTracks.call(this),i=Be.findTrack.call(this,[t]);Be.set.call(this,n.indexOf(i),e)},getTracks(s=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||s||this.captions.meta.has(e)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(s,e=!1){const t=Be.getTracks.call(this),n=o=>Number((this.captions.meta.get(o)||{}).default),i=Array.from(t).sort((o,l)=>n(l)-n(o));let r;return s.every(o=>(r=i.find(l=>l.language===o),!r)),r||(e?i[0]:void 0)},getCurrentTrack(){return Be.getTracks.call(this)[this.currentTrack]},getLabel(s){let e=s;return!k.track(e)&&ze.textTracks&&this.captions.toggled&&(e=Be.getCurrentTrack.call(this)),k.track(e)?k.empty(e.label)?k.empty(e.language)?st.get("enabled",this.config):s.language.toUpperCase():e.label:st.get("disabled",this.config)},updateCues(s){if(!this.supported.ui)return;if(!k.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!k.nullOrUndefined(s)&&!Array.isArray(s))return void this.debug.warn("updateCues: Invalid input",s);let e=s;if(!e){const n=Be.getCurrentTrack.call(this);e=Array.from((n||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(n4)}const t=e.map(n=>n.trim()).join(`
37
- `);if(t!==this.elements.captions.innerHTML){Ra(this.elements.captions);const n=fe("span",Yt(this.config.selectors.caption));n.innerHTML=t,this.elements.captions.appendChild(n),pe.call(this,this.media,"cuechange")}}},Wh={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},_o={active:"picture-in-picture",inactive:"inline"},hs={html5:"html5",youtube:"youtube",vimeo:"vimeo"},ko={audio:"audio",video:"video"};function r4(s){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(s)?hs.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(s)?hs.vimeo:null}const Eo=()=>{};class o4{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Eo}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Eo}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Eo}}class Ft{constructor(e){Z(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;k.element(t)&&(t.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;pe.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),Z(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ne(this.target,this.player.config.classNames.fullscreen.fallback,t),tt.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const r=k.string(n.content)&&n.content.includes(i);t?(this.cleanupViewport=!r,r||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(o=>o.trim()!==i).join(","))}this.onChange()}),Z(this,"trapFocus",t=>{if(tt.isIos||tt.isIPadOS||!this.active||t.key!=="Tab")return;const n=document.activeElement,i=kn.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[r]=i,o=i[i.length-1];n!==o||t.shiftKey?n===r&&t.shiftKey&&(o.focus(),t.preventDefault()):(r.focus(),t.preventDefault())}),Z(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Ft.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ne(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Z(this,"enter",()=>{this.supported&&(tt.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ft.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Z(this,"exit",()=>{if(this.supported)if(tt.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Jt(this.player.play());else if(!Ft.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!k.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),Z(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Ft.prefix,this.property=Ft.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&KI(this.player.elements.container,e.config.fullscreen.container),Ie.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ie.call(this.player,this.player.elements.container,"dblclick",t=>{k.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),Ie.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ft.nativeSupported&&!this.forceFallback}static get prefix(){if(k.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!k.function(document[`${t}ExitFullscreen`])&&!k.function(document[`${t}CancelFullScreen`]))&&(e=t,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ft.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ft.nativeSupported||!tt.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ft.nativeSupported||this.forceFallback)return Na(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return tt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Fa(s,e=1){return new Promise((t,n)=>{const i=new Image,r=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?t:n)(i)};Object.assign(i,{onload:r,onerror:r,src:s})})}const Oe={addStyleHook(){Ne(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ne(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(s=!1){s&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Oe.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(X.inject.call(this),this.listeners.controls()),Oe.toggleNativeControls.call(this),this.isHTML5&&Be.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,X.updateVolume.call(this),X.timeUpdate.call(this),X.durationUpdate.call(this),Oe.checkPlaying.call(this),Ne(this.elements.container,this.config.classNames.pip.supported,ze.pip&&this.isHTML5&&this.isVideo),Ne(this.elements.container,this.config.classNames.airplay.supported,ze.airplay&&this.isHTML5),Ne(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{pe.call(this,this.media,"ready")},0),Oe.setTitle.call(this),this.poster&&Oe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&X.durationUpdate.call(this),this.config.mediaMetadata&&X.setMediaMetadata.call(this)},setTitle(){let s=st.get("play",this.config);if(k.string(this.config.title)&&!k.empty(this.config.title)&&(s+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",s)}),this.isEmbed){const e=Xe.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,n=st.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(s){Ne(this.elements.container,this.config.classNames.posterEnabled,s)},setPoster(s,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",s),this.elements.poster.removeAttribute("hidden"),JI.call(this).then(()=>Fa(s)).catch(t=>{throw s===this.poster&&Oe.togglePoster.call(this,!1),t}).then(()=>{if(s!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${s}')`,backgroundSize:""}),Oe.togglePoster.call(this,!0),s)))},checkPlaying(s){Ne(this.elements.container,this.config.classNames.playing,this.playing),Ne(this.elements.container,this.config.classNames.paused,this.paused),Ne(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",st.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Oe.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Ne(this.elements.container,this.config.classNames.loading,this.loading),Oe.toggleControls.call(this)},this.loading?250:0)},toggleControls(s){const{controls:e}=this.elements;if(e&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(s||this.loading||this.paused||e.pressed||e.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(s=>!k.empty(s)&&k.string(s)&&s.startsWith("--plyr")).forEach(s=>{this.elements.container.style.setProperty(s,this.media.style.getPropertyValue(s)),this.media.style.removeProperty(s)}),k.empty(this.media.style)&&this.media.removeAttribute("style")}};class l4{constructor(e){Z(this,"firstTouch",()=>{const{player:t}=this,{elements:n}=t;t.touch=!0,Ne(n.container,t.config.classNames.isTouch,!0)}),Z(this,"global",(t=!0)=>{const{player:n}=this;n.config.keyboard.global&&En.call(n,window,"keydown keyup",this.handleKey,t,!1),En.call(n,document.body,"click",this.toggleMenu,t),yo.call(n,document.body,"touchstart",this.firstTouch)}),Z(this,"container",()=>{const{player:t}=this,{config:n,elements:i,timers:r}=t;!n.keyboard.global&&n.keyboard.focused&&Ie.call(t,i.container,"keydown keyup",this.handleKey,!1),Ie.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",d=>{const{controls:c}=i;c&&d.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let u=0;["touchstart","touchmove","mousemove"].includes(d.type)&&(Oe.toggleControls.call(t,!0),u=t.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),u)});const o=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const d=i.wrapper,{active:c}=t.fullscreen,[u,m]=wo.call(t),f=Oh(`aspect-ratio: ${u} / ${m}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[p,h]=XI(),g=p/h>u/m;f?(d.style.width=g?"auto":"100%",d.style.height=g?"100%":"auto"):(d.style.maxWidth=g?h/m*u+"px":null,d.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(r.resized),r.resized=setTimeout(o,50)};Ie.call(t,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=t.fullscreen;c===i.container&&(!t.isEmbed&&k.empty(t.config.ratio)||(o(),(d.type==="enterfullscreen"?Ie:Da).call(t,window,"resize",l)))})}),Z(this,"media",()=>{const{player:t}=this,{elements:n}=t;if(Ie.call(t,t.media,"timeupdate seeking seeked",r=>X.timeUpdate.call(t,r)),Ie.call(t,t.media,"durationchange loadeddata loadedmetadata",r=>X.durationUpdate.call(t,r)),Ie.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Ie.call(t,t.media,"progress playing seeking seeked",r=>X.updateProgress.call(t,r)),Ie.call(t,t.media,"volumechange",r=>X.updateVolume.call(t,r)),Ie.call(t,t.media,"playing play pause ended emptied timeupdate",r=>Oe.checkPlaying.call(t,r)),Ie.call(t,t.media,"waiting canplay seeked playing",r=>Oe.checkLoading.call(t,r)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const r=Xe.call(t,`.${t.config.classNames.video}`);if(!k.element(r))return;Ie.call(t,n.container,"click",o=>{([n.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(o,t.restart,"restart"),this.proxy(o,()=>{Jt(t.play())},"play")):this.proxy(o,()=>{Jt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Ie.call(t,n.wrapper,"contextmenu",r=>{r.preventDefault()},!1),Ie.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Ie.call(t,t.media,"ratechange",()=>{X.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Ie.call(t,t.media,"qualitychange",r=>{X.updateSetting.call(t,"quality",null,r.detail.quality)}),Ie.call(t,t.media,"ready qualitychange",()=>{X.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Ie.call(t,t.media,i,r=>{let{detail:o={}}=r;r.type==="error"&&(o=t.media.error),pe.call(t,n.container,r.type,!0,o)})}),Z(this,"proxy",(t,n,i)=>{const{player:r}=this,o=r.config.listeners[i];let l=!0;k.function(o)&&(l=o.call(r,t)),l!==!1&&k.function(n)&&n.call(r,t)}),Z(this,"bind",(t,n,i,r,o=!0)=>{const{player:l}=this,d=l.config.listeners[r],c=k.function(d);Ie.call(l,t,n,u=>this.proxy(u,i,r),o&&!c)}),Z(this,"controls",()=>{const{player:t}=this,{elements:n}=t,i=tt.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(r=>{this.bind(r,"click",()=>{Jt(t.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{pe.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",r=>{r.stopPropagation(),r.preventDefault(),X.toggleMenu.call(t,r)},null,!1),this.bind(n.buttons.settings,"keyup",r=>{[" ","Enter"].includes(r.key)&&(r.key!=="Enter"?(r.preventDefault(),r.stopPropagation(),X.toggleMenu.call(t,r)):X.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",r=>{r.key==="Escape"&&X.toggleMenu.call(t,r)}),this.bind(n.inputs.seek,"mousedown mousemove",r=>{const o=n.progress.getBoundingClientRect(),l=100/o.width*(r.pageX-o.left);r.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",r=>{const o=r.currentTarget,l="play-on-seeked";if(k.keyboardEvent(r)&&!["ArrowLeft","ArrowRight"].includes(r.key))return;t.lastSeekTime=Date.now();const d=o.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(r.type);d&&c?(o.removeAttribute(l),Jt(t.play())):!c&&t.playing&&(o.setAttribute(l,""),t.pause())}),tt.isIos){const r=kn.call(t,'input[type="range"]');Array.from(r).forEach(o=>this.bind(o,i,l=>Bh(l.target)))}this.bind(n.inputs.seek,i,r=>{const o=r.currentTarget;let l=o.getAttribute("seek-value");k.empty(l)&&(l=o.value),o.removeAttribute("seek-value"),t.currentTime=l/o.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",r=>X.updateSeekTooltip.call(t,r)),this.bind(n.progress,"mousemove touchmove",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startMove(r)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startScrubbing(r)}),this.bind(n.progress,"mouseup touchend",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endScrubbing(r)}),tt.isWebKit&&Array.from(kn.call(t,'input[type="range"]')).forEach(r=>{this.bind(r,"input",o=>X.updateRangeFill.call(t,o.target))}),t.config.toggleInvert&&!k.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,X.timeUpdate.call(t))}),this.bind(n.inputs.volume,i,r=>{t.volume=r.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",r=>{n.controls.hover=!t.touch&&r.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(r=>!r.contains(n.container)).forEach(r=>{this.bind(r,"mouseenter mouseleave",o=>{n.controls&&(n.controls.hover=!t.touch&&o.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",r=>{n.controls.pressed=["mousedown","touchstart"].includes(r.type)}),this.bind(n.controls,"focusin",()=>{const{config:r,timers:o}=t;Ne(n.controls,r.classNames.noTransition,!0),Oe.toggleControls.call(t,!0),setTimeout(()=>{Ne(n.controls,r.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),l)}),this.bind(n.inputs.volume,"wheel",r=>{const o=r.webkitDirectionInvertedFromDevice,[l,d]=[r.deltaX,-r.deltaY].map(m=>o?-m:m),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);t.increaseVolume(c/50);const{volume:u}=t.media;(c===1&&u<1||c===-1&&u>0)&&r.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:i,type:r,altKey:o,ctrlKey:l,metaKey:d,shiftKey:c}=e,u=r==="keydown",m=u&&i===this.lastKey;if(!(o||l||d||c)&&i){if(u){const p=document.activeElement;if(k.element(p)){const{editable:h}=t.config.selectors,{seek:g}=n.inputs;if(p!==g&&Ls(p,h)||e.key===" "&&Ls(p,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m||(f=parseInt(i,10),t.currentTime=t.duration/10*f);break;case" ":case"k":m||Jt(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":m||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":m||t.toggleCaptions();break;case"l":t.loop=!t.loop}i==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){X.toggleMenu.call(this.player,e)}}function c4(s,e){return s(e={exports:{}},e.exports),e.exports}var d4=c4(function(s,e){s.exports=function(){var t=function(){},n={},i={},r={};function o(f,p){f=f.push?f:[f];var h,g,y,b=[],w=f.length,_=w;for(h=function(C,E){E.length&&b.push(C),--_||p(b)};w--;)g=f[w],(y=i[g])?h(g,y):(r[g]=r[g]||[]).push(h)}function l(f,p){if(f){var h=r[f];if(i[f]=p,h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function d(f,p){f.call&&(f={success:f}),p.length?(f.error||t)(p):(f.success||t)(f)}function c(f,p,h,g){var y,b,w=document,_=h.async,C=(h.numRetries||0)+1,E=h.before||t,A=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(A)?((b=w.createElement("link")).rel="stylesheet",b.href=T,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(A)?(b=w.createElement("img")).src=T:((b=w.createElement("script")).src=f,b.async=_===void 0||_),b.onload=b.onerror=b.onbeforeload=function(R){var I=R.type[0];if(y)try{b.sheet.cssText.length||(I="e")}catch(v){v.code!=18&&(I="e")}if(I=="e"){if((g+=1)<C)return c(f,p,h,g)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";p(f,I,R.defaultPrevented)},E(f,b)!==!1&&w.head.appendChild(b)}function u(f,p,h){var g,y,b=(f=f.push?f:[f]).length,w=b,_=[];for(g=function(C,E,A){if(E=="e"&&_.push(C),E=="b"){if(!A)return;_.push(C)}--b||p(_)},y=0;y<w;y++)c(f[y],g,h)}function m(f,p,h){var g,y;if(p&&p.trim&&(g=p),y=(g?h:p)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function b(w,_){u(f,function(C){d(y,C),w&&d({success:w,error:_},C),l(g,C)},y)}if(y.returnPromise)return new Promise(b);b()}return m.ready=function(f,p){return o(f,function(h){d(p,h)}),m},m.done=function(f){l(f,[])},m.reset=function(){n={},i={},r={}},m.isDefined=function(f){return f in n},m}()});function To(s){return new Promise((e,t)=>{d4(s,{success:e,error:t})})}function u4(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function h4(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function An(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}const Co={setup(){const s=this;Ne(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,js.call(s),k.object(window.Vimeo)?Co.ready.call(s):To(s.config.urls.vimeo.sdk).then(()=>{Co.ready.call(s)}).catch(e=>{s.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const s=this,e=s.config.vimeo,{premium:t,referrerPolicy:n,...i}=e;let r=s.media.getAttribute("src"),o="";k.empty(r)?(r=s.media.getAttribute(s.config.attributes.embed.id),o=s.media.getAttribute(s.config.attributes.embed.hash)):o=h4(r);const l=o?{h:o}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=Hh({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=u4(r),u=fe("iframe"),m=So(s.config.urls.vimeo.iframe,c,d);if(u.setAttribute("src",m),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),k.empty(n)||u.setAttribute("referrerPolicy",n),t||!e.customControls)u.setAttribute("data-poster",s.poster),s.media=va(u,s.media);else{const w=fe("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});w.appendChild(u),s.media=va(w,s.media)}e.customControls||xn(So(s.config.urls.vimeo.api,m)).then(w=>{!k.empty(w)&&w.thumbnail_url&&Oe.setPoster.call(s,w.thumbnail_url).catch(()=>{})}),s.embed=new window.Vimeo.Player(u,{autopause:s.config.autopause,muted:s.muted}),s.media.paused=!0,s.media.currentTime=0,s.supported.ui&&s.embed.disableTextTrack(),s.media.play=()=>(An.call(s,!0),s.embed.play()),s.media.pause=()=>(An.call(s,!1),s.embed.pause()),s.media.stop=()=>{s.pause(),s.currentTime=0};let{currentTime:f}=s.media;Object.defineProperty(s.media,"currentTime",{get:()=>f,set(w){const{embed:_,media:C,paused:E,volume:A}=s,T=E&&!_.hasPlayed;C.seeking=!0,pe.call(s,C,"seeking"),Promise.resolve(T&&_.setVolume(0)).then(()=>_.setCurrentTime(w)).then(()=>T&&_.pause()).then(()=>T&&_.setVolume(A)).catch(()=>{})}});let p=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>p,set(w){s.embed.setPlaybackRate(w).then(()=>{p=w,pe.call(s,s.media,"ratechange")}).catch(()=>{s.options.speed=[1]})}});let{volume:h}=s.config;Object.defineProperty(s.media,"volume",{get:()=>h,set(w){s.embed.setVolume(w).then(()=>{h=w,pe.call(s,s.media,"volumechange")})}});let{muted:g}=s.config;Object.defineProperty(s.media,"muted",{get:()=>g,set(w){const _=!!k.boolean(w)&&w;s.embed.setMuted(!!_||s.config.muted).then(()=>{g=_,pe.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(w){const _=k.boolean(w)?w:s.config.loop.active;s.embed.setLoop(_).then(()=>{b=_})}}),s.embed.getVideoUrl().then(w=>{y=w,X.setDownloadUrl.call(s)}).catch(w=>{this.debug.warn(w)}),Object.defineProperty(s.media,"currentSrc",{get:()=>y}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration}),Promise.all([s.embed.getVideoWidth(),s.embed.getVideoHeight()]).then(w=>{const[_,C]=w;s.embed.ratio=Vh(_,C),js.call(this)}),s.embed.setAutopause(s.config.autopause).then(w=>{s.config.autopause=w}),s.embed.getVideoTitle().then(w=>{s.config.title=w,Oe.setTitle.call(this)}),s.embed.getCurrentTime().then(w=>{f=w,pe.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(w=>{s.media.duration=w,pe.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(w=>{s.media.textTracks=w,Be.setup.call(s)}),s.embed.on("cuechange",({cues:w=[]})=>{const _=w.map(C=>s4(C.text));Be.updateCues.call(s,_)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(w=>{An.call(s,!w),w||pe.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{pe.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{pe.call(s,s.media,"playing")}),s.embed.on("play",()=>{An.call(s,!0),pe.call(s,s.media,"playing")}),s.embed.on("pause",()=>{An.call(s,!1)}),s.embed.on("timeupdate",w=>{s.media.seeking=!1,f=w.seconds,pe.call(s,s.media,"timeupdate")}),s.embed.on("progress",w=>{s.media.buffered=w.percent,pe.call(s,s.media,"progress"),parseInt(w.percent,10)===1&&pe.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(_=>{_!==s.media.duration&&(s.media.duration=_,pe.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,pe.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,pe.call(s,s.media,"ended")}),s.embed.on("error",w=>{s.media.error=w,pe.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Oe.build.call(s),0)}};function m4(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function Ln(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}function f4(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ma={setup(){if(Ne(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))Ma.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),Ma.ready.call(this)},To(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){xn(So(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:n,width:i}=e;this.config.title=t,Oe.setTitle.call(this),this.embed.ratio=Vh(i,n)}js.call(this)}).catch(()=>{js.call(this)})},ready(){const s=this,e=s.config.youtube,t=s.media&&s.media.getAttribute("id");if(!k.empty(t)&&t.startsWith("youtube-"))return;let n=s.media.getAttribute("src");k.empty(n)&&(n=s.media.getAttribute(this.config.attributes.embed.id));const i=m4(n),r=fe("div",{id:ZI(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=va(r,s.media),e.customControls){const o=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Fa(o("maxres"),121).catch(()=>Fa(o("sd"),121)).catch(()=>Fa(o("hq"))).then(l=>Oe.setPoster.call(s,l.src)).then(l=>{l.includes("maxres")||(s.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}s.embed=new window.YT.Player(s.media,{videoId:i,host:f4(e),playerVars:Ue({},{autoplay:s.config.autoplay?1:0,hl:s.config.hl,controls:s.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:s.config.playsinline&&!s.config.fullscreen.iosNative?1:0,cc_load_policy:s.captions.active?1:0,cc_lang_pref:s.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(o){if(!s.media.error){const l=o.data,d={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[l]||"An unknown error occurred";s.media.error={code:l,message:d},pe.call(s,s.media,"error")}},onPlaybackRateChange(o){const l=o.target;s.media.playbackRate=l.getPlaybackRate(),pe.call(s,s.media,"ratechange")},onReady(o){if(k.function(s.media.play))return;const l=o.target;Ma.getTitle.call(s,i),s.media.play=()=>{Ln.call(s,!0),l.playVideo()},s.media.pause=()=>{Ln.call(s,!1),l.pauseVideo()},s.media.stop=()=>{l.stopVideo()},s.media.duration=l.getDuration(),s.media.paused=!0,s.media.currentTime=0,Object.defineProperty(s.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(m){s.paused&&!s.embed.hasPlayed&&s.embed.mute(),s.media.seeking=!0,pe.call(s,s.media,"seeking"),l.seekTo(m)}}),Object.defineProperty(s.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(m){l.setPlaybackRate(m)}});let{volume:d}=s.config;Object.defineProperty(s.media,"volume",{get:()=>d,set(m){d=m,l.setVolume(100*d),pe.call(s,s.media,"volumechange")}});let{muted:c}=s.config;Object.defineProperty(s.media,"muted",{get:()=>c,set(m){const f=k.boolean(m)?m:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),pe.call(s,s.media,"volumechange")}}),Object.defineProperty(s.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration});const u=l.getAvailablePlaybackRates();s.options.speed=u.filter(m=>s.config.speed.options.includes(m)),s.supported.ui&&e.customControls&&s.media.setAttribute("tabindex",-1),pe.call(s,s.media,"timeupdate"),pe.call(s,s.media,"durationchange"),clearInterval(s.timers.buffering),s.timers.buffering=setInterval(()=>{s.media.buffered=l.getVideoLoadedFraction(),(s.media.lastBuffered===null||s.media.lastBuffered<s.media.buffered)&&pe.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),pe.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Oe.build.call(s),50)},onStateChange(o){const l=o.target;switch(clearInterval(s.timers.playing),s.media.seeking&&[1,2].includes(o.data)&&(s.media.seeking=!1,pe.call(s,s.media,"seeked")),o.data){case-1:pe.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),pe.call(s,s.media,"progress");break;case 0:Ln.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):pe.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(Ln.call(s,!0),pe.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{pe.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),pe.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),Ln.call(s,!1);break;case 3:pe.call(s,s.media,"waiting")}pe.call(s,s.elements.container,"statechange",!1,{code:o.data})}}})}},Kh={setup(){this.media?(Ne(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ne(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ne(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=fe("div",{class:this.config.classNames.video}),vh(this.media,this.elements.wrapper),this.elements.poster=fe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?us.setup.call(this):this.isYouTube?Ma.setup.call(this):this.isVimeo&&Co.setup.call(this)):this.debug.warn("No media element found!")}};class g4{constructor(e){Z(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():To(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Z(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),Z(this,"setupIMA",()=>{this.elements.container=fe("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),Z(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),Z(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Oa(Math.max(this.manager.getRemainingTime(),0)),i=`${st.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Z(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],r=>this.onAdEvent(r))}),this.trigger("loaded")}),Z(this,"addCuePoints",()=>{k.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const n=this.player.elements.progress;if(k.element(n)){const i=100/this.player.duration*t,r=fe("span",{class:this.player.config.classNames.cues});r.style.left=`${i.toString()}%`,n.appendChild(r)}}})}),Z(this,"onAdEvent",t=>{const{container:n}=this.player.elements,i=t.getAd(),r=t.getAdData();switch((o=>{pe.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn(`Non-fatal ad error: ${r.adError.getMessage()}`)}}),Z(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),Z(this,"listeners",()=>{const{container:t}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;k.empty(this.cuePoints)||this.cuePoints.forEach((r,o)=>{n<r&&r<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),Z(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),Z(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Jt(this.player.media.play())}),Z(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Z(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Z(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),Z(this,"trigger",(t,...n)=>{const i=this.events[t];k.array(i)&&i.forEach(r=>{k.function(r)&&r.apply(this,n)})}),Z(this,"on",(t,n)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(n),this)),Z(this,"startSafetyTimer",(t,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),Z(this,"clearSafetyTimer",t=>{k.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,n)=>{this.on("loaded",t),this.on("error",n)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!k.empty(e.publisherId)||k.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return k.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Hh({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function qh(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const p4=s=>{const e=[];return s.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const n={};t.split(/\r\n|\n|\r/).forEach(i=>{if(k.number(n.startTime)){if(!k.empty(i.trim())&&k.empty(n.text)){const r=i.trim().split("#xywh=");[n.text]=r,r[1]&&([n.x,n.y,n.w,n.h]=r[1].split(","))}}else{const r=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);r&&(n.startTime=60*Number(r[1]||0)*60+60*Number(r[2])+Number(r[3])+ +`0.${r[4]}`,n.endTime=60*Number(r[6]||0)*60+60*Number(r[7])+Number(r[8])+ +`0.${r[9]}`)}}),n.text&&e.push(n)}),e},Yh=(s,e)=>{const t={};return s>e.width/e.height?(t.width=e.width,t.height=1/s*e.width):(t.height=e.height,t.width=s*e.height),t};class xo{constructor(e){Z(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),Z(this,"getThumbnails",()=>new Promise(t=>{const{src:n}=this.player.config.previewThumbnails;if(k.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((r,o)=>r.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(k.function(n))n(r=>{this.thumbnails=r,i()});else{const r=(k.string(n)?[n]:n).map(o=>this.getThumbnail(o));Promise.all(r).then(i)}})),Z(this,"getThumbnail",t=>new Promise(n=>{xn(t).then(i=>{const r={frames:p4(i),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{r.height=o.naturalHeight,r.width=o.naturalWidth,this.thumbnails.push(r),n()},o.src=r.urlPrefix+r.frames[0].text})})),Z(this,"startMove",t=>{if(this.loaded&&k.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const r=this.player.elements.progress.getBoundingClientRect(),o=100/r.width*(t.pageX-r.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Oa(this.seekTime);const l=(n=this.player.config.markers)===null||n===void 0||(i=n.points)===null||i===void 0?void 0:i.find(({time:d})=>d===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),Z(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Z(this,"startScrubbing",t=>{(k.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),Z(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):yo.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Z(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),Z(this,"render",()=>{this.elements.thumb.container=fe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=fe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=fe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=fe("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),k.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=fe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Z(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Z(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(r=>this.seekTime>=r.startTime&&this.seekTime<=r.endTime),n=t>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((r,o)=>{this.loadedImages.includes(r.frames[t].text)&&(i=o)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}),Z(this,"loadImage",(t=0)=>{const n=this.showingThumb,i=this.thumbnails[t],{urlPrefix:r}=i,o=i.frames[n],l=i.frames[n].text,d=r+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,o,t,n,l,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=d,c.dataset.index=n,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${d}`),c.onload=()=>this.showImage(c,o,t,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),Z(this,"showImage",(t,n,i,r,o,l=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${r}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(t,n),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(i,t,n,o))}),Z(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:r}=this;setTimeout(()=>{r.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),Z(this,"preloadNearby",(t,n=!0)=>new Promise(i=>{setTimeout(()=>{const r=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===r){let o;o=n?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;o.forEach(d=>{const c=d.text;if(c!==r&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:u}=this.thumbnails[0],m=u+c,f=new Image;f.src=m,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),Z(this,"getHigherQuality",(t,n,i,r)=>{if(t<this.thumbnails.length-1){let o=n.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===r&&(this.player.debug.log(`Showing higher quality thumb for: ${r}`),this.loadImage(t+1))},300)}}),Z(this,"toggleThumbContainer",(t=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,t),!t&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"toggleScrubbingContainer",(t=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Z(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const n=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${n}px`}else if(t.clientHeight<20&&t.clientWidth>20){const n=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${n}px`}this.setThumbContainerPos()}),Z(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,r=n.left-t.left+10,o=n.right-t.left-i.clientWidth-10,l=this.mousePosX-t.left-i.clientWidth/2,d=qh(l,r,o);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),Z(this,"setScrubbingContainerSize",()=>{const{width:t,height:n}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${n}px`}),Z(this,"setImageSizeAndOffset",(t,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left=`-${n.x*i}px`,t.style.top=`-${n.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const Ao={insertElements(s,e){k.string(e)?Nh(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{Nh(s,this.media,t)})},change(s){Rh(s,"sources.length")?(us.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],rs(this.media),this.media=null,k.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=s,[{provider:n=hs.html5,src:i}]=e,r=n==="html5"?t:"div",o=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:t,supported:ze.check(t,n,this.config.playsinline),media:fe(r,o)}),this.elements.container.appendChild(this.media),k.boolean(s.autoplay)&&(this.config.autoplay=s.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),k.empty(s.poster)||(this.poster=s.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Oe.addStyleHook.call(this),this.isHTML5&&Ao.insertElements.call(this,"source",e),this.config.title=s.title,Kh.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&Ao.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.isHTML5&&this.media.load(),k.empty(s.previewThumbnails)||(Object.assign(this.config.previewThumbnails,s.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Hs{constructor(e,t){if(Z(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Jt(this.media.play())),this.media.play()):null),Z(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),Z(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),Z(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),Z(this,"restart",()=>{this.currentTime=0}),Z(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),Z(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),Z(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),Z(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),Z(this,"airplay",()=>{ze.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Z(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Na(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,u=Ne(this.elements.container,this.config.classNames.hideControls,c);if(u&&k.array(this.config.controls)&&this.config.controls.includes("settings")&&!k.empty(this.config.settings)&&X.toggleMenu.call(this,!1),u!==d){const m=u?"controlshidden":"controlsshown";pe.call(this,this.media,m)}return!u}return!1}),Z(this,"on",(l,d)=>{Ie.call(this,this.elements.container,l,d)}),Z(this,"once",(l,d)=>{yo.call(this,this.elements.container,l,d)}),Z(this,"off",(l,d)=>{Da(this.elements.container,l,d)}),Z(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(rs(this.elements.buttons.play),rs(this.elements.captions),rs(this.elements.controls),rs(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),k.function(l)&&l()):(YI.call(this),us.cancelRequests.call(this),va(this.elements.original,this.elements.container),pe.call(this,this.elements.original,"destroyed",!0),k.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Oe.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&k.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),Z(this,"supports",l=>ze.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ze.touch,this.media=e,k.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||k.nodeList(this.media)||k.array(this.media))&&(this.media=this.media[0]),this.config=Ue({},Wh,Hs.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new o4(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ze),k.nullOrUndefined(this.media)||!k.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!ze.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const i=this.media.tagName.toLowerCase();let r=null,o=null;switch(i){case"div":if(r=this.media.querySelector("iframe"),k.element(r)){if(o=jh(r.getAttribute("src")),this.provider=r4(o.toString()),this.elements.container=this.media,this.media=r,this.elements.container.className="",o.search.length){const l=["1","true"];l.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(k.empty(this.provider)||!Object.values(hs).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=ko.video;break;case"video":case"audio":this.type=i,this.provider=hs.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=ze.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new l4(this),this.storage=new Cn(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=fe("div"),vh(this.media,this.elements.container)),Oe.migrateStyles.call(this),Oe.addStyleHook.call(this),Kh.setup.call(this),this.config.debug&&Ie.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Ft(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new g4(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Jt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===hs.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===hs.youtube}get isVimeo(){return this.provider===hs.vimeo}get isVideo(){return this.type===ko.video}get isAudio(){return this.type===ko.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;const t=k.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return k.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=k.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;k.string(t)&&(t=Number(t)),k.number(t)||(t=this.storage.get("volume")),k.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!k.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;k.boolean(t)||(t=this.storage.get("muted")),k.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;k.number(e)&&(t=e),k.number(t)||(t=this.storage.get("speed")),k.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;t=qh(t,n,i),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!k.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(k.number),r=!0;if(!n.includes(i)){const o=Ph(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${o} instead`),i=o,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const t=k.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(e){Ao.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return k.url(e)?e:this.source}set download(e){k.url(e)&&(this.config.urls.download=e,X.setDownloadUrl.call(this))}set poster(e){this.isVideo?Oe.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=Pa(wo.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&Mh(e)?(this.config.ratio=Pa(e),js.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=k.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){Be.toggle.call(this,e,!1)}set currentTrack(e){Be.set.call(this,e,!1),Be.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Be.setLanguage.call(this,e,!1)}get language(){return(Be.getCurrentTrack.call(this)||{}).language}set pip(e){if(!ze.pip)return;const t=k.boolean(e)?e:!this.pip;k.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?_o.active:_o.inactive),k.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return ze.pip?k.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===_o.active:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))}static supported(e,t){return ze.check(e,t)}static loadSprite(e,t){return zh(e,t)}static setup(e,t={}){let n=null;return k.string(e)?n=Array.from(document.querySelectorAll(e)):k.nodeList(e)?n=Array.from(e):k.array(e)&&(n=e.filter(k.element)),k.empty(n)?null:n.map(i=>new Hs(i,t))}}Hs.defaults=HI(Wh);const y4={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},b4={class:"carousel-video-player__play-info-portrait__date"},w4={class:"carousel-video-player__play-info-portrait__game"},S4={key:2,class:"carousel-video-player__play-info__data"},_4={class:"video-container"},k4=["id"],E4=et({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1},isPortrait:{type:Boolean,default:!0},isMobileFull:{type:Boolean,default:!0},isIos:{type:Boolean,default:!1}},emits:["play-ended"],setup(s,{emit:e}){const t=s,n=a.ref(null),i=a.ref(!1),r=a.computed(()=>`p-${t.play.playId||t.play.play_id}`),o=a.computed(()=>{if(t.isPlaySeeker){const p=new Date(t.play.gameDate);return`${p.getDate()}, ${uL(p.getMonth())} ${p.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${gh[f.getMonth()]} ${f.getFullYear()}`}),l=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name} | ${t.play.event_type_name} ${t.play.player_name}`}),d=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name}`}),c=a.computed(()=>t.isPlaySeeker?`${t.play.categoryName} ${t.play.playerShortName}`:`${t.play.event_type_name} ${t.play.player_name}`);function u(){n.value=new Hs(`#${r.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=t.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=t.play.endSeconds&&(n.value.pause(),n.value.currentTime=t.play.startSeconds,e("play-ended"))})),n.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,t.play.videoPlayer=n.value,t.play.plyrInit=u,n.value.on("webkitfullscreenchange",m()),n.value.on("mozfullscreenchange",m()),n.value.on("fullscreenchange",m())}function m(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return a.onMounted(()=>{setTimeout(()=>{u()},100)}),(f,p)=>(a.openBlock(),a.createElementBlock("div",{class:"carousel-video-player",onMouseenter:p[0]||(p[0]=h=>i.value=!0),onMouseleave:p[1]||(p[1]=h=>i.value=!1)},[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["carousel-video-player__play-info",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!s.isPortrait||!s.isMobileFull?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["carousel-video-player__play-info__date",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},a.toDisplayString(o.value),3)):a.createCommentVNode("",!0),s.isPortrait&&s.isMobileFull?(a.openBlock(),a.createElementBlock("div",y4,[a.createElementVNode("div",b4,[a.createTextVNode(a.toDisplayString(o.value)+" - ",1),a.createElementVNode("div",w4,a.toDisplayString(d.value),1)]),a.createTextVNode(" "+a.toDisplayString(c.value),1)])):(a.openBlock(),a.createElementBlock("div",S4,a.toDisplayString(l.value),1))],2),[[a.vShow,i.value]]),a.createElementVNode("div",_4,[a.createElementVNode("video",{id:r.value,controls:"",preload:"auto","data-setup":"{}"},null,8,k4)])],32))}},[["__scopeId","data-v-96776f5d"]]),Lo=s=>(a.pushScopeId("data-v-64d330ca"),s=s(),a.popScopeId(),s),T4=[Lo(()=>a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[a.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],C4={class:"carousel-full-screen__carousel"},x4={key:0,class:"icon-mobil-scrren"},A4=[Lo(()=>a.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Lo(()=>a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],L4={class:"carousel-full-screen__carousel__video-player"},Io=2,I4=et({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(s,{emit:e}){const t=s;let n=0,i=new Map;const r=a.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),o=a.ref(null),l=a.ref([]);a.watch(()=>t.playerQueue,b=>{b.length&&(l.value=b.map((w,_)=>(w.index=_,{...w})),n=t.playlistIndex,i=new Map(l.value.map(w=>[w.index,w])))},{immediate:!0});function d(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|iPhone|iPad|Opera Mini/i.test(navigator.userAgent)}function c(){return/iPhone|iPad/i.test(navigator.userAgent)}function u({selectedItem:b}){if(n!==b.index){const w=b.index-n;n=b.index;const _=i.get(n+w*-1),C=i.get(n);if(_&&_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.currentTime=0),C&&C.videoPlayer&&C.videoPlayer.play(),w>0){const E=i.get(n+Io),A=i.get(n+1),T=i.get(n-Io);E&&(l.value.find(R=>R.index===E.index)||l.value.push(E)),A&&A.videoPlayer&&A.videoPlayer.isDestroyed&&A.plyrInit(),T&&T.videoPlayer&&(T.videoPlayer.pause(),T.videoPlayer.src="",T.videoPlayer.destroy(),T.videoPlayer.isDestroyed=!0)}else if(w<0){const E=i.get(n-1),A=i.get(n+Io);E&&E.videoPlayer&&E.videoPlayer.isDestroyed&&E.plyrInit(),A&&A.videoPlayer&&(A.videoPlayer.pause(),A.videoPlayer.src="",A.videoPlayer.destroy(),A.videoPlayer.isDestroyed=!0)}}}function m(){o.value&&o.value.next()}function f(){e("close",n)}const p=a.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),h=a.computed(()=>p.portrait);function g(){var b=window.matchMedia("(orientation: portrait)");b.matches?p.portrait=!0:p.portrait=!1}function y(){window.screen.orientation.angle!=90?p.portrait=!0:p.portrait=!1}return a.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((w,_)=>{w.id=`plyrFS${_+1}`})},100)}),a.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",y),t.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,w)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["carousel-full-screen",c()&&!h.value?"paddingIos":""]),id:"carousel-swipe"},[a.createElementVNode("div",{class:"carousel-full-screen__close",style:a.normalizeStyle(c()&&h.value?"padding-top:30px":""),onClick:f},T4,4),a.createElementVNode("div",C4,[h.value&&d()?(a.openBlock(),a.createElementBlock("div",x4,A4)):a.createCommentVNode("",!0),a.createVNode(a.unref(hI),a.mergeProps({ref_key:"gscCarousel",ref:o},r.value,{items:l.value,onInput:u}),{default:a.withCtx(({item:_})=>[a.createElementVNode("div",L4,[a.createVNode(E4,{play:_,"is-portrait":h.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":s.isPlaySeeker,onPlayEnded:m},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-64d330ca"]]),B4=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["DF",{matchDayId:181,matchDayName:"16vos de Final",matchDayAbbreviation:"DF"}],["OF",{matchDayId:176,matchDayName:"Octavos de Final",matchDayAbbreviation:"OF"}],["CF",{matchDayId:177,matchDayName:"Cuartos de Final",matchDayAbbreviation:"CF"}],["SF",{matchDayId:178,matchDayName:"Semifinales",matchDayAbbreviation:"SF"}],["3ER",{matchDayId:179,matchDayName:"Tercer lugar",matchDayAbbreviation:"3ER"}],["FINAL",{matchDayId:180,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),R4=new Map([["M1",{matchDayId:1,matchDayName:"16vos de Final Ida",matchDayAbbreviation:"DFI"}],["M2",{matchDayId:2,matchDayName:"16vos de Final Vuelta",matchDayAbbreviation:"DFV"}],["M3",{matchDayId:3,matchDayName:"Octavos de Final Ida",matchDayAbbreviation:"OFI"}],["M4",{matchDayId:4,matchDayName:"Octavos de Final Vuelta",matchDayAbbreviation:"OFV"}],["M5",{matchDayId:5,matchDayName:"Cuartos de Final Ida",matchDayAbbreviation:"CFI"}],["M6",{matchDayId:6,matchDayName:"Cuartos de Final Vuelta",matchDayAbbreviation:"CFV"}],["M7",{matchDayId:7,matchDayName:"Semifinales Ida",matchDayAbbreviation:"SFI"}],["M8",{matchDayId:8,matchDayName:"Semifinales Vuelta",matchDayAbbreviation:"SFV"}],["M10",{matchDayId:10,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),Jh={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Xh={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Zh={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Qh=new Map([[1,B4],[2,R4]]),v4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Bo={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},em=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},tm=Bo.setup;Bo.setup=tm?(s,e)=>(em(),tm(s,e)):em;const N4=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),D4=["src"],P4={key:1,class:"text"},O4=["src"],F4={class:"stats"},M4=N4(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),V4={class:"numstats"},$4={class:"leyend"};function U4(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,D4)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",P4,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,O4)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",F4,[M4,a.createElementVNode("div",V4,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",$4,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const z4=v4(Bo,[["render",U4],["__scopeId","data-v-fb269a1e"]]),G4={class:"gsc-dropdown__main-container__item-selected"},j4=["height","width"],H4=["stroke"],W4={class:"gsc-dropdown__items-container"},K4=["onClick"],q4={key:0,class:"gsc-dropdown__items-footer"},Y4={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",G4,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,H4)],8,j4))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",W4,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,K4))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",q4,[a.createVNode(a.unref(z4),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},J4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},X4={class:"tournament-select__selected-tournament"},Z4={class:"tournament-select__selected-tournament__logo"},Q4=["src"],eB={class:"tournament-select__selected-tournament__name"},tB="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",sB={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,n=a.ref([]),i=a.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),r=a.computed(()=>t.tournamentsIdsToInclude.size?d(n.value):n.value),o=a.computed(()=>r.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||r.value[0]);async function l(){try{if(t.items&&t.items.length)n.value=[...t.items];else{const p=await u();e("change-tournaments",p),n.value=p.map(h=>({...h.tournament,seasons:h.seasons,seasonsIds:h.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((h,g)=>h.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(h=>t.tournamentsIdsToInclude.has(h.id))}function c(p){const h=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return h.open("HEAD",g,!1),h.send(),h.status!==404}async function u(){try{return(await fetch(t.apiUrl||tB)).json()}catch(p){return Promise.reject(p)}}function m(p){e("input",p)}function f(p){e("input",p)}return a.onMounted(()=>{l()}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"tournament-select",style:a.normalizeStyle(i.value)},[a.createVNode(a.unref(Y4),a.mergeProps(t,{"model-value":o.value,items:r.value,onInput:m,"onUpdate:modelValue":f}),{default:a.withCtx(({selectedItem:g})=>[a.createElementVNode("div",X4,[a.createElementVNode("div",Z4,[c(g.id)?(a.openBlock(),a.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,Q4)):a.createCommentVNode("",!0)]),a.createElementVNode("div",eB,a.toDisplayString(g.name),1)])]),availableItem:a.withCtx(({item:g})=>[a.createElementVNode("div",null,a.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},nB=J4(sB,[["__scopeId","data-v-5c8e9511"]]),aB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},sm=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},nm=Ro.setup;Ro.setup=nm?(s,e)=>(sm(),nm(s,e)):sm;const iB=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),rB=["src"],oB={key:1,class:"text"},lB=["src"],cB={class:"stats"},dB=iB(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),uB={class:"numstats"},hB={class:"leyend"};function mB(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,rB)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",oB,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,lB)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",cB,[dB,a.createElementVNode("div",uB,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",hB,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const fB=aB(Ro,[["render",mB],["__scopeId","data-v-fb269a1e"]]),gB={class:"gsc-dropdown__main-container__item-selected"},pB=["height","width"],yB=["stroke"],bB={class:"gsc-dropdown__items-container"},wB=["onClick"],SB={key:0,class:"gsc-dropdown__items-footer"},_B={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",gB,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,yB)],8,pB))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",bB,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,wB))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",SB,[a.createVNode(a.unref(fB),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},kB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},EB={class:"season-name"},TB={class:"items-list-season"},CB={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,n=a.computed(()=>t.seasons.find(o=>o.id===t.currentSeasonId));function i(o){e("input",o)}function r(o){e("input",o)}return(o,l)=>(a.openBlock(),a.createBlock(a.unref(_B),{items:s.seasons,"model-value":n.value,height:"40px",width:"179px","background-color":"#0d1d29",color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:r,"onUpdate:modelValue":i},{default:a.withCtx(({selectedItem:d})=>[a.createElementVNode("div",EB,[a.createElementVNode("span",null,a.toDisplayString(d.name),1)])]),availableItem:a.withCtx(({item:d})=>[a.createElementVNode("span",TB,a.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},xB=kB(CB,[["__scopeId","data-v-81bba1d4"]]);function am(s,e){return function(){return s.apply(e,arguments)}}const{toString:AB}=Object.prototype,{getPrototypeOf:vo}=Object,Va=(s=>e=>{const t=AB.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Mt=s=>(s=s.toLowerCase(),e=>Va(e)===s),$a=s=>e=>typeof e===s,{isArray:Ws}=Array,In=$a("undefined");function LB(s){return s!==null&&!In(s)&&s.constructor!==null&&!In(s.constructor)&&xt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const im=Mt("ArrayBuffer");function IB(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&im(s.buffer),e}const BB=$a("string"),xt=$a("function"),rm=$a("number"),Ua=s=>s!==null&&typeof s=="object",RB=s=>s===!0||s===!1,za=s=>{if(Va(s)!=="object")return!1;const e=vo(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},vB=Mt("Date"),NB=Mt("File"),DB=Mt("Blob"),PB=Mt("FileList"),OB=s=>Ua(s)&&xt(s.pipe),FB=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||xt(s.append)&&((e=Va(s))==="formdata"||e==="object"&&xt(s.toString)&&s.toString()==="[object FormData]"))},MB=Mt("URLSearchParams"),[VB,$B,UB,zB]=["ReadableStream","Request","Response","Headers"].map(Mt),GB=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bn(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),Ws(s))for(n=0,i=s.length;n<i;n++)e.call(null,s[n],n,s);else{const r=t?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let l;for(n=0;n<o;n++)l=r[n],e.call(null,s[l],l,s)}}function om(s,e){e=e.toLowerCase();const t=Object.keys(s);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const Is=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lm=s=>!In(s)&&s!==Is;function No(){const{caseless:s}=lm(this)&&this||{},e={},t=(n,i)=>{const r=s&&om(e,i)||i;za(e[r])&&za(n)?e[r]=No(e[r],n):za(n)?e[r]=No({},n):Ws(n)?e[r]=n.slice():e[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Bn(arguments[n],t);return e}const jB=(s,e,t,{allOwnKeys:n}={})=>(Bn(e,(i,r)=>{t&&xt(i)?s[r]=am(i,t):s[r]=i},{allOwnKeys:n}),s),HB=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),WB=(s,e,t,n)=>{s.prototype=Object.create(e.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},KB=(s,e,t,n)=>{let i,r,o;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,e))&&!l[o]&&(e[o]=s[o],l[o]=!0);s=t!==!1&&vo(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},qB=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const n=s.indexOf(e,t);return n!==-1&&n===t},YB=s=>{if(!s)return null;if(Ws(s))return s;let e=s.length;if(!rm(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},JB=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&vo(Uint8Array)),XB=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(s,i[0],i[1])}},ZB=(s,e)=>{let t;const n=[];for(;(t=s.exec(e))!==null;)n.push(t);return n},QB=Mt("HTMLFormElement"),eR=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),cm=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),tR=Mt("RegExp"),dm=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),n={};Bn(t,(i,r)=>{let o;(o=e(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},sR=s=>{dm(s,(e,t)=>{if(xt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=s[t];if(xt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},nR=(s,e)=>{const t={},n=i=>{i.forEach(r=>{t[r]=!0})};return Ws(s)?n(s):n(String(s).split(e)),t},aR=()=>{},iR=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Do="abcdefghijklmnopqrstuvwxyz",um="0123456789",hm={DIGIT:um,ALPHA:Do,ALPHA_DIGIT:Do+Do.toUpperCase()+um},rR=(s=16,e=hm.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;s--;)t+=e[Math.random()*n|0];return t};function oR(s){return!!(s&&xt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const lR=s=>{const e=new Array(10),t=(n,i)=>{if(Ua(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const r=Ws(n)?[]:{};return Bn(n,(o,l)=>{const d=t(o,i+1);!In(d)&&(r[l]=d)}),e[i]=void 0,r}}return n};return t(s,0)},cR=Mt("AsyncFunction"),dR=s=>s&&(Ua(s)||xt(s))&&xt(s.then)&&xt(s.catch),mm=((s,e)=>s?setImmediate:e?((t,n)=>(Is.addEventListener("message",({source:i,data:r})=>{i===Is&&r===t&&n.length&&n.shift()()},!1),i=>{n.push(i),Is.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",xt(Is.postMessage)),uR=typeof queueMicrotask<"u"?queueMicrotask.bind(Is):typeof process<"u"&&process.nextTick||mm,F={isArray:Ws,isArrayBuffer:im,isBuffer:LB,isFormData:FB,isArrayBufferView:IB,isString:BB,isNumber:rm,isBoolean:RB,isObject:Ua,isPlainObject:za,isReadableStream:VB,isRequest:$B,isResponse:UB,isHeaders:zB,isUndefined:In,isDate:vB,isFile:NB,isBlob:DB,isRegExp:tR,isFunction:xt,isStream:OB,isURLSearchParams:MB,isTypedArray:JB,isFileList:PB,forEach:Bn,merge:No,extend:jB,trim:GB,stripBOM:HB,inherits:WB,toFlatObject:KB,kindOf:Va,kindOfTest:Mt,endsWith:qB,toArray:YB,forEachEntry:XB,matchAll:ZB,isHTMLForm:QB,hasOwnProperty:cm,hasOwnProp:cm,reduceDescriptors:dm,freezeMethods:sR,toObjectSet:nR,toCamelCase:eR,noop:aR,toFiniteNumber:iR,findKey:om,global:Is,isContextDefined:lm,ALPHABET:hm,generateString:rR,isSpecCompliantForm:oR,toJSONObject:lR,isAsyncFn:cR,isThenable:dR,setImmediate:mm,asap:uR};function ke(s,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});const fm=ke.prototype,gm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{gm[s]={value:s}}),Object.defineProperties(ke,gm),Object.defineProperty(fm,"isAxiosError",{value:!0}),ke.from=(s,e,t,n,i,r)=>{const o=Object.create(fm);return F.toFlatObject(s,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),ke.call(o,s.message,e,t,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const hR=null;function Po(s){return F.isPlainObject(s)||F.isArray(s)}function pm(s){return F.endsWith(s,"[]")?s.slice(0,-2):s}function ym(s,e,t){return s?s.concat(e).map(function(n,i){return n=pm(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function mR(s){return F.isArray(s)&&!s.some(Po)}const fR=F.toFlatObject(F,{},null,function(s){return/^is[A-Z]/.test(s)});function Ga(s,e,t){if(!F.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=F.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!F.isUndefined(h[p])});const n=t.metaTokens,i=t.visitor||c,r=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(F.isDate(p))return p.toISOString();if(!l&&F.isBlob(p))throw new ke("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(p)||F.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,g){let y=p;if(p&&!g&&typeof p=="object"){if(F.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(F.isArray(p)&&mR(p)||(F.isFileList(p)||F.endsWith(h,"[]"))&&(y=F.toArray(p)))return h=pm(h),y.forEach(function(b,w){!(F.isUndefined(b)||b===null)&&e.append(o===!0?ym([h],w,r):o===null?h:h+"[]",d(b))}),!1}return Po(p)?!0:(e.append(ym(g,h,r),d(p)),!1)}const u=[],m=Object.assign(fR,{defaultVisitor:c,convertValue:d,isVisitable:Po});function f(p,h){if(!F.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));u.push(p),F.forEach(p,function(g,y){(!(F.isUndefined(g)||g===null)&&i.call(e,g,F.isString(y)?y.trim():y,h,m))===!0&&f(g,h?h.concat(y):[y])}),u.pop()}}if(!F.isObject(s))throw new TypeError("data must be an object");return f(s),e}function bm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Oo(s,e){this._pairs=[],s&&Ga(s,this,e)}const wm=Oo.prototype;wm.append=function(s,e){this._pairs.push([s,e])},wm.toString=function(s){const e=s?function(t){return s.call(this,t,bm)}:bm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function gR(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sm(s,e,t){if(!e)return s;const n=t&&t.encode||gR;F.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let r;if(i?r=i(e,t):r=F.isURLSearchParams(e)?e.toString():new Oo(e,t).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class pR{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,function(t){t!==null&&e(t)})}}const _m=pR,km={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yR=typeof URLSearchParams<"u"?URLSearchParams:Oo,bR=typeof FormData<"u"?FormData:null,wR=typeof Blob<"u"?Blob:null,SR={isBrowser:!0,classes:{URLSearchParams:yR,FormData:bR,Blob:wR},protocols:["http","https","file","blob","url","data"]},Fo=typeof window<"u"&&typeof document<"u",Mo=typeof navigator=="object"&&navigator||void 0,_R=Fo&&(!Mo||["ReactNative","NativeScript","NS"].indexOf(Mo.product)<0),kR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ER=Fo&&window.location.href||"http://localhost",TR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fo,hasStandardBrowserEnv:_R,hasStandardBrowserWebWorkerEnv:kR,navigator:Mo,origin:ER},Symbol.toStringTag,{value:"Module"})),yt={...TR,...SR};function CR(s,e){return Ga(s,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,r){return yt.isNode&&F.isBuffer(t)?(this.append(n,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function xR(s){return F.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function AR(s){const e={},t=Object.keys(s);let n;const i=t.length;let r;for(n=0;n<i;n++)r=t[n],e[r]=s[r];return e}function Em(s){function e(t,n,i,r){let o=t[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=r>=t.length;return o=!o&&F.isArray(i)?i.length:o,d?(F.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!F.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],r)&&F.isArray(i[o])&&(i[o]=AR(i[o])),!l)}if(F.isFormData(s)&&F.isFunction(s.entries)){const t={};return F.forEachEntry(s,(n,i)=>{e(xR(n),i,t,0)}),t}return null}function LR(s,e,t){if(F.isString(s))try{return(e||JSON.parse)(s),F.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(s)}const Vo={transitional:km,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=F.isObject(s);if(i&&F.isHTMLForm(s)&&(s=new FormData(s)),F.isFormData(s))return n?JSON.stringify(Em(s)):s;if(F.isArrayBuffer(s)||F.isBuffer(s)||F.isStream(s)||F.isFile(s)||F.isBlob(s)||F.isReadableStream(s))return s;if(F.isArrayBufferView(s))return s.buffer;if(F.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let r;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return CR(s,this.formSerializer).toString();if((r=F.isFileList(s))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Ga(r?{"files[]":s}:s,o&&new o,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),LR(s)):s}],transformResponse:[function(s){const e=this.transitional||Vo.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(F.isResponse(s)||F.isReadableStream(s))return s;if(s&&F.isString(s)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(r){if(i)throw r.name==="SyntaxError"?ke.from(r,ke.ERR_BAD_RESPONSE,this,null,this.response):r}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],s=>{Vo.headers[s]={}});const $o=Vo,IR=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BR=s=>{const e={};let t,n,i;return s&&s.split(`
37
+ `);if(t!==this.elements.captions.innerHTML){Ra(this.elements.captions);const n=fe("span",Yt(this.config.selectors.caption));n.innerHTML=t,this.elements.captions.appendChild(n),pe.call(this,this.media,"cuechange")}}},Wh={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},_o={active:"picture-in-picture",inactive:"inline"},hs={html5:"html5",youtube:"youtube",vimeo:"vimeo"},ko={audio:"audio",video:"video"};function r4(s){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(s)?hs.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(s)?hs.vimeo:null}const Eo=()=>{};class o4{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Eo}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Eo}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Eo}}class Ft{constructor(e){Z(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;k.element(t)&&(t.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;pe.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),Z(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ne(this.target,this.player.config.classNames.fullscreen.fallback,t),tt.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const r=k.string(n.content)&&n.content.includes(i);t?(this.cleanupViewport=!r,r||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(o=>o.trim()!==i).join(","))}this.onChange()}),Z(this,"trapFocus",t=>{if(tt.isIos||tt.isIPadOS||!this.active||t.key!=="Tab")return;const n=document.activeElement,i=kn.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[r]=i,o=i[i.length-1];n!==o||t.shiftKey?n===r&&t.shiftKey&&(o.focus(),t.preventDefault()):(r.focus(),t.preventDefault())}),Z(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Ft.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ne(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Z(this,"enter",()=>{this.supported&&(tt.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ft.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Z(this,"exit",()=>{if(this.supported)if(tt.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Jt(this.player.play());else if(!Ft.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!k.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),Z(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Ft.prefix,this.property=Ft.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&KI(this.player.elements.container,e.config.fullscreen.container),Ie.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ie.call(this.player,this.player.elements.container,"dblclick",t=>{k.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),Ie.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ft.nativeSupported&&!this.forceFallback}static get prefix(){if(k.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!k.function(document[`${t}ExitFullscreen`])&&!k.function(document[`${t}CancelFullScreen`]))&&(e=t,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ft.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ft.nativeSupported||!tt.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ft.nativeSupported||this.forceFallback)return Na(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return tt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Fa(s,e=1){return new Promise((t,n)=>{const i=new Image,r=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?t:n)(i)};Object.assign(i,{onload:r,onerror:r,src:s})})}const Oe={addStyleHook(){Ne(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ne(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(s=!1){s&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Oe.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(X.inject.call(this),this.listeners.controls()),Oe.toggleNativeControls.call(this),this.isHTML5&&Be.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,X.updateVolume.call(this),X.timeUpdate.call(this),X.durationUpdate.call(this),Oe.checkPlaying.call(this),Ne(this.elements.container,this.config.classNames.pip.supported,ze.pip&&this.isHTML5&&this.isVideo),Ne(this.elements.container,this.config.classNames.airplay.supported,ze.airplay&&this.isHTML5),Ne(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{pe.call(this,this.media,"ready")},0),Oe.setTitle.call(this),this.poster&&Oe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&X.durationUpdate.call(this),this.config.mediaMetadata&&X.setMediaMetadata.call(this)},setTitle(){let s=st.get("play",this.config);if(k.string(this.config.title)&&!k.empty(this.config.title)&&(s+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",s)}),this.isEmbed){const e=Xe.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,n=st.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(s){Ne(this.elements.container,this.config.classNames.posterEnabled,s)},setPoster(s,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",s),this.elements.poster.removeAttribute("hidden"),JI.call(this).then(()=>Fa(s)).catch(t=>{throw s===this.poster&&Oe.togglePoster.call(this,!1),t}).then(()=>{if(s!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${s}')`,backgroundSize:""}),Oe.togglePoster.call(this,!0),s)))},checkPlaying(s){Ne(this.elements.container,this.config.classNames.playing,this.playing),Ne(this.elements.container,this.config.classNames.paused,this.paused),Ne(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",st.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Oe.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Ne(this.elements.container,this.config.classNames.loading,this.loading),Oe.toggleControls.call(this)},this.loading?250:0)},toggleControls(s){const{controls:e}=this.elements;if(e&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(s||this.loading||this.paused||e.pressed||e.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(s=>!k.empty(s)&&k.string(s)&&s.startsWith("--plyr")).forEach(s=>{this.elements.container.style.setProperty(s,this.media.style.getPropertyValue(s)),this.media.style.removeProperty(s)}),k.empty(this.media.style)&&this.media.removeAttribute("style")}};class l4{constructor(e){Z(this,"firstTouch",()=>{const{player:t}=this,{elements:n}=t;t.touch=!0,Ne(n.container,t.config.classNames.isTouch,!0)}),Z(this,"global",(t=!0)=>{const{player:n}=this;n.config.keyboard.global&&En.call(n,window,"keydown keyup",this.handleKey,t,!1),En.call(n,document.body,"click",this.toggleMenu,t),yo.call(n,document.body,"touchstart",this.firstTouch)}),Z(this,"container",()=>{const{player:t}=this,{config:n,elements:i,timers:r}=t;!n.keyboard.global&&n.keyboard.focused&&Ie.call(t,i.container,"keydown keyup",this.handleKey,!1),Ie.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",d=>{const{controls:c}=i;c&&d.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let u=0;["touchstart","touchmove","mousemove"].includes(d.type)&&(Oe.toggleControls.call(t,!0),u=t.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),u)});const o=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const d=i.wrapper,{active:c}=t.fullscreen,[u,m]=wo.call(t),f=Oh(`aspect-ratio: ${u} / ${m}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[p,h]=XI(),g=p/h>u/m;f?(d.style.width=g?"auto":"100%",d.style.height=g?"100%":"auto"):(d.style.maxWidth=g?h/m*u+"px":null,d.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(r.resized),r.resized=setTimeout(o,50)};Ie.call(t,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=t.fullscreen;c===i.container&&(!t.isEmbed&&k.empty(t.config.ratio)||(o(),(d.type==="enterfullscreen"?Ie:Da).call(t,window,"resize",l)))})}),Z(this,"media",()=>{const{player:t}=this,{elements:n}=t;if(Ie.call(t,t.media,"timeupdate seeking seeked",r=>X.timeUpdate.call(t,r)),Ie.call(t,t.media,"durationchange loadeddata loadedmetadata",r=>X.durationUpdate.call(t,r)),Ie.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Ie.call(t,t.media,"progress playing seeking seeked",r=>X.updateProgress.call(t,r)),Ie.call(t,t.media,"volumechange",r=>X.updateVolume.call(t,r)),Ie.call(t,t.media,"playing play pause ended emptied timeupdate",r=>Oe.checkPlaying.call(t,r)),Ie.call(t,t.media,"waiting canplay seeked playing",r=>Oe.checkLoading.call(t,r)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const r=Xe.call(t,`.${t.config.classNames.video}`);if(!k.element(r))return;Ie.call(t,n.container,"click",o=>{([n.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(o,t.restart,"restart"),this.proxy(o,()=>{Jt(t.play())},"play")):this.proxy(o,()=>{Jt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Ie.call(t,n.wrapper,"contextmenu",r=>{r.preventDefault()},!1),Ie.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Ie.call(t,t.media,"ratechange",()=>{X.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Ie.call(t,t.media,"qualitychange",r=>{X.updateSetting.call(t,"quality",null,r.detail.quality)}),Ie.call(t,t.media,"ready qualitychange",()=>{X.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Ie.call(t,t.media,i,r=>{let{detail:o={}}=r;r.type==="error"&&(o=t.media.error),pe.call(t,n.container,r.type,!0,o)})}),Z(this,"proxy",(t,n,i)=>{const{player:r}=this,o=r.config.listeners[i];let l=!0;k.function(o)&&(l=o.call(r,t)),l!==!1&&k.function(n)&&n.call(r,t)}),Z(this,"bind",(t,n,i,r,o=!0)=>{const{player:l}=this,d=l.config.listeners[r],c=k.function(d);Ie.call(l,t,n,u=>this.proxy(u,i,r),o&&!c)}),Z(this,"controls",()=>{const{player:t}=this,{elements:n}=t,i=tt.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(r=>{this.bind(r,"click",()=>{Jt(t.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{pe.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",r=>{r.stopPropagation(),r.preventDefault(),X.toggleMenu.call(t,r)},null,!1),this.bind(n.buttons.settings,"keyup",r=>{[" ","Enter"].includes(r.key)&&(r.key!=="Enter"?(r.preventDefault(),r.stopPropagation(),X.toggleMenu.call(t,r)):X.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",r=>{r.key==="Escape"&&X.toggleMenu.call(t,r)}),this.bind(n.inputs.seek,"mousedown mousemove",r=>{const o=n.progress.getBoundingClientRect(),l=100/o.width*(r.pageX-o.left);r.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",r=>{const o=r.currentTarget,l="play-on-seeked";if(k.keyboardEvent(r)&&!["ArrowLeft","ArrowRight"].includes(r.key))return;t.lastSeekTime=Date.now();const d=o.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(r.type);d&&c?(o.removeAttribute(l),Jt(t.play())):!c&&t.playing&&(o.setAttribute(l,""),t.pause())}),tt.isIos){const r=kn.call(t,'input[type="range"]');Array.from(r).forEach(o=>this.bind(o,i,l=>Bh(l.target)))}this.bind(n.inputs.seek,i,r=>{const o=r.currentTarget;let l=o.getAttribute("seek-value");k.empty(l)&&(l=o.value),o.removeAttribute("seek-value"),t.currentTime=l/o.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",r=>X.updateSeekTooltip.call(t,r)),this.bind(n.progress,"mousemove touchmove",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startMove(r)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startScrubbing(r)}),this.bind(n.progress,"mouseup touchend",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endScrubbing(r)}),tt.isWebKit&&Array.from(kn.call(t,'input[type="range"]')).forEach(r=>{this.bind(r,"input",o=>X.updateRangeFill.call(t,o.target))}),t.config.toggleInvert&&!k.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,X.timeUpdate.call(t))}),this.bind(n.inputs.volume,i,r=>{t.volume=r.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",r=>{n.controls.hover=!t.touch&&r.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(r=>!r.contains(n.container)).forEach(r=>{this.bind(r,"mouseenter mouseleave",o=>{n.controls&&(n.controls.hover=!t.touch&&o.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",r=>{n.controls.pressed=["mousedown","touchstart"].includes(r.type)}),this.bind(n.controls,"focusin",()=>{const{config:r,timers:o}=t;Ne(n.controls,r.classNames.noTransition,!0),Oe.toggleControls.call(t,!0),setTimeout(()=>{Ne(n.controls,r.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),l)}),this.bind(n.inputs.volume,"wheel",r=>{const o=r.webkitDirectionInvertedFromDevice,[l,d]=[r.deltaX,-r.deltaY].map(m=>o?-m:m),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);t.increaseVolume(c/50);const{volume:u}=t.media;(c===1&&u<1||c===-1&&u>0)&&r.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:i,type:r,altKey:o,ctrlKey:l,metaKey:d,shiftKey:c}=e,u=r==="keydown",m=u&&i===this.lastKey;if(!(o||l||d||c)&&i){if(u){const p=document.activeElement;if(k.element(p)){const{editable:h}=t.config.selectors,{seek:g}=n.inputs;if(p!==g&&Ls(p,h)||e.key===" "&&Ls(p,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m||(f=parseInt(i,10),t.currentTime=t.duration/10*f);break;case" ":case"k":m||Jt(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":m||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":m||t.toggleCaptions();break;case"l":t.loop=!t.loop}i==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){X.toggleMenu.call(this.player,e)}}function c4(s,e){return s(e={exports:{}},e.exports),e.exports}var d4=c4(function(s,e){s.exports=function(){var t=function(){},n={},i={},r={};function o(f,p){f=f.push?f:[f];var h,g,y,b=[],w=f.length,_=w;for(h=function(C,E){E.length&&b.push(C),--_||p(b)};w--;)g=f[w],(y=i[g])?h(g,y):(r[g]=r[g]||[]).push(h)}function l(f,p){if(f){var h=r[f];if(i[f]=p,h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function d(f,p){f.call&&(f={success:f}),p.length?(f.error||t)(p):(f.success||t)(f)}function c(f,p,h,g){var y,b,w=document,_=h.async,C=(h.numRetries||0)+1,E=h.before||t,A=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(A)?((b=w.createElement("link")).rel="stylesheet",b.href=T,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(A)?(b=w.createElement("img")).src=T:((b=w.createElement("script")).src=f,b.async=_===void 0||_),b.onload=b.onerror=b.onbeforeload=function(R){var I=R.type[0];if(y)try{b.sheet.cssText.length||(I="e")}catch(v){v.code!=18&&(I="e")}if(I=="e"){if((g+=1)<C)return c(f,p,h,g)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";p(f,I,R.defaultPrevented)},E(f,b)!==!1&&w.head.appendChild(b)}function u(f,p,h){var g,y,b=(f=f.push?f:[f]).length,w=b,_=[];for(g=function(C,E,A){if(E=="e"&&_.push(C),E=="b"){if(!A)return;_.push(C)}--b||p(_)},y=0;y<w;y++)c(f[y],g,h)}function m(f,p,h){var g,y;if(p&&p.trim&&(g=p),y=(g?h:p)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function b(w,_){u(f,function(C){d(y,C),w&&d({success:w,error:_},C),l(g,C)},y)}if(y.returnPromise)return new Promise(b);b()}return m.ready=function(f,p){return o(f,function(h){d(p,h)}),m},m.done=function(f){l(f,[])},m.reset=function(){n={},i={},r={}},m.isDefined=function(f){return f in n},m}()});function To(s){return new Promise((e,t)=>{d4(s,{success:e,error:t})})}function u4(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function h4(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function An(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}const Co={setup(){const s=this;Ne(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,js.call(s),k.object(window.Vimeo)?Co.ready.call(s):To(s.config.urls.vimeo.sdk).then(()=>{Co.ready.call(s)}).catch(e=>{s.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const s=this,e=s.config.vimeo,{premium:t,referrerPolicy:n,...i}=e;let r=s.media.getAttribute("src"),o="";k.empty(r)?(r=s.media.getAttribute(s.config.attributes.embed.id),o=s.media.getAttribute(s.config.attributes.embed.hash)):o=h4(r);const l=o?{h:o}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=Hh({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=u4(r),u=fe("iframe"),m=So(s.config.urls.vimeo.iframe,c,d);if(u.setAttribute("src",m),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),k.empty(n)||u.setAttribute("referrerPolicy",n),t||!e.customControls)u.setAttribute("data-poster",s.poster),s.media=va(u,s.media);else{const w=fe("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});w.appendChild(u),s.media=va(w,s.media)}e.customControls||xn(So(s.config.urls.vimeo.api,m)).then(w=>{!k.empty(w)&&w.thumbnail_url&&Oe.setPoster.call(s,w.thumbnail_url).catch(()=>{})}),s.embed=new window.Vimeo.Player(u,{autopause:s.config.autopause,muted:s.muted}),s.media.paused=!0,s.media.currentTime=0,s.supported.ui&&s.embed.disableTextTrack(),s.media.play=()=>(An.call(s,!0),s.embed.play()),s.media.pause=()=>(An.call(s,!1),s.embed.pause()),s.media.stop=()=>{s.pause(),s.currentTime=0};let{currentTime:f}=s.media;Object.defineProperty(s.media,"currentTime",{get:()=>f,set(w){const{embed:_,media:C,paused:E,volume:A}=s,T=E&&!_.hasPlayed;C.seeking=!0,pe.call(s,C,"seeking"),Promise.resolve(T&&_.setVolume(0)).then(()=>_.setCurrentTime(w)).then(()=>T&&_.pause()).then(()=>T&&_.setVolume(A)).catch(()=>{})}});let p=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>p,set(w){s.embed.setPlaybackRate(w).then(()=>{p=w,pe.call(s,s.media,"ratechange")}).catch(()=>{s.options.speed=[1]})}});let{volume:h}=s.config;Object.defineProperty(s.media,"volume",{get:()=>h,set(w){s.embed.setVolume(w).then(()=>{h=w,pe.call(s,s.media,"volumechange")})}});let{muted:g}=s.config;Object.defineProperty(s.media,"muted",{get:()=>g,set(w){const _=!!k.boolean(w)&&w;s.embed.setMuted(!!_||s.config.muted).then(()=>{g=_,pe.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(w){const _=k.boolean(w)?w:s.config.loop.active;s.embed.setLoop(_).then(()=>{b=_})}}),s.embed.getVideoUrl().then(w=>{y=w,X.setDownloadUrl.call(s)}).catch(w=>{this.debug.warn(w)}),Object.defineProperty(s.media,"currentSrc",{get:()=>y}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration}),Promise.all([s.embed.getVideoWidth(),s.embed.getVideoHeight()]).then(w=>{const[_,C]=w;s.embed.ratio=Vh(_,C),js.call(this)}),s.embed.setAutopause(s.config.autopause).then(w=>{s.config.autopause=w}),s.embed.getVideoTitle().then(w=>{s.config.title=w,Oe.setTitle.call(this)}),s.embed.getCurrentTime().then(w=>{f=w,pe.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(w=>{s.media.duration=w,pe.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(w=>{s.media.textTracks=w,Be.setup.call(s)}),s.embed.on("cuechange",({cues:w=[]})=>{const _=w.map(C=>s4(C.text));Be.updateCues.call(s,_)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(w=>{An.call(s,!w),w||pe.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{pe.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{pe.call(s,s.media,"playing")}),s.embed.on("play",()=>{An.call(s,!0),pe.call(s,s.media,"playing")}),s.embed.on("pause",()=>{An.call(s,!1)}),s.embed.on("timeupdate",w=>{s.media.seeking=!1,f=w.seconds,pe.call(s,s.media,"timeupdate")}),s.embed.on("progress",w=>{s.media.buffered=w.percent,pe.call(s,s.media,"progress"),parseInt(w.percent,10)===1&&pe.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(_=>{_!==s.media.duration&&(s.media.duration=_,pe.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,pe.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,pe.call(s,s.media,"ended")}),s.embed.on("error",w=>{s.media.error=w,pe.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Oe.build.call(s),0)}};function m4(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function Ln(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}function f4(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ma={setup(){if(Ne(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))Ma.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),Ma.ready.call(this)},To(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){xn(So(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:n,width:i}=e;this.config.title=t,Oe.setTitle.call(this),this.embed.ratio=Vh(i,n)}js.call(this)}).catch(()=>{js.call(this)})},ready(){const s=this,e=s.config.youtube,t=s.media&&s.media.getAttribute("id");if(!k.empty(t)&&t.startsWith("youtube-"))return;let n=s.media.getAttribute("src");k.empty(n)&&(n=s.media.getAttribute(this.config.attributes.embed.id));const i=m4(n),r=fe("div",{id:ZI(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=va(r,s.media),e.customControls){const o=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Fa(o("maxres"),121).catch(()=>Fa(o("sd"),121)).catch(()=>Fa(o("hq"))).then(l=>Oe.setPoster.call(s,l.src)).then(l=>{l.includes("maxres")||(s.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}s.embed=new window.YT.Player(s.media,{videoId:i,host:f4(e),playerVars:Ue({},{autoplay:s.config.autoplay?1:0,hl:s.config.hl,controls:s.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:s.config.playsinline&&!s.config.fullscreen.iosNative?1:0,cc_load_policy:s.captions.active?1:0,cc_lang_pref:s.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(o){if(!s.media.error){const l=o.data,d={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[l]||"An unknown error occurred";s.media.error={code:l,message:d},pe.call(s,s.media,"error")}},onPlaybackRateChange(o){const l=o.target;s.media.playbackRate=l.getPlaybackRate(),pe.call(s,s.media,"ratechange")},onReady(o){if(k.function(s.media.play))return;const l=o.target;Ma.getTitle.call(s,i),s.media.play=()=>{Ln.call(s,!0),l.playVideo()},s.media.pause=()=>{Ln.call(s,!1),l.pauseVideo()},s.media.stop=()=>{l.stopVideo()},s.media.duration=l.getDuration(),s.media.paused=!0,s.media.currentTime=0,Object.defineProperty(s.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(m){s.paused&&!s.embed.hasPlayed&&s.embed.mute(),s.media.seeking=!0,pe.call(s,s.media,"seeking"),l.seekTo(m)}}),Object.defineProperty(s.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(m){l.setPlaybackRate(m)}});let{volume:d}=s.config;Object.defineProperty(s.media,"volume",{get:()=>d,set(m){d=m,l.setVolume(100*d),pe.call(s,s.media,"volumechange")}});let{muted:c}=s.config;Object.defineProperty(s.media,"muted",{get:()=>c,set(m){const f=k.boolean(m)?m:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),pe.call(s,s.media,"volumechange")}}),Object.defineProperty(s.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration});const u=l.getAvailablePlaybackRates();s.options.speed=u.filter(m=>s.config.speed.options.includes(m)),s.supported.ui&&e.customControls&&s.media.setAttribute("tabindex",-1),pe.call(s,s.media,"timeupdate"),pe.call(s,s.media,"durationchange"),clearInterval(s.timers.buffering),s.timers.buffering=setInterval(()=>{s.media.buffered=l.getVideoLoadedFraction(),(s.media.lastBuffered===null||s.media.lastBuffered<s.media.buffered)&&pe.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),pe.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Oe.build.call(s),50)},onStateChange(o){const l=o.target;switch(clearInterval(s.timers.playing),s.media.seeking&&[1,2].includes(o.data)&&(s.media.seeking=!1,pe.call(s,s.media,"seeked")),o.data){case-1:pe.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),pe.call(s,s.media,"progress");break;case 0:Ln.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):pe.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(Ln.call(s,!0),pe.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{pe.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),pe.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),Ln.call(s,!1);break;case 3:pe.call(s,s.media,"waiting")}pe.call(s,s.elements.container,"statechange",!1,{code:o.data})}}})}},Kh={setup(){this.media?(Ne(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ne(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ne(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=fe("div",{class:this.config.classNames.video}),vh(this.media,this.elements.wrapper),this.elements.poster=fe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?us.setup.call(this):this.isYouTube?Ma.setup.call(this):this.isVimeo&&Co.setup.call(this)):this.debug.warn("No media element found!")}};class g4{constructor(e){Z(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():To(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Z(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),Z(this,"setupIMA",()=>{this.elements.container=fe("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),Z(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),Z(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Oa(Math.max(this.manager.getRemainingTime(),0)),i=`${st.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Z(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],r=>this.onAdEvent(r))}),this.trigger("loaded")}),Z(this,"addCuePoints",()=>{k.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const n=this.player.elements.progress;if(k.element(n)){const i=100/this.player.duration*t,r=fe("span",{class:this.player.config.classNames.cues});r.style.left=`${i.toString()}%`,n.appendChild(r)}}})}),Z(this,"onAdEvent",t=>{const{container:n}=this.player.elements,i=t.getAd(),r=t.getAdData();switch((o=>{pe.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn(`Non-fatal ad error: ${r.adError.getMessage()}`)}}),Z(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),Z(this,"listeners",()=>{const{container:t}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;k.empty(this.cuePoints)||this.cuePoints.forEach((r,o)=>{n<r&&r<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),Z(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),Z(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Jt(this.player.media.play())}),Z(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Z(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Z(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),Z(this,"trigger",(t,...n)=>{const i=this.events[t];k.array(i)&&i.forEach(r=>{k.function(r)&&r.apply(this,n)})}),Z(this,"on",(t,n)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(n),this)),Z(this,"startSafetyTimer",(t,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),Z(this,"clearSafetyTimer",t=>{k.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,n)=>{this.on("loaded",t),this.on("error",n)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!k.empty(e.publisherId)||k.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return k.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Hh({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function qh(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const p4=s=>{const e=[];return s.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const n={};t.split(/\r\n|\n|\r/).forEach(i=>{if(k.number(n.startTime)){if(!k.empty(i.trim())&&k.empty(n.text)){const r=i.trim().split("#xywh=");[n.text]=r,r[1]&&([n.x,n.y,n.w,n.h]=r[1].split(","))}}else{const r=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);r&&(n.startTime=60*Number(r[1]||0)*60+60*Number(r[2])+Number(r[3])+ +`0.${r[4]}`,n.endTime=60*Number(r[6]||0)*60+60*Number(r[7])+Number(r[8])+ +`0.${r[9]}`)}}),n.text&&e.push(n)}),e},Yh=(s,e)=>{const t={};return s>e.width/e.height?(t.width=e.width,t.height=1/s*e.width):(t.height=e.height,t.width=s*e.height),t};class xo{constructor(e){Z(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),Z(this,"getThumbnails",()=>new Promise(t=>{const{src:n}=this.player.config.previewThumbnails;if(k.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((r,o)=>r.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(k.function(n))n(r=>{this.thumbnails=r,i()});else{const r=(k.string(n)?[n]:n).map(o=>this.getThumbnail(o));Promise.all(r).then(i)}})),Z(this,"getThumbnail",t=>new Promise(n=>{xn(t).then(i=>{const r={frames:p4(i),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{r.height=o.naturalHeight,r.width=o.naturalWidth,this.thumbnails.push(r),n()},o.src=r.urlPrefix+r.frames[0].text})})),Z(this,"startMove",t=>{if(this.loaded&&k.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const r=this.player.elements.progress.getBoundingClientRect(),o=100/r.width*(t.pageX-r.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Oa(this.seekTime);const l=(n=this.player.config.markers)===null||n===void 0||(i=n.points)===null||i===void 0?void 0:i.find(({time:d})=>d===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),Z(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Z(this,"startScrubbing",t=>{(k.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),Z(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):yo.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Z(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),Z(this,"render",()=>{this.elements.thumb.container=fe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=fe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=fe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=fe("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),k.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=fe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Z(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Z(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(r=>this.seekTime>=r.startTime&&this.seekTime<=r.endTime),n=t>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((r,o)=>{this.loadedImages.includes(r.frames[t].text)&&(i=o)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}),Z(this,"loadImage",(t=0)=>{const n=this.showingThumb,i=this.thumbnails[t],{urlPrefix:r}=i,o=i.frames[n],l=i.frames[n].text,d=r+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,o,t,n,l,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=d,c.dataset.index=n,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${d}`),c.onload=()=>this.showImage(c,o,t,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),Z(this,"showImage",(t,n,i,r,o,l=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${r}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(t,n),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(i,t,n,o))}),Z(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:r}=this;setTimeout(()=>{r.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),Z(this,"preloadNearby",(t,n=!0)=>new Promise(i=>{setTimeout(()=>{const r=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===r){let o;o=n?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;o.forEach(d=>{const c=d.text;if(c!==r&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:u}=this.thumbnails[0],m=u+c,f=new Image;f.src=m,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),Z(this,"getHigherQuality",(t,n,i,r)=>{if(t<this.thumbnails.length-1){let o=n.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===r&&(this.player.debug.log(`Showing higher quality thumb for: ${r}`),this.loadImage(t+1))},300)}}),Z(this,"toggleThumbContainer",(t=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,t),!t&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"toggleScrubbingContainer",(t=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Z(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const n=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${n}px`}else if(t.clientHeight<20&&t.clientWidth>20){const n=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${n}px`}this.setThumbContainerPos()}),Z(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,r=n.left-t.left+10,o=n.right-t.left-i.clientWidth-10,l=this.mousePosX-t.left-i.clientWidth/2,d=qh(l,r,o);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),Z(this,"setScrubbingContainerSize",()=>{const{width:t,height:n}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${n}px`}),Z(this,"setImageSizeAndOffset",(t,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left=`-${n.x*i}px`,t.style.top=`-${n.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const Ao={insertElements(s,e){k.string(e)?Nh(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{Nh(s,this.media,t)})},change(s){Rh(s,"sources.length")?(us.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],rs(this.media),this.media=null,k.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=s,[{provider:n=hs.html5,src:i}]=e,r=n==="html5"?t:"div",o=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:t,supported:ze.check(t,n,this.config.playsinline),media:fe(r,o)}),this.elements.container.appendChild(this.media),k.boolean(s.autoplay)&&(this.config.autoplay=s.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),k.empty(s.poster)||(this.poster=s.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Oe.addStyleHook.call(this),this.isHTML5&&Ao.insertElements.call(this,"source",e),this.config.title=s.title,Kh.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&Ao.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.isHTML5&&this.media.load(),k.empty(s.previewThumbnails)||(Object.assign(this.config.previewThumbnails,s.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Hs{constructor(e,t){if(Z(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Jt(this.media.play())),this.media.play()):null),Z(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),Z(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),Z(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),Z(this,"restart",()=>{this.currentTime=0}),Z(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),Z(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),Z(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),Z(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),Z(this,"airplay",()=>{ze.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Z(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Na(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,u=Ne(this.elements.container,this.config.classNames.hideControls,c);if(u&&k.array(this.config.controls)&&this.config.controls.includes("settings")&&!k.empty(this.config.settings)&&X.toggleMenu.call(this,!1),u!==d){const m=u?"controlshidden":"controlsshown";pe.call(this,this.media,m)}return!u}return!1}),Z(this,"on",(l,d)=>{Ie.call(this,this.elements.container,l,d)}),Z(this,"once",(l,d)=>{yo.call(this,this.elements.container,l,d)}),Z(this,"off",(l,d)=>{Da(this.elements.container,l,d)}),Z(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(rs(this.elements.buttons.play),rs(this.elements.captions),rs(this.elements.controls),rs(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),k.function(l)&&l()):(YI.call(this),us.cancelRequests.call(this),va(this.elements.original,this.elements.container),pe.call(this,this.elements.original,"destroyed",!0),k.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Oe.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&k.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),Z(this,"supports",l=>ze.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ze.touch,this.media=e,k.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||k.nodeList(this.media)||k.array(this.media))&&(this.media=this.media[0]),this.config=Ue({},Wh,Hs.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new o4(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ze),k.nullOrUndefined(this.media)||!k.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!ze.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const i=this.media.tagName.toLowerCase();let r=null,o=null;switch(i){case"div":if(r=this.media.querySelector("iframe"),k.element(r)){if(o=jh(r.getAttribute("src")),this.provider=r4(o.toString()),this.elements.container=this.media,this.media=r,this.elements.container.className="",o.search.length){const l=["1","true"];l.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(k.empty(this.provider)||!Object.values(hs).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=ko.video;break;case"video":case"audio":this.type=i,this.provider=hs.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=ze.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new l4(this),this.storage=new Cn(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=fe("div"),vh(this.media,this.elements.container)),Oe.migrateStyles.call(this),Oe.addStyleHook.call(this),Kh.setup.call(this),this.config.debug&&Ie.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Ft(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new g4(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Jt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===hs.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===hs.youtube}get isVimeo(){return this.provider===hs.vimeo}get isVideo(){return this.type===ko.video}get isAudio(){return this.type===ko.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;const t=k.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return k.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=k.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;k.string(t)&&(t=Number(t)),k.number(t)||(t=this.storage.get("volume")),k.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!k.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;k.boolean(t)||(t=this.storage.get("muted")),k.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;k.number(e)&&(t=e),k.number(t)||(t=this.storage.get("speed")),k.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;t=qh(t,n,i),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!k.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(k.number),r=!0;if(!n.includes(i)){const o=Ph(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${o} instead`),i=o,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const t=k.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(e){Ao.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return k.url(e)?e:this.source}set download(e){k.url(e)&&(this.config.urls.download=e,X.setDownloadUrl.call(this))}set poster(e){this.isVideo?Oe.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=Pa(wo.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&Mh(e)?(this.config.ratio=Pa(e),js.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=k.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){Be.toggle.call(this,e,!1)}set currentTrack(e){Be.set.call(this,e,!1),Be.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Be.setLanguage.call(this,e,!1)}get language(){return(Be.getCurrentTrack.call(this)||{}).language}set pip(e){if(!ze.pip)return;const t=k.boolean(e)?e:!this.pip;k.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?_o.active:_o.inactive),k.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return ze.pip?k.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===_o.active:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))}static supported(e,t){return ze.check(e,t)}static loadSprite(e,t){return zh(e,t)}static setup(e,t={}){let n=null;return k.string(e)?n=Array.from(document.querySelectorAll(e)):k.nodeList(e)?n=Array.from(e):k.array(e)&&(n=e.filter(k.element)),k.empty(n)?null:n.map(i=>new Hs(i,t))}}Hs.defaults=HI(Wh);const y4={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},b4={class:"carousel-video-player__play-info-portrait__date"},w4={class:"carousel-video-player__play-info-portrait__game"},S4={key:2,class:"carousel-video-player__play-info__data"},_4={class:"video-container"},k4=["id"],E4=et({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1},isPortrait:{type:Boolean,default:!0},isMobileFull:{type:Boolean,default:!0},isIos:{type:Boolean,default:!1}},emits:["play-ended"],setup(s,{emit:e}){const t=s,n=a.ref(null),i=a.ref(!1),r=a.computed(()=>`p-${t.play.playId||t.play.play_id}`),o=a.computed(()=>{if(t.isPlaySeeker){const p=new Date(t.play.gameDate);return`${p.getDate()}, ${uL(p.getMonth())} ${p.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${gh[f.getMonth()]} ${f.getFullYear()}`}),l=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name} | ${t.play.event_type_name} ${t.play.player_name}`}),d=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name}`}),c=a.computed(()=>t.isPlaySeeker?`${t.play.categoryName} ${t.play.playerShortName}`:`${t.play.event_type_name} ${t.play.player_name}`);function u(){n.value=new Hs(`#${r.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=t.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=t.play.endSeconds&&(n.value.pause(),n.value.currentTime=t.play.startSeconds,e("play-ended"))})),n.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,t.play.videoPlayer=n.value,t.play.plyrInit=u,n.value.on("webkitfullscreenchange",m()),n.value.on("mozfullscreenchange",m()),n.value.on("fullscreenchange",m())}function m(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return a.onMounted(()=>{setTimeout(()=>{u()},100)}),(f,p)=>(a.openBlock(),a.createElementBlock("div",{class:"carousel-video-player",onMouseenter:p[0]||(p[0]=h=>i.value=!0),onMouseleave:p[1]||(p[1]=h=>i.value=!1)},[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["carousel-video-player__play-info",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!s.isPortrait||!s.isMobileFull?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["carousel-video-player__play-info__date",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},a.toDisplayString(o.value),3)):a.createCommentVNode("",!0),s.isPortrait&&s.isMobileFull?(a.openBlock(),a.createElementBlock("div",y4,[a.createElementVNode("div",b4,[a.createTextVNode(a.toDisplayString(o.value)+" - ",1),a.createElementVNode("div",w4,a.toDisplayString(d.value),1)]),a.createTextVNode(" "+a.toDisplayString(c.value),1)])):(a.openBlock(),a.createElementBlock("div",S4,a.toDisplayString(l.value),1))],2),[[a.vShow,i.value]]),a.createElementVNode("div",_4,[a.createElementVNode("video",{id:r.value,controls:"",preload:"auto","data-setup":"{}"},null,8,k4)])],32))}},[["__scopeId","data-v-96776f5d"]]),Lo=s=>(a.pushScopeId("data-v-64d330ca"),s=s(),a.popScopeId(),s),T4=[Lo(()=>a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[a.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],C4={class:"carousel-full-screen__carousel"},x4={key:0,class:"icon-mobil-scrren"},A4=[Lo(()=>a.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Lo(()=>a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],L4={class:"carousel-full-screen__carousel__video-player"},Io=2,I4=et({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(s,{emit:e}){const t=s;let n=0,i=new Map;const r=a.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),o=a.ref(null),l=a.ref([]);a.watch(()=>t.playerQueue,b=>{b.length&&(l.value=b.map((w,_)=>(w.index=_,{...w})),n=t.playlistIndex,i=new Map(l.value.map(w=>[w.index,w])))},{immediate:!0});function d(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|iPhone|iPad|Opera Mini/i.test(navigator.userAgent)}function c(){return/iPhone|iPad/i.test(navigator.userAgent)}function u({selectedItem:b}){if(n!==b.index){const w=b.index-n;n=b.index;const _=i.get(n+w*-1),C=i.get(n);if(_&&_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.currentTime=0),C&&C.videoPlayer&&C.videoPlayer.play(),w>0){const E=i.get(n+Io),A=i.get(n+1),T=i.get(n-Io);E&&(l.value.find(R=>R.index===E.index)||l.value.push(E)),A&&A.videoPlayer&&A.videoPlayer.isDestroyed&&A.plyrInit(),T&&T.videoPlayer&&(T.videoPlayer.pause(),T.videoPlayer.src="",T.videoPlayer.destroy(),T.videoPlayer.isDestroyed=!0)}else if(w<0){const E=i.get(n-1),A=i.get(n+Io);E&&E.videoPlayer&&E.videoPlayer.isDestroyed&&E.plyrInit(),A&&A.videoPlayer&&(A.videoPlayer.pause(),A.videoPlayer.src="",A.videoPlayer.destroy(),A.videoPlayer.isDestroyed=!0)}}}function m(){o.value&&o.value.next()}function f(){e("close",n)}const p=a.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),h=a.computed(()=>p.portrait);function g(){var b=window.matchMedia("(orientation: portrait)");b.matches?p.portrait=!0:p.portrait=!1}function y(){window.screen.orientation.angle!=90?p.portrait=!0:p.portrait=!1}return a.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((w,_)=>{w.id=`plyrFS${_+1}`})},100)}),a.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",y),t.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,w)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["carousel-full-screen",c()&&!h.value?"paddingIos":""]),id:"carousel-swipe"},[a.createElementVNode("div",{class:"carousel-full-screen__close",style:a.normalizeStyle(c()&&h.value?"padding-top:30px":""),onClick:f},T4,4),a.createElementVNode("div",C4,[h.value&&d()?(a.openBlock(),a.createElementBlock("div",x4,A4)):a.createCommentVNode("",!0),a.createVNode(a.unref(hI),a.mergeProps({ref_key:"gscCarousel",ref:o},r.value,{items:l.value,onInput:u}),{default:a.withCtx(({item:_})=>[a.createElementVNode("div",L4,[a.createVNode(E4,{play:_,"is-portrait":h.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":s.isPlaySeeker,onPlayEnded:m},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-64d330ca"]]),B4=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["DF",{matchDayId:181,matchDayName:"16vos de Final",matchDayAbbreviation:"DF"}],["OF",{matchDayId:176,matchDayName:"Octavos de Final",matchDayAbbreviation:"OF"}],["CF",{matchDayId:177,matchDayName:"Cuartos de Final",matchDayAbbreviation:"CF"}],["SF",{matchDayId:178,matchDayName:"Semifinales",matchDayAbbreviation:"SF"}],["3ER",{matchDayId:179,matchDayName:"Tercer lugar",matchDayAbbreviation:"3ER"}],["FINAL",{matchDayId:180,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),R4=new Map([["M1",{matchDayId:1,matchDayName:"16vos de Final Ida",matchDayAbbreviation:"DFI"}],["M2",{matchDayId:2,matchDayName:"16vos de Final Vuelta",matchDayAbbreviation:"DFV"}],["M3",{matchDayId:3,matchDayName:"Octavos de Final Ida",matchDayAbbreviation:"OFI"}],["M4",{matchDayId:4,matchDayName:"Octavos de Final Vuelta",matchDayAbbreviation:"OFV"}],["M5",{matchDayId:5,matchDayName:"Cuartos de Final Ida",matchDayAbbreviation:"CFI"}],["M6",{matchDayId:6,matchDayName:"Cuartos de Final Vuelta",matchDayAbbreviation:"CFV"}],["M7",{matchDayId:7,matchDayName:"Semifinales Ida",matchDayAbbreviation:"SFI"}],["M8",{matchDayId:8,matchDayName:"Semifinales Vuelta",matchDayAbbreviation:"SFV"}],["M10",{matchDayId:10,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),Jh={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Xh={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Zh={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Qh=new Map([[1,B4],[2,R4]]),v4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Bo={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},em=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},tm=Bo.setup;Bo.setup=tm?(s,e)=>(em(),tm(s,e)):em;const N4=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),D4=["src"],P4={key:1,class:"text"},O4=["src"],F4={class:"stats"},M4=N4(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),V4={class:"numstats"},$4={class:"leyend"};function U4(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,D4)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",P4,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,O4)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",F4,[M4,a.createElementVNode("div",V4,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",$4,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const z4=v4(Bo,[["render",U4],["__scopeId","data-v-fb269a1e"]]),G4={class:"gsc-dropdown__main-container__item-selected"},j4=["height","width"],H4=["stroke"],W4={class:"gsc-dropdown__items-container"},K4=["onClick"],q4={key:0,class:"gsc-dropdown__items-footer"},Y4={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",G4,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,H4)],8,j4))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",W4,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,K4))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",q4,[a.createVNode(a.unref(z4),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},J4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},X4={class:"tournament-select__selected-tournament"},Z4={class:"tournament-select__selected-tournament__logo"},Q4=["src"],eB={class:"tournament-select__selected-tournament__name"},tB="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",sB={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,n=a.ref([]),i=a.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),r=a.computed(()=>t.tournamentsIdsToInclude.size?d(n.value):n.value),o=a.computed(()=>r.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||r.value[0]);async function l(){try{if(t.items&&t.items.length)n.value=[...t.items];else{const p=await u();e("change-tournaments",p),n.value=p.map(h=>({...h.tournament,seasons:h.seasons,seasonsIds:h.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((h,g)=>h.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(h=>t.tournamentsIdsToInclude.has(h.id))}function c(p){const h=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return h.open("HEAD",g,!1),h.send(),h.status!==404}async function u(){try{return(await fetch(t.apiUrl||tB)).json()}catch(p){return Promise.reject(p)}}function m(p){e("input",p)}function f(p){e("input",p)}return a.onMounted(()=>{l()}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"tournament-select",style:a.normalizeStyle(i.value)},[a.createVNode(a.unref(Y4),a.mergeProps(t,{"model-value":o.value,items:r.value,onInput:m,"onUpdate:modelValue":f}),{default:a.withCtx(({selectedItem:g})=>[a.createElementVNode("div",X4,[a.createElementVNode("div",Z4,[c(g.id)?(a.openBlock(),a.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,Q4)):a.createCommentVNode("",!0)]),a.createElementVNode("div",eB,a.toDisplayString(g.name),1)])]),availableItem:a.withCtx(({item:g})=>[a.createElementVNode("div",null,a.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},nB=J4(sB,[["__scopeId","data-v-5c8e9511"]]),aB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},sm=()=>{a.useCssVars(s=>({"9d01acb4":s.height,"14e95081":s.borderWidthBtn,"38fec285":s.borderType,34353510:s.borderColor,"20d20dc6":s.borderRadius,17130967:s.width,"4ccb7d36":s.backgroundColor,"5d1e86a2":s.cursorType,ce65d4a2:s.fontSize,fe4ac47a:s.fontStyle,f98e44dc:s.fontFamily,"93b87770":s.marginLeftStat,c7f7beba:s.fontSizeStat}))},nm=Ro.setup;Ro.setup=nm?(s,e)=>(sm(),nm(s,e)):sm;const iB=s=>(a.pushScopeId("data-v-f3ee6b2b"),s=s(),a.popScopeId(),s),rB=["src"],oB={key:1,class:"text"},lB=["src"],cB={class:"stats"},dB=iB(()=>a.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),uB={class:"numstats"},hB={class:"leyend"};function mB(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,rB)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",oB,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,lB)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",cB,[dB,a.createElementVNode("div",uB,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",hB,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const fB=aB(Ro,[["render",mB],["__scopeId","data-v-f3ee6b2b"]]),gB={class:"gsc-dropdown__main-container__item-selected"},pB=["height","width"],yB=["stroke"],bB={class:"gsc-dropdown__items-container"},wB=["onClick"],SB={key:0,class:"gsc-dropdown__items-footer"},_B={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(s){return["solid","dotted","dashed"].includes(s)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",gB,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:s.arrowColor},null,8,yB)],8,pB))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",bB,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,wB))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",SB,[a.createVNode(a.unref(fB),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},kB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},EB={class:"season-name"},TB={class:"items-list-season"},CB={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,n=a.computed(()=>t.seasons.find(o=>o.id===t.currentSeasonId));function i(o){e("input",o)}function r(o){e("input",o)}return(o,l)=>(a.openBlock(),a.createBlock(a.unref(_B),{items:s.seasons,"model-value":n.value,height:"40px",width:"179px","background-color":"#0d1d29",color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:r,"onUpdate:modelValue":i},{default:a.withCtx(({selectedItem:d})=>[a.createElementVNode("div",EB,[a.createElementVNode("span",null,a.toDisplayString(d.name),1)])]),availableItem:a.withCtx(({item:d})=>[a.createElementVNode("span",TB,a.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},xB=kB(CB,[["__scopeId","data-v-d23e9ee2"]]);function am(s,e){return function(){return s.apply(e,arguments)}}const{toString:AB}=Object.prototype,{getPrototypeOf:vo}=Object,Va=(s=>e=>{const t=AB.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Mt=s=>(s=s.toLowerCase(),e=>Va(e)===s),$a=s=>e=>typeof e===s,{isArray:Ws}=Array,In=$a("undefined");function LB(s){return s!==null&&!In(s)&&s.constructor!==null&&!In(s.constructor)&&xt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const im=Mt("ArrayBuffer");function IB(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&im(s.buffer),e}const BB=$a("string"),xt=$a("function"),rm=$a("number"),Ua=s=>s!==null&&typeof s=="object",RB=s=>s===!0||s===!1,za=s=>{if(Va(s)!=="object")return!1;const e=vo(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},vB=Mt("Date"),NB=Mt("File"),DB=Mt("Blob"),PB=Mt("FileList"),OB=s=>Ua(s)&&xt(s.pipe),FB=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||xt(s.append)&&((e=Va(s))==="formdata"||e==="object"&&xt(s.toString)&&s.toString()==="[object FormData]"))},MB=Mt("URLSearchParams"),[VB,$B,UB,zB]=["ReadableStream","Request","Response","Headers"].map(Mt),GB=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bn(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),Ws(s))for(n=0,i=s.length;n<i;n++)e.call(null,s[n],n,s);else{const r=t?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let l;for(n=0;n<o;n++)l=r[n],e.call(null,s[l],l,s)}}function om(s,e){e=e.toLowerCase();const t=Object.keys(s);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const Is=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lm=s=>!In(s)&&s!==Is;function No(){const{caseless:s}=lm(this)&&this||{},e={},t=(n,i)=>{const r=s&&om(e,i)||i;za(e[r])&&za(n)?e[r]=No(e[r],n):za(n)?e[r]=No({},n):Ws(n)?e[r]=n.slice():e[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Bn(arguments[n],t);return e}const jB=(s,e,t,{allOwnKeys:n}={})=>(Bn(e,(i,r)=>{t&&xt(i)?s[r]=am(i,t):s[r]=i},{allOwnKeys:n}),s),HB=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),WB=(s,e,t,n)=>{s.prototype=Object.create(e.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},KB=(s,e,t,n)=>{let i,r,o;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,e))&&!l[o]&&(e[o]=s[o],l[o]=!0);s=t!==!1&&vo(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},qB=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const n=s.indexOf(e,t);return n!==-1&&n===t},YB=s=>{if(!s)return null;if(Ws(s))return s;let e=s.length;if(!rm(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},JB=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&vo(Uint8Array)),XB=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(s,i[0],i[1])}},ZB=(s,e)=>{let t;const n=[];for(;(t=s.exec(e))!==null;)n.push(t);return n},QB=Mt("HTMLFormElement"),eR=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),cm=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),tR=Mt("RegExp"),dm=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),n={};Bn(t,(i,r)=>{let o;(o=e(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},sR=s=>{dm(s,(e,t)=>{if(xt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=s[t];if(xt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},nR=(s,e)=>{const t={},n=i=>{i.forEach(r=>{t[r]=!0})};return Ws(s)?n(s):n(String(s).split(e)),t},aR=()=>{},iR=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Do="abcdefghijklmnopqrstuvwxyz",um="0123456789",hm={DIGIT:um,ALPHA:Do,ALPHA_DIGIT:Do+Do.toUpperCase()+um},rR=(s=16,e=hm.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;s--;)t+=e[Math.random()*n|0];return t};function oR(s){return!!(s&&xt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const lR=s=>{const e=new Array(10),t=(n,i)=>{if(Ua(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const r=Ws(n)?[]:{};return Bn(n,(o,l)=>{const d=t(o,i+1);!In(d)&&(r[l]=d)}),e[i]=void 0,r}}return n};return t(s,0)},cR=Mt("AsyncFunction"),dR=s=>s&&(Ua(s)||xt(s))&&xt(s.then)&&xt(s.catch),mm=((s,e)=>s?setImmediate:e?((t,n)=>(Is.addEventListener("message",({source:i,data:r})=>{i===Is&&r===t&&n.length&&n.shift()()},!1),i=>{n.push(i),Is.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",xt(Is.postMessage)),uR=typeof queueMicrotask<"u"?queueMicrotask.bind(Is):typeof process<"u"&&process.nextTick||mm,F={isArray:Ws,isArrayBuffer:im,isBuffer:LB,isFormData:FB,isArrayBufferView:IB,isString:BB,isNumber:rm,isBoolean:RB,isObject:Ua,isPlainObject:za,isReadableStream:VB,isRequest:$B,isResponse:UB,isHeaders:zB,isUndefined:In,isDate:vB,isFile:NB,isBlob:DB,isRegExp:tR,isFunction:xt,isStream:OB,isURLSearchParams:MB,isTypedArray:JB,isFileList:PB,forEach:Bn,merge:No,extend:jB,trim:GB,stripBOM:HB,inherits:WB,toFlatObject:KB,kindOf:Va,kindOfTest:Mt,endsWith:qB,toArray:YB,forEachEntry:XB,matchAll:ZB,isHTMLForm:QB,hasOwnProperty:cm,hasOwnProp:cm,reduceDescriptors:dm,freezeMethods:sR,toObjectSet:nR,toCamelCase:eR,noop:aR,toFiniteNumber:iR,findKey:om,global:Is,isContextDefined:lm,ALPHABET:hm,generateString:rR,isSpecCompliantForm:oR,toJSONObject:lR,isAsyncFn:cR,isThenable:dR,setImmediate:mm,asap:uR};function ke(s,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});const fm=ke.prototype,gm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{gm[s]={value:s}}),Object.defineProperties(ke,gm),Object.defineProperty(fm,"isAxiosError",{value:!0}),ke.from=(s,e,t,n,i,r)=>{const o=Object.create(fm);return F.toFlatObject(s,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),ke.call(o,s.message,e,t,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const hR=null;function Po(s){return F.isPlainObject(s)||F.isArray(s)}function pm(s){return F.endsWith(s,"[]")?s.slice(0,-2):s}function ym(s,e,t){return s?s.concat(e).map(function(n,i){return n=pm(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function mR(s){return F.isArray(s)&&!s.some(Po)}const fR=F.toFlatObject(F,{},null,function(s){return/^is[A-Z]/.test(s)});function Ga(s,e,t){if(!F.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=F.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!F.isUndefined(h[p])});const n=t.metaTokens,i=t.visitor||c,r=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(F.isDate(p))return p.toISOString();if(!l&&F.isBlob(p))throw new ke("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(p)||F.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,g){let y=p;if(p&&!g&&typeof p=="object"){if(F.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(F.isArray(p)&&mR(p)||(F.isFileList(p)||F.endsWith(h,"[]"))&&(y=F.toArray(p)))return h=pm(h),y.forEach(function(b,w){!(F.isUndefined(b)||b===null)&&e.append(o===!0?ym([h],w,r):o===null?h:h+"[]",d(b))}),!1}return Po(p)?!0:(e.append(ym(g,h,r),d(p)),!1)}const u=[],m=Object.assign(fR,{defaultVisitor:c,convertValue:d,isVisitable:Po});function f(p,h){if(!F.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));u.push(p),F.forEach(p,function(g,y){(!(F.isUndefined(g)||g===null)&&i.call(e,g,F.isString(y)?y.trim():y,h,m))===!0&&f(g,h?h.concat(y):[y])}),u.pop()}}if(!F.isObject(s))throw new TypeError("data must be an object");return f(s),e}function bm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Oo(s,e){this._pairs=[],s&&Ga(s,this,e)}const wm=Oo.prototype;wm.append=function(s,e){this._pairs.push([s,e])},wm.toString=function(s){const e=s?function(t){return s.call(this,t,bm)}:bm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function gR(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sm(s,e,t){if(!e)return s;const n=t&&t.encode||gR;F.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let r;if(i?r=i(e,t):r=F.isURLSearchParams(e)?e.toString():new Oo(e,t).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class pR{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,function(t){t!==null&&e(t)})}}const _m=pR,km={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yR=typeof URLSearchParams<"u"?URLSearchParams:Oo,bR=typeof FormData<"u"?FormData:null,wR=typeof Blob<"u"?Blob:null,SR={isBrowser:!0,classes:{URLSearchParams:yR,FormData:bR,Blob:wR},protocols:["http","https","file","blob","url","data"]},Fo=typeof window<"u"&&typeof document<"u",Mo=typeof navigator=="object"&&navigator||void 0,_R=Fo&&(!Mo||["ReactNative","NativeScript","NS"].indexOf(Mo.product)<0),kR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ER=Fo&&window.location.href||"http://localhost",TR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fo,hasStandardBrowserEnv:_R,hasStandardBrowserWebWorkerEnv:kR,navigator:Mo,origin:ER},Symbol.toStringTag,{value:"Module"})),yt={...TR,...SR};function CR(s,e){return Ga(s,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,r){return yt.isNode&&F.isBuffer(t)?(this.append(n,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function xR(s){return F.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function AR(s){const e={},t=Object.keys(s);let n;const i=t.length;let r;for(n=0;n<i;n++)r=t[n],e[r]=s[r];return e}function Em(s){function e(t,n,i,r){let o=t[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=r>=t.length;return o=!o&&F.isArray(i)?i.length:o,d?(F.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!F.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],r)&&F.isArray(i[o])&&(i[o]=AR(i[o])),!l)}if(F.isFormData(s)&&F.isFunction(s.entries)){const t={};return F.forEachEntry(s,(n,i)=>{e(xR(n),i,t,0)}),t}return null}function LR(s,e,t){if(F.isString(s))try{return(e||JSON.parse)(s),F.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(s)}const Vo={transitional:km,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=F.isObject(s);if(i&&F.isHTMLForm(s)&&(s=new FormData(s)),F.isFormData(s))return n?JSON.stringify(Em(s)):s;if(F.isArrayBuffer(s)||F.isBuffer(s)||F.isStream(s)||F.isFile(s)||F.isBlob(s)||F.isReadableStream(s))return s;if(F.isArrayBufferView(s))return s.buffer;if(F.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let r;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return CR(s,this.formSerializer).toString();if((r=F.isFileList(s))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Ga(r?{"files[]":s}:s,o&&new o,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),LR(s)):s}],transformResponse:[function(s){const e=this.transitional||Vo.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(F.isResponse(s)||F.isReadableStream(s))return s;if(s&&F.isString(s)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(r){if(i)throw r.name==="SyntaxError"?ke.from(r,ke.ERR_BAD_RESPONSE,this,null,this.response):r}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],s=>{Vo.headers[s]={}});const $o=Vo,IR=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BR=s=>{const e={};let t,n,i;return s&&s.split(`
38
38
  `).forEach(function(r){i=r.indexOf(":"),t=r.substring(0,i).trim().toLowerCase(),n=r.substring(i+1).trim(),!(!t||e[t]&&IR[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},Tm=Symbol("internals");function Rn(s){return s&&String(s).trim().toLowerCase()}function ja(s){return s===!1||s==null?s:F.isArray(s)?s.map(ja):String(s)}function RR(s){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(s);)e[n[1]]=n[2];return e}const vR=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Uo(s,e,t,n,i){if(F.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!F.isString(e)){if(F.isString(n))return e.indexOf(n)!==-1;if(F.isRegExp(n))return n.test(e)}}function NR(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function DR(s,e){const t=F.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+t,{value:function(i,r,o){return this[n].call(this,e,i,r,o)},configurable:!0})})}class Ha{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(l,d,c){const u=Rn(d);if(!u)throw new Error("header name must be a non-empty string");const m=F.findKey(i,u);(!m||i[m]===void 0||c===!0||c===void 0&&i[m]!==!1)&&(i[m||d]=ja(l))}const o=(l,d)=>F.forEach(l,(c,u)=>r(c,u,d));if(F.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(F.isString(e)&&(e=e.trim())&&!vR(e))o(BR(e),t);else if(F.isHeaders(e))for(const[l,d]of e.entries())r(d,l,n);else e!=null&&r(t,e,n);return this}get(e,t){if(e=Rn(e),e){const n=F.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return RR(i);if(F.isFunction(t))return t.call(this,i,n);if(F.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Rn(e),e){const n=F.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Uo(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function r(o){if(o=Rn(o),o){const l=F.findKey(n,o);l&&(!t||Uo(n,n[l],l,t))&&(delete n[l],i=!0)}}return F.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];(!e||Uo(this,this[r],r,e,!0))&&(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return F.forEach(this,(i,r)=>{const o=F.findKey(n,r);if(o){t[o]=ja(i),delete t[r];return}const l=e?NR(r):String(r).trim();l!==r&&delete t[r],t[l]=ja(i),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&F.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
39
39
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const t=(this[Tm]=this[Tm]={accessors:{}}).accessors,n=this.prototype;function i(r){const o=Rn(r);t[o]||(DR(n,r),t[o]=!0)}return F.isArray(e)?e.forEach(i):i(e),this}}Ha.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(Ha.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(n){this[t]=n}}}),F.freezeMethods(Ha);const Vt=Ha;function zo(s,e){const t=this||$o,n=e||t,i=Vt.from(n.headers);let r=n.data;return F.forEach(s,function(o){r=o.call(t,r,i.normalize(),e?e.status:void 0)}),i.normalize(),r}function Cm(s){return!!(s&&s.__CANCEL__)}function Ks(s,e,t){ke.call(this,s??"canceled",ke.ERR_CANCELED,e,t),this.name="CanceledError"}F.inherits(Ks,ke,{__CANCEL__:!0});function xm(s,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?s(t):e(new ke("Request failed with status code "+t.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function PR(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function OR(s,e){s=s||10;const t=new Array(s),n=new Array(s);let i=0,r=0,o;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),c=n[r];o||(o=d),t[i]=l,n[i]=d;let u=r,m=0;for(;u!==i;)m+=t[u++],u=u%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),d-o<e)return;const f=c&&d-c;return f?Math.round(m*1e3/f):void 0}}function FR(s,e){let t=0,n=1e3/e,i,r;const o=(l,d=Date.now())=>{t=d,i=null,r&&(clearTimeout(r),r=null),s.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-t;c>=n?o(l,d):(i=l,r||(r=setTimeout(()=>{r=null,o(i)},n-c)))},()=>i&&o(i)]}const Wa=(s,e,t=3)=>{let n=0;const i=OR(50,250);return FR(r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,d=o-n,c=i(d),u=o<=l;n=o;const m={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&u?(l-o)/c:void 0,event:r,lengthComputable:l!=null,[e?"download":"upload"]:!0};s(m)},t)},Am=(s,e)=>{const t=s!=null;return[n=>e[0]({lengthComputable:t,total:s,loaded:n}),e[1]]},Lm=s=>(...e)=>F.asap(()=>s(...e)),MR=yt.hasStandardBrowserEnv?((s,e)=>t=>(t=new URL(t,yt.origin),s.protocol===t.protocol&&s.host===t.host&&(e||s.port===t.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,VR=yt.hasStandardBrowserEnv?{write(s,e,t,n,i,r){const o=[s+"="+encodeURIComponent(e)];F.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),F.isString(n)&&o.push("path="+n),F.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $R(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function UR(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Im(s,e){return s&&!$R(e)?UR(s,e):e}const Bm=s=>s instanceof Vt?{...s}:s;function Bs(s,e){e=e||{};const t={};function n(c,u,m,f){return F.isPlainObject(c)&&F.isPlainObject(u)?F.merge.call({caseless:f},c,u):F.isPlainObject(u)?F.merge({},u):F.isArray(u)?u.slice():u}function i(c,u,m,f){if(F.isUndefined(u)){if(!F.isUndefined(c))return n(void 0,c,m,f)}else return n(c,u,m,f)}function r(c,u){if(!F.isUndefined(u))return n(void 0,u)}function o(c,u){if(F.isUndefined(u)){if(!F.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,m){if(m in e)return n(c,u);if(m in s)return n(void 0,c)}const d={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,u,m)=>i(Bm(c),Bm(u),m,!0)};return F.forEach(Object.keys(Object.assign({},s,e)),function(c){const u=d[c]||i,m=u(s[c],e[c],c);F.isUndefined(m)&&u!==l||(t[c]=m)}),t}const Rm=s=>{const e=Bs({},s);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:l}=e;e.headers=o=Vt.from(o),e.url=Sm(Im(e.baseURL,e.url),s.params,s.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(F.isFormData(t)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[c,...u]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(yt.hasStandardBrowserEnv&&(n&&F.isFunction(n)&&(n=n(e)),n||n!==!1&&MR(e.url))){const c=i&&r&&VR.read(r);c&&o.set(i,c)}return e},zR=typeof XMLHttpRequest<"u",GR=zR&&function(s){return new Promise(function(e,t){const n=Rm(s);let i=n.data;const r=Vt.from(n.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:d}=n,c,u,m,f,p;function h(){f&&f(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout;function y(){if(!g)return;const w=Vt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:s,request:g};xm(function(C){e(C),h()},function(C){t(C),h()},_),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(t(new ke("Request aborted",ke.ECONNABORTED,s,g)),g=null)},g.onerror=function(){t(new ke("Network Error",ke.ERR_NETWORK,s,g)),g=null},g.ontimeout=function(){let w=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const _=n.transitional||km;n.timeoutErrorMessage&&(w=n.timeoutErrorMessage),t(new ke(w,_.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,s,g)),g=null},i===void 0&&r.setContentType(null),"setRequestHeader"in g&&F.forEach(r.toJSON(),function(w,_){g.setRequestHeader(_,w)}),F.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),o&&o!=="json"&&(g.responseType=n.responseType),d&&([m,p]=Wa(d,!0),g.addEventListener("progress",m)),l&&g.upload&&([u,f]=Wa(l),g.upload.addEventListener("progress",u),g.upload.addEventListener("loadend",f)),(n.cancelToken||n.signal)&&(c=w=>{g&&(t(!w||w.type?new Ks(null,s,g):w),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const b=PR(n.url);if(b&&yt.protocols.indexOf(b)===-1){t(new ke("Unsupported protocol "+b+":",ke.ERR_BAD_REQUEST,s));return}g.send(i||null)})},jR=(s,e)=>{const{length:t}=s=s?s.filter(Boolean):[];if(e||t){let n=new AbortController,i;const r=function(c){if(!i){i=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof ke?u:new Ks(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,r(new ke(`timeout ${e} of ms exceeded`,ke.ETIMEDOUT))},e);const l=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),s=null)};s.forEach(c=>c.addEventListener("abort",r));const{signal:d}=n;return d.unsubscribe=()=>F.asap(l),d}},HR=jR,WR=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let n=0,i;for(;n<t;)i=n+e,yield s.slice(n,i),n=i},KR=async function*(s,e){for await(const t of qR(s))yield*WR(t,e)},qR=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const e=s.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},vm=(s,e,t,n)=>{const i=KR(s,e);let r=0,o,l=d=>{o||(o=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await i.next();if(c){l(),d.close();return}let m=u.byteLength;if(t){let f=r+=m;t(f)}d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),i.return()}},{highWaterMark:2})},Ka=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nm=Ka&&typeof ReadableStream=="function",YR=Ka&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Dm=(s,...e)=>{try{return!!s(...e)}catch{return!1}},JR=Nm&&Dm(()=>{let s=!1;const e=new Request(yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),Pm=64*1024,Go=Nm&&Dm(()=>F.isReadableStream(new Response("").body)),qa={stream:Go&&(s=>s.body)};Ka&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!qa[e]&&(qa[e]=F.isFunction(s[e])?t=>t[e]():(t,n)=>{throw new ke(`Response type '${e}' is not supported`,ke.ERR_NOT_SUPPORT,n)})})})(new Response);const XR=async s=>{if(s==null)return 0;if(F.isBlob(s))return s.size;if(F.isSpecCompliantForm(s))return(await new Request(yt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(F.isArrayBufferView(s)||F.isArrayBuffer(s))return s.byteLength;if(F.isURLSearchParams(s)&&(s=s+""),F.isString(s))return(await YR(s)).byteLength},ZR=async(s,e)=>F.toFiniteNumber(s.getContentLength())??XR(e),QR=Ka&&(async s=>{let{url:e,method:t,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:u,withCredentials:m="same-origin",fetchOptions:f}=Rm(s);c=c?(c+"").toLowerCase():"text";let p=HR([i,r&&r.toAbortSignal()],o),h;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(d&&JR&&t!=="get"&&t!=="head"&&(y=await ZR(u,n))!==0){let E=new Request(e,{method:"POST",body:n,duplex:"half"}),A;if(F.isFormData(n)&&(A=E.headers.get("content-type"))&&u.setContentType(A),E.body){const[T,R]=Am(y,Wa(Lm(d)));n=vm(E.body,Pm,T,R)}}F.isString(m)||(m=m?"include":"omit");const b="credentials"in Request.prototype;h=new Request(e,{...f,signal:p,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:b?m:void 0});let w=await fetch(h);const _=Go&&(c==="stream"||c==="response");if(Go&&(l||_&&g)){const E={};["status","statusText","headers"].forEach(I=>{E[I]=w[I]});const A=F.toFiniteNumber(w.headers.get("content-length")),[T,R]=l&&Am(A,Wa(Lm(l),!0))||[];w=new Response(vm(w.body,Pm,T,()=>{R&&R(),g&&g()}),E)}c=c||"text";let C=await qa[F.findKey(qa,c)||"text"](w,s);return!_&&g&&g(),await new Promise((E,A)=>{xm(E,A,{data:C,headers:Vt.from(w.headers),status:w.status,statusText:w.statusText,config:s,request:h})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,s,h),{cause:b.cause||b}):ke.from(b,b&&b.code,s,h)}}),jo={http:hR,xhr:GR,fetch:QR};F.forEach(jo,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const Om=s=>`- ${s}`,ev=s=>F.isFunction(s)||s===null||s===!1,Fm={getAdapter:s=>{s=F.isArray(s)?s:[s];const{length:e}=s;let t,n;const i={};for(let r=0;r<e;r++){t=s[r];let o;if(n=t,!ev(t)&&(n=jo[(o=String(t)).toLowerCase()],n===void 0))throw new ke(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?r.length>1?`since :
40
40
  `+r.map(Om).join(`