@golstats/gsc-landing 1.0.243 → 1.0.244

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.
Files changed (29) hide show
  1. package/dist/{CardBase-DJPEW7xu-DV1fklxs.js → CardBase-DJPEW7xu-tQy1i7nH.js} +1 -1
  2. package/dist/{CardBaseAllIndividual-CJY0KdrJ-gEN-cIsK.js → CardBaseAllIndividual-CJY0KdrJ-CI7H0Fsy.js} +1 -1
  3. package/dist/{CardGeneral-CDS08xVv-DN0atNlG.js → CardGeneral-CDS08xVv-BJD7nY0x.js} +2 -2
  4. package/dist/{CardGeneralIndividual-DoXvg6Ch-CEG-G52l.js → CardGeneralIndividual-DoXvg6Ch-DlaFRhGj.js} +2 -2
  5. package/dist/{CardGeneralTeams-FYzVxcB3-DxtsEBjE.js → CardGeneralTeams-FYzVxcB3-D0BFPC3E.js} +1 -1
  6. package/dist/{CardIndividual-u8FZLLmq-BjH-BxmI.js → CardIndividual-u8FZLLmq-DzIpktS5.js} +3 -3
  7. package/dist/{CardIndividual1vs1-C13lA1gg-0YMUoo6W.js → CardIndividual1vs1-C13lA1gg-DRnvsHJw.js} +2 -2
  8. package/dist/{CardIndividualAreas-D13F6fry-wZJYEMYb.js → CardIndividualAreas-D13F6fry-KTRmddgK.js} +2 -2
  9. package/dist/{CardIndividualCenters-If_CjK9--BwxbNHoj.js → CardIndividualCenters-If_CjK9--CjJj0fsY.js} +2 -2
  10. package/dist/{CardIndividualDistance-DtT14cRG-B5G3zzK6.js → CardIndividualDistance-DtT14cRG-a399WiHt.js} +2 -2
  11. package/dist/{CardIndividualFouls-Bsm2M4Gv-DXYknOti.js → CardIndividualFouls-Bsm2M4Gv-DFeBedfO.js} +2 -2
  12. package/dist/{CardIndividualGoalParticipation-DxJDrw64-DDGWMVe4.js → CardIndividualGoalParticipation-DxJDrw64-q36XeWIL.js} +2 -2
  13. package/dist/{CardIndividualGoals-tVv3jx9v-CNdrBm9i.js → CardIndividualGoals-tVv3jx9v-D5Od_SA-.js} +2 -2
  14. package/dist/{CardIndividualGold-B3awfrVU-CLFsrL7o.js → CardIndividualGold-B3awfrVU-CNSXBraZ.js} +3 -3
  15. package/dist/{CardIndividualNoGoalReceived-plZw_S4K-CWpmdDiJ.js → CardIndividualNoGoalReceived-plZw_S4K-D1lHkCmE.js} +2 -2
  16. package/dist/{CardIndividualPerformance-pONmvZ---D_llaQ02.js → CardIndividualPerformance-pONmvZ---CTy_hccz.js} +2 -2
  17. package/dist/{CardIndividualSaves-7NZaLckt-DUibROki.js → CardIndividualSaves-7NZaLckt-evl-Y5LD.js} +2 -2
  18. package/dist/{CardIndividualShotsOnGoal-BA2B5zK2-B9PVe8e8.js → CardIndividualShotsOnGoal-BA2B5zK2-BtfhUP_E.js} +2 -2
  19. package/dist/{CardIndividualStatistics-BdNBubd3-DQ7zFzsp.js → CardIndividualStatistics-BdNBubd3-DRCtUse3.js} +2 -2
  20. package/dist/{CardPromTournament-IvcxYf42-EF8r5e3M.js → CardPromTournament-IvcxYf42-C7wbClzj.js} +2 -2
  21. package/dist/{CardSuccessfulPasses-CvGqK_hf-BZ0qdzgh.js → CardSuccessfulPasses-CvGqK_hf-D6gOqNB5.js} +2 -2
  22. package/dist/{CardTheMostProductive-Crx3j88e-CotAtwiK.js → CardTheMostProductive-Crx3j88e-C6Ch3ma0.js} +3 -3
  23. package/dist/{PlayerProfileCircle-BQwTCjvG-B_DlmxMh.js → PlayerProfileCircle-BQwTCjvG-DRc4Cd_T.js} +1 -1
  24. package/dist/{Shield-aiuYwUJa-Bcmhvx_Q.js → Shield-aiuYwUJa-y1zd3iLy.js} +1 -1
  25. package/dist/gsc-landing.js +1 -1
  26. package/dist/gsc-landing.umd.cjs +1 -1
  27. package/dist/{index-BPb_W68m.js → index-CnB8qlww.js} +64 -65
  28. package/dist/style.css +1 -1
  29. package/package.json +2 -2
@@ -54,7 +54,7 @@
54
54
  * (c) 2023
55
55
  * @license MIT
56
56
  */const Mt={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"}},z2={itemsToShow:{default:Mt.itemsToShow,type:Number},itemsToScroll:{default:Mt.itemsToScroll,type:Number},wrapAround:{default:Mt.wrapAround,type:Boolean},throttle:{default:Mt.throttle,type:Number},snapAlign:{default:Mt.snapAlign,validator(t){return["start","end","center","center-even","center-odd"].includes(t)}},transition:{default:Mt.transition,type:Number},breakpoints:{default:Mt.breakpoints,type:Object},autoplay:{default:Mt.autoplay,type:Number},pauseAutoplayOnHover:{default:Mt.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Mt.mouseDrag,type:Boolean},touchDrag:{default:Mt.touchDrag,type:Boolean},dir:{default:Mt.dir,validator(t){return["rtl","ltr"].includes(t)}},i18n:{default:Mt.i18n,type:Object},settings:{default(){return{}},type:Object}};function jU({config:t,slidesCount:e}){const{snapAlign:a,wrapAround:n,itemsToShow:i=1}=t;if(n)return Math.max(e-1,0);let o;switch(a){case"start":o=e-i;break;case"end":o=e-1;break;case"center":case"center-odd":o=e-Math.ceil((i-.5)/2);break;case"center-even":o=e-Math.ceil(i/2);break;default:o=0;break}return Math.max(o,0)}function qU({config:t,slidesCount:e}){const{wrapAround:a,snapAlign:n,itemsToShow:i=1}=t;let o=0;if(a||i>e)return o;switch(n){case"start":o=0;break;case"end":o=i-1;break;case"center":case"center-odd":o=Math.floor((i-1)/2);break;case"center-even":o=Math.floor((i-2)/2);break;default:o=0;break}return o}function pu({val:t,max:e,min:a}){return e<a?t:Math.min(Math.max(t,a),e)}function $U({config:t,currentSlide:e,slidesCount:a}){const{snapAlign:n,wrapAround:i,itemsToShow:o=1}=t;let r=e;switch(n){case"center":case"center-odd":r-=(o-1)/2;break;case"center-even":r-=(o-2)/2;break;case"end":r-=o-1;break}return i?r:pu({val:r,max:a-o,min:0})}function j2(t){return t?t.reduce((e,a)=>{var n;return a.type===s.Fragment?[...e,...j2(a.children)]:((n=a.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,a]:e},[]):[]}function gu({val:t,max:e,min:a=0}){return t>e?gu({val:t-(e+1),max:e,min:a}):t<a?gu({val:t+(e+1),max:e,min:a}):t}function GU(t,e){let a;return e?function(...n){const i=this;a||(t.apply(i,n),a=!0,setTimeout(()=>a=!1,e))}:t}function KU(t,e){let a;return function(...n){a&&clearTimeout(a),a=setTimeout(()=>{t(...n),a=null},e)}}function WU(t="",e={}){return Object.entries(e).reduce((a,[n,i])=>a.replace(`{${n}}`,String(i)),t)}var HU=s.defineComponent({name:"ARIA",setup(){const t=s.inject("config",s.reactive(Object.assign({},Mt))),e=s.inject("currentSlide",s.ref(0)),a=s.inject("slidesCount",s.ref(0));return()=>s.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},WU(t.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:a.value}))}}),XU=s.defineComponent({name:"Carousel",props:z2,setup(t,{slots:e,emit:a,expose:n}){var i;const o=s.ref(null),r=s.ref([]),l=s.ref(0),d=s.ref(0),c=s.reactive(Object.assign({},Mt));let u=Object.assign({},Mt),h;const f=s.ref((i=t.modelValue)!==null&&i!==void 0?i:0),g=s.ref(0),m=s.ref(0),p=s.ref(0),y=s.ref(0);let b,S;s.provide("config",c),s.provide("slidesCount",d),s.provide("currentSlide",f),s.provide("maxSlide",p),s.provide("minSlide",y),s.provide("slideWidth",l);function w(){h=Object.assign({},t.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),t),{i18n:Object.assign(Object.assign({},u.i18n),t.i18n),breakpoints:void 0}),C(u)}function _(){if(!h||!Object.keys(h).length)return;const v=Object.keys(h).map(z=>Number(z)).sort((z,Se)=>+Se-+z);let oe=Object.assign({},u);v.some(z=>{const Se=window.matchMedia(`(min-width: ${z}px)`).matches;return Se&&(oe=Object.assign(Object.assign({},oe),h[z])),Se}),C(oe)}function C(v){Object.entries(v).forEach(([oe,z])=>c[oe]=z)}const N=KU(()=>{_(),E()},16);function E(){if(!o.value)return;const v=o.value.getBoundingClientRect();l.value=v.width/c.itemsToShow}function L(){d.value<=0||(m.value=Math.ceil((d.value-1)/2),p.value=jU({config:c,slidesCount:d.value}),y.value=qU({config:c,slidesCount:d.value}),c.wrapAround||(f.value=pu({val:f.value,max:p.value,min:y.value})))}s.onMounted(()=>{s.nextTick(()=>E()),setTimeout(()=>E(),1e3),_(),be(),window.addEventListener("resize",N,{passive:!0}),a("init")}),s.onUnmounted(()=>{S&&clearTimeout(S),b&&clearInterval(b),window.removeEventListener("resize",N,{passive:!0})});let x=!1;const V={x:0,y:0},B={x:0,y:0},F=s.reactive({x:0,y:0}),se=s.ref(!1),re=s.ref(!1),ue=()=>{se.value=!0},ae=()=>{se.value=!1};function de(v){["INPUT","TEXTAREA","SELECT"].includes(v.target.tagName)||(x=v.type==="touchstart",x||v.preventDefault(),!(!x&&v.button!==0||H.value)&&(V.x=x?v.touches[0].clientX:v.clientX,V.y=x?v.touches[0].clientY:v.clientY,document.addEventListener(x?"touchmove":"mousemove",ie,!0),document.addEventListener(x?"touchend":"mouseup",le,!0)))}const ie=GU(v=>{re.value=!0,B.x=x?v.touches[0].clientX:v.clientX,B.y=x?v.touches[0].clientY:v.clientY;const oe=B.x-V.x,z=B.y-V.y;F.y=z,F.x=oe},c.throttle);function le(){const v=c.dir==="rtl"?-1:1,oe=Math.sign(F.x)*.4,z=Math.round(F.x/l.value+oe)*v;if(z&&!x){const Se=Ge=>{Ge.stopPropagation(),window.removeEventListener("click",Se,!0)};window.addEventListener("click",Se,!0)}Z(f.value-z),F.x=0,F.y=0,re.value=!1,document.removeEventListener(x?"touchmove":"mousemove",ie,!0),document.removeEventListener(x?"touchend":"mouseup",le,!0)}function be(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&se.value||Q()},c.autoplay))}function ee(){b&&(clearInterval(b),b=null),be()}const H=s.ref(!1);function Z(v){const oe=c.wrapAround?v:pu({val:v,max:p.value,min:y.value});f.value===oe||H.value||(a("slide-start",{slidingToIndex:v,currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),H.value=!0,g.value=f.value,f.value=oe,S=setTimeout(()=>{if(c.wrapAround){const z=gu({val:oe,max:p.value,min:0});z!==f.value&&(f.value=z,a("loop",{currentSlideIndex:f.value,slidingToIndex:v}))}a("update:modelValue",f.value),a("slide-end",{currentSlideIndex:f.value,prevSlideIndex:g.value,slidesCount:d.value}),H.value=!1,ee()},c.transition))}function Q(){Z(f.value+c.itemsToScroll)}function we(){Z(f.value-c.itemsToScroll)}const Ee={slideTo:Z,next:Q,prev:we};s.provide("nav",Ee),s.provide("isSliding",H);const pe=s.computed(()=>$U({config:c,currentSlide:f.value,slidesCount:d.value}));s.provide("slidesToScroll",pe);const Ce=s.computed(()=>{const v=c.dir==="rtl"?-1:1,oe=pe.value*l.value*v;return{transform:`translateX(${F.x-oe}px)`,transition:`${H.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){w(),_(),L(),E(),ee()}Object.keys(z2).forEach(v=>{["modelValue"].includes(v)||s.watch(()=>t[v],Te)}),s.watch(()=>t.modelValue,v=>{v!==f.value&&Z(Number(v))}),s.watch(d,L),a("before-init"),w();const je={config:c,slidesCount:d,slideWidth:l,next:Q,prev:we,slideTo:Z,currentSlide:f,maxSlide:p,minSlide:y,middleSlide:m};n({updateBreakpointsConfigs:_,updateSlidesData:L,updateSlideWidth:E,initDefaultConfigs:w,restartCarousel:Te,slideTo:Z,next:Q,prev:we,nav:Ee,data:je});const st=e.default||e.slides,bt=e.addons,mt=s.reactive(je);return()=>{const v=j2(st==null?void 0:st(mt)),oe=(bt==null?void 0:bt(mt))||[];v.forEach((A,O)=>A.props.index=O);let z=v;if(c.wrapAround){const A=v.map((ne,Y)=>s.cloneVNode(ne,{index:-v.length+Y,isClone:!0,key:`clone-before-${Y}`})),O=v.map((ne,Y)=>s.cloneVNode(ne,{index:v.length+Y,isClone:!0,key:`clone-after-${Y}`}));z=[...A,...v,...O]}r.value=v,d.value=Math.max(v.length,1);const Se=s.h("ol",{class:"carousel__track",style:Ce.value,onMousedownCapture:c.mouseDrag?de:null,onTouchstartPassiveCapture:c.touchDrag?de:null},z),Ge=s.h("div",{class:"carousel__viewport"},Se);return s.h("section",{ref:o,class:{carousel:!0,"is-sliding":H.value,"is-dragging":re.value,"is-hover":se.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:ue,onMouseleave:ae},[Ge,oe,s.h(HU)])}}}),q2;(function(t){t.arrowUp="arrowUp",t.arrowDown="arrowDown",t.arrowRight="arrowRight",t.arrowLeft="arrowLeft"})(q2||(q2={}));var JU=s.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(t,{slots:e}){const a=s.inject("config",s.reactive(Object.assign({},Mt))),n=s.inject("currentSlide",s.ref(0)),i=s.inject("slidesToScroll",s.ref(0)),o=s.inject("isSliding",s.ref(!1)),r=()=>t.index===n.value,l=()=>t.index===n.value-1,d=()=>t.index===n.value+1,c=()=>{const u=Math.floor(i.value),h=Math.ceil(i.value+a.itemsToShow-1);return t.index>=u&&t.index<=h};return()=>{var u;return s.h("li",{style:{width:`${100/a.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":t.isClone,"carousel__slide--visible":c(),"carousel__slide--active":r(),"carousel__slide--prev":l(),"carousel__slide--next":d(),"carousel__slide--sliding":o.value},"aria-hidden":!c()},(u=e.default)===null||u===void 0?void 0:u.call(e))}}});const ZU=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},YU=t=>(s.pushScopeId("data-v-54620d25"),t=t(),s.popScopeId(),t),QU={class:"gsc-carousel"},ez={key:0},tz=YU(()=>s.createElementVNode("div",null,"no hay",-1)),az=[tz],nz={class:"gsc-carousel__2d__slides"},sz={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},iz=["fill"],oz={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rz=["fill"],lz={class:"gsc-carousel__2d__navigation"},cz={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dz=["stroke"],uz={key:1,class:"gsc-carousel__2d__navigation__pagination"},hz=["onClick"],mz={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fz=["stroke"],pz={__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:t=>["propName","value"].every(e=>e in t)},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(t,{expose:e,emit:a}){const n=t;s.useCssVars(p=>({"2c72d674":t.slideLeftArrowBackgroundImage,"90a63f40":t.slidesArrowsLeftAndRight,"2627d097":t.slideRightArrowBackgroundImage,"1904d43f":t.marginTop,cfb58986:t.secondarySlidesOpacity}));const i=s.ref(null),o=s.ref({}),r=s.ref(0),l=s.ref(!1);s.watch(i,p=>{p&&l.value?(l.value=!1,d(n.items)):p&&p.slideTo&&p.slideTo(r.value)},{deep:!0}),s.watch(()=>n.currentItemIndex,p=>{r.value!==p&&f(p)}),s.watch(()=>n.defaultItemByIndex,p=>{r.value!==p&&f(p)}),s.watch(()=>n.items,p=>{i.value?d(p):l.value=!0},{immediate:!0});function d(p){p&&p.length&&i.value&&setTimeout(()=>{if(n.defaultItemByProp){const y=n.items.findIndex(b=>b[n.defaultItemByProp.propName]===n.defaultItemByProp.value);y!==-1?(r.value=y,o.value=p[y]):(r.value=0,o.value=p[0])}else r.value=n.defaultItemByIndex,o.value=p[n.defaultItemByIndex];i.value.slideTo&&i.value.slideTo(r.value),o.value&&r.value===0&&a("input",{selectedItem:o.value,selectedItemIndex:r.value})},500)}function c(){i.value&&i.value.next()}function u(){i.value&&i.value.prev()}function h(){i.value&&i.value.updateSlideWidth()}function f(p){i.value&&i.value.slideTo(p)}function g(p){i.value.slideTo(p)}function m(p){const y=p.slidingToIndex<0?n.items.length-1:p.slidingToIndex===n.items.length?0:p.slidingToIndex;r.value=y,o.value=n.items[y],a("update:currentItemIndex",y),a("input",{selectedItem:o.value,selectedItemIndex:r.value})}return e({prev:u,next:c,updateSlideWidth:h,slideTo:f}),(p,y)=>(s.openBlock(),s.createElementBlock("div",QU,[n.is3d?(s.openBlock(),s.createElementBlock("div",ez,az)):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":t.isMainSlidePriority}])},[s.createElementVNode("div",nz,[s.createVNode(s.unref(XU),{ref_key:"carousel2d",ref:i,"items-to-show":t.itemsToShow,"wrap-around":t.wrapAround,onSlideStart:m},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(b,S)=>(s.openBlock(),s.createBlock(s.unref(JU),{key:S},{default:s.withCtx(()=>[s.renderSlot(p.$slots,"default",{item:b},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),t.areSlidesArrowsVisible&&t.items.length>1?(s.openBlock(),s.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:s.normalizeStyle("max-width:"+t.arrowsMaxWidth+"!important"),onClick:y[0]||(y[0]=b=>i.value.prev())},[s.createElementVNode("div",{class:s.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:t.areSlidesArrowsRounded}])},[(s.openBlock(),s.createElementBlock("svg",sz,[s.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:t.arrowsColor},null,8,iz)]))],2)],4)):s.createCommentVNode("",!0),t.areSlidesArrowsVisible&&t.items.length>1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:s.normalizeStyle("max-width:"+t.arrowsMaxWidth+"!important"),onClick:y[1]||(y[1]=b=>c())},[s.createElementVNode("div",{class:s.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:t.areSlidesArrowsRounded}])},[(s.openBlock(),s.createElementBlock("svg",oz,[s.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:t.arrowsColor},null,8,rz)]))],2)],4)):s.createCommentVNode("",!0),s.createElementVNode("div",lz,[t.areNavigationArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:y[2]||(y[2]=b=>u())},[(s.openBlock(),s.createElementBlock("svg",cz,[s.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,dz)]))])):s.createCommentVNode("",!0),t.isPaginationVisible?(s.openBlock(),s.createElementBlock("div",uz,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(b,S)=>(s.openBlock(),s.createElementBlock("div",{key:`i-${S}`,class:"gsc-carousel__2d__navigation__pagination__item",style:s.normalizeStyle({height:`${n.navigationHeight}px`,width:`${r.value===S?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${r.value===S?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:w=>g(S)},null,12,hz))),128))])):s.createCommentVNode("",!0),t.areNavigationArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:y[3]||(y[3]=b=>i.value.next())},[(s.openBlock(),s.createElementBlock("svg",mz,[s.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,fz)]))])):s.createCommentVNode("",!0)])],2))]))}},gz=ZU(pz,[["__scopeId","data-v-54620d25"]]),$2=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function ge(t,e,a){return(e=bz(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function yz(t,e){if(typeof t!="object"||t===null)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var n=a.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bz(t){var e=yz(t,"string");return typeof e=="symbol"?e:String(e)}function Sz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G2(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function wz(t,e,a){return e&&G2(t.prototype,e),a&&G2(t,a),t}function kz(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function K2(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),a.push.apply(a,n)}return a}function W2(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?K2(Object(a),!0).forEach(function(n){kz(t,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):K2(Object(a)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(a,n))})}return t}var H2={addCSS:!0,thumbWidth:15,watch:!0};function _z(t,e){return(function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(t,e)}function Ez(t,e){if(t&&e){var a=new Event(e,{bubbles:!0});t.dispatchEvent(a)}}var Si=function(t){return t!=null?t.constructor:null},yu=function(t,e){return!!(t&&e&&t instanceof e)},X2=function(t){return t==null},J2=function(t){return Si(t)===Object},Cz=function(t){return Si(t)===Number&&!Number.isNaN(t)},Z2=function(t){return Si(t)===String},Tz=function(t){return Si(t)===Boolean},xz=function(t){return Si(t)===Function},Y2=function(t){return Array.isArray(t)},Q2=function(t){return yu(t,NodeList)},Lz=function(t){return yu(t,Element)},Nz=function(t){return yu(t,Event)},vz=function(t){return X2(t)||(Z2(t)||Y2(t)||Q2(t))&&!t.length||J2(t)&&!Object.keys(t).length},Wt={nullOrUndefined:X2,object:J2,number:Cz,string:Z2,boolean:Tz,function:xz,array:Y2,nodeList:Q2,element:Lz,event:Nz,empty:vz};function Vz(t){var e="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function Az(t,e){if(1>e){var a=Vz(e);return parseFloat(t.toFixed(a))}return Math.round(t/e)*e}var Rz=function(){function t(e,a){Sz(this,t),Wt.element(e)?this.element=e:Wt.string(e)&&(this.element=document.querySelector(e)),Wt.element(this.element)&&Wt.empty(this.element.rangeTouch)&&(this.config=W2({},H2,{},a),this.init())}return wz(t,[{key:"init",value:function(){t.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(){t.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 a=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(i){a.element[n](i,function(o){return a.set(o)},!1)})}},{key:"get",value:function(e){if(!t.enabled||!Wt.event(e))return null;var a,n=e.target,i=e.changedTouches[0],o=parseFloat(n.getAttribute("min"))||0,r=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>(a=100/d.width*(i.clientX-d.left))?a=0:100<a&&(a=100),50>a?a-=(100-2*a)*c:50<a&&(a+=2*(a-50)*c),o+Az(a/100*(r-o),l)}},{key:"set",value:function(e){t.enabled&&Wt.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),Ez(e.target,e.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(e){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(Wt.empty(e)||Wt.string(e)?n=Array.from(document.querySelectorAll(Wt.string(e)?e:'input[type="range"]')):Wt.element(e)?n=[e]:Wt.nodeList(e)?n=Array.from(e):Wt.array(e)&&(n=e.filter(Wt.element)),Wt.empty(n))return null;var i=W2({},H2,{},a);if(Wt.string(e)&&i.watch){var o=new MutationObserver(function(r){Array.from(r).forEach(function(l){Array.from(l.addedNodes).forEach(function(d){Wt.element(d)&&_z(d,e)&&new t(d,i)})})});o.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(r){return new t(r,a)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}();const wi=t=>t!=null?t.constructor:null,dn=(t,e)=>!!(t&&e&&t instanceof e),bu=t=>t==null,ey=t=>wi(t)===Object,Oz=t=>wi(t)===Number&&!Number.isNaN(t),Rr=t=>wi(t)===String,Iz=t=>wi(t)===Boolean,ty=t=>typeof t=="function",ay=t=>Array.isArray(t),Bz=t=>dn(t,WeakMap),ny=t=>dn(t,NodeList),Pz=t=>wi(t)===Text,Fz=t=>dn(t,Event),Mz=t=>dn(t,KeyboardEvent),Dz=t=>dn(t,window.TextTrackCue)||dn(t,window.VTTCue),Uz=t=>dn(t,TextTrack)||!bu(t)&&Rr(t.kind),zz=t=>dn(t,Promise)&&ty(t.then),jz=t=>t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.style=="object"&&typeof t.ownerDocument=="object",sy=t=>bu(t)||(Rr(t)||ay(t)||ny(t))&&!t.length||ey(t)&&!Object.keys(t).length;var T={nullOrUndefined:bu,object:ey,number:Oz,string:Rr,boolean:Iz,function:ty,array:ay,weakMap:Bz,nodeList:ny,element:jz,textNode:Pz,event:Fz,keyboardEvent:Mz,cue:Dz,track:Uz,promise:zz,url:t=>{if(dn(t,window.URL))return!0;if(!Rr(t))return!1;let e=t;t.startsWith("http://")&&t.startsWith("https://")||(e=`http://${t}`);try{return!sy(new URL(e).hostname)}catch{return!1}},empty:sy};const Su=(()=>{const t=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},a=Object.keys(e).find(n=>t.style[n]!==void 0);return!!T.string(a)&&e[a]})();function iy(t,e){setTimeout(()=>{try{t.hidden=!0,t.offsetHeight,t.hidden=!1}catch{}},e)}const qz=!!window.document.documentMode,$z=/Edge/g.test(navigator.userAgent),Gz="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),Kz=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,Wz=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,Hz=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var Rt={isIE:qz,isEdge:$z,isWebKit:Gz,isIPhone:Kz,isIPadOS:Wz,isIos:Hz};function Xz(t){return JSON.parse(JSON.stringify(t))}function oy(t,e){return e.split(".").reduce((a,n)=>a&&a[n],t)}function pt(t={},...e){if(!e.length)return t;const a=e.shift();return T.object(a)?(Object.keys(a).forEach(n=>{T.object(a[n])?(Object.keys(t).includes(n)||Object.assign(t,{[n]:{}}),pt(t[n],a[n])):Object.assign(t,{[n]:a[n]})}),pt(t,...e)):t}function ry(t,e){const a=t.length?t:[t];Array.from(a).reverse().forEach((n,i)=>{const o=i>0?e.cloneNode(!0):e,r=n.parentNode,l=n.nextSibling;o.appendChild(n),l?r.insertBefore(o,l):r.appendChild(o)})}function wu(t,e){T.element(t)&&!T.empty(e)&&Object.entries(e).filter(([,a])=>!T.nullOrUndefined(a)).forEach(([a,n])=>t.setAttribute(a,n))}function xe(t,e,a){const n=document.createElement(t);return T.object(e)&&wu(n,e),T.string(a)&&(n.innerText=a),n}function Jz(t,e){T.element(t)&&T.element(e)&&e.parentNode.insertBefore(t,e.nextSibling)}function ly(t,e,a,n){T.element(e)&&e.appendChild(xe(t,a,n))}function un(t){T.nodeList(t)||T.array(t)?Array.from(t).forEach(un):T.element(t)&&T.element(t.parentNode)&&t.parentNode.removeChild(t)}function Or(t){if(!T.element(t))return;let{length:e}=t.childNodes;for(;e>0;)t.removeChild(t.lastChild),e-=1}function Ir(t,e){return T.element(e)&&T.element(e.parentNode)&&T.element(t)?(e.parentNode.replaceChild(t,e),t):null}function Za(t,e){if(!T.string(t)||T.empty(t))return{};const a={},n=pt({},e);return t.split(",").forEach(i=>{const o=i.trim(),r=o.replace(".",""),l=o.replace(/[[\]]/g,"").split("="),[d]=l,c=l.length>1?l[1].replace(/["']/g,""):"";switch(o.charAt(0)){case".":T.string(n.class)?a.class=`${n.class} ${r}`:a.class=r;break;case"#":a.id=o.replace("#","");break;case"[":a[d]=c}}),pt(n,a)}function Qn(t,e){if(!T.element(t))return;let a=e;T.boolean(a)||(a=!t.hidden),t.hidden=a}function Je(t,e,a){if(T.nodeList(t))return Array.from(t).map(n=>Je(n,e,a));if(T.element(t)){let n="toggle";return a!==void 0&&(n=a?"add":"remove"),t.classList[n](e),t.classList.contains(e)}return!1}function Br(t,e){return T.element(t)&&t.classList.contains(e)}function es(t,e){const{prototype:a}=Element;return(a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(t,e)}function Zz(t,e){const{prototype:a}=Element;return(a.closest||function(){let n=this;do{if(es.matches(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(t,e)}function ki(t){return this.elements.container.querySelectorAll(t)}function Nt(t){return this.elements.container.querySelector(t)}function ku(t=null,e=!1){T.element(t)&&t.focus({preventScroll:!0,focusVisible:e})}const cy={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},gt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(t,e){const a=gt[t]||e!=="html5";return{api:a,ui:a&&gt.rangeInput}},pip:!(Rt.isIPhone||!T.function(xe("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||xe("video").disablePictureInPicture)),airplay:T.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(t){if(T.empty(t))return!1;const[e]=t.split("/");let a=t;if(!this.isHTML5||e!==this.type)return!1;Object.keys(cy).includes(a)&&(a+=`; codecs="${cy[t]}"`);try{return!!(a&&this.media.canPlayType(a).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const t=document.createElement("input");return t.type="range",t.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:Su!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Yz=(()=>{let t=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(t=!0,null)});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t})();function _i(t,e,a,n=!1,i=!0,o=!1){if(!t||!("addEventListener"in t)||T.empty(e)||!T.function(a))return;const r=e.split(" ");let l=o;Yz&&(l={passive:i,capture:o}),r.forEach(d=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:t,type:d,callback:a,options:l}),t[n?"addEventListener":"removeEventListener"](d,a,l)})}function Ke(t,e="",a,n=!0,i=!1){_i.call(this,t,e,a,!0,n,i)}function Pr(t,e="",a,n=!0,i=!1){_i.call(this,t,e,a,!1,n,i)}function _u(t,e="",a,n=!0,i=!1){const o=(...r)=>{Pr(t,e,o,n,i),a.apply(this,r)};_i.call(this,t,e,o,!0,n,i)}function Le(t,e="",a=!1,n={}){if(!T.element(t)||T.empty(e))return;const i=new CustomEvent(e,{bubbles:a,detail:{...n,plyr:this}});t.dispatchEvent(i)}function Qz(){this&&this.eventListeners&&(this.eventListeners.forEach(t=>{const{element:e,type:a,callback:n,options:i}=t;e.removeEventListener(a,n,i)}),this.eventListeners=[])}function ej(){return new Promise(t=>this.ready?setTimeout(t,0):Ke.call(this,this.elements.container,"ready",t)).then(()=>{})}function Ya(t){T.promise(t)&&t.then(null,()=>{})}function Eu(t){return T.array(t)?t.filter((e,a)=>t.indexOf(e)===a):t}function dy(t,e){return T.array(t)&&t.length?t.reduce((a,n)=>Math.abs(n-e)<Math.abs(a-e)?n:a):null}function uy(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}const hy=[[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((t,[e,a])=>({...t,[e/a]:[e,a]}),{});function my(t){return T.array(t)||T.string(t)&&t.includes(":")?(T.array(t)?t:t.split(":")).map(Number).every(T.number):!1}function Fr(t){if(!T.array(t)||!t.every(T.number))return null;const[e,a]=t,n=(o,r)=>r===0?o:n(r,o%r),i=n(e,a);return[e/i,a/i]}function Cu(t){const e=n=>my(n)?n.split(":").map(Number):null;let a=e(t);if(a===null&&(a=e(this.config.ratio)),a===null&&!T.empty(this.embed)&&T.array(this.embed.ratio)&&({ratio:a}=this.embed),a===null&&this.isHTML5){const{videoWidth:n,videoHeight:i}=this.media;a=[n,i]}return Fr(a)}function Ls(t){if(!this.isVideo)return{};const{wrapper:e}=this.elements,a=Cu.call(this,t);if(!T.array(a))return{};const[n,i]=Fr(a),o=100/n*i;if(uy(`aspect-ratio: ${n}/${i}`)?e.style.aspectRatio=`${n}/${i}`:e.style.paddingBottom=`${o}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const r=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(r-o)/(r/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:o,ratio:a}}function fy(t,e,a=.05){const n=t/e,i=dy(Object.keys(hy),n);return Math.abs(i-n)<=a?hy[i]:[t,e]}function tj(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const kn={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(t=>{const e=t.getAttribute("type");return!!T.empty(e)||gt.mime.call(this,e)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:kn.getSources.call(this).map(t=>Number(t.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const t=this;t.options.speed=t.config.speed.options,T.empty(this.config.ratio)||Ls.call(t),Object.defineProperty(t.media,"quality",{get(){const e=kn.getSources.call(t).find(a=>a.getAttribute("src")===t.source);return e&&Number(e.getAttribute("size"))},set(e){if(t.quality!==e){if(t.config.quality.forced&&T.function(t.config.quality.onChange))t.config.quality.onChange(e);else{const a=kn.getSources.call(t).find(d=>Number(d.getAttribute("size"))===e);if(!a)return;const{currentTime:n,paused:i,preload:o,readyState:r,playbackRate:l}=t.media;t.media.src=a.getAttribute("src"),(o!=="none"||r)&&(t.once("loadedmetadata",()=>{t.speed=l,t.currentTime=n,i||Ya(t.play())}),t.media.load())}Le.call(t,t.media,"qualitychange",!1,{quality:e})}}})},cancelRequests(){this.isHTML5&&(un(kn.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function aj(t){return`${t}-${Math.floor(1e4*Math.random())}`}function Tu(t,...e){return T.empty(t)?t:t.toString().replace(/{(\d+)}/g,(a,n)=>e[n].toString())}function nj(t,e){return t===0||e===0||Number.isNaN(t)||Number.isNaN(e)?0:(t/e*100).toFixed(2)}const Ei=(t="",e="",a="")=>t.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),a.toString()),py=(t="")=>t.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function sj(t=""){let e=t.toString();return e=Ei(e,"-"," "),e=Ei(e,"_"," "),e=py(e),Ei(e," ","")}function ij(t=""){let e=t.toString();return e=sj(e),e.charAt(0).toLowerCase()+e.slice(1)}function oj(t){const e=document.createDocumentFragment(),a=document.createElement("div");return e.appendChild(a),a.innerHTML=t,e.firstChild.innerText}function rj(t){const e=document.createElement("div");return e.appendChild(t),e.innerHTML}const gy={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Ot={get(t="",e={}){if(T.empty(t)||T.empty(e))return"";let a=oy(e.i18n,t);if(T.empty(a))return Object.keys(gy).includes(t)?gy[t]:"";const n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach(([i,o])=>{a=Ei(a,i,o)}),a}};class Ci{constructor(e){ge(this,"get",a=>{if(!Ci.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(T.empty(n))return null;const i=JSON.parse(n);return T.string(a)&&a.length?i[a]:i}),ge(this,"set",a=>{if(!Ci.supported||!this.enabled||!T.object(a))return;let n=this.get();T.empty(n)&&(n={}),pt(n,a);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 Ti(t,e="text"){return new Promise((a,n)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if(e==="text")try{a(JSON.parse(i.responseText))}catch{a(i.responseText)}else a(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",t,!0),i.responseType=e,i.send()}catch(i){n(i)}})}function yy(t,e){if(!T.string(t))return;const a="cache",n=T.string(e);let i=!1;const o=()=>document.getElementById(e)!==null,r=(l,d)=>{l.innerHTML=d,n&&o()||document.body.insertAdjacentElement("afterbegin",l)};if(!n||!o()){const l=Ci.supported,d=document.createElement("div");if(d.setAttribute("hidden",""),n&&d.setAttribute("id",e),l){const c=window.localStorage.getItem(`${a}-${e}`);if(i=c!==null,i){const u=JSON.parse(c);r(d,u.content)}}Ti(t).then(c=>{if(!T.empty(c)){if(l)try{window.localStorage.setItem(`${a}-${e}`,JSON.stringify({content:c}))}catch{}r(d,c)}}).catch(()=>{})}}const by=t=>Math.trunc(t/60/60%60,10),lj=t=>Math.trunc(t/60%60,10),cj=t=>Math.trunc(t%60,10);function Mr(t=0,e=!1,a=!1){if(!T.number(t))return Mr(void 0,e,a);const n=l=>`0${l}`.slice(-2);let i=by(t);const o=lj(t),r=cj(t);return i=e||i>0?`${i}:`:"",`${a&&t>0?"-":""}${i}${n(o)}:${n(r)}`}const fe={getIconUrl(){const t=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,a=t.host!==e||Rt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:a}},findElements(){try{return this.elements.controls=Nt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ki.call(this,this.config.selectors.buttons.play),pause:Nt.call(this,this.config.selectors.buttons.pause),restart:Nt.call(this,this.config.selectors.buttons.restart),rewind:Nt.call(this,this.config.selectors.buttons.rewind),fastForward:Nt.call(this,this.config.selectors.buttons.fastForward),mute:Nt.call(this,this.config.selectors.buttons.mute),pip:Nt.call(this,this.config.selectors.buttons.pip),airplay:Nt.call(this,this.config.selectors.buttons.airplay),settings:Nt.call(this,this.config.selectors.buttons.settings),captions:Nt.call(this,this.config.selectors.buttons.captions),fullscreen:Nt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Nt.call(this,this.config.selectors.progress),this.elements.inputs={seek:Nt.call(this,this.config.selectors.inputs.seek),volume:Nt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Nt.call(this,this.config.selectors.display.buffer),currentTime:Nt.call(this,this.config.selectors.display.currentTime),duration:Nt.call(this,this.config.selectors.display.duration)},T.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon(t,e){const a="http://www.w3.org/2000/svg",n=fe.getIconUrl.call(this),i=`${n.cors?"":n.url}#${this.config.iconPrefix}`,o=document.createElementNS(a,"svg");wu(o,pt(e,{"aria-hidden":"true",focusable:"false"}));const r=document.createElementNS(a,"use"),l=`${i}-${t}`;return"href"in r&&r.setAttributeNS("http://www.w3.org/1999/xlink","href",l),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.appendChild(r),o},createLabel(t,e={}){const a=Ot.get(t,this.config);return xe("span",{...e,class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")},a)},createBadge(t){if(T.empty(t))return null;const e=xe("span",{class:this.config.classNames.menu.value});return e.appendChild(xe("span",{class:this.config.classNames.menu.badge},t)),e},createButton(t,e){const a=pt({},e);let n=ij(t);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(r=>{Object.keys(a).includes(r)&&(i[r]=a[r],delete a[r])}),i.element!=="button"||Object.keys(a).includes("type")||(a.type="button"),Object.keys(a).includes("class")?a.class.split(" ").some(r=>r===this.config.classNames.control)||pt(a,{class:`${a.class} ${this.config.classNames.control}`}):a.class=this.config.classNames.control,t){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":a.class+=` ${this.config.classNames.control}--overlaid`,n="play",i.label="play",i.icon="play";break;default:T.empty(i.label)&&(i.label=n),T.empty(i.icon)&&(i.icon=t)}const o=xe(i.element);return i.toggle?(o.appendChild(fe.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),o.appendChild(fe.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),o.appendChild(fe.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),o.appendChild(fe.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(o.appendChild(fe.createIcon.call(this,i.icon)),o.appendChild(fe.createLabel.call(this,i.label))),pt(a,Za(this.config.selectors.buttons[n],a)),wu(o,a),n==="play"?(T.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(o)):this.elements.buttons[n]=o,o},createRange(t,e){const a=xe("input",pt(Za(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Ot.get(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[t]=a,fe.updateRangeFill.call(this,a),Rz.setup(a),a},createProgress(t,e){const a=xe("progress",pt(Za(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if(t!=="volume"){a.appendChild(xe("span",null,"0"));const n={played:"played",buffer:"buffered"}[t],i=n?Ot.get(n,this.config):"";a.innerText=`% ${i.toLowerCase()}`}return this.elements.display[t]=a,a},createTime(t,e){const a=Za(this.config.selectors.display[t],e),n=xe("div",pt(a,{class:`${a.class?a.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Ot.get(t,this.config),role:"timer"}),"00:00");return this.elements.display[t]=n,n},bindMenuItemShortcuts(t,e){Ke.call(this,t,"keydown keyup",a=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(a.key)||(a.preventDefault(),a.stopPropagation(),a.type==="keydown"))return;const n=es(t,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(a.key))fe.showMenuPanel.call(this,e,!0);else{let i;a.key!==" "&&(a.key==="ArrowDown"||n&&a.key==="ArrowRight"?(i=t.nextElementSibling,T.element(i)||(i=t.parentNode.firstElementChild)):(i=t.previousElementSibling,T.element(i)||(i=t.parentNode.lastElementChild)),ku.call(this,i,!0))}},!1),Ke.call(this,t,"keyup",a=>{a.key==="Return"&&fe.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:t,list:e,type:a,title:n,badge:i=null,checked:o=!1}){const r=Za(this.config.selectors.inputs[a]),l=xe("button",pt(r,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${r.class?r.class:""}`.trim(),"aria-checked":o,value:t})),d=xe("span");d.innerHTML=n,T.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=>es(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(!T.keyboardEvent(c)||c.key===" "){switch(c.preventDefault(),c.stopPropagation(),l.checked=!0,a){case"language":this.currentTrack=Number(t);break;case"quality":this.quality=t;break;case"speed":this.speed=parseFloat(t)}fe.showMenuPanel.call(this,"home",T.keyboardEvent(c))}},a,!1),fe.bindMenuItemShortcuts.call(this,l,a),e.appendChild(l)},formatTime(t=0,e=!1){return T.number(t)?Mr(t,by(this.duration)>0,e):t},updateTimeDisplay(t=null,e=0,a=!1){T.element(t)&&T.number(e)&&(t.innerText=fe.formatTime(e,a))},updateVolume(){this.supported.ui&&(T.element(this.elements.inputs.volume)&&fe.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),T.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(t,e=0){T.element(t)&&(t.value=e,fe.updateRangeFill.call(this,t))},updateProgress(t){if(!this.supported.ui||!T.event(t))return;let e=0;const a=(n,i)=>{const o=T.number(i)?i:0,r=T.element(n)?n:this.elements.display.buffer;if(T.element(r)){r.value=o;const l=r.getElementsByTagName("span")[0];T.element(l)&&(l.childNodes[0].nodeValue=o)}};if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":e=nj(this.currentTime,this.duration),t.type==="timeupdate"&&fe.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":a(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(t){const e=T.event(t)?t.target:t;if(T.element(e)&&e.getAttribute("type")==="range"){if(es(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const a=fe.formatTime(this.currentTime),n=fe.formatTime(this.duration),i=Ot.get("seekLabel",this.config);e.setAttribute("aria-valuetext",i.replace("{currentTime}",a).replace("{duration}",n))}else if(es(e,this.config.selectors.inputs.volume)){const a=100*e.value;e.setAttribute("aria-valuenow",a),e.setAttribute("aria-valuetext",`${a.toFixed(1)}%`)}else e.setAttribute("aria-valuenow",e.value);(Rt.isWebKit||Rt.isIPadOS)&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip(t){var e,a;if(!this.config.tooltips.seek||!T.element(this.elements.inputs.seek)||!T.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,o=u=>Je(n,i,u);if(this.touch)return void o(!1);let r=0;const l=this.elements.progress.getBoundingClientRect();if(T.event(t))r=100/l.width*(t.pageX-l.left);else{if(!Br(n,i))return;r=parseFloat(n.style.left,10)}r<0?r=0:r>100&&(r=100);const d=this.duration/100*r;n.innerText=fe.formatTime(d);const c=(e=this.config.markers)===null||e===void 0||(a=e.points)===null||a===void 0?void 0:a.find(({time:u})=>u===Math.round(d));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${r}%`,T.event(t)&&["mouseenter","mouseleave"].includes(t.type)&&o(t.type==="mouseenter")},timeUpdate(t){const e=!T.element(this.elements.display.duration)&&this.config.invertTime;fe.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),t&&t.type==="timeupdate"&&this.media.seeking||fe.updateProgress.call(this,t)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Qn(this.elements.display.currentTime,!0),void Qn(this.elements.progress,!0);T.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const t=T.element(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&fe.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&fe.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&fe.setMarkers.call(this),fe.updateSeekTooltip.call(this)},toggleMenuButton(t,e){Qn(this.elements.settings.buttons[t],!e)},updateSetting(t,e,a){const n=this.elements.settings.panels[t];let i=null,o=e;if(t==="captions")i=this.currentTrack;else{if(i=T.empty(a)?this[t]:a,T.empty(i)&&(i=this.config[t].default),!T.empty(this.options[t])&&!this.options[t].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${t}`);if(!this.config[t].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${t}`)}if(T.element(o)||(o=n&&n.querySelector('[role="menu"]')),!T.element(o))return;this.elements.settings.buttons[t].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=fe.getLabel.call(this,t,i);const r=o&&o.querySelector(`[value="${i}"]`);T.element(r)&&(r.checked=!0)},getLabel(t,e){switch(t){case"speed":return e===1?Ot.get("normal",this.config):`${e}&times;`;case"quality":if(T.number(e)){const a=Ot.get(`qualityLabel.${e}`,this.config);return a.length?a:`${e}p`}return py(e);case"captions":return He.getLabel.call(this);default:return null}},setQualityMenu(t){if(!T.element(this.elements.settings.panels.quality))return;const e="quality",a=this.elements.settings.panels.quality.querySelector('[role="menu"]');T.array(t)&&(this.options.quality=Eu(t).filter(o=>this.config.quality.options.includes(o)));const n=!T.empty(this.options.quality)&&this.options.quality.length>1;if(fe.toggleMenuButton.call(this,e,n),Or(a),fe.checkMenu.call(this),!n)return;const i=o=>{const r=Ot.get(`qualityBadge.${o}`,this.config);return r.length?fe.createBadge.call(this,r):null};this.options.quality.sort((o,r)=>{const l=this.config.quality.options;return l.indexOf(o)>l.indexOf(r)?1:-1}).forEach(o=>{fe.createMenuItem.call(this,{value:o,list:a,type:e,title:fe.getLabel.call(this,"quality",o),badge:i(o)})}),fe.updateSetting.call(this,e,a)},setCaptionsMenu(){if(!T.element(this.elements.settings.panels.captions))return;const t="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),a=He.getTracks.call(this),n=!!a.length;if(fe.toggleMenuButton.call(this,t,n),Or(e),fe.checkMenu.call(this),!n)return;const i=a.map((o,r)=>({value:r,checked:this.captions.toggled&&this.currentTrack===r,title:He.getLabel.call(this,o),badge:o.language&&fe.createBadge.call(this,o.language.toUpperCase()),list:e,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:Ot.get("disabled",this.config),list:e,type:"language"}),i.forEach(fe.createMenuItem.bind(this)),fe.updateSetting.call(this,t,e)},setSpeedMenu(){if(!T.element(this.elements.settings.panels.speed))return;const t="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 a=!T.empty(this.options.speed)&&this.options.speed.length>1;fe.toggleMenuButton.call(this,t,a),Or(e),fe.checkMenu.call(this),a&&(this.options.speed.forEach(n=>{fe.createMenuItem.call(this,{value:n,list:e,type:t,title:fe.getLabel.call(this,"speed",n)})}),fe.updateSetting.call(this,t,e))},checkMenu(){const{buttons:t}=this.elements.settings,e=!T.empty(t)&&Object.values(t).some(a=>!a.hidden);Qn(this.elements.settings.menu,!e)},focusFirstMenuItem(t,e=!1){if(this.elements.settings.popup.hidden)return;let a=t;T.element(a)||(a=Object.values(this.elements.settings.panels).find(i=>!i.hidden));const n=a.querySelector('[role^="menuitem"]');ku.call(this,n,e)},toggleMenu(t){const{popup:e}=this.elements.settings,a=this.elements.buttons.settings;if(!T.element(e)||!T.element(a))return;const{hidden:n}=e;let i=n;if(T.boolean(t))i=t;else if(T.keyboardEvent(t)&&t.key==="Escape")i=!1;else if(T.event(t)){const o=T.function(t.composedPath)?t.composedPath()[0]:t.target,r=e.contains(o);if(r||!r&&t.target!==a&&i)return}a.setAttribute("aria-expanded",i),Qn(e,!i),Je(this.elements.container,this.config.classNames.menu.open,i),i&&T.keyboardEvent(t)?fe.focusFirstMenuItem.call(this,null,!0):i||n||ku.call(this,a,T.keyboardEvent(t))},getMenuSize(t){const e=t.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),t.parentNode.appendChild(e);const a=e.scrollWidth,n=e.scrollHeight;return un(e),{width:a,height:n}},showMenuPanel(t="",e=!1){const a=this.elements.container.querySelector(`#plyr-settings-${this.id}-${t}`);if(!T.element(a))return;const n=a.parentNode,i=Array.from(n.children).find(o=>!o.hidden);if(gt.transitions&&!gt.reducedMotion){n.style.width=`${i.scrollWidth}px`,n.style.height=`${i.scrollHeight}px`;const o=fe.getMenuSize.call(this,a),r=l=>{l.target===n&&["width","height"].includes(l.propertyName)&&(n.style.width="",n.style.height="",Pr.call(this,n,Su,r))};Ke.call(this,n,Su,r),n.style.width=`${o.width}px`,n.style.height=`${o.height}px`}Qn(i,!0),Qn(a,!1),fe.focusFirstMenuItem.call(this,a,e)},setDownloadUrl(){const t=this.elements.buttons.download;T.element(t)&&t.setAttribute("href",this.download)},create(t){const{bindMenuItemShortcuts:e,createButton:a,createProgress:n,createRange:i,createTime:o,setQualityMenu:r,setSpeedMenu:l,showMenuPanel:d}=fe;this.elements.controls=null,T.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(a.call(this,"play-large"));const c=xe("div",Za(this.config.selectors.controls.wrapper));this.elements.controls=c;const u={class:"plyr__controls__item"};return Eu(T.array(this.config.controls)?this.config.controls:[]).forEach(h=>{if(h==="restart"&&c.appendChild(a.call(this,"restart",u)),h==="rewind"&&c.appendChild(a.call(this,"rewind",u)),h==="play"&&c.appendChild(a.call(this,"play",u)),h==="fast-forward"&&c.appendChild(a.call(this,"fast-forward",u)),h==="progress"){const f=xe("div",{class:`${u.class} plyr__progress__container`}),g=xe("div",Za(this.config.selectors.progress));if(g.appendChild(i.call(this,"seek",{id:`plyr-seek-${t.id}`})),g.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const m=xe("span",{class:this.config.classNames.tooltip},"00:00");g.appendChild(m),this.elements.display.seekTooltip=m}this.elements.progress=g,f.appendChild(this.elements.progress),c.appendChild(f)}if(h==="current-time"&&c.appendChild(o.call(this,"currentTime",u)),h==="duration"&&c.appendChild(o.call(this,"duration",u)),h==="mute"||h==="volume"){let{volume:f}=this.elements;if(T.element(f)&&c.contains(f)||(f=xe("div",pt({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),h==="mute"&&f.appendChild(a.call(this,"mute")),h==="volume"&&!Rt.isIos&&!Rt.isIPadOS){const g={max:1,step:.05,value:this.config.volume};f.appendChild(i.call(this,"volume",pt(g,{id:`plyr-volume-${t.id}`})))}}if(h==="captions"&&c.appendChild(a.call(this,"captions",u)),h==="settings"&&!T.empty(this.config.settings)){const f=xe("div",pt({},u,{class:`${u.class} plyr__menu`.trim(),hidden:""}));f.appendChild(a.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${t.id}`,"aria-expanded":!1}));const g=xe("div",{class:"plyr__menu__container",id:`plyr-settings-${t.id}`,hidden:""}),m=xe("div"),p=xe("div",{id:`plyr-settings-${t.id}-home`}),y=xe("div",{role:"menu"});p.appendChild(y),m.appendChild(p),this.elements.settings.panels.home=p,this.config.settings.forEach(b=>{const S=xe("button",pt(Za(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,S,b),Ke.call(this,S,"click",()=>{d.call(this,b,!1)});const w=xe("span",null,Ot.get(b,this.config)),_=xe("span",{class:this.config.classNames.menu.value});_.innerHTML=t[b],w.appendChild(_),S.appendChild(w),y.appendChild(S);const C=xe("div",{id:`plyr-settings-${t.id}-${b}`,hidden:""}),N=xe("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});N.appendChild(xe("span",{"aria-hidden":!0},Ot.get(b,this.config))),N.appendChild(xe("span",{class:this.config.classNames.hidden},Ot.get("menuBack",this.config))),Ke.call(this,C,"keydown",E=>{E.key==="ArrowLeft"&&(E.preventDefault(),E.stopPropagation(),d.call(this,"home",!0))},!1),Ke.call(this,N,"click",()=>{d.call(this,"home",!1)}),C.appendChild(N),C.appendChild(xe("div",{role:"menu"})),m.appendChild(C),this.elements.settings.buttons[b]=S,this.elements.settings.panels[b]=C}),g.appendChild(m),f.appendChild(g),c.appendChild(f),this.elements.settings.popup=g,this.elements.settings.menu=f}if(h==="pip"&&gt.pip&&c.appendChild(a.call(this,"pip",u)),h==="airplay"&&gt.airplay&&c.appendChild(a.call(this,"airplay",u)),h==="download"){const f=pt({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:g}=this.config.urls;!T.url(g)&&this.isEmbed&&pt(f,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(a.call(this,"download",f))}h==="fullscreen"&&c.appendChild(a.call(this,"fullscreen",u))}),this.isHTML5&&r.call(this,kn.getQualityOptions.call(this)),l.call(this),c},inject(){if(this.config.loadSprite){const i=fe.getIconUrl.call(this);i.cors&&yy(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let t=null;this.elements.controls=null;const e={id:this.id,seektime:this.config.seekTime,title:this.config.title};let a=!0;T.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,e)),this.config.controls||(this.config.controls=[]),T.element(this.config.controls)||T.string(this.config.controls)?t=this.config.controls:(t=fe.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:He.getLabel.call(this)}),a=!1);let n;if(a&&T.string(this.config.controls)&&(t=(i=>{let o=i;return Object.entries(e).forEach(([r,l])=>{o=Ei(o,`{${r}}`,l)}),o})(t)),T.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),T.element(n)||(n=this.elements.container),n[T.element(t)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",t),T.element(this.elements.controls)||fe.findElements.call(this),!T.empty(this.elements.buttons)){const i=o=>{const r=this.config.classNames.controlPressed;o.setAttribute("aria-pressed","false"),Object.defineProperty(o,"pressed",{configurable:!0,enumerable:!0,get:()=>Br(o,r),set(l=!1){Je(o,r,l),o.setAttribute("aria-pressed",l?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(o=>{T.array(o)||T.nodeList(o)?Array.from(o).filter(Boolean).forEach(i):i(o)})}if(Rt.isEdge&&iy(n),this.config.tooltips.controls){const{classNames:i,selectors:o}=this.config,r=`${o.controls.wrapper} ${o.labels} .${i.hidden}`,l=ki.call(this,r);Array.from(l).forEach(d=>{Je(d,this.config.classNames.hidden,!1),Je(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 t,e;if(!this.duration||this.elements.markers)return;const a=(t=this.config.markers)===null||t===void 0||(e=t.points)===null||e===void 0?void 0:e.filter(({time:d})=>d>0&&d<this.duration);if(a==null||!a.length)return;const n=document.createDocumentFragment(),i=document.createDocumentFragment();let o=null;const r=`${this.config.classNames.tooltip}--visible`,l=d=>Je(o,r,d);a.forEach(d=>{const c=xe("span",{class:this.config.classNames.marker},""),u=d.time/this.duration*100+"%";o&&(c.addEventListener("mouseenter",()=>{d.label||(o.style.left=u,o.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||(o=xe("span",{class:this.config.classNames.tooltip},""),n.appendChild(o)),this.elements.markers={points:i,tip:o},this.elements.progress.appendChild(n)}};function Sy(t,e=!0){let a=t;if(e){const n=document.createElement("a");n.href=a,a=n.href}try{return new URL(a)}catch{return null}}function wy(t){const e=new URLSearchParams;return T.object(t)&&Object.entries(t).forEach(([a,n])=>{e.set(a,n)}),e}const He={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!gt.textTracks)return void(T.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&fe.setCaptionsMenu.call(this));if(T.element(this.elements.captions)||(this.elements.captions=xe("div",Za(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),Jz(this.elements.captions,this.elements.wrapper)),Rt.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(i=>{const o=i.getAttribute("src"),r=Sy(o);r!==null&&r.hostname!==window.location.href.hostname&&["http:","https:"].includes(r.protocol)&&Ti(o,"blob").then(l=>{i.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{un(i)})})}const t=Eu((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]=t);let a=this.storage.get("captions");if(T.boolean(a)||({active:a}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:a,language:e,languages:t}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";Ke.call(this,this.media.textTracks,n,He.update.bind(this))}setTimeout(He.update.bind(this),0)},update(){const t=He.getTracks.call(this,!0),{active:e,language:a,meta:n,currentTrackNode:i}=this.captions,o=!!t.find(r=>r.language===a);this.isHTML5&&this.isVideo&&t.filter(r=>!n.get(r)).forEach(r=>{this.debug.log("Track added",r),n.set(r,{default:r.mode==="showing"}),r.mode==="showing"&&(r.mode="hidden"),Ke.call(this,r,"cuechange",()=>He.updateCues.call(this))}),(o&&this.language!==a||!t.includes(i))&&(He.setLanguage.call(this,a),He.toggle.call(this,e&&o)),this.elements&&Je(this.elements.container,this.config.classNames.captions.enabled,!T.empty(t)),T.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&fe.setCaptionsMenu.call(this)},toggle(t,e=!0){if(!this.supported.ui)return;const{toggled:a}=this.captions,n=this.config.classNames.captions.active,i=T.nullOrUndefined(t)?!a:t;if(i!==a){if(e||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!e){const o=He.getTracks.call(this),r=He.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=r.language,void He.set.call(this,o.indexOf(r))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Je(this.elements.container,n,i),this.captions.toggled=i,fe.updateSetting.call(this,"captions"),Le.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(t,e=!0){const a=He.getTracks.call(this);if(t!==-1)if(T.number(t))if(t in a){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;const n=a[t],{language:i}=n||{};this.captions.currentTrackNode=n,fe.updateSetting.call(this,"captions"),e||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),Le.call(this,this.media,"languagechange")}He.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&He.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else He.toggle.call(this,!1,e)},setLanguage(t,e=!0){if(!T.string(t))return void this.debug.warn("Invalid language argument",t);const a=t.toLowerCase();this.captions.language=a;const n=He.getTracks.call(this),i=He.findTrack.call(this,[a]);He.set.call(this,n.indexOf(i),e)},getTracks(t=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||t||this.captions.meta.has(e)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(t,e=!1){const a=He.getTracks.call(this),n=r=>Number((this.captions.meta.get(r)||{}).default),i=Array.from(a).sort((r,l)=>n(l)-n(r));let o;return t.every(r=>(o=i.find(l=>l.language===r),!o)),o||(e?i[0]:void 0)},getCurrentTrack(){return He.getTracks.call(this)[this.currentTrack]},getLabel(t){let e=t;return!T.track(e)&&gt.textTracks&&this.captions.toggled&&(e=He.getCurrentTrack.call(this)),T.track(e)?T.empty(e.label)?T.empty(e.language)?Ot.get("enabled",this.config):t.language.toUpperCase():e.label:Ot.get("disabled",this.config)},updateCues(t){if(!this.supported.ui)return;if(!T.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!T.nullOrUndefined(t)&&!Array.isArray(t))return void this.debug.warn("updateCues: Invalid input",t);let e=t;if(!e){const n=He.getCurrentTrack.call(this);e=Array.from((n||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(rj)}const a=e.map(n=>n.trim()).join(`
57
- `);if(a!==this.elements.captions.innerHTML){Or(this.elements.captions);const n=xe("span",Za(this.config.selectors.caption));n.innerHTML=a,this.elements.captions.appendChild(n),Le.call(this,this.media,"cuechange")}}},ky={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:[]}},xu={active:"picture-in-picture",inactive:"inline"},_n={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Lu={audio:"audio",video:"video"};function dj(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?_n.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?_n.vimeo:null}const Nu=()=>{};class uj{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):Nu}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Nu}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Nu}}class Ia{constructor(e){ge(this,"onChange",()=>{if(!this.supported)return;const a=this.player.elements.buttons.fullscreen;T.element(a)&&(a.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;Le.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),ge(this,"toggleFallback",(a=!1)=>{if(a?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=a?"hidden":"",Je(this.target,this.player.config.classNames.fullscreen.fallback,a),Rt.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const o=T.string(n.content)&&n.content.includes(i);a?(this.cleanupViewport=!o,o||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(r=>r.trim()!==i).join(","))}this.onChange()}),ge(this,"trapFocus",a=>{if(Rt.isIos||Rt.isIPadOS||!this.active||a.key!=="Tab")return;const n=document.activeElement,i=ki.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=i,r=i[i.length-1];n!==r||a.shiftKey?n===o&&a.shiftKey&&(r.focus(),a.preventDefault()):(o.focus(),a.preventDefault())}),ge(this,"update",()=>{if(this.supported){let a;a=this.forceFallback?"Fallback (forced)":Ia.nativeSupported?"Native":"Fallback",this.player.debug.log(`${a} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Je(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),ge(this,"enter",()=>{this.supported&&(Rt.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ia.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?T.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),ge(this,"exit",()=>{if(this.supported)if(Rt.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Ya(this.player.play());else if(!Ia.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!T.empty(this.prefix)){const a=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${a}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),ge(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Ia.prefix,this.property=Ia.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&Zz(this.player.elements.container,e.config.fullscreen.container),Ke.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ke.call(this.player,this.player.elements.container,"dblclick",a=>{T.element(this.player.elements.controls)&&this.player.elements.controls.contains(a.target)||this.player.listeners.proxy(a,this.toggle,"fullscreen")}),Ke.call(this,this.player.elements.container,"keydown",a=>this.trapFocus(a)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ia.nativeSupported&&!this.forceFallback}static get prefix(){if(T.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(a=>!(!T.function(document[`${a}ExitFullscreen`])&&!T.function(document[`${a}CancelFullScreen`]))&&(e=a,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ia.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ia.nativeSupported||!Rt.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ia.nativeSupported||this.forceFallback)return Br(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 Rt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Dr(t,e=1){return new Promise((a,n)=>{const i=new Image,o=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?a:n)(i)};Object.assign(i,{onload:o,onerror:o,src:t})})}const et={addStyleHook(){Je(this.elements.container,this.config.selectors.container.replace(".",""),!0),Je(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(t=!1){t&&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 et.toggleNativeControls.call(this,!0);T.element(this.elements.controls)||(fe.inject.call(this),this.listeners.controls()),et.toggleNativeControls.call(this),this.isHTML5&&He.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,fe.updateVolume.call(this),fe.timeUpdate.call(this),fe.durationUpdate.call(this),et.checkPlaying.call(this),Je(this.elements.container,this.config.classNames.pip.supported,gt.pip&&this.isHTML5&&this.isVideo),Je(this.elements.container,this.config.classNames.airplay.supported,gt.airplay&&this.isHTML5),Je(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{Le.call(this,this.media,"ready")},0),et.setTitle.call(this),this.poster&&et.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&fe.durationUpdate.call(this),this.config.mediaMetadata&&fe.setMediaMetadata.call(this)},setTitle(){let t=Ot.get("play",this.config);if(T.string(this.config.title)&&!T.empty(this.config.title)&&(t+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",t)}),this.isEmbed){const e=Nt.call(this,"iframe");if(!T.element(e))return;const a=T.empty(this.config.title)?"video":this.config.title,n=Ot.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",a))}},togglePoster(t){Je(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster(t,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),ej.call(this).then(()=>Dr(t)).catch(a=>{throw t===this.poster&&et.togglePoster.call(this,!1),a}).then(()=>{if(t!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${t}')`,backgroundSize:""}),et.togglePoster.call(this,!0),t)))},checkPlaying(t){Je(this.elements.container,this.config.classNames.playing,this.playing),Je(this.elements.container,this.config.classNames.paused,this.paused),Je(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",Ot.get(this.playing?"pause":"play",this.config))}),T.event(t)&&t.type==="timeupdate"||et.toggleControls.call(this)},checkLoading(t){this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Je(this.elements.container,this.config.classNames.loading,this.loading),et.toggleControls.call(this)},this.loading?250:0)},toggleControls(t){const{controls:e}=this.elements;if(e&&this.config.hideControls){const a=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(t||this.loading||this.paused||e.pressed||e.hover||a))}},migrateStyles(){Object.values({...this.media.style}).filter(t=>!T.empty(t)&&T.string(t)&&t.startsWith("--plyr")).forEach(t=>{this.elements.container.style.setProperty(t,this.media.style.getPropertyValue(t)),this.media.style.removeProperty(t)}),T.empty(this.media.style)&&this.media.removeAttribute("style")}};class hj{constructor(e){ge(this,"firstTouch",()=>{const{player:a}=this,{elements:n}=a;a.touch=!0,Je(n.container,a.config.classNames.isTouch,!0)}),ge(this,"global",(a=!0)=>{const{player:n}=this;n.config.keyboard.global&&_i.call(n,window,"keydown keyup",this.handleKey,a,!1),_i.call(n,document.body,"click",this.toggleMenu,a),_u.call(n,document.body,"touchstart",this.firstTouch)}),ge(this,"container",()=>{const{player:a}=this,{config:n,elements:i,timers:o}=a;!n.keyboard.global&&n.keyboard.focused&&Ke.call(a,i.container,"keydown keyup",this.handleKey,!1),Ke.call(a,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)&&(et.toggleControls.call(a,!0),u=a.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>et.toggleControls.call(a,!1),u)});const r=()=>{if(!a.isVimeo||a.config.vimeo.premium)return;const d=i.wrapper,{active:c}=a.fullscreen,[u,h]=Cu.call(a),f=uy(`aspect-ratio: ${u} / ${h}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[g,m]=tj(),p=g/m>u/h;f?(d.style.width=p?"auto":"100%",d.style.height=p?"100%":"auto"):(d.style.maxWidth=p?m/h*u+"px":null,d.style.margin=p?"0 auto":null)},l=()=>{clearTimeout(o.resized),o.resized=setTimeout(r,50)};Ke.call(a,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=a.fullscreen;c===i.container&&(!a.isEmbed&&T.empty(a.config.ratio)||(r(),(d.type==="enterfullscreen"?Ke:Pr).call(a,window,"resize",l)))})}),ge(this,"media",()=>{const{player:a}=this,{elements:n}=a;if(Ke.call(a,a.media,"timeupdate seeking seeked",o=>fe.timeUpdate.call(a,o)),Ke.call(a,a.media,"durationchange loadeddata loadedmetadata",o=>fe.durationUpdate.call(a,o)),Ke.call(a,a.media,"ended",()=>{a.isHTML5&&a.isVideo&&a.config.resetOnEnd&&(a.restart(),a.pause())}),Ke.call(a,a.media,"progress playing seeking seeked",o=>fe.updateProgress.call(a,o)),Ke.call(a,a.media,"volumechange",o=>fe.updateVolume.call(a,o)),Ke.call(a,a.media,"playing play pause ended emptied timeupdate",o=>et.checkPlaying.call(a,o)),Ke.call(a,a.media,"waiting canplay seeked playing",o=>et.checkLoading.call(a,o)),a.supported.ui&&a.config.clickToPlay&&!a.isAudio){const o=Nt.call(a,`.${a.config.classNames.video}`);if(!T.element(o))return;Ke.call(a,n.container,"click",r=>{([n.container,o].includes(r.target)||o.contains(r.target))&&(a.touch&&a.config.hideControls||(a.ended?(this.proxy(r,a.restart,"restart"),this.proxy(r,()=>{Ya(a.play())},"play")):this.proxy(r,()=>{Ya(a.togglePlay())},"play")))})}a.supported.ui&&a.config.disableContextMenu&&Ke.call(a,n.wrapper,"contextmenu",o=>{o.preventDefault()},!1),Ke.call(a,a.media,"volumechange",()=>{a.storage.set({volume:a.volume,muted:a.muted})}),Ke.call(a,a.media,"ratechange",()=>{fe.updateSetting.call(a,"speed"),a.storage.set({speed:a.speed})}),Ke.call(a,a.media,"qualitychange",o=>{fe.updateSetting.call(a,"quality",null,o.detail.quality)}),Ke.call(a,a.media,"ready qualitychange",()=>{fe.setDownloadUrl.call(a)});const i=a.config.events.concat(["keyup","keydown"]).join(" ");Ke.call(a,a.media,i,o=>{let{detail:r={}}=o;o.type==="error"&&(r=a.media.error),Le.call(a,n.container,o.type,!0,r)})}),ge(this,"proxy",(a,n,i)=>{const{player:o}=this,r=o.config.listeners[i];let l=!0;T.function(r)&&(l=r.call(o,a)),l!==!1&&T.function(n)&&n.call(o,a)}),ge(this,"bind",(a,n,i,o,r=!0)=>{const{player:l}=this,d=l.config.listeners[o],c=T.function(d);Ke.call(l,a,n,u=>this.proxy(u,i,o),r&&!c)}),ge(this,"controls",()=>{const{player:a}=this,{elements:n}=a,i=Rt.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(o=>{this.bind(o,"click",()=>{Ya(a.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",a.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{a.lastSeekTime=Date.now(),a.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{a.lastSeekTime=Date.now(),a.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{a.muted=!a.muted},"mute"),this.bind(n.buttons.captions,"click",()=>a.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{Le.call(a,a.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{a.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{a.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",a.airplay,"airplay"),this.bind(n.buttons.settings,"click",o=>{o.stopPropagation(),o.preventDefault(),fe.toggleMenu.call(a,o)},null,!1),this.bind(n.buttons.settings,"keyup",o=>{[" ","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),fe.toggleMenu.call(a,o)):fe.focusFirstMenuItem.call(a,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",o=>{o.key==="Escape"&&fe.toggleMenu.call(a,o)}),this.bind(n.inputs.seek,"mousedown mousemove",o=>{const r=n.progress.getBoundingClientRect(),l=100/r.width*(o.pageX-r.left);o.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",o=>{const r=o.currentTarget,l="play-on-seeked";if(T.keyboardEvent(o)&&!["ArrowLeft","ArrowRight"].includes(o.key))return;a.lastSeekTime=Date.now();const d=r.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(o.type);d&&c?(r.removeAttribute(l),Ya(a.play())):!c&&a.playing&&(r.setAttribute(l,""),a.pause())}),Rt.isIos){const o=ki.call(a,'input[type="range"]');Array.from(o).forEach(r=>this.bind(r,i,l=>iy(l.target)))}this.bind(n.inputs.seek,i,o=>{const r=o.currentTarget;let l=r.getAttribute("seek-value");T.empty(l)&&(l=r.value),r.removeAttribute("seek-value"),a.currentTime=l/r.max*a.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",o=>fe.updateSeekTooltip.call(a,o)),this.bind(n.progress,"mousemove touchmove",o=>{const{previewThumbnails:r}=a;r&&r.loaded&&r.startMove(o)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:o}=a;o&&o.loaded&&o.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",o=>{const{previewThumbnails:r}=a;r&&r.loaded&&r.startScrubbing(o)}),this.bind(n.progress,"mouseup touchend",o=>{const{previewThumbnails:r}=a;r&&r.loaded&&r.endScrubbing(o)}),Rt.isWebKit&&Array.from(ki.call(a,'input[type="range"]')).forEach(o=>{this.bind(o,"input",r=>fe.updateRangeFill.call(a,r.target))}),a.config.toggleInvert&&!T.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{a.currentTime!==0&&(a.config.invertTime=!a.config.invertTime,fe.timeUpdate.call(a))}),this.bind(n.inputs.volume,i,o=>{a.volume=o.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",o=>{n.controls.hover=!a.touch&&o.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(o=>!o.contains(n.container)).forEach(o=>{this.bind(o,"mouseenter mouseleave",r=>{n.controls&&(n.controls.hover=!a.touch&&r.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",o=>{n.controls.pressed=["mousedown","touchstart"].includes(o.type)}),this.bind(n.controls,"focusin",()=>{const{config:o,timers:r}=a;Je(n.controls,o.classNames.noTransition,!0),et.toggleControls.call(a,!0),setTimeout(()=>{Je(n.controls,o.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>et.toggleControls.call(a,!1),l)}),this.bind(n.inputs.volume,"wheel",o=>{const r=o.webkitDirectionInvertedFromDevice,[l,d]=[o.deltaX,-o.deltaY].map(h=>r?-h:h),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);a.increaseVolume(c/50);const{volume:u}=a.media;(c===1&&u<1||c===-1&&u>0)&&o.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:a}=this,{elements:n}=a,{key:i,type:o,altKey:r,ctrlKey:l,metaKey:d,shiftKey:c}=e,u=o==="keydown",h=u&&i===this.lastKey;if(!(r||l||d||c)&&i){if(u){const g=document.activeElement;if(T.element(g)){const{editable:m}=a.config.selectors,{seek:p}=n.inputs;if(g!==p&&es(g,m)||e.key===" "&&es(g,'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":h||(f=parseInt(i,10),a.currentTime=a.duration/10*f);break;case" ":case"k":h||Ya(a.togglePlay());break;case"ArrowUp":a.increaseVolume(.1);break;case"ArrowDown":a.decreaseVolume(.1);break;case"m":h||(a.muted=!a.muted);break;case"ArrowRight":a.forward();break;case"ArrowLeft":a.rewind();break;case"f":a.fullscreen.toggle();break;case"c":h||a.toggleCaptions();break;case"l":a.loop=!a.loop}i==="Escape"&&!a.fullscreen.usingNative&&a.fullscreen.active&&a.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){fe.toggleMenu.call(this.player,e)}}function mj(t,e){return t(e={exports:{}},e.exports),e.exports}var fj=mj(function(t,e){t.exports=function(){var a=function(){},n={},i={},o={};function r(f,g){f=f.push?f:[f];var m,p,y,b=[],S=f.length,w=S;for(m=function(_,C){C.length&&b.push(_),--w||g(b)};S--;)p=f[S],(y=i[p])?m(p,y):(o[p]=o[p]||[]).push(m)}function l(f,g){if(f){var m=o[f];if(i[f]=g,m)for(;m.length;)m[0](f,g),m.splice(0,1)}}function d(f,g){f.call&&(f={success:f}),g.length?(f.error||a)(g):(f.success||a)(f)}function c(f,g,m,p){var y,b,S=document,w=m.async,_=(m.numRetries||0)+1,C=m.before||a,N=f.replace(/[\?|#].*$/,""),E=f.replace(/^(css|img)!/,"");p=p||0,/(^css!|\.css$)/.test(N)?((b=S.createElement("link")).rel="stylesheet",b.href=E,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(N)?(b=S.createElement("img")).src=E:((b=S.createElement("script")).src=f,b.async=w===void 0||w),b.onload=b.onerror=b.onbeforeload=function(L){var x=L.type[0];if(y)try{b.sheet.cssText.length||(x="e")}catch(V){V.code!=18&&(x="e")}if(x=="e"){if((p+=1)<_)return c(f,g,m,p)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";g(f,x,L.defaultPrevented)},C(f,b)!==!1&&S.head.appendChild(b)}function u(f,g,m){var p,y,b=(f=f.push?f:[f]).length,S=b,w=[];for(p=function(_,C,N){if(C=="e"&&w.push(_),C=="b"){if(!N)return;w.push(_)}--b||g(w)},y=0;y<S;y++)c(f[y],p,m)}function h(f,g,m){var p,y;if(g&&g.trim&&(p=g),y=(p?m:g)||{},p){if(p in n)throw"LoadJS";n[p]=!0}function b(S,w){u(f,function(_){d(y,_),S&&d({success:S,error:w},_),l(p,_)},y)}if(y.returnPromise)return new Promise(b);b()}return h.ready=function(f,g){return r(f,function(m){d(g,m)}),h},h.done=function(f){l(f,[])},h.reset=function(){n={},i={},o={}},h.isDefined=function(f){return f in n},h}()});function vu(t){return new Promise((e,a)=>{fj(t,{success:e,error:a})})}function pj(t){return T.empty(t)?null:T.number(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}function gj(t){const e=t.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function xi(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Le.call(this,this.media,t?"play":"pause"))}const Vu={setup(){const t=this;Je(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,Ls.call(t),T.object(window.Vimeo)?Vu.ready.call(t):vu(t.config.urls.vimeo.sdk).then(()=>{Vu.ready.call(t)}).catch(e=>{t.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const t=this,e=t.config.vimeo,{premium:a,referrerPolicy:n,...i}=e;let o=t.media.getAttribute("src"),r="";T.empty(o)?(o=t.media.getAttribute(t.config.attributes.embed.id),r=t.media.getAttribute(t.config.attributes.embed.hash)):r=gj(o);const l=r?{h:r}:{};a&&Object.assign(i,{controls:!1,sidedock:!1});const d=wy({loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:t.config.playsinline,...l,...i}),c=pj(o),u=xe("iframe"),h=Tu(t.config.urls.vimeo.iframe,c,d);if(u.setAttribute("src",h),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),T.empty(n)||u.setAttribute("referrerPolicy",n),a||!e.customControls)u.setAttribute("data-poster",t.poster),t.media=Ir(u,t.media);else{const S=xe("div",{class:t.config.classNames.embedContainer,"data-poster":t.poster});S.appendChild(u),t.media=Ir(S,t.media)}e.customControls||Ti(Tu(t.config.urls.vimeo.api,h)).then(S=>{!T.empty(S)&&S.thumbnail_url&&et.setPoster.call(t,S.thumbnail_url).catch(()=>{})}),t.embed=new window.Vimeo.Player(u,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=()=>(xi.call(t,!0),t.embed.play()),t.media.pause=()=>(xi.call(t,!1),t.embed.pause()),t.media.stop=()=>{t.pause(),t.currentTime=0};let{currentTime:f}=t.media;Object.defineProperty(t.media,"currentTime",{get:()=>f,set(S){const{embed:w,media:_,paused:C,volume:N}=t,E=C&&!w.hasPlayed;_.seeking=!0,Le.call(t,_,"seeking"),Promise.resolve(E&&w.setVolume(0)).then(()=>w.setCurrentTime(S)).then(()=>E&&w.pause()).then(()=>E&&w.setVolume(N)).catch(()=>{})}});let g=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:()=>g,set(S){t.embed.setPlaybackRate(S).then(()=>{g=S,Le.call(t,t.media,"ratechange")}).catch(()=>{t.options.speed=[1]})}});let{volume:m}=t.config;Object.defineProperty(t.media,"volume",{get:()=>m,set(S){t.embed.setVolume(S).then(()=>{m=S,Le.call(t,t.media,"volumechange")})}});let{muted:p}=t.config;Object.defineProperty(t.media,"muted",{get:()=>p,set(S){const w=!!T.boolean(S)&&S;t.embed.setMuted(!!w||t.config.muted).then(()=>{p=w,Le.call(t,t.media,"volumechange")})}});let y,{loop:b}=t.config;Object.defineProperty(t.media,"loop",{get:()=>b,set(S){const w=T.boolean(S)?S:t.config.loop.active;t.embed.setLoop(w).then(()=>{b=w})}}),t.embed.getVideoUrl().then(S=>{y=S,fe.setDownloadUrl.call(t)}).catch(S=>{this.debug.warn(S)}),Object.defineProperty(t.media,"currentSrc",{get:()=>y}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(S=>{const[w,_]=S;t.embed.ratio=fy(w,_),Ls.call(this)}),t.embed.setAutopause(t.config.autopause).then(S=>{t.config.autopause=S}),t.embed.getVideoTitle().then(S=>{t.config.title=S,et.setTitle.call(this)}),t.embed.getCurrentTime().then(S=>{f=S,Le.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(S=>{t.media.duration=S,Le.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(S=>{t.media.textTracks=S,He.setup.call(t)}),t.embed.on("cuechange",({cues:S=[]})=>{const w=S.map(_=>oj(_.text));He.updateCues.call(t,w)}),t.embed.on("loaded",()=>{t.embed.getPaused().then(S=>{xi.call(t,!S),S||Le.call(t,t.media,"playing")}),T.element(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("bufferstart",()=>{Le.call(t,t.media,"waiting")}),t.embed.on("bufferend",()=>{Le.call(t,t.media,"playing")}),t.embed.on("play",()=>{xi.call(t,!0),Le.call(t,t.media,"playing")}),t.embed.on("pause",()=>{xi.call(t,!1)}),t.embed.on("timeupdate",S=>{t.media.seeking=!1,f=S.seconds,Le.call(t,t.media,"timeupdate")}),t.embed.on("progress",S=>{t.media.buffered=S.percent,Le.call(t,t.media,"progress"),parseInt(S.percent,10)===1&&Le.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(w=>{w!==t.media.duration&&(t.media.duration=w,Le.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",()=>{t.media.seeking=!1,Le.call(t,t.media,"seeked")}),t.embed.on("ended",()=>{t.media.paused=!0,Le.call(t,t.media,"ended")}),t.embed.on("error",S=>{t.media.error=S,Le.call(t,t.media,"error")}),e.customControls&&setTimeout(()=>et.build.call(t),0)}};function yj(t){return T.empty(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}function Li(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Le.call(this,this.media,t?"play":"pause"))}function bj(t){return t.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ur={setup(){if(Je(this.elements.wrapper,this.config.classNames.embed,!0),T.object(window.YT)&&T.function(window.YT.Player))Ur.ready.call(this);else{const t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{T.function(t)&&t(),Ur.ready.call(this)},vu(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(t){Ti(Tu(this.config.urls.youtube.api,t)).then(e=>{if(T.object(e)){const{title:a,height:n,width:i}=e;this.config.title=a,et.setTitle.call(this),this.embed.ratio=fy(i,n)}Ls.call(this)}).catch(()=>{Ls.call(this)})},ready(){const t=this,e=t.config.youtube,a=t.media&&t.media.getAttribute("id");if(!T.empty(a)&&a.startsWith("youtube-"))return;let n=t.media.getAttribute("src");T.empty(n)&&(n=t.media.getAttribute(this.config.attributes.embed.id));const i=yj(n),o=xe("div",{id:aj(t.provider),"data-poster":e.customControls?t.poster:void 0});if(t.media=Ir(o,t.media),e.customControls){const r=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Dr(r("maxres"),121).catch(()=>Dr(r("sd"),121)).catch(()=>Dr(r("hq"))).then(l=>et.setPoster.call(t,l.src)).then(l=>{l.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}t.embed=new window.YT.Player(t.media,{videoId:i,host:bj(e),playerVars:pt({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:t.config.playsinline&&!t.config.fullscreen.iosNative?1:0,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(r){if(!t.media.error){const l=r.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";t.media.error={code:l,message:d},Le.call(t,t.media,"error")}},onPlaybackRateChange(r){const l=r.target;t.media.playbackRate=l.getPlaybackRate(),Le.call(t,t.media,"ratechange")},onReady(r){if(T.function(t.media.play))return;const l=r.target;Ur.getTitle.call(t,i),t.media.play=()=>{Li.call(t,!0),l.playVideo()},t.media.pause=()=>{Li.call(t,!1),l.pauseVideo()},t.media.stop=()=>{l.stopVideo()},t.media.duration=l.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(h){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,Le.call(t,t.media,"seeking"),l.seekTo(h)}}),Object.defineProperty(t.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(h){l.setPlaybackRate(h)}});let{volume:d}=t.config;Object.defineProperty(t.media,"volume",{get:()=>d,set(h){d=h,l.setVolume(100*d),Le.call(t,t.media,"volumechange")}});let{muted:c}=t.config;Object.defineProperty(t.media,"muted",{get:()=>c,set(h){const f=T.boolean(h)?h:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),Le.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration});const u=l.getAvailablePlaybackRates();t.options.speed=u.filter(h=>t.config.speed.options.includes(h)),t.supported.ui&&e.customControls&&t.media.setAttribute("tabindex",-1),Le.call(t,t.media,"timeupdate"),Le.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval(()=>{t.media.buffered=l.getVideoLoadedFraction(),(t.media.lastBuffered===null||t.media.lastBuffered<t.media.buffered)&&Le.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,t.media.buffered===1&&(clearInterval(t.timers.buffering),Le.call(t,t.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>et.build.call(t),50)},onStateChange(r){const l=r.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(r.data)&&(t.media.seeking=!1,Le.call(t,t.media,"seeked")),r.data){case-1:Le.call(t,t.media,"timeupdate"),t.media.buffered=l.getVideoLoadedFraction(),Le.call(t,t.media,"progress");break;case 0:Li.call(t,!1),t.media.loop?(l.stopVideo(),l.playVideo()):Le.call(t,t.media,"ended");break;case 1:e.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(Li.call(t,!0),Le.call(t,t.media,"playing"),t.timers.playing=setInterval(()=>{Le.call(t,t.media,"timeupdate")},50),t.media.duration!==l.getDuration()&&(t.media.duration=l.getDuration(),Le.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),Li.call(t,!1);break;case 3:Le.call(t,t.media,"waiting")}Le.call(t,t.elements.container,"statechange",!1,{code:r.data})}}})}},_y={setup(){this.media?(Je(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Je(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Je(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=xe("div",{class:this.config.classNames.video}),ry(this.media,this.elements.wrapper),this.elements.poster=xe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?kn.setup.call(this):this.isYouTube?Ur.setup.call(this):this.isVimeo&&Vu.setup.call(this)):this.debug.warn("No media element found!")}};class Sj{constructor(e){ge(this,"load",()=>{this.enabled&&(T.object(window.google)&&T.object(window.google.ima)?this.ready():vu(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),ge(this,"ready",()=>{var a;this.enabled||((a=this).manager&&a.manager.destroy(),a.elements.displayContainer&&a.elements.displayContainer.destroy(),a.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),ge(this,"setupIMA",()=>{this.elements.container=xe("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,a=>this.onAdsManagerLoaded(a),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,a=>this.onAdError(a),!1),this.requestAds()}),ge(this,"requestAds",()=>{const{container:a}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=a.offsetWidth,n.linearAdSlotHeight=a.offsetHeight,n.nonLinearAdSlotWidth=a.offsetWidth,n.nonLinearAdSlotHeight=a.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),ge(this,"pollCountdown",(a=!1)=>{if(!a)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Mr(Math.max(this.manager.getRemainingTime(),0)),i=`${Ot.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),ge(this,"onAdsManagerLoaded",a=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=a.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],o=>this.onAdEvent(o))}),this.trigger("loaded")}),ge(this,"addCuePoints",()=>{T.empty(this.cuePoints)||this.cuePoints.forEach(a=>{if(a!==0&&a!==-1&&a<this.player.duration){const n=this.player.elements.progress;if(T.element(n)){const i=100/this.player.duration*a,o=xe("span",{class:this.player.config.classNames.cues});o.style.left=`${i.toString()}%`,n.appendChild(o)}}})}),ge(this,"onAdEvent",a=>{const{container:n}=this.player.elements,i=a.getAd(),o=a.getAdData();switch((r=>{Le.call(this.player,this.player.media,`ads${r.replace(/_/g,"").toLowerCase()}`)})(a.type),a.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:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}}),ge(this,"onAdError",a=>{this.cancel(),this.player.debug.warn("Ads error",a)}),ge(this,"listeners",()=>{const{container:a}=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;T.empty(this.cuePoints)||this.cuePoints.forEach((o,r)=>{n<o&&o<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(a.offsetWidth,a.offsetHeight,google.ima.ViewMode.NORMAL)})}),ge(this,"play",()=>{const{container:a}=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(a.offsetWidth,a.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),ge(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Ya(this.player.media.play())}),ge(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),ge(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),ge(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(a=>{this.on("loaded",a),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),ge(this,"trigger",(a,...n)=>{const i=this.events[a];T.array(i)&&i.forEach(o=>{T.function(o)&&o.apply(this,n)})}),ge(this,"on",(a,n)=>(T.array(this.events[a])||(this.events[a]=[]),this.events[a].push(n),this)),ge(this,"startSafetyTimer",(a,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},a)}),ge(this,"clearSafetyTimer",a=>{T.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${a}`),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((a,n)=>{this.on("loaded",a),this.on("error",n)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!T.empty(e.publisherId)||T.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return T.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${wy({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 Ey(t=0,e=0,a=255){return Math.min(Math.max(t,e),a)}const wj=t=>{const e=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach(a=>{const n={};a.split(/\r\n|\n|\r/).forEach(i=>{if(T.number(n.startTime)){if(!T.empty(i.trim())&&T.empty(n.text)){const o=i.trim().split("#xywh=");[n.text]=o,o[1]&&([n.x,n.y,n.w,n.h]=o[1].split(","))}}else{const o=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})/);o&&(n.startTime=60*Number(o[1]||0)*60+60*Number(o[2])+Number(o[3])+ +`0.${o[4]}`,n.endTime=60*Number(o[6]||0)*60+60*Number(o[7])+Number(o[8])+ +`0.${o[9]}`)}}),n.text&&e.push(n)}),e},Cy=(t,e)=>{const a={};return t>e.width/e.height?(a.width=e.width,a.height=1/t*e.width):(a.height=e.height,a.width=t*e.height),a};class Au{constructor(e){ge(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)})}),ge(this,"getThumbnails",()=>new Promise(a=>{const{src:n}=this.player.config.previewThumbnails;if(T.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((o,r)=>o.height-r.height),this.player.debug.log("Preview thumbnails",this.thumbnails),a()};if(T.function(n))n(o=>{this.thumbnails=o,i()});else{const o=(T.string(n)?[n]:n).map(r=>this.getThumbnail(r));Promise.all(o).then(i)}})),ge(this,"getThumbnail",a=>new Promise(n=>{Ti(a).then(i=>{const o={frames:wj(i),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=a.substring(0,a.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{o.height=r.naturalHeight,o.width=r.naturalWidth,this.thumbnails.push(o),n()},r.src=o.urlPrefix+o.frames[0].text})})),ge(this,"startMove",a=>{if(this.loaded&&T.event(a)&&["touchmove","mousemove"].includes(a.type)&&this.player.media.duration){if(a.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const o=this.player.elements.progress.getBoundingClientRect(),r=100/o.width*(a.pageX-o.left);this.seekTime=this.player.media.duration*(r/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=a.pageX,this.elements.thumb.time.innerText=Mr(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()}}),ge(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),ge(this,"startScrubbing",a=>{(T.nullOrUndefined(a.button)||a.button===!1||a.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),ge(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):_u.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),ge(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})}),ge(this,"render",()=>{this.elements.thumb.container=xe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=xe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const a=xe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=xe("span",{},"00:00"),a.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(a),T.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=xe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),ge(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),ge(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const a=this.thumbnails[0].frames.findIndex(o=>this.seekTime>=o.startTime&&this.seekTime<=o.endTime),n=a>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((o,r)=>{this.loadedImages.includes(o.frames[a].text)&&(i=r)}),a!==this.showingThumb&&(this.showingThumb=a,this.loadImage(i)))}),ge(this,"loadImage",(a=0)=>{const n=this.showingThumb,i=this.thumbnails[a],{urlPrefix:o}=i,r=i.frames[n],l=i.frames[n].text,d=o+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,r,a,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,r,a,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),ge(this,"showImage",(a,n,i,o,r,l=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${o}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(a,n),l&&(this.currentImageContainer.appendChild(a),this.currentImageElement=a,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(i,a,n,r))}),ge(this,"removeOldImages",a=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==a.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:o}=this;setTimeout(()=>{o.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),ge(this,"preloadNearby",(a,n=!0)=>new Promise(i=>{setTimeout(()=>{const o=this.thumbnails[0].frames[a].text;if(this.showingThumbFilename===o){let r;r=n?this.thumbnails[0].frames.slice(a):this.thumbnails[0].frames.slice(0,a).reverse();let l=!1;r.forEach(d=>{const c=d.text;if(c!==o&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:u}=this.thumbnails[0],h=u+c,f=new Image;f.src=h,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),ge(this,"getHigherQuality",(a,n,i,o)=>{if(a<this.thumbnails.length-1){let r=n.naturalHeight;this.usingSprites&&(r=i.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(a+1))},300)}}),ge(this,"toggleThumbContainer",(a=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,a),!a&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),ge(this,"toggleScrubbingContainer",(a=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,a),a||(this.showingThumb=null,this.showingThumbFilename=null)}),ge(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),ge(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:a}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(a.clientHeight>20&&a.clientWidth<20){const n=Math.floor(a.clientHeight*this.thumbAspectRatio);a.style.width=`${n}px`}else if(a.clientHeight<20&&a.clientWidth>20){const n=Math.floor(a.clientWidth/this.thumbAspectRatio);a.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);a.style.height=`${this.thumbContainerHeight}px`,a.style.width=`${n}px`}this.setThumbContainerPos()}),ge(this,"setThumbContainerPos",()=>{const a=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,o=n.left-a.left+10,r=n.right-a.left-i.clientWidth-10,l=this.mousePosX-a.left-i.clientWidth/2,d=Ey(l,o,r);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),ge(this,"setScrubbingContainerSize",()=>{const{width:a,height:n}=Cy(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${a}px`,this.elements.scrubbing.container.style.height=`${n}px`}),ge(this,"setImageSizeAndOffset",(a,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;a.style.height=a.naturalHeight*i+"px",a.style.width=a.naturalWidth*i+"px",a.style.left=`-${n.x*i}px`,a.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}=Cy(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 Ru={insertElements(t,e){T.string(e)?ly(t,this.media,{src:e}):T.array(e)&&e.forEach(a=>{ly(t,this.media,a)})},change(t){oy(t,"sources.length")?(kn.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],un(this.media),this.media=null,T.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:a}=t,[{provider:n=_n.html5,src:i}]=e,o=n==="html5"?a:"div",r=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:a,supported:gt.check(a,n,this.config.playsinline),media:xe(o,r)}),this.elements.container.appendChild(this.media),T.boolean(t.autoplay)&&(this.config.autoplay=t.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),T.empty(t.poster)||(this.poster=t.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),et.addStyleHook.call(this),this.isHTML5&&Ru.insertElements.call(this,"source",e),this.config.title=t.title,_y.setup.call(this),this.isHTML5&&Object.keys(t).includes("tracks")&&Ru.insertElements.call(this,"track",t.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&et.build.call(this),this.isHTML5&&this.media.load(),T.empty(t.previewThumbnails)||(Object.assign(this.config.previewThumbnails,t.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Au(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Ns{constructor(e,a){if(ge(this,"play",()=>T.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Ya(this.media.play())),this.media.play()):null),ge(this,"pause",()=>this.playing&&T.function(this.media.pause)?this.media.pause():null),ge(this,"togglePlay",l=>(T.boolean(l)?l:!this.playing)?this.play():this.pause()),ge(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):T.function(this.media.stop)&&this.media.stop()}),ge(this,"restart",()=>{this.currentTime=0}),ge(this,"rewind",l=>{this.currentTime-=T.number(l)?l:this.config.seekTime}),ge(this,"forward",l=>{this.currentTime+=T.number(l)?l:this.config.seekTime}),ge(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(T.number(l)?l:0)}),ge(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),ge(this,"airplay",()=>{gt.airplay&&this.media.webkitShowPlaybackTargetPicker()}),ge(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Br(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,u=Je(this.elements.container,this.config.classNames.hideControls,c);if(u&&T.array(this.config.controls)&&this.config.controls.includes("settings")&&!T.empty(this.config.settings)&&fe.toggleMenu.call(this,!1),u!==d){const h=u?"controlshidden":"controlsshown";Le.call(this,this.media,h)}return!u}return!1}),ge(this,"on",(l,d)=>{Ke.call(this,this.elements.container,l,d)}),ge(this,"once",(l,d)=>{_u.call(this,this.elements.container,l,d)}),ge(this,"off",(l,d)=>{Pr(this.elements.container,l,d)}),ge(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(un(this.elements.buttons.play),un(this.elements.captions),un(this.elements.controls),un(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),T.function(l)&&l()):(Qz.call(this),kn.cancelRequests.call(this),Ir(this.elements.original,this.elements.container),Le.call(this,this.elements.original,"destroyed",!0),T.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?(et.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&T.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),ge(this,"supports",l=>gt.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=gt.touch,this.media=e,T.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||T.nodeList(this.media)||T.array(this.media))&&(this.media=this.media[0]),this.config=pt({},ky,Ns.defaults,a||{},(()=>{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 uj(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",gt),T.nullOrUndefined(this.media)||!T.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(!gt.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 o=null,r=null;switch(i){case"div":if(o=this.media.querySelector("iframe"),T.element(o)){if(r=Sy(o.getAttribute("src")),this.provider=dj(r.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",r.search.length){const l=["1","true"];l.includes(r.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(r.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(r.searchParams.get("playsinline")),this.config.youtube.hl=r.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(T.empty(this.provider)||!Object.values(_n).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Lu.video;break;case"video":case"audio":this.type=i,this.provider=_n.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=gt.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new hj(this),this.storage=new Ci(this),this.media.plyr=this,T.element(this.elements.container)||(this.elements.container=xe("div"),ry(this.media,this.elements.container)),et.migrateStyles.call(this),et.addStyleHook.call(this),_y.setup.call(this),this.config.debug&&Ke.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Ia(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&et.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Sj(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Ya(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Au(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===_n.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===_n.youtube}get isVimeo(){return this.provider===_n.vimeo}get isVideo(){return this.type===Lu.video}get isAudio(){return this.type===Lu.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 a=T.number(e)&&e>0;this.media.currentTime=a?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 T.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),a=(this.media||{}).duration,n=T.number(a)&&a!==1/0?a:0;return e||n}set volume(e){let a=e;T.string(a)&&(a=Number(a)),T.number(a)||(a=this.storage.get("volume")),T.number(a)||({volume:a}=this.config),a>1&&(a=1),a<0&&(a=0),this.config.volume=a,this.media.volume=a,!T.empty(e)&&this.muted&&a>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let a=e;T.boolean(a)||(a=this.storage.get("muted")),T.boolean(a)||(a=this.config.muted),this.config.muted=a,this.media.muted=a}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 a=null;T.number(e)&&(a=e),T.number(a)||(a=this.storage.get("speed")),T.number(a)||(a=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;a=Ey(a,n,i),this.config.speed.selected=a,setTimeout(()=>{this.media&&(this.media.playbackRate=a)},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 a=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!T.empty(e)&&Number(e),this.storage.get("quality"),a.selected,a.default].find(T.number),o=!0;if(!n.includes(i)){const r=dy(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${r} instead`),i=r,o=!1}a.selected=i,this.media.quality=i,o&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const a=T.boolean(e)?e:this.config.loop.active;this.config.loop.active=a,this.media.loop=a}get loop(){return!!this.media.loop}set source(e){Ru.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return T.url(e)?e:this.source}set download(e){T.url(e)&&(this.config.urls.download=e,fe.setDownloadUrl.call(this))}set poster(e){this.isVideo?et.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=Fr(Cu.call(this));return T.array(e)?e.join(":"):e}set ratio(e){this.isVideo?T.string(e)&&my(e)?(this.config.ratio=Fr(e),Ls.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=T.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){He.toggle.call(this,e,!1)}set currentTrack(e){He.set.call(this,e,!1),He.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:a}=this.captions;return e?a:-1}set language(e){He.setLanguage.call(this,e,!1)}get language(){return(He.getCurrentTrack.call(this)||{}).language}set pip(e){if(!gt.pip)return;const a=T.boolean(e)?e:!this.pip;T.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(a?xu.active:xu.inactive),T.function(this.media.requestPictureInPicture)&&(!this.pip&&a?this.media.requestPictureInPicture():this.pip&&!a&&document.exitPictureInPicture())}get pip(){return gt.pip?T.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===xu.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 Au(this))}static supported(e,a){return gt.check(e,a)}static loadSprite(e,a){return yy(e,a)}static setup(e,a={}){let n=null;return T.string(e)?n=Array.from(document.querySelectorAll(e)):T.nodeList(e)?n=Array.from(e):T.array(e)&&(n=e.filter(T.element)),T.empty(n)?null:n.map(i=>new Ns(i,a))}}Ns.defaults=Xz(ky);const kj={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},_j={class:"carousel-video-player__play-info-portrait__date"},Ej={class:"carousel-video-player__play-info-portrait__game"},Cj={key:2,class:"carousel-video-player__play-info__data"},Tj={class:"video-container"},xj=["id"],Lj=St({__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(t,{emit:e}){const a=t,n=s.ref(null),i=s.ref(!1),o=s.computed(()=>`p-${a.play.playId||a.play.play_id}`),r=s.computed(()=>{if(a.isPlaySeeker){const g=new Date(a.play.gameDate);return`${g.getDate()}, ${Xv(g.getMonth())} ${g.getFullYear()}`}const f=new Date(a.play.date_time_utc);return`${f.getDate()}, ${$2[f.getMonth()]} ${f.getFullYear()}`}),l=s.computed(()=>{if(a.isPlaySeeker){const f=a.play.finalScore.split(" ");return`${a.play.homeTeamName} ${f[0]} : ${f[2]} ${a.play.awayTeamName} | ${a.play.categoryName} ${a.play.playerShortName}`}return`${a.play.home_alt_name} ${a.play.score[0]} : ${a.play.score[1]} ${a.play.away_alt_name} | ${a.play.event_type_name} ${a.play.player_name}`}),d=s.computed(()=>{if(a.isPlaySeeker){const f=a.play.finalScore.split(" ");return`${a.play.homeTeamName} ${f[0]} : ${f[2]} ${a.play.awayTeamName}`}return`${a.play.home_alt_name} ${a.play.score[0]} : ${a.play.score[1]} ${a.play.away_alt_name}`}),c=s.computed(()=>a.isPlaySeeker?`${a.play.categoryName} ${a.play.playerShortName}`:`${a.play.event_type_name} ${a.play.player_name}`);function u(){n.value=new Ns(`#${o.value}`,{controls:a.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),a.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=a.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=a.play.endSeconds&&(n.value.pause(),n.value.currentTime=a.play.startSeconds,e("play-ended"))})),n.value.source={type:"video",sources:[{src:a.isPlaySeeker?a.play.videoUrl:a.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,a.play.videoPlayer=n.value,a.play.plyrInit=u,n.value.on("webkitfullscreenchange",h()),n.value.on("mozfullscreenchange",h()),n.value.on("fullscreenchange",h())}function h(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return s.onMounted(()=>{setTimeout(()=>{u()},100)}),(f,g)=>(s.openBlock(),s.createElementBlock("div",{class:"carousel-video-player",onMouseenter:g[0]||(g[0]=m=>i.value=!0),onMouseleave:g[1]||(g[1]=m=>i.value=!1)},[s.withDirectives(s.createElementVNode("div",{class:s.normalizeClass(["carousel-video-player__play-info",t.isPortrait&&t.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!t.isPortrait||!t.isMobileFull?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["carousel-video-player__play-info__date",t.isPortrait&&t.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},s.toDisplayString(r.value),3)):s.createCommentVNode("",!0),t.isPortrait&&t.isMobileFull?(s.openBlock(),s.createElementBlock("div",kj,[s.createElementVNode("div",_j,[s.createTextVNode(s.toDisplayString(r.value)+" - ",1),s.createElementVNode("div",Ej,s.toDisplayString(d.value),1)]),s.createTextVNode(" "+s.toDisplayString(c.value),1)])):(s.openBlock(),s.createElementBlock("div",Cj,s.toDisplayString(l.value),1))],2),[[s.vShow,i.value]]),s.createElementVNode("div",Tj,[s.createElementVNode("video",{id:o.value,controls:"",preload:"auto","data-setup":"{}"},null,8,xj)])],32))}},[["__scopeId","data-v-96776f5d"]]),Ou=t=>(s.pushScopeId("data-v-64d330ca"),t=t(),s.popScopeId(),t),Nj=[Ou(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[s.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),s.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],vj={class:"carousel-full-screen__carousel"},Vj={key:0,class:"icon-mobil-scrren"},Aj=[Ou(()=>s.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Ou(()=>s.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[s.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),s.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],Rj={class:"carousel-full-screen__carousel__video-player"},Iu=2,Oj=St({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const a=t;let n=0,i=new Map;const o=s.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=s.ref(null),l=s.ref([]);s.watch(()=>a.playerQueue,b=>{b.length&&(l.value=b.map((S,w)=>(S.index=w,{...S})),n=a.playlistIndex,i=new Map(l.value.map(S=>[S.index,S])))},{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 S=b.index-n;n=b.index;const w=i.get(n+S*-1),_=i.get(n);if(w&&w.videoPlayer&&(w.videoPlayer.pause(),w.videoPlayer.currentTime=0),_&&_.videoPlayer&&_.videoPlayer.play(),S>0){const C=i.get(n+Iu),N=i.get(n+1),E=i.get(n-Iu);C&&(l.value.find(L=>L.index===C.index)||l.value.push(C)),N&&N.videoPlayer&&N.videoPlayer.isDestroyed&&N.plyrInit(),E&&E.videoPlayer&&(E.videoPlayer.pause(),E.videoPlayer.src="",E.videoPlayer.destroy(),E.videoPlayer.isDestroyed=!0)}else if(S<0){const C=i.get(n-1),N=i.get(n+Iu);C&&C.videoPlayer&&C.videoPlayer.isDestroyed&&C.plyrInit(),N&&N.videoPlayer&&(N.videoPlayer.pause(),N.videoPlayer.src="",N.videoPlayer.destroy(),N.videoPlayer.isDestroyed=!0)}}}function h(){r.value&&r.value.next()}function f(){e("close",n)}const g=s.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),m=s.computed(()=>g.portrait);function p(){var b=window.matchMedia("(orientation: portrait)");b.matches?g.portrait=!0:g.portrait=!1}function y(){window.screen.orientation.angle!=90?g.portrait=!0:g.portrait=!1}return s.onMounted(()=>{c()?(window.addEventListener("resize",p),p()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((S,w)=>{S.id=`plyrFS${w+1}`})},100)}),s.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",p):window.removeEventListener("orientationchange",y),a.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,S)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["carousel-full-screen",c()&&!m.value?"paddingIos":""]),id:"carousel-swipe"},[s.createElementVNode("div",{class:"carousel-full-screen__close",style:s.normalizeStyle(c()&&m.value?"padding-top:30px":""),onClick:f},Nj,4),s.createElementVNode("div",vj,[m.value&&d()?(s.openBlock(),s.createElementBlock("div",Vj,Aj)):s.createCommentVNode("",!0),s.createVNode(s.unref(gz),s.mergeProps({ref_key:"gscCarousel",ref:r},o.value,{items:l.value,onInput:u}),{default:s.withCtx(({item:w})=>[s.createElementVNode("div",Rj,[s.createVNode(Lj,{play:w,"is-portrait":m.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":t.isPlaySeeker,onPlayEnded:h},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-64d330ca"]]),Ij=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"}]]),Bj=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"}]]),Ty={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},xy={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Ly={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Ny=new Map([[1,Ij],[2,Bj]]),Pj=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},Bu={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(t){this.status=t}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(t){this.$emit("click",t),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},vy=()=>{s.useCssVars(t=>({"9d01acb4":t.height,"14e95081":t.borderWidthBtn,"38fec285":t.borderType,34353510:t.borderColor,"20d20dc6":t.borderRadius,17130967:t.width,"4ccb7d36":t.backgroundColor,"5d1e86a2":t.cursorType,ce65d4a2:t.fontSize,fe4ac47a:t.fontStyle,f98e44dc:t.fontFamily,"93b87770":t.marginLeftStat,c7f7beba:t.fontSizeStat}))},Vy=Bu.setup;Bu.setup=Vy?(t,e)=>(vy(),Vy(t,e)):vy;const Fj=t=>(s.pushScopeId("data-v-f3ee6b2b"),t=t(),s.popScopeId(),t),Mj=["src"],Dj={key:1,class:"text"},Uj=["src"],zj={class:"stats"},jj=Fj(()=>s.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),qj={class:"numstats"},$j={class:"leyend"};function Gj(t,e,a,n,i,o){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([o.customStyle,i.status&&a.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,Mj)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",Dj,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,Uj)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[s.createElementVNode("div",zj,[jj,s.createElementVNode("div",qj,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",$j,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const Kj=Pj(Bu,[["render",Gj],["__scopeId","data-v-f3ee6b2b"]]),Wj={class:"gsc-dropdown__main-container__item-selected"},Hj=["height","width"],Xj=["stroke"],Jj={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zj=["fill"],Yj={class:"gsc-dropdown__items-container"},Qj=["onClick"],eq={key:0,class:"gsc-dropdown__items-footer"},tq={__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(t){return["solid","dotted","dashed"].includes(t)}},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:t=>["propName","value"].every(e=>e in t)},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},iconType:{type:Number,default:1,validator:function(t){return[1,2].includes(t)}}},emits:["input","click-ready","update:modelValue"],setup(t,{emit:e}){const a=t,n=s.ref({}),i=s.ref(null),o=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(g,m)=>{if(!a.modelValue&&(!a.onlyFirstTime||!m||!m.length)&&g&&g.length){if(a.defaultItemByProp){const p=a.items.findIndex(y=>y[a.defaultItemByProp.propName]===a.defaultItemByProp.value);p!==-1?(o.value=p,n.value=g[p]):(o.value=0,n.value=g[0])}else n.value=g[a.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),s.watch(()=>a.modelValue,g=>{if(g){const m=a.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);m!==-1&&(o.value=m,n.value=a.items[m],e("update:modelValue",n.value))}},{immediate:!0});const l=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),d=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function u(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function h(g,m){a.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),n.value=g,e("input",n.value),e("update:modelValue",n.value)}function f(){r.value=!1,e("click-ready")}return s.onMounted(()=>{document.addEventListener("click",u)}),s.onBeforeMount(()=>{document.removeEventListener("click",u)}),(g,m)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:s.normalizeStyle(l.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${t.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",Wj,[s.renderSlot(g.$slots,"default",{selectedItem:n.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(d.value)},[t.iconType===1?(s.openBlock(),s.createElementBlock("svg",{key:0,height:t.arrowHeight,width:t.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.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:t.arrowColor},null,8,Xj)],8,Hj)):(s.openBlock(),s.createElementBlock("svg",Jj,[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:t.arrowColor},null,8,Zj)]))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",Yj,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(p,y)=>(s.openBlock(),s.createElementBlock("div",null,[s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>h(p,y)},[s.renderSlot(g.$slots,"availableItem",{item:p})],10,Qj)),[[s.vShow,!p.isHidden]])]))),256))],4),t.isFooterVisible?(s.openBlock(),s.createElementBlock("div",eq,[s.createVNode(s.unref(Kj),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},aq=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},nq={class:"tournament-select__selected-tournament"},sq={class:"tournament-select__selected-tournament__logo"},iq=["src"],oq={class:"tournament-select__selected-tournament__name"},rq="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",lq={__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(t){return["solid","dotted","dashed"].includes(t)}},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:t=>["propName","value"].every(e=>e in t)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set},isClubesActive:{type:Boolean,default:!0},routeName:{type:String,default:""},avoidTournamentFilter:{type:Boolean,default:!1},areFemaleVisible:{type:Boolean,default:!0}},emits:["input","change-tournaments"],setup(t,{emit:e}){const a=t,n=new Set(["tops","table","dataia"]),i=s.ref([]),o=s.computed(()=>{const m={};return a.fontFamily&&(m["font-family"]=`${a.fontFamily}`),m}),r=s.computed(()=>i.value.filter(m=>!m.isHidden)),l=s.computed(()=>r.value.find(m=>m.seasonsIds.has(a.currentSeasonId))||r.value[0]);s.watch(()=>a.isClubesActive,()=>{d()},{immediate:!0}),s.watch(()=>a.routeName,()=>{console.log("watcher, routeName",a.routeName),d()},{immediate:!0});function d(){i.value.forEach(m=>{m.isHidden=!a.isClubesActive&&m.isClub||a.isClubesActive&&!m.isClub||a.routeName&&m.tournament_type===4&&n.has(a.routeName)})}async function c(){try{if(a.items&&a.items.length)i.value=[...a.items];else{const m=await h();e("change-tournaments",m),i.value=m.sort((p,y)=>p.tournament.order-y.tournament.order).reduce((p,y)=>{if(a.tournamentsIdsToInclude&&a.tournamentsIdsToInclude.size&&!a.tournamentsIdsToInclude.has(y.id))return p;const b={...y.tournament,seasons:y.seasons,seasonsIds:y.seasons.reduce((S,w)=>(S.add(w.id),S),new Set),isClub:y.tournament.international_tournament===0,isFriendlies:y.tournament.tournament_type===3};return b.isHidden=!a.avoidTournamentFilter&&(!a.isClubesActive&&b.isClub||a.isClubesActive&&!b.isClub),p.push(b),p},[])}a.areFemaleVisible||(i.value=i.value.filter(m=>!m.is_female))}catch(m){throw new Error(m)}}function u(m){const p=new XMLHttpRequest,y=`${a.logosUrl}${m}.${a.logoFileType}`;return p.open("HEAD",y,!1),p.send(),p.status!==404}async function h(){try{return(await fetch(a.apiUrl||rq)).json()}catch(m){return Promise.reject(m)}}function f(m){e("input",m)}function g(m){e("input",m)}return s.onMounted(()=>{c()}),(m,p)=>(s.openBlock(),s.createElementBlock("div",{class:"tournament-select",style:s.normalizeStyle(o.value)},[s.createVNode(s.unref(tq),s.mergeProps(a,{"model-value":l.value,items:i.value,onInput:f,"onUpdate:modelValue":g}),{default:s.withCtx(({selectedItem:y})=>[s.createElementVNode("div",nq,[s.createElementVNode("div",sq,[u(y.id)?(s.openBlock(),s.createElementBlock("img",{key:0,src:`${a.logosUrl}${y.id}.${a.logoFileType}`,alt:""},null,8,iq)):s.createCommentVNode("",!0)]),s.createElementVNode("div",oq,s.toDisplayString(y.name),1)])]),availableItem:s.withCtx(({item:y})=>[s.createElementVNode("div",null,s.toDisplayString(y.name),1)]),_:1},16,["model-value","items"])],4))}},cq=aq(lq,[["__scopeId","data-v-65f9ab6c"]]),dq=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},Pu={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(t){this.status=t}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(t){this.$emit("click",t),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Ay=()=>{s.useCssVars(t=>({"9d01acb4":t.height,"14e95081":t.borderWidthBtn,"38fec285":t.borderType,34353510:t.borderColor,"20d20dc6":t.borderRadius,17130967:t.width,"4ccb7d36":t.backgroundColor,"5d1e86a2":t.cursorType,ce65d4a2:t.fontSize,fe4ac47a:t.fontStyle,f98e44dc:t.fontFamily,"93b87770":t.marginLeftStat,c7f7beba:t.fontSizeStat}))},Ry=Pu.setup;Pu.setup=Ry?(t,e)=>(Ay(),Ry(t,e)):Ay;const uq=t=>(s.pushScopeId("data-v-f3ee6b2b"),t=t(),s.popScopeId(),t),hq=["src"],mq={key:1,class:"text"},fq=["src"],pq={class:"stats"},gq=uq(()=>s.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),yq={class:"numstats"},bq={class:"leyend"};function Sq(t,e,a,n,i,o){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([o.customStyle,i.status&&a.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,hq)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",mq,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,fq)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[s.createElementVNode("div",pq,[gq,s.createElementVNode("div",yq,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",bq,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const wq=dq(Pu,[["render",Sq],["__scopeId","data-v-f3ee6b2b"]]),kq={class:"gsc-dropdown__main-container__item-selected"},_q=["height","width"],Eq=["stroke"],Cq={class:"gsc-dropdown__items-container"},Tq=["onClick"],xq={key:0,class:"gsc-dropdown__items-footer"},Lq={__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(t){return["solid","dotted","dashed"].includes(t)}},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:t=>["propName","value"].every(e=>e in t)},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(t,{emit:e}){const a=t,n=s.ref({}),i=s.ref(null),o=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(g,m)=>{if(!a.modelValue&&(!a.onlyFirstTime||!m||!m.length)&&g&&g.length){if(a.defaultItemByProp){const p=a.items.findIndex(y=>y[a.defaultItemByProp.propName]===a.defaultItemByProp.value);p!==-1?(o.value=p,n.value=g[p]):(o.value=0,n.value=g[0])}else n.value=g[a.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),s.watch(()=>a.modelValue,g=>{if(g){const m=a.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);m!==-1&&(o.value=m,n.value=a.items[m],e("update:modelValue",n.value))}},{immediate:!0});const l=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),d=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function u(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function h(g,m){a.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),n.value=g,e("input",n.value),e("update:modelValue",n.value)}function f(){r.value=!1,e("click-ready")}return s.onMounted(()=>{document.addEventListener("click",u)}),s.onBeforeMount(()=>{document.removeEventListener("click",u)}),(g,m)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:s.normalizeStyle(l.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${t.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",kq,[s.renderSlot(g.$slots,"default",{selectedItem:n.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(d.value)},[(s.openBlock(),s.createElementBlock("svg",{height:t.arrowHeight,width:t.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.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:t.arrowColor},null,8,Eq)],8,_q))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",Cq,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(p,y)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>h(p,y)},[s.renderSlot(g.$slots,"availableItem",{item:p})],10,Tq))),128))],4),t.isFooterVisible?(s.openBlock(),s.createElementBlock("div",xq,[s.createVNode(s.unref(wq),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},Nq=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},vq={class:"season-name"},Vq={class:"items-list-season"},Aq={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(t,{emit:e}){const a=t,n=s.computed(()=>a.seasons.find(r=>r.id===a.currentSeasonId));function i(r){e("input",r)}function o(r){e("input",r)}return(r,l)=>(s.openBlock(),s.createBlock(s.unref(Lq),{items:t.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:o,"onUpdate:modelValue":i},{default:s.withCtx(({selectedItem:d})=>[s.createElementVNode("div",vq,[s.createElementVNode("span",null,s.toDisplayString(d.name),1)])]),availableItem:s.withCtx(({item:d})=>[s.createElementVNode("span",Vq,s.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},Rq=Nq(Aq,[["__scopeId","data-v-d23e9ee2"]]);function Oy(t,e){return function(){return t.apply(e,arguments)}}const{toString:Oq}=Object.prototype,{getPrototypeOf:Fu}=Object,zr=(t=>e=>{const a=Oq.call(e);return t[a]||(t[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),Ba=t=>(t=t.toLowerCase(),e=>zr(e)===t),jr=t=>e=>typeof e===t,{isArray:vs}=Array,Ni=jr("undefined");function Iq(t){return t!==null&&!Ni(t)&&t.constructor!==null&&!Ni(t.constructor)&&fa(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Iy=Ba("ArrayBuffer");function Bq(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Iy(t.buffer),e}const Pq=jr("string"),fa=jr("function"),By=jr("number"),qr=t=>t!==null&&typeof t=="object",Fq=t=>t===!0||t===!1,$r=t=>{if(zr(t)!=="object")return!1;const e=Fu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Mq=Ba("Date"),Dq=Ba("File"),Uq=Ba("Blob"),zq=Ba("FileList"),jq=t=>qr(t)&&fa(t.pipe),qq=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||fa(t.append)&&((e=zr(t))==="formdata"||e==="object"&&fa(t.toString)&&t.toString()==="[object FormData]"))},$q=Ba("URLSearchParams"),[Gq,Kq,Wq,Hq]=["ReadableStream","Request","Response","Headers"].map(Ba),Xq=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vi(t,e,{allOwnKeys:a=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),vs(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const o=a?Object.getOwnPropertyNames(t):Object.keys(t),r=o.length;let l;for(n=0;n<r;n++)l=o[n],e.call(null,t[l],l,t)}}function Py(t,e){e=e.toLowerCase();const a=Object.keys(t);let n=a.length,i;for(;n-- >0;)if(i=a[n],e===i.toLowerCase())return i;return null}const ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fy=t=>!Ni(t)&&t!==ts;function Mu(){const{caseless:t}=Fy(this)&&this||{},e={},a=(n,i)=>{const o=t&&Py(e,i)||i;$r(e[o])&&$r(n)?e[o]=Mu(e[o],n):$r(n)?e[o]=Mu({},n):vs(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&vi(arguments[n],a);return e}const Jq=(t,e,a,{allOwnKeys:n}={})=>(vi(e,(i,o)=>{a&&fa(i)?t[o]=Oy(i,a):t[o]=i},{allOwnKeys:n}),t),Zq=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yq=(t,e,a,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),a&&Object.assign(t.prototype,a)},Qq=(t,e,a,n)=>{let i,o,r;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)r=i[o],(!n||n(r,t,e))&&!l[r]&&(e[r]=t[r],l[r]=!0);t=a!==!1&&Fu(t)}while(t&&(!a||a(t,e))&&t!==Object.prototype);return e},e$=(t,e,a)=>{t=String(t),(a===void 0||a>t.length)&&(a=t.length),a-=e.length;const n=t.indexOf(e,a);return n!==-1&&n===a},t$=t=>{if(!t)return null;if(vs(t))return t;let e=t.length;if(!By(e))return null;const a=new Array(e);for(;e-- >0;)a[e]=t[e];return a},a$=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Fu(Uint8Array)),n$=(t,e)=>{const a=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=a.next())&&!n.done;){const i=n.value;e.call(t,i[0],i[1])}},s$=(t,e)=>{let a;const n=[];for(;(a=t.exec(e))!==null;)n.push(a);return n},i$=Ba("HTMLFormElement"),o$=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,a,n){return a.toUpperCase()+n}),My=(({hasOwnProperty:t})=>(e,a)=>t.call(e,a))(Object.prototype),r$=Ba("RegExp"),Dy=(t,e)=>{const a=Object.getOwnPropertyDescriptors(t),n={};vi(a,(i,o)=>{let r;(r=e(i,o,t))!==!1&&(n[o]=r||i)}),Object.defineProperties(t,n)},l$=t=>{Dy(t,(e,a)=>{if(fa(t)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const n=t[a];if(fa(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},c$=(t,e)=>{const a={},n=i=>{i.forEach(o=>{a[o]=!0})};return vs(t)?n(t):n(String(t).split(e)),a},d$=()=>{},u$=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Du="abcdefghijklmnopqrstuvwxyz",Uy="0123456789",zy={DIGIT:Uy,ALPHA:Du,ALPHA_DIGIT:Du+Du.toUpperCase()+Uy},h$=(t=16,e=zy.ALPHA_DIGIT)=>{let a="";const{length:n}=e;for(;t--;)a+=e[Math.random()*n|0];return a};function m$(t){return!!(t&&fa(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const f$=t=>{const e=new Array(10),a=(n,i)=>{if(qr(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const o=vs(n)?[]:{};return vi(n,(r,l)=>{const d=a(r,i+1);!Ni(d)&&(o[l]=d)}),e[i]=void 0,o}}return n};return a(t,0)},p$=Ba("AsyncFunction"),g$=t=>t&&(qr(t)||fa(t))&&fa(t.then)&&fa(t.catch),jy=((t,e)=>t?setImmediate:e?((a,n)=>(ts.addEventListener("message",({source:i,data:o})=>{i===ts&&o===a&&n.length&&n.shift()()},!1),i=>{n.push(i),ts.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",fa(ts.postMessage)),y$=typeof queueMicrotask<"u"?queueMicrotask.bind(ts):typeof process<"u"&&process.nextTick||jy,W={isArray:vs,isArrayBuffer:Iy,isBuffer:Iq,isFormData:qq,isArrayBufferView:Bq,isString:Pq,isNumber:By,isBoolean:Fq,isObject:qr,isPlainObject:$r,isReadableStream:Gq,isRequest:Kq,isResponse:Wq,isHeaders:Hq,isUndefined:Ni,isDate:Mq,isFile:Dq,isBlob:Uq,isRegExp:r$,isFunction:fa,isStream:jq,isURLSearchParams:$q,isTypedArray:a$,isFileList:zq,forEach:vi,merge:Mu,extend:Jq,trim:Xq,stripBOM:Zq,inherits:Yq,toFlatObject:Qq,kindOf:zr,kindOfTest:Ba,endsWith:e$,toArray:t$,forEachEntry:n$,matchAll:s$,isHTMLForm:i$,hasOwnProperty:My,hasOwnProp:My,reduceDescriptors:Dy,freezeMethods:l$,toObjectSet:c$,toCamelCase:o$,noop:d$,toFiniteNumber:u$,findKey:Py,global:ts,isContextDefined:Fy,ALPHABET:zy,generateString:h$,isSpecCompliantForm:m$,toJSONObject:f$,isAsyncFn:p$,isThenable:g$,setImmediate:jy,asap:y$};function Fe(t,e,a,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),a&&(this.config=a),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}W.inherits(Fe,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:W.toJSONObject(this.config),code:this.code,status:this.status}}});const qy=Fe.prototype,$y={};["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(t=>{$y[t]={value:t}}),Object.defineProperties(Fe,$y),Object.defineProperty(qy,"isAxiosError",{value:!0}),Fe.from=(t,e,a,n,i,o)=>{const r=Object.create(qy);return W.toFlatObject(t,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),Fe.call(r,t.message,e,a,n,i),r.cause=t,r.name=t.name,o&&Object.assign(r,o),r};const b$=null;function Uu(t){return W.isPlainObject(t)||W.isArray(t)}function Gy(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function Ky(t,e,a){return t?t.concat(e).map(function(n,i){return n=Gy(n),!a&&i?"["+n+"]":n}).join(a?".":""):e}function S$(t){return W.isArray(t)&&!t.some(Uu)}const w$=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Gr(t,e,a){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,a=W.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!W.isUndefined(m[g])});const n=a.metaTokens,i=a.visitor||c,o=a.dots,r=a.indexes,l=(a.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(W.isDate(g))return g.toISOString();if(!l&&W.isBlob(g))throw new Fe("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(g)||W.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let y=g;if(g&&!p&&typeof g=="object"){if(W.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(W.isArray(g)&&S$(g)||(W.isFileList(g)||W.endsWith(m,"[]"))&&(y=W.toArray(g)))return m=Gy(m),y.forEach(function(b,S){!(W.isUndefined(b)||b===null)&&e.append(r===!0?Ky([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Uu(g)?!0:(e.append(Ky(p,m,o),d(g)),!1)}const u=[],h=Object.assign(w$,{defaultVisitor:c,convertValue:d,isVisitable:Uu});function f(g,m){if(!W.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(g),W.forEach(g,function(p,y){(!(W.isUndefined(p)||p===null)&&i.call(e,p,W.isString(y)?y.trim():y,m,h))===!0&&f(p,m?m.concat(y):[y])}),u.pop()}}if(!W.isObject(t))throw new TypeError("data must be an object");return f(t),e}function Wy(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(a){return e[a]})}function zu(t,e){this._pairs=[],t&&Gr(t,this,e)}const Hy=zu.prototype;Hy.append=function(t,e){this._pairs.push([t,e])},Hy.toString=function(t){const e=t?function(a){return t.call(this,a,Wy)}:Wy;return this._pairs.map(function(a){return e(a[0])+"="+e(a[1])},"").join("&")};function k$(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xy(t,e,a){if(!e)return t;const n=a&&a.encode||k$;W.isFunction(a)&&(a={serialize:a});const i=a&&a.serialize;let o;if(i?o=i(e,a):o=W.isURLSearchParams(e)?e.toString():new zu(e,a).toString(n),o){const r=t.indexOf("#");r!==-1&&(t=t.slice(0,r)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class _${constructor(){this.handlers=[]}use(e,a,n){return this.handlers.push({fulfilled:e,rejected:a,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){W.forEach(this.handlers,function(a){a!==null&&e(a)})}}const Jy=_$,Zy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},E$=typeof URLSearchParams<"u"?URLSearchParams:zu,C$=typeof FormData<"u"?FormData:null,T$=typeof Blob<"u"?Blob:null,x$={isBrowser:!0,classes:{URLSearchParams:E$,FormData:C$,Blob:T$},protocols:["http","https","file","blob","url","data"]},ju=typeof window<"u"&&typeof document<"u",qu=typeof navigator=="object"&&navigator||void 0,L$=ju&&(!qu||["ReactNative","NativeScript","NS"].indexOf(qu.product)<0),N$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v$=ju&&window.location.href||"http://localhost",V$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ju,hasStandardBrowserEnv:L$,hasStandardBrowserWebWorkerEnv:N$,navigator:qu,origin:v$},Symbol.toStringTag,{value:"Module"})),Ht={...V$,...x$};function A$(t,e){return Gr(t,new Ht.classes.URLSearchParams,Object.assign({visitor:function(a,n,i,o){return Ht.isNode&&W.isBuffer(a)?(this.append(n,a.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function R$(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function O$(t){const e={},a=Object.keys(t);let n;const i=a.length;let o;for(n=0;n<i;n++)o=a[n],e[o]=t[o];return e}function Yy(t){function e(a,n,i,o){let r=a[o++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),d=o>=a.length;return r=!r&&W.isArray(i)?i.length:r,d?(W.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!l):((!i[r]||!W.isObject(i[r]))&&(i[r]=[]),e(a,n,i[r],o)&&W.isArray(i[r])&&(i[r]=O$(i[r])),!l)}if(W.isFormData(t)&&W.isFunction(t.entries)){const a={};return W.forEachEntry(t,(n,i)=>{e(R$(n),i,a,0)}),a}return null}function I$(t,e,a){if(W.isString(t))try{return(e||JSON.parse)(t),W.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(a||JSON.stringify)(t)}const $u={transitional:Zy,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const a=e.getContentType()||"",n=a.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return n?JSON.stringify(Yy(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return A$(t,this.formSerializer).toString();if((o=W.isFileList(t))||a.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Gr(o?{"files[]":t}:t,r&&new r,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),I$(t)):t}],transformResponse:[function(t){const e=this.transitional||$u.transitional,a=e&&e.forcedJSONParsing,n=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(a&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(o){if(i)throw o.name==="SyntaxError"?Fe.from(o,Fe.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],t=>{$u.headers[t]={}});const Gu=$u,B$=W.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"]),P$=t=>{const e={};let a,n,i;return t&&t.split(`
57
+ `);if(a!==this.elements.captions.innerHTML){Or(this.elements.captions);const n=xe("span",Za(this.config.selectors.caption));n.innerHTML=a,this.elements.captions.appendChild(n),Le.call(this,this.media,"cuechange")}}},ky={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:[]}},xu={active:"picture-in-picture",inactive:"inline"},_n={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Lu={audio:"audio",video:"video"};function dj(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?_n.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?_n.vimeo:null}const Nu=()=>{};class uj{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):Nu}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Nu}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Nu}}class Ia{constructor(e){ge(this,"onChange",()=>{if(!this.supported)return;const a=this.player.elements.buttons.fullscreen;T.element(a)&&(a.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;Le.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),ge(this,"toggleFallback",(a=!1)=>{if(a?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=a?"hidden":"",Je(this.target,this.player.config.classNames.fullscreen.fallback,a),Rt.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const o=T.string(n.content)&&n.content.includes(i);a?(this.cleanupViewport=!o,o||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(r=>r.trim()!==i).join(","))}this.onChange()}),ge(this,"trapFocus",a=>{if(Rt.isIos||Rt.isIPadOS||!this.active||a.key!=="Tab")return;const n=document.activeElement,i=ki.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[o]=i,r=i[i.length-1];n!==r||a.shiftKey?n===o&&a.shiftKey&&(r.focus(),a.preventDefault()):(o.focus(),a.preventDefault())}),ge(this,"update",()=>{if(this.supported){let a;a=this.forceFallback?"Fallback (forced)":Ia.nativeSupported?"Native":"Fallback",this.player.debug.log(`${a} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Je(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),ge(this,"enter",()=>{this.supported&&(Rt.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ia.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?T.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),ge(this,"exit",()=>{if(this.supported)if(Rt.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Ya(this.player.play());else if(!Ia.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!T.empty(this.prefix)){const a=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${a}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),ge(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Ia.prefix,this.property=Ia.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&Zz(this.player.elements.container,e.config.fullscreen.container),Ke.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ke.call(this.player,this.player.elements.container,"dblclick",a=>{T.element(this.player.elements.controls)&&this.player.elements.controls.contains(a.target)||this.player.listeners.proxy(a,this.toggle,"fullscreen")}),Ke.call(this,this.player.elements.container,"keydown",a=>this.trapFocus(a)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ia.nativeSupported&&!this.forceFallback}static get prefix(){if(T.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(a=>!(!T.function(document[`${a}ExitFullscreen`])&&!T.function(document[`${a}CancelFullScreen`]))&&(e=a,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ia.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ia.nativeSupported||!Rt.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ia.nativeSupported||this.forceFallback)return Br(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 Rt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Dr(t,e=1){return new Promise((a,n)=>{const i=new Image,o=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?a:n)(i)};Object.assign(i,{onload:o,onerror:o,src:t})})}const et={addStyleHook(){Je(this.elements.container,this.config.selectors.container.replace(".",""),!0),Je(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(t=!1){t&&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 et.toggleNativeControls.call(this,!0);T.element(this.elements.controls)||(fe.inject.call(this),this.listeners.controls()),et.toggleNativeControls.call(this),this.isHTML5&&He.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,fe.updateVolume.call(this),fe.timeUpdate.call(this),fe.durationUpdate.call(this),et.checkPlaying.call(this),Je(this.elements.container,this.config.classNames.pip.supported,gt.pip&&this.isHTML5&&this.isVideo),Je(this.elements.container,this.config.classNames.airplay.supported,gt.airplay&&this.isHTML5),Je(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{Le.call(this,this.media,"ready")},0),et.setTitle.call(this),this.poster&&et.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&fe.durationUpdate.call(this),this.config.mediaMetadata&&fe.setMediaMetadata.call(this)},setTitle(){let t=Ot.get("play",this.config);if(T.string(this.config.title)&&!T.empty(this.config.title)&&(t+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",t)}),this.isEmbed){const e=Nt.call(this,"iframe");if(!T.element(e))return;const a=T.empty(this.config.title)?"video":this.config.title,n=Ot.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",a))}},togglePoster(t){Je(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster(t,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),ej.call(this).then(()=>Dr(t)).catch(a=>{throw t===this.poster&&et.togglePoster.call(this,!1),a}).then(()=>{if(t!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${t}')`,backgroundSize:""}),et.togglePoster.call(this,!0),t)))},checkPlaying(t){Je(this.elements.container,this.config.classNames.playing,this.playing),Je(this.elements.container,this.config.classNames.paused,this.paused),Je(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",Ot.get(this.playing?"pause":"play",this.config))}),T.event(t)&&t.type==="timeupdate"||et.toggleControls.call(this)},checkLoading(t){this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Je(this.elements.container,this.config.classNames.loading,this.loading),et.toggleControls.call(this)},this.loading?250:0)},toggleControls(t){const{controls:e}=this.elements;if(e&&this.config.hideControls){const a=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(t||this.loading||this.paused||e.pressed||e.hover||a))}},migrateStyles(){Object.values({...this.media.style}).filter(t=>!T.empty(t)&&T.string(t)&&t.startsWith("--plyr")).forEach(t=>{this.elements.container.style.setProperty(t,this.media.style.getPropertyValue(t)),this.media.style.removeProperty(t)}),T.empty(this.media.style)&&this.media.removeAttribute("style")}};class hj{constructor(e){ge(this,"firstTouch",()=>{const{player:a}=this,{elements:n}=a;a.touch=!0,Je(n.container,a.config.classNames.isTouch,!0)}),ge(this,"global",(a=!0)=>{const{player:n}=this;n.config.keyboard.global&&_i.call(n,window,"keydown keyup",this.handleKey,a,!1),_i.call(n,document.body,"click",this.toggleMenu,a),_u.call(n,document.body,"touchstart",this.firstTouch)}),ge(this,"container",()=>{const{player:a}=this,{config:n,elements:i,timers:o}=a;!n.keyboard.global&&n.keyboard.focused&&Ke.call(a,i.container,"keydown keyup",this.handleKey,!1),Ke.call(a,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)&&(et.toggleControls.call(a,!0),u=a.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout(()=>et.toggleControls.call(a,!1),u)});const r=()=>{if(!a.isVimeo||a.config.vimeo.premium)return;const d=i.wrapper,{active:c}=a.fullscreen,[u,h]=Cu.call(a),f=uy(`aspect-ratio: ${u} / ${h}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[g,m]=tj(),p=g/m>u/h;f?(d.style.width=p?"auto":"100%",d.style.height=p?"100%":"auto"):(d.style.maxWidth=p?m/h*u+"px":null,d.style.margin=p?"0 auto":null)},l=()=>{clearTimeout(o.resized),o.resized=setTimeout(r,50)};Ke.call(a,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=a.fullscreen;c===i.container&&(!a.isEmbed&&T.empty(a.config.ratio)||(r(),(d.type==="enterfullscreen"?Ke:Pr).call(a,window,"resize",l)))})}),ge(this,"media",()=>{const{player:a}=this,{elements:n}=a;if(Ke.call(a,a.media,"timeupdate seeking seeked",o=>fe.timeUpdate.call(a,o)),Ke.call(a,a.media,"durationchange loadeddata loadedmetadata",o=>fe.durationUpdate.call(a,o)),Ke.call(a,a.media,"ended",()=>{a.isHTML5&&a.isVideo&&a.config.resetOnEnd&&(a.restart(),a.pause())}),Ke.call(a,a.media,"progress playing seeking seeked",o=>fe.updateProgress.call(a,o)),Ke.call(a,a.media,"volumechange",o=>fe.updateVolume.call(a,o)),Ke.call(a,a.media,"playing play pause ended emptied timeupdate",o=>et.checkPlaying.call(a,o)),Ke.call(a,a.media,"waiting canplay seeked playing",o=>et.checkLoading.call(a,o)),a.supported.ui&&a.config.clickToPlay&&!a.isAudio){const o=Nt.call(a,`.${a.config.classNames.video}`);if(!T.element(o))return;Ke.call(a,n.container,"click",r=>{([n.container,o].includes(r.target)||o.contains(r.target))&&(a.touch&&a.config.hideControls||(a.ended?(this.proxy(r,a.restart,"restart"),this.proxy(r,()=>{Ya(a.play())},"play")):this.proxy(r,()=>{Ya(a.togglePlay())},"play")))})}a.supported.ui&&a.config.disableContextMenu&&Ke.call(a,n.wrapper,"contextmenu",o=>{o.preventDefault()},!1),Ke.call(a,a.media,"volumechange",()=>{a.storage.set({volume:a.volume,muted:a.muted})}),Ke.call(a,a.media,"ratechange",()=>{fe.updateSetting.call(a,"speed"),a.storage.set({speed:a.speed})}),Ke.call(a,a.media,"qualitychange",o=>{fe.updateSetting.call(a,"quality",null,o.detail.quality)}),Ke.call(a,a.media,"ready qualitychange",()=>{fe.setDownloadUrl.call(a)});const i=a.config.events.concat(["keyup","keydown"]).join(" ");Ke.call(a,a.media,i,o=>{let{detail:r={}}=o;o.type==="error"&&(r=a.media.error),Le.call(a,n.container,o.type,!0,r)})}),ge(this,"proxy",(a,n,i)=>{const{player:o}=this,r=o.config.listeners[i];let l=!0;T.function(r)&&(l=r.call(o,a)),l!==!1&&T.function(n)&&n.call(o,a)}),ge(this,"bind",(a,n,i,o,r=!0)=>{const{player:l}=this,d=l.config.listeners[o],c=T.function(d);Ke.call(l,a,n,u=>this.proxy(u,i,o),r&&!c)}),ge(this,"controls",()=>{const{player:a}=this,{elements:n}=a,i=Rt.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(o=>{this.bind(o,"click",()=>{Ya(a.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",a.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{a.lastSeekTime=Date.now(),a.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{a.lastSeekTime=Date.now(),a.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{a.muted=!a.muted},"mute"),this.bind(n.buttons.captions,"click",()=>a.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{Le.call(a,a.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{a.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{a.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",a.airplay,"airplay"),this.bind(n.buttons.settings,"click",o=>{o.stopPropagation(),o.preventDefault(),fe.toggleMenu.call(a,o)},null,!1),this.bind(n.buttons.settings,"keyup",o=>{[" ","Enter"].includes(o.key)&&(o.key!=="Enter"?(o.preventDefault(),o.stopPropagation(),fe.toggleMenu.call(a,o)):fe.focusFirstMenuItem.call(a,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",o=>{o.key==="Escape"&&fe.toggleMenu.call(a,o)}),this.bind(n.inputs.seek,"mousedown mousemove",o=>{const r=n.progress.getBoundingClientRect(),l=100/r.width*(o.pageX-r.left);o.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",o=>{const r=o.currentTarget,l="play-on-seeked";if(T.keyboardEvent(o)&&!["ArrowLeft","ArrowRight"].includes(o.key))return;a.lastSeekTime=Date.now();const d=r.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(o.type);d&&c?(r.removeAttribute(l),Ya(a.play())):!c&&a.playing&&(r.setAttribute(l,""),a.pause())}),Rt.isIos){const o=ki.call(a,'input[type="range"]');Array.from(o).forEach(r=>this.bind(r,i,l=>iy(l.target)))}this.bind(n.inputs.seek,i,o=>{const r=o.currentTarget;let l=r.getAttribute("seek-value");T.empty(l)&&(l=r.value),r.removeAttribute("seek-value"),a.currentTime=l/r.max*a.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",o=>fe.updateSeekTooltip.call(a,o)),this.bind(n.progress,"mousemove touchmove",o=>{const{previewThumbnails:r}=a;r&&r.loaded&&r.startMove(o)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:o}=a;o&&o.loaded&&o.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",o=>{const{previewThumbnails:r}=a;r&&r.loaded&&r.startScrubbing(o)}),this.bind(n.progress,"mouseup touchend",o=>{const{previewThumbnails:r}=a;r&&r.loaded&&r.endScrubbing(o)}),Rt.isWebKit&&Array.from(ki.call(a,'input[type="range"]')).forEach(o=>{this.bind(o,"input",r=>fe.updateRangeFill.call(a,r.target))}),a.config.toggleInvert&&!T.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{a.currentTime!==0&&(a.config.invertTime=!a.config.invertTime,fe.timeUpdate.call(a))}),this.bind(n.inputs.volume,i,o=>{a.volume=o.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",o=>{n.controls.hover=!a.touch&&o.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(o=>!o.contains(n.container)).forEach(o=>{this.bind(o,"mouseenter mouseleave",r=>{n.controls&&(n.controls.hover=!a.touch&&r.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",o=>{n.controls.pressed=["mousedown","touchstart"].includes(o.type)}),this.bind(n.controls,"focusin",()=>{const{config:o,timers:r}=a;Je(n.controls,o.classNames.noTransition,!0),et.toggleControls.call(a,!0),setTimeout(()=>{Je(n.controls,o.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>et.toggleControls.call(a,!1),l)}),this.bind(n.inputs.volume,"wheel",o=>{const r=o.webkitDirectionInvertedFromDevice,[l,d]=[o.deltaX,-o.deltaY].map(h=>r?-h:h),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);a.increaseVolume(c/50);const{volume:u}=a.media;(c===1&&u<1||c===-1&&u>0)&&o.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:a}=this,{elements:n}=a,{key:i,type:o,altKey:r,ctrlKey:l,metaKey:d,shiftKey:c}=e,u=o==="keydown",h=u&&i===this.lastKey;if(!(r||l||d||c)&&i){if(u){const g=document.activeElement;if(T.element(g)){const{editable:m}=a.config.selectors,{seek:p}=n.inputs;if(g!==p&&es(g,m)||e.key===" "&&es(g,'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":h||(f=parseInt(i,10),a.currentTime=a.duration/10*f);break;case" ":case"k":h||Ya(a.togglePlay());break;case"ArrowUp":a.increaseVolume(.1);break;case"ArrowDown":a.decreaseVolume(.1);break;case"m":h||(a.muted=!a.muted);break;case"ArrowRight":a.forward();break;case"ArrowLeft":a.rewind();break;case"f":a.fullscreen.toggle();break;case"c":h||a.toggleCaptions();break;case"l":a.loop=!a.loop}i==="Escape"&&!a.fullscreen.usingNative&&a.fullscreen.active&&a.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){fe.toggleMenu.call(this.player,e)}}function mj(t,e){return t(e={exports:{}},e.exports),e.exports}var fj=mj(function(t,e){t.exports=function(){var a=function(){},n={},i={},o={};function r(f,g){f=f.push?f:[f];var m,p,y,b=[],S=f.length,w=S;for(m=function(_,C){C.length&&b.push(_),--w||g(b)};S--;)p=f[S],(y=i[p])?m(p,y):(o[p]=o[p]||[]).push(m)}function l(f,g){if(f){var m=o[f];if(i[f]=g,m)for(;m.length;)m[0](f,g),m.splice(0,1)}}function d(f,g){f.call&&(f={success:f}),g.length?(f.error||a)(g):(f.success||a)(f)}function c(f,g,m,p){var y,b,S=document,w=m.async,_=(m.numRetries||0)+1,C=m.before||a,N=f.replace(/[\?|#].*$/,""),E=f.replace(/^(css|img)!/,"");p=p||0,/(^css!|\.css$)/.test(N)?((b=S.createElement("link")).rel="stylesheet",b.href=E,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(N)?(b=S.createElement("img")).src=E:((b=S.createElement("script")).src=f,b.async=w===void 0||w),b.onload=b.onerror=b.onbeforeload=function(L){var x=L.type[0];if(y)try{b.sheet.cssText.length||(x="e")}catch(V){V.code!=18&&(x="e")}if(x=="e"){if((p+=1)<_)return c(f,g,m,p)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";g(f,x,L.defaultPrevented)},C(f,b)!==!1&&S.head.appendChild(b)}function u(f,g,m){var p,y,b=(f=f.push?f:[f]).length,S=b,w=[];for(p=function(_,C,N){if(C=="e"&&w.push(_),C=="b"){if(!N)return;w.push(_)}--b||g(w)},y=0;y<S;y++)c(f[y],p,m)}function h(f,g,m){var p,y;if(g&&g.trim&&(p=g),y=(p?m:g)||{},p){if(p in n)throw"LoadJS";n[p]=!0}function b(S,w){u(f,function(_){d(y,_),S&&d({success:S,error:w},_),l(p,_)},y)}if(y.returnPromise)return new Promise(b);b()}return h.ready=function(f,g){return r(f,function(m){d(g,m)}),h},h.done=function(f){l(f,[])},h.reset=function(){n={},i={},o={}},h.isDefined=function(f){return f in n},h}()});function vu(t){return new Promise((e,a)=>{fj(t,{success:e,error:a})})}function pj(t){return T.empty(t)?null:T.number(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}function gj(t){const e=t.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function xi(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Le.call(this,this.media,t?"play":"pause"))}const Vu={setup(){const t=this;Je(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,Ls.call(t),T.object(window.Vimeo)?Vu.ready.call(t):vu(t.config.urls.vimeo.sdk).then(()=>{Vu.ready.call(t)}).catch(e=>{t.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const t=this,e=t.config.vimeo,{premium:a,referrerPolicy:n,...i}=e;let o=t.media.getAttribute("src"),r="";T.empty(o)?(o=t.media.getAttribute(t.config.attributes.embed.id),r=t.media.getAttribute(t.config.attributes.embed.hash)):r=gj(o);const l=r?{h:r}:{};a&&Object.assign(i,{controls:!1,sidedock:!1});const d=wy({loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:t.config.playsinline,...l,...i}),c=pj(o),u=xe("iframe"),h=Tu(t.config.urls.vimeo.iframe,c,d);if(u.setAttribute("src",h),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),T.empty(n)||u.setAttribute("referrerPolicy",n),a||!e.customControls)u.setAttribute("data-poster",t.poster),t.media=Ir(u,t.media);else{const S=xe("div",{class:t.config.classNames.embedContainer,"data-poster":t.poster});S.appendChild(u),t.media=Ir(S,t.media)}e.customControls||Ti(Tu(t.config.urls.vimeo.api,h)).then(S=>{!T.empty(S)&&S.thumbnail_url&&et.setPoster.call(t,S.thumbnail_url).catch(()=>{})}),t.embed=new window.Vimeo.Player(u,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=()=>(xi.call(t,!0),t.embed.play()),t.media.pause=()=>(xi.call(t,!1),t.embed.pause()),t.media.stop=()=>{t.pause(),t.currentTime=0};let{currentTime:f}=t.media;Object.defineProperty(t.media,"currentTime",{get:()=>f,set(S){const{embed:w,media:_,paused:C,volume:N}=t,E=C&&!w.hasPlayed;_.seeking=!0,Le.call(t,_,"seeking"),Promise.resolve(E&&w.setVolume(0)).then(()=>w.setCurrentTime(S)).then(()=>E&&w.pause()).then(()=>E&&w.setVolume(N)).catch(()=>{})}});let g=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:()=>g,set(S){t.embed.setPlaybackRate(S).then(()=>{g=S,Le.call(t,t.media,"ratechange")}).catch(()=>{t.options.speed=[1]})}});let{volume:m}=t.config;Object.defineProperty(t.media,"volume",{get:()=>m,set(S){t.embed.setVolume(S).then(()=>{m=S,Le.call(t,t.media,"volumechange")})}});let{muted:p}=t.config;Object.defineProperty(t.media,"muted",{get:()=>p,set(S){const w=!!T.boolean(S)&&S;t.embed.setMuted(!!w||t.config.muted).then(()=>{p=w,Le.call(t,t.media,"volumechange")})}});let y,{loop:b}=t.config;Object.defineProperty(t.media,"loop",{get:()=>b,set(S){const w=T.boolean(S)?S:t.config.loop.active;t.embed.setLoop(w).then(()=>{b=w})}}),t.embed.getVideoUrl().then(S=>{y=S,fe.setDownloadUrl.call(t)}).catch(S=>{this.debug.warn(S)}),Object.defineProperty(t.media,"currentSrc",{get:()=>y}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(S=>{const[w,_]=S;t.embed.ratio=fy(w,_),Ls.call(this)}),t.embed.setAutopause(t.config.autopause).then(S=>{t.config.autopause=S}),t.embed.getVideoTitle().then(S=>{t.config.title=S,et.setTitle.call(this)}),t.embed.getCurrentTime().then(S=>{f=S,Le.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(S=>{t.media.duration=S,Le.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(S=>{t.media.textTracks=S,He.setup.call(t)}),t.embed.on("cuechange",({cues:S=[]})=>{const w=S.map(_=>oj(_.text));He.updateCues.call(t,w)}),t.embed.on("loaded",()=>{t.embed.getPaused().then(S=>{xi.call(t,!S),S||Le.call(t,t.media,"playing")}),T.element(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("bufferstart",()=>{Le.call(t,t.media,"waiting")}),t.embed.on("bufferend",()=>{Le.call(t,t.media,"playing")}),t.embed.on("play",()=>{xi.call(t,!0),Le.call(t,t.media,"playing")}),t.embed.on("pause",()=>{xi.call(t,!1)}),t.embed.on("timeupdate",S=>{t.media.seeking=!1,f=S.seconds,Le.call(t,t.media,"timeupdate")}),t.embed.on("progress",S=>{t.media.buffered=S.percent,Le.call(t,t.media,"progress"),parseInt(S.percent,10)===1&&Le.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(w=>{w!==t.media.duration&&(t.media.duration=w,Le.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",()=>{t.media.seeking=!1,Le.call(t,t.media,"seeked")}),t.embed.on("ended",()=>{t.media.paused=!0,Le.call(t,t.media,"ended")}),t.embed.on("error",S=>{t.media.error=S,Le.call(t,t.media,"error")}),e.customControls&&setTimeout(()=>et.build.call(t),0)}};function yj(t){return T.empty(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}function Li(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Le.call(this,this.media,t?"play":"pause"))}function bj(t){return t.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ur={setup(){if(Je(this.elements.wrapper,this.config.classNames.embed,!0),T.object(window.YT)&&T.function(window.YT.Player))Ur.ready.call(this);else{const t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{T.function(t)&&t(),Ur.ready.call(this)},vu(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(t){Ti(Tu(this.config.urls.youtube.api,t)).then(e=>{if(T.object(e)){const{title:a,height:n,width:i}=e;this.config.title=a,et.setTitle.call(this),this.embed.ratio=fy(i,n)}Ls.call(this)}).catch(()=>{Ls.call(this)})},ready(){const t=this,e=t.config.youtube,a=t.media&&t.media.getAttribute("id");if(!T.empty(a)&&a.startsWith("youtube-"))return;let n=t.media.getAttribute("src");T.empty(n)&&(n=t.media.getAttribute(this.config.attributes.embed.id));const i=yj(n),o=xe("div",{id:aj(t.provider),"data-poster":e.customControls?t.poster:void 0});if(t.media=Ir(o,t.media),e.customControls){const r=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Dr(r("maxres"),121).catch(()=>Dr(r("sd"),121)).catch(()=>Dr(r("hq"))).then(l=>et.setPoster.call(t,l.src)).then(l=>{l.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}t.embed=new window.YT.Player(t.media,{videoId:i,host:bj(e),playerVars:pt({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:t.config.playsinline&&!t.config.fullscreen.iosNative?1:0,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(r){if(!t.media.error){const l=r.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";t.media.error={code:l,message:d},Le.call(t,t.media,"error")}},onPlaybackRateChange(r){const l=r.target;t.media.playbackRate=l.getPlaybackRate(),Le.call(t,t.media,"ratechange")},onReady(r){if(T.function(t.media.play))return;const l=r.target;Ur.getTitle.call(t,i),t.media.play=()=>{Li.call(t,!0),l.playVideo()},t.media.pause=()=>{Li.call(t,!1),l.pauseVideo()},t.media.stop=()=>{l.stopVideo()},t.media.duration=l.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(h){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,Le.call(t,t.media,"seeking"),l.seekTo(h)}}),Object.defineProperty(t.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(h){l.setPlaybackRate(h)}});let{volume:d}=t.config;Object.defineProperty(t.media,"volume",{get:()=>d,set(h){d=h,l.setVolume(100*d),Le.call(t,t.media,"volumechange")}});let{muted:c}=t.config;Object.defineProperty(t.media,"muted",{get:()=>c,set(h){const f=T.boolean(h)?h:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),Le.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration});const u=l.getAvailablePlaybackRates();t.options.speed=u.filter(h=>t.config.speed.options.includes(h)),t.supported.ui&&e.customControls&&t.media.setAttribute("tabindex",-1),Le.call(t,t.media,"timeupdate"),Le.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval(()=>{t.media.buffered=l.getVideoLoadedFraction(),(t.media.lastBuffered===null||t.media.lastBuffered<t.media.buffered)&&Le.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,t.media.buffered===1&&(clearInterval(t.timers.buffering),Le.call(t,t.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>et.build.call(t),50)},onStateChange(r){const l=r.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(r.data)&&(t.media.seeking=!1,Le.call(t,t.media,"seeked")),r.data){case-1:Le.call(t,t.media,"timeupdate"),t.media.buffered=l.getVideoLoadedFraction(),Le.call(t,t.media,"progress");break;case 0:Li.call(t,!1),t.media.loop?(l.stopVideo(),l.playVideo()):Le.call(t,t.media,"ended");break;case 1:e.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(Li.call(t,!0),Le.call(t,t.media,"playing"),t.timers.playing=setInterval(()=>{Le.call(t,t.media,"timeupdate")},50),t.media.duration!==l.getDuration()&&(t.media.duration=l.getDuration(),Le.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),Li.call(t,!1);break;case 3:Le.call(t,t.media,"waiting")}Le.call(t,t.elements.container,"statechange",!1,{code:r.data})}}})}},_y={setup(){this.media?(Je(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Je(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Je(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=xe("div",{class:this.config.classNames.video}),ry(this.media,this.elements.wrapper),this.elements.poster=xe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?kn.setup.call(this):this.isYouTube?Ur.setup.call(this):this.isVimeo&&Vu.setup.call(this)):this.debug.warn("No media element found!")}};class Sj{constructor(e){ge(this,"load",()=>{this.enabled&&(T.object(window.google)&&T.object(window.google.ima)?this.ready():vu(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),ge(this,"ready",()=>{var a;this.enabled||((a=this).manager&&a.manager.destroy(),a.elements.displayContainer&&a.elements.displayContainer.destroy(),a.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),ge(this,"setupIMA",()=>{this.elements.container=xe("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,a=>this.onAdsManagerLoaded(a),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,a=>this.onAdError(a),!1),this.requestAds()}),ge(this,"requestAds",()=>{const{container:a}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=a.offsetWidth,n.linearAdSlotHeight=a.offsetHeight,n.nonLinearAdSlotWidth=a.offsetWidth,n.nonLinearAdSlotHeight=a.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),ge(this,"pollCountdown",(a=!1)=>{if(!a)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Mr(Math.max(this.manager.getRemainingTime(),0)),i=`${Ot.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),ge(this,"onAdsManagerLoaded",a=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=a.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],o=>this.onAdEvent(o))}),this.trigger("loaded")}),ge(this,"addCuePoints",()=>{T.empty(this.cuePoints)||this.cuePoints.forEach(a=>{if(a!==0&&a!==-1&&a<this.player.duration){const n=this.player.elements.progress;if(T.element(n)){const i=100/this.player.duration*a,o=xe("span",{class:this.player.config.classNames.cues});o.style.left=`${i.toString()}%`,n.appendChild(o)}}})}),ge(this,"onAdEvent",a=>{const{container:n}=this.player.elements,i=a.getAd(),o=a.getAdData();switch((r=>{Le.call(this.player,this.player.media,`ads${r.replace(/_/g,"").toLowerCase()}`)})(a.type),a.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:o.adError&&this.player.debug.warn(`Non-fatal ad error: ${o.adError.getMessage()}`)}}),ge(this,"onAdError",a=>{this.cancel(),this.player.debug.warn("Ads error",a)}),ge(this,"listeners",()=>{const{container:a}=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;T.empty(this.cuePoints)||this.cuePoints.forEach((o,r)=>{n<o&&o<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(a.offsetWidth,a.offsetHeight,google.ima.ViewMode.NORMAL)})}),ge(this,"play",()=>{const{container:a}=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(a.offsetWidth,a.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),ge(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Ya(this.player.media.play())}),ge(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),ge(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),ge(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(a=>{this.on("loaded",a),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),ge(this,"trigger",(a,...n)=>{const i=this.events[a];T.array(i)&&i.forEach(o=>{T.function(o)&&o.apply(this,n)})}),ge(this,"on",(a,n)=>(T.array(this.events[a])||(this.events[a]=[]),this.events[a].push(n),this)),ge(this,"startSafetyTimer",(a,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},a)}),ge(this,"clearSafetyTimer",a=>{T.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${a}`),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((a,n)=>{this.on("loaded",a),this.on("error",n)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!T.empty(e.publisherId)||T.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return T.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${wy({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 Ey(t=0,e=0,a=255){return Math.min(Math.max(t,e),a)}const wj=t=>{const e=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach(a=>{const n={};a.split(/\r\n|\n|\r/).forEach(i=>{if(T.number(n.startTime)){if(!T.empty(i.trim())&&T.empty(n.text)){const o=i.trim().split("#xywh=");[n.text]=o,o[1]&&([n.x,n.y,n.w,n.h]=o[1].split(","))}}else{const o=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})/);o&&(n.startTime=60*Number(o[1]||0)*60+60*Number(o[2])+Number(o[3])+ +`0.${o[4]}`,n.endTime=60*Number(o[6]||0)*60+60*Number(o[7])+Number(o[8])+ +`0.${o[9]}`)}}),n.text&&e.push(n)}),e},Cy=(t,e)=>{const a={};return t>e.width/e.height?(a.width=e.width,a.height=1/t*e.width):(a.height=e.height,a.width=t*e.height),a};class Au{constructor(e){ge(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)})}),ge(this,"getThumbnails",()=>new Promise(a=>{const{src:n}=this.player.config.previewThumbnails;if(T.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((o,r)=>o.height-r.height),this.player.debug.log("Preview thumbnails",this.thumbnails),a()};if(T.function(n))n(o=>{this.thumbnails=o,i()});else{const o=(T.string(n)?[n]:n).map(r=>this.getThumbnail(r));Promise.all(o).then(i)}})),ge(this,"getThumbnail",a=>new Promise(n=>{Ti(a).then(i=>{const o={frames:wj(i),height:null,urlPrefix:""};o.frames[0].text.startsWith("/")||o.frames[0].text.startsWith("http://")||o.frames[0].text.startsWith("https://")||(o.urlPrefix=a.substring(0,a.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{o.height=r.naturalHeight,o.width=r.naturalWidth,this.thumbnails.push(o),n()},r.src=o.urlPrefix+o.frames[0].text})})),ge(this,"startMove",a=>{if(this.loaded&&T.event(a)&&["touchmove","mousemove"].includes(a.type)&&this.player.media.duration){if(a.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const o=this.player.elements.progress.getBoundingClientRect(),r=100/o.width*(a.pageX-o.left);this.seekTime=this.player.media.duration*(r/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=a.pageX,this.elements.thumb.time.innerText=Mr(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()}}),ge(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),ge(this,"startScrubbing",a=>{(T.nullOrUndefined(a.button)||a.button===!1||a.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),ge(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):_u.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),ge(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})}),ge(this,"render",()=>{this.elements.thumb.container=xe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=xe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const a=xe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=xe("span",{},"00:00"),a.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(a),T.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=xe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),ge(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),ge(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const a=this.thumbnails[0].frames.findIndex(o=>this.seekTime>=o.startTime&&this.seekTime<=o.endTime),n=a>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((o,r)=>{this.loadedImages.includes(o.frames[a].text)&&(i=r)}),a!==this.showingThumb&&(this.showingThumb=a,this.loadImage(i)))}),ge(this,"loadImage",(a=0)=>{const n=this.showingThumb,i=this.thumbnails[a],{urlPrefix:o}=i,r=i.frames[n],l=i.frames[n].text,d=o+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,r,a,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,r,a,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),ge(this,"showImage",(a,n,i,o,r,l=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${o}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(a,n),l&&(this.currentImageContainer.appendChild(a),this.currentImageElement=a,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(o,!0).then(this.preloadNearby(o,!1)).then(this.getHigherQuality(i,a,n,r))}),ge(this,"removeOldImages",a=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==a.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:o}=this;setTimeout(()=>{o.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),ge(this,"preloadNearby",(a,n=!0)=>new Promise(i=>{setTimeout(()=>{const o=this.thumbnails[0].frames[a].text;if(this.showingThumbFilename===o){let r;r=n?this.thumbnails[0].frames.slice(a):this.thumbnails[0].frames.slice(0,a).reverse();let l=!1;r.forEach(d=>{const c=d.text;if(c!==o&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:u}=this.thumbnails[0],h=u+c,f=new Image;f.src=h,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),ge(this,"getHigherQuality",(a,n,i,o)=>{if(a<this.thumbnails.length-1){let r=n.naturalHeight;this.usingSprites&&(r=i.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===o&&(this.player.debug.log(`Showing higher quality thumb for: ${o}`),this.loadImage(a+1))},300)}}),ge(this,"toggleThumbContainer",(a=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,a),!a&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),ge(this,"toggleScrubbingContainer",(a=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,a),a||(this.showingThumb=null,this.showingThumbFilename=null)}),ge(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),ge(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:a}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(a.clientHeight>20&&a.clientWidth<20){const n=Math.floor(a.clientHeight*this.thumbAspectRatio);a.style.width=`${n}px`}else if(a.clientHeight<20&&a.clientWidth>20){const n=Math.floor(a.clientWidth/this.thumbAspectRatio);a.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);a.style.height=`${this.thumbContainerHeight}px`,a.style.width=`${n}px`}this.setThumbContainerPos()}),ge(this,"setThumbContainerPos",()=>{const a=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,o=n.left-a.left+10,r=n.right-a.left-i.clientWidth-10,l=this.mousePosX-a.left-i.clientWidth/2,d=Ey(l,o,r);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),ge(this,"setScrubbingContainerSize",()=>{const{width:a,height:n}=Cy(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${a}px`,this.elements.scrubbing.container.style.height=`${n}px`}),ge(this,"setImageSizeAndOffset",(a,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;a.style.height=a.naturalHeight*i+"px",a.style.width=a.naturalWidth*i+"px",a.style.left=`-${n.x*i}px`,a.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}=Cy(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 Ru={insertElements(t,e){T.string(e)?ly(t,this.media,{src:e}):T.array(e)&&e.forEach(a=>{ly(t,this.media,a)})},change(t){oy(t,"sources.length")?(kn.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],un(this.media),this.media=null,T.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:a}=t,[{provider:n=_n.html5,src:i}]=e,o=n==="html5"?a:"div",r=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:a,supported:gt.check(a,n,this.config.playsinline),media:xe(o,r)}),this.elements.container.appendChild(this.media),T.boolean(t.autoplay)&&(this.config.autoplay=t.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),T.empty(t.poster)||(this.poster=t.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),et.addStyleHook.call(this),this.isHTML5&&Ru.insertElements.call(this,"source",e),this.config.title=t.title,_y.setup.call(this),this.isHTML5&&Object.keys(t).includes("tracks")&&Ru.insertElements.call(this,"track",t.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&et.build.call(this),this.isHTML5&&this.media.load(),T.empty(t.previewThumbnails)||(Object.assign(this.config.previewThumbnails,t.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Au(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Ns{constructor(e,a){if(ge(this,"play",()=>T.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Ya(this.media.play())),this.media.play()):null),ge(this,"pause",()=>this.playing&&T.function(this.media.pause)?this.media.pause():null),ge(this,"togglePlay",l=>(T.boolean(l)?l:!this.playing)?this.play():this.pause()),ge(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):T.function(this.media.stop)&&this.media.stop()}),ge(this,"restart",()=>{this.currentTime=0}),ge(this,"rewind",l=>{this.currentTime-=T.number(l)?l:this.config.seekTime}),ge(this,"forward",l=>{this.currentTime+=T.number(l)?l:this.config.seekTime}),ge(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(T.number(l)?l:0)}),ge(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),ge(this,"airplay",()=>{gt.airplay&&this.media.webkitShowPlaybackTargetPicker()}),ge(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Br(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,u=Je(this.elements.container,this.config.classNames.hideControls,c);if(u&&T.array(this.config.controls)&&this.config.controls.includes("settings")&&!T.empty(this.config.settings)&&fe.toggleMenu.call(this,!1),u!==d){const h=u?"controlshidden":"controlsshown";Le.call(this,this.media,h)}return!u}return!1}),ge(this,"on",(l,d)=>{Ke.call(this,this.elements.container,l,d)}),ge(this,"once",(l,d)=>{_u.call(this,this.elements.container,l,d)}),ge(this,"off",(l,d)=>{Pr(this.elements.container,l,d)}),ge(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(un(this.elements.buttons.play),un(this.elements.captions),un(this.elements.controls),un(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),T.function(l)&&l()):(Qz.call(this),kn.cancelRequests.call(this),Ir(this.elements.original,this.elements.container),Le.call(this,this.elements.original,"destroyed",!0),T.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?(et.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&T.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),ge(this,"supports",l=>gt.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=gt.touch,this.media=e,T.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||T.nodeList(this.media)||T.array(this.media))&&(this.media=this.media[0]),this.config=pt({},ky,Ns.defaults,a||{},(()=>{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 uj(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",gt),T.nullOrUndefined(this.media)||!T.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(!gt.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 o=null,r=null;switch(i){case"div":if(o=this.media.querySelector("iframe"),T.element(o)){if(r=Sy(o.getAttribute("src")),this.provider=dj(r.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",r.search.length){const l=["1","true"];l.includes(r.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(r.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(r.searchParams.get("playsinline")),this.config.youtube.hl=r.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(T.empty(this.provider)||!Object.values(_n).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Lu.video;break;case"video":case"audio":this.type=i,this.provider=_n.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=gt.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new hj(this),this.storage=new Ci(this),this.media.plyr=this,T.element(this.elements.container)||(this.elements.container=xe("div"),ry(this.media,this.elements.container)),et.migrateStyles.call(this),et.addStyleHook.call(this),_y.setup.call(this),this.config.debug&&Ke.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Ia(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&et.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Sj(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Ya(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Au(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===_n.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===_n.youtube}get isVimeo(){return this.provider===_n.vimeo}get isVideo(){return this.type===Lu.video}get isAudio(){return this.type===Lu.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 a=T.number(e)&&e>0;this.media.currentTime=a?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 T.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),a=(this.media||{}).duration,n=T.number(a)&&a!==1/0?a:0;return e||n}set volume(e){let a=e;T.string(a)&&(a=Number(a)),T.number(a)||(a=this.storage.get("volume")),T.number(a)||({volume:a}=this.config),a>1&&(a=1),a<0&&(a=0),this.config.volume=a,this.media.volume=a,!T.empty(e)&&this.muted&&a>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let a=e;T.boolean(a)||(a=this.storage.get("muted")),T.boolean(a)||(a=this.config.muted),this.config.muted=a,this.media.muted=a}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 a=null;T.number(e)&&(a=e),T.number(a)||(a=this.storage.get("speed")),T.number(a)||(a=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;a=Ey(a,n,i),this.config.speed.selected=a,setTimeout(()=>{this.media&&(this.media.playbackRate=a)},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 a=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!T.empty(e)&&Number(e),this.storage.get("quality"),a.selected,a.default].find(T.number),o=!0;if(!n.includes(i)){const r=dy(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${r} instead`),i=r,o=!1}a.selected=i,this.media.quality=i,o&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const a=T.boolean(e)?e:this.config.loop.active;this.config.loop.active=a,this.media.loop=a}get loop(){return!!this.media.loop}set source(e){Ru.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return T.url(e)?e:this.source}set download(e){T.url(e)&&(this.config.urls.download=e,fe.setDownloadUrl.call(this))}set poster(e){this.isVideo?et.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=Fr(Cu.call(this));return T.array(e)?e.join(":"):e}set ratio(e){this.isVideo?T.string(e)&&my(e)?(this.config.ratio=Fr(e),Ls.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=T.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){He.toggle.call(this,e,!1)}set currentTrack(e){He.set.call(this,e,!1),He.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:a}=this.captions;return e?a:-1}set language(e){He.setLanguage.call(this,e,!1)}get language(){return(He.getCurrentTrack.call(this)||{}).language}set pip(e){if(!gt.pip)return;const a=T.boolean(e)?e:!this.pip;T.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(a?xu.active:xu.inactive),T.function(this.media.requestPictureInPicture)&&(!this.pip&&a?this.media.requestPictureInPicture():this.pip&&!a&&document.exitPictureInPicture())}get pip(){return gt.pip?T.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===xu.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 Au(this))}static supported(e,a){return gt.check(e,a)}static loadSprite(e,a){return yy(e,a)}static setup(e,a={}){let n=null;return T.string(e)?n=Array.from(document.querySelectorAll(e)):T.nodeList(e)?n=Array.from(e):T.array(e)&&(n=e.filter(T.element)),T.empty(n)?null:n.map(i=>new Ns(i,a))}}Ns.defaults=Xz(ky);const kj={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},_j={class:"carousel-video-player__play-info-portrait__date"},Ej={class:"carousel-video-player__play-info-portrait__game"},Cj={key:2,class:"carousel-video-player__play-info__data"},Tj={class:"video-container"},xj=["id"],Lj=St({__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(t,{emit:e}){const a=t,n=s.ref(null),i=s.ref(!1),o=s.computed(()=>`p-${a.play.playId||a.play.play_id}`),r=s.computed(()=>{if(a.isPlaySeeker){const g=new Date(a.play.gameDate);return`${g.getDate()}, ${Xv(g.getMonth())} ${g.getFullYear()}`}const f=new Date(a.play.date_time_utc);return`${f.getDate()}, ${$2[f.getMonth()]} ${f.getFullYear()}`}),l=s.computed(()=>{if(a.isPlaySeeker){const f=a.play.finalScore.split(" ");return`${a.play.homeTeamName} ${f[0]} : ${f[2]} ${a.play.awayTeamName} | ${a.play.categoryName} ${a.play.playerShortName}`}return`${a.play.home_alt_name} ${a.play.score[0]} : ${a.play.score[1]} ${a.play.away_alt_name} | ${a.play.event_type_name} ${a.play.player_name}`}),d=s.computed(()=>{if(a.isPlaySeeker){const f=a.play.finalScore.split(" ");return`${a.play.homeTeamName} ${f[0]} : ${f[2]} ${a.play.awayTeamName}`}return`${a.play.home_alt_name} ${a.play.score[0]} : ${a.play.score[1]} ${a.play.away_alt_name}`}),c=s.computed(()=>a.isPlaySeeker?`${a.play.categoryName} ${a.play.playerShortName}`:`${a.play.event_type_name} ${a.play.player_name}`);function u(){n.value=new Ns(`#${o.value}`,{controls:a.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),a.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=a.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=a.play.endSeconds&&(n.value.pause(),n.value.currentTime=a.play.startSeconds,e("play-ended"))})),n.value.source={type:"video",sources:[{src:a.isPlaySeeker?a.play.videoUrl:a.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,a.play.videoPlayer=n.value,a.play.plyrInit=u,n.value.on("webkitfullscreenchange",h()),n.value.on("mozfullscreenchange",h()),n.value.on("fullscreenchange",h())}function h(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return s.onMounted(()=>{setTimeout(()=>{u()},100)}),(f,g)=>(s.openBlock(),s.createElementBlock("div",{class:"carousel-video-player",onMouseenter:g[0]||(g[0]=m=>i.value=!0),onMouseleave:g[1]||(g[1]=m=>i.value=!1)},[s.withDirectives(s.createElementVNode("div",{class:s.normalizeClass(["carousel-video-player__play-info",t.isPortrait&&t.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!t.isPortrait||!t.isMobileFull?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["carousel-video-player__play-info__date",t.isPortrait&&t.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},s.toDisplayString(r.value),3)):s.createCommentVNode("",!0),t.isPortrait&&t.isMobileFull?(s.openBlock(),s.createElementBlock("div",kj,[s.createElementVNode("div",_j,[s.createTextVNode(s.toDisplayString(r.value)+" - ",1),s.createElementVNode("div",Ej,s.toDisplayString(d.value),1)]),s.createTextVNode(" "+s.toDisplayString(c.value),1)])):(s.openBlock(),s.createElementBlock("div",Cj,s.toDisplayString(l.value),1))],2),[[s.vShow,i.value]]),s.createElementVNode("div",Tj,[s.createElementVNode("video",{id:o.value,controls:"",preload:"auto","data-setup":"{}"},null,8,xj)])],32))}},[["__scopeId","data-v-96776f5d"]]),Ou=t=>(s.pushScopeId("data-v-64d330ca"),t=t(),s.popScopeId(),t),Nj=[Ou(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[s.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),s.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],vj={class:"carousel-full-screen__carousel"},Vj={key:0,class:"icon-mobil-scrren"},Aj=[Ou(()=>s.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Ou(()=>s.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[s.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),s.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],Rj={class:"carousel-full-screen__carousel__video-player"},Iu=2,Oj=St({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const a=t;let n=0,i=new Map;const o=s.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=s.ref(null),l=s.ref([]);s.watch(()=>a.playerQueue,b=>{b.length&&(l.value=b.map((S,w)=>(S.index=w,{...S})),n=a.playlistIndex,i=new Map(l.value.map(S=>[S.index,S])))},{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 S=b.index-n;n=b.index;const w=i.get(n+S*-1),_=i.get(n);if(w&&w.videoPlayer&&(w.videoPlayer.pause(),w.videoPlayer.currentTime=0),_&&_.videoPlayer&&_.videoPlayer.play(),S>0){const C=i.get(n+Iu),N=i.get(n+1),E=i.get(n-Iu);C&&(l.value.find(L=>L.index===C.index)||l.value.push(C)),N&&N.videoPlayer&&N.videoPlayer.isDestroyed&&N.plyrInit(),E&&E.videoPlayer&&(E.videoPlayer.pause(),E.videoPlayer.src="",E.videoPlayer.destroy(),E.videoPlayer.isDestroyed=!0)}else if(S<0){const C=i.get(n-1),N=i.get(n+Iu);C&&C.videoPlayer&&C.videoPlayer.isDestroyed&&C.plyrInit(),N&&N.videoPlayer&&(N.videoPlayer.pause(),N.videoPlayer.src="",N.videoPlayer.destroy(),N.videoPlayer.isDestroyed=!0)}}}function h(){r.value&&r.value.next()}function f(){e("close",n)}const g=s.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),m=s.computed(()=>g.portrait);function p(){var b=window.matchMedia("(orientation: portrait)");b.matches?g.portrait=!0:g.portrait=!1}function y(){window.screen.orientation.angle!=90?g.portrait=!0:g.portrait=!1}return s.onMounted(()=>{c()?(window.addEventListener("resize",p),p()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((S,w)=>{S.id=`plyrFS${w+1}`})},100)}),s.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",p):window.removeEventListener("orientationchange",y),a.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,S)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["carousel-full-screen",c()&&!m.value?"paddingIos":""]),id:"carousel-swipe"},[s.createElementVNode("div",{class:"carousel-full-screen__close",style:s.normalizeStyle(c()&&m.value?"padding-top:30px":""),onClick:f},Nj,4),s.createElementVNode("div",vj,[m.value&&d()?(s.openBlock(),s.createElementBlock("div",Vj,Aj)):s.createCommentVNode("",!0),s.createVNode(s.unref(gz),s.mergeProps({ref_key:"gscCarousel",ref:r},o.value,{items:l.value,onInput:u}),{default:s.withCtx(({item:w})=>[s.createElementVNode("div",Rj,[s.createVNode(Lj,{play:w,"is-portrait":m.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":t.isPlaySeeker,onPlayEnded:h},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-64d330ca"]]),Ij=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"}]]),Bj=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"}]]),Ty={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},xy={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Ly={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Ny=new Map([[1,Ij],[2,Bj]]),Pj=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},Bu={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(t){this.status=t}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(t){this.$emit("click",t),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},vy=()=>{s.useCssVars(t=>({"9d01acb4":t.height,"14e95081":t.borderWidthBtn,"38fec285":t.borderType,34353510:t.borderColor,"20d20dc6":t.borderRadius,17130967:t.width,"4ccb7d36":t.backgroundColor,"5d1e86a2":t.cursorType,ce65d4a2:t.fontSize,fe4ac47a:t.fontStyle,f98e44dc:t.fontFamily,"93b87770":t.marginLeftStat,c7f7beba:t.fontSizeStat}))},Vy=Bu.setup;Bu.setup=Vy?(t,e)=>(vy(),Vy(t,e)):vy;const Fj=t=>(s.pushScopeId("data-v-f3ee6b2b"),t=t(),s.popScopeId(),t),Mj=["src"],Dj={key:1,class:"text"},Uj=["src"],zj={class:"stats"},jj=Fj(()=>s.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),qj={class:"numstats"},$j={class:"leyend"};function Gj(t,e,a,n,i,o){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([o.customStyle,i.status&&a.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,Mj)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",Dj,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,Uj)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[s.createElementVNode("div",zj,[jj,s.createElementVNode("div",qj,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",$j,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const Kj=Pj(Bu,[["render",Gj],["__scopeId","data-v-f3ee6b2b"]]),Wj={class:"gsc-dropdown__main-container__item-selected"},Hj=["height","width"],Xj=["stroke"],Jj={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zj=["fill"],Yj={class:"gsc-dropdown__items-container"},Qj=["onClick"],eq={key:0,class:"gsc-dropdown__items-footer"},tq={__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(t){return["solid","dotted","dashed"].includes(t)}},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:t=>["propName","value"].every(e=>e in t)},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},iconType:{type:Number,default:1,validator:function(t){return[1,2].includes(t)}}},emits:["input","click-ready","update:modelValue"],setup(t,{emit:e}){const a=t,n=s.ref({}),i=s.ref(null),o=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(g,m)=>{if(!a.modelValue&&(!a.onlyFirstTime||!m||!m.length)&&g&&g.length){if(a.defaultItemByProp){const p=a.items.findIndex(y=>y[a.defaultItemByProp.propName]===a.defaultItemByProp.value);p!==-1?(o.value=p,n.value=g[p]):(o.value=0,n.value=g[0])}else n.value=g[a.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),s.watch(()=>a.modelValue,g=>{if(g){const m=a.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);m!==-1&&(o.value=m,n.value=a.items[m],e("update:modelValue",n.value))}},{immediate:!0});const l=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),d=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function u(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function h(g,m){a.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),n.value=g,e("input",n.value),e("update:modelValue",n.value)}function f(){r.value=!1,e("click-ready")}return s.onMounted(()=>{document.addEventListener("click",u)}),s.onBeforeMount(()=>{document.removeEventListener("click",u)}),(g,m)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:s.normalizeStyle(l.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${t.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",Wj,[s.renderSlot(g.$slots,"default",{selectedItem:n.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(d.value)},[t.iconType===1?(s.openBlock(),s.createElementBlock("svg",{key:0,height:t.arrowHeight,width:t.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.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:t.arrowColor},null,8,Xj)],8,Hj)):(s.openBlock(),s.createElementBlock("svg",Jj,[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:t.arrowColor},null,8,Zj)]))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",Yj,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(p,y)=>(s.openBlock(),s.createElementBlock("div",null,[s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>h(p,y)},[s.renderSlot(g.$slots,"availableItem",{item:p})],10,Qj)),[[s.vShow,!p.isHidden]])]))),256))],4),t.isFooterVisible?(s.openBlock(),s.createElementBlock("div",eq,[s.createVNode(s.unref(Kj),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},aq=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},nq={class:"tournament-select__selected-tournament"},sq={class:"tournament-select__selected-tournament__logo"},iq=["src"],oq={class:"tournament-select__selected-tournament__name"},rq="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",lq={__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(t){return["solid","dotted","dashed"].includes(t)}},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:t=>["propName","value"].every(e=>e in t)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set},isClubesActive:{type:Boolean,default:!0},routeName:{type:String,default:""},avoidTournamentFilter:{type:Boolean,default:!1},areFemaleVisible:{type:Boolean,default:!0}},emits:["input","change-tournaments"],setup(t,{emit:e}){const a=t,n=new Set(["tops","table","dataia"]),i=s.ref([]),o=s.computed(()=>{const p={};return a.fontFamily&&(p["font-family"]=`${a.fontFamily}`),p}),r=s.computed(()=>i.value.filter(p=>!p.isHidden)),l=s.computed(()=>r.value.find(p=>p.seasonsIds.has(a.currentSeasonId))||r.value[0]),d=s.computed(()=>a.areFemaleVisible?i.value:i.value.filter(p=>!p.is_female));s.watch(()=>a.isClubesActive,()=>{c()},{immediate:!0}),s.watch(()=>a.routeName,()=>{console.log("watcher, routeName",a.routeName),c()},{immediate:!0});function c(){i.value.forEach(p=>{p.isHidden=!a.isClubesActive&&p.isClub||a.isClubesActive&&!p.isClub||a.routeName&&p.tournament_type===4&&n.has(a.routeName)})}async function u(){try{if(a.items&&a.items.length)i.value=[...a.items];else{const p=await f();e("change-tournaments",p),i.value=p.sort((y,b)=>y.tournament.order-b.tournament.order).reduce((y,b)=>{if(a.tournamentsIdsToInclude&&a.tournamentsIdsToInclude.size&&!a.tournamentsIdsToInclude.has(b.id))return y;const S={...b.tournament,seasons:b.seasons,seasonsIds:b.seasons.reduce((w,_)=>(w.add(_.id),w),new Set),isClub:b.tournament.international_tournament===0,isFriendlies:b.tournament.tournament_type===3};return S.isHidden=!a.avoidTournamentFilter&&(!a.isClubesActive&&S.isClub||a.isClubesActive&&!S.isClub),y.push(S),y},[])}}catch(p){throw new Error(p)}}function h(p){const y=new XMLHttpRequest,b=`${a.logosUrl}${p}.${a.logoFileType}`;return y.open("HEAD",b,!1),y.send(),y.status!==404}async function f(){try{return(await fetch(a.apiUrl||rq)).json()}catch(p){return Promise.reject(p)}}function g(p){e("input",p)}function m(p){e("input",p)}return s.onMounted(()=>{u()}),(p,y)=>(s.openBlock(),s.createElementBlock("div",{class:"tournament-select",style:s.normalizeStyle(o.value)},[s.createVNode(s.unref(tq),s.mergeProps(a,{"model-value":l.value,items:d.value,onInput:g,"onUpdate:modelValue":m}),{default:s.withCtx(({selectedItem:b})=>[s.createElementVNode("div",nq,[s.createElementVNode("div",sq,[h(b.id)?(s.openBlock(),s.createElementBlock("img",{key:0,src:`${a.logosUrl}${b.id}.${a.logoFileType}`,alt:""},null,8,iq)):s.createCommentVNode("",!0)]),s.createElementVNode("div",oq,s.toDisplayString(b.name),1)])]),availableItem:s.withCtx(({item:b})=>[s.createElementVNode("div",null,s.toDisplayString(b.name),1)]),_:1},16,["model-value","items"])],4))}},cq=aq(lq,[["__scopeId","data-v-84af8f29"]]),dq=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},Pu={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(t){this.status=t}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(t){this.$emit("click",t),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Ay=()=>{s.useCssVars(t=>({"9d01acb4":t.height,"14e95081":t.borderWidthBtn,"38fec285":t.borderType,34353510:t.borderColor,"20d20dc6":t.borderRadius,17130967:t.width,"4ccb7d36":t.backgroundColor,"5d1e86a2":t.cursorType,ce65d4a2:t.fontSize,fe4ac47a:t.fontStyle,f98e44dc:t.fontFamily,"93b87770":t.marginLeftStat,c7f7beba:t.fontSizeStat}))},Ry=Pu.setup;Pu.setup=Ry?(t,e)=>(Ay(),Ry(t,e)):Ay;const uq=t=>(s.pushScopeId("data-v-f3ee6b2b"),t=t(),s.popScopeId(),t),hq=["src"],mq={key:1,class:"text"},fq=["src"],pq={class:"stats"},gq=uq(()=>s.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),yq={class:"numstats"},bq={class:"leyend"};function Sq(t,e,a,n,i,o){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([o.customStyle,i.status&&a.typeOnOff&&o.customActive]),onClick:e[0]||(e[0]=(...r)=>o.btnClick&&o.btnClick(...r))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,hq)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",mq,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,fq)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...r)=>o.btnClick&&o.btnClick(...r))},[s.createElementVNode("div",pq,[gq,s.createElementVNode("div",yq,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",bq,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const wq=dq(Pu,[["render",Sq],["__scopeId","data-v-f3ee6b2b"]]),kq={class:"gsc-dropdown__main-container__item-selected"},_q=["height","width"],Eq=["stroke"],Cq={class:"gsc-dropdown__items-container"},Tq=["onClick"],xq={key:0,class:"gsc-dropdown__items-footer"},Lq={__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(t){return["solid","dotted","dashed"].includes(t)}},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:t=>["propName","value"].every(e=>e in t)},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(t,{emit:e}){const a=t,n=s.ref({}),i=s.ref(null),o=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(g,m)=>{if(!a.modelValue&&(!a.onlyFirstTime||!m||!m.length)&&g&&g.length){if(a.defaultItemByProp){const p=a.items.findIndex(y=>y[a.defaultItemByProp.propName]===a.defaultItemByProp.value);p!==-1?(o.value=p,n.value=g[p]):(o.value=0,n.value=g[0])}else n.value=g[a.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),s.watch(()=>a.modelValue,g=>{if(g){const m=a.items.findIndex(p=>typeof g=="object"?JSON.stringify(p)===JSON.stringify(g):p===g);m!==-1&&(o.value=m,n.value=a.items[m],e("update:modelValue",n.value))}},{immediate:!0});const l=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-container-padding":a.listContainerPadding,"--list-item-padding":a.listItemPadding,"--list-item-margin":a.listItemMargin,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-border-radius":a.listItemBorderRadius,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--list-margin-top":a.listMarginTop,"--list-left":a.listAlignment==="left"?"0":"auto","--list-right":a.listAlignment==="right"?"0":"auto","--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),d=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function u(g){i.value&&!i.value.contains(g.target)&&(r.value=!1)}function h(g,m){a.isMultipleOption?o.value=-1:(o.value=m,r.value=!1),n.value=g,e("input",n.value),e("update:modelValue",n.value)}function f(){r.value=!1,e("click-ready")}return s.onMounted(()=>{document.addEventListener("click",u)}),s.onBeforeMount(()=>{document.removeEventListener("click",u)}),(g,m)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:s.normalizeStyle(l.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${t.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",kq,[s.renderSlot(g.$slots,"default",{selectedItem:n.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(d.value)},[(s.openBlock(),s.createElementBlock("svg",{height:t.arrowHeight,width:t.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.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:t.arrowColor},null,8,Eq)],8,_q))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",Cq,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(p,y)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:y===o.value}]),key:y,onClick:b=>h(p,y)},[s.renderSlot(g.$slots,"availableItem",{item:p})],10,Tq))),128))],4),t.isFooterVisible?(s.openBlock(),s.createElementBlock("div",xq,[s.createVNode(s.unref(wq),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},Nq=(t,e)=>{const a=t.__vccOpts||t;for(const[n,i]of e)a[n]=i;return a},vq={class:"season-name"},Vq={class:"items-list-season"},Aq={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(t,{emit:e}){const a=t,n=s.computed(()=>a.seasons.find(r=>r.id===a.currentSeasonId));function i(r){e("input",r)}function o(r){e("input",r)}return(r,l)=>(s.openBlock(),s.createBlock(s.unref(Lq),{items:t.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:o,"onUpdate:modelValue":i},{default:s.withCtx(({selectedItem:d})=>[s.createElementVNode("div",vq,[s.createElementVNode("span",null,s.toDisplayString(d.name),1)])]),availableItem:s.withCtx(({item:d})=>[s.createElementVNode("span",Vq,s.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},Rq=Nq(Aq,[["__scopeId","data-v-d23e9ee2"]]);function Oy(t,e){return function(){return t.apply(e,arguments)}}const{toString:Oq}=Object.prototype,{getPrototypeOf:Fu}=Object,zr=(t=>e=>{const a=Oq.call(e);return t[a]||(t[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),Ba=t=>(t=t.toLowerCase(),e=>zr(e)===t),jr=t=>e=>typeof e===t,{isArray:vs}=Array,Ni=jr("undefined");function Iq(t){return t!==null&&!Ni(t)&&t.constructor!==null&&!Ni(t.constructor)&&fa(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Iy=Ba("ArrayBuffer");function Bq(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Iy(t.buffer),e}const Pq=jr("string"),fa=jr("function"),By=jr("number"),qr=t=>t!==null&&typeof t=="object",Fq=t=>t===!0||t===!1,$r=t=>{if(zr(t)!=="object")return!1;const e=Fu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Mq=Ba("Date"),Dq=Ba("File"),Uq=Ba("Blob"),zq=Ba("FileList"),jq=t=>qr(t)&&fa(t.pipe),qq=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||fa(t.append)&&((e=zr(t))==="formdata"||e==="object"&&fa(t.toString)&&t.toString()==="[object FormData]"))},$q=Ba("URLSearchParams"),[Gq,Kq,Wq,Hq]=["ReadableStream","Request","Response","Headers"].map(Ba),Xq=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vi(t,e,{allOwnKeys:a=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),vs(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const o=a?Object.getOwnPropertyNames(t):Object.keys(t),r=o.length;let l;for(n=0;n<r;n++)l=o[n],e.call(null,t[l],l,t)}}function Py(t,e){e=e.toLowerCase();const a=Object.keys(t);let n=a.length,i;for(;n-- >0;)if(i=a[n],e===i.toLowerCase())return i;return null}const ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fy=t=>!Ni(t)&&t!==ts;function Mu(){const{caseless:t}=Fy(this)&&this||{},e={},a=(n,i)=>{const o=t&&Py(e,i)||i;$r(e[o])&&$r(n)?e[o]=Mu(e[o],n):$r(n)?e[o]=Mu({},n):vs(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&vi(arguments[n],a);return e}const Jq=(t,e,a,{allOwnKeys:n}={})=>(vi(e,(i,o)=>{a&&fa(i)?t[o]=Oy(i,a):t[o]=i},{allOwnKeys:n}),t),Zq=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yq=(t,e,a,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),a&&Object.assign(t.prototype,a)},Qq=(t,e,a,n)=>{let i,o,r;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)r=i[o],(!n||n(r,t,e))&&!l[r]&&(e[r]=t[r],l[r]=!0);t=a!==!1&&Fu(t)}while(t&&(!a||a(t,e))&&t!==Object.prototype);return e},e$=(t,e,a)=>{t=String(t),(a===void 0||a>t.length)&&(a=t.length),a-=e.length;const n=t.indexOf(e,a);return n!==-1&&n===a},t$=t=>{if(!t)return null;if(vs(t))return t;let e=t.length;if(!By(e))return null;const a=new Array(e);for(;e-- >0;)a[e]=t[e];return a},a$=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Fu(Uint8Array)),n$=(t,e)=>{const a=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=a.next())&&!n.done;){const i=n.value;e.call(t,i[0],i[1])}},s$=(t,e)=>{let a;const n=[];for(;(a=t.exec(e))!==null;)n.push(a);return n},i$=Ba("HTMLFormElement"),o$=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,a,n){return a.toUpperCase()+n}),My=(({hasOwnProperty:t})=>(e,a)=>t.call(e,a))(Object.prototype),r$=Ba("RegExp"),Dy=(t,e)=>{const a=Object.getOwnPropertyDescriptors(t),n={};vi(a,(i,o)=>{let r;(r=e(i,o,t))!==!1&&(n[o]=r||i)}),Object.defineProperties(t,n)},l$=t=>{Dy(t,(e,a)=>{if(fa(t)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const n=t[a];if(fa(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},c$=(t,e)=>{const a={},n=i=>{i.forEach(o=>{a[o]=!0})};return vs(t)?n(t):n(String(t).split(e)),a},d$=()=>{},u$=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Du="abcdefghijklmnopqrstuvwxyz",Uy="0123456789",zy={DIGIT:Uy,ALPHA:Du,ALPHA_DIGIT:Du+Du.toUpperCase()+Uy},h$=(t=16,e=zy.ALPHA_DIGIT)=>{let a="";const{length:n}=e;for(;t--;)a+=e[Math.random()*n|0];return a};function m$(t){return!!(t&&fa(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const f$=t=>{const e=new Array(10),a=(n,i)=>{if(qr(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const o=vs(n)?[]:{};return vi(n,(r,l)=>{const d=a(r,i+1);!Ni(d)&&(o[l]=d)}),e[i]=void 0,o}}return n};return a(t,0)},p$=Ba("AsyncFunction"),g$=t=>t&&(qr(t)||fa(t))&&fa(t.then)&&fa(t.catch),jy=((t,e)=>t?setImmediate:e?((a,n)=>(ts.addEventListener("message",({source:i,data:o})=>{i===ts&&o===a&&n.length&&n.shift()()},!1),i=>{n.push(i),ts.postMessage(a,"*")}))(`axios@${Math.random()}`,[]):a=>setTimeout(a))(typeof setImmediate=="function",fa(ts.postMessage)),y$=typeof queueMicrotask<"u"?queueMicrotask.bind(ts):typeof process<"u"&&process.nextTick||jy,W={isArray:vs,isArrayBuffer:Iy,isBuffer:Iq,isFormData:qq,isArrayBufferView:Bq,isString:Pq,isNumber:By,isBoolean:Fq,isObject:qr,isPlainObject:$r,isReadableStream:Gq,isRequest:Kq,isResponse:Wq,isHeaders:Hq,isUndefined:Ni,isDate:Mq,isFile:Dq,isBlob:Uq,isRegExp:r$,isFunction:fa,isStream:jq,isURLSearchParams:$q,isTypedArray:a$,isFileList:zq,forEach:vi,merge:Mu,extend:Jq,trim:Xq,stripBOM:Zq,inherits:Yq,toFlatObject:Qq,kindOf:zr,kindOfTest:Ba,endsWith:e$,toArray:t$,forEachEntry:n$,matchAll:s$,isHTMLForm:i$,hasOwnProperty:My,hasOwnProp:My,reduceDescriptors:Dy,freezeMethods:l$,toObjectSet:c$,toCamelCase:o$,noop:d$,toFiniteNumber:u$,findKey:Py,global:ts,isContextDefined:Fy,ALPHABET:zy,generateString:h$,isSpecCompliantForm:m$,toJSONObject:f$,isAsyncFn:p$,isThenable:g$,setImmediate:jy,asap:y$};function Fe(t,e,a,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),a&&(this.config=a),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}W.inherits(Fe,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:W.toJSONObject(this.config),code:this.code,status:this.status}}});const qy=Fe.prototype,$y={};["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(t=>{$y[t]={value:t}}),Object.defineProperties(Fe,$y),Object.defineProperty(qy,"isAxiosError",{value:!0}),Fe.from=(t,e,a,n,i,o)=>{const r=Object.create(qy);return W.toFlatObject(t,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),Fe.call(r,t.message,e,a,n,i),r.cause=t,r.name=t.name,o&&Object.assign(r,o),r};const b$=null;function Uu(t){return W.isPlainObject(t)||W.isArray(t)}function Gy(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function Ky(t,e,a){return t?t.concat(e).map(function(n,i){return n=Gy(n),!a&&i?"["+n+"]":n}).join(a?".":""):e}function S$(t){return W.isArray(t)&&!t.some(Uu)}const w$=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Gr(t,e,a){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,a=W.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!W.isUndefined(m[g])});const n=a.metaTokens,i=a.visitor||c,o=a.dots,r=a.indexes,l=(a.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(i))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(W.isDate(g))return g.toISOString();if(!l&&W.isBlob(g))throw new Fe("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(g)||W.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,p){let y=g;if(g&&!p&&typeof g=="object"){if(W.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(W.isArray(g)&&S$(g)||(W.isFileList(g)||W.endsWith(m,"[]"))&&(y=W.toArray(g)))return m=Gy(m),y.forEach(function(b,S){!(W.isUndefined(b)||b===null)&&e.append(r===!0?Ky([m],S,o):r===null?m:m+"[]",d(b))}),!1}return Uu(g)?!0:(e.append(Ky(p,m,o),d(g)),!1)}const u=[],h=Object.assign(w$,{defaultVisitor:c,convertValue:d,isVisitable:Uu});function f(g,m){if(!W.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(g),W.forEach(g,function(p,y){(!(W.isUndefined(p)||p===null)&&i.call(e,p,W.isString(y)?y.trim():y,m,h))===!0&&f(p,m?m.concat(y):[y])}),u.pop()}}if(!W.isObject(t))throw new TypeError("data must be an object");return f(t),e}function Wy(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(a){return e[a]})}function zu(t,e){this._pairs=[],t&&Gr(t,this,e)}const Hy=zu.prototype;Hy.append=function(t,e){this._pairs.push([t,e])},Hy.toString=function(t){const e=t?function(a){return t.call(this,a,Wy)}:Wy;return this._pairs.map(function(a){return e(a[0])+"="+e(a[1])},"").join("&")};function k$(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xy(t,e,a){if(!e)return t;const n=a&&a.encode||k$;W.isFunction(a)&&(a={serialize:a});const i=a&&a.serialize;let o;if(i?o=i(e,a):o=W.isURLSearchParams(e)?e.toString():new zu(e,a).toString(n),o){const r=t.indexOf("#");r!==-1&&(t=t.slice(0,r)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class _${constructor(){this.handlers=[]}use(e,a,n){return this.handlers.push({fulfilled:e,rejected:a,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){W.forEach(this.handlers,function(a){a!==null&&e(a)})}}const Jy=_$,Zy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},E$=typeof URLSearchParams<"u"?URLSearchParams:zu,C$=typeof FormData<"u"?FormData:null,T$=typeof Blob<"u"?Blob:null,x$={isBrowser:!0,classes:{URLSearchParams:E$,FormData:C$,Blob:T$},protocols:["http","https","file","blob","url","data"]},ju=typeof window<"u"&&typeof document<"u",qu=typeof navigator=="object"&&navigator||void 0,L$=ju&&(!qu||["ReactNative","NativeScript","NS"].indexOf(qu.product)<0),N$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",v$=ju&&window.location.href||"http://localhost",V$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ju,hasStandardBrowserEnv:L$,hasStandardBrowserWebWorkerEnv:N$,navigator:qu,origin:v$},Symbol.toStringTag,{value:"Module"})),Ht={...V$,...x$};function A$(t,e){return Gr(t,new Ht.classes.URLSearchParams,Object.assign({visitor:function(a,n,i,o){return Ht.isNode&&W.isBuffer(a)?(this.append(n,a.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function R$(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function O$(t){const e={},a=Object.keys(t);let n;const i=a.length;let o;for(n=0;n<i;n++)o=a[n],e[o]=t[o];return e}function Yy(t){function e(a,n,i,o){let r=a[o++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),d=o>=a.length;return r=!r&&W.isArray(i)?i.length:r,d?(W.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!l):((!i[r]||!W.isObject(i[r]))&&(i[r]=[]),e(a,n,i[r],o)&&W.isArray(i[r])&&(i[r]=O$(i[r])),!l)}if(W.isFormData(t)&&W.isFunction(t.entries)){const a={};return W.forEachEntry(t,(n,i)=>{e(R$(n),i,a,0)}),a}return null}function I$(t,e,a){if(W.isString(t))try{return(e||JSON.parse)(t),W.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(a||JSON.stringify)(t)}const $u={transitional:Zy,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const a=e.getContentType()||"",n=a.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return n?JSON.stringify(Yy(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return A$(t,this.formSerializer).toString();if((o=W.isFileList(t))||a.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Gr(o?{"files[]":t}:t,r&&new r,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),I$(t)):t}],transformResponse:[function(t){const e=this.transitional||$u.transitional,a=e&&e.forcedJSONParsing,n=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(a&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(o){if(i)throw o.name==="SyntaxError"?Fe.from(o,Fe.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],t=>{$u.headers[t]={}});const Gu=$u,B$=W.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"]),P$=t=>{const e={};let a,n,i;return t&&t.split(`
58
58
  `).forEach(function(o){i=o.indexOf(":"),a=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!a||e[a]&&B$[a])&&(a==="set-cookie"?e[a]?e[a].push(n):e[a]=[n]:e[a]=e[a]?e[a]+", "+n:n)}),e},Qy=Symbol("internals");function Vi(t){return t&&String(t).trim().toLowerCase()}function Kr(t){return t===!1||t==null?t:W.isArray(t)?t.map(Kr):String(t)}function F$(t){const e=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=a.exec(t);)e[n[1]]=n[2];return e}const M$=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ku(t,e,a,n,i){if(W.isFunction(n))return n.call(this,e,a);if(i&&(e=a),!!W.isString(e)){if(W.isString(n))return e.indexOf(n)!==-1;if(W.isRegExp(n))return n.test(e)}}function D$(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,n)=>a.toUpperCase()+n)}function U$(t,e){const a=W.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+a,{value:function(i,o,r){return this[n].call(this,e,i,o,r)},configurable:!0})})}let Wr=class{constructor(e){e&&this.set(e)}set(e,a,n){const i=this;function o(l,d,c){const u=Vi(d);if(!u)throw new Error("header name must be a non-empty string");const h=W.findKey(i,u);(!h||i[h]===void 0||c===!0||c===void 0&&i[h]!==!1)&&(i[h||d]=Kr(l))}const r=(l,d)=>W.forEach(l,(c,u)=>o(c,u,d));if(W.isPlainObject(e)||e instanceof this.constructor)r(e,a);else if(W.isString(e)&&(e=e.trim())&&!M$(e))r(P$(e),a);else if(W.isHeaders(e))for(const[l,d]of e.entries())o(d,l,n);else e!=null&&o(a,e,n);return this}get(e,a){if(e=Vi(e),e){const n=W.findKey(this,e);if(n){const i=this[n];if(!a)return i;if(a===!0)return F$(i);if(W.isFunction(a))return a.call(this,i,n);if(W.isRegExp(a))return a.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=Vi(e),e){const n=W.findKey(this,e);return!!(n&&this[n]!==void 0&&(!a||Ku(this,this[n],n,a)))}return!1}delete(e,a){const n=this;let i=!1;function o(r){if(r=Vi(r),r){const l=W.findKey(n,r);l&&(!a||Ku(n,n[l],l,a))&&(delete n[l],i=!0)}}return W.isArray(e)?e.forEach(o):o(e),i}clear(e){const a=Object.keys(this);let n=a.length,i=!1;for(;n--;){const o=a[n];(!e||Ku(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const a=this,n={};return W.forEach(this,(i,o)=>{const r=W.findKey(n,o);if(r){a[r]=Kr(i),delete a[o];return}const l=e?D$(o):String(o).trim();l!==o&&delete a[o],a[l]=Kr(i),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const a=Object.create(null);return W.forEach(this,(n,i)=>{n!=null&&n!==!1&&(a[i]=e&&W.isArray(n)?n.join(", "):n)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join(`
59
59
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...a){const n=new this(e);return a.forEach(i=>n.set(i)),n}static accessor(e){const a=(this[Qy]=this[Qy]={accessors:{}}).accessors,n=this.prototype;function i(o){const r=Vi(o);a[r]||(U$(n,o),a[r]=!0)}return W.isArray(e)?e.forEach(i):i(e),this}};Wr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(Wr.prototype,({value:t},e)=>{let a=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[a]=n}}}),W.freezeMethods(Wr);const Pa=Wr;function Wu(t,e){const a=this||Gu,n=e||a,i=Pa.from(n.headers);let o=n.data;return W.forEach(t,function(r){o=r.call(a,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function e3(t){return!!(t&&t.__CANCEL__)}function Vs(t,e,a){Fe.call(this,t??"canceled",Fe.ERR_CANCELED,e,a),this.name="CanceledError"}W.inherits(Vs,Fe,{__CANCEL__:!0});function t3(t,e,a){const n=a.config.validateStatus;!a.status||!n||n(a.status)?t(a):e(new Fe("Request failed with status code "+a.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function z$(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function j$(t,e){t=t||10;const a=new Array(t),n=new Array(t);let i=0,o=0,r;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),c=n[o];r||(r=d),a[i]=l,n[i]=d;let u=o,h=0;for(;u!==i;)h+=a[u++],u=u%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),d-r<e)return;const f=c&&d-c;return f?Math.round(h*1e3/f):void 0}}function q$(t,e){let a=0,n=1e3/e,i,o;const r=(l,d=Date.now())=>{a=d,i=null,o&&(clearTimeout(o),o=null),t.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-a;c>=n?r(l,d):(i=l,o||(o=setTimeout(()=>{o=null,r(i)},n-c)))},()=>i&&r(i)]}const Hr=(t,e,a=3)=>{let n=0;const i=j$(50,250);return q$(o=>{const r=o.loaded,l=o.lengthComputable?o.total:void 0,d=r-n,c=i(d),u=r<=l;n=r;const h={loaded:r,total:l,progress:l?r/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&u?(l-r)/c:void 0,event:o,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(h)},a)},a3=(t,e)=>{const a=t!=null;return[n=>e[0]({lengthComputable:a,total:t,loaded:n}),e[1]]},n3=t=>(...e)=>W.asap(()=>t(...e)),$$=Ht.hasStandardBrowserEnv?((t,e)=>a=>(a=new URL(a,Ht.origin),t.protocol===a.protocol&&t.host===a.host&&(e||t.port===a.port)))(new URL(Ht.origin),Ht.navigator&&/(msie|trident)/i.test(Ht.navigator.userAgent)):()=>!0,G$=Ht.hasStandardBrowserEnv?{write(t,e,a,n,i,o){const r=[t+"="+encodeURIComponent(e)];W.isNumber(a)&&r.push("expires="+new Date(a).toGMTString()),W.isString(n)&&r.push("path="+n),W.isString(i)&&r.push("domain="+i),o===!0&&r.push("secure"),document.cookie=r.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function K$(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function W$(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function s3(t,e){return t&&!K$(e)?W$(t,e):e}const i3=t=>t instanceof Pa?{...t}:t;function as(t,e){e=e||{};const a={};function n(c,u,h,f){return W.isPlainObject(c)&&W.isPlainObject(u)?W.merge.call({caseless:f},c,u):W.isPlainObject(u)?W.merge({},u):W.isArray(u)?u.slice():u}function i(c,u,h,f){if(W.isUndefined(u)){if(!W.isUndefined(c))return n(void 0,c,h,f)}else return n(c,u,h,f)}function o(c,u){if(!W.isUndefined(u))return n(void 0,u)}function r(c,u){if(W.isUndefined(u)){if(!W.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,h){if(h in e)return n(c,u);if(h in t)return n(void 0,c)}const d={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:l,headers:(c,u,h)=>i(i3(c),i3(u),h,!0)};return W.forEach(Object.keys(Object.assign({},t,e)),function(c){const u=d[c]||i,h=u(t[c],e[c],c);W.isUndefined(h)&&u!==l||(a[c]=h)}),a}const o3=t=>{const e=as({},t);let{data:a,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:r,auth:l}=e;e.headers=r=Pa.from(r),e.url=Xy(s3(e.baseURL,e.url),t.params,t.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(W.isFormData(a)){if(Ht.hasStandardBrowserEnv||Ht.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((d=r.getContentType())!==!1){const[c,...u]=d?d.split(";").map(h=>h.trim()).filter(Boolean):[];r.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ht.hasStandardBrowserEnv&&(n&&W.isFunction(n)&&(n=n(e)),n||n!==!1&&$$(e.url))){const c=i&&o&&G$.read(o);c&&r.set(i,c)}return e},H$=typeof XMLHttpRequest<"u",X$=H$&&function(t){return new Promise(function(e,a){const n=o3(t);let i=n.data;const o=Pa.from(n.headers).normalize();let{responseType:r,onUploadProgress:l,onDownloadProgress:d}=n,c,u,h,f,g;function m(){f&&f(),g&&g(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(n.method.toUpperCase(),n.url,!0),p.timeout=n.timeout;function y(){if(!p)return;const S=Pa.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),w={data:!r||r==="text"||r==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:t,request:p};t3(function(_){e(_),m()},function(_){a(_),m()},w),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){p&&(a(new Fe("Request aborted",Fe.ECONNABORTED,t,p)),p=null)},p.onerror=function(){a(new Fe("Network Error",Fe.ERR_NETWORK,t,p)),p=null},p.ontimeout=function(){let S=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const w=n.transitional||Zy;n.timeoutErrorMessage&&(S=n.timeoutErrorMessage),a(new Fe(S,w.clarifyTimeoutError?Fe.ETIMEDOUT:Fe.ECONNABORTED,t,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&W.forEach(o.toJSON(),function(S,w){p.setRequestHeader(w,S)}),W.isUndefined(n.withCredentials)||(p.withCredentials=!!n.withCredentials),r&&r!=="json"&&(p.responseType=n.responseType),d&&([h,g]=Hr(d,!0),p.addEventListener("progress",h)),l&&p.upload&&([u,f]=Hr(l),p.upload.addEventListener("progress",u),p.upload.addEventListener("loadend",f)),(n.cancelToken||n.signal)&&(c=S=>{p&&(a(!S||S.type?new Vs(null,t,p):S),p.abort(),p=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const b=z$(n.url);if(b&&Ht.protocols.indexOf(b)===-1){a(new Fe("Unsupported protocol "+b+":",Fe.ERR_BAD_REQUEST,t));return}p.send(i||null)})},J$=(t,e)=>{const{length:a}=t=t?t.filter(Boolean):[];if(e||a){let n=new AbortController,i;const o=function(c){if(!i){i=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Fe?u:new Vs(u instanceof Error?u.message:u))}};let r=e&&setTimeout(()=>{r=null,o(new Fe(`timeout ${e} of ms exceeded`,Fe.ETIMEDOUT))},e);const l=()=>{t&&(r&&clearTimeout(r),r=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:d}=n;return d.unsubscribe=()=>W.asap(l),d}},Z$=J$,Y$=function*(t,e){let a=t.byteLength;if(a<e){yield t;return}let n=0,i;for(;n<a;)i=n+e,yield t.slice(n,i),n=i},Q$=async function*(t,e){for await(const a of eG(t))yield*Y$(a,e)},eG=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:a,value:n}=await e.read();if(a)break;yield n}}finally{await e.cancel()}},r3=(t,e,a,n)=>{const i=Q$(t,e);let o=0,r,l=d=>{r||(r=!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 h=u.byteLength;if(a){let f=o+=h;a(f)}d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),i.return()}},{highWaterMark:2})},Xr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",l3=Xr&&typeof ReadableStream=="function",tG=Xr&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),c3=(t,...e)=>{try{return!!t(...e)}catch{return!1}},aG=l3&&c3(()=>{let t=!1;const e=new Request(Ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),d3=64*1024,Hu=l3&&c3(()=>W.isReadableStream(new Response("").body)),Jr={stream:Hu&&(t=>t.body)};Xr&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Jr[e]&&(Jr[e]=W.isFunction(t[e])?a=>a[e]():(a,n)=>{throw new Fe(`Response type '${e}' is not supported`,Fe.ERR_NOT_SUPPORT,n)})})})(new Response);const nG=async t=>{if(t==null)return 0;if(W.isBlob(t))return t.size;if(W.isSpecCompliantForm(t))return(await new Request(Ht.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(W.isArrayBufferView(t)||W.isArrayBuffer(t))return t.byteLength;if(W.isURLSearchParams(t)&&(t=t+""),W.isString(t))return(await tG(t)).byteLength},sG=async(t,e)=>W.toFiniteNumber(t.getContentLength())??nG(e),iG=Xr&&(async t=>{let{url:e,method:a,data:n,signal:i,cancelToken:o,timeout:r,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:f}=o3(t);c=c?(c+"").toLowerCase():"text";let g=Z$([i,o&&o.toAbortSignal()],r),m;const p=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(d&&aG&&a!=="get"&&a!=="head"&&(y=await sG(u,n))!==0){let C=new Request(e,{method:"POST",body:n,duplex:"half"}),N;if(W.isFormData(n)&&(N=C.headers.get("content-type"))&&u.setContentType(N),C.body){const[E,L]=a3(y,Hr(n3(d)));n=r3(C.body,d3,E,L)}}W.isString(h)||(h=h?"include":"omit");const b="credentials"in Request.prototype;m=new Request(e,{...f,signal:g,method:a.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:b?h:void 0});let S=await fetch(m);const w=Hu&&(c==="stream"||c==="response");if(Hu&&(l||w&&p)){const C={};["status","statusText","headers"].forEach(x=>{C[x]=S[x]});const N=W.toFiniteNumber(S.headers.get("content-length")),[E,L]=l&&a3(N,Hr(n3(l),!0))||[];S=new Response(r3(S.body,d3,E,()=>{L&&L(),p&&p()}),C)}c=c||"text";let _=await Jr[W.findKey(Jr,c)||"text"](S,t);return!w&&p&&p(),await new Promise((C,N)=>{t3(C,N,{data:_,headers:Pa.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:m})})}catch(b){throw p&&p(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Fe("Network Error",Fe.ERR_NETWORK,t,m),{cause:b.cause||b}):Fe.from(b,b&&b.code,t,m)}}),Xu={http:b$,xhr:X$,fetch:iG};W.forEach(Xu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const u3=t=>`- ${t}`,oG=t=>W.isFunction(t)||t===null||t===!1,h3={getAdapter:t=>{t=W.isArray(t)?t:[t];const{length:e}=t;let a,n;const i={};for(let o=0;o<e;o++){a=t[o];let r;if(n=a,!oG(a)&&(n=Xu[(r=String(a)).toLowerCase()],n===void 0))throw new Fe(`Unknown adapter '${r}'`);if(n)break;i[r||"#"+o]=n}if(!n){const o=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=e?o.length>1?`since :
60
60
  `+o.map(u3).join(`