@golstats/gsc-landing 1.0.64 → 1.0.65

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.
@@ -33,8 +33,8 @@
33
33
  * Vue 3 Carousel 0.3.1
34
34
  * (c) 2023
35
35
  * @license MIT
36
- */const Re={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"}},Xr={itemsToShow:{default:Re.itemsToShow,type:Number},itemsToScroll:{default:Re.itemsToScroll,type:Number},wrapAround:{default:Re.wrapAround,type:Boolean},throttle:{default:Re.throttle,type:Number},snapAlign:{default:Re.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Re.transition,type:Number},breakpoints:{default:Re.breakpoints,type:Object},autoplay:{default:Re.autoplay,type:Number},pauseAutoplayOnHover:{default:Re.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Re.mouseDrag,type:Boolean},touchDrag:{default:Re.touchDrag,type:Boolean},dir:{default:Re.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Re.i18n,type:Object},settings:{default(){return{}},type:Object}};function Dw({config:e,slidesCount:a}){const{snapAlign:t,wrapAround:n,itemsToShow:s=1}=e;if(n)return Math.max(a-1,0);let i;switch(t){case"start":i=a-s;break;case"end":i=a-1;break;case"center":case"center-odd":i=a-Math.ceil((s-.5)/2);break;case"center-even":i=a-Math.ceil(s/2);break;default:i=0;break}return Math.max(i,0)}function Gw({config:e,slidesCount:a}){const{wrapAround:t,snapAlign:n,itemsToShow:s=1}=e;let i=0;if(t||s>a)return i;switch(n){case"start":i=0;break;case"end":i=s-1;break;case"center":case"center-odd":i=Math.floor((s-1)/2);break;case"center-even":i=Math.floor((s-2)/2);break;default:i=0;break}return i}function Sn({val:e,max:a,min:t}){return a<t?e:Math.min(Math.max(e,t),a)}function Hw({config:e,currentSlide:a,slidesCount:t}){const{snapAlign:n,wrapAround:s,itemsToShow:i=1}=e;let r=a;switch(n){case"center":case"center-odd":r-=(i-1)/2;break;case"center-even":r-=(i-2)/2;break;case"end":r-=i-1;break}return s?r:Sn({val:r,max:t-i,min:0})}function _r(e){return e?e.reduce((a,t)=>{var n;return t.type===o.Fragment?[...a,..._r(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...a,t]:a},[]):[]}function Bn({val:e,max:a,min:t=0}){return e>a?Bn({val:e-(a+1),max:a,min:t}):e<t?Bn({val:e+(a+1),max:a,min:t}):e}function Lw(e,a){let t;return a?function(...n){const s=this;t||(e.apply(s,n),t=!0,setTimeout(()=>t=!1,a))}:e}function Kw(e,a){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{e(...n),t=null},a)}}function qw(e="",a={}){return Object.entries(a).reduce((t,[n,s])=>t.replace(`{${n}}`,String(s)),e)}var Zw=o.defineComponent({name:"ARIA",setup(){const e=o.inject("config",o.reactive(Object.assign({},Re))),a=o.inject("currentSlide",o.ref(0)),t=o.inject("slidesCount",o.ref(0));return()=>o.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},qw(e.i18n.itemXofY,{currentSlide:a.value+1,slidesCount:t.value}))}}),Qw=o.defineComponent({name:"Carousel",props:Xr,setup(e,{slots:a,emit:t,expose:n}){var s;const i=o.ref(null),r=o.ref([]),l=o.ref(0),p=o.ref(0),c=o.reactive(Object.assign({},Re));let d=Object.assign({},Re),u;const f=o.ref((s=e.modelValue)!==null&&s!==void 0?s:0),m=o.ref(0),h=o.ref(0),g=o.ref(0),b=o.ref(0);let A,C;o.provide("config",c),o.provide("slidesCount",p),o.provide("currentSlide",f),o.provide("maxSlide",g),o.provide("minSlide",b),o.provide("slideWidth",l);function z(){u=Object.assign({},e.breakpoints),d=Object.assign(Object.assign(Object.assign({},d),e),{i18n:Object.assign(Object.assign({},d.i18n),e.i18n),breakpoints:void 0}),K(d)}function P(){if(!u||!Object.keys(u).length)return;const w=Object.keys(u).map(E=>Number(E)).sort((E,H)=>+H-+E);let M=Object.assign({},d);w.some(E=>{const H=window.matchMedia(`(min-width: ${E}px)`).matches;return H&&(M=Object.assign(Object.assign({},M),u[E])),H}),K(M)}function K(w){Object.entries(w).forEach(([M,E])=>c[M]=E)}const Z=Kw(()=>{P(),G()},16);function G(){if(!i.value)return;const w=i.value.getBoundingClientRect();l.value=w.width/c.itemsToShow}function re(){p.value<=0||(h.value=Math.ceil((p.value-1)/2),g.value=Dw({config:c,slidesCount:p.value}),b.value=Gw({config:c,slidesCount:p.value}),c.wrapAround||(f.value=Sn({val:f.value,max:g.value,min:b.value})))}o.onMounted(()=>{o.nextTick(()=>G()),setTimeout(()=>G(),1e3),P(),ve(),window.addEventListener("resize",Z,{passive:!0}),t("init")}),o.onUnmounted(()=>{C&&clearTimeout(C),A&&clearInterval(A),window.removeEventListener("resize",Z,{passive:!0})});let V=!1;const ae={x:0,y:0},ie={x:0,y:0},q=o.reactive({x:0,y:0}),se=o.ref(!1),de=o.ref(!1),qe=()=>{se.value=!0},Ze=()=>{se.value=!1};function Ve(w){["INPUT","TEXTAREA","SELECT"].includes(w.target.tagName)||(V=w.type==="touchstart",V||w.preventDefault(),!(!V&&w.button!==0||x.value)&&(ae.x=V?w.touches[0].clientX:w.clientX,ae.y=V?w.touches[0].clientY:w.clientY,document.addEventListener(V?"touchmove":"mousemove",Fe,!0),document.addEventListener(V?"touchend":"mouseup",Ne,!0)))}const Fe=Lw(w=>{de.value=!0,ie.x=V?w.touches[0].clientX:w.clientX,ie.y=V?w.touches[0].clientY:w.clientY;const M=ie.x-ae.x,E=ie.y-ae.y;q.y=E,q.x=M},c.throttle);function Ne(){const w=c.dir==="rtl"?-1:1,M=Math.sign(q.x)*.4,E=Math.round(q.x/l.value+M)*w;if(E&&!V){const H=we=>{we.stopPropagation(),window.removeEventListener("click",H,!0)};window.addEventListener("click",H,!0)}R(f.value-E),q.x=0,q.y=0,de.value=!1,document.removeEventListener(V?"touchmove":"mousemove",Fe,!0),document.removeEventListener(V?"touchend":"mouseup",Ne,!0)}function ve(){!c.autoplay||c.autoplay<=0||(A=setInterval(()=>{c.pauseAutoplayOnHover&&se.value||v()},c.autoplay))}function j(){A&&(clearInterval(A),A=null),ve()}const x=o.ref(!1);function R(w){const M=c.wrapAround?w:Sn({val:w,max:g.value,min:b.value});f.value===M||x.value||(t("slide-start",{slidingToIndex:w,currentSlideIndex:f.value,prevSlideIndex:m.value,slidesCount:p.value}),x.value=!0,m.value=f.value,f.value=M,C=setTimeout(()=>{if(c.wrapAround){const E=Bn({val:M,max:g.value,min:0});E!==f.value&&(f.value=E,t("loop",{currentSlideIndex:f.value,slidingToIndex:w}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:m.value,slidesCount:p.value}),x.value=!1,j()},c.transition))}function v(){R(f.value+c.itemsToScroll)}function N(){R(f.value-c.itemsToScroll)}const I={slideTo:R,next:v,prev:N};o.provide("nav",I),o.provide("isSliding",x);const U=o.computed(()=>Hw({config:c,currentSlide:f.value,slidesCount:p.value}));o.provide("slidesToScroll",U);const X=o.computed(()=>{const w=c.dir==="rtl"?-1:1,M=U.value*l.value*w;return{transform:`translateX(${q.x-M}px)`,transition:`${x.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${p.value*l.value}px`:"",width:"100%"}});function ne(){z(),P(),re(),G(),j()}Object.keys(Xr).forEach(w=>{["modelValue"].includes(w)||o.watch(()=>e[w],ne)}),o.watch(()=>e.modelValue,w=>{w!==f.value&&R(Number(w))}),o.watch(p,re),t("before-init"),z();const ce={config:c,slidesCount:p,slideWidth:l,next:v,prev:N,slideTo:R,currentSlide:f,maxSlide:g,minSlide:b,middleSlide:h};n({updateBreakpointsConfigs:P,updateSlidesData:re,updateSlideWidth:G,initDefaultConfigs:z,restartCarousel:ne,slideTo:R,next:v,prev:N,nav:I,data:ce});const Oe=a.default||a.slides,Ee=a.addons,Pe=o.reactive(ce);return()=>{const w=_r(Oe==null?void 0:Oe(Pe)),M=(Ee==null?void 0:Ee(Pe))||[];w.forEach((Ae,Ce)=>Ae.props.index=Ce);let E=w;if(c.wrapAround){const Ae=w.map((ke,te)=>o.cloneVNode(ke,{index:-w.length+te,isClone:!0,key:`clone-before-${te}`})),Ce=w.map((ke,te)=>o.cloneVNode(ke,{index:w.length+te,isClone:!0,key:`clone-after-${te}`}));E=[...Ae,...w,...Ce]}r.value=w,p.value=Math.max(w.length,1);const H=o.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:c.mouseDrag?Ve:null,onTouchstartPassiveCapture:c.touchDrag?Ve:null},E),we=o.h("div",{class:"carousel__viewport"},H);return o.h("section",{ref:i,class:{carousel:!0,"is-sliding":x.value,"is-dragging":de.value,"is-hover":se.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:qe,onMouseleave:Ze},[we,M,o.h(Zw)])}}}),$r;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})($r||($r={}));var Yw=o.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:a}){const t=o.inject("config",o.reactive(Object.assign({},Re))),n=o.inject("currentSlide",o.ref(0)),s=o.inject("slidesToScroll",o.ref(0)),i=o.inject("isSliding",o.ref(!1)),r=()=>e.index===n.value,l=()=>e.index===n.value-1,p=()=>e.index===n.value+1,c=()=>{const d=Math.floor(s.value),u=Math.ceil(s.value+t.itemsToShow-1);return e.index>=d&&e.index<=u};return()=>{var d;return o.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":c(),"carousel__slide--active":r(),"carousel__slide--prev":l(),"carousel__slide--next":p(),"carousel__slide--sliding":i.value},"aria-hidden":!c()},(d=a.default)===null||d===void 0?void 0:d.call(a))}}});const Ww=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},Jw=e=>(o.pushScopeId("data-v-cf3e4ab5"),e=e(),o.popScopeId(),e),Xw={class:"gsc-carousel"},_w={key:0},$w=Jw(()=>o.createElementVNode("div",null,"no hay",-1)),eA=[$w],tA={class:"gsc-carousel__2d__slides"},oA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},aA=["fill"],nA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},iA=["fill"],sA={class:"gsc-carousel__2d__navigation"},rA={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lA=["stroke"],cA={key:1,class:"gsc-carousel__2d__navigation__pagination"},dA=["onClick"],mA={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pA=["stroke"],uA={__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:e=>["propName","value"].every(a=>a in e)},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(e,{expose:a,emit:t}){const n=e;o.useCssVars(g=>({a79d2c9e:e.slideLeftArrowBackgroundImage,"227709fa":e.slidesArrowsLeftAndRight,c388b60c:e.slideRightArrowBackgroundImage,"257da7fc":e.marginTop,"1c9922a0":e.secondarySlidesOpacity}));const s=o.ref(null),i=o.ref({}),r=o.ref(0),l=o.ref(!1);o.watch(s,g=>{g&&l.value?(l.value=!1,p(n.items)):g&&g.slideTo&&g.slideTo(r.value)},{deep:!0}),o.watch(()=>n.currentItemIndex,g=>{r.value!==g&&f(g)}),o.watch(()=>n.items,g=>{s.value?p(g):l.value=!0},{immediate:!0});function p(g){if(g&&g.length&&s.value){if(n.defaultItemByProp){const b=n.items.findIndex(A=>A[n.defaultItemByProp.propName]===n.defaultItemByProp.value);b!==-1?(r.value=b,i.value=g[b]):(r.value=0,i.value=g[0])}else r.value=n.defaultItemByIndex,i.value=g[n.defaultItemByIndex];s.value.slideTo&&s.value.slideTo(r.value),t("input",{selectedItem:i.value,selectedItemIndex:r.value})}}function c(){s.value&&s.value.next()}function d(){s.value&&s.value.prev()}function u(){s.value&&s.value.updateSlideWidth()}function f(g){s.value&&s.value.slideTo(g)}function m(g){s.value.slideTo(g)}function h(g){const b=g.slidingToIndex<0?n.items.length-1:g.slidingToIndex===n.items.length?0:g.slidingToIndex;r.value=b,i.value=n.items[b],t("update:currentItemIndex",b),t("input",{selectedItem:i.value,selectedItemIndex:r.value})}return a({prev:d,next:c,updateSlideWidth:u,slideTo:f}),(g,b)=>(o.openBlock(),o.createElementBlock("div",Xw,[n.is3d?(o.openBlock(),o.createElementBlock("div",_w,eA)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[o.createElementVNode("div",tA,[o.createVNode(o.unref(Qw),{ref_key:"carousel2d",ref:s,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:h},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(A,C)=>(o.openBlock(),o.createBlock(o.unref(Yw),{key:C},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default",{item:A},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:o.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:b[0]||(b[0]=A=>s.value.prev())},[o.createElementVNode("div",{class:o.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(o.openBlock(),o.createElementBlock("svg",oA,[o.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:e.arrowsColor},null,8,aA)]))],2)],4)):o.createCommentVNode("",!0),e.areSlidesArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:o.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:b[1]||(b[1]=A=>c())},[o.createElementVNode("div",{class:o.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(o.openBlock(),o.createElementBlock("svg",nA,[o.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:e.arrowsColor},null,8,iA)]))],2)],4)):o.createCommentVNode("",!0),o.createElementVNode("div",sA,[e.areNavigationArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:b[2]||(b[2]=A=>d())},[(o.openBlock(),o.createElementBlock("svg",rA,[o.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,lA)]))])):o.createCommentVNode("",!0),e.isPaginationVisible?(o.openBlock(),o.createElementBlock("div",cA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(A,C)=>(o.openBlock(),o.createElementBlock("div",{key:`i-${C}`,class:"gsc-carousel__2d__navigation__pagination__item",style:o.normalizeStyle({height:`${n.navigationHeight}px`,width:`${r.value===C?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${r.value===C?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:z=>m(C)},null,12,dA))),128))])):o.createCommentVNode("",!0),e.areNavigationArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:b[3]||(b[3]=A=>s.value.next())},[(o.openBlock(),o.createElementBlock("svg",mA,[o.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,pA)]))])):o.createCommentVNode("",!0)])],2))]))}},hA=Ww(uA,[["__scopeId","data-v-cf3e4ab5"]]),gA=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function fA(e){return gA[e]}function T(e,a,t){return(a=bA(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function yA(e,a){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,a||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function bA(e){var a=yA(e,"string");return typeof a=="symbol"?a:String(a)}function wA(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function el(e,a){for(var t=0;t<a.length;t++){var n=a[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AA(e,a,t){return a&&el(e.prototype,a),t&&el(e,t),e}function CA(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function tl(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,n)}return t}function ol(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?tl(Object(t),!0).forEach(function(n){CA(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var al={addCSS:!0,thumbWidth:15,watch:!0};function kA(e,a){return(function(){return Array.from(document.querySelectorAll(a)).includes(this)}).call(e,a)}function SA(e,a){if(e&&a){var t=new Event(a,{bubbles:!0});e.dispatchEvent(t)}}var Lt=function(e){return e!=null?e.constructor:null},On=function(e,a){return!!(e&&a&&e instanceof a)},nl=function(e){return e==null},il=function(e){return Lt(e)===Object},BA=function(e){return Lt(e)===Number&&!Number.isNaN(e)},sl=function(e){return Lt(e)===String},OA=function(e){return Lt(e)===Boolean},EA=function(e){return Lt(e)===Function},rl=function(e){return Array.isArray(e)},ll=function(e){return On(e,NodeList)},xA=function(e){return On(e,Element)},zA=function(e){return On(e,Event)},MA=function(e){return nl(e)||(sl(e)||rl(e)||ll(e))&&!e.length||il(e)&&!Object.keys(e).length},Te={nullOrUndefined:nl,object:il,number:BA,string:sl,boolean:OA,function:EA,array:rl,nodeList:ll,element:xA,event:zA,empty:MA};function RA(e){var a="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return a?Math.max(0,(a[1]?a[1].length:0)-(a[2]?+a[2]:0)):0}function FA(e,a){if(1>a){var t=RA(a);return parseFloat(e.toFixed(t))}return Math.round(e/a)*a}var TA=function(){function e(a,t){wA(this,e),Te.element(a)?this.element=a:Te.string(a)&&(this.element=document.querySelector(a)),Te.element(this.element)&&Te.empty(this.element.rangeTouch)&&(this.config=ol({},al,{},t),this.init())}return AA(e,[{key:"init",value:function(){e.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(){e.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(a){var t=this,n=a?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(s){t.element[n](s,function(i){return t.set(i)},!1)})}},{key:"get",value:function(a){if(!e.enabled||!Te.event(a))return null;var t,n=a.target,s=a.changedTouches[0],i=parseFloat(n.getAttribute("min"))||0,r=parseFloat(n.getAttribute("max"))||100,l=parseFloat(n.getAttribute("step"))||1,p=n.getBoundingClientRect(),c=100/p.width*(this.config.thumbWidth/2)/100;return 0>(t=100/p.width*(s.clientX-p.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*c:50<t&&(t+=2*(t-50)*c),i+FA(t/100*(r-i),l)}},{key:"set",value:function(a){e.enabled&&Te.event(a)&&!a.target.disabled&&(a.preventDefault(),a.target.value=this.get(a),SA(a.target,a.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(a){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(Te.empty(a)||Te.string(a)?n=Array.from(document.querySelectorAll(Te.string(a)?a:'input[type="range"]')):Te.element(a)?n=[a]:Te.nodeList(a)?n=Array.from(a):Te.array(a)&&(n=a.filter(Te.element)),Te.empty(n))return null;var s=ol({},al,{},t);if(Te.string(a)&&s.watch){var i=new MutationObserver(function(r){Array.from(r).forEach(function(l){Array.from(l.addedNodes).forEach(function(p){Te.element(p)&&kA(p,a)&&new e(p,s)})})});i.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(r){return new e(r,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Kt=e=>e!=null?e.constructor:null,st=(e,a)=>!!(e&&a&&e instanceof a),En=e=>e==null,cl=e=>Kt(e)===Object,VA=e=>Kt(e)===Number&&!Number.isNaN(e),No=e=>Kt(e)===String,NA=e=>Kt(e)===Boolean,dl=e=>typeof e=="function",ml=e=>Array.isArray(e),vA=e=>st(e,WeakMap),pl=e=>st(e,NodeList),PA=e=>Kt(e)===Text,jA=e=>st(e,Event),IA=e=>st(e,KeyboardEvent),UA=e=>st(e,window.TextTrackCue)||st(e,window.VTTCue),DA=e=>st(e,TextTrack)||!En(e)&&No(e.kind),GA=e=>st(e,Promise)&&dl(e.then),HA=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",ul=e=>En(e)||(No(e)||ml(e)||pl(e))&&!e.length||cl(e)&&!Object.keys(e).length;var y={nullOrUndefined:En,object:cl,number:VA,string:No,boolean:NA,function:dl,array:ml,weakMap:vA,nodeList:pl,element:HA,textNode:PA,event:jA,keyboardEvent:IA,cue:UA,track:DA,promise:GA,url:e=>{if(st(e,window.URL))return!0;if(!No(e))return!1;let a=e;e.startsWith("http://")&&e.startsWith("https://")||(a=`http://${e}`);try{return!ul(new URL(a).hostname)}catch{return!1}},empty:ul};const xn=(()=>{const e=document.createElement("span"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(a).find(n=>e.style[n]!==void 0);return!!y.string(t)&&a[t]})();function hl(e,a){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},a)}const LA=!!window.document.documentMode,KA=/Edge/g.test(navigator.userAgent),qA="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),ZA=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,QA=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,YA=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var Se={isIE:LA,isEdge:KA,isWebKit:qA,isIPhone:ZA,isIPadOS:QA,isIos:YA};function WA(e){return JSON.parse(JSON.stringify(e))}function gl(e,a){return a.split(".").reduce((t,n)=>t&&t[n],e)}function me(e={},...a){if(!a.length)return e;const t=a.shift();return y.object(t)?(Object.keys(t).forEach(n=>{y.object(t[n])?(Object.keys(e).includes(n)||Object.assign(e,{[n]:{}}),me(e[n],t[n])):Object.assign(e,{[n]:t[n]})}),me(e,...a)):e}function fl(e,a){const t=e.length?e:[e];Array.from(t).reverse().forEach((n,s)=>{const i=s>0?a.cloneNode(!0):a,r=n.parentNode,l=n.nextSibling;i.appendChild(n),l?r.insertBefore(i,l):r.appendChild(i)})}function zn(e,a){y.element(e)&&!y.empty(a)&&Object.entries(a).filter(([,t])=>!y.nullOrUndefined(t)).forEach(([t,n])=>e.setAttribute(t,n))}function D(e,a,t){const n=document.createElement(e);return y.object(a)&&zn(n,a),y.string(t)&&(n.innerText=t),n}function JA(e,a){y.element(e)&&y.element(a)&&a.parentNode.insertBefore(e,a.nextSibling)}function yl(e,a,t,n){y.element(a)&&a.appendChild(D(e,t,n))}function rt(e){y.nodeList(e)||y.array(e)?Array.from(e).forEach(rt):y.element(e)&&y.element(e.parentNode)&&e.parentNode.removeChild(e)}function vo(e){if(!y.element(e))return;let{length:a}=e.childNodes;for(;a>0;)e.removeChild(e.lastChild),a-=1}function Po(e,a){return y.element(a)&&y.element(a.parentNode)&&y.element(e)?(a.parentNode.replaceChild(e,a),e):null}function $e(e,a){if(!y.string(e)||y.empty(e))return{};const t={},n=me({},a);return e.split(",").forEach(s=>{const i=s.trim(),r=i.replace(".",""),l=i.replace(/[[\]]/g,"").split("="),[p]=l,c=l.length>1?l[1].replace(/["']/g,""):"";switch(i.charAt(0)){case".":y.string(n.class)?t.class=`${n.class} ${r}`:t.class=r;break;case"#":t.id=i.replace("#","");break;case"[":t[p]=c}}),me(n,t)}function ft(e,a){if(!y.element(e))return;let t=a;y.boolean(t)||(t=!e.hidden),e.hidden=t}function ee(e,a,t){if(y.nodeList(e))return Array.from(e).map(n=>ee(n,a,t));if(y.element(e)){let n="toggle";return t!==void 0&&(n=t?"add":"remove"),e.classList[n](a),e.classList.contains(a)}return!1}function jo(e,a){return y.element(e)&&e.classList.contains(a)}function yt(e,a){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(a)).includes(this)}).call(e,a)}function XA(e,a){const{prototype:t}=Element;return(t.closest||function(){let n=this;do{if(yt.matches(n,a))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(e,a)}function qt(e){return this.elements.container.querySelectorAll(e)}function be(e){return this.elements.container.querySelector(e)}function Mn(e=null,a=!1){y.element(e)&&e.focus({preventScroll:!0,focusVisible:a})}const bl={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},pe={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,a){const t=pe[e]||a!=="html5";return{api:t,ui:t&&pe.rangeInput}},pip:!(Se.isIPhone||!y.function(D("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||D("video").disablePictureInPicture)),airplay:y.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(y.empty(e))return!1;const[a]=e.split("/");let t=e;if(!this.isHTML5||a!==this.type)return!1;Object.keys(bl).includes(t)&&(t+=`; codecs="${bl[e]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:xn!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},_A=(()=>{let e=!1;try{const a=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,a),window.removeEventListener("test",null,a)}catch{}return e})();function Zt(e,a,t,n=!1,s=!0,i=!1){if(!e||!("addEventListener"in e)||y.empty(a)||!y.function(t))return;const r=a.split(" ");let l=i;_A&&(l={passive:s,capture:i}),r.forEach(p=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:e,type:p,callback:t,options:l}),e[n?"addEventListener":"removeEventListener"](p,t,l)})}function _(e,a="",t,n=!0,s=!1){Zt.call(this,e,a,t,!0,n,s)}function Io(e,a="",t,n=!0,s=!1){Zt.call(this,e,a,t,!1,n,s)}function Rn(e,a="",t,n=!0,s=!1){const i=(...r)=>{Io(e,a,i,n,s),t.apply(this,r)};Zt.call(this,e,a,i,!0,n,s)}function L(e,a="",t=!1,n={}){if(!y.element(e)||y.empty(a))return;const s=new CustomEvent(a,{bubbles:t,detail:{...n,plyr:this}});e.dispatchEvent(s)}function $A(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:a,type:t,callback:n,options:s}=e;a.removeEventListener(t,n,s)}),this.eventListeners=[])}function e5(){return new Promise(e=>this.ready?setTimeout(e,0):_.call(this,this.elements.container,"ready",e)).then(()=>{})}function et(e){y.promise(e)&&e.then(null,()=>{})}function Fn(e){return y.array(e)?e.filter((a,t)=>e.indexOf(a)===t):e}function wl(e,a){return y.array(e)&&e.length?e.reduce((t,n)=>Math.abs(n-a)<Math.abs(t-a)?n:t):null}function Al(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const Cl=[[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((e,[a,t])=>({...e,[a/t]:[a,t]}),{});function kl(e){return y.array(e)||y.string(e)&&e.includes(":")?(y.array(e)?e:e.split(":")).map(Number).every(y.number):!1}function Uo(e){if(!y.array(e)||!e.every(y.number))return null;const[a,t]=e,n=(i,r)=>r===0?i:n(r,i%r),s=n(a,t);return[a/s,t/s]}function Tn(e){const a=n=>kl(n)?n.split(":").map(Number):null;let t=a(e);if(t===null&&(t=a(this.config.ratio)),t===null&&!y.empty(this.embed)&&y.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:n,videoHeight:s}=this.media;t=[n,s]}return Uo(t)}function Et(e){if(!this.isVideo)return{};const{wrapper:a}=this.elements,t=Tn.call(this,e);if(!y.array(t))return{};const[n,s]=Uo(t),i=100/n*s;if(Al(`aspect-ratio: ${n}/${s}`)?a.style.aspectRatio=`${n}/${s}`:a.style.paddingBottom=`${i}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const r=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(r-i)/(r/50);this.fullscreen.active?a.style.paddingBottom=null:this.media.style.transform=`translateY(-${l}%)`}else this.isHTML5&&a.classList.add(this.config.classNames.videoFixedRatio);return{padding:i,ratio:t}}function Sl(e,a,t=.05){const n=e/a,s=wl(Object.keys(Cl),n);return Math.abs(s-n)<=t?Cl[s]:[e,a]}function t5(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const pt={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const a=e.getAttribute("type");return!!y.empty(a)||pe.mime.call(this,a)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:pt.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,y.empty(this.config.ratio)||Et.call(e),Object.defineProperty(e.media,"quality",{get(){const a=pt.getSources.call(e).find(t=>t.getAttribute("src")===e.source);return a&&Number(a.getAttribute("size"))},set(a){if(e.quality!==a){if(e.config.quality.forced&&y.function(e.config.quality.onChange))e.config.quality.onChange(a);else{const t=pt.getSources.call(e).find(p=>Number(p.getAttribute("size"))===a);if(!t)return;const{currentTime:n,paused:s,preload:i,readyState:r,playbackRate:l}=e.media;e.media.src=t.getAttribute("src"),(i!=="none"||r)&&(e.once("loadedmetadata",()=>{e.speed=l,e.currentTime=n,s||et(e.play())}),e.media.load())}L.call(e,e.media,"qualitychange",!1,{quality:a})}}})},cancelRequests(){this.isHTML5&&(rt(pt.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function o5(e){return`${e}-${Math.floor(1e4*Math.random())}`}function Vn(e,...a){return y.empty(e)?e:e.toString().replace(/{(\d+)}/g,(t,n)=>a[n].toString())}function a5(e,a){return e===0||a===0||Number.isNaN(e)||Number.isNaN(a)?0:(e/a*100).toFixed(2)}const Qt=(e="",a="",t="")=>e.replace(new RegExp(a.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Bl=(e="")=>e.toString().replace(/\w\S*/g,a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase());function n5(e=""){let a=e.toString();return a=Qt(a,"-"," "),a=Qt(a,"_"," "),a=Bl(a),Qt(a," ","")}function i5(e=""){let a=e.toString();return a=n5(a),a.charAt(0).toLowerCase()+a.slice(1)}function s5(e){const a=document.createDocumentFragment(),t=document.createElement("div");return a.appendChild(t),t.innerHTML=e,a.firstChild.innerText}function r5(e){const a=document.createElement("div");return a.appendChild(e),a.innerHTML}const Ol={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Be={get(e="",a={}){if(y.empty(e)||y.empty(a))return"";let t=gl(a.i18n,e);if(y.empty(t))return Object.keys(Ol).includes(e)?Ol[e]:"";const n={"{seektime}":a.seekTime,"{title}":a.title};return Object.entries(n).forEach(([s,i])=>{t=Qt(t,s,i)}),t}};class Yt{constructor(a){T(this,"get",t=>{if(!Yt.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(y.empty(n))return null;const s=JSON.parse(n);return y.string(t)&&t.length?s[t]:s}),T(this,"set",t=>{if(!Yt.supported||!this.enabled||!y.object(t))return;let n=this.get();y.empty(n)&&(n={}),me(n,t);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=a.config.storage.enabled,this.key=a.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const a="___test";return window.localStorage.setItem(a,a),window.localStorage.removeItem(a),!0}catch{return!1}}}function Wt(e,a="text"){return new Promise((t,n)=>{try{const s=new XMLHttpRequest;if(!("withCredentials"in s))return;s.addEventListener("load",()=>{if(a==="text")try{t(JSON.parse(s.responseText))}catch{t(s.responseText)}else t(s.response)}),s.addEventListener("error",()=>{throw new Error(s.status)}),s.open("GET",e,!0),s.responseType=a,s.send()}catch(s){n(s)}})}function El(e,a){if(!y.string(e))return;const t="cache",n=y.string(a);let s=!1;const i=()=>document.getElementById(a)!==null,r=(l,p)=>{l.innerHTML=p,n&&i()||document.body.insertAdjacentElement("afterbegin",l)};if(!n||!i()){const l=Yt.supported,p=document.createElement("div");if(p.setAttribute("hidden",""),n&&p.setAttribute("id",a),l){const c=window.localStorage.getItem(`${t}-${a}`);if(s=c!==null,s){const d=JSON.parse(c);r(p,d.content)}}Wt(e).then(c=>{if(!y.empty(c)){if(l)try{window.localStorage.setItem(`${t}-${a}`,JSON.stringify({content:c}))}catch{}r(p,c)}}).catch(()=>{})}}const xl=e=>Math.trunc(e/60/60%60,10),l5=e=>Math.trunc(e/60%60,10),c5=e=>Math.trunc(e%60,10);function Do(e=0,a=!1,t=!1){if(!y.number(e))return Do(void 0,a,t);const n=l=>`0${l}`.slice(-2);let s=xl(e);const i=l5(e),r=c5(e);return s=a||s>0?`${s}:`:"",`${t&&e>0?"-":""}${s}${n(i)}:${n(r)}`}const F={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),a=window.location.host?window.location.host:window.top.location.host,t=e.host!==a||Se.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=be.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:qt.call(this,this.config.selectors.buttons.play),pause:be.call(this,this.config.selectors.buttons.pause),restart:be.call(this,this.config.selectors.buttons.restart),rewind:be.call(this,this.config.selectors.buttons.rewind),fastForward:be.call(this,this.config.selectors.buttons.fastForward),mute:be.call(this,this.config.selectors.buttons.mute),pip:be.call(this,this.config.selectors.buttons.pip),airplay:be.call(this,this.config.selectors.buttons.airplay),settings:be.call(this,this.config.selectors.buttons.settings),captions:be.call(this,this.config.selectors.buttons.captions),fullscreen:be.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=be.call(this,this.config.selectors.progress),this.elements.inputs={seek:be.call(this,this.config.selectors.inputs.seek),volume:be.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:be.call(this,this.config.selectors.display.buffer),currentTime:be.call(this,this.config.selectors.display.currentTime),duration:be.call(this,this.config.selectors.display.duration)},y.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,a){const t="http://www.w3.org/2000/svg",n=F.getIconUrl.call(this),s=`${n.cors?"":n.url}#${this.config.iconPrefix}`,i=document.createElementNS(t,"svg");zn(i,me(a,{"aria-hidden":"true",focusable:"false"}));const r=document.createElementNS(t,"use"),l=`${s}-${e}`;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),i.appendChild(r),i},createLabel(e,a={}){const t=Be.get(e,this.config);return D("span",{...a,class:[a.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(e){if(y.empty(e))return null;const a=D("span",{class:this.config.classNames.menu.value});return a.appendChild(D("span",{class:this.config.classNames.menu.badge},e)),a},createButton(e,a){const t=me({},a);let n=i5(e);const s={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(r=>{Object.keys(t).includes(r)&&(s[r]=t[r],delete t[r])}),s.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(r=>r===this.config.classNames.control)||me(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,e){case"play":s.toggle=!0,s.label="play",s.labelPressed="pause",s.icon="play",s.iconPressed="pause";break;case"mute":s.toggle=!0,s.label="mute",s.labelPressed="unmute",s.icon="volume",s.iconPressed="muted";break;case"captions":s.toggle=!0,s.label="enableCaptions",s.labelPressed="disableCaptions",s.icon="captions-off",s.iconPressed="captions-on";break;case"fullscreen":s.toggle=!0,s.label="enterFullscreen",s.labelPressed="exitFullscreen",s.icon="enter-fullscreen",s.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,n="play",s.label="play",s.icon="play";break;default:y.empty(s.label)&&(s.label=n),y.empty(s.icon)&&(s.icon=e)}const i=D(s.element);return s.toggle?(i.appendChild(F.createIcon.call(this,s.iconPressed,{class:"icon--pressed"})),i.appendChild(F.createIcon.call(this,s.icon,{class:"icon--not-pressed"})),i.appendChild(F.createLabel.call(this,s.labelPressed,{class:"label--pressed"})),i.appendChild(F.createLabel.call(this,s.label,{class:"label--not-pressed"}))):(i.appendChild(F.createIcon.call(this,s.icon)),i.appendChild(F.createLabel.call(this,s.label))),me(t,$e(this.config.selectors.buttons[n],t)),zn(i,t),n==="play"?(y.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(i)):this.elements.buttons[n]=i,i},createRange(e,a){const t=D("input",me($e(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Be.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},a));return this.elements.inputs[e]=t,F.updateRangeFill.call(this,t),TA.setup(t),t},createProgress(e,a){const t=D("progress",me($e(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},a));if(e!=="volume"){t.appendChild(D("span",null,"0"));const n={played:"played",buffer:"buffered"}[e],s=n?Be.get(n,this.config):"";t.innerText=`% ${s.toLowerCase()}`}return this.elements.display[e]=t,t},createTime(e,a){const t=$e(this.config.selectors.display[e],a),n=D("div",me(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Be.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts(e,a){_.call(this,e,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const n=yt(e,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(t.key))F.showMenuPanel.call(this,a,!0);else{let s;t.key!==" "&&(t.key==="ArrowDown"||n&&t.key==="ArrowRight"?(s=e.nextElementSibling,y.element(s)||(s=e.parentNode.firstElementChild)):(s=e.previousElementSibling,y.element(s)||(s=e.parentNode.lastElementChild)),Mn.call(this,s,!0))}},!1),_.call(this,e,"keyup",t=>{t.key==="Return"&&F.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:a,type:t,title:n,badge:s=null,checked:i=!1}){const r=$e(this.config.selectors.inputs[t]),l=D("button",me(r,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${r.class?r.class:""}`.trim(),"aria-checked":i,value:e})),p=D("span");p.innerHTML=n,y.element(s)&&p.appendChild(s),l.appendChild(p),Object.defineProperty(l,"checked",{enumerable:!0,get:()=>l.getAttribute("aria-checked")==="true",set(c){c&&Array.from(l.parentNode.children).filter(d=>yt(d,'[role="menuitemradio"]')).forEach(d=>d.setAttribute("aria-checked","false")),l.setAttribute("aria-checked",c?"true":"false")}}),this.listeners.bind(l,"click keyup",c=>{if(!y.keyboardEvent(c)||c.key===" "){switch(c.preventDefault(),c.stopPropagation(),l.checked=!0,t){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}F.showMenuPanel.call(this,"home",y.keyboardEvent(c))}},t,!1),F.bindMenuItemShortcuts.call(this,l,t),a.appendChild(l)},formatTime(e=0,a=!1){return y.number(e)?Do(e,xl(this.duration)>0,a):e},updateTimeDisplay(e=null,a=0,t=!1){y.element(e)&&y.number(a)&&(e.innerText=F.formatTime(a,t))},updateVolume(){this.supported.ui&&(y.element(this.elements.inputs.volume)&&F.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),y.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,a=0){y.element(e)&&(e.value=a,F.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!y.event(e))return;let a=0;const t=(n,s)=>{const i=y.number(s)?s:0,r=y.element(n)?n:this.elements.display.buffer;if(y.element(r)){r.value=i;const l=r.getElementsByTagName("span")[0];y.element(l)&&(l.childNodes[0].nodeValue=i)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":a=a5(this.currentTime,this.duration),e.type==="timeupdate"&&F.setRange.call(this,this.elements.inputs.seek,a);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const a=y.event(e)?e.target:e;if(y.element(a)&&a.getAttribute("type")==="range"){if(yt(a,this.config.selectors.inputs.seek)){a.setAttribute("aria-valuenow",this.currentTime);const t=F.formatTime(this.currentTime),n=F.formatTime(this.duration),s=Be.get("seekLabel",this.config);a.setAttribute("aria-valuetext",s.replace("{currentTime}",t).replace("{duration}",n))}else if(yt(a,this.config.selectors.inputs.volume)){const t=100*a.value;a.setAttribute("aria-valuenow",t),a.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else a.setAttribute("aria-valuenow",a.value);(Se.isWebKit||Se.isIPadOS)&&a.style.setProperty("--value",a.value/a.max*100+"%")}},updateSeekTooltip(e){var a,t;if(!this.config.tooltips.seek||!y.element(this.elements.inputs.seek)||!y.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,s=`${this.config.classNames.tooltip}--visible`,i=d=>ee(n,s,d);if(this.touch)return void i(!1);let r=0;const l=this.elements.progress.getBoundingClientRect();if(y.event(e))r=100/l.width*(e.pageX-l.left);else{if(!jo(n,s))return;r=parseFloat(n.style.left,10)}r<0?r=0:r>100&&(r=100);const p=this.duration/100*r;n.innerText=F.formatTime(p);const c=(a=this.config.markers)===null||a===void 0||(t=a.points)===null||t===void 0?void 0:t.find(({time:d})=>d===Math.round(p));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${r}%`,y.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&i(e.type==="mouseenter")},timeUpdate(e){const a=!y.element(this.elements.display.duration)&&this.config.invertTime;F.updateTimeDisplay.call(this,this.elements.display.currentTime,a?this.duration-this.currentTime:this.currentTime,a),e&&e.type==="timeupdate"&&this.media.seeking||F.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return ft(this.elements.display.currentTime,!0),void ft(this.elements.progress,!0);y.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=y.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&F.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&F.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&F.setMarkers.call(this),F.updateSeekTooltip.call(this)},toggleMenuButton(e,a){ft(this.elements.settings.buttons[e],!a)},updateSetting(e,a,t){const n=this.elements.settings.panels[e];let s=null,i=a;if(e==="captions")s=this.currentTrack;else{if(s=y.empty(t)?this[e]:t,y.empty(s)&&(s=this.config[e].default),!y.empty(this.options[e])&&!this.options[e].includes(s))return void this.debug.warn(`Unsupported value of '${s}' for ${e}`);if(!this.config[e].options.includes(s))return void this.debug.warn(`Disabled value of '${s}' for ${e}`)}if(y.element(i)||(i=n&&n.querySelector('[role="menu"]')),!y.element(i))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=F.getLabel.call(this,e,s);const r=i&&i.querySelector(`[value="${s}"]`);y.element(r)&&(r.checked=!0)},getLabel(e,a){switch(e){case"speed":return a===1?Be.get("normal",this.config):`${a}&times;`;case"quality":if(y.number(a)){const t=Be.get(`qualityLabel.${a}`,this.config);return t.length?t:`${a}p`}return Bl(a);case"captions":return $.getLabel.call(this);default:return null}},setQualityMenu(e){if(!y.element(this.elements.settings.panels.quality))return;const a="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');y.array(e)&&(this.options.quality=Fn(e).filter(i=>this.config.quality.options.includes(i)));const n=!y.empty(this.options.quality)&&this.options.quality.length>1;if(F.toggleMenuButton.call(this,a,n),vo(t),F.checkMenu.call(this),!n)return;const s=i=>{const r=Be.get(`qualityBadge.${i}`,this.config);return r.length?F.createBadge.call(this,r):null};this.options.quality.sort((i,r)=>{const l=this.config.quality.options;return l.indexOf(i)>l.indexOf(r)?1:-1}).forEach(i=>{F.createMenuItem.call(this,{value:i,list:t,type:a,title:F.getLabel.call(this,"quality",i),badge:s(i)})}),F.updateSetting.call(this,a,t)},setCaptionsMenu(){if(!y.element(this.elements.settings.panels.captions))return;const e="captions",a=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=$.getTracks.call(this),n=!!t.length;if(F.toggleMenuButton.call(this,e,n),vo(a),F.checkMenu.call(this),!n)return;const s=t.map((i,r)=>({value:r,checked:this.captions.toggled&&this.currentTrack===r,title:$.getLabel.call(this,i),badge:i.language&&F.createBadge.call(this,i.language.toUpperCase()),list:a,type:"language"}));s.unshift({value:-1,checked:!this.captions.toggled,title:Be.get("disabled",this.config),list:a,type:"language"}),s.forEach(F.createMenuItem.bind(this)),F.updateSetting.call(this,e,a)},setSpeedMenu(){if(!y.element(this.elements.settings.panels.speed))return;const e="speed",a=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const t=!y.empty(this.options.speed)&&this.options.speed.length>1;F.toggleMenuButton.call(this,e,t),vo(a),F.checkMenu.call(this),t&&(this.options.speed.forEach(n=>{F.createMenuItem.call(this,{value:n,list:a,type:e,title:F.getLabel.call(this,"speed",n)})}),F.updateSetting.call(this,e,a))},checkMenu(){const{buttons:e}=this.elements.settings,a=!y.empty(e)&&Object.values(e).some(t=>!t.hidden);ft(this.elements.settings.menu,!a)},focusFirstMenuItem(e,a=!1){if(this.elements.settings.popup.hidden)return;let t=e;y.element(t)||(t=Object.values(this.elements.settings.panels).find(s=>!s.hidden));const n=t.querySelector('[role^="menuitem"]');Mn.call(this,n,a)},toggleMenu(e){const{popup:a}=this.elements.settings,t=this.elements.buttons.settings;if(!y.element(a)||!y.element(t))return;const{hidden:n}=a;let s=n;if(y.boolean(e))s=e;else if(y.keyboardEvent(e)&&e.key==="Escape")s=!1;else if(y.event(e)){const i=y.function(e.composedPath)?e.composedPath()[0]:e.target,r=a.contains(i);if(r||!r&&e.target!==t&&s)return}t.setAttribute("aria-expanded",s),ft(a,!s),ee(this.elements.container,this.config.classNames.menu.open,s),s&&y.keyboardEvent(e)?F.focusFirstMenuItem.call(this,null,!0):s||n||Mn.call(this,t,y.keyboardEvent(e))},getMenuSize(e){const a=e.cloneNode(!0);a.style.position="absolute",a.style.opacity=0,a.removeAttribute("hidden"),e.parentNode.appendChild(a);const t=a.scrollWidth,n=a.scrollHeight;return rt(a),{width:t,height:n}},showMenuPanel(e="",a=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!y.element(t))return;const n=t.parentNode,s=Array.from(n.children).find(i=>!i.hidden);if(pe.transitions&&!pe.reducedMotion){n.style.width=`${s.scrollWidth}px`,n.style.height=`${s.scrollHeight}px`;const i=F.getMenuSize.call(this,t),r=l=>{l.target===n&&["width","height"].includes(l.propertyName)&&(n.style.width="",n.style.height="",Io.call(this,n,xn,r))};_.call(this,n,xn,r),n.style.width=`${i.width}px`,n.style.height=`${i.height}px`}ft(s,!0),ft(t,!1),F.focusFirstMenuItem.call(this,t,a)},setDownloadUrl(){const e=this.elements.buttons.download;y.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:a,createButton:t,createProgress:n,createRange:s,createTime:i,setQualityMenu:r,setSpeedMenu:l,showMenuPanel:p}=F;this.elements.controls=null,y.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const c=D("div",$e(this.config.selectors.controls.wrapper));this.elements.controls=c;const d={class:"plyr__controls__item"};return Fn(y.array(this.config.controls)?this.config.controls:[]).forEach(u=>{if(u==="restart"&&c.appendChild(t.call(this,"restart",d)),u==="rewind"&&c.appendChild(t.call(this,"rewind",d)),u==="play"&&c.appendChild(t.call(this,"play",d)),u==="fast-forward"&&c.appendChild(t.call(this,"fast-forward",d)),u==="progress"){const f=D("div",{class:`${d.class} plyr__progress__container`}),m=D("div",$e(this.config.selectors.progress));if(m.appendChild(s.call(this,"seek",{id:`plyr-seek-${e.id}`})),m.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const h=D("span",{class:this.config.classNames.tooltip},"00:00");m.appendChild(h),this.elements.display.seekTooltip=h}this.elements.progress=m,f.appendChild(this.elements.progress),c.appendChild(f)}if(u==="current-time"&&c.appendChild(i.call(this,"currentTime",d)),u==="duration"&&c.appendChild(i.call(this,"duration",d)),u==="mute"||u==="volume"){let{volume:f}=this.elements;if(y.element(f)&&c.contains(f)||(f=D("div",me({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),u==="mute"&&f.appendChild(t.call(this,"mute")),u==="volume"&&!Se.isIos&&!Se.isIPadOS){const m={max:1,step:.05,value:this.config.volume};f.appendChild(s.call(this,"volume",me(m,{id:`plyr-volume-${e.id}`})))}}if(u==="captions"&&c.appendChild(t.call(this,"captions",d)),u==="settings"&&!y.empty(this.config.settings)){const f=D("div",me({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));f.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const m=D("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),h=D("div"),g=D("div",{id:`plyr-settings-${e.id}-home`}),b=D("div",{role:"menu"});g.appendChild(b),h.appendChild(g),this.elements.settings.panels.home=g,this.config.settings.forEach(A=>{const C=D("button",me($e(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));a.call(this,C,A),_.call(this,C,"click",()=>{p.call(this,A,!1)});const z=D("span",null,Be.get(A,this.config)),P=D("span",{class:this.config.classNames.menu.value});P.innerHTML=e[A],z.appendChild(P),C.appendChild(z),b.appendChild(C);const K=D("div",{id:`plyr-settings-${e.id}-${A}`,hidden:""}),Z=D("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});Z.appendChild(D("span",{"aria-hidden":!0},Be.get(A,this.config))),Z.appendChild(D("span",{class:this.config.classNames.hidden},Be.get("menuBack",this.config))),_.call(this,K,"keydown",G=>{G.key==="ArrowLeft"&&(G.preventDefault(),G.stopPropagation(),p.call(this,"home",!0))},!1),_.call(this,Z,"click",()=>{p.call(this,"home",!1)}),K.appendChild(Z),K.appendChild(D("div",{role:"menu"})),h.appendChild(K),this.elements.settings.buttons[A]=C,this.elements.settings.panels[A]=K}),m.appendChild(h),f.appendChild(m),c.appendChild(f),this.elements.settings.popup=m,this.elements.settings.menu=f}if(u==="pip"&&pe.pip&&c.appendChild(t.call(this,"pip",d)),u==="airplay"&&pe.airplay&&c.appendChild(t.call(this,"airplay",d)),u==="download"){const f=me({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:m}=this.config.urls;!y.url(m)&&this.isEmbed&&me(f,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(t.call(this,"download",f))}u==="fullscreen"&&c.appendChild(t.call(this,"fullscreen",d))}),this.isHTML5&&r.call(this,pt.getQualityOptions.call(this)),l.call(this),c},inject(){if(this.config.loadSprite){const s=F.getIconUrl.call(this);s.cors&&El(s.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const a={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;y.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,a)),this.config.controls||(this.config.controls=[]),y.element(this.config.controls)||y.string(this.config.controls)?e=this.config.controls:(e=F.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:$.getLabel.call(this)}),t=!1);let n;if(t&&y.string(this.config.controls)&&(e=(s=>{let i=s;return Object.entries(a).forEach(([r,l])=>{i=Qt(i,`{${r}}`,l)}),i})(e)),y.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),y.element(n)||(n=this.elements.container),n[y.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),y.element(this.elements.controls)||F.findElements.call(this),!y.empty(this.elements.buttons)){const s=i=>{const r=this.config.classNames.controlPressed;i.setAttribute("aria-pressed","false"),Object.defineProperty(i,"pressed",{configurable:!0,enumerable:!0,get:()=>jo(i,r),set(l=!1){ee(i,r,l),i.setAttribute("aria-pressed",l?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(i=>{y.array(i)||y.nodeList(i)?Array.from(i).filter(Boolean).forEach(s):s(i)})}if(Se.isEdge&&hl(n),this.config.tooltips.controls){const{classNames:s,selectors:i}=this.config,r=`${i.controls.wrapper} ${i.labels} .${s.hidden}`,l=qt.call(this,r);Array.from(l).forEach(p=>{ee(p,this.config.classNames.hidden,!1),ee(p,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 e,a;if(!this.duration||this.elements.markers)return;const t=(e=this.config.markers)===null||e===void 0||(a=e.points)===null||a===void 0?void 0:a.filter(({time:p})=>p>0&&p<this.duration);if(t==null||!t.length)return;const n=document.createDocumentFragment(),s=document.createDocumentFragment();let i=null;const r=`${this.config.classNames.tooltip}--visible`,l=p=>ee(i,r,p);t.forEach(p=>{const c=D("span",{class:this.config.classNames.marker},""),d=p.time/this.duration*100+"%";i&&(c.addEventListener("mouseenter",()=>{p.label||(i.style.left=d,i.innerHTML=p.label,l(!0))}),c.addEventListener("mouseleave",()=>{l(!1)})),c.addEventListener("click",()=>{this.currentTime=p.time}),c.style.left=d,s.appendChild(c)}),n.appendChild(s),this.config.tooltips.seek||(i=D("span",{class:this.config.classNames.tooltip},""),n.appendChild(i)),this.elements.markers={points:s,tip:i},this.elements.progress.appendChild(n)}};function zl(e,a=!0){let t=e;if(a){const n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch{return null}}function Ml(e){const a=new URLSearchParams;return y.object(e)&&Object.entries(e).forEach(([t,n])=>{a.set(t,n)}),a}const $={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!pe.textTracks)return void(y.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&F.setCaptionsMenu.call(this));if(y.element(this.elements.captions)||(this.elements.captions=D("div",$e(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),JA(this.elements.captions,this.elements.wrapper)),Se.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(s=>{const i=s.getAttribute("src"),r=zl(i);r!==null&&r.hostname!==window.location.href.hostname&&["http:","https:"].includes(r.protocol)&&Wt(i,"blob").then(l=>{s.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{rt(s)})})}const e=Fn((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let a=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();a==="auto"&&([a]=e);let t=this.storage.get("captions");if(y.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:a,languages:e}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";_.call(this,this.media.textTracks,n,$.update.bind(this))}setTimeout($.update.bind(this),0)},update(){const e=$.getTracks.call(this,!0),{active:a,language:t,meta:n,currentTrackNode:s}=this.captions,i=!!e.find(r=>r.language===t);this.isHTML5&&this.isVideo&&e.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"),_.call(this,r,"cuechange",()=>$.updateCues.call(this))}),(i&&this.language!==t||!e.includes(s))&&($.setLanguage.call(this,t),$.toggle.call(this,a&&i)),this.elements&&ee(this.elements.container,this.config.classNames.captions.enabled,!y.empty(e)),y.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&F.setCaptionsMenu.call(this)},toggle(e,a=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,n=this.config.classNames.captions.active,s=y.nullOrUndefined(e)?!t:e;if(s!==t){if(a||(this.captions.active=s,this.storage.set({captions:s})),!this.language&&s&&!a){const i=$.getTracks.call(this),r=$.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=r.language,void $.set.call(this,i.indexOf(r))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=s),ee(this.elements.container,n,s),this.captions.toggled=s,F.updateSetting.call(this,"captions"),L.call(this,this.media,s?"captionsenabled":"captionsdisabled")}setTimeout(()=>{s&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,a=!0){const t=$.getTracks.call(this);if(e!==-1)if(y.number(e))if(e in t){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const n=t[e],{language:s}=n||{};this.captions.currentTrackNode=n,F.updateSetting.call(this,"captions"),a||(this.captions.language=s,this.storage.set({language:s})),this.isVimeo&&this.embed.enableTextTrack(s),L.call(this,this.media,"languagechange")}$.toggle.call(this,!0,a),this.isHTML5&&this.isVideo&&$.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else $.toggle.call(this,!1,a)},setLanguage(e,a=!0){if(!y.string(e))return void this.debug.warn("Invalid language argument",e);const t=e.toLowerCase();this.captions.language=t;const n=$.getTracks.call(this),s=$.findTrack.call(this,[t]);$.set.call(this,n.indexOf(s),a)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(a=>!this.isHTML5||e||this.captions.meta.has(a)).filter(a=>["captions","subtitles"].includes(a.kind))},findTrack(e,a=!1){const t=$.getTracks.call(this),n=r=>Number((this.captions.meta.get(r)||{}).default),s=Array.from(t).sort((r,l)=>n(l)-n(r));let i;return e.every(r=>(i=s.find(l=>l.language===r),!i)),i||(a?s[0]:void 0)},getCurrentTrack(){return $.getTracks.call(this)[this.currentTrack]},getLabel(e){let a=e;return!y.track(a)&&pe.textTracks&&this.captions.toggled&&(a=$.getCurrentTrack.call(this)),y.track(a)?y.empty(a.label)?y.empty(a.language)?Be.get("enabled",this.config):e.language.toUpperCase():a.label:Be.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!y.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!y.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let a=e;if(!a){const n=$.getCurrentTrack.call(this);a=Array.from((n||{}).activeCues||[]).map(s=>s.getCueAsHTML()).map(r5)}const t=a.map(n=>n.trim()).join(`
37
- `);if(t!==this.elements.captions.innerHTML){vo(this.elements.captions);const n=D("span",$e(this.config.selectors.caption));n.innerHTML=t,this.elements.captions.appendChild(n),L.call(this,this.media,"cuechange")}}},Rl={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:[]}},Nn={active:"picture-in-picture",inactive:"inline"},ut={html5:"html5",youtube:"youtube",vimeo:"vimeo"},vn={audio:"audio",video:"video"};function d5(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?ut.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?ut.vimeo:null}const Pn=()=>{};class m5{constructor(a=!1){this.enabled=window.console&&a,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Pn}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Pn}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Pn}}class Le{constructor(a){T(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;y.element(t)&&(t.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;L.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),T(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",ee(this.target,this.player.config.classNames.fullscreen.fallback,t),Se.isIos){let n=document.head.querySelector('meta[name="viewport"]');const s="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const i=y.string(n.content)&&n.content.includes(s);t?(this.cleanupViewport=!i,i||(n.content+=`,${s}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(r=>r.trim()!==s).join(","))}this.onChange()}),T(this,"trapFocus",t=>{if(Se.isIos||Se.isIPadOS||!this.active||t.key!=="Tab")return;const n=document.activeElement,s=qt.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[i]=s,r=s[s.length-1];n!==r||t.shiftKey?n===i&&t.shiftKey&&(r.focus(),t.preventDefault()):(i.focus(),t.preventDefault())}),T(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Le.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");ee(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),T(this,"enter",()=>{this.supported&&(Se.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Le.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?y.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),T(this,"exit",()=>{if(this.supported)if(Se.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),et(this.player.play());else if(!Le.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!y.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),T(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=a,this.prefix=Le.prefix,this.property=Le.property,this.scrollPosition={x:0,y:0},this.forceFallback=a.config.fullscreen.fallback==="force",this.player.elements.fullscreen=a.config.fullscreen.container&&XA(this.player.elements.container,a.config.fullscreen.container),_.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),_.call(this.player,this.player.elements.container,"dblclick",t=>{y.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),_.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Le.nativeSupported&&!this.forceFallback}static get prefix(){if(y.function(document.exitFullscreen))return"";let a="";return["webkit","moz","ms"].some(t=>!(!y.function(document[`${t}ExitFullscreen`])&&!y.function(document[`${t}CancelFullScreen`]))&&(a=t,!0)),a}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Le.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Le.nativeSupported||!Se.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Le.nativeSupported||this.forceFallback)return jo(this.target,this.player.config.classNames.fullscreen.fallback);const a=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return a&&a.shadowRoot?a===this.target.getRootNode().host:a===this.target}get target(){return Se.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Go(e,a=1){return new Promise((t,n)=>{const s=new Image,i=()=>{delete s.onload,delete s.onerror,(s.naturalWidth>=a?t:n)(s)};Object.assign(s,{onload:i,onerror:i,src:e})})}const oe={addStyleHook(){ee(this.elements.container,this.config.selectors.container.replace(".",""),!0),ee(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void oe.toggleNativeControls.call(this,!0);y.element(this.elements.controls)||(F.inject.call(this),this.listeners.controls()),oe.toggleNativeControls.call(this),this.isHTML5&&$.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,F.updateVolume.call(this),F.timeUpdate.call(this),F.durationUpdate.call(this),oe.checkPlaying.call(this),ee(this.elements.container,this.config.classNames.pip.supported,pe.pip&&this.isHTML5&&this.isVideo),ee(this.elements.container,this.config.classNames.airplay.supported,pe.airplay&&this.isHTML5),ee(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{L.call(this,this.media,"ready")},0),oe.setTitle.call(this),this.poster&&oe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&F.durationUpdate.call(this),this.config.mediaMetadata&&F.setMediaMetadata.call(this)},setTitle(){let e=Be.get("play",this.config);if(y.string(this.config.title)&&!y.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(a=>{a.setAttribute("aria-label",e)}),this.isEmbed){const a=be.call(this,"iframe");if(!y.element(a))return;const t=y.empty(this.config.title)?"video":this.config.title,n=Be.get("frameTitle",this.config);a.setAttribute("title",n.replace("{title}",t))}},togglePoster(e){ee(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,a=!0){return a&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),e5.call(this).then(()=>Go(e)).catch(t=>{throw e===this.poster&&oe.togglePoster.call(this,!1),t}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),oe.togglePoster.call(this,!0),e)))},checkPlaying(e){ee(this.elements.container,this.config.classNames.playing,this.playing),ee(this.elements.container,this.config.classNames.paused,this.paused),ee(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(a=>{Object.assign(a,{pressed:this.playing}),a.setAttribute("aria-label",Be.get(this.playing?"pause":"play",this.config))}),y.event(e)&&e.type==="timeupdate"||oe.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{ee(this.elements.container,this.config.classNames.loading,this.loading),oe.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:a}=this.elements;if(a&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||a.pressed||a.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!y.empty(e)&&y.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),y.empty(this.media.style)&&this.media.removeAttribute("style")}};class p5{constructor(a){T(this,"firstTouch",()=>{const{player:t}=this,{elements:n}=t;t.touch=!0,ee(n.container,t.config.classNames.isTouch,!0)}),T(this,"global",(t=!0)=>{const{player:n}=this;n.config.keyboard.global&&Zt.call(n,window,"keydown keyup",this.handleKey,t,!1),Zt.call(n,document.body,"click",this.toggleMenu,t),Rn.call(n,document.body,"touchstart",this.firstTouch)}),T(this,"container",()=>{const{player:t}=this,{config:n,elements:s,timers:i}=t;!n.keyboard.global&&n.keyboard.focused&&_.call(t,s.container,"keydown keyup",this.handleKey,!1),_.call(t,s.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",p=>{const{controls:c}=s;c&&p.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let d=0;["touchstart","touchmove","mousemove"].includes(p.type)&&(oe.toggleControls.call(t,!0),d=t.touch?3e3:2e3),clearTimeout(i.controls),i.controls=setTimeout(()=>oe.toggleControls.call(t,!1),d)});const r=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const p=s.wrapper,{active:c}=t.fullscreen,[d,u]=Tn.call(t),f=Al(`aspect-ratio: ${d} / ${u}`);if(!c)return void(f?(p.style.width=null,p.style.height=null):(p.style.maxWidth=null,p.style.margin=null));const[m,h]=t5(),g=m/h>d/u;f?(p.style.width=g?"auto":"100%",p.style.height=g?"100%":"auto"):(p.style.maxWidth=g?h/u*d+"px":null,p.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(i.resized),i.resized=setTimeout(r,50)};_.call(t,s.container,"enterfullscreen exitfullscreen",p=>{const{target:c}=t.fullscreen;c===s.container&&(!t.isEmbed&&y.empty(t.config.ratio)||(r(),(p.type==="enterfullscreen"?_:Io).call(t,window,"resize",l)))})}),T(this,"media",()=>{const{player:t}=this,{elements:n}=t;if(_.call(t,t.media,"timeupdate seeking seeked",i=>F.timeUpdate.call(t,i)),_.call(t,t.media,"durationchange loadeddata loadedmetadata",i=>F.durationUpdate.call(t,i)),_.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),_.call(t,t.media,"progress playing seeking seeked",i=>F.updateProgress.call(t,i)),_.call(t,t.media,"volumechange",i=>F.updateVolume.call(t,i)),_.call(t,t.media,"playing play pause ended emptied timeupdate",i=>oe.checkPlaying.call(t,i)),_.call(t,t.media,"waiting canplay seeked playing",i=>oe.checkLoading.call(t,i)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const i=be.call(t,`.${t.config.classNames.video}`);if(!y.element(i))return;_.call(t,n.container,"click",r=>{([n.container,i].includes(r.target)||i.contains(r.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(r,t.restart,"restart"),this.proxy(r,()=>{et(t.play())},"play")):this.proxy(r,()=>{et(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&_.call(t,n.wrapper,"contextmenu",i=>{i.preventDefault()},!1),_.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),_.call(t,t.media,"ratechange",()=>{F.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),_.call(t,t.media,"qualitychange",i=>{F.updateSetting.call(t,"quality",null,i.detail.quality)}),_.call(t,t.media,"ready qualitychange",()=>{F.setDownloadUrl.call(t)});const s=t.config.events.concat(["keyup","keydown"]).join(" ");_.call(t,t.media,s,i=>{let{detail:r={}}=i;i.type==="error"&&(r=t.media.error),L.call(t,n.container,i.type,!0,r)})}),T(this,"proxy",(t,n,s)=>{const{player:i}=this,r=i.config.listeners[s];let l=!0;y.function(r)&&(l=r.call(i,t)),l!==!1&&y.function(n)&&n.call(i,t)}),T(this,"bind",(t,n,s,i,r=!0)=>{const{player:l}=this,p=l.config.listeners[i],c=y.function(p);_.call(l,t,n,d=>this.proxy(d,s,i),r&&!c)}),T(this,"controls",()=>{const{player:t}=this,{elements:n}=t,s=Se.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(i=>{this.bind(i,"click",()=>{et(t.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{L.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",i=>{i.stopPropagation(),i.preventDefault(),F.toggleMenu.call(t,i)},null,!1),this.bind(n.buttons.settings,"keyup",i=>{[" ","Enter"].includes(i.key)&&(i.key!=="Enter"?(i.preventDefault(),i.stopPropagation(),F.toggleMenu.call(t,i)):F.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",i=>{i.key==="Escape"&&F.toggleMenu.call(t,i)}),this.bind(n.inputs.seek,"mousedown mousemove",i=>{const r=n.progress.getBoundingClientRect(),l=100/r.width*(i.pageX-r.left);i.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",i=>{const r=i.currentTarget,l="play-on-seeked";if(y.keyboardEvent(i)&&!["ArrowLeft","ArrowRight"].includes(i.key))return;t.lastSeekTime=Date.now();const p=r.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(i.type);p&&c?(r.removeAttribute(l),et(t.play())):!c&&t.playing&&(r.setAttribute(l,""),t.pause())}),Se.isIos){const i=qt.call(t,'input[type="range"]');Array.from(i).forEach(r=>this.bind(r,s,l=>hl(l.target)))}this.bind(n.inputs.seek,s,i=>{const r=i.currentTarget;let l=r.getAttribute("seek-value");y.empty(l)&&(l=r.value),r.removeAttribute("seek-value"),t.currentTime=l/r.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",i=>F.updateSeekTooltip.call(t,i)),this.bind(n.progress,"mousemove touchmove",i=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startMove(i)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:i}=t;i&&i.loaded&&i.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",i=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startScrubbing(i)}),this.bind(n.progress,"mouseup touchend",i=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endScrubbing(i)}),Se.isWebKit&&Array.from(qt.call(t,'input[type="range"]')).forEach(i=>{this.bind(i,"input",r=>F.updateRangeFill.call(t,r.target))}),t.config.toggleInvert&&!y.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,F.timeUpdate.call(t))}),this.bind(n.inputs.volume,s,i=>{t.volume=i.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",i=>{n.controls.hover=!t.touch&&i.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(i=>!i.contains(n.container)).forEach(i=>{this.bind(i,"mouseenter mouseleave",r=>{n.controls&&(n.controls.hover=!t.touch&&r.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",i=>{n.controls.pressed=["mousedown","touchstart"].includes(i.type)}),this.bind(n.controls,"focusin",()=>{const{config:i,timers:r}=t;ee(n.controls,i.classNames.noTransition,!0),oe.toggleControls.call(t,!0),setTimeout(()=>{ee(n.controls,i.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>oe.toggleControls.call(t,!1),l)}),this.bind(n.inputs.volume,"wheel",i=>{const r=i.webkitDirectionInvertedFromDevice,[l,p]=[i.deltaX,-i.deltaY].map(u=>r?-u:u),c=Math.sign(Math.abs(l)>Math.abs(p)?l:p);t.increaseVolume(c/50);const{volume:d}=t.media;(c===1&&d<1||c===-1&&d>0)&&i.preventDefault()},"volume",!1)}),this.player=a,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(a){const{player:t}=this,{elements:n}=t,{key:s,type:i,altKey:r,ctrlKey:l,metaKey:p,shiftKey:c}=a,d=i==="keydown",u=d&&s===this.lastKey;if(!(r||l||p||c)&&s){if(d){const m=document.activeElement;if(y.element(m)){const{editable:h}=t.config.selectors,{seek:g}=n.inputs;if(m!==g&&yt(m,h)||a.key===" "&&yt(m,'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(s)&&(a.preventDefault(),a.stopPropagation()),s){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":u||(f=parseInt(s,10),t.currentTime=t.duration/10*f);break;case" ":case"k":u||et(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":u||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":u||t.toggleCaptions();break;case"l":t.loop=!t.loop}s==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=s}else this.lastKey=null;var f}}toggleMenu(a){F.toggleMenu.call(this.player,a)}}function u5(e,a){return e(a={exports:{}},a.exports),a.exports}var h5=u5(function(e,a){e.exports=function(){var t=function(){},n={},s={},i={};function r(f,m){f=f.push?f:[f];var h,g,b,A=[],C=f.length,z=C;for(h=function(P,K){K.length&&A.push(P),--z||m(A)};C--;)g=f[C],(b=s[g])?h(g,b):(i[g]=i[g]||[]).push(h)}function l(f,m){if(f){var h=i[f];if(s[f]=m,h)for(;h.length;)h[0](f,m),h.splice(0,1)}}function p(f,m){f.call&&(f={success:f}),m.length?(f.error||t)(m):(f.success||t)(f)}function c(f,m,h,g){var b,A,C=document,z=h.async,P=(h.numRetries||0)+1,K=h.before||t,Z=f.replace(/[\?|#].*$/,""),G=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(Z)?((A=C.createElement("link")).rel="stylesheet",A.href=G,(b="hideFocus"in A)&&A.relList&&(b=0,A.rel="preload",A.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(Z)?(A=C.createElement("img")).src=G:((A=C.createElement("script")).src=f,A.async=z===void 0||z),A.onload=A.onerror=A.onbeforeload=function(re){var V=re.type[0];if(b)try{A.sheet.cssText.length||(V="e")}catch(ae){ae.code!=18&&(V="e")}if(V=="e"){if((g+=1)<P)return c(f,m,h,g)}else if(A.rel=="preload"&&A.as=="style")return A.rel="stylesheet";m(f,V,re.defaultPrevented)},K(f,A)!==!1&&C.head.appendChild(A)}function d(f,m,h){var g,b,A=(f=f.push?f:[f]).length,C=A,z=[];for(g=function(P,K,Z){if(K=="e"&&z.push(P),K=="b"){if(!Z)return;z.push(P)}--A||m(z)},b=0;b<C;b++)c(f[b],g,h)}function u(f,m,h){var g,b;if(m&&m.trim&&(g=m),b=(g?h:m)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function A(C,z){d(f,function(P){p(b,P),C&&p({success:C,error:z},P),l(g,P)},b)}if(b.returnPromise)return new Promise(A);A()}return u.ready=function(f,m){return r(f,function(h){p(m,h)}),u},u.done=function(f){l(f,[])},u.reset=function(){n={},s={},i={}},u.isDefined=function(f){return f in n},u}()});function jn(e){return new Promise((a,t)=>{h5(e,{success:a,error:t})})}function g5(e){return y.empty(e)?null:y.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function f5(e){const a=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return a&&a.length===5?a[4]:null}function Jt(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,L.call(this,this.media,e?"play":"pause"))}const In={setup(){const e=this;ee(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,Et.call(e),y.object(window.Vimeo)?In.ready.call(e):jn(e.config.urls.vimeo.sdk).then(()=>{In.ready.call(e)}).catch(a=>{e.debug.warn("Vimeo SDK (player.js) failed to load",a)})},ready(){const e=this,a=e.config.vimeo,{premium:t,referrerPolicy:n,...s}=a;let i=e.media.getAttribute("src"),r="";y.empty(i)?(i=e.media.getAttribute(e.config.attributes.embed.id),r=e.media.getAttribute(e.config.attributes.embed.hash)):r=f5(i);const l=r?{h:r}:{};t&&Object.assign(s,{controls:!1,sidedock:!1});const p=Ml({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...l,...s}),c=g5(i),d=D("iframe"),u=Vn(e.config.urls.vimeo.iframe,c,p);if(d.setAttribute("src",u),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),y.empty(n)||d.setAttribute("referrerPolicy",n),t||!a.customControls)d.setAttribute("data-poster",e.poster),e.media=Po(d,e.media);else{const C=D("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});C.appendChild(d),e.media=Po(C,e.media)}a.customControls||Wt(Vn(e.config.urls.vimeo.api,u)).then(C=>{!y.empty(C)&&C.thumbnail_url&&oe.setPoster.call(e,C.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(Jt.call(e,!0),e.embed.play()),e.media.pause=()=>(Jt.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:f}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>f,set(C){const{embed:z,media:P,paused:K,volume:Z}=e,G=K&&!z.hasPlayed;P.seeking=!0,L.call(e,P,"seeking"),Promise.resolve(G&&z.setVolume(0)).then(()=>z.setCurrentTime(C)).then(()=>G&&z.pause()).then(()=>G&&z.setVolume(Z)).catch(()=>{})}});let m=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>m,set(C){e.embed.setPlaybackRate(C).then(()=>{m=C,L.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:h}=e.config;Object.defineProperty(e.media,"volume",{get:()=>h,set(C){e.embed.setVolume(C).then(()=>{h=C,L.call(e,e.media,"volumechange")})}});let{muted:g}=e.config;Object.defineProperty(e.media,"muted",{get:()=>g,set(C){const z=!!y.boolean(C)&&C;e.embed.setMuted(!!z||e.config.muted).then(()=>{g=z,L.call(e,e.media,"volumechange")})}});let b,{loop:A}=e.config;Object.defineProperty(e.media,"loop",{get:()=>A,set(C){const z=y.boolean(C)?C:e.config.loop.active;e.embed.setLoop(z).then(()=>{A=z})}}),e.embed.getVideoUrl().then(C=>{b=C,F.setDownloadUrl.call(e)}).catch(C=>{this.debug.warn(C)}),Object.defineProperty(e.media,"currentSrc",{get:()=>b}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(C=>{const[z,P]=C;e.embed.ratio=Sl(z,P),Et.call(this)}),e.embed.setAutopause(e.config.autopause).then(C=>{e.config.autopause=C}),e.embed.getVideoTitle().then(C=>{e.config.title=C,oe.setTitle.call(this)}),e.embed.getCurrentTime().then(C=>{f=C,L.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(C=>{e.media.duration=C,L.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(C=>{e.media.textTracks=C,$.setup.call(e)}),e.embed.on("cuechange",({cues:C=[]})=>{const z=C.map(P=>s5(P.text));$.updateCues.call(e,z)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(C=>{Jt.call(e,!C),C||L.call(e,e.media,"playing")}),y.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{L.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{L.call(e,e.media,"playing")}),e.embed.on("play",()=>{Jt.call(e,!0),L.call(e,e.media,"playing")}),e.embed.on("pause",()=>{Jt.call(e,!1)}),e.embed.on("timeupdate",C=>{e.media.seeking=!1,f=C.seconds,L.call(e,e.media,"timeupdate")}),e.embed.on("progress",C=>{e.media.buffered=C.percent,L.call(e,e.media,"progress"),parseInt(C.percent,10)===1&&L.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(z=>{z!==e.media.duration&&(e.media.duration=z,L.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,L.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,L.call(e,e.media,"ended")}),e.embed.on("error",C=>{e.media.error=C,L.call(e,e.media,"error")}),a.customControls&&setTimeout(()=>oe.build.call(e),0)}};function y5(e){return y.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function Xt(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,L.call(this,this.media,e?"play":"pause"))}function b5(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ho={setup(){if(ee(this.elements.wrapper,this.config.classNames.embed,!0),y.object(window.YT)&&y.function(window.YT.Player))Ho.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{y.function(e)&&e(),Ho.ready.call(this)},jn(this.config.urls.youtube.sdk).catch(a=>{this.debug.warn("YouTube API failed to load",a)})}},getTitle(e){Wt(Vn(this.config.urls.youtube.api,e)).then(a=>{if(y.object(a)){const{title:t,height:n,width:s}=a;this.config.title=t,oe.setTitle.call(this),this.embed.ratio=Sl(s,n)}Et.call(this)}).catch(()=>{Et.call(this)})},ready(){const e=this,a=e.config.youtube,t=e.media&&e.media.getAttribute("id");if(!y.empty(t)&&t.startsWith("youtube-"))return;let n=e.media.getAttribute("src");y.empty(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));const s=y5(n),i=D("div",{id:o5(e.provider),"data-poster":a.customControls?e.poster:void 0});if(e.media=Po(i,e.media),a.customControls){const r=l=>`https://i.ytimg.com/vi/${s}/${l}default.jpg`;Go(r("maxres"),121).catch(()=>Go(r("sd"),121)).catch(()=>Go(r("hq"))).then(l=>oe.setPoster.call(e,l.src)).then(l=>{l.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:s,host:b5(a),playerVars:me({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&a.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},a),events:{onError(r){if(!e.media.error){const l=r.data,p={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";e.media.error={code:l,message:p},L.call(e,e.media,"error")}},onPlaybackRateChange(r){const l=r.target;e.media.playbackRate=l.getPlaybackRate(),L.call(e,e.media,"ratechange")},onReady(r){if(y.function(e.media.play))return;const l=r.target;Ho.getTitle.call(e,s),e.media.play=()=>{Xt.call(e,!0),l.playVideo()},e.media.pause=()=>{Xt.call(e,!1),l.pauseVideo()},e.media.stop=()=>{l.stopVideo()},e.media.duration=l.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(u){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,L.call(e,e.media,"seeking"),l.seekTo(u)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(u){l.setPlaybackRate(u)}});let{volume:p}=e.config;Object.defineProperty(e.media,"volume",{get:()=>p,set(u){p=u,l.setVolume(100*p),L.call(e,e.media,"volumechange")}});let{muted:c}=e.config;Object.defineProperty(e.media,"muted",{get:()=>c,set(u){const f=y.boolean(u)?u:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*p),L.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const d=l.getAvailablePlaybackRates();e.options.speed=d.filter(u=>e.config.speed.options.includes(u)),e.supported.ui&&a.customControls&&e.media.setAttribute("tabindex",-1),L.call(e,e.media,"timeupdate"),L.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=l.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&L.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),L.call(e,e.media,"canplaythrough"))},200),a.customControls&&setTimeout(()=>oe.build.call(e),50)},onStateChange(r){const l=r.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(r.data)&&(e.media.seeking=!1,L.call(e,e.media,"seeked")),r.data){case-1:L.call(e,e.media,"timeupdate"),e.media.buffered=l.getVideoLoadedFraction(),L.call(e,e.media,"progress");break;case 0:Xt.call(e,!1),e.media.loop?(l.stopVideo(),l.playVideo()):L.call(e,e.media,"ended");break;case 1:a.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(Xt.call(e,!0),L.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{L.call(e,e.media,"timeupdate")},50),e.media.duration!==l.getDuration()&&(e.media.duration=l.getDuration(),L.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),Xt.call(e,!1);break;case 3:L.call(e,e.media,"waiting")}L.call(e,e.elements.container,"statechange",!1,{code:r.data})}}})}},Fl={setup(){this.media?(ee(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),ee(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&ee(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=D("div",{class:this.config.classNames.video}),fl(this.media,this.elements.wrapper),this.elements.poster=D("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?pt.setup.call(this):this.isYouTube?Ho.setup.call(this):this.isVimeo&&In.setup.call(this)):this.debug.warn("No media element found!")}};class w5{constructor(a){T(this,"load",()=>{this.enabled&&(y.object(window.google)&&y.object(window.google.ima)?this.ready():jn(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),T(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),T(this,"setupIMA",()=>{this.elements.container=D("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),T(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),T(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Do(Math.max(this.manager.getRemainingTime(),0)),s=`${Be.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",s)},100)}),T(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,s=>this.onAdError(s)),Object.keys(google.ima.AdEvent.Type).forEach(s=>{this.manager.addEventListener(google.ima.AdEvent.Type[s],i=>this.onAdEvent(i))}),this.trigger("loaded")}),T(this,"addCuePoints",()=>{y.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const n=this.player.elements.progress;if(y.element(n)){const s=100/this.player.duration*t,i=D("span",{class:this.player.config.classNames.cues});i.style.left=`${s.toString()}%`,n.appendChild(i)}}})}),T(this,"onAdEvent",t=>{const{container:n}=this.player.elements,s=t.getAd(),i=t.getAdData();switch((r=>{L.call(this.player,this.player.media,`ads${r.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),s.isLinear()||(s.width=n.offsetWidth,s.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:i.adError&&this.player.debug.warn(`Non-fatal ad error: ${i.adError.getMessage()}`)}}),T(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),T(this,"listeners",()=>{const{container:t}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const s=this.player.currentTime;y.empty(this.cuePoints)||this.cuePoints.forEach((i,r)=>{n<i&&i<s&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),T(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),T(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,et(this.player.media.play())}),T(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),T(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),T(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),T(this,"trigger",(t,...n)=>{const s=this.events[t];y.array(s)&&s.forEach(i=>{y.function(i)&&i.apply(this,n)})}),T(this,"on",(t,n)=>(y.array(this.events[t])||(this.events[t]=[]),this.events[t].push(n),this)),T(this,"startSafetyTimer",(t,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),T(this,"clearSafetyTimer",t=>{y.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=a,this.config=a.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,n)=>{this.on("loaded",t),this.on("error",n)}),this.load()}get enabled(){const{config:a}=this;return this.player.isHTML5&&this.player.isVideo&&a.enabled&&(!y.empty(a.publisherId)||y.url(a.tagUrl))}get tagUrl(){const{config:a}=this;return y.url(a.tagUrl)?a.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Ml({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:a.publisherId})}`}}function Tl(e=0,a=0,t=255){return Math.min(Math.max(e,a),t)}const A5=e=>{const a=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const n={};t.split(/\r\n|\n|\r/).forEach(s=>{if(y.number(n.startTime)){if(!y.empty(s.trim())&&y.empty(n.text)){const i=s.trim().split("#xywh=");[n.text]=i,i[1]&&([n.x,n.y,n.w,n.h]=i[1].split(","))}}else{const i=s.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})/);i&&(n.startTime=60*Number(i[1]||0)*60+60*Number(i[2])+Number(i[3])+ +`0.${i[4]}`,n.endTime=60*Number(i[6]||0)*60+60*Number(i[7])+Number(i[8])+ +`0.${i[9]}`)}}),n.text&&a.push(n)}),a},Vl=(e,a)=>{const t={};return e>a.width/a.height?(t.width=a.width,t.height=1/e*a.width):(t.height=a.height,t.width=e*a.height),t};class Un{constructor(a){T(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)})}),T(this,"getThumbnails",()=>new Promise(t=>{const{src:n}=this.player.config.previewThumbnails;if(y.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const s=()=>{this.thumbnails.sort((i,r)=>i.height-r.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(y.function(n))n(i=>{this.thumbnails=i,s()});else{const i=(y.string(n)?[n]:n).map(r=>this.getThumbnail(r));Promise.all(i).then(s)}})),T(this,"getThumbnail",t=>new Promise(n=>{Wt(t).then(s=>{const i={frames:A5(s),height:null,urlPrefix:""};i.frames[0].text.startsWith("/")||i.frames[0].text.startsWith("http://")||i.frames[0].text.startsWith("https://")||(i.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{i.height=r.naturalHeight,i.width=r.naturalWidth,this.thumbnails.push(i),n()},r.src=i.urlPrefix+i.frames[0].text})})),T(this,"startMove",t=>{if(this.loaded&&y.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,s;const i=this.player.elements.progress.getBoundingClientRect(),r=100/i.width*(t.pageX-i.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=t.pageX,this.elements.thumb.time.innerText=Do(this.seekTime);const l=(n=this.player.config.markers)===null||n===void 0||(s=n.points)===null||s===void 0?void 0:s.find(({time:p})=>p===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),T(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),T(this,"startScrubbing",t=>{(y.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),T(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Rn.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),T(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})}),T(this,"render",()=>{this.elements.thumb.container=D("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=D("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=D("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=D("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),y.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=D("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),T(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),T(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(i=>this.seekTime>=i.startTime&&this.seekTime<=i.endTime),n=t>=0;let s=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((i,r)=>{this.loadedImages.includes(i.frames[t].text)&&(s=r)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(s)))}),T(this,"loadImage",(t=0)=>{const n=this.showingThumb,s=this.thumbnails[t],{urlPrefix:i}=s,r=s.frames[n],l=s.frames[n].text,p=i+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,r,t,n,l,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=p,c.dataset.index=n,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${p}`),c.onload=()=>this.showImage(c,r,t,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),T(this,"showImage",(t,n,s,i,r,l=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${i}. qual: ${s}. newimg: ${l}`),this.setImageSizeAndOffset(t,n),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(i,!0).then(this.preloadNearby(i,!1)).then(this.getHigherQuality(s,t,n,r))}),T(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const s=this.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:i}=this;setTimeout(()=>{i.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},s)}})}),T(this,"preloadNearby",(t,n=!0)=>new Promise(s=>{setTimeout(()=>{const i=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===i){let r;r=n?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;r.forEach(p=>{const c=p.text;if(c!==i&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:d}=this.thumbnails[0],u=d+c,f=new Image;f.src=u,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),s()}}}),l||s()}},300)})),T(this,"getHigherQuality",(t,n,s,i)=>{if(t<this.thumbnails.length-1){let r=n.naturalHeight;this.usingSprites&&(r=s.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===i&&(this.player.debug.log(`Showing higher quality thumb for: ${i}`),this.loadImage(t+1))},300)}}),T(this,"toggleThumbContainer",(t=!1,n=!1)=>{const s=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(s,t),!t&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),T(this,"toggleScrubbingContainer",(t=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),T(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),T(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const n=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${n}px`}else if(t.clientHeight<20&&t.clientWidth>20){const n=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${n}px`}this.setThumbContainerPos()}),T(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:s}=this.elements.thumb,i=n.left-t.left+10,r=n.right-t.left-s.clientWidth-10,l=this.mousePosX-t.left-s.clientWidth/2,p=Tl(l,i,r);s.style.left=`${p}px`,s.style.setProperty("--preview-arrow-offset",l-p+"px")}),T(this,"setScrubbingContainerSize",()=>{const{width:t,height:n}=Vl(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${n}px`}),T(this,"setImageSizeAndOffset",(t,n)=>{if(!this.usingSprites)return;const s=this.thumbContainerHeight/n.h;t.style.height=t.naturalHeight*s+"px",t.style.width=t.naturalWidth*s+"px",t.style.left=`-${n.x*s}px`,t.style.top=`-${n.y*s}px`}),this.player=a,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:a}=Vl(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return a}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(a){this.mouseDown?this.currentScrubbingImageElement=a:this.currentThumbnailImageElement=a}}const Dn={insertElements(e,a){y.string(a)?yl(e,this.media,{src:a}):y.array(a)&&a.forEach(t=>{yl(e,this.media,t)})},change(e){gl(e,"sources.length")?(pt.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],rt(this.media),this.media=null,y.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:a,type:t}=e,[{provider:n=ut.html5,src:s}]=a,i=n==="html5"?t:"div",r=n==="html5"?{}:{src:s};Object.assign(this,{provider:n,type:t,supported:pe.check(t,n,this.config.playsinline),media:D(i,r)}),this.elements.container.appendChild(this.media),y.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),y.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),oe.addStyleHook.call(this),this.isHTML5&&Dn.insertElements.call(this,"source",a),this.config.title=e.title,Fl.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&Dn.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&oe.build.call(this),this.isHTML5&&this.media.load(),y.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Un(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class _t{constructor(a,t){if(T(this,"play",()=>y.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>et(this.media.play())),this.media.play()):null),T(this,"pause",()=>this.playing&&y.function(this.media.pause)?this.media.pause():null),T(this,"togglePlay",l=>(y.boolean(l)?l:!this.playing)?this.play():this.pause()),T(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):y.function(this.media.stop)&&this.media.stop()}),T(this,"restart",()=>{this.currentTime=0}),T(this,"rewind",l=>{this.currentTime-=y.number(l)?l:this.config.seekTime}),T(this,"forward",l=>{this.currentTime+=y.number(l)?l:this.config.seekTime}),T(this,"increaseVolume",l=>{const p=this.media.muted?0:this.volume;this.volume=p+(y.number(l)?l:0)}),T(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),T(this,"airplay",()=>{pe.airplay&&this.media.webkitShowPlaybackTargetPicker()}),T(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const p=jo(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,d=ee(this.elements.container,this.config.classNames.hideControls,c);if(d&&y.array(this.config.controls)&&this.config.controls.includes("settings")&&!y.empty(this.config.settings)&&F.toggleMenu.call(this,!1),d!==p){const u=d?"controlshidden":"controlsshown";L.call(this,this.media,u)}return!d}return!1}),T(this,"on",(l,p)=>{_.call(this,this.elements.container,l,p)}),T(this,"once",(l,p)=>{Rn.call(this,this.elements.container,l,p)}),T(this,"off",(l,p)=>{Io(this.elements.container,l,p)}),T(this,"destroy",(l,p=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,p?(Object.keys(this.elements).length&&(rt(this.elements.buttons.play),rt(this.elements.captions),rt(this.elements.controls),rt(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),y.function(l)&&l()):($A.call(this),pt.cancelRequests.call(this),Po(this.elements.original,this.elements.container),L.call(this,this.elements.original,"destroyed",!0),y.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(oe.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&y.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),T(this,"supports",l=>pe.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=pe.touch,this.media=a,y.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||y.nodeList(this.media)||y.array(this.media))&&(this.media=this.media[0]),this.config=me({},Rl,_t.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new m5(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",pe),y.nullOrUndefined(this.media)||!y.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(!pe.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 s=this.media.tagName.toLowerCase();let i=null,r=null;switch(s){case"div":if(i=this.media.querySelector("iframe"),y.element(i)){if(r=zl(i.getAttribute("src")),this.provider=d5(r.toString()),this.elements.container=this.media,this.media=i,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(y.empty(this.provider)||!Object.values(ut).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=vn.video;break;case"video":case"audio":this.type=s,this.provider=ut.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=pe.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new p5(this),this.storage=new Yt(this),this.media.plyr=this,y.element(this.elements.container)||(this.elements.container=D("div"),fl(this.media,this.elements.container)),oe.migrateStyles.call(this),oe.addStyleHook.call(this),Fl.setup.call(this),this.config.debug&&_.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Le(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&oe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new w5(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>et(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Un(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===ut.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===ut.youtube}get isVimeo(){return this.provider===ut.vimeo}get isVideo(){return this.type===vn.video}get isAudio(){return this.type===vn.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(a){if(!this.duration)return;const t=y.number(a)&&a>0;this.media.currentTime=t?Math.min(a,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:a}=this.media;return y.number(a)?a:a&&a.length&&this.duration>0?a.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const a=parseFloat(this.config.duration),t=(this.media||{}).duration,n=y.number(t)&&t!==1/0?t:0;return a||n}set volume(a){let t=a;y.string(t)&&(t=Number(t)),y.number(t)||(t=this.storage.get("volume")),y.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!y.empty(a)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(a){let t=a;y.boolean(t)||(t=this.storage.get("muted")),y.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(a){let t=null;y.number(a)&&(t=a),y.number(t)||(t=this.storage.get("speed")),y.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:s}=this;t=Tl(t,n,s),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(a){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let s=[!y.empty(a)&&Number(a),this.storage.get("quality"),t.selected,t.default].find(y.number),i=!0;if(!n.includes(s)){const r=wl(n,s);this.debug.warn(`Unsupported quality option: ${s}, using ${r} instead`),s=r,i=!1}t.selected=s,this.media.quality=s,i&&this.storage.set({quality:s})}get quality(){return this.media.quality}set loop(a){const t=y.boolean(a)?a:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(a){Dn.change.call(this,a)}get source(){return this.media.currentSrc}get download(){const{download:a}=this.config.urls;return y.url(a)?a:this.source}set download(a){y.url(a)&&(this.config.urls.download=a,F.setDownloadUrl.call(this))}set poster(a){this.isVideo?oe.setPoster.call(this,a,!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 a=Uo(Tn.call(this));return y.array(a)?a.join(":"):a}set ratio(a){this.isVideo?y.string(a)&&kl(a)?(this.config.ratio=Uo(a),Et.call(this)):this.debug.error(`Invalid aspect ratio specified (${a})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(a){this.config.autoplay=y.boolean(a)?a:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(a){$.toggle.call(this,a,!1)}set currentTrack(a){$.set.call(this,a,!1),$.setup.call(this)}get currentTrack(){const{toggled:a,currentTrack:t}=this.captions;return a?t:-1}set language(a){$.setLanguage.call(this,a,!1)}get language(){return($.getCurrentTrack.call(this)||{}).language}set pip(a){if(!pe.pip)return;const t=y.boolean(a)?a:!this.pip;y.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Nn.active:Nn.inactive),y.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return pe.pip?y.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Nn.active:null}setPreviewThumbnails(a){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,a),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Un(this))}static supported(a,t){return pe.check(a,t)}static loadSprite(a,t){return El(a,t)}static setup(a,t={}){let n=null;return y.string(a)?n=Array.from(document.querySelectorAll(a)):y.nodeList(a)?n=Array.from(a):y.array(a)&&(n=a.filter(y.element)),y.empty(n)?null:n.map(s=>new _t(s,t))}}_t.defaults=WA(Rl);const C5={key:0,class:"carousel-video-player__play-info"},k5={class:"carousel-video-player__play-info__date"},S5={class:"carousel-video-player__play-info__data"},B5={class:"video-container"},O5=["id"],E5=xe({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1}},emits:["play-ended"],setup(e,{emit:a}){const t=e,n=o.ref(null),s=o.ref(!1),i=o.computed(()=>`p-${t.play.playId||t.play.play_id}`),r=o.computed(()=>{const d=new Date(t.play.gameDate);return`${d.getDate()}, ${fA(d.getMonth())} ${d.getFullYear()}`}),l=o.computed(()=>{const d=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${d[0]} : ${d[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`});function p(){n.value=new _t(`#${i.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=t.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=t.play.endSeconds&&(n.value.pause(),n.value.currentTime=t.play.startSeconds,a("play-ended"))})),n.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,t.play.videoPlayer=n.value,t.play.plyrInit=p,n.value.on("webkitfullscreenchange",c()),n.value.on("mozfullscreenchange",c()),n.value.on("fullscreenchange",c())}function c(){const d=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{d.$emit("full-screen-change")},100)}}return o.onMounted(()=>{setTimeout(()=>{p()},100)}),(d,u)=>(o.openBlock(),o.createElementBlock("div",{class:"carousel-video-player",onMouseenter:u[0]||(u[0]=f=>s.value=!0),onMouseleave:u[1]||(u[1]=f=>s.value=!1)},[e.isPlaySeeker?o.withDirectives((o.openBlock(),o.createElementBlock("div",C5,[o.createElementVNode("div",k5,o.toDisplayString(r.value),1),o.createElementVNode("div",S5,o.toDisplayString(l.value),1)],512)),[[o.vShow,s.value]]):o.createCommentVNode("",!0),o.createElementVNode("div",B5,[o.createElementVNode("video",{id:i.value,controls:"",preload:"auto","data-setup":"{}"},null,8,O5)])],32))}},[["__scopeId","data-v-c7d609cc"]]),Gn=e=>(o.pushScopeId("data-v-708906a5"),e=e(),o.popScopeId(),e),x5=[Gn(()=>o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[o.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),o.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],z5={class:"carousel-full-screen__carousel"},M5={key:0,class:"icon-mobil-scrren"},R5=[Gn(()=>o.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Gn(()=>o.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[o.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),o.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],F5={class:"carousel-full-screen__carousel__video-player"},Hn=2,T5=xe({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:a}){const t=e;let n=0,s=new Map;const i=o.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=o.ref(null),l=o.ref([]);o.watch(()=>t.playerQueue,A=>{A.length&&(l.value=A.map((C,z)=>(C.index=z,{...C})),n=t.playlistIndex,s=new Map(l.value.map(C=>[C.index,C])))},{immediate:!0});function p(){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 d({selectedItem:A}){if(n!==A.index){const C=A.index-n;n=A.index;const z=s.get(n+C*-1),P=s.get(n);if(z&&z.videoPlayer&&(z.videoPlayer.pause(),z.videoPlayer.currentTime=0),P&&P.videoPlayer&&P.videoPlayer.play(),C>0){const K=s.get(n+Hn),Z=s.get(n+1),G=s.get(n-Hn);K&&(l.value.find(re=>re.index===K.index)||l.value.push(K)),Z&&Z.videoPlayer&&Z.videoPlayer.isDestroyed&&Z.plyrInit(),G&&G.videoPlayer&&(G.videoPlayer.pause(),G.videoPlayer.src="",G.videoPlayer.destroy(),G.videoPlayer.isDestroyed=!0)}else if(C<0){const K=s.get(n-1),Z=s.get(n+Hn);K&&K.videoPlayer&&K.videoPlayer.isDestroyed&&K.plyrInit(),Z&&Z.videoPlayer&&(Z.videoPlayer.pause(),Z.videoPlayer.src="",Z.videoPlayer.destroy(),Z.videoPlayer.isDestroyed=!0)}}}function u(){r.value&&r.value.next()}function f(){a("close",n)}const m=o.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),h=o.computed(()=>m.portrait);function g(){var A=window.matchMedia("(orientation: portrait)");A.matches?m.portrait=!0:m.portrait=!1}function b(){window.screen.orientation.angle!=90?m.portrait=!0:m.portrait=!1}return o.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",b),b()),setTimeout(()=>{const A=document.getElementsByClassName("video-element");A&&A.length&&Array.from(A).forEach((C,z)=>{C.id=`plyrFS${z+1}`})},100)}),o.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",b),t.playerQueue.forEach(A=>{A.videoPlayer&&(A.videoPlayer.pause(),A.videoPlayer.destroy())})}),(A,C)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["carousel-full-screen",c()&&!h.value?"paddingIos":""]),id:"carousel-swipe"},[o.createElementVNode("div",{class:"carousel-full-screen__close",onClick:f},x5),o.createElementVNode("div",z5,[h.value&&p()?(o.openBlock(),o.createElementBlock("div",M5,R5)):o.createCommentVNode("",!0),o.createVNode(o.unref(hA),o.mergeProps({ref_key:"gscCarousel",ref:r},i.value,{items:l.value,onInput:d}),{default:o.withCtx(({item:z})=>[o.createElementVNode("div",F5,[o.createVNode(E5,{play:z,"is-play-seeker":e.isPlaySeeker,onPlayEnded:u},null,8,["play","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-708906a5"]]),Nl={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},vl={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Pl={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},V5=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},Ln={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},jl=()=>{o.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Il=Ln.setup;Ln.setup=Il?(e,a)=>(jl(),Il(e,a)):jl;const N5=e=>(o.pushScopeId("data-v-fb269a1e"),e=e(),o.popScopeId(),e),v5=["src"],P5={key:1,class:"text"},j5=["src"],I5={class:"stats"},U5=N5(()=>o.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),D5={class:"numstats"},G5={class:"leyend"};function H5(e,a,t,n,s,i){return o.openBlock(),o.createElementBlock("div",null,[t.type==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["button",s.status&&t.typeOnOff&&"button-active"]),style:o.normalizeStyle([i.customStyle,s.status&&t.typeOnOff&&i.customActive]),onClick:a[0]||(a[0]=(...r)=>i.btnClick&&i.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(o.openBlock(),o.createElementBlock("img",{key:0,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,v5)):o.createCommentVNode("",!0),t.textValue?(o.openBlock(),o.createElementBlock("div",P5,o.toDisplayString(t.textValue),1)):o.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(o.openBlock(),o.createElementBlock("img",{key:2,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,j5)):o.createCommentVNode("",!0)],6)):o.createCommentVNode("",!0),t.type==1?(o.openBlock(),o.createElementBlock("div",{key:1,class:"button-target",onClick:a[1]||(a[1]=(...r)=>i.btnClick&&i.btnClick(...r))},[o.createElementVNode("div",I5,[U5,o.createElementVNode("div",D5,o.toDisplayString(t.textStat),1)]),o.createElementVNode("div",G5,o.toDisplayString(t.textCategory),1)])):o.createCommentVNode("",!0)])}const L5=V5(Ln,[["render",H5],["__scopeId","data-v-fb269a1e"]]),K5={class:"gsc-dropdown__main-container__item-selected"},q5=["height","width"],Z5=["stroke"],Q5={class:"gsc-dropdown__items-container"},Y5=["onClick"],W5={key:0,class:"gsc-dropdown__items-footer"},J5={__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(e){return["solid","dotted","dashed"].includes(e)}},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:e=>["propName","value"].every(a=>a in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:a}){const t=e,n=o.ref({}),s=o.ref(null),i=o.ref(t.isMultipleOption?-1:0),r=o.ref(!1);o.watch(()=>t.items,(m,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&m&&m.length){if(t.defaultItemByProp){const g=t.items.findIndex(b=>b[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(i.value=g,n.value=m[g]):(i.value=0,n.value=m[0])}else n.value=m[t.defaultItemByIndex];a("input",n.value)}},{immediate:!0}),o.watch(()=>t.modelValue,m=>{if(m){const h=t.items.findIndex(g=>typeof m=="object"?JSON.stringify(g)===JSON.stringify(m):g===m);h!==-1&&(i.value=h,n.value=t.items[h],a("update:modelValue",n.value))}},{immediate:!0});const l=o.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),p=o.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function d(m){s.value&&!s.value.contains(m.target)&&(r.value=!1)}function u(m,h){t.isMultipleOption?i.value=-1:(i.value=h,r.value=!1),n.value=m,a("input",n.value),a("update:modelValue",n.value)}function f(){r.value=!1,a("click-ready")}return o.onMounted(()=>{document.addEventListener("click",d)}),o.onBeforeMount(()=>{document.removeEventListener("click",d)}),(m,h)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"dropDown",ref:s,class:"gsc-dropdown",style:o.normalizeStyle(l.value)},[o.createElementVNode("div",{class:"gsc-dropdown__main-container",style:o.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[o.createElementVNode("div",K5,[o.renderSlot(m.$slots,"default",{selectedItem:n.value})]),o.createElementVNode("div",{class:o.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:o.normalizeStyle(p.value)},[(o.openBlock(),o.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o.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:e.arrowColor},null,8,Z5)],8,q5))],6)],4),o.createVNode(o.Transition,null,{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",Q5,[o.createElementVNode("div",null,[o.createElementVNode("div",{class:"gsc-dropdown__items",style:o.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(g,b)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["gsc-dropdown__items__item",{selected:b===i.value}]),key:b,onClick:A=>u(g,b)},[o.renderSlot(m.$slots,"availableItem",{item:g})],10,Y5))),128))],4),e.isFooterVisible?(o.openBlock(),o.createElementBlock("div",W5,[o.createVNode(o.unref(L5),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):o.createCommentVNode("",!0)])],512),[[o.vShow,r.value]])]),_:3})],4))}},X5=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},_5={class:"tournament-select__selected-tournament"},$5={class:"tournament-select__selected-tournament__logo"},eC=["src"],tC={class:"tournament-select__selected-tournament__name"},oC={__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://az755631.vo.msecnd.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(e){return["solid","dotted","dashed"].includes(e)}},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:e=>["propName","value"].every(a=>a in e)},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:a}){const t=e,n=o.ref([]),s=o.computed(()=>{const u={};return t.fontFamily&&(u["font-family"]=`${t.fontFamily}`),u}),i=o.computed(()=>n.value.find(u=>u.seasonsIds.has(t.currentSeasonId))||n.value[0]);async function r(){try{if(t.items&&t.items.length)n.value=[...t.items];else if(t.apiUrl){const u=await p();n.value=u.map(f=>({...f.tournament,seasons:f.seasons,seasonsIds:f.seasons.reduce((m,h)=>(m.add(h.id),m),new Set)})).sort((f,m)=>f.order-m.order)}}catch(u){throw new Error(u)}}function l(u){const f=new XMLHttpRequest,m=`${t.logosUrl}${u}.${t.logoFileType}`;return f.open("HEAD",m,!1),f.send(),f.status!==404}async function p(){try{return(await fetch(t.apiUrl)).json()}catch(u){return Promise.reject(u)}}function c(u){a("input",u)}function d(u){a("input",u)}return o.onMounted(()=>{r()}),(u,f)=>(o.openBlock(),o.createElementBlock("div",{class:"tournament-select",style:o.normalizeStyle(s.value)},[o.createVNode(o.unref(J5),o.mergeProps(t,{"model-value":i.value,items:n.value,onInput:c,"onUpdate:modelValue":d}),{default:o.withCtx(({selectedItem:m})=>[o.createElementVNode("div",_5,[o.createElementVNode("div",$5,[l(m.id)?(o.openBlock(),o.createElementBlock("img",{key:0,src:`${t.logosUrl}${m.id}.${t.logoFileType}`,alt:""},null,8,eC)):o.createCommentVNode("",!0)]),o.createElementVNode("div",tC,o.toDisplayString(m.name),1)])]),availableItem:o.withCtx(({item:m})=>[o.createElementVNode("div",null,o.toDisplayString(m.name),1)]),_:1},16,["model-value","items"])],4))}},aC=X5(oC,[["__scopeId","data-v-355af272"]]),nC=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},Kn={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Ul=()=>{o.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Dl=Kn.setup;Kn.setup=Dl?(e,a)=>(Ul(),Dl(e,a)):Ul;const iC=e=>(o.pushScopeId("data-v-fb269a1e"),e=e(),o.popScopeId(),e),sC=["src"],rC={key:1,class:"text"},lC=["src"],cC={class:"stats"},dC=iC(()=>o.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),mC={class:"numstats"},pC={class:"leyend"};function uC(e,a,t,n,s,i){return o.openBlock(),o.createElementBlock("div",null,[t.type==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["button",s.status&&t.typeOnOff&&"button-active"]),style:o.normalizeStyle([i.customStyle,s.status&&t.typeOnOff&&i.customActive]),onClick:a[0]||(a[0]=(...r)=>i.btnClick&&i.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(o.openBlock(),o.createElementBlock("img",{key:0,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,sC)):o.createCommentVNode("",!0),t.textValue?(o.openBlock(),o.createElementBlock("div",rC,o.toDisplayString(t.textValue),1)):o.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(o.openBlock(),o.createElementBlock("img",{key:2,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,lC)):o.createCommentVNode("",!0)],6)):o.createCommentVNode("",!0),t.type==1?(o.openBlock(),o.createElementBlock("div",{key:1,class:"button-target",onClick:a[1]||(a[1]=(...r)=>i.btnClick&&i.btnClick(...r))},[o.createElementVNode("div",cC,[dC,o.createElementVNode("div",mC,o.toDisplayString(t.textStat),1)]),o.createElementVNode("div",pC,o.toDisplayString(t.textCategory),1)])):o.createCommentVNode("",!0)])}const hC=nC(Kn,[["render",uC],["__scopeId","data-v-fb269a1e"]]),gC={class:"gsc-dropdown__main-container__item-selected"},fC=["height","width"],yC=["stroke"],bC={class:"gsc-dropdown__items-container"},wC=["onClick"],AC={key:0,class:"gsc-dropdown__items-footer"},CC={__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(e){return["solid","dotted","dashed"].includes(e)}},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:e=>["propName","value"].every(a=>a in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:a}){const t=e,n=o.ref({}),s=o.ref(null),i=o.ref(t.isMultipleOption?-1:0),r=o.ref(!1);o.watch(()=>t.items,(m,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&m&&m.length){if(t.defaultItemByProp){const g=t.items.findIndex(b=>b[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(i.value=g,n.value=m[g]):(i.value=0,n.value=m[0])}else n.value=m[t.defaultItemByIndex];a("input",n.value)}},{immediate:!0}),o.watch(()=>t.modelValue,m=>{if(m){const h=t.items.findIndex(g=>typeof m=="object"?JSON.stringify(g)===JSON.stringify(m):g===m);h!==-1&&(i.value=h,n.value=t.items[h],a("update:modelValue",n.value))}},{immediate:!0});const l=o.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),p=o.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function d(m){s.value&&!s.value.contains(m.target)&&(r.value=!1)}function u(m,h){t.isMultipleOption?i.value=-1:(i.value=h,r.value=!1),n.value=m,a("input",n.value),a("update:modelValue",n.value)}function f(){r.value=!1,a("click-ready")}return o.onMounted(()=>{document.addEventListener("click",d)}),o.onBeforeMount(()=>{document.removeEventListener("click",d)}),(m,h)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"dropDown",ref:s,class:"gsc-dropdown",style:o.normalizeStyle(l.value)},[o.createElementVNode("div",{class:"gsc-dropdown__main-container",style:o.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[o.createElementVNode("div",gC,[o.renderSlot(m.$slots,"default",{selectedItem:n.value})]),o.createElementVNode("div",{class:o.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:o.normalizeStyle(p.value)},[(o.openBlock(),o.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o.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:e.arrowColor},null,8,yC)],8,fC))],6)],4),o.createVNode(o.Transition,null,{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",bC,[o.createElementVNode("div",null,[o.createElementVNode("div",{class:"gsc-dropdown__items",style:o.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(g,b)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["gsc-dropdown__items__item",{selected:b===i.value}]),key:b,onClick:A=>u(g,b)},[o.renderSlot(m.$slots,"availableItem",{item:g})],10,wC))),128))],4),e.isFooterVisible?(o.openBlock(),o.createElementBlock("div",AC,[o.createVNode(o.unref(hC),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):o.createCommentVNode("",!0)])],512),[[o.vShow,r.value]])]),_:3})],4))}},kC=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},SC={class:"season-name"},BC={class:"items-list-season"},OC={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:a}){const t=e,n=o.computed(()=>t.seasons.find(r=>r.id===t.currentSeasonId));function s(r){a("input",r)}function i(r){a("input",r)}return(r,l)=>(o.openBlock(),o.createBlock(o.unref(CC),{items:e.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:i,"onUpdate:modelValue":s},{default:o.withCtx(({selectedItem:p})=>[o.createElementVNode("div",SC,[o.createElementVNode("span",null,o.toDisplayString(p.name),1)])]),availableItem:o.withCtx(({item:p})=>[o.createElementVNode("span",BC,o.toDisplayString(p.name),1)]),_:1},8,["items","model-value"]))}},EC=kC(OC,[["__scopeId","data-v-3a11087d"]]);function Gl(e,a){return function(){return e.apply(a,arguments)}}const{toString:xC}=Object.prototype,{getPrototypeOf:qn}=Object,Lo=(e=>a=>{const t=xC.call(a);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),tt=e=>(e=e.toLowerCase(),a=>Lo(a)===e),Ko=e=>a=>typeof a===e,{isArray:xt}=Array,$t=Ko("undefined");function zC(e){return e!==null&&!$t(e)&&e.constructor!==null&&!$t(e.constructor)&&De(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hl=tt("ArrayBuffer");function MC(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&Hl(e.buffer),a}const RC=Ko("string"),De=Ko("function"),Ll=Ko("number"),qo=e=>e!==null&&typeof e=="object",FC=e=>e===!0||e===!1,Zo=e=>{if(Lo(e)!=="object")return!1;const a=qn(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},TC=tt("Date"),VC=tt("File"),NC=tt("Blob"),vC=tt("FileList"),PC=e=>qo(e)&&De(e.pipe),jC=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||De(e.append)&&((a=Lo(e))==="formdata"||a==="object"&&De(e.toString)&&e.toString()==="[object FormData]"))},IC=tt("URLSearchParams"),UC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function eo(e,a,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),xt(e))for(n=0,s=e.length;n<s;n++)a.call(null,e[n],n,e);else{const i=t?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let l;for(n=0;n<r;n++)l=i[n],a.call(null,e[l],l,e)}}function Kl(e,a){a=a.toLowerCase();const t=Object.keys(e);let n=t.length,s;for(;n-- >0;)if(s=t[n],a===s.toLowerCase())return s;return null}const ql=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zl=e=>!$t(e)&&e!==ql;function Zn(){const{caseless:e}=Zl(this)&&this||{},a={},t=(n,s)=>{const i=e&&Kl(a,s)||s;Zo(a[i])&&Zo(n)?a[i]=Zn(a[i],n):Zo(n)?a[i]=Zn({},n):xt(n)?a[i]=n.slice():a[i]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&eo(arguments[n],t);return a}const DC=(e,a,t,{allOwnKeys:n}={})=>(eo(a,(s,i)=>{t&&De(s)?e[i]=Gl(s,t):e[i]=s},{allOwnKeys:n}),e),GC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),HC=(e,a,t,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),t&&Object.assign(e.prototype,t)},LC=(e,a,t,n)=>{let s,i,r;const l={};if(a=a||{},e==null)return a;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)r=s[i],(!n||n(r,e,a))&&!l[r]&&(a[r]=e[r],l[r]=!0);e=t!==!1&&qn(e)}while(e&&(!t||t(e,a))&&e!==Object.prototype);return a},KC=(e,a,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=a.length;const n=e.indexOf(a,t);return n!==-1&&n===t},qC=e=>{if(!e)return null;if(xt(e))return e;let a=e.length;if(!Ll(a))return null;const t=new Array(a);for(;a-- >0;)t[a]=e[a];return t},ZC=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&qn(Uint8Array)),QC=(e,a)=>{const t=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=t.next())&&!n.done;){const s=n.value;a.call(e,s[0],s[1])}},YC=(e,a)=>{let t;const n=[];for(;(t=e.exec(a))!==null;)n.push(t);return n},WC=tt("HTMLFormElement"),JC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,t,n){return t.toUpperCase()+n}),Ql=(({hasOwnProperty:e})=>(a,t)=>e.call(a,t))(Object.prototype),XC=tt("RegExp"),Yl=(e,a)=>{const t=Object.getOwnPropertyDescriptors(e),n={};eo(t,(s,i)=>{let r;(r=a(s,i,e))!==!1&&(n[i]=r||s)}),Object.defineProperties(e,n)},_C=e=>{Yl(e,(a,t)=>{if(De(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=e[t];if(De(n)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},$C=(e,a)=>{const t={},n=s=>{s.forEach(i=>{t[i]=!0})};return xt(e)?n(e):n(String(e).split(a)),t},ek=()=>{},tk=(e,a)=>(e=+e,Number.isFinite(e)?e:a),Qn="abcdefghijklmnopqrstuvwxyz",Wl="0123456789",Jl={DIGIT:Wl,ALPHA:Qn,ALPHA_DIGIT:Qn+Qn.toUpperCase()+Wl},ok=(e=16,a=Jl.ALPHA_DIGIT)=>{let t="";const{length:n}=a;for(;e--;)t+=a[Math.random()*n|0];return t};function ak(e){return!!(e&&De(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const nk=e=>{const a=new Array(10),t=(n,s)=>{if(qo(n)){if(a.indexOf(n)>=0)return;if(!("toJSON"in n)){a[s]=n;const i=xt(n)?[]:{};return eo(n,(r,l)=>{const p=t(r,s+1);!$t(p)&&(i[l]=p)}),a[s]=void 0,i}}return n};return t(e,0)},ik=tt("AsyncFunction"),sk=e=>e&&(qo(e)||De(e))&&De(e.then)&&De(e.catch),O={isArray:xt,isArrayBuffer:Hl,isBuffer:zC,isFormData:jC,isArrayBufferView:MC,isString:RC,isNumber:Ll,isBoolean:FC,isObject:qo,isPlainObject:Zo,isUndefined:$t,isDate:TC,isFile:VC,isBlob:NC,isRegExp:XC,isFunction:De,isStream:PC,isURLSearchParams:IC,isTypedArray:ZC,isFileList:vC,forEach:eo,merge:Zn,extend:DC,trim:UC,stripBOM:GC,inherits:HC,toFlatObject:LC,kindOf:Lo,kindOfTest:tt,endsWith:KC,toArray:qC,forEachEntry:QC,matchAll:YC,isHTMLForm:WC,hasOwnProperty:Ql,hasOwnProp:Ql,reduceDescriptors:Yl,freezeMethods:_C,toObjectSet:$C,toCamelCase:JC,noop:ek,toFiniteNumber:tk,findKey:Kl,global:ql,isContextDefined:Zl,ALPHABET:Jl,generateString:ok,isSpecCompliantForm:ak,toJSONObject:nk,isAsyncFn:ik,isThenable:sk};function J(e,a,t,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),t&&(this.config=t),n&&(this.request=n),s&&(this.response=s)}O.inherits(J,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:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Xl=J.prototype,_l={};["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(e=>{_l[e]={value:e}}),Object.defineProperties(J,_l),Object.defineProperty(Xl,"isAxiosError",{value:!0}),J.from=(e,a,t,n,s,i)=>{const r=Object.create(Xl);return O.toFlatObject(e,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),J.call(r,e.message,a,t,n,s),r.cause=e,r.name=e.name,i&&Object.assign(r,i),r};const rk=null;function Yn(e){return O.isPlainObject(e)||O.isArray(e)}function $l(e){return O.endsWith(e,"[]")?e.slice(0,-2):e}function ec(e,a,t){return e?e.concat(a).map(function(n,s){return n=$l(n),!t&&s?"["+n+"]":n}).join(t?".":""):a}function lk(e){return O.isArray(e)&&!e.some(Yn)}const ck=O.toFlatObject(O,{},null,function(e){return/^is[A-Z]/.test(e)});function Qo(e,a,t){if(!O.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!O.isUndefined(h[m])});const n=t.metaTokens,s=t.visitor||c,i=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(a);if(!O.isFunction(s))throw new TypeError("visitor must be a function");function p(m){if(m===null)return"";if(O.isDate(m))return m.toISOString();if(!l&&O.isBlob(m))throw new J("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(m)||O.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,h,g){let b=m;if(m&&!g&&typeof m=="object"){if(O.endsWith(h,"{}"))h=n?h:h.slice(0,-2),m=JSON.stringify(m);else if(O.isArray(m)&&lk(m)||(O.isFileList(m)||O.endsWith(h,"[]"))&&(b=O.toArray(m)))return h=$l(h),b.forEach(function(A,C){!(O.isUndefined(A)||A===null)&&a.append(r===!0?ec([h],C,i):r===null?h:h+"[]",p(A))}),!1}return Yn(m)?!0:(a.append(ec(g,h,i),p(m)),!1)}const d=[],u=Object.assign(ck,{defaultVisitor:c,convertValue:p,isVisitable:Yn});function f(m,h){if(!O.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(m),O.forEach(m,function(g,b){(!(O.isUndefined(g)||g===null)&&s.call(a,g,O.isString(b)?b.trim():b,h,u))===!0&&f(g,h?h.concat(b):[b])}),d.pop()}}if(!O.isObject(e))throw new TypeError("data must be an object");return f(e),a}function tc(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(t){return a[t]})}function Wn(e,a){this._pairs=[],e&&Qo(e,this,a)}const oc=Wn.prototype;oc.append=function(e,a){this._pairs.push([e,a])},oc.toString=function(e){const a=e?function(t){return e.call(this,t,tc)}:tc;return this._pairs.map(function(t){return a(t[0])+"="+a(t[1])},"").join("&")};function dk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ac(e,a,t){if(!a)return e;const n=t&&t.encode||dk,s=t&&t.serialize;let i;if(s?i=s(a,t):i=O.isURLSearchParams(a)?a.toString():new Wn(a,t).toString(n),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class mk{constructor(){this.handlers=[]}use(a,t,n){return this.handlers.push({fulfilled:a,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){O.forEach(this.handlers,function(t){t!==null&&a(t)})}}const nc=mk,ic={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pk=typeof URLSearchParams<"u"?URLSearchParams:Wn,uk=typeof FormData<"u"?FormData:null,hk=typeof Blob<"u"?Blob:null,gk={isBrowser:!0,classes:{URLSearchParams:pk,FormData:uk,Blob:hk},protocols:["http","https","file","blob","url","data"]},sc=typeof window<"u"&&typeof document<"u",fk=(e=>sc&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),yk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sc,hasStandardBrowserEnv:fk,hasStandardBrowserWebWorkerEnv:yk},Symbol.toStringTag,{value:"Module"})),ot={...bk,...gk};function wk(e,a){return Qo(e,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,n,s,i){return ot.isNode&&O.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))}function Ak(e){return O.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Ck(e){const a={},t=Object.keys(e);let n;const s=t.length;let i;for(n=0;n<s;n++)i=t[n],a[i]=e[i];return a}function rc(e){function a(t,n,s,i){let r=t[i++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),p=i>=t.length;return r=!r&&O.isArray(s)?s.length:r,p?(O.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!l):((!s[r]||!O.isObject(s[r]))&&(s[r]=[]),a(t,n,s[r],i)&&O.isArray(s[r])&&(s[r]=Ck(s[r])),!l)}if(O.isFormData(e)&&O.isFunction(e.entries)){const t={};return O.forEachEntry(e,(n,s)=>{a(Ak(n),s,t,0)}),t}return null}function kk(e,a,t){if(O.isString(e))try{return(a||JSON.parse)(e),O.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}const Jn={transitional:ic,adapter:["xhr","http"],transformRequest:[function(e,a){const t=a.getContentType()||"",n=t.indexOf("application/json")>-1,s=O.isObject(e);if(s&&O.isHTMLForm(e)&&(e=new FormData(e)),O.isFormData(e))return n?JSON.stringify(rc(e)):e;if(O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e))return e;if(O.isArrayBufferView(e))return e.buffer;if(O.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(t.indexOf("application/x-www-form-urlencoded")>-1)return wk(e,this.formSerializer).toString();if((i=O.isFileList(e))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Qo(i?{"files[]":e}:e,r&&new r,this.formSerializer)}}return s||n?(a.setContentType("application/json",!1),kk(e)):e}],transformResponse:[function(e){const a=this.transitional||Jn.transitional,t=a&&a.forcedJSONParsing,n=this.responseType==="json";if(e&&O.isString(e)&&(t&&!this.responseType||n)){const s=!(a&&a.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(i){if(s)throw i.name==="SyntaxError"?J.from(i,J.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],e=>{Jn.headers[e]={}});const Xn=Jn,Sk=O.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"]),Bk=e=>{const a={};let t,n,s;return e&&e.split(`
36
+ */const Re={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"}},Xr={itemsToShow:{default:Re.itemsToShow,type:Number},itemsToScroll:{default:Re.itemsToScroll,type:Number},wrapAround:{default:Re.wrapAround,type:Boolean},throttle:{default:Re.throttle,type:Number},snapAlign:{default:Re.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Re.transition,type:Number},breakpoints:{default:Re.breakpoints,type:Object},autoplay:{default:Re.autoplay,type:Number},pauseAutoplayOnHover:{default:Re.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Re.mouseDrag,type:Boolean},touchDrag:{default:Re.touchDrag,type:Boolean},dir:{default:Re.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Re.i18n,type:Object},settings:{default(){return{}},type:Object}};function Dw({config:e,slidesCount:a}){const{snapAlign:t,wrapAround:n,itemsToShow:s=1}=e;if(n)return Math.max(a-1,0);let i;switch(t){case"start":i=a-s;break;case"end":i=a-1;break;case"center":case"center-odd":i=a-Math.ceil((s-.5)/2);break;case"center-even":i=a-Math.ceil(s/2);break;default:i=0;break}return Math.max(i,0)}function Gw({config:e,slidesCount:a}){const{wrapAround:t,snapAlign:n,itemsToShow:s=1}=e;let i=0;if(t||s>a)return i;switch(n){case"start":i=0;break;case"end":i=s-1;break;case"center":case"center-odd":i=Math.floor((s-1)/2);break;case"center-even":i=Math.floor((s-2)/2);break;default:i=0;break}return i}function Sn({val:e,max:a,min:t}){return a<t?e:Math.min(Math.max(e,t),a)}function Hw({config:e,currentSlide:a,slidesCount:t}){const{snapAlign:n,wrapAround:s,itemsToShow:i=1}=e;let r=a;switch(n){case"center":case"center-odd":r-=(i-1)/2;break;case"center-even":r-=(i-2)/2;break;case"end":r-=i-1;break}return s?r:Sn({val:r,max:t-i,min:0})}function _r(e){return e?e.reduce((a,t)=>{var n;return t.type===o.Fragment?[...a,..._r(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...a,t]:a},[]):[]}function Bn({val:e,max:a,min:t=0}){return e>a?Bn({val:e-(a+1),max:a,min:t}):e<t?Bn({val:e+(a+1),max:a,min:t}):e}function Lw(e,a){let t;return a?function(...n){const s=this;t||(e.apply(s,n),t=!0,setTimeout(()=>t=!1,a))}:e}function Kw(e,a){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{e(...n),t=null},a)}}function qw(e="",a={}){return Object.entries(a).reduce((t,[n,s])=>t.replace(`{${n}}`,String(s)),e)}var Zw=o.defineComponent({name:"ARIA",setup(){const e=o.inject("config",o.reactive(Object.assign({},Re))),a=o.inject("currentSlide",o.ref(0)),t=o.inject("slidesCount",o.ref(0));return()=>o.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},qw(e.i18n.itemXofY,{currentSlide:a.value+1,slidesCount:t.value}))}}),Qw=o.defineComponent({name:"Carousel",props:Xr,setup(e,{slots:a,emit:t,expose:n}){var s;const i=o.ref(null),r=o.ref([]),l=o.ref(0),p=o.ref(0),c=o.reactive(Object.assign({},Re));let d=Object.assign({},Re),u;const f=o.ref((s=e.modelValue)!==null&&s!==void 0?s:0),m=o.ref(0),h=o.ref(0),g=o.ref(0),b=o.ref(0);let A,C;o.provide("config",c),o.provide("slidesCount",p),o.provide("currentSlide",f),o.provide("maxSlide",g),o.provide("minSlide",b),o.provide("slideWidth",l);function z(){u=Object.assign({},e.breakpoints),d=Object.assign(Object.assign(Object.assign({},d),e),{i18n:Object.assign(Object.assign({},d.i18n),e.i18n),breakpoints:void 0}),K(d)}function P(){if(!u||!Object.keys(u).length)return;const w=Object.keys(u).map(E=>Number(E)).sort((E,H)=>+H-+E);let M=Object.assign({},d);w.some(E=>{const H=window.matchMedia(`(min-width: ${E}px)`).matches;return H&&(M=Object.assign(Object.assign({},M),u[E])),H}),K(M)}function K(w){Object.entries(w).forEach(([M,E])=>c[M]=E)}const Z=Kw(()=>{P(),G()},16);function G(){if(!i.value)return;const w=i.value.getBoundingClientRect();l.value=w.width/c.itemsToShow}function re(){p.value<=0||(h.value=Math.ceil((p.value-1)/2),g.value=Dw({config:c,slidesCount:p.value}),b.value=Gw({config:c,slidesCount:p.value}),c.wrapAround||(f.value=Sn({val:f.value,max:g.value,min:b.value})))}o.onMounted(()=>{o.nextTick(()=>G()),setTimeout(()=>G(),1e3),P(),ve(),window.addEventListener("resize",Z,{passive:!0}),t("init")}),o.onUnmounted(()=>{C&&clearTimeout(C),A&&clearInterval(A),window.removeEventListener("resize",Z,{passive:!0})});let V=!1;const ae={x:0,y:0},ie={x:0,y:0},q=o.reactive({x:0,y:0}),se=o.ref(!1),de=o.ref(!1),qe=()=>{se.value=!0},Ze=()=>{se.value=!1};function Ve(w){["INPUT","TEXTAREA","SELECT"].includes(w.target.tagName)||(V=w.type==="touchstart",V||w.preventDefault(),!(!V&&w.button!==0||x.value)&&(ae.x=V?w.touches[0].clientX:w.clientX,ae.y=V?w.touches[0].clientY:w.clientY,document.addEventListener(V?"touchmove":"mousemove",Fe,!0),document.addEventListener(V?"touchend":"mouseup",Ne,!0)))}const Fe=Lw(w=>{de.value=!0,ie.x=V?w.touches[0].clientX:w.clientX,ie.y=V?w.touches[0].clientY:w.clientY;const M=ie.x-ae.x,E=ie.y-ae.y;q.y=E,q.x=M},c.throttle);function Ne(){const w=c.dir==="rtl"?-1:1,M=Math.sign(q.x)*.4,E=Math.round(q.x/l.value+M)*w;if(E&&!V){const H=we=>{we.stopPropagation(),window.removeEventListener("click",H,!0)};window.addEventListener("click",H,!0)}R(f.value-E),q.x=0,q.y=0,de.value=!1,document.removeEventListener(V?"touchmove":"mousemove",Fe,!0),document.removeEventListener(V?"touchend":"mouseup",Ne,!0)}function ve(){!c.autoplay||c.autoplay<=0||(A=setInterval(()=>{c.pauseAutoplayOnHover&&se.value||v()},c.autoplay))}function j(){A&&(clearInterval(A),A=null),ve()}const x=o.ref(!1);function R(w){const M=c.wrapAround?w:Sn({val:w,max:g.value,min:b.value});f.value===M||x.value||(t("slide-start",{slidingToIndex:w,currentSlideIndex:f.value,prevSlideIndex:m.value,slidesCount:p.value}),x.value=!0,m.value=f.value,f.value=M,C=setTimeout(()=>{if(c.wrapAround){const E=Bn({val:M,max:g.value,min:0});E!==f.value&&(f.value=E,t("loop",{currentSlideIndex:f.value,slidingToIndex:w}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:m.value,slidesCount:p.value}),x.value=!1,j()},c.transition))}function v(){R(f.value+c.itemsToScroll)}function N(){R(f.value-c.itemsToScroll)}const I={slideTo:R,next:v,prev:N};o.provide("nav",I),o.provide("isSliding",x);const U=o.computed(()=>Hw({config:c,currentSlide:f.value,slidesCount:p.value}));o.provide("slidesToScroll",U);const X=o.computed(()=>{const w=c.dir==="rtl"?-1:1,M=U.value*l.value*w;return{transform:`translateX(${q.x-M}px)`,transition:`${x.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${p.value*l.value}px`:"",width:"100%"}});function ne(){z(),P(),re(),G(),j()}Object.keys(Xr).forEach(w=>{["modelValue"].includes(w)||o.watch(()=>e[w],ne)}),o.watch(()=>e.modelValue,w=>{w!==f.value&&R(Number(w))}),o.watch(p,re),t("before-init"),z();const ce={config:c,slidesCount:p,slideWidth:l,next:v,prev:N,slideTo:R,currentSlide:f,maxSlide:g,minSlide:b,middleSlide:h};n({updateBreakpointsConfigs:P,updateSlidesData:re,updateSlideWidth:G,initDefaultConfigs:z,restartCarousel:ne,slideTo:R,next:v,prev:N,nav:I,data:ce});const Oe=a.default||a.slides,Ee=a.addons,Pe=o.reactive(ce);return()=>{const w=_r(Oe==null?void 0:Oe(Pe)),M=(Ee==null?void 0:Ee(Pe))||[];w.forEach((Ae,Ce)=>Ae.props.index=Ce);let E=w;if(c.wrapAround){const Ae=w.map((ke,te)=>o.cloneVNode(ke,{index:-w.length+te,isClone:!0,key:`clone-before-${te}`})),Ce=w.map((ke,te)=>o.cloneVNode(ke,{index:w.length+te,isClone:!0,key:`clone-after-${te}`}));E=[...Ae,...w,...Ce]}r.value=w,p.value=Math.max(w.length,1);const H=o.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:c.mouseDrag?Ve:null,onTouchstartPassiveCapture:c.touchDrag?Ve:null},E),we=o.h("div",{class:"carousel__viewport"},H);return o.h("section",{ref:i,class:{carousel:!0,"is-sliding":x.value,"is-dragging":de.value,"is-hover":se.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:qe,onMouseleave:Ze},[we,M,o.h(Zw)])}}}),$r;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})($r||($r={}));var Yw=o.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:a}){const t=o.inject("config",o.reactive(Object.assign({},Re))),n=o.inject("currentSlide",o.ref(0)),s=o.inject("slidesToScroll",o.ref(0)),i=o.inject("isSliding",o.ref(!1)),r=()=>e.index===n.value,l=()=>e.index===n.value-1,p=()=>e.index===n.value+1,c=()=>{const d=Math.floor(s.value),u=Math.ceil(s.value+t.itemsToShow-1);return e.index>=d&&e.index<=u};return()=>{var d;return o.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":c(),"carousel__slide--active":r(),"carousel__slide--prev":l(),"carousel__slide--next":p(),"carousel__slide--sliding":i.value},"aria-hidden":!c()},(d=a.default)===null||d===void 0?void 0:d.call(a))}}});const Ww=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},Jw=e=>(o.pushScopeId("data-v-d011244f"),e=e(),o.popScopeId(),e),Xw={class:"gsc-carousel"},_w={key:0},$w=Jw(()=>o.createElementVNode("div",null,"no hay",-1)),eA=[$w],tA={class:"gsc-carousel__2d__slides"},oA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},aA=["fill"],nA={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},iA=["fill"],sA={class:"gsc-carousel__2d__navigation"},rA={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lA=["stroke"],cA={key:1,class:"gsc-carousel__2d__navigation__pagination"},dA=["onClick"],mA={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pA=["stroke"],uA={__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:e=>["propName","value"].every(a=>a in e)},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(e,{expose:a,emit:t}){const n=e;o.useCssVars(g=>({"756c2ee6":e.slideLeftArrowBackgroundImage,a8d2eea4:e.slidesArrowsLeftAndRight,"074cf336":e.slideRightArrowBackgroundImage,"165559b1":e.marginTop,e94ec1ea:e.secondarySlidesOpacity}));const s=o.ref(null),i=o.ref({}),r=o.ref(0),l=o.ref(!1);o.watch(s,g=>{g&&l.value?(l.value=!1,p(n.items)):g&&g.slideTo&&g.slideTo(r.value)},{deep:!0}),o.watch(()=>n.currentItemIndex,g=>{r.value!==g&&f(g)}),o.watch(()=>n.defaultItemByIndex,g=>{r.value!==g&&f(g)}),o.watch(()=>n.items,g=>{s.value?p(g):l.value=!0},{immediate:!0});function p(g){if(g&&g.length&&s.value){if(n.defaultItemByProp){const b=n.items.findIndex(A=>A[n.defaultItemByProp.propName]===n.defaultItemByProp.value);b!==-1?(r.value=b,i.value=g[b]):(r.value=0,i.value=g[0])}else r.value=n.defaultItemByIndex,i.value=g[n.defaultItemByIndex];s.value.slideTo&&s.value.slideTo(r.value),t("input",{selectedItem:i.value,selectedItemIndex:r.value})}}function c(){s.value&&s.value.next()}function d(){s.value&&s.value.prev()}function u(){s.value&&s.value.updateSlideWidth()}function f(g){s.value&&s.value.slideTo(g)}function m(g){s.value.slideTo(g)}function h(g){const b=g.slidingToIndex<0?n.items.length-1:g.slidingToIndex===n.items.length?0:g.slidingToIndex;r.value=b,i.value=n.items[b],t("update:currentItemIndex",b),t("input",{selectedItem:i.value,selectedItemIndex:r.value})}return a({prev:d,next:c,updateSlideWidth:u,slideTo:f}),(g,b)=>(o.openBlock(),o.createElementBlock("div",Xw,[n.is3d?(o.openBlock(),o.createElementBlock("div",_w,eA)):(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[o.createElementVNode("div",tA,[o.createVNode(o.unref(Qw),{ref_key:"carousel2d",ref:s,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:h},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(A,C)=>(o.openBlock(),o.createBlock(o.unref(Yw),{key:C},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default",{item:A},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:o.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:b[0]||(b[0]=A=>s.value.prev())},[o.createElementVNode("div",{class:o.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(o.openBlock(),o.createElementBlock("svg",oA,[o.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:e.arrowsColor},null,8,aA)]))],2)],4)):o.createCommentVNode("",!0),e.areSlidesArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:o.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:b[1]||(b[1]=A=>c())},[o.createElementVNode("div",{class:o.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(o.openBlock(),o.createElementBlock("svg",nA,[o.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:e.arrowsColor},null,8,iA)]))],2)],4)):o.createCommentVNode("",!0),o.createElementVNode("div",sA,[e.areNavigationArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:b[2]||(b[2]=A=>d())},[(o.openBlock(),o.createElementBlock("svg",rA,[o.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,lA)]))])):o.createCommentVNode("",!0),e.isPaginationVisible?(o.openBlock(),o.createElementBlock("div",cA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(A,C)=>(o.openBlock(),o.createElementBlock("div",{key:`i-${C}`,class:"gsc-carousel__2d__navigation__pagination__item",style:o.normalizeStyle({height:`${n.navigationHeight}px`,width:`${r.value===C?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${r.value===C?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:z=>m(C)},null,12,dA))),128))])):o.createCommentVNode("",!0),e.areNavigationArrowsVisible?(o.openBlock(),o.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:b[3]||(b[3]=A=>s.value.next())},[(o.openBlock(),o.createElementBlock("svg",mA,[o.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,pA)]))])):o.createCommentVNode("",!0)])],2))]))}},hA=Ww(uA,[["__scopeId","data-v-d011244f"]]),gA=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function fA(e){return gA[e]}function T(e,a,t){return(a=bA(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function yA(e,a){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,a||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function bA(e){var a=yA(e,"string");return typeof a=="symbol"?a:String(a)}function wA(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function el(e,a){for(var t=0;t<a.length;t++){var n=a[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AA(e,a,t){return a&&el(e.prototype,a),t&&el(e,t),e}function CA(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function tl(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,n)}return t}function ol(e){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?arguments[a]:{};a%2?tl(Object(t),!0).forEach(function(n){CA(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tl(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var al={addCSS:!0,thumbWidth:15,watch:!0};function kA(e,a){return(function(){return Array.from(document.querySelectorAll(a)).includes(this)}).call(e,a)}function SA(e,a){if(e&&a){var t=new Event(a,{bubbles:!0});e.dispatchEvent(t)}}var Lt=function(e){return e!=null?e.constructor:null},On=function(e,a){return!!(e&&a&&e instanceof a)},nl=function(e){return e==null},il=function(e){return Lt(e)===Object},BA=function(e){return Lt(e)===Number&&!Number.isNaN(e)},sl=function(e){return Lt(e)===String},OA=function(e){return Lt(e)===Boolean},EA=function(e){return Lt(e)===Function},rl=function(e){return Array.isArray(e)},ll=function(e){return On(e,NodeList)},xA=function(e){return On(e,Element)},zA=function(e){return On(e,Event)},MA=function(e){return nl(e)||(sl(e)||rl(e)||ll(e))&&!e.length||il(e)&&!Object.keys(e).length},Te={nullOrUndefined:nl,object:il,number:BA,string:sl,boolean:OA,function:EA,array:rl,nodeList:ll,element:xA,event:zA,empty:MA};function RA(e){var a="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return a?Math.max(0,(a[1]?a[1].length:0)-(a[2]?+a[2]:0)):0}function FA(e,a){if(1>a){var t=RA(a);return parseFloat(e.toFixed(t))}return Math.round(e/a)*a}var TA=function(){function e(a,t){wA(this,e),Te.element(a)?this.element=a:Te.string(a)&&(this.element=document.querySelector(a)),Te.element(this.element)&&Te.empty(this.element.rangeTouch)&&(this.config=ol({},al,{},t),this.init())}return AA(e,[{key:"init",value:function(){e.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(){e.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(a){var t=this,n=a?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(s){t.element[n](s,function(i){return t.set(i)},!1)})}},{key:"get",value:function(a){if(!e.enabled||!Te.event(a))return null;var t,n=a.target,s=a.changedTouches[0],i=parseFloat(n.getAttribute("min"))||0,r=parseFloat(n.getAttribute("max"))||100,l=parseFloat(n.getAttribute("step"))||1,p=n.getBoundingClientRect(),c=100/p.width*(this.config.thumbWidth/2)/100;return 0>(t=100/p.width*(s.clientX-p.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*c:50<t&&(t+=2*(t-50)*c),i+FA(t/100*(r-i),l)}},{key:"set",value:function(a){e.enabled&&Te.event(a)&&!a.target.disabled&&(a.preventDefault(),a.target.value=this.get(a),SA(a.target,a.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(a){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(Te.empty(a)||Te.string(a)?n=Array.from(document.querySelectorAll(Te.string(a)?a:'input[type="range"]')):Te.element(a)?n=[a]:Te.nodeList(a)?n=Array.from(a):Te.array(a)&&(n=a.filter(Te.element)),Te.empty(n))return null;var s=ol({},al,{},t);if(Te.string(a)&&s.watch){var i=new MutationObserver(function(r){Array.from(r).forEach(function(l){Array.from(l.addedNodes).forEach(function(p){Te.element(p)&&kA(p,a)&&new e(p,s)})})});i.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(r){return new e(r,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Kt=e=>e!=null?e.constructor:null,st=(e,a)=>!!(e&&a&&e instanceof a),En=e=>e==null,cl=e=>Kt(e)===Object,VA=e=>Kt(e)===Number&&!Number.isNaN(e),No=e=>Kt(e)===String,NA=e=>Kt(e)===Boolean,dl=e=>typeof e=="function",ml=e=>Array.isArray(e),vA=e=>st(e,WeakMap),pl=e=>st(e,NodeList),PA=e=>Kt(e)===Text,jA=e=>st(e,Event),IA=e=>st(e,KeyboardEvent),UA=e=>st(e,window.TextTrackCue)||st(e,window.VTTCue),DA=e=>st(e,TextTrack)||!En(e)&&No(e.kind),GA=e=>st(e,Promise)&&dl(e.then),HA=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",ul=e=>En(e)||(No(e)||ml(e)||pl(e))&&!e.length||cl(e)&&!Object.keys(e).length;var y={nullOrUndefined:En,object:cl,number:VA,string:No,boolean:NA,function:dl,array:ml,weakMap:vA,nodeList:pl,element:HA,textNode:PA,event:jA,keyboardEvent:IA,cue:UA,track:DA,promise:GA,url:e=>{if(st(e,window.URL))return!0;if(!No(e))return!1;let a=e;e.startsWith("http://")&&e.startsWith("https://")||(a=`http://${e}`);try{return!ul(new URL(a).hostname)}catch{return!1}},empty:ul};const xn=(()=>{const e=document.createElement("span"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(a).find(n=>e.style[n]!==void 0);return!!y.string(t)&&a[t]})();function hl(e,a){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},a)}const LA=!!window.document.documentMode,KA=/Edge/g.test(navigator.userAgent),qA="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),ZA=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,QA=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,YA=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var Se={isIE:LA,isEdge:KA,isWebKit:qA,isIPhone:ZA,isIPadOS:QA,isIos:YA};function WA(e){return JSON.parse(JSON.stringify(e))}function gl(e,a){return a.split(".").reduce((t,n)=>t&&t[n],e)}function me(e={},...a){if(!a.length)return e;const t=a.shift();return y.object(t)?(Object.keys(t).forEach(n=>{y.object(t[n])?(Object.keys(e).includes(n)||Object.assign(e,{[n]:{}}),me(e[n],t[n])):Object.assign(e,{[n]:t[n]})}),me(e,...a)):e}function fl(e,a){const t=e.length?e:[e];Array.from(t).reverse().forEach((n,s)=>{const i=s>0?a.cloneNode(!0):a,r=n.parentNode,l=n.nextSibling;i.appendChild(n),l?r.insertBefore(i,l):r.appendChild(i)})}function zn(e,a){y.element(e)&&!y.empty(a)&&Object.entries(a).filter(([,t])=>!y.nullOrUndefined(t)).forEach(([t,n])=>e.setAttribute(t,n))}function D(e,a,t){const n=document.createElement(e);return y.object(a)&&zn(n,a),y.string(t)&&(n.innerText=t),n}function JA(e,a){y.element(e)&&y.element(a)&&a.parentNode.insertBefore(e,a.nextSibling)}function yl(e,a,t,n){y.element(a)&&a.appendChild(D(e,t,n))}function rt(e){y.nodeList(e)||y.array(e)?Array.from(e).forEach(rt):y.element(e)&&y.element(e.parentNode)&&e.parentNode.removeChild(e)}function vo(e){if(!y.element(e))return;let{length:a}=e.childNodes;for(;a>0;)e.removeChild(e.lastChild),a-=1}function Po(e,a){return y.element(a)&&y.element(a.parentNode)&&y.element(e)?(a.parentNode.replaceChild(e,a),e):null}function $e(e,a){if(!y.string(e)||y.empty(e))return{};const t={},n=me({},a);return e.split(",").forEach(s=>{const i=s.trim(),r=i.replace(".",""),l=i.replace(/[[\]]/g,"").split("="),[p]=l,c=l.length>1?l[1].replace(/["']/g,""):"";switch(i.charAt(0)){case".":y.string(n.class)?t.class=`${n.class} ${r}`:t.class=r;break;case"#":t.id=i.replace("#","");break;case"[":t[p]=c}}),me(n,t)}function ft(e,a){if(!y.element(e))return;let t=a;y.boolean(t)||(t=!e.hidden),e.hidden=t}function ee(e,a,t){if(y.nodeList(e))return Array.from(e).map(n=>ee(n,a,t));if(y.element(e)){let n="toggle";return t!==void 0&&(n=t?"add":"remove"),e.classList[n](a),e.classList.contains(a)}return!1}function jo(e,a){return y.element(e)&&e.classList.contains(a)}function yt(e,a){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(a)).includes(this)}).call(e,a)}function XA(e,a){const{prototype:t}=Element;return(t.closest||function(){let n=this;do{if(yt.matches(n,a))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(e,a)}function qt(e){return this.elements.container.querySelectorAll(e)}function be(e){return this.elements.container.querySelector(e)}function Mn(e=null,a=!1){y.element(e)&&e.focus({preventScroll:!0,focusVisible:a})}const bl={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},pe={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,a){const t=pe[e]||a!=="html5";return{api:t,ui:t&&pe.rangeInput}},pip:!(Se.isIPhone||!y.function(D("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||D("video").disablePictureInPicture)),airplay:y.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(y.empty(e))return!1;const[a]=e.split("/");let t=e;if(!this.isHTML5||a!==this.type)return!1;Object.keys(bl).includes(t)&&(t+=`; codecs="${bl[e]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:xn!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},_A=(()=>{let e=!1;try{const a=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,a),window.removeEventListener("test",null,a)}catch{}return e})();function Zt(e,a,t,n=!1,s=!0,i=!1){if(!e||!("addEventListener"in e)||y.empty(a)||!y.function(t))return;const r=a.split(" ");let l=i;_A&&(l={passive:s,capture:i}),r.forEach(p=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:e,type:p,callback:t,options:l}),e[n?"addEventListener":"removeEventListener"](p,t,l)})}function _(e,a="",t,n=!0,s=!1){Zt.call(this,e,a,t,!0,n,s)}function Io(e,a="",t,n=!0,s=!1){Zt.call(this,e,a,t,!1,n,s)}function Rn(e,a="",t,n=!0,s=!1){const i=(...r)=>{Io(e,a,i,n,s),t.apply(this,r)};Zt.call(this,e,a,i,!0,n,s)}function L(e,a="",t=!1,n={}){if(!y.element(e)||y.empty(a))return;const s=new CustomEvent(a,{bubbles:t,detail:{...n,plyr:this}});e.dispatchEvent(s)}function $A(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:a,type:t,callback:n,options:s}=e;a.removeEventListener(t,n,s)}),this.eventListeners=[])}function e5(){return new Promise(e=>this.ready?setTimeout(e,0):_.call(this,this.elements.container,"ready",e)).then(()=>{})}function et(e){y.promise(e)&&e.then(null,()=>{})}function Fn(e){return y.array(e)?e.filter((a,t)=>e.indexOf(a)===t):e}function wl(e,a){return y.array(e)&&e.length?e.reduce((t,n)=>Math.abs(n-a)<Math.abs(t-a)?n:t):null}function Al(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const Cl=[[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((e,[a,t])=>({...e,[a/t]:[a,t]}),{});function kl(e){return y.array(e)||y.string(e)&&e.includes(":")?(y.array(e)?e:e.split(":")).map(Number).every(y.number):!1}function Uo(e){if(!y.array(e)||!e.every(y.number))return null;const[a,t]=e,n=(i,r)=>r===0?i:n(r,i%r),s=n(a,t);return[a/s,t/s]}function Tn(e){const a=n=>kl(n)?n.split(":").map(Number):null;let t=a(e);if(t===null&&(t=a(this.config.ratio)),t===null&&!y.empty(this.embed)&&y.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:n,videoHeight:s}=this.media;t=[n,s]}return Uo(t)}function Et(e){if(!this.isVideo)return{};const{wrapper:a}=this.elements,t=Tn.call(this,e);if(!y.array(t))return{};const[n,s]=Uo(t),i=100/n*s;if(Al(`aspect-ratio: ${n}/${s}`)?a.style.aspectRatio=`${n}/${s}`:a.style.paddingBottom=`${i}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const r=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(r-i)/(r/50);this.fullscreen.active?a.style.paddingBottom=null:this.media.style.transform=`translateY(-${l}%)`}else this.isHTML5&&a.classList.add(this.config.classNames.videoFixedRatio);return{padding:i,ratio:t}}function Sl(e,a,t=.05){const n=e/a,s=wl(Object.keys(Cl),n);return Math.abs(s-n)<=t?Cl[s]:[e,a]}function t5(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const pt={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const a=e.getAttribute("type");return!!y.empty(a)||pe.mime.call(this,a)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:pt.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,y.empty(this.config.ratio)||Et.call(e),Object.defineProperty(e.media,"quality",{get(){const a=pt.getSources.call(e).find(t=>t.getAttribute("src")===e.source);return a&&Number(a.getAttribute("size"))},set(a){if(e.quality!==a){if(e.config.quality.forced&&y.function(e.config.quality.onChange))e.config.quality.onChange(a);else{const t=pt.getSources.call(e).find(p=>Number(p.getAttribute("size"))===a);if(!t)return;const{currentTime:n,paused:s,preload:i,readyState:r,playbackRate:l}=e.media;e.media.src=t.getAttribute("src"),(i!=="none"||r)&&(e.once("loadedmetadata",()=>{e.speed=l,e.currentTime=n,s||et(e.play())}),e.media.load())}L.call(e,e.media,"qualitychange",!1,{quality:a})}}})},cancelRequests(){this.isHTML5&&(rt(pt.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function o5(e){return`${e}-${Math.floor(1e4*Math.random())}`}function Vn(e,...a){return y.empty(e)?e:e.toString().replace(/{(\d+)}/g,(t,n)=>a[n].toString())}function a5(e,a){return e===0||a===0||Number.isNaN(e)||Number.isNaN(a)?0:(e/a*100).toFixed(2)}const Qt=(e="",a="",t="")=>e.replace(new RegExp(a.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Bl=(e="")=>e.toString().replace(/\w\S*/g,a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase());function n5(e=""){let a=e.toString();return a=Qt(a,"-"," "),a=Qt(a,"_"," "),a=Bl(a),Qt(a," ","")}function i5(e=""){let a=e.toString();return a=n5(a),a.charAt(0).toLowerCase()+a.slice(1)}function s5(e){const a=document.createDocumentFragment(),t=document.createElement("div");return a.appendChild(t),t.innerHTML=e,a.firstChild.innerText}function r5(e){const a=document.createElement("div");return a.appendChild(e),a.innerHTML}const Ol={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Be={get(e="",a={}){if(y.empty(e)||y.empty(a))return"";let t=gl(a.i18n,e);if(y.empty(t))return Object.keys(Ol).includes(e)?Ol[e]:"";const n={"{seektime}":a.seekTime,"{title}":a.title};return Object.entries(n).forEach(([s,i])=>{t=Qt(t,s,i)}),t}};class Yt{constructor(a){T(this,"get",t=>{if(!Yt.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(y.empty(n))return null;const s=JSON.parse(n);return y.string(t)&&t.length?s[t]:s}),T(this,"set",t=>{if(!Yt.supported||!this.enabled||!y.object(t))return;let n=this.get();y.empty(n)&&(n={}),me(n,t);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=a.config.storage.enabled,this.key=a.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const a="___test";return window.localStorage.setItem(a,a),window.localStorage.removeItem(a),!0}catch{return!1}}}function Wt(e,a="text"){return new Promise((t,n)=>{try{const s=new XMLHttpRequest;if(!("withCredentials"in s))return;s.addEventListener("load",()=>{if(a==="text")try{t(JSON.parse(s.responseText))}catch{t(s.responseText)}else t(s.response)}),s.addEventListener("error",()=>{throw new Error(s.status)}),s.open("GET",e,!0),s.responseType=a,s.send()}catch(s){n(s)}})}function El(e,a){if(!y.string(e))return;const t="cache",n=y.string(a);let s=!1;const i=()=>document.getElementById(a)!==null,r=(l,p)=>{l.innerHTML=p,n&&i()||document.body.insertAdjacentElement("afterbegin",l)};if(!n||!i()){const l=Yt.supported,p=document.createElement("div");if(p.setAttribute("hidden",""),n&&p.setAttribute("id",a),l){const c=window.localStorage.getItem(`${t}-${a}`);if(s=c!==null,s){const d=JSON.parse(c);r(p,d.content)}}Wt(e).then(c=>{if(!y.empty(c)){if(l)try{window.localStorage.setItem(`${t}-${a}`,JSON.stringify({content:c}))}catch{}r(p,c)}}).catch(()=>{})}}const xl=e=>Math.trunc(e/60/60%60,10),l5=e=>Math.trunc(e/60%60,10),c5=e=>Math.trunc(e%60,10);function Do(e=0,a=!1,t=!1){if(!y.number(e))return Do(void 0,a,t);const n=l=>`0${l}`.slice(-2);let s=xl(e);const i=l5(e),r=c5(e);return s=a||s>0?`${s}:`:"",`${t&&e>0?"-":""}${s}${n(i)}:${n(r)}`}const F={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),a=window.location.host?window.location.host:window.top.location.host,t=e.host!==a||Se.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=be.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:qt.call(this,this.config.selectors.buttons.play),pause:be.call(this,this.config.selectors.buttons.pause),restart:be.call(this,this.config.selectors.buttons.restart),rewind:be.call(this,this.config.selectors.buttons.rewind),fastForward:be.call(this,this.config.selectors.buttons.fastForward),mute:be.call(this,this.config.selectors.buttons.mute),pip:be.call(this,this.config.selectors.buttons.pip),airplay:be.call(this,this.config.selectors.buttons.airplay),settings:be.call(this,this.config.selectors.buttons.settings),captions:be.call(this,this.config.selectors.buttons.captions),fullscreen:be.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=be.call(this,this.config.selectors.progress),this.elements.inputs={seek:be.call(this,this.config.selectors.inputs.seek),volume:be.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:be.call(this,this.config.selectors.display.buffer),currentTime:be.call(this,this.config.selectors.display.currentTime),duration:be.call(this,this.config.selectors.display.duration)},y.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,a){const t="http://www.w3.org/2000/svg",n=F.getIconUrl.call(this),s=`${n.cors?"":n.url}#${this.config.iconPrefix}`,i=document.createElementNS(t,"svg");zn(i,me(a,{"aria-hidden":"true",focusable:"false"}));const r=document.createElementNS(t,"use"),l=`${s}-${e}`;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),i.appendChild(r),i},createLabel(e,a={}){const t=Be.get(e,this.config);return D("span",{...a,class:[a.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(e){if(y.empty(e))return null;const a=D("span",{class:this.config.classNames.menu.value});return a.appendChild(D("span",{class:this.config.classNames.menu.badge},e)),a},createButton(e,a){const t=me({},a);let n=i5(e);const s={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(r=>{Object.keys(t).includes(r)&&(s[r]=t[r],delete t[r])}),s.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(r=>r===this.config.classNames.control)||me(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,e){case"play":s.toggle=!0,s.label="play",s.labelPressed="pause",s.icon="play",s.iconPressed="pause";break;case"mute":s.toggle=!0,s.label="mute",s.labelPressed="unmute",s.icon="volume",s.iconPressed="muted";break;case"captions":s.toggle=!0,s.label="enableCaptions",s.labelPressed="disableCaptions",s.icon="captions-off",s.iconPressed="captions-on";break;case"fullscreen":s.toggle=!0,s.label="enterFullscreen",s.labelPressed="exitFullscreen",s.icon="enter-fullscreen",s.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,n="play",s.label="play",s.icon="play";break;default:y.empty(s.label)&&(s.label=n),y.empty(s.icon)&&(s.icon=e)}const i=D(s.element);return s.toggle?(i.appendChild(F.createIcon.call(this,s.iconPressed,{class:"icon--pressed"})),i.appendChild(F.createIcon.call(this,s.icon,{class:"icon--not-pressed"})),i.appendChild(F.createLabel.call(this,s.labelPressed,{class:"label--pressed"})),i.appendChild(F.createLabel.call(this,s.label,{class:"label--not-pressed"}))):(i.appendChild(F.createIcon.call(this,s.icon)),i.appendChild(F.createLabel.call(this,s.label))),me(t,$e(this.config.selectors.buttons[n],t)),zn(i,t),n==="play"?(y.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(i)):this.elements.buttons[n]=i,i},createRange(e,a){const t=D("input",me($e(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Be.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},a));return this.elements.inputs[e]=t,F.updateRangeFill.call(this,t),TA.setup(t),t},createProgress(e,a){const t=D("progress",me($e(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},a));if(e!=="volume"){t.appendChild(D("span",null,"0"));const n={played:"played",buffer:"buffered"}[e],s=n?Be.get(n,this.config):"";t.innerText=`% ${s.toLowerCase()}`}return this.elements.display[e]=t,t},createTime(e,a){const t=$e(this.config.selectors.display[e],a),n=D("div",me(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Be.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts(e,a){_.call(this,e,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const n=yt(e,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(t.key))F.showMenuPanel.call(this,a,!0);else{let s;t.key!==" "&&(t.key==="ArrowDown"||n&&t.key==="ArrowRight"?(s=e.nextElementSibling,y.element(s)||(s=e.parentNode.firstElementChild)):(s=e.previousElementSibling,y.element(s)||(s=e.parentNode.lastElementChild)),Mn.call(this,s,!0))}},!1),_.call(this,e,"keyup",t=>{t.key==="Return"&&F.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:a,type:t,title:n,badge:s=null,checked:i=!1}){const r=$e(this.config.selectors.inputs[t]),l=D("button",me(r,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${r.class?r.class:""}`.trim(),"aria-checked":i,value:e})),p=D("span");p.innerHTML=n,y.element(s)&&p.appendChild(s),l.appendChild(p),Object.defineProperty(l,"checked",{enumerable:!0,get:()=>l.getAttribute("aria-checked")==="true",set(c){c&&Array.from(l.parentNode.children).filter(d=>yt(d,'[role="menuitemradio"]')).forEach(d=>d.setAttribute("aria-checked","false")),l.setAttribute("aria-checked",c?"true":"false")}}),this.listeners.bind(l,"click keyup",c=>{if(!y.keyboardEvent(c)||c.key===" "){switch(c.preventDefault(),c.stopPropagation(),l.checked=!0,t){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}F.showMenuPanel.call(this,"home",y.keyboardEvent(c))}},t,!1),F.bindMenuItemShortcuts.call(this,l,t),a.appendChild(l)},formatTime(e=0,a=!1){return y.number(e)?Do(e,xl(this.duration)>0,a):e},updateTimeDisplay(e=null,a=0,t=!1){y.element(e)&&y.number(a)&&(e.innerText=F.formatTime(a,t))},updateVolume(){this.supported.ui&&(y.element(this.elements.inputs.volume)&&F.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),y.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,a=0){y.element(e)&&(e.value=a,F.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!y.event(e))return;let a=0;const t=(n,s)=>{const i=y.number(s)?s:0,r=y.element(n)?n:this.elements.display.buffer;if(y.element(r)){r.value=i;const l=r.getElementsByTagName("span")[0];y.element(l)&&(l.childNodes[0].nodeValue=i)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":a=a5(this.currentTime,this.duration),e.type==="timeupdate"&&F.setRange.call(this,this.elements.inputs.seek,a);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const a=y.event(e)?e.target:e;if(y.element(a)&&a.getAttribute("type")==="range"){if(yt(a,this.config.selectors.inputs.seek)){a.setAttribute("aria-valuenow",this.currentTime);const t=F.formatTime(this.currentTime),n=F.formatTime(this.duration),s=Be.get("seekLabel",this.config);a.setAttribute("aria-valuetext",s.replace("{currentTime}",t).replace("{duration}",n))}else if(yt(a,this.config.selectors.inputs.volume)){const t=100*a.value;a.setAttribute("aria-valuenow",t),a.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else a.setAttribute("aria-valuenow",a.value);(Se.isWebKit||Se.isIPadOS)&&a.style.setProperty("--value",a.value/a.max*100+"%")}},updateSeekTooltip(e){var a,t;if(!this.config.tooltips.seek||!y.element(this.elements.inputs.seek)||!y.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,s=`${this.config.classNames.tooltip}--visible`,i=d=>ee(n,s,d);if(this.touch)return void i(!1);let r=0;const l=this.elements.progress.getBoundingClientRect();if(y.event(e))r=100/l.width*(e.pageX-l.left);else{if(!jo(n,s))return;r=parseFloat(n.style.left,10)}r<0?r=0:r>100&&(r=100);const p=this.duration/100*r;n.innerText=F.formatTime(p);const c=(a=this.config.markers)===null||a===void 0||(t=a.points)===null||t===void 0?void 0:t.find(({time:d})=>d===Math.round(p));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${r}%`,y.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&i(e.type==="mouseenter")},timeUpdate(e){const a=!y.element(this.elements.display.duration)&&this.config.invertTime;F.updateTimeDisplay.call(this,this.elements.display.currentTime,a?this.duration-this.currentTime:this.currentTime,a),e&&e.type==="timeupdate"&&this.media.seeking||F.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return ft(this.elements.display.currentTime,!0),void ft(this.elements.progress,!0);y.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=y.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&F.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&F.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&F.setMarkers.call(this),F.updateSeekTooltip.call(this)},toggleMenuButton(e,a){ft(this.elements.settings.buttons[e],!a)},updateSetting(e,a,t){const n=this.elements.settings.panels[e];let s=null,i=a;if(e==="captions")s=this.currentTrack;else{if(s=y.empty(t)?this[e]:t,y.empty(s)&&(s=this.config[e].default),!y.empty(this.options[e])&&!this.options[e].includes(s))return void this.debug.warn(`Unsupported value of '${s}' for ${e}`);if(!this.config[e].options.includes(s))return void this.debug.warn(`Disabled value of '${s}' for ${e}`)}if(y.element(i)||(i=n&&n.querySelector('[role="menu"]')),!y.element(i))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=F.getLabel.call(this,e,s);const r=i&&i.querySelector(`[value="${s}"]`);y.element(r)&&(r.checked=!0)},getLabel(e,a){switch(e){case"speed":return a===1?Be.get("normal",this.config):`${a}&times;`;case"quality":if(y.number(a)){const t=Be.get(`qualityLabel.${a}`,this.config);return t.length?t:`${a}p`}return Bl(a);case"captions":return $.getLabel.call(this);default:return null}},setQualityMenu(e){if(!y.element(this.elements.settings.panels.quality))return;const a="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');y.array(e)&&(this.options.quality=Fn(e).filter(i=>this.config.quality.options.includes(i)));const n=!y.empty(this.options.quality)&&this.options.quality.length>1;if(F.toggleMenuButton.call(this,a,n),vo(t),F.checkMenu.call(this),!n)return;const s=i=>{const r=Be.get(`qualityBadge.${i}`,this.config);return r.length?F.createBadge.call(this,r):null};this.options.quality.sort((i,r)=>{const l=this.config.quality.options;return l.indexOf(i)>l.indexOf(r)?1:-1}).forEach(i=>{F.createMenuItem.call(this,{value:i,list:t,type:a,title:F.getLabel.call(this,"quality",i),badge:s(i)})}),F.updateSetting.call(this,a,t)},setCaptionsMenu(){if(!y.element(this.elements.settings.panels.captions))return;const e="captions",a=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=$.getTracks.call(this),n=!!t.length;if(F.toggleMenuButton.call(this,e,n),vo(a),F.checkMenu.call(this),!n)return;const s=t.map((i,r)=>({value:r,checked:this.captions.toggled&&this.currentTrack===r,title:$.getLabel.call(this,i),badge:i.language&&F.createBadge.call(this,i.language.toUpperCase()),list:a,type:"language"}));s.unshift({value:-1,checked:!this.captions.toggled,title:Be.get("disabled",this.config),list:a,type:"language"}),s.forEach(F.createMenuItem.bind(this)),F.updateSetting.call(this,e,a)},setSpeedMenu(){if(!y.element(this.elements.settings.panels.speed))return;const e="speed",a=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const t=!y.empty(this.options.speed)&&this.options.speed.length>1;F.toggleMenuButton.call(this,e,t),vo(a),F.checkMenu.call(this),t&&(this.options.speed.forEach(n=>{F.createMenuItem.call(this,{value:n,list:a,type:e,title:F.getLabel.call(this,"speed",n)})}),F.updateSetting.call(this,e,a))},checkMenu(){const{buttons:e}=this.elements.settings,a=!y.empty(e)&&Object.values(e).some(t=>!t.hidden);ft(this.elements.settings.menu,!a)},focusFirstMenuItem(e,a=!1){if(this.elements.settings.popup.hidden)return;let t=e;y.element(t)||(t=Object.values(this.elements.settings.panels).find(s=>!s.hidden));const n=t.querySelector('[role^="menuitem"]');Mn.call(this,n,a)},toggleMenu(e){const{popup:a}=this.elements.settings,t=this.elements.buttons.settings;if(!y.element(a)||!y.element(t))return;const{hidden:n}=a;let s=n;if(y.boolean(e))s=e;else if(y.keyboardEvent(e)&&e.key==="Escape")s=!1;else if(y.event(e)){const i=y.function(e.composedPath)?e.composedPath()[0]:e.target,r=a.contains(i);if(r||!r&&e.target!==t&&s)return}t.setAttribute("aria-expanded",s),ft(a,!s),ee(this.elements.container,this.config.classNames.menu.open,s),s&&y.keyboardEvent(e)?F.focusFirstMenuItem.call(this,null,!0):s||n||Mn.call(this,t,y.keyboardEvent(e))},getMenuSize(e){const a=e.cloneNode(!0);a.style.position="absolute",a.style.opacity=0,a.removeAttribute("hidden"),e.parentNode.appendChild(a);const t=a.scrollWidth,n=a.scrollHeight;return rt(a),{width:t,height:n}},showMenuPanel(e="",a=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!y.element(t))return;const n=t.parentNode,s=Array.from(n.children).find(i=>!i.hidden);if(pe.transitions&&!pe.reducedMotion){n.style.width=`${s.scrollWidth}px`,n.style.height=`${s.scrollHeight}px`;const i=F.getMenuSize.call(this,t),r=l=>{l.target===n&&["width","height"].includes(l.propertyName)&&(n.style.width="",n.style.height="",Io.call(this,n,xn,r))};_.call(this,n,xn,r),n.style.width=`${i.width}px`,n.style.height=`${i.height}px`}ft(s,!0),ft(t,!1),F.focusFirstMenuItem.call(this,t,a)},setDownloadUrl(){const e=this.elements.buttons.download;y.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:a,createButton:t,createProgress:n,createRange:s,createTime:i,setQualityMenu:r,setSpeedMenu:l,showMenuPanel:p}=F;this.elements.controls=null,y.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const c=D("div",$e(this.config.selectors.controls.wrapper));this.elements.controls=c;const d={class:"plyr__controls__item"};return Fn(y.array(this.config.controls)?this.config.controls:[]).forEach(u=>{if(u==="restart"&&c.appendChild(t.call(this,"restart",d)),u==="rewind"&&c.appendChild(t.call(this,"rewind",d)),u==="play"&&c.appendChild(t.call(this,"play",d)),u==="fast-forward"&&c.appendChild(t.call(this,"fast-forward",d)),u==="progress"){const f=D("div",{class:`${d.class} plyr__progress__container`}),m=D("div",$e(this.config.selectors.progress));if(m.appendChild(s.call(this,"seek",{id:`plyr-seek-${e.id}`})),m.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const h=D("span",{class:this.config.classNames.tooltip},"00:00");m.appendChild(h),this.elements.display.seekTooltip=h}this.elements.progress=m,f.appendChild(this.elements.progress),c.appendChild(f)}if(u==="current-time"&&c.appendChild(i.call(this,"currentTime",d)),u==="duration"&&c.appendChild(i.call(this,"duration",d)),u==="mute"||u==="volume"){let{volume:f}=this.elements;if(y.element(f)&&c.contains(f)||(f=D("div",me({},d,{class:`${d.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),u==="mute"&&f.appendChild(t.call(this,"mute")),u==="volume"&&!Se.isIos&&!Se.isIPadOS){const m={max:1,step:.05,value:this.config.volume};f.appendChild(s.call(this,"volume",me(m,{id:`plyr-volume-${e.id}`})))}}if(u==="captions"&&c.appendChild(t.call(this,"captions",d)),u==="settings"&&!y.empty(this.config.settings)){const f=D("div",me({},d,{class:`${d.class} plyr__menu`.trim(),hidden:""}));f.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const m=D("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),h=D("div"),g=D("div",{id:`plyr-settings-${e.id}-home`}),b=D("div",{role:"menu"});g.appendChild(b),h.appendChild(g),this.elements.settings.panels.home=g,this.config.settings.forEach(A=>{const C=D("button",me($e(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));a.call(this,C,A),_.call(this,C,"click",()=>{p.call(this,A,!1)});const z=D("span",null,Be.get(A,this.config)),P=D("span",{class:this.config.classNames.menu.value});P.innerHTML=e[A],z.appendChild(P),C.appendChild(z),b.appendChild(C);const K=D("div",{id:`plyr-settings-${e.id}-${A}`,hidden:""}),Z=D("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});Z.appendChild(D("span",{"aria-hidden":!0},Be.get(A,this.config))),Z.appendChild(D("span",{class:this.config.classNames.hidden},Be.get("menuBack",this.config))),_.call(this,K,"keydown",G=>{G.key==="ArrowLeft"&&(G.preventDefault(),G.stopPropagation(),p.call(this,"home",!0))},!1),_.call(this,Z,"click",()=>{p.call(this,"home",!1)}),K.appendChild(Z),K.appendChild(D("div",{role:"menu"})),h.appendChild(K),this.elements.settings.buttons[A]=C,this.elements.settings.panels[A]=K}),m.appendChild(h),f.appendChild(m),c.appendChild(f),this.elements.settings.popup=m,this.elements.settings.menu=f}if(u==="pip"&&pe.pip&&c.appendChild(t.call(this,"pip",d)),u==="airplay"&&pe.airplay&&c.appendChild(t.call(this,"airplay",d)),u==="download"){const f=me({},d,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:m}=this.config.urls;!y.url(m)&&this.isEmbed&&me(f,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(t.call(this,"download",f))}u==="fullscreen"&&c.appendChild(t.call(this,"fullscreen",d))}),this.isHTML5&&r.call(this,pt.getQualityOptions.call(this)),l.call(this),c},inject(){if(this.config.loadSprite){const s=F.getIconUrl.call(this);s.cors&&El(s.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const a={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;y.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,a)),this.config.controls||(this.config.controls=[]),y.element(this.config.controls)||y.string(this.config.controls)?e=this.config.controls:(e=F.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:$.getLabel.call(this)}),t=!1);let n;if(t&&y.string(this.config.controls)&&(e=(s=>{let i=s;return Object.entries(a).forEach(([r,l])=>{i=Qt(i,`{${r}}`,l)}),i})(e)),y.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),y.element(n)||(n=this.elements.container),n[y.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),y.element(this.elements.controls)||F.findElements.call(this),!y.empty(this.elements.buttons)){const s=i=>{const r=this.config.classNames.controlPressed;i.setAttribute("aria-pressed","false"),Object.defineProperty(i,"pressed",{configurable:!0,enumerable:!0,get:()=>jo(i,r),set(l=!1){ee(i,r,l),i.setAttribute("aria-pressed",l?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(i=>{y.array(i)||y.nodeList(i)?Array.from(i).filter(Boolean).forEach(s):s(i)})}if(Se.isEdge&&hl(n),this.config.tooltips.controls){const{classNames:s,selectors:i}=this.config,r=`${i.controls.wrapper} ${i.labels} .${s.hidden}`,l=qt.call(this,r);Array.from(l).forEach(p=>{ee(p,this.config.classNames.hidden,!1),ee(p,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 e,a;if(!this.duration||this.elements.markers)return;const t=(e=this.config.markers)===null||e===void 0||(a=e.points)===null||a===void 0?void 0:a.filter(({time:p})=>p>0&&p<this.duration);if(t==null||!t.length)return;const n=document.createDocumentFragment(),s=document.createDocumentFragment();let i=null;const r=`${this.config.classNames.tooltip}--visible`,l=p=>ee(i,r,p);t.forEach(p=>{const c=D("span",{class:this.config.classNames.marker},""),d=p.time/this.duration*100+"%";i&&(c.addEventListener("mouseenter",()=>{p.label||(i.style.left=d,i.innerHTML=p.label,l(!0))}),c.addEventListener("mouseleave",()=>{l(!1)})),c.addEventListener("click",()=>{this.currentTime=p.time}),c.style.left=d,s.appendChild(c)}),n.appendChild(s),this.config.tooltips.seek||(i=D("span",{class:this.config.classNames.tooltip},""),n.appendChild(i)),this.elements.markers={points:s,tip:i},this.elements.progress.appendChild(n)}};function zl(e,a=!0){let t=e;if(a){const n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch{return null}}function Ml(e){const a=new URLSearchParams;return y.object(e)&&Object.entries(e).forEach(([t,n])=>{a.set(t,n)}),a}const $={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!pe.textTracks)return void(y.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&F.setCaptionsMenu.call(this));if(y.element(this.elements.captions)||(this.elements.captions=D("div",$e(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),JA(this.elements.captions,this.elements.wrapper)),Se.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(s=>{const i=s.getAttribute("src"),r=zl(i);r!==null&&r.hostname!==window.location.href.hostname&&["http:","https:"].includes(r.protocol)&&Wt(i,"blob").then(l=>{s.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{rt(s)})})}const e=Fn((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let a=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();a==="auto"&&([a]=e);let t=this.storage.get("captions");if(y.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:a,languages:e}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";_.call(this,this.media.textTracks,n,$.update.bind(this))}setTimeout($.update.bind(this),0)},update(){const e=$.getTracks.call(this,!0),{active:a,language:t,meta:n,currentTrackNode:s}=this.captions,i=!!e.find(r=>r.language===t);this.isHTML5&&this.isVideo&&e.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"),_.call(this,r,"cuechange",()=>$.updateCues.call(this))}),(i&&this.language!==t||!e.includes(s))&&($.setLanguage.call(this,t),$.toggle.call(this,a&&i)),this.elements&&ee(this.elements.container,this.config.classNames.captions.enabled,!y.empty(e)),y.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&F.setCaptionsMenu.call(this)},toggle(e,a=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,n=this.config.classNames.captions.active,s=y.nullOrUndefined(e)?!t:e;if(s!==t){if(a||(this.captions.active=s,this.storage.set({captions:s})),!this.language&&s&&!a){const i=$.getTracks.call(this),r=$.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=r.language,void $.set.call(this,i.indexOf(r))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=s),ee(this.elements.container,n,s),this.captions.toggled=s,F.updateSetting.call(this,"captions"),L.call(this,this.media,s?"captionsenabled":"captionsdisabled")}setTimeout(()=>{s&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,a=!0){const t=$.getTracks.call(this);if(e!==-1)if(y.number(e))if(e in t){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const n=t[e],{language:s}=n||{};this.captions.currentTrackNode=n,F.updateSetting.call(this,"captions"),a||(this.captions.language=s,this.storage.set({language:s})),this.isVimeo&&this.embed.enableTextTrack(s),L.call(this,this.media,"languagechange")}$.toggle.call(this,!0,a),this.isHTML5&&this.isVideo&&$.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else $.toggle.call(this,!1,a)},setLanguage(e,a=!0){if(!y.string(e))return void this.debug.warn("Invalid language argument",e);const t=e.toLowerCase();this.captions.language=t;const n=$.getTracks.call(this),s=$.findTrack.call(this,[t]);$.set.call(this,n.indexOf(s),a)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(a=>!this.isHTML5||e||this.captions.meta.has(a)).filter(a=>["captions","subtitles"].includes(a.kind))},findTrack(e,a=!1){const t=$.getTracks.call(this),n=r=>Number((this.captions.meta.get(r)||{}).default),s=Array.from(t).sort((r,l)=>n(l)-n(r));let i;return e.every(r=>(i=s.find(l=>l.language===r),!i)),i||(a?s[0]:void 0)},getCurrentTrack(){return $.getTracks.call(this)[this.currentTrack]},getLabel(e){let a=e;return!y.track(a)&&pe.textTracks&&this.captions.toggled&&(a=$.getCurrentTrack.call(this)),y.track(a)?y.empty(a.label)?y.empty(a.language)?Be.get("enabled",this.config):e.language.toUpperCase():a.label:Be.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!y.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!y.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let a=e;if(!a){const n=$.getCurrentTrack.call(this);a=Array.from((n||{}).activeCues||[]).map(s=>s.getCueAsHTML()).map(r5)}const t=a.map(n=>n.trim()).join(`
37
+ `);if(t!==this.elements.captions.innerHTML){vo(this.elements.captions);const n=D("span",$e(this.config.selectors.caption));n.innerHTML=t,this.elements.captions.appendChild(n),L.call(this,this.media,"cuechange")}}},Rl={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:[]}},Nn={active:"picture-in-picture",inactive:"inline"},ut={html5:"html5",youtube:"youtube",vimeo:"vimeo"},vn={audio:"audio",video:"video"};function d5(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?ut.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?ut.vimeo:null}const Pn=()=>{};class m5{constructor(a=!1){this.enabled=window.console&&a,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Pn}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Pn}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Pn}}class Le{constructor(a){T(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;y.element(t)&&(t.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;L.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),T(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",ee(this.target,this.player.config.classNames.fullscreen.fallback,t),Se.isIos){let n=document.head.querySelector('meta[name="viewport"]');const s="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const i=y.string(n.content)&&n.content.includes(s);t?(this.cleanupViewport=!i,i||(n.content+=`,${s}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(r=>r.trim()!==s).join(","))}this.onChange()}),T(this,"trapFocus",t=>{if(Se.isIos||Se.isIPadOS||!this.active||t.key!=="Tab")return;const n=document.activeElement,s=qt.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[i]=s,r=s[s.length-1];n!==r||t.shiftKey?n===i&&t.shiftKey&&(r.focus(),t.preventDefault()):(i.focus(),t.preventDefault())}),T(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Le.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");ee(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),T(this,"enter",()=>{this.supported&&(Se.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Le.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?y.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),T(this,"exit",()=>{if(this.supported)if(Se.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),et(this.player.play());else if(!Le.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!y.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),T(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=a,this.prefix=Le.prefix,this.property=Le.property,this.scrollPosition={x:0,y:0},this.forceFallback=a.config.fullscreen.fallback==="force",this.player.elements.fullscreen=a.config.fullscreen.container&&XA(this.player.elements.container,a.config.fullscreen.container),_.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),_.call(this.player,this.player.elements.container,"dblclick",t=>{y.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),_.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Le.nativeSupported&&!this.forceFallback}static get prefix(){if(y.function(document.exitFullscreen))return"";let a="";return["webkit","moz","ms"].some(t=>!(!y.function(document[`${t}ExitFullscreen`])&&!y.function(document[`${t}CancelFullScreen`]))&&(a=t,!0)),a}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Le.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Le.nativeSupported||!Se.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Le.nativeSupported||this.forceFallback)return jo(this.target,this.player.config.classNames.fullscreen.fallback);const a=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return a&&a.shadowRoot?a===this.target.getRootNode().host:a===this.target}get target(){return Se.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Go(e,a=1){return new Promise((t,n)=>{const s=new Image,i=()=>{delete s.onload,delete s.onerror,(s.naturalWidth>=a?t:n)(s)};Object.assign(s,{onload:i,onerror:i,src:e})})}const oe={addStyleHook(){ee(this.elements.container,this.config.selectors.container.replace(".",""),!0),ee(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void oe.toggleNativeControls.call(this,!0);y.element(this.elements.controls)||(F.inject.call(this),this.listeners.controls()),oe.toggleNativeControls.call(this),this.isHTML5&&$.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,F.updateVolume.call(this),F.timeUpdate.call(this),F.durationUpdate.call(this),oe.checkPlaying.call(this),ee(this.elements.container,this.config.classNames.pip.supported,pe.pip&&this.isHTML5&&this.isVideo),ee(this.elements.container,this.config.classNames.airplay.supported,pe.airplay&&this.isHTML5),ee(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{L.call(this,this.media,"ready")},0),oe.setTitle.call(this),this.poster&&oe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&F.durationUpdate.call(this),this.config.mediaMetadata&&F.setMediaMetadata.call(this)},setTitle(){let e=Be.get("play",this.config);if(y.string(this.config.title)&&!y.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(a=>{a.setAttribute("aria-label",e)}),this.isEmbed){const a=be.call(this,"iframe");if(!y.element(a))return;const t=y.empty(this.config.title)?"video":this.config.title,n=Be.get("frameTitle",this.config);a.setAttribute("title",n.replace("{title}",t))}},togglePoster(e){ee(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,a=!0){return a&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),e5.call(this).then(()=>Go(e)).catch(t=>{throw e===this.poster&&oe.togglePoster.call(this,!1),t}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),oe.togglePoster.call(this,!0),e)))},checkPlaying(e){ee(this.elements.container,this.config.classNames.playing,this.playing),ee(this.elements.container,this.config.classNames.paused,this.paused),ee(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(a=>{Object.assign(a,{pressed:this.playing}),a.setAttribute("aria-label",Be.get(this.playing?"pause":"play",this.config))}),y.event(e)&&e.type==="timeupdate"||oe.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{ee(this.elements.container,this.config.classNames.loading,this.loading),oe.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:a}=this.elements;if(a&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||a.pressed||a.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!y.empty(e)&&y.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),y.empty(this.media.style)&&this.media.removeAttribute("style")}};class p5{constructor(a){T(this,"firstTouch",()=>{const{player:t}=this,{elements:n}=t;t.touch=!0,ee(n.container,t.config.classNames.isTouch,!0)}),T(this,"global",(t=!0)=>{const{player:n}=this;n.config.keyboard.global&&Zt.call(n,window,"keydown keyup",this.handleKey,t,!1),Zt.call(n,document.body,"click",this.toggleMenu,t),Rn.call(n,document.body,"touchstart",this.firstTouch)}),T(this,"container",()=>{const{player:t}=this,{config:n,elements:s,timers:i}=t;!n.keyboard.global&&n.keyboard.focused&&_.call(t,s.container,"keydown keyup",this.handleKey,!1),_.call(t,s.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",p=>{const{controls:c}=s;c&&p.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let d=0;["touchstart","touchmove","mousemove"].includes(p.type)&&(oe.toggleControls.call(t,!0),d=t.touch?3e3:2e3),clearTimeout(i.controls),i.controls=setTimeout(()=>oe.toggleControls.call(t,!1),d)});const r=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const p=s.wrapper,{active:c}=t.fullscreen,[d,u]=Tn.call(t),f=Al(`aspect-ratio: ${d} / ${u}`);if(!c)return void(f?(p.style.width=null,p.style.height=null):(p.style.maxWidth=null,p.style.margin=null));const[m,h]=t5(),g=m/h>d/u;f?(p.style.width=g?"auto":"100%",p.style.height=g?"100%":"auto"):(p.style.maxWidth=g?h/u*d+"px":null,p.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(i.resized),i.resized=setTimeout(r,50)};_.call(t,s.container,"enterfullscreen exitfullscreen",p=>{const{target:c}=t.fullscreen;c===s.container&&(!t.isEmbed&&y.empty(t.config.ratio)||(r(),(p.type==="enterfullscreen"?_:Io).call(t,window,"resize",l)))})}),T(this,"media",()=>{const{player:t}=this,{elements:n}=t;if(_.call(t,t.media,"timeupdate seeking seeked",i=>F.timeUpdate.call(t,i)),_.call(t,t.media,"durationchange loadeddata loadedmetadata",i=>F.durationUpdate.call(t,i)),_.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),_.call(t,t.media,"progress playing seeking seeked",i=>F.updateProgress.call(t,i)),_.call(t,t.media,"volumechange",i=>F.updateVolume.call(t,i)),_.call(t,t.media,"playing play pause ended emptied timeupdate",i=>oe.checkPlaying.call(t,i)),_.call(t,t.media,"waiting canplay seeked playing",i=>oe.checkLoading.call(t,i)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const i=be.call(t,`.${t.config.classNames.video}`);if(!y.element(i))return;_.call(t,n.container,"click",r=>{([n.container,i].includes(r.target)||i.contains(r.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(r,t.restart,"restart"),this.proxy(r,()=>{et(t.play())},"play")):this.proxy(r,()=>{et(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&_.call(t,n.wrapper,"contextmenu",i=>{i.preventDefault()},!1),_.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),_.call(t,t.media,"ratechange",()=>{F.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),_.call(t,t.media,"qualitychange",i=>{F.updateSetting.call(t,"quality",null,i.detail.quality)}),_.call(t,t.media,"ready qualitychange",()=>{F.setDownloadUrl.call(t)});const s=t.config.events.concat(["keyup","keydown"]).join(" ");_.call(t,t.media,s,i=>{let{detail:r={}}=i;i.type==="error"&&(r=t.media.error),L.call(t,n.container,i.type,!0,r)})}),T(this,"proxy",(t,n,s)=>{const{player:i}=this,r=i.config.listeners[s];let l=!0;y.function(r)&&(l=r.call(i,t)),l!==!1&&y.function(n)&&n.call(i,t)}),T(this,"bind",(t,n,s,i,r=!0)=>{const{player:l}=this,p=l.config.listeners[i],c=y.function(p);_.call(l,t,n,d=>this.proxy(d,s,i),r&&!c)}),T(this,"controls",()=>{const{player:t}=this,{elements:n}=t,s=Se.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(i=>{this.bind(i,"click",()=>{et(t.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{L.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",i=>{i.stopPropagation(),i.preventDefault(),F.toggleMenu.call(t,i)},null,!1),this.bind(n.buttons.settings,"keyup",i=>{[" ","Enter"].includes(i.key)&&(i.key!=="Enter"?(i.preventDefault(),i.stopPropagation(),F.toggleMenu.call(t,i)):F.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",i=>{i.key==="Escape"&&F.toggleMenu.call(t,i)}),this.bind(n.inputs.seek,"mousedown mousemove",i=>{const r=n.progress.getBoundingClientRect(),l=100/r.width*(i.pageX-r.left);i.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",i=>{const r=i.currentTarget,l="play-on-seeked";if(y.keyboardEvent(i)&&!["ArrowLeft","ArrowRight"].includes(i.key))return;t.lastSeekTime=Date.now();const p=r.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(i.type);p&&c?(r.removeAttribute(l),et(t.play())):!c&&t.playing&&(r.setAttribute(l,""),t.pause())}),Se.isIos){const i=qt.call(t,'input[type="range"]');Array.from(i).forEach(r=>this.bind(r,s,l=>hl(l.target)))}this.bind(n.inputs.seek,s,i=>{const r=i.currentTarget;let l=r.getAttribute("seek-value");y.empty(l)&&(l=r.value),r.removeAttribute("seek-value"),t.currentTime=l/r.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",i=>F.updateSeekTooltip.call(t,i)),this.bind(n.progress,"mousemove touchmove",i=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startMove(i)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:i}=t;i&&i.loaded&&i.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",i=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.startScrubbing(i)}),this.bind(n.progress,"mouseup touchend",i=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endScrubbing(i)}),Se.isWebKit&&Array.from(qt.call(t,'input[type="range"]')).forEach(i=>{this.bind(i,"input",r=>F.updateRangeFill.call(t,r.target))}),t.config.toggleInvert&&!y.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,F.timeUpdate.call(t))}),this.bind(n.inputs.volume,s,i=>{t.volume=i.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",i=>{n.controls.hover=!t.touch&&i.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(i=>!i.contains(n.container)).forEach(i=>{this.bind(i,"mouseenter mouseleave",r=>{n.controls&&(n.controls.hover=!t.touch&&r.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",i=>{n.controls.pressed=["mousedown","touchstart"].includes(i.type)}),this.bind(n.controls,"focusin",()=>{const{config:i,timers:r}=t;ee(n.controls,i.classNames.noTransition,!0),oe.toggleControls.call(t,!0),setTimeout(()=>{ee(n.controls,i.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout(()=>oe.toggleControls.call(t,!1),l)}),this.bind(n.inputs.volume,"wheel",i=>{const r=i.webkitDirectionInvertedFromDevice,[l,p]=[i.deltaX,-i.deltaY].map(u=>r?-u:u),c=Math.sign(Math.abs(l)>Math.abs(p)?l:p);t.increaseVolume(c/50);const{volume:d}=t.media;(c===1&&d<1||c===-1&&d>0)&&i.preventDefault()},"volume",!1)}),this.player=a,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(a){const{player:t}=this,{elements:n}=t,{key:s,type:i,altKey:r,ctrlKey:l,metaKey:p,shiftKey:c}=a,d=i==="keydown",u=d&&s===this.lastKey;if(!(r||l||p||c)&&s){if(d){const m=document.activeElement;if(y.element(m)){const{editable:h}=t.config.selectors,{seek:g}=n.inputs;if(m!==g&&yt(m,h)||a.key===" "&&yt(m,'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(s)&&(a.preventDefault(),a.stopPropagation()),s){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":u||(f=parseInt(s,10),t.currentTime=t.duration/10*f);break;case" ":case"k":u||et(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":u||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":u||t.toggleCaptions();break;case"l":t.loop=!t.loop}s==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=s}else this.lastKey=null;var f}}toggleMenu(a){F.toggleMenu.call(this.player,a)}}function u5(e,a){return e(a={exports:{}},a.exports),a.exports}var h5=u5(function(e,a){e.exports=function(){var t=function(){},n={},s={},i={};function r(f,m){f=f.push?f:[f];var h,g,b,A=[],C=f.length,z=C;for(h=function(P,K){K.length&&A.push(P),--z||m(A)};C--;)g=f[C],(b=s[g])?h(g,b):(i[g]=i[g]||[]).push(h)}function l(f,m){if(f){var h=i[f];if(s[f]=m,h)for(;h.length;)h[0](f,m),h.splice(0,1)}}function p(f,m){f.call&&(f={success:f}),m.length?(f.error||t)(m):(f.success||t)(f)}function c(f,m,h,g){var b,A,C=document,z=h.async,P=(h.numRetries||0)+1,K=h.before||t,Z=f.replace(/[\?|#].*$/,""),G=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(Z)?((A=C.createElement("link")).rel="stylesheet",A.href=G,(b="hideFocus"in A)&&A.relList&&(b=0,A.rel="preload",A.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(Z)?(A=C.createElement("img")).src=G:((A=C.createElement("script")).src=f,A.async=z===void 0||z),A.onload=A.onerror=A.onbeforeload=function(re){var V=re.type[0];if(b)try{A.sheet.cssText.length||(V="e")}catch(ae){ae.code!=18&&(V="e")}if(V=="e"){if((g+=1)<P)return c(f,m,h,g)}else if(A.rel=="preload"&&A.as=="style")return A.rel="stylesheet";m(f,V,re.defaultPrevented)},K(f,A)!==!1&&C.head.appendChild(A)}function d(f,m,h){var g,b,A=(f=f.push?f:[f]).length,C=A,z=[];for(g=function(P,K,Z){if(K=="e"&&z.push(P),K=="b"){if(!Z)return;z.push(P)}--A||m(z)},b=0;b<C;b++)c(f[b],g,h)}function u(f,m,h){var g,b;if(m&&m.trim&&(g=m),b=(g?h:m)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function A(C,z){d(f,function(P){p(b,P),C&&p({success:C,error:z},P),l(g,P)},b)}if(b.returnPromise)return new Promise(A);A()}return u.ready=function(f,m){return r(f,function(h){p(m,h)}),u},u.done=function(f){l(f,[])},u.reset=function(){n={},s={},i={}},u.isDefined=function(f){return f in n},u}()});function jn(e){return new Promise((a,t)=>{h5(e,{success:a,error:t})})}function g5(e){return y.empty(e)?null:y.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function f5(e){const a=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return a&&a.length===5?a[4]:null}function Jt(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,L.call(this,this.media,e?"play":"pause"))}const In={setup(){const e=this;ee(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,Et.call(e),y.object(window.Vimeo)?In.ready.call(e):jn(e.config.urls.vimeo.sdk).then(()=>{In.ready.call(e)}).catch(a=>{e.debug.warn("Vimeo SDK (player.js) failed to load",a)})},ready(){const e=this,a=e.config.vimeo,{premium:t,referrerPolicy:n,...s}=a;let i=e.media.getAttribute("src"),r="";y.empty(i)?(i=e.media.getAttribute(e.config.attributes.embed.id),r=e.media.getAttribute(e.config.attributes.embed.hash)):r=f5(i);const l=r?{h:r}:{};t&&Object.assign(s,{controls:!1,sidedock:!1});const p=Ml({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...l,...s}),c=g5(i),d=D("iframe"),u=Vn(e.config.urls.vimeo.iframe,c,p);if(d.setAttribute("src",u),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),y.empty(n)||d.setAttribute("referrerPolicy",n),t||!a.customControls)d.setAttribute("data-poster",e.poster),e.media=Po(d,e.media);else{const C=D("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});C.appendChild(d),e.media=Po(C,e.media)}a.customControls||Wt(Vn(e.config.urls.vimeo.api,u)).then(C=>{!y.empty(C)&&C.thumbnail_url&&oe.setPoster.call(e,C.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(d,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(Jt.call(e,!0),e.embed.play()),e.media.pause=()=>(Jt.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:f}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>f,set(C){const{embed:z,media:P,paused:K,volume:Z}=e,G=K&&!z.hasPlayed;P.seeking=!0,L.call(e,P,"seeking"),Promise.resolve(G&&z.setVolume(0)).then(()=>z.setCurrentTime(C)).then(()=>G&&z.pause()).then(()=>G&&z.setVolume(Z)).catch(()=>{})}});let m=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>m,set(C){e.embed.setPlaybackRate(C).then(()=>{m=C,L.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:h}=e.config;Object.defineProperty(e.media,"volume",{get:()=>h,set(C){e.embed.setVolume(C).then(()=>{h=C,L.call(e,e.media,"volumechange")})}});let{muted:g}=e.config;Object.defineProperty(e.media,"muted",{get:()=>g,set(C){const z=!!y.boolean(C)&&C;e.embed.setMuted(!!z||e.config.muted).then(()=>{g=z,L.call(e,e.media,"volumechange")})}});let b,{loop:A}=e.config;Object.defineProperty(e.media,"loop",{get:()=>A,set(C){const z=y.boolean(C)?C:e.config.loop.active;e.embed.setLoop(z).then(()=>{A=z})}}),e.embed.getVideoUrl().then(C=>{b=C,F.setDownloadUrl.call(e)}).catch(C=>{this.debug.warn(C)}),Object.defineProperty(e.media,"currentSrc",{get:()=>b}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(C=>{const[z,P]=C;e.embed.ratio=Sl(z,P),Et.call(this)}),e.embed.setAutopause(e.config.autopause).then(C=>{e.config.autopause=C}),e.embed.getVideoTitle().then(C=>{e.config.title=C,oe.setTitle.call(this)}),e.embed.getCurrentTime().then(C=>{f=C,L.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(C=>{e.media.duration=C,L.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(C=>{e.media.textTracks=C,$.setup.call(e)}),e.embed.on("cuechange",({cues:C=[]})=>{const z=C.map(P=>s5(P.text));$.updateCues.call(e,z)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(C=>{Jt.call(e,!C),C||L.call(e,e.media,"playing")}),y.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{L.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{L.call(e,e.media,"playing")}),e.embed.on("play",()=>{Jt.call(e,!0),L.call(e,e.media,"playing")}),e.embed.on("pause",()=>{Jt.call(e,!1)}),e.embed.on("timeupdate",C=>{e.media.seeking=!1,f=C.seconds,L.call(e,e.media,"timeupdate")}),e.embed.on("progress",C=>{e.media.buffered=C.percent,L.call(e,e.media,"progress"),parseInt(C.percent,10)===1&&L.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(z=>{z!==e.media.duration&&(e.media.duration=z,L.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,L.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,L.call(e,e.media,"ended")}),e.embed.on("error",C=>{e.media.error=C,L.call(e,e.media,"error")}),a.customControls&&setTimeout(()=>oe.build.call(e),0)}};function y5(e){return y.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function Xt(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,L.call(this,this.media,e?"play":"pause"))}function b5(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ho={setup(){if(ee(this.elements.wrapper,this.config.classNames.embed,!0),y.object(window.YT)&&y.function(window.YT.Player))Ho.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{y.function(e)&&e(),Ho.ready.call(this)},jn(this.config.urls.youtube.sdk).catch(a=>{this.debug.warn("YouTube API failed to load",a)})}},getTitle(e){Wt(Vn(this.config.urls.youtube.api,e)).then(a=>{if(y.object(a)){const{title:t,height:n,width:s}=a;this.config.title=t,oe.setTitle.call(this),this.embed.ratio=Sl(s,n)}Et.call(this)}).catch(()=>{Et.call(this)})},ready(){const e=this,a=e.config.youtube,t=e.media&&e.media.getAttribute("id");if(!y.empty(t)&&t.startsWith("youtube-"))return;let n=e.media.getAttribute("src");y.empty(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));const s=y5(n),i=D("div",{id:o5(e.provider),"data-poster":a.customControls?e.poster:void 0});if(e.media=Po(i,e.media),a.customControls){const r=l=>`https://i.ytimg.com/vi/${s}/${l}default.jpg`;Go(r("maxres"),121).catch(()=>Go(r("sd"),121)).catch(()=>Go(r("hq"))).then(l=>oe.setPoster.call(e,l.src)).then(l=>{l.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:s,host:b5(a),playerVars:me({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&a.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},a),events:{onError(r){if(!e.media.error){const l=r.data,p={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";e.media.error={code:l,message:p},L.call(e,e.media,"error")}},onPlaybackRateChange(r){const l=r.target;e.media.playbackRate=l.getPlaybackRate(),L.call(e,e.media,"ratechange")},onReady(r){if(y.function(e.media.play))return;const l=r.target;Ho.getTitle.call(e,s),e.media.play=()=>{Xt.call(e,!0),l.playVideo()},e.media.pause=()=>{Xt.call(e,!1),l.pauseVideo()},e.media.stop=()=>{l.stopVideo()},e.media.duration=l.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(u){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,L.call(e,e.media,"seeking"),l.seekTo(u)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(u){l.setPlaybackRate(u)}});let{volume:p}=e.config;Object.defineProperty(e.media,"volume",{get:()=>p,set(u){p=u,l.setVolume(100*p),L.call(e,e.media,"volumechange")}});let{muted:c}=e.config;Object.defineProperty(e.media,"muted",{get:()=>c,set(u){const f=y.boolean(u)?u:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*p),L.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const d=l.getAvailablePlaybackRates();e.options.speed=d.filter(u=>e.config.speed.options.includes(u)),e.supported.ui&&a.customControls&&e.media.setAttribute("tabindex",-1),L.call(e,e.media,"timeupdate"),L.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=l.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&L.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),L.call(e,e.media,"canplaythrough"))},200),a.customControls&&setTimeout(()=>oe.build.call(e),50)},onStateChange(r){const l=r.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(r.data)&&(e.media.seeking=!1,L.call(e,e.media,"seeked")),r.data){case-1:L.call(e,e.media,"timeupdate"),e.media.buffered=l.getVideoLoadedFraction(),L.call(e,e.media,"progress");break;case 0:Xt.call(e,!1),e.media.loop?(l.stopVideo(),l.playVideo()):L.call(e,e.media,"ended");break;case 1:a.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(Xt.call(e,!0),L.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{L.call(e,e.media,"timeupdate")},50),e.media.duration!==l.getDuration()&&(e.media.duration=l.getDuration(),L.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),Xt.call(e,!1);break;case 3:L.call(e,e.media,"waiting")}L.call(e,e.elements.container,"statechange",!1,{code:r.data})}}})}},Fl={setup(){this.media?(ee(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),ee(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&ee(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=D("div",{class:this.config.classNames.video}),fl(this.media,this.elements.wrapper),this.elements.poster=D("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?pt.setup.call(this):this.isYouTube?Ho.setup.call(this):this.isVimeo&&In.setup.call(this)):this.debug.warn("No media element found!")}};class w5{constructor(a){T(this,"load",()=>{this.enabled&&(y.object(window.google)&&y.object(window.google.ima)?this.ready():jn(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),T(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),T(this,"setupIMA",()=>{this.elements.container=D("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),T(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),T(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Do(Math.max(this.manager.getRemainingTime(),0)),s=`${Be.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",s)},100)}),T(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,s=>this.onAdError(s)),Object.keys(google.ima.AdEvent.Type).forEach(s=>{this.manager.addEventListener(google.ima.AdEvent.Type[s],i=>this.onAdEvent(i))}),this.trigger("loaded")}),T(this,"addCuePoints",()=>{y.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const n=this.player.elements.progress;if(y.element(n)){const s=100/this.player.duration*t,i=D("span",{class:this.player.config.classNames.cues});i.style.left=`${s.toString()}%`,n.appendChild(i)}}})}),T(this,"onAdEvent",t=>{const{container:n}=this.player.elements,s=t.getAd(),i=t.getAdData();switch((r=>{L.call(this.player,this.player.media,`ads${r.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),s.isLinear()||(s.width=n.offsetWidth,s.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:i.adError&&this.player.debug.warn(`Non-fatal ad error: ${i.adError.getMessage()}`)}}),T(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),T(this,"listeners",()=>{const{container:t}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const s=this.player.currentTime;y.empty(this.cuePoints)||this.cuePoints.forEach((i,r)=>{n<i&&i<s&&(this.manager.discardAdBreak(),this.cuePoints.splice(r,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),T(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),T(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,et(this.player.media.play())}),T(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),T(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),T(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),T(this,"trigger",(t,...n)=>{const s=this.events[t];y.array(s)&&s.forEach(i=>{y.function(i)&&i.apply(this,n)})}),T(this,"on",(t,n)=>(y.array(this.events[t])||(this.events[t]=[]),this.events[t].push(n),this)),T(this,"startSafetyTimer",(t,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),T(this,"clearSafetyTimer",t=>{y.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=a,this.config=a.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,n)=>{this.on("loaded",t),this.on("error",n)}),this.load()}get enabled(){const{config:a}=this;return this.player.isHTML5&&this.player.isVideo&&a.enabled&&(!y.empty(a.publisherId)||y.url(a.tagUrl))}get tagUrl(){const{config:a}=this;return y.url(a.tagUrl)?a.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Ml({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:a.publisherId})}`}}function Tl(e=0,a=0,t=255){return Math.min(Math.max(e,a),t)}const A5=e=>{const a=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const n={};t.split(/\r\n|\n|\r/).forEach(s=>{if(y.number(n.startTime)){if(!y.empty(s.trim())&&y.empty(n.text)){const i=s.trim().split("#xywh=");[n.text]=i,i[1]&&([n.x,n.y,n.w,n.h]=i[1].split(","))}}else{const i=s.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})/);i&&(n.startTime=60*Number(i[1]||0)*60+60*Number(i[2])+Number(i[3])+ +`0.${i[4]}`,n.endTime=60*Number(i[6]||0)*60+60*Number(i[7])+Number(i[8])+ +`0.${i[9]}`)}}),n.text&&a.push(n)}),a},Vl=(e,a)=>{const t={};return e>a.width/a.height?(t.width=a.width,t.height=1/e*a.width):(t.height=a.height,t.width=e*a.height),t};class Un{constructor(a){T(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)})}),T(this,"getThumbnails",()=>new Promise(t=>{const{src:n}=this.player.config.previewThumbnails;if(y.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const s=()=>{this.thumbnails.sort((i,r)=>i.height-r.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(y.function(n))n(i=>{this.thumbnails=i,s()});else{const i=(y.string(n)?[n]:n).map(r=>this.getThumbnail(r));Promise.all(i).then(s)}})),T(this,"getThumbnail",t=>new Promise(n=>{Wt(t).then(s=>{const i={frames:A5(s),height:null,urlPrefix:""};i.frames[0].text.startsWith("/")||i.frames[0].text.startsWith("http://")||i.frames[0].text.startsWith("https://")||(i.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{i.height=r.naturalHeight,i.width=r.naturalWidth,this.thumbnails.push(i),n()},r.src=i.urlPrefix+i.frames[0].text})})),T(this,"startMove",t=>{if(this.loaded&&y.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,s;const i=this.player.elements.progress.getBoundingClientRect(),r=100/i.width*(t.pageX-i.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=t.pageX,this.elements.thumb.time.innerText=Do(this.seekTime);const l=(n=this.player.config.markers)===null||n===void 0||(s=n.points)===null||s===void 0?void 0:s.find(({time:p})=>p===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),T(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),T(this,"startScrubbing",t=>{(y.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),T(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):Rn.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),T(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})}),T(this,"render",()=>{this.elements.thumb.container=D("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=D("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=D("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=D("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),y.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=D("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),T(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),T(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(i=>this.seekTime>=i.startTime&&this.seekTime<=i.endTime),n=t>=0;let s=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((i,r)=>{this.loadedImages.includes(i.frames[t].text)&&(s=r)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(s)))}),T(this,"loadImage",(t=0)=>{const n=this.showingThumb,s=this.thumbnails[t],{urlPrefix:i}=s,r=s.frames[n],l=s.frames[n].text,p=i+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,r,t,n,l,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=p,c.dataset.index=n,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${p}`),c.onload=()=>this.showImage(c,r,t,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),T(this,"showImage",(t,n,s,i,r,l=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${i}. qual: ${s}. newimg: ${l}`),this.setImageSizeAndOffset(t,n),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(i,!0).then(this.preloadNearby(i,!1)).then(this.getHigherQuality(s,t,n,r))}),T(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const s=this.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:i}=this;setTimeout(()=>{i.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},s)}})}),T(this,"preloadNearby",(t,n=!0)=>new Promise(s=>{setTimeout(()=>{const i=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===i){let r;r=n?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;r.forEach(p=>{const c=p.text;if(c!==i&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:d}=this.thumbnails[0],u=d+c,f=new Image;f.src=u,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),s()}}}),l||s()}},300)})),T(this,"getHigherQuality",(t,n,s,i)=>{if(t<this.thumbnails.length-1){let r=n.naturalHeight;this.usingSprites&&(r=s.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===i&&(this.player.debug.log(`Showing higher quality thumb for: ${i}`),this.loadImage(t+1))},300)}}),T(this,"toggleThumbContainer",(t=!1,n=!1)=>{const s=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(s,t),!t&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),T(this,"toggleScrubbingContainer",(t=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),T(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),T(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const n=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${n}px`}else if(t.clientHeight<20&&t.clientWidth>20){const n=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${n}px`}this.setThumbContainerPos()}),T(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:s}=this.elements.thumb,i=n.left-t.left+10,r=n.right-t.left-s.clientWidth-10,l=this.mousePosX-t.left-s.clientWidth/2,p=Tl(l,i,r);s.style.left=`${p}px`,s.style.setProperty("--preview-arrow-offset",l-p+"px")}),T(this,"setScrubbingContainerSize",()=>{const{width:t,height:n}=Vl(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${n}px`}),T(this,"setImageSizeAndOffset",(t,n)=>{if(!this.usingSprites)return;const s=this.thumbContainerHeight/n.h;t.style.height=t.naturalHeight*s+"px",t.style.width=t.naturalWidth*s+"px",t.style.left=`-${n.x*s}px`,t.style.top=`-${n.y*s}px`}),this.player=a,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:a}=Vl(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return a}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(a){this.mouseDown?this.currentScrubbingImageElement=a:this.currentThumbnailImageElement=a}}const Dn={insertElements(e,a){y.string(a)?yl(e,this.media,{src:a}):y.array(a)&&a.forEach(t=>{yl(e,this.media,t)})},change(e){gl(e,"sources.length")?(pt.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],rt(this.media),this.media=null,y.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:a,type:t}=e,[{provider:n=ut.html5,src:s}]=a,i=n==="html5"?t:"div",r=n==="html5"?{}:{src:s};Object.assign(this,{provider:n,type:t,supported:pe.check(t,n,this.config.playsinline),media:D(i,r)}),this.elements.container.appendChild(this.media),y.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),y.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),oe.addStyleHook.call(this),this.isHTML5&&Dn.insertElements.call(this,"source",a),this.config.title=e.title,Fl.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&Dn.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&oe.build.call(this),this.isHTML5&&this.media.load(),y.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Un(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class _t{constructor(a,t){if(T(this,"play",()=>y.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>et(this.media.play())),this.media.play()):null),T(this,"pause",()=>this.playing&&y.function(this.media.pause)?this.media.pause():null),T(this,"togglePlay",l=>(y.boolean(l)?l:!this.playing)?this.play():this.pause()),T(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):y.function(this.media.stop)&&this.media.stop()}),T(this,"restart",()=>{this.currentTime=0}),T(this,"rewind",l=>{this.currentTime-=y.number(l)?l:this.config.seekTime}),T(this,"forward",l=>{this.currentTime+=y.number(l)?l:this.config.seekTime}),T(this,"increaseVolume",l=>{const p=this.media.muted?0:this.volume;this.volume=p+(y.number(l)?l:0)}),T(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),T(this,"airplay",()=>{pe.airplay&&this.media.webkitShowPlaybackTargetPicker()}),T(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const p=jo(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,d=ee(this.elements.container,this.config.classNames.hideControls,c);if(d&&y.array(this.config.controls)&&this.config.controls.includes("settings")&&!y.empty(this.config.settings)&&F.toggleMenu.call(this,!1),d!==p){const u=d?"controlshidden":"controlsshown";L.call(this,this.media,u)}return!d}return!1}),T(this,"on",(l,p)=>{_.call(this,this.elements.container,l,p)}),T(this,"once",(l,p)=>{Rn.call(this,this.elements.container,l,p)}),T(this,"off",(l,p)=>{Io(this.elements.container,l,p)}),T(this,"destroy",(l,p=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,p?(Object.keys(this.elements).length&&(rt(this.elements.buttons.play),rt(this.elements.captions),rt(this.elements.controls),rt(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),y.function(l)&&l()):($A.call(this),pt.cancelRequests.call(this),Po(this.elements.original,this.elements.container),L.call(this,this.elements.original,"destroyed",!0),y.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(oe.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&y.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),T(this,"supports",l=>pe.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=pe.touch,this.media=a,y.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||y.nodeList(this.media)||y.array(this.media))&&(this.media=this.media[0]),this.config=me({},Rl,_t.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new m5(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",pe),y.nullOrUndefined(this.media)||!y.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(!pe.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 s=this.media.tagName.toLowerCase();let i=null,r=null;switch(s){case"div":if(i=this.media.querySelector("iframe"),y.element(i)){if(r=zl(i.getAttribute("src")),this.provider=d5(r.toString()),this.elements.container=this.media,this.media=i,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(y.empty(this.provider)||!Object.values(ut).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=vn.video;break;case"video":case"audio":this.type=s,this.provider=ut.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=pe.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new p5(this),this.storage=new Yt(this),this.media.plyr=this,y.element(this.elements.container)||(this.elements.container=D("div"),fl(this.media,this.elements.container)),oe.migrateStyles.call(this),oe.addStyleHook.call(this),Fl.setup.call(this),this.config.debug&&_.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Le(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&oe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new w5(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>et(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Un(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===ut.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===ut.youtube}get isVimeo(){return this.provider===ut.vimeo}get isVideo(){return this.type===vn.video}get isAudio(){return this.type===vn.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(a){if(!this.duration)return;const t=y.number(a)&&a>0;this.media.currentTime=t?Math.min(a,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:a}=this.media;return y.number(a)?a:a&&a.length&&this.duration>0?a.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const a=parseFloat(this.config.duration),t=(this.media||{}).duration,n=y.number(t)&&t!==1/0?t:0;return a||n}set volume(a){let t=a;y.string(t)&&(t=Number(t)),y.number(t)||(t=this.storage.get("volume")),y.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!y.empty(a)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(a){let t=a;y.boolean(t)||(t=this.storage.get("muted")),y.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(a){let t=null;y.number(a)&&(t=a),y.number(t)||(t=this.storage.get("speed")),y.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:s}=this;t=Tl(t,n,s),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(a){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let s=[!y.empty(a)&&Number(a),this.storage.get("quality"),t.selected,t.default].find(y.number),i=!0;if(!n.includes(s)){const r=wl(n,s);this.debug.warn(`Unsupported quality option: ${s}, using ${r} instead`),s=r,i=!1}t.selected=s,this.media.quality=s,i&&this.storage.set({quality:s})}get quality(){return this.media.quality}set loop(a){const t=y.boolean(a)?a:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(a){Dn.change.call(this,a)}get source(){return this.media.currentSrc}get download(){const{download:a}=this.config.urls;return y.url(a)?a:this.source}set download(a){y.url(a)&&(this.config.urls.download=a,F.setDownloadUrl.call(this))}set poster(a){this.isVideo?oe.setPoster.call(this,a,!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 a=Uo(Tn.call(this));return y.array(a)?a.join(":"):a}set ratio(a){this.isVideo?y.string(a)&&kl(a)?(this.config.ratio=Uo(a),Et.call(this)):this.debug.error(`Invalid aspect ratio specified (${a})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(a){this.config.autoplay=y.boolean(a)?a:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(a){$.toggle.call(this,a,!1)}set currentTrack(a){$.set.call(this,a,!1),$.setup.call(this)}get currentTrack(){const{toggled:a,currentTrack:t}=this.captions;return a?t:-1}set language(a){$.setLanguage.call(this,a,!1)}get language(){return($.getCurrentTrack.call(this)||{}).language}set pip(a){if(!pe.pip)return;const t=y.boolean(a)?a:!this.pip;y.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Nn.active:Nn.inactive),y.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return pe.pip?y.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Nn.active:null}setPreviewThumbnails(a){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,a),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Un(this))}static supported(a,t){return pe.check(a,t)}static loadSprite(a,t){return El(a,t)}static setup(a,t={}){let n=null;return y.string(a)?n=Array.from(document.querySelectorAll(a)):y.nodeList(a)?n=Array.from(a):y.array(a)&&(n=a.filter(y.element)),y.empty(n)?null:n.map(s=>new _t(s,t))}}_t.defaults=WA(Rl);const C5={key:0,class:"carousel-video-player__play-info"},k5={class:"carousel-video-player__play-info__date"},S5={class:"carousel-video-player__play-info__data"},B5={class:"video-container"},O5=["id"],E5=xe({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1}},emits:["play-ended"],setup(e,{emit:a}){const t=e,n=o.ref(null),s=o.ref(!1),i=o.computed(()=>`p-${t.play.playId||t.play.play_id}`),r=o.computed(()=>{const d=new Date(t.play.gameDate);return`${d.getDate()}, ${fA(d.getMonth())} ${d.getFullYear()}`}),l=o.computed(()=>{const d=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${d[0]} : ${d[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`});function p(){n.value=new _t(`#${i.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=t.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=t.play.endSeconds&&(n.value.pause(),n.value.currentTime=t.play.startSeconds,a("play-ended"))})),n.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,t.play.videoPlayer=n.value,t.play.plyrInit=p,n.value.on("webkitfullscreenchange",c()),n.value.on("mozfullscreenchange",c()),n.value.on("fullscreenchange",c())}function c(){const d=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{d.$emit("full-screen-change")},100)}}return o.onMounted(()=>{setTimeout(()=>{p()},100)}),(d,u)=>(o.openBlock(),o.createElementBlock("div",{class:"carousel-video-player",onMouseenter:u[0]||(u[0]=f=>s.value=!0),onMouseleave:u[1]||(u[1]=f=>s.value=!1)},[e.isPlaySeeker?o.withDirectives((o.openBlock(),o.createElementBlock("div",C5,[o.createElementVNode("div",k5,o.toDisplayString(r.value),1),o.createElementVNode("div",S5,o.toDisplayString(l.value),1)],512)),[[o.vShow,s.value]]):o.createCommentVNode("",!0),o.createElementVNode("div",B5,[o.createElementVNode("video",{id:i.value,controls:"",preload:"auto","data-setup":"{}"},null,8,O5)])],32))}},[["__scopeId","data-v-c7d609cc"]]),Gn=e=>(o.pushScopeId("data-v-19148a6d"),e=e(),o.popScopeId(),e),x5=[Gn(()=>o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[o.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),o.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],z5={class:"carousel-full-screen__carousel"},M5={key:0,class:"icon-mobil-scrren"},R5=[Gn(()=>o.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Gn(()=>o.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[o.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),o.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],F5={class:"carousel-full-screen__carousel__video-player"},Hn=2,T5=xe({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(e,{emit:a}){const t=e;let n=0,s=new Map;const i=o.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=o.ref(null),l=o.ref([]);o.watch(()=>t.playerQueue,A=>{A.length&&(l.value=A.map((C,z)=>(C.index=z,{...C})),n=t.playlistIndex,s=new Map(l.value.map(C=>[C.index,C])))},{immediate:!0});function p(){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 d({selectedItem:A}){if(n!==A.index){const C=A.index-n;n=A.index;const z=s.get(n+C*-1),P=s.get(n);if(z&&z.videoPlayer&&(z.videoPlayer.pause(),z.videoPlayer.currentTime=0),P&&P.videoPlayer&&P.videoPlayer.play(),C>0){const K=s.get(n+Hn),Z=s.get(n+1),G=s.get(n-Hn);K&&(l.value.find(re=>re.index===K.index)||l.value.push(K)),Z&&Z.videoPlayer&&Z.videoPlayer.isDestroyed&&Z.plyrInit(),G&&G.videoPlayer&&(G.videoPlayer.pause(),G.videoPlayer.src="",G.videoPlayer.destroy(),G.videoPlayer.isDestroyed=!0)}else if(C<0){const K=s.get(n-1),Z=s.get(n+Hn);K&&K.videoPlayer&&K.videoPlayer.isDestroyed&&K.plyrInit(),Z&&Z.videoPlayer&&(Z.videoPlayer.pause(),Z.videoPlayer.src="",Z.videoPlayer.destroy(),Z.videoPlayer.isDestroyed=!0)}}}function u(){r.value&&r.value.next()}function f(){a("close",n)}const m=o.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),h=o.computed(()=>m.portrait);function g(){var A=window.matchMedia("(orientation: portrait)");A.matches?m.portrait=!0:m.portrait=!1}function b(){window.screen.orientation.angle!=90?m.portrait=!0:m.portrait=!1}return o.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",b),b()),setTimeout(()=>{const A=document.getElementsByClassName("video-element");A&&A.length&&Array.from(A).forEach((C,z)=>{C.id=`plyrFS${z+1}`})},100)}),o.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",b),t.playerQueue.forEach(A=>{A.videoPlayer&&(A.videoPlayer.pause(),A.videoPlayer.destroy())})}),(A,C)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["carousel-full-screen",c()&&!h.value?"paddingIos":""]),id:"carousel-swipe"},[o.createElementVNode("div",{class:"carousel-full-screen__close",style:o.normalizeStyle(c()&&h.value?"padding-top:30px":""),onClick:f},x5,4),o.createElementVNode("div",z5,[h.value&&p()?(o.openBlock(),o.createElementBlock("div",M5,R5)):o.createCommentVNode("",!0),o.createVNode(o.unref(hA),o.mergeProps({ref_key:"gscCarousel",ref:r},i.value,{items:l.value,onInput:d}),{default:o.withCtx(({item:z})=>[o.createElementVNode("div",F5,[o.createVNode(E5,{play:z,"is-play-seeker":e.isPlaySeeker,onPlayEnded:u},null,8,["play","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-19148a6d"]]),Nl={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},vl={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Pl={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},V5=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},Ln={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},jl=()=>{o.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Il=Ln.setup;Ln.setup=Il?(e,a)=>(jl(),Il(e,a)):jl;const N5=e=>(o.pushScopeId("data-v-fb269a1e"),e=e(),o.popScopeId(),e),v5=["src"],P5={key:1,class:"text"},j5=["src"],I5={class:"stats"},U5=N5(()=>o.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),D5={class:"numstats"},G5={class:"leyend"};function H5(e,a,t,n,s,i){return o.openBlock(),o.createElementBlock("div",null,[t.type==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["button",s.status&&t.typeOnOff&&"button-active"]),style:o.normalizeStyle([i.customStyle,s.status&&t.typeOnOff&&i.customActive]),onClick:a[0]||(a[0]=(...r)=>i.btnClick&&i.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(o.openBlock(),o.createElementBlock("img",{key:0,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,v5)):o.createCommentVNode("",!0),t.textValue?(o.openBlock(),o.createElementBlock("div",P5,o.toDisplayString(t.textValue),1)):o.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(o.openBlock(),o.createElementBlock("img",{key:2,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,j5)):o.createCommentVNode("",!0)],6)):o.createCommentVNode("",!0),t.type==1?(o.openBlock(),o.createElementBlock("div",{key:1,class:"button-target",onClick:a[1]||(a[1]=(...r)=>i.btnClick&&i.btnClick(...r))},[o.createElementVNode("div",I5,[U5,o.createElementVNode("div",D5,o.toDisplayString(t.textStat),1)]),o.createElementVNode("div",G5,o.toDisplayString(t.textCategory),1)])):o.createCommentVNode("",!0)])}const L5=V5(Ln,[["render",H5],["__scopeId","data-v-fb269a1e"]]),K5={class:"gsc-dropdown__main-container__item-selected"},q5=["height","width"],Z5=["stroke"],Q5={class:"gsc-dropdown__items-container"},Y5=["onClick"],W5={key:0,class:"gsc-dropdown__items-footer"},J5={__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(e){return["solid","dotted","dashed"].includes(e)}},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:e=>["propName","value"].every(a=>a in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:a}){const t=e,n=o.ref({}),s=o.ref(null),i=o.ref(t.isMultipleOption?-1:0),r=o.ref(!1);o.watch(()=>t.items,(m,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&m&&m.length){if(t.defaultItemByProp){const g=t.items.findIndex(b=>b[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(i.value=g,n.value=m[g]):(i.value=0,n.value=m[0])}else n.value=m[t.defaultItemByIndex];a("input",n.value)}},{immediate:!0}),o.watch(()=>t.modelValue,m=>{if(m){const h=t.items.findIndex(g=>typeof m=="object"?JSON.stringify(g)===JSON.stringify(m):g===m);h!==-1&&(i.value=h,n.value=t.items[h],a("update:modelValue",n.value))}},{immediate:!0});const l=o.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),p=o.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function d(m){s.value&&!s.value.contains(m.target)&&(r.value=!1)}function u(m,h){t.isMultipleOption?i.value=-1:(i.value=h,r.value=!1),n.value=m,a("input",n.value),a("update:modelValue",n.value)}function f(){r.value=!1,a("click-ready")}return o.onMounted(()=>{document.addEventListener("click",d)}),o.onBeforeMount(()=>{document.removeEventListener("click",d)}),(m,h)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"dropDown",ref:s,class:"gsc-dropdown",style:o.normalizeStyle(l.value)},[o.createElementVNode("div",{class:"gsc-dropdown__main-container",style:o.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[o.createElementVNode("div",K5,[o.renderSlot(m.$slots,"default",{selectedItem:n.value})]),o.createElementVNode("div",{class:o.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:o.normalizeStyle(p.value)},[(o.openBlock(),o.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o.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:e.arrowColor},null,8,Z5)],8,q5))],6)],4),o.createVNode(o.Transition,null,{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",Q5,[o.createElementVNode("div",null,[o.createElementVNode("div",{class:"gsc-dropdown__items",style:o.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(g,b)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["gsc-dropdown__items__item",{selected:b===i.value}]),key:b,onClick:A=>u(g,b)},[o.renderSlot(m.$slots,"availableItem",{item:g})],10,Y5))),128))],4),e.isFooterVisible?(o.openBlock(),o.createElementBlock("div",W5,[o.createVNode(o.unref(L5),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):o.createCommentVNode("",!0)])],512),[[o.vShow,r.value]])]),_:3})],4))}},X5=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},_5={class:"tournament-select__selected-tournament"},$5={class:"tournament-select__selected-tournament__logo"},eC=["src"],tC={class:"tournament-select__selected-tournament__name"},oC={__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://az755631.vo.msecnd.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(e){return["solid","dotted","dashed"].includes(e)}},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:e=>["propName","value"].every(a=>a in e)},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:a}){const t=e,n=o.ref([]),s=o.computed(()=>{const u={};return t.fontFamily&&(u["font-family"]=`${t.fontFamily}`),u}),i=o.computed(()=>n.value.find(u=>u.seasonsIds.has(t.currentSeasonId))||n.value[0]);async function r(){try{if(t.items&&t.items.length)n.value=[...t.items];else if(t.apiUrl){const u=await p();n.value=u.map(f=>({...f.tournament,seasons:f.seasons,seasonsIds:f.seasons.reduce((m,h)=>(m.add(h.id),m),new Set)})).sort((f,m)=>f.order-m.order)}}catch(u){throw new Error(u)}}function l(u){const f=new XMLHttpRequest,m=`${t.logosUrl}${u}.${t.logoFileType}`;return f.open("HEAD",m,!1),f.send(),f.status!==404}async function p(){try{return(await fetch(t.apiUrl)).json()}catch(u){return Promise.reject(u)}}function c(u){a("input",u)}function d(u){a("input",u)}return o.onMounted(()=>{r()}),(u,f)=>(o.openBlock(),o.createElementBlock("div",{class:"tournament-select",style:o.normalizeStyle(s.value)},[o.createVNode(o.unref(J5),o.mergeProps(t,{"model-value":i.value,items:n.value,onInput:c,"onUpdate:modelValue":d}),{default:o.withCtx(({selectedItem:m})=>[o.createElementVNode("div",_5,[o.createElementVNode("div",$5,[l(m.id)?(o.openBlock(),o.createElementBlock("img",{key:0,src:`${t.logosUrl}${m.id}.${t.logoFileType}`,alt:""},null,8,eC)):o.createCommentVNode("",!0)]),o.createElementVNode("div",tC,o.toDisplayString(m.name),1)])]),availableItem:o.withCtx(({item:m})=>[o.createElementVNode("div",null,o.toDisplayString(m.name),1)]),_:1},16,["model-value","items"])],4))}},aC=X5(oC,[["__scopeId","data-v-355af272"]]),nC=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},Kn={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},Ul=()=>{o.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Dl=Kn.setup;Kn.setup=Dl?(e,a)=>(Ul(),Dl(e,a)):Ul;const iC=e=>(o.pushScopeId("data-v-fb269a1e"),e=e(),o.popScopeId(),e),sC=["src"],rC={key:1,class:"text"},lC=["src"],cC={class:"stats"},dC=iC(()=>o.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),mC={class:"numstats"},pC={class:"leyend"};function uC(e,a,t,n,s,i){return o.openBlock(),o.createElementBlock("div",null,[t.type==0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["button",s.status&&t.typeOnOff&&"button-active"]),style:o.normalizeStyle([i.customStyle,s.status&&t.typeOnOff&&i.customActive]),onClick:a[0]||(a[0]=(...r)=>i.btnClick&&i.btnClick(...r))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(o.openBlock(),o.createElementBlock("img",{key:0,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,sC)):o.createCommentVNode("",!0),t.textValue?(o.openBlock(),o.createElementBlock("div",rC,o.toDisplayString(t.textValue),1)):o.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(o.openBlock(),o.createElementBlock("img",{key:2,class:"icon",style:o.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,lC)):o.createCommentVNode("",!0)],6)):o.createCommentVNode("",!0),t.type==1?(o.openBlock(),o.createElementBlock("div",{key:1,class:"button-target",onClick:a[1]||(a[1]=(...r)=>i.btnClick&&i.btnClick(...r))},[o.createElementVNode("div",cC,[dC,o.createElementVNode("div",mC,o.toDisplayString(t.textStat),1)]),o.createElementVNode("div",pC,o.toDisplayString(t.textCategory),1)])):o.createCommentVNode("",!0)])}const hC=nC(Kn,[["render",uC],["__scopeId","data-v-fb269a1e"]]),gC={class:"gsc-dropdown__main-container__item-selected"},fC=["height","width"],yC=["stroke"],bC={class:"gsc-dropdown__items-container"},wC=["onClick"],AC={key:0,class:"gsc-dropdown__items-footer"},CC={__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(e){return["solid","dotted","dashed"].includes(e)}},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:e=>["propName","value"].every(a=>a in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:a}){const t=e,n=o.ref({}),s=o.ref(null),i=o.ref(t.isMultipleOption?-1:0),r=o.ref(!1);o.watch(()=>t.items,(m,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&m&&m.length){if(t.defaultItemByProp){const g=t.items.findIndex(b=>b[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(i.value=g,n.value=m[g]):(i.value=0,n.value=m[0])}else n.value=m[t.defaultItemByIndex];a("input",n.value)}},{immediate:!0}),o.watch(()=>t.modelValue,m=>{if(m){const h=t.items.findIndex(g=>typeof m=="object"?JSON.stringify(g)===JSON.stringify(m):g===m);h!==-1&&(i.value=h,n.value=t.items[h],a("update:modelValue",n.value))}},{immediate:!0});const l=o.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),p=o.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(r.value=!r.value)}function d(m){s.value&&!s.value.contains(m.target)&&(r.value=!1)}function u(m,h){t.isMultipleOption?i.value=-1:(i.value=h,r.value=!1),n.value=m,a("input",n.value),a("update:modelValue",n.value)}function f(){r.value=!1,a("click-ready")}return o.onMounted(()=>{document.addEventListener("click",d)}),o.onBeforeMount(()=>{document.removeEventListener("click",d)}),(m,h)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"dropDown",ref:s,class:"gsc-dropdown",style:o.normalizeStyle(l.value)},[o.createElementVNode("div",{class:"gsc-dropdown__main-container",style:o.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[o.createElementVNode("div",gC,[o.renderSlot(m.$slots,"default",{selectedItem:n.value})]),o.createElementVNode("div",{class:o.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:o.normalizeStyle(p.value)},[(o.openBlock(),o.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[o.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:e.arrowColor},null,8,yC)],8,fC))],6)],4),o.createVNode(o.Transition,null,{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",bC,[o.createElementVNode("div",null,[o.createElementVNode("div",{class:"gsc-dropdown__items",style:o.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(g,b)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["gsc-dropdown__items__item",{selected:b===i.value}]),key:b,onClick:A=>u(g,b)},[o.renderSlot(m.$slots,"availableItem",{item:g})],10,wC))),128))],4),e.isFooterVisible?(o.openBlock(),o.createElementBlock("div",AC,[o.createVNode(o.unref(hC),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):o.createCommentVNode("",!0)])],512),[[o.vShow,r.value]])]),_:3})],4))}},kC=(e,a)=>{const t=e.__vccOpts||e;for(const[n,s]of a)t[n]=s;return t},SC={class:"season-name"},BC={class:"items-list-season"},OC={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:a}){const t=e,n=o.computed(()=>t.seasons.find(r=>r.id===t.currentSeasonId));function s(r){a("input",r)}function i(r){a("input",r)}return(r,l)=>(o.openBlock(),o.createBlock(o.unref(CC),{items:e.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:i,"onUpdate:modelValue":s},{default:o.withCtx(({selectedItem:p})=>[o.createElementVNode("div",SC,[o.createElementVNode("span",null,o.toDisplayString(p.name),1)])]),availableItem:o.withCtx(({item:p})=>[o.createElementVNode("span",BC,o.toDisplayString(p.name),1)]),_:1},8,["items","model-value"]))}},EC=kC(OC,[["__scopeId","data-v-3a11087d"]]);function Gl(e,a){return function(){return e.apply(a,arguments)}}const{toString:xC}=Object.prototype,{getPrototypeOf:qn}=Object,Lo=(e=>a=>{const t=xC.call(a);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),tt=e=>(e=e.toLowerCase(),a=>Lo(a)===e),Ko=e=>a=>typeof a===e,{isArray:xt}=Array,$t=Ko("undefined");function zC(e){return e!==null&&!$t(e)&&e.constructor!==null&&!$t(e.constructor)&&De(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hl=tt("ArrayBuffer");function MC(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&Hl(e.buffer),a}const RC=Ko("string"),De=Ko("function"),Ll=Ko("number"),qo=e=>e!==null&&typeof e=="object",FC=e=>e===!0||e===!1,Zo=e=>{if(Lo(e)!=="object")return!1;const a=qn(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},TC=tt("Date"),VC=tt("File"),NC=tt("Blob"),vC=tt("FileList"),PC=e=>qo(e)&&De(e.pipe),jC=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||De(e.append)&&((a=Lo(e))==="formdata"||a==="object"&&De(e.toString)&&e.toString()==="[object FormData]"))},IC=tt("URLSearchParams"),UC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function eo(e,a,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),xt(e))for(n=0,s=e.length;n<s;n++)a.call(null,e[n],n,e);else{const i=t?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let l;for(n=0;n<r;n++)l=i[n],a.call(null,e[l],l,e)}}function Kl(e,a){a=a.toLowerCase();const t=Object.keys(e);let n=t.length,s;for(;n-- >0;)if(s=t[n],a===s.toLowerCase())return s;return null}const ql=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zl=e=>!$t(e)&&e!==ql;function Zn(){const{caseless:e}=Zl(this)&&this||{},a={},t=(n,s)=>{const i=e&&Kl(a,s)||s;Zo(a[i])&&Zo(n)?a[i]=Zn(a[i],n):Zo(n)?a[i]=Zn({},n):xt(n)?a[i]=n.slice():a[i]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&eo(arguments[n],t);return a}const DC=(e,a,t,{allOwnKeys:n}={})=>(eo(a,(s,i)=>{t&&De(s)?e[i]=Gl(s,t):e[i]=s},{allOwnKeys:n}),e),GC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),HC=(e,a,t,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),t&&Object.assign(e.prototype,t)},LC=(e,a,t,n)=>{let s,i,r;const l={};if(a=a||{},e==null)return a;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)r=s[i],(!n||n(r,e,a))&&!l[r]&&(a[r]=e[r],l[r]=!0);e=t!==!1&&qn(e)}while(e&&(!t||t(e,a))&&e!==Object.prototype);return a},KC=(e,a,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=a.length;const n=e.indexOf(a,t);return n!==-1&&n===t},qC=e=>{if(!e)return null;if(xt(e))return e;let a=e.length;if(!Ll(a))return null;const t=new Array(a);for(;a-- >0;)t[a]=e[a];return t},ZC=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&qn(Uint8Array)),QC=(e,a)=>{const t=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=t.next())&&!n.done;){const s=n.value;a.call(e,s[0],s[1])}},YC=(e,a)=>{let t;const n=[];for(;(t=e.exec(a))!==null;)n.push(t);return n},WC=tt("HTMLFormElement"),JC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,t,n){return t.toUpperCase()+n}),Ql=(({hasOwnProperty:e})=>(a,t)=>e.call(a,t))(Object.prototype),XC=tt("RegExp"),Yl=(e,a)=>{const t=Object.getOwnPropertyDescriptors(e),n={};eo(t,(s,i)=>{let r;(r=a(s,i,e))!==!1&&(n[i]=r||s)}),Object.defineProperties(e,n)},_C=e=>{Yl(e,(a,t)=>{if(De(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=e[t];if(De(n)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},$C=(e,a)=>{const t={},n=s=>{s.forEach(i=>{t[i]=!0})};return xt(e)?n(e):n(String(e).split(a)),t},ek=()=>{},tk=(e,a)=>(e=+e,Number.isFinite(e)?e:a),Qn="abcdefghijklmnopqrstuvwxyz",Wl="0123456789",Jl={DIGIT:Wl,ALPHA:Qn,ALPHA_DIGIT:Qn+Qn.toUpperCase()+Wl},ok=(e=16,a=Jl.ALPHA_DIGIT)=>{let t="";const{length:n}=a;for(;e--;)t+=a[Math.random()*n|0];return t};function ak(e){return!!(e&&De(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const nk=e=>{const a=new Array(10),t=(n,s)=>{if(qo(n)){if(a.indexOf(n)>=0)return;if(!("toJSON"in n)){a[s]=n;const i=xt(n)?[]:{};return eo(n,(r,l)=>{const p=t(r,s+1);!$t(p)&&(i[l]=p)}),a[s]=void 0,i}}return n};return t(e,0)},ik=tt("AsyncFunction"),sk=e=>e&&(qo(e)||De(e))&&De(e.then)&&De(e.catch),O={isArray:xt,isArrayBuffer:Hl,isBuffer:zC,isFormData:jC,isArrayBufferView:MC,isString:RC,isNumber:Ll,isBoolean:FC,isObject:qo,isPlainObject:Zo,isUndefined:$t,isDate:TC,isFile:VC,isBlob:NC,isRegExp:XC,isFunction:De,isStream:PC,isURLSearchParams:IC,isTypedArray:ZC,isFileList:vC,forEach:eo,merge:Zn,extend:DC,trim:UC,stripBOM:GC,inherits:HC,toFlatObject:LC,kindOf:Lo,kindOfTest:tt,endsWith:KC,toArray:qC,forEachEntry:QC,matchAll:YC,isHTMLForm:WC,hasOwnProperty:Ql,hasOwnProp:Ql,reduceDescriptors:Yl,freezeMethods:_C,toObjectSet:$C,toCamelCase:JC,noop:ek,toFiniteNumber:tk,findKey:Kl,global:ql,isContextDefined:Zl,ALPHABET:Jl,generateString:ok,isSpecCompliantForm:ak,toJSONObject:nk,isAsyncFn:ik,isThenable:sk};function J(e,a,t,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),t&&(this.config=t),n&&(this.request=n),s&&(this.response=s)}O.inherits(J,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:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Xl=J.prototype,_l={};["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(e=>{_l[e]={value:e}}),Object.defineProperties(J,_l),Object.defineProperty(Xl,"isAxiosError",{value:!0}),J.from=(e,a,t,n,s,i)=>{const r=Object.create(Xl);return O.toFlatObject(e,r,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),J.call(r,e.message,a,t,n,s),r.cause=e,r.name=e.name,i&&Object.assign(r,i),r};const rk=null;function Yn(e){return O.isPlainObject(e)||O.isArray(e)}function $l(e){return O.endsWith(e,"[]")?e.slice(0,-2):e}function ec(e,a,t){return e?e.concat(a).map(function(n,s){return n=$l(n),!t&&s?"["+n+"]":n}).join(t?".":""):a}function lk(e){return O.isArray(e)&&!e.some(Yn)}const ck=O.toFlatObject(O,{},null,function(e){return/^is[A-Z]/.test(e)});function Qo(e,a,t){if(!O.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!O.isUndefined(h[m])});const n=t.metaTokens,s=t.visitor||c,i=t.dots,r=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(a);if(!O.isFunction(s))throw new TypeError("visitor must be a function");function p(m){if(m===null)return"";if(O.isDate(m))return m.toISOString();if(!l&&O.isBlob(m))throw new J("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(m)||O.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,h,g){let b=m;if(m&&!g&&typeof m=="object"){if(O.endsWith(h,"{}"))h=n?h:h.slice(0,-2),m=JSON.stringify(m);else if(O.isArray(m)&&lk(m)||(O.isFileList(m)||O.endsWith(h,"[]"))&&(b=O.toArray(m)))return h=$l(h),b.forEach(function(A,C){!(O.isUndefined(A)||A===null)&&a.append(r===!0?ec([h],C,i):r===null?h:h+"[]",p(A))}),!1}return Yn(m)?!0:(a.append(ec(g,h,i),p(m)),!1)}const d=[],u=Object.assign(ck,{defaultVisitor:c,convertValue:p,isVisitable:Yn});function f(m,h){if(!O.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(m),O.forEach(m,function(g,b){(!(O.isUndefined(g)||g===null)&&s.call(a,g,O.isString(b)?b.trim():b,h,u))===!0&&f(g,h?h.concat(b):[b])}),d.pop()}}if(!O.isObject(e))throw new TypeError("data must be an object");return f(e),a}function tc(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(t){return a[t]})}function Wn(e,a){this._pairs=[],e&&Qo(e,this,a)}const oc=Wn.prototype;oc.append=function(e,a){this._pairs.push([e,a])},oc.toString=function(e){const a=e?function(t){return e.call(this,t,tc)}:tc;return this._pairs.map(function(t){return a(t[0])+"="+a(t[1])},"").join("&")};function dk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ac(e,a,t){if(!a)return e;const n=t&&t.encode||dk,s=t&&t.serialize;let i;if(s?i=s(a,t):i=O.isURLSearchParams(a)?a.toString():new Wn(a,t).toString(n),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class mk{constructor(){this.handlers=[]}use(a,t,n){return this.handlers.push({fulfilled:a,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){O.forEach(this.handlers,function(t){t!==null&&a(t)})}}const nc=mk,ic={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pk=typeof URLSearchParams<"u"?URLSearchParams:Wn,uk=typeof FormData<"u"?FormData:null,hk=typeof Blob<"u"?Blob:null,gk={isBrowser:!0,classes:{URLSearchParams:pk,FormData:uk,Blob:hk},protocols:["http","https","file","blob","url","data"]},sc=typeof window<"u"&&typeof document<"u",fk=(e=>sc&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),yk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sc,hasStandardBrowserEnv:fk,hasStandardBrowserWebWorkerEnv:yk},Symbol.toStringTag,{value:"Module"})),ot={...bk,...gk};function wk(e,a){return Qo(e,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,n,s,i){return ot.isNode&&O.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))}function Ak(e){return O.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Ck(e){const a={},t=Object.keys(e);let n;const s=t.length;let i;for(n=0;n<s;n++)i=t[n],a[i]=e[i];return a}function rc(e){function a(t,n,s,i){let r=t[i++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),p=i>=t.length;return r=!r&&O.isArray(s)?s.length:r,p?(O.hasOwnProp(s,r)?s[r]=[s[r],n]:s[r]=n,!l):((!s[r]||!O.isObject(s[r]))&&(s[r]=[]),a(t,n,s[r],i)&&O.isArray(s[r])&&(s[r]=Ck(s[r])),!l)}if(O.isFormData(e)&&O.isFunction(e.entries)){const t={};return O.forEachEntry(e,(n,s)=>{a(Ak(n),s,t,0)}),t}return null}function kk(e,a,t){if(O.isString(e))try{return(a||JSON.parse)(e),O.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}const Jn={transitional:ic,adapter:["xhr","http"],transformRequest:[function(e,a){const t=a.getContentType()||"",n=t.indexOf("application/json")>-1,s=O.isObject(e);if(s&&O.isHTMLForm(e)&&(e=new FormData(e)),O.isFormData(e))return n?JSON.stringify(rc(e)):e;if(O.isArrayBuffer(e)||O.isBuffer(e)||O.isStream(e)||O.isFile(e)||O.isBlob(e))return e;if(O.isArrayBufferView(e))return e.buffer;if(O.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(t.indexOf("application/x-www-form-urlencoded")>-1)return wk(e,this.formSerializer).toString();if((i=O.isFileList(e))||t.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Qo(i?{"files[]":e}:e,r&&new r,this.formSerializer)}}return s||n?(a.setContentType("application/json",!1),kk(e)):e}],transformResponse:[function(e){const a=this.transitional||Jn.transitional,t=a&&a.forcedJSONParsing,n=this.responseType==="json";if(e&&O.isString(e)&&(t&&!this.responseType||n)){const s=!(a&&a.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(i){if(s)throw i.name==="SyntaxError"?J.from(i,J.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],e=>{Jn.headers[e]={}});const Xn=Jn,Sk=O.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"]),Bk=e=>{const a={};let t,n,s;return e&&e.split(`
38
38
  `).forEach(function(i){s=i.indexOf(":"),t=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!t||a[t]&&Sk[t])&&(t==="set-cookie"?a[t]?a[t].push(n):a[t]=[n]:a[t]=a[t]?a[t]+", "+n:n)}),a},lc=Symbol("internals");function to(e){return e&&String(e).trim().toLowerCase()}function Yo(e){return e===!1||e==null?e:O.isArray(e)?e.map(Yo):String(e)}function Ok(e){const a=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(e);)a[n[1]]=n[2];return a}const Ek=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _n(e,a,t,n,s){if(O.isFunction(n))return n.call(this,a,t);if(s&&(a=t),!!O.isString(a)){if(O.isString(n))return a.indexOf(n)!==-1;if(O.isRegExp(n))return n.test(a)}}function xk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,t,n)=>t.toUpperCase()+n)}function zk(e,a){const t=O.toCamelCase(" "+a);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+t,{value:function(s,i,r){return this[n].call(this,a,s,i,r)},configurable:!0})})}class Wo{constructor(a){a&&this.set(a)}set(a,t,n){const s=this;function i(l,p,c){const d=to(p);if(!d)throw new Error("header name must be a non-empty string");const u=O.findKey(s,d);(!u||s[u]===void 0||c===!0||c===void 0&&s[u]!==!1)&&(s[u||p]=Yo(l))}const r=(l,p)=>O.forEach(l,(c,d)=>i(c,d,p));return O.isPlainObject(a)||a instanceof this.constructor?r(a,t):O.isString(a)&&(a=a.trim())&&!Ek(a)?r(Bk(a),t):a!=null&&i(t,a,n),this}get(a,t){if(a=to(a),a){const n=O.findKey(this,a);if(n){const s=this[n];if(!t)return s;if(t===!0)return Ok(s);if(O.isFunction(t))return t.call(this,s,n);if(O.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,t){if(a=to(a),a){const n=O.findKey(this,a);return!!(n&&this[n]!==void 0&&(!t||_n(this,this[n],n,t)))}return!1}delete(a,t){const n=this;let s=!1;function i(r){if(r=to(r),r){const l=O.findKey(n,r);l&&(!t||_n(n,n[l],l,t))&&(delete n[l],s=!0)}}return O.isArray(a)?a.forEach(i):i(a),s}clear(a){const t=Object.keys(this);let n=t.length,s=!1;for(;n--;){const i=t[n];(!a||_n(this,this[i],i,a,!0))&&(delete this[i],s=!0)}return s}normalize(a){const t=this,n={};return O.forEach(this,(s,i)=>{const r=O.findKey(n,i);if(r){t[r]=Yo(s),delete t[i];return}const l=a?xk(i):String(i).trim();l!==i&&delete t[i],t[l]=Yo(s),n[l]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const t=Object.create(null);return O.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=a&&O.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,t])=>a+": "+t).join(`
39
39
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...t){const n=new this(a);return t.forEach(s=>n.set(s)),n}static accessor(a){const t=(this[lc]=this[lc]={accessors:{}}).accessors,n=this.prototype;function s(i){const r=to(i);t[r]||(zk(n,i),t[r]=!0)}return O.isArray(a)?a.forEach(s):s(a),this}}Wo.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.reduceDescriptors(Wo.prototype,({value:e},a)=>{let t=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(n){this[t]=n}}}),O.freezeMethods(Wo);const lt=Wo;function $n(e,a){const t=this||Xn,n=a||t,s=lt.from(n.headers);let i=n.data;return O.forEach(e,function(r){i=r.call(t,i,s.normalize(),a?a.status:void 0)}),s.normalize(),i}function cc(e){return!!(e&&e.__CANCEL__)}function oo(e,a,t){J.call(this,e??"canceled",J.ERR_CANCELED,a,t),this.name="CanceledError"}O.inherits(oo,J,{__CANCEL__:!0});function Mk(e,a,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):a(new J("Request failed with status code "+t.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const Rk=ot.hasStandardBrowserEnv?{write(e,a,t,n,s,i){const r=[e+"="+encodeURIComponent(a)];O.isNumber(t)&&r.push("expires="+new Date(t).toGMTString()),O.isString(n)&&r.push("path="+n),O.isString(s)&&r.push("domain="+s),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const a=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Tk(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function dc(e,a){return e&&!Fk(a)?Tk(e,a):a}const Vk=ot.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");let t;function n(s){let i=s;return e&&(a.setAttribute("href",i),i=a.href),a.setAttribute("href",i),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:a.pathname.charAt(0)==="/"?a.pathname:"/"+a.pathname}}return t=n(window.location.href),function(s){const i=O.isString(s)?n(s):s;return i.protocol===t.protocol&&i.host===t.host}}():function(){return function(){return!0}}();function Nk(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function vk(e,a){e=e||10;const t=new Array(e),n=new Array(e);let s=0,i=0,r;return a=a!==void 0?a:1e3,function(l){const p=Date.now(),c=n[i];r||(r=p),t[s]=l,n[s]=p;let d=i,u=0;for(;d!==s;)u+=t[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),p-r<a)return;const f=c&&p-c;return f?Math.round(u*1e3/f):void 0}}function mc(e,a){let t=0;const n=vk(50,250);return s=>{const i=s.loaded,r=s.lengthComputable?s.total:void 0,l=i-t,p=n(l),c=i<=r;t=i;const d={loaded:i,total:r,progress:r?i/r:void 0,bytes:l,rate:p||void 0,estimated:p&&r&&c?(r-i)/p:void 0,event:s};d[a?"download":"upload"]=!0,e(d)}}const Pk=typeof XMLHttpRequest<"u",jk=Pk&&function(e){return new Promise(function(a,t){let n=e.data;const s=lt.from(e.headers).normalize();let{responseType:i,withXSRFToken:r}=e,l;function p(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}let c;if(O.isFormData(n)){if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((c=s.getContentType())!==!1){const[h,...g]=c?c.split(";").map(b=>b.trim()).filter(Boolean):[];s.setContentType([h||"multipart/form-data",...g].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(h+":"+g))}const u=dc(e.baseURL,e.url);d.open(e.method.toUpperCase(),ac(u,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function f(){if(!d)return;const h=lt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),g={data:!i||i==="text"||i==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:e,request:d};Mk(function(b){a(b),p()},function(b){t(b),p()},g),d=null}if("onloadend"in d?d.onloadend=f:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(f)},d.onabort=function(){d&&(t(new J("Request aborted",J.ECONNABORTED,e,d)),d=null)},d.onerror=function(){t(new J("Network Error",J.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||ic;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),t(new J(h,g.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,d)),d=null},ot.hasStandardBrowserEnv&&(r&&O.isFunction(r)&&(r=r(e)),r||r!==!1&&Vk(u))){const h=e.xsrfHeaderName&&e.xsrfCookieName&&Rk.read(e.xsrfCookieName);h&&s.set(e.xsrfHeaderName,h)}n===void 0&&s.setContentType(null),"setRequestHeader"in d&&O.forEach(s.toJSON(),function(h,g){d.setRequestHeader(g,h)}),O.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),i&&i!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",mc(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",mc(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=h=>{d&&(t(!h||h.type?new oo(null,e,d):h),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const m=Nk(u);if(m&&ot.protocols.indexOf(m)===-1){t(new J("Unsupported protocol "+m+":",J.ERR_BAD_REQUEST,e));return}d.send(n||null)})},ei={http:rk,xhr:jk};O.forEach(ei,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const pc=e=>`- ${e}`,Ik=e=>O.isFunction(e)||e===null||e===!1,uc={getAdapter:e=>{e=O.isArray(e)?e:[e];const{length:a}=e;let t,n;const s={};for(let i=0;i<a;i++){t=e[i];let r;if(n=t,!Ik(t)&&(n=ei[(r=String(t)).toLowerCase()],n===void 0))throw new J(`Unknown adapter '${r}'`);if(n)break;s[r||"#"+i]=n}if(!n){const i=Object.entries(s).map(([l,p])=>`adapter ${l} `+(p===!1?"is not supported by the environment":"is not available in the build"));let r=a?i.length>1?`since :
40
40
  `+i.map(pc).join(`