index-8313c58f.js 143 KB

12
  1. import{f as Ie,d as Y,b as c,h as Pt,i as ye,w as De,j as si,k as Et,l as ni,t as ht,p as ai,F as K,N as li,s as U,I as oi,q as ri,u as ci,r as Qe,v as Me,x as ui,y as di,z as hi,A as P,P as mt,B as mi,C as pi,n as gi,g as fi,D as yi,G as bi,o as vi,H as wi,J as Ti,K as ki,T as pt,M as Ai,L as Ci,O as Si,Q as Pi}from"./instrument-75683fa3.js";const[Ei,Fi]=Ie("skeleton-title"),xi={round:Boolean,titleWidth:ye};var _i=Y({name:Ei,props:xi,setup(e){return()=>c("h3",{class:Fi([{round:e.round}]),style:{width:Pt(e.titleWidth)}},null)}});const Mi=De(_i);var Li=Mi;const[Bi,Ni]=Ie("skeleton-avatar"),Ii={avatarSize:ye,avatarShape:Et("round")};var Di=Y({name:Bi,props:Ii,setup(e){return()=>c("div",{class:Ni([e.avatarShape]),style:si(e.avatarSize)},null)}});const Ri=De(Di);var Oi=Ri;const st="100%",Hi={round:Boolean,rowWidth:{type:ye,default:st}},[ji,Vi]=Ie("skeleton-paragraph");var zi=Y({name:ji,props:Hi,setup(e){return()=>c("div",{class:Vi([{round:e.round}]),style:{width:e.rowWidth}},null)}});const qi=De(zi);var Ui=qi;const[Wi,gt]=Ie("skeleton"),Yi="60%",$i={row:ni(0),round:Boolean,title:Boolean,titleWidth:ye,avatar:Boolean,avatarSize:ye,avatarShape:Et("round"),loading:ht,animate:ht,rowWidth:{type:[Number,String,Array],default:st}};var Gi=Y({name:Wi,inheritAttrs:!1,props:$i,setup(e,{slots:i,attrs:t}){const s=()=>{if(e.avatar)return c(Oi,{avatarShape:e.avatarShape,avatarSize:e.avatarSize},null)},n=()=>{if(e.title)return c(Li,{round:e.round,titleWidth:e.titleWidth},null)},a=u=>{const{rowWidth:d}=e;return d===st&&u===+e.row-1?Yi:Array.isArray(d)?d[u]:d},o=()=>Array(+e.row).fill("").map((u,d)=>c(Ui,{key:d,round:e.round,rowWidth:Pt(a(d))},null)),r=()=>i.template?i.template():c(K,null,[s(),c("div",{class:gt("content")},[n(),o()])]);return()=>{var u;return e.loading?c("div",ai({class:gt({animate:e.animate,round:e.round})},t),[r()]):(u=i.default)==null?void 0:u.call(i)}}});const Qi=De(Gi),Xi="_detail_16zle_5",Ki="_skeleton_16zle_12",Zi="_pageBg_16zle_28",Ji="_headHeight_16zle_43",es="_headHide_16zle_52",ts="_container_16zle_55",is="_musicName_16zle_70",ss="_right_16zle_77",ns="_inaccuracy_16zle_81",as="_wrong_16zle_85",ls="_notPlay_16zle_89",os="_intonation_wrong_16zle_93",rs="_intonation_high_16zle_97",cs="_intonation_low_16zle_101",us="_cadence_wrong_16zle_105",ds="_cadence_fast_16zle_109",hs="_cadence_slow_16zle_113",ms="_integrity_wrong_16zle_117",ps="_arrowSvg_16zle_121",gs="_bg2Left_16zle_126",fs="_bg2Right_16zle_132",z={detail:Xi,skeleton:Ki,pageBg:Zi,headHeight:Ji,headHide:es,container:ts,musicName:is,right:ss,inaccuracy:ns,wrong:as,notPlay:ls,intonation_wrong:os,intonation_high:rs,intonation_low:cs,cadence_wrong:us,cadence_fast:ds,cadence_slow:hs,integrity_wrong:ms,arrowSvg:ps,bg2Left:gs,bg2Right:fs},ys="_headerTop_e3dot_1",bs="_android_e3dot_12",vs="_back_e3dot_15",ws="_disabled_e3dot_27",Ts="_left_e3dot_30",ks="_leftContent_e3dot_34",As="_lcName_e3dot_34",Cs="_lcScore_e3dot_52",Ss="_center_e3dot_58",Ps="_cItem_e3dot_63",Es="_active_e3dot_85",Fs="_middle_e3dot_92",xs="_mScore_e3dot_113",_s="_mLabel_e3dot_119",Ms="_padMiddle_e3dot_135",Ls="_right_e3dot_138",Bs="_btn_e3dot_142",Ns="_iconBtn_e3dot_158",Is="_btnWrap_e3dot_168",Ds="_popup_e3dot_173",Rs="_playerBoxContent_e3dot_187",Os="_playerBoxCon_e3dot_187",Hs="_padPlayerBox_e3dot_197",js="_playerBox_e3dot_187",Vs="_videoBox_e3dot_290",zs="_audioBox_e3dot_294",qs="_audioBga_e3dot_303",Us="_audioBga1_e3dot_307",Ws="_audioBga2_e3dot_313",Ys="_audioVisualizer_e3dot_326",$s="_videoPlayerBox_e3dot_334",Gs="_demos_e3dot_360",Qs="_shiyiClose_e3dot_393",Xs="_shiyiPopup_e3dot_401",Ks="_shiyiTop_e3dot_409",Zs="_shiyiTitle_e3dot_416",Js="_items_e3dot_422",en="_item_e3dot_422",tn="_itemTone_e3dot_445",sn="_tyImg_e3dot_466",nn="_playLarge_e3dot_474",an="_playIngShow_e3dot_486",ln="_gramoBox_e3dot_489",on="_gramoPan_e3dot_503",rn="_rotateImg_e3dot_1",cn="_imgRotate_e3dot_514",un="_audioImg_e3dot_517",dn="_audioPoint_e3dot_523",hn="_audioZhen_e3dot_534",v={headerTop:ys,android:bs,back:vs,disabled:ws,left:Ts,leftContent:ks,lcName:As,lcScore:Cs,center:Ss,cItem:Ps,active:Es,middle:Fs,mScore:xs,mLabel:_s,padMiddle:Ms,right:Ls,btn:Bs,iconBtn:Ns,btnWrap:Is,popup:Ds,playerBoxContent:Rs,playerBoxCon:Os,padPlayerBox:Hs,playerBox:js,videoBox:Vs,audioBox:zs,audioBga:qs,audioBga1:Us,audioBga2:Ws,audioVisualizer:Ys,videoPlayerBox:$s,demos:Gs,shiyiClose:Qs,shiyiPopup:Xs,shiyiTop:Ks,shiyiTitle:Zs,items:Js,item:en,itemTone:tn,tyImg:sn,playLarge:nn,playIngShow:an,gramoBox:ln,gramoPan:on,rotateImg:rn,imgRotate:cn,audioImg:un,audioPoint:dn,audioZhen:hn},mn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAADENJREFUeF7tXXtwVOUV/5372Lww0URMMVVAsAJJx9FCQO1Y0wTRWh1op9SWSnGkon1YR2W09TF21FZ8onUqWqyIQ+tYZnSktmI2xmINSUB8JRKBTEggCZCQkJDNZvc+Tv2WTch7X/fug+z9d7/vnLO/373n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cJOu/CruSXN70POoCzzflHgJzlYnNM9c+LKghl6svSp1xIVXTauKoXeQmiinUTGyudOQhR2Eq5vX8PRswjsUchTFA8pG90wsgmSxTseydk92o9GMte2f33pG/vLbJQNENXCPddQPXyL+EdBzltT2iXRVKxue+TO9RbZu3uBEhvTM+V2jG5+lQNja74Dkvkpq0jKWMz0fA6M+FnhkkvuRC738lIDMw8OGVgCMS4r461v9+hjdo/Hk/o3ffpv9lGS9Q+P+yTLeG1f/mUlJNL4dvLnUD0v8aWTxAcv0a2ZH9o/+dvr5w5Oedvl6A9L9g6TIjvy9YHr2p97/tms6rY4m2HGtpjfpfPfaiZCUvYw+M/vfAs0bDGhhHLVtt9QuIsBxjNM1+IOtRFk4DmtxxGwGWSVlNBu9N5EgyjgJDpWRfwxSKZBEmer3/TwXlBK09iPMwXeZBhla/7eURxHRH5YtkfKhtqYOqdDqwHJjj60s16c7ca3l9CQY0M80yytvrEj1e5bW5ZOV8BaOXClxCuHEBJnILRiaCKcv+FqSN6Sdsw4C0IWYbEriH4Mgn4r2RZHsEOQHjCCgaBhQonYeJXtb9uJaCUmjUhsg6xFlFpP2Zvk/x+DnYnIKhE4k9JdTSEkQ6JhBwriRiFtt/JiIjljUSkAeIRB/DDH6XysqwH/tC3pepZAOIRb+Hdmsu9hswRjPCaQpolRg/tTDdB9qAECKbQB6ifNSanncsMoLSQqWcS0aiMceejdi7czzFgekItUTNdBw0Y/1YDNleazUI6izfQZTNOFKHYSOdkTqGj3lPn0uwwMusmygYMPqoxg5NTaWUSpDO/YPpcoYTYCoitRgmg6kiShDRH9FX0zS12/7DLzOHMYRxCIM0I2zBmI1E2ExRdC/FgzpoN2GGDWsXdYkWGP0/zzmlE5+5tKIAAAAASUVORK5CYII=",ft=""+new URL("../png/shiyi-top-3e1d9297.png",import.meta.url).href,fn=""+new URL("../png/closeImg-5487d70c.png",import.meta.url).href,yn=""+new URL("../png/music_bg-7bc33289.png",import.meta.url).href,bn=""+new URL("../png/ty-d4076c85.png",import.meta.url).href,vn=""+new URL("../png/videobg-28992a9b.png",import.meta.url).href;function y(e,i,t){return(i=Tn(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function wn(e,i){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var s=t.call(e,i||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(e)}function Tn(e){var i=wn(e,"string");return typeof i=="symbol"?i:String(i)}function kn(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}function yt(e,i){for(var t=0;t<i.length;t++){var s=i[t];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function An(e,i,t){return i&&yt(e.prototype,i),t&&yt(e,t),e}function Cn(e,i,t){return i in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function bt(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);i&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,s)}return t}function vt(e){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?bt(Object(t),!0).forEach(function(s){Cn(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bt(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}var wt={addCSS:!0,thumbWidth:15,watch:!0};function Sn(e,i){return function(){return Array.from(document.querySelectorAll(i)).includes(this)}.call(e,i)}function Pn(e,i){if(e&&i){var t=new Event(i,{bubbles:!0});e.dispatchEvent(t)}}var ke=function(e){return e!=null?e.constructor:null},nt=function(e,i){return!!(e&&i&&e instanceof i)},Ft=function(e){return e==null},xt=function(e){return ke(e)===Object},En=function(e){return ke(e)===Number&&!Number.isNaN(e)},_t=function(e){return ke(e)===String},Fn=function(e){return ke(e)===Boolean},xn=function(e){return ke(e)===Function},Mt=function(e){return Array.isArray(e)},Lt=function(e){return nt(e,NodeList)},_n=function(e){return nt(e,Element)},Mn=function(e){return nt(e,Event)},Ln=function(e){return Ft(e)||(_t(e)||Mt(e)||Lt(e))&&!e.length||xt(e)&&!Object.keys(e).length},q={nullOrUndefined:Ft,object:xt,number:En,string:_t,boolean:Fn,function:xn,array:Mt,nodeList:Lt,element:_n,event:Mn,empty:Ln};function Bn(e){var i="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}function Nn(e,i){if(1>i){var t=Bn(i);return parseFloat(e.toFixed(t))}return Math.round(e/i)*i}var In=function(){function e(i,t){kn(this,e),q.element(i)?this.element=i:q.string(i)&&(this.element=document.querySelector(i)),q.element(this.element)&&q.empty(this.element.rangeTouch)&&(this.config=vt({},wt,{},t),this.init())}return An(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(i){var t=this,s=i?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(n){t.element[s](n,function(a){return t.set(a)},!1)})}},{key:"get",value:function(i){if(!e.enabled||!q.event(i))return null;var t,s=i.target,n=i.changedTouches[0],a=parseFloat(s.getAttribute("min"))||0,o=parseFloat(s.getAttribute("max"))||100,r=parseFloat(s.getAttribute("step"))||1,u=s.getBoundingClientRect(),d=100/u.width*(this.config.thumbWidth/2)/100;return 0>(t=100/u.width*(n.clientX-u.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*d:50<t&&(t+=2*(t-50)*d),a+Nn(t/100*(o-a),r)}},{key:"set",value:function(i){e.enabled&&q.event(i)&&!i.target.disabled&&(i.preventDefault(),i.target.value=this.get(i),Pn(i.target,i.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(i){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},s=null;if(q.empty(i)||q.string(i)?s=Array.from(document.querySelectorAll(q.string(i)?i:'input[type="range"]')):q.element(i)?s=[i]:q.nodeList(i)?s=Array.from(i):q.array(i)&&(s=i.filter(q.element)),q.empty(s))return null;var n=vt({},wt,{},t);if(q.string(i)&&n.watch){var a=new MutationObserver(function(o){Array.from(o).forEach(function(r){Array.from(r.addedNodes).forEach(function(u){q.element(u)&&Sn(u,i)&&new e(u,n)})})});a.observe(document.body,{childList:!0,subtree:!0})}return s.map(function(o){return new e(o,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const Ae=e=>e!=null?e.constructor:null,ie=(e,i)=>!!(e&&i&&e instanceof i),at=e=>e==null,Bt=e=>Ae(e)===Object,Dn=e=>Ae(e)===Number&&!Number.isNaN(e),Re=e=>Ae(e)===String,Rn=e=>Ae(e)===Boolean,Nt=e=>typeof e=="function",It=e=>Array.isArray(e),On=e=>ie(e,WeakMap),Dt=e=>ie(e,NodeList),Hn=e=>Ae(e)===Text,jn=e=>ie(e,Event),Vn=e=>ie(e,KeyboardEvent),zn=e=>ie(e,window.TextTrackCue)||ie(e,window.VTTCue),qn=e=>ie(e,TextTrack)||!at(e)&&Re(e.kind),Un=e=>ie(e,Promise)&&Nt(e.then),Wn=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",Rt=e=>at(e)||(Re(e)||It(e)||Dt(e))&&!e.length||Bt(e)&&!Object.keys(e).length,Yn=e=>{if(ie(e,window.URL))return!0;if(!Re(e))return!1;let i=e;e.startsWith("http://")&&e.startsWith("https://")||(i=`http://${e}`);try{return!Rt(new URL(i).hostname)}catch(t){return!1}};var l={nullOrUndefined:at,object:Bt,number:Dn,string:Re,boolean:Rn,function:Nt,array:It,weakMap:On,nodeList:Dt,element:Wn,textNode:Hn,event:jn,keyboardEvent:Vn,cue:zn,track:qn,promise:Un,url:Yn,empty:Rt};const Xe=(()=>{const e=document.createElement("span"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(i).find(s=>e.style[s]!==void 0);return!!l.string(t)&&i[t]})();function Ot(e,i){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(t){}},i)}const $n=!!window.document.documentMode,Gn=/Edge/g.test(navigator.userAgent),Qn="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),Xn=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,Kn=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,Zn=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var j={isIE:$n,isEdge:Gn,isWebKit:Qn,isIPhone:Xn,isIPadOS:Kn,isIos:Zn};function Jn(e){return JSON.parse(JSON.stringify(e))}function Ht(e,i){return i.split(".").reduce((t,s)=>t&&t[s],e)}function I(e={},...i){if(!i.length)return e;const t=i.shift();return l.object(t)?(Object.keys(t).forEach(s=>{l.object(t[s])?(Object.keys(e).includes(s)||Object.assign(e,{[s]:{}}),I(e[s],t[s])):Object.assign(e,{[s]:t[s]})}),I(e,...i)):e}function jt(e,i){const t=e.length?e:[e];Array.from(t).reverse().forEach((s,n)=>{const a=n>0?i.cloneNode(!0):i,o=s.parentNode,r=s.nextSibling;a.appendChild(s),r?o.insertBefore(a,r):o.appendChild(a)})}function Ke(e,i){l.element(e)&&!l.empty(i)&&Object.entries(i).filter(([,t])=>!l.nullOrUndefined(t)).forEach(([t,s])=>e.setAttribute(t,s))}function k(e,i,t){const s=document.createElement(e);return l.object(i)&&Ke(s,i),l.string(t)&&(s.innerText=t),s}function ea(e,i){l.element(e)&&l.element(i)&&i.parentNode.insertBefore(e,i.nextSibling)}function Tt(e,i,t,s){l.element(i)&&i.appendChild(k(e,t,s))}function te(e){l.nodeList(e)||l.array(e)?Array.from(e).forEach(te):l.element(e)&&l.element(e.parentNode)&&e.parentNode.removeChild(e)}function Fe(e){if(!l.element(e))return;let{length:i}=e.childNodes;for(;i>0;)e.removeChild(e.lastChild),i-=1}function Le(e,i){return l.element(i)&&l.element(i.parentNode)&&l.element(e)?(i.parentNode.replaceChild(e,i),e):null}function Z(e,i){if(!l.string(e)||l.empty(e))return{};const t={},s=I({},i);return e.split(",").forEach(n=>{const a=n.trim(),o=a.replace(".",""),r=a.replace(/[[\]]/g,"").split("="),[u]=r,d=r.length>1?r[1].replace(/["']/g,""):"";switch(a.charAt(0)){case".":l.string(s.class)?t.class=`${s.class} ${o}`:t.class=o;break;case"#":t.id=a.replace("#","");break;case"[":t[u]=d}}),I(s,t)}function ce(e,i){if(!l.element(e))return;let t=i;l.boolean(t)||(t=!e.hidden),e.hidden=t}function M(e,i,t){if(l.nodeList(e))return Array.from(e).map(s=>M(s,i,t));if(l.element(e)){let s="toggle";return t!==void 0&&(s=t?"add":"remove"),e.classList[s](i),e.classList.contains(i)}return!1}function Be(e,i){return l.element(e)&&e.classList.contains(i)}function ue(e,i){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(e,i)}function ta(e,i){const{prototype:t}=Element;return(t.closest||function(){let s=this;do{if(ue.matches(s,i))return s;s=s.parentElement||s.parentNode}while(s!==null&&s.nodeType===1);return null}).call(e,i)}function be(e){return this.elements.container.querySelectorAll(e)}function O(e){return this.elements.container.querySelector(e)}function Ue(e=null,i=!1){l.element(e)&&e.focus({preventScroll:!0,focusVisible:i})}const kt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},D={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,i){const t=D[e]||i!=="html5";return{api:t,ui:t&&D.rangeInput}},pip:!(j.isIPhone||!l.function(k("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||k("video").disablePictureInPicture)),airplay:l.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(l.empty(e))return!1;const[i]=e.split("/");let t=e;if(!this.isHTML5||i!==this.type)return!1;Object.keys(kt).includes(t)&&(t+=`; codecs="${kt[e]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch(s){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:Xe!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},ia=(()=>{let e=!1;try{const i=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(i){}return e})();function ve(e,i,t,s=!1,n=!0,a=!1){if(!e||!("addEventListener"in e)||l.empty(i)||!l.function(t))return;const o=i.split(" ");let r=a;ia&&(r={passive:n,capture:a}),o.forEach(u=>{this&&this.eventListeners&&s&&this.eventListeners.push({element:e,type:u,callback:t,options:r}),e[s?"addEventListener":"removeEventListener"](u,t,r)})}function x(e,i="",t,s=!0,n=!1){ve.call(this,e,i,t,!0,s,n)}function Oe(e,i="",t,s=!0,n=!1){ve.call(this,e,i,t,!1,s,n)}function lt(e,i="",t,s=!0,n=!1){const a=(...o)=>{Oe(e,i,a,s,n),t.apply(this,o)};ve.call(this,e,i,a,!0,s,n)}function A(e,i="",t=!1,s={}){if(!l.element(e)||l.empty(i))return;const n=new CustomEvent(i,{bubbles:t,detail:{...s,plyr:this}});e.dispatchEvent(n)}function sa(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:i,type:t,callback:s,options:n}=e;i.removeEventListener(t,s,n)}),this.eventListeners=[])}function na(){return new Promise(e=>this.ready?setTimeout(e,0):x.call(this,this.elements.container,"ready",e)).then(()=>{})}function J(e){l.promise(e)&&e.then(null,()=>{})}function Ze(e){return l.array(e)?e.filter((i,t)=>e.indexOf(i)===t):e}function Vt(e,i){return l.array(e)&&e.length?e.reduce((t,s)=>Math.abs(s-i)<Math.abs(t-i)?s:t):null}function zt(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const At=[[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,[i,t])=>({...e,[i/t]:[i,t]}),{});function qt(e){return l.array(e)||l.string(e)&&e.includes(":")?(l.array(e)?e:e.split(":")).map(Number).every(l.number):!1}function Ne(e){if(!l.array(e)||!e.every(l.number))return null;const[i,t]=e,s=(a,o)=>o===0?a:s(o,a%o),n=s(i,t);return[i/n,t/n]}function ot(e){const i=s=>qt(s)?s.split(":").map(Number):null;let t=i(e);if(t===null&&(t=i(this.config.ratio)),t===null&&!l.empty(this.embed)&&l.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:s,videoHeight:n}=this.media;t=[s,n]}return Ne(t)}function me(e){if(!this.isVideo)return{};const{wrapper:i}=this.elements,t=ot.call(this,e);if(!l.array(t))return{};const[s,n]=Ne(t),a=100/s*n;if(zt(`aspect-ratio: ${s}/${n}`)?i.style.aspectRatio=`${s}/${n}`:i.style.paddingBottom=`${a}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const o=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),r=(o-a)/(o/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform=`translateY(-${r}%)`}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:t}}function Ut(e,i,t=.05){const s=e/i,n=Vt(Object.keys(At),s);return Math.abs(n-s)<=t?At[n]:[e,i]}function aa(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const ae={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const i=e.getAttribute("type");return!!l.empty(i)||D.mime.call(this,i)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:ae.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,l.empty(this.config.ratio)||me.call(e),Object.defineProperty(e.media,"quality",{get(){const i=ae.getSources.call(e).find(t=>t.getAttribute("src")===e.source);return i&&Number(i.getAttribute("size"))},set(i){if(e.quality!==i){if(e.config.quality.forced&&l.function(e.config.quality.onChange))e.config.quality.onChange(i);else{const t=ae.getSources.call(e).find(u=>Number(u.getAttribute("size"))===i);if(!t)return;const{currentTime:s,paused:n,preload:a,readyState:o,playbackRate:r}=e.media;e.media.src=t.getAttribute("src"),(a!=="none"||o)&&(e.once("loadedmetadata",()=>{e.speed=r,e.currentTime=s,n||J(e.play())}),e.media.load())}A.call(e,e.media,"qualitychange",!1,{quality:i})}}})},cancelRequests(){this.isHTML5&&(te(ae.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function la(e){return`${e}-${Math.floor(1e4*Math.random())}`}function Je(e,...i){return l.empty(e)?e:e.toString().replace(/{(\d+)}/g,(t,s)=>i[s].toString())}function oa(e,i){return e===0||i===0||Number.isNaN(e)||Number.isNaN(i)?0:(e/i*100).toFixed(2)}const fe=(e="",i="",t="")=>e.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Wt=(e="")=>e.toString().replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase());function ra(e=""){let i=e.toString();return i=fe(i,"-"," "),i=fe(i,"_"," "),i=Wt(i),fe(i," ","")}function ca(e=""){let i=e.toString();return i=ra(i),i.charAt(0).toLowerCase()+i.slice(1)}function ua(e){const i=document.createDocumentFragment(),t=document.createElement("div");return i.appendChild(t),t.innerHTML=e,i.firstChild.innerText}function da(e){const i=document.createElement("div");return i.appendChild(e),i.innerHTML}const Ct={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},H={get(e="",i={}){if(l.empty(e)||l.empty(i))return"";let t=Ht(i.i18n,e);if(l.empty(t))return Object.keys(Ct).includes(e)?Ct[e]:"";const s={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(s).forEach(([n,a])=>{t=fe(t,n,a)}),t}};class we{constructor(i){y(this,"get",t=>{if(!we.supported||!this.enabled)return null;const s=window.localStorage.getItem(this.key);if(l.empty(s))return null;const n=JSON.parse(s);return l.string(t)&&t.length?n[t]:n}),y(this,"set",t=>{if(!we.supported||!this.enabled||!l.object(t))return;let s=this.get();l.empty(s)&&(s={}),I(s,t);try{window.localStorage.setItem(this.key,JSON.stringify(s))}catch(n){}}),this.enabled=i.config.storage.enabled,this.key=i.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const i="___test";return window.localStorage.setItem(i,i),window.localStorage.removeItem(i),!0}catch(i){return!1}}}function Ce(e,i="text"){return new Promise((t,s)=>{try{const n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",()=>{if(i==="text")try{t(JSON.parse(n.responseText))}catch(a){t(n.responseText)}else t(n.response)}),n.addEventListener("error",()=>{throw new Error(n.status)}),n.open("GET",e,!0),n.responseType=i,n.send()}catch(n){s(n)}})}function Yt(e,i){if(!l.string(e))return;const t="cache",s=l.string(i);let n=!1;const a=()=>document.getElementById(i)!==null,o=(r,u)=>{r.innerHTML=u,s&&a()||document.body.insertAdjacentElement("afterbegin",r)};if(!s||!a()){const r=we.supported,u=document.createElement("div");if(u.setAttribute("hidden",""),s&&u.setAttribute("id",i),r){const d=window.localStorage.getItem(`${t}-${i}`);if(n=d!==null,n){const b=JSON.parse(d);o(u,b.content)}}Ce(e).then(d=>{if(!l.empty(d)){if(r)try{window.localStorage.setItem(`${t}-${i}`,JSON.stringify({content:d}))}catch(b){}o(u,d)}}).catch(()=>{})}}const $t=e=>Math.trunc(e/60/60%60,10),ha=e=>Math.trunc(e/60%60,10),ma=e=>Math.trunc(e%60,10);function He(e=0,i=!1,t=!1){if(!l.number(e))return He(void 0,i,t);const s=r=>`0${r}`.slice(-2);let n=$t(e);const a=ha(e),o=ma(e);return n=i||n>0?`${n}:`:"",`${t&&e>0?"-":""}${n}${s(a)}:${s(o)}`}const f={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),i=window.location.host?window.location.host:window.top.location.host,t=e.host!==i||j.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=O.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:be.call(this,this.config.selectors.buttons.play),pause:O.call(this,this.config.selectors.buttons.pause),restart:O.call(this,this.config.selectors.buttons.restart),rewind:O.call(this,this.config.selectors.buttons.rewind),fastForward:O.call(this,this.config.selectors.buttons.fastForward),mute:O.call(this,this.config.selectors.buttons.mute),pip:O.call(this,this.config.selectors.buttons.pip),airplay:O.call(this,this.config.selectors.buttons.airplay),settings:O.call(this,this.config.selectors.buttons.settings),captions:O.call(this,this.config.selectors.buttons.captions),fullscreen:O.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=O.call(this,this.config.selectors.progress),this.elements.inputs={seek:O.call(this,this.config.selectors.inputs.seek),volume:O.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:O.call(this,this.config.selectors.display.buffer),currentTime:O.call(this,this.config.selectors.display.currentTime),duration:O.call(this,this.config.selectors.display.duration)},l.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,i){const t="http://www.w3.org/2000/svg",s=f.getIconUrl.call(this),n=`${s.cors?"":s.url}#${this.config.iconPrefix}`,a=document.createElementNS(t,"svg");Ke(a,I(i,{"aria-hidden":"true",focusable:"false"}));const o=document.createElementNS(t,"use"),r=`${n}-${e}`;return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",r),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),a.appendChild(o),a},createLabel(e,i={}){const t=H.get(e,this.config);return k("span",{...i,class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(e){if(l.empty(e))return null;const i=k("span",{class:this.config.classNames.menu.value});return i.appendChild(k("span",{class:this.config.classNames.menu.badge},e)),i},createButton(e,i){const t=I({},i);let s=ca(e);const n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(o=>{Object.keys(t).includes(o)&&(n[o]=t[o],delete t[o])}),n.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(o=>o===this.config.classNames.control)||I(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,e){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,s="play",n.label="play",n.icon="play";break;default:l.empty(n.label)&&(n.label=s),l.empty(n.icon)&&(n.icon=e)}const a=k(n.element);return n.toggle?(a.appendChild(f.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(f.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(f.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(f.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(f.createIcon.call(this,n.icon)),a.appendChild(f.createLabel.call(this,n.label))),I(t,Z(this.config.selectors.buttons[s],t)),Ke(a,t),s==="play"?(l.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(a)):this.elements.buttons[s]=a,a},createRange(e,i){const t=k("input",I(Z(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":H.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},i));return this.elements.inputs[e]=t,f.updateRangeFill.call(this,t),In.setup(t),t},createProgress(e,i){const t=k("progress",I(Z(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if(e!=="volume"){t.appendChild(k("span",null,"0"));const s={played:"played",buffer:"buffered"}[e],n=s?H.get(s,this.config):"";t.innerText=`% ${n.toLowerCase()}`}return this.elements.display[e]=t,t},createTime(e,i){const t=Z(this.config.selectors.display[e],i),s=k("div",I(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":H.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=s,s},bindMenuItemShortcuts(e,i){x.call(this,e,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const s=ue(e,'[role="menuitemradio"]');if(!s&&[" ","ArrowRight"].includes(t.key))f.showMenuPanel.call(this,i,!0);else{let n;t.key!==" "&&(t.key==="ArrowDown"||s&&t.key==="ArrowRight"?(n=e.nextElementSibling,l.element(n)||(n=e.parentNode.firstElementChild)):(n=e.previousElementSibling,l.element(n)||(n=e.parentNode.lastElementChild)),Ue.call(this,n,!0))}},!1),x.call(this,e,"keyup",t=>{t.key==="Return"&&f.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:i,type:t,title:s,badge:n=null,checked:a=!1}){const o=Z(this.config.selectors.inputs[t]),r=k("button",I(o,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${o.class?o.class:""}`.trim(),"aria-checked":a,value:e})),u=k("span");u.innerHTML=s,l.element(n)&&u.appendChild(n),r.appendChild(u),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>r.getAttribute("aria-checked")==="true",set(d){d&&Array.from(r.parentNode.children).filter(b=>ue(b,'[role="menuitemradio"]')).forEach(b=>b.setAttribute("aria-checked","false")),r.setAttribute("aria-checked",d?"true":"false")}}),this.listeners.bind(r,"click keyup",d=>{if(!l.keyboardEvent(d)||d.key===" "){switch(d.preventDefault(),d.stopPropagation(),r.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",l.keyboardEvent(d))}},t,!1),f.bindMenuItemShortcuts.call(this,r,t),i.appendChild(r)},formatTime(e=0,i=!1){return l.number(e)?He(e,$t(this.duration)>0,i):e},updateTimeDisplay(e=null,i=0,t=!1){l.element(e)&&l.number(i)&&(e.innerText=f.formatTime(i,t))},updateVolume(){this.supported.ui&&(l.element(this.elements.inputs.volume)&&f.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),l.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,i=0){l.element(e)&&(e.value=i,f.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!l.event(e))return;let i=0;const t=(s,n)=>{const a=l.number(n)?n:0,o=l.element(s)?s:this.elements.display.buffer;if(l.element(o)){o.value=a;const r=o.getElementsByTagName("span")[0];l.element(r)&&(r.childNodes[0].nodeValue=a)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":i=oa(this.currentTime,this.duration),e.type==="timeupdate"&&f.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const i=l.event(e)?e.target:e;if(l.element(i)&&i.getAttribute("type")==="range"){if(ue(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);const t=f.formatTime(this.currentTime),s=f.formatTime(this.duration),n=H.get("seekLabel",this.config);i.setAttribute("aria-valuetext",n.replace("{currentTime}",t).replace("{duration}",s))}else if(ue(i,this.config.selectors.inputs.volume)){const t=100*i.value;i.setAttribute("aria-valuenow",t),i.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else i.setAttribute("aria-valuenow",i.value);(j.isWebKit||j.isIPadOS)&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip(e){var i,t;if(!this.config.tooltips.seek||!l.element(this.elements.inputs.seek)||!l.element(this.elements.display.seekTooltip)||this.duration===0)return;const s=this.elements.display.seekTooltip,n=`${this.config.classNames.tooltip}--visible`,a=b=>M(s,n,b);if(this.touch)return void a(!1);let o=0;const r=this.elements.progress.getBoundingClientRect();if(l.event(e))o=100/r.width*(e.pageX-r.left);else{if(!Be(s,n))return;o=parseFloat(s.style.left,10)}o<0?o=0:o>100&&(o=100);const u=this.duration/100*o;s.innerText=f.formatTime(u);const d=(i=this.config.markers)===null||i===void 0||(t=i.points)===null||t===void 0?void 0:t.find(({time:b})=>b===Math.round(u));d&&s.insertAdjacentHTML("afterbegin",`${d.label}<br>`),s.style.left=`${o}%`,l.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&a(e.type==="mouseenter")},timeUpdate(e){const i=!l.element(this.elements.display.duration)&&this.config.invertTime;f.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),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 ce(this.elements.display.currentTime,!0),void ce(this.elements.progress,!0);l.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=l.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,i){ce(this.elements.settings.buttons[e],!i)},updateSetting(e,i,t){const s=this.elements.settings.panels[e];let n=null,a=i;if(e==="captions")n=this.currentTrack;else{if(n=l.empty(t)?this[e]:t,l.empty(n)&&(n=this.config[e].default),!l.empty(this.options[e])&&!this.options[e].includes(n))return void this.debug.warn(`Unsupported value of '${n}' for ${e}`);if(!this.config[e].options.includes(n))return void this.debug.warn(`Disabled value of '${n}' for ${e}`)}if(l.element(a)||(a=s&&s.querySelector('[role="menu"]')),!l.element(a))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=f.getLabel.call(this,e,n);const o=a&&a.querySelector(`[value="${n}"]`);l.element(o)&&(o.checked=!0)},getLabel(e,i){switch(e){case"speed":return i===1?H.get("normal",this.config):`${i}&times;`;case"quality":if(l.number(i)){const t=H.get(`qualityLabel.${i}`,this.config);return t.length?t:`${i}p`}return Wt(i);case"captions":return _.getLabel.call(this);default:return null}},setQualityMenu(e){if(!l.element(this.elements.settings.panels.quality))return;const i="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');l.array(e)&&(this.options.quality=Ze(e).filter(a=>this.config.quality.options.includes(a)));const s=!l.empty(this.options.quality)&&this.options.quality.length>1;if(f.toggleMenuButton.call(this,i,s),Fe(t),f.checkMenu.call(this),!s)return;const n=a=>{const o=H.get(`qualityBadge.${a}`,this.config);return o.length?f.createBadge.call(this,o):null};this.options.quality.sort((a,o)=>{const r=this.config.quality.options;return r.indexOf(a)>r.indexOf(o)?1:-1}).forEach(a=>{f.createMenuItem.call(this,{value:a,list:t,type:i,title:f.getLabel.call(this,"quality",a),badge:n(a)})}),f.updateSetting.call(this,i,t)},setCaptionsMenu(){if(!l.element(this.elements.settings.panels.captions))return;const e="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=_.getTracks.call(this),s=!!t.length;if(f.toggleMenuButton.call(this,e,s),Fe(i),f.checkMenu.call(this),!s)return;const n=t.map((a,o)=>({value:o,checked:this.captions.toggled&&this.currentTrack===o,title:_.getLabel.call(this,a),badge:a.language&&f.createBadge.call(this,a.language.toUpperCase()),list:i,type:"language"}));n.unshift({value:-1,checked:!this.captions.toggled,title:H.get("disabled",this.config),list:i,type:"language"}),n.forEach(f.createMenuItem.bind(this)),f.updateSetting.call(this,e,i)},setSpeedMenu(){if(!l.element(this.elements.settings.panels.speed))return;const e="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(s=>s>=this.minimumSpeed&&s<=this.maximumSpeed);const t=!l.empty(this.options.speed)&&this.options.speed.length>1;f.toggleMenuButton.call(this,e,t),Fe(i),f.checkMenu.call(this),t&&(this.options.speed.forEach(s=>{f.createMenuItem.call(this,{value:s,list:i,type:e,title:f.getLabel.call(this,"speed",s)})}),f.updateSetting.call(this,e,i))},checkMenu(){const{buttons:e}=this.elements.settings,i=!l.empty(e)&&Object.values(e).some(t=>!t.hidden);ce(this.elements.settings.menu,!i)},focusFirstMenuItem(e,i=!1){if(this.elements.settings.popup.hidden)return;let t=e;l.element(t)||(t=Object.values(this.elements.settings.panels).find(n=>!n.hidden));const s=t.querySelector('[role^="menuitem"]');Ue.call(this,s,i)},toggleMenu(e){const{popup:i}=this.elements.settings,t=this.elements.buttons.settings;if(!l.element(i)||!l.element(t))return;const{hidden:s}=i;let n=s;if(l.boolean(e))n=e;else if(l.keyboardEvent(e)&&e.key==="Escape")n=!1;else if(l.event(e)){const a=l.function(e.composedPath)?e.composedPath()[0]:e.target,o=i.contains(a);if(o||!o&&e.target!==t&&n)return}t.setAttribute("aria-expanded",n),ce(i,!n),M(this.elements.container,this.config.classNames.menu.open,n),n&&l.keyboardEvent(e)?f.focusFirstMenuItem.call(this,null,!0):n||s||Ue.call(this,t,l.keyboardEvent(e))},getMenuSize(e){const i=e.cloneNode(!0);i.style.position="absolute",i.style.opacity=0,i.removeAttribute("hidden"),e.parentNode.appendChild(i);const t=i.scrollWidth,s=i.scrollHeight;return te(i),{width:t,height:s}},showMenuPanel(e="",i=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!l.element(t))return;const s=t.parentNode,n=Array.from(s.children).find(a=>!a.hidden);if(D.transitions&&!D.reducedMotion){s.style.width=`${n.scrollWidth}px`,s.style.height=`${n.scrollHeight}px`;const a=f.getMenuSize.call(this,t),o=r=>{r.target===s&&["width","height"].includes(r.propertyName)&&(s.style.width="",s.style.height="",Oe.call(this,s,Xe,o))};x.call(this,s,Xe,o),s.style.width=`${a.width}px`,s.style.height=`${a.height}px`}ce(n,!0),ce(t,!1),f.focusFirstMenuItem.call(this,t,i)},setDownloadUrl(){const e=this.elements.buttons.download;l.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:i,createButton:t,createProgress:s,createRange:n,createTime:a,setQualityMenu:o,setSpeedMenu:r,showMenuPanel:u}=f;this.elements.controls=null,l.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const d=k("div",Z(this.config.selectors.controls.wrapper));this.elements.controls=d;const b={class:"plyr__controls__item"};return Ze(l.array(this.config.controls)?this.config.controls:[]).forEach(m=>{if(m==="restart"&&d.appendChild(t.call(this,"restart",b)),m==="rewind"&&d.appendChild(t.call(this,"rewind",b)),m==="play"&&d.appendChild(t.call(this,"play",b)),m==="fast-forward"&&d.appendChild(t.call(this,"fast-forward",b)),m==="progress"){const h=k("div",{class:`${b.class} plyr__progress__container`}),w=k("div",Z(this.config.selectors.progress));if(w.appendChild(n.call(this,"seek",{id:`plyr-seek-${e.id}`})),w.appendChild(s.call(this,"buffer")),this.config.tooltips.seek){const S=k("span",{class:this.config.classNames.tooltip},"00:00");w.appendChild(S),this.elements.display.seekTooltip=S}this.elements.progress=w,h.appendChild(this.elements.progress),d.appendChild(h)}if(m==="current-time"&&d.appendChild(a.call(this,"currentTime",b)),m==="duration"&&d.appendChild(a.call(this,"duration",b)),m==="mute"||m==="volume"){let{volume:h}=this.elements;if(l.element(h)&&d.contains(h)||(h=k("div",I({},b,{class:`${b.class} plyr__volume`.trim()})),this.elements.volume=h,d.appendChild(h)),m==="mute"&&h.appendChild(t.call(this,"mute")),m==="volume"&&!j.isIos&&!j.isIPadOS){const w={max:1,step:.05,value:this.config.volume};h.appendChild(n.call(this,"volume",I(w,{id:`plyr-volume-${e.id}`})))}}if(m==="captions"&&d.appendChild(t.call(this,"captions",b)),m==="settings"&&!l.empty(this.config.settings)){const h=k("div",I({},b,{class:`${b.class} plyr__menu`.trim(),hidden:""}));h.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const w=k("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),S=k("div"),T=k("div",{id:`plyr-settings-${e.id}-home`}),E=k("div",{role:"menu"});T.appendChild(E),S.appendChild(T),this.elements.settings.panels.home=T,this.config.settings.forEach(g=>{const p=k("button",I(Z(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(this,p,g),x.call(this,p,"click",()=>{u.call(this,g,!1)});const C=k("span",null,H.get(g,this.config)),F=k("span",{class:this.config.classNames.menu.value});F.innerHTML=e[g],C.appendChild(F),p.appendChild(C),E.appendChild(p);const B=k("div",{id:`plyr-settings-${e.id}-${g}`,hidden:""}),N=k("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});N.appendChild(k("span",{"aria-hidden":!0},H.get(g,this.config))),N.appendChild(k("span",{class:this.config.classNames.hidden},H.get("menuBack",this.config))),x.call(this,B,"keydown",R=>{R.key==="ArrowLeft"&&(R.preventDefault(),R.stopPropagation(),u.call(this,"home",!0))},!1),x.call(this,N,"click",()=>{u.call(this,"home",!1)}),B.appendChild(N),B.appendChild(k("div",{role:"menu"})),S.appendChild(B),this.elements.settings.buttons[g]=p,this.elements.settings.panels[g]=B}),w.appendChild(S),h.appendChild(w),d.appendChild(h),this.elements.settings.popup=w,this.elements.settings.menu=h}if(m==="pip"&&D.pip&&d.appendChild(t.call(this,"pip",b)),m==="airplay"&&D.airplay&&d.appendChild(t.call(this,"airplay",b)),m==="download"){const h=I({},b,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(h.download="");const{download:w}=this.config.urls;!l.url(w)&&this.isEmbed&&I(h,{icon:`logo-${this.provider}`,label:this.provider}),d.appendChild(t.call(this,"download",h))}m==="fullscreen"&&d.appendChild(t.call(this,"fullscreen",b))}),this.isHTML5&&o.call(this,ae.getQualityOptions.call(this)),r.call(this),d},inject(){if(this.config.loadSprite){const n=f.getIconUrl.call(this);n.cors&&Yt(n.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const i={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;l.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),l.element(this.config.controls)||l.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 s;if(t&&l.string(this.config.controls)&&(e=(n=>{let a=n;return Object.entries(i).forEach(([o,r])=>{a=fe(a,`{${o}}`,r)}),a})(e)),l.string(this.config.selectors.controls.container)&&(s=document.querySelector(this.config.selectors.controls.container)),l.element(s)||(s=this.elements.container),s[l.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),l.element(this.elements.controls)||f.findElements.call(this),!l.empty(this.elements.buttons)){const n=a=>{const o=this.config.classNames.controlPressed;a.setAttribute("aria-pressed","false"),Object.defineProperty(a,"pressed",{configurable:!0,enumerable:!0,get:()=>Be(a,o),set(r=!1){M(a,o,r),a.setAttribute("aria-pressed",r?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(a=>{l.array(a)||l.nodeList(a)?Array.from(a).filter(Boolean).forEach(n):n(a)})}if(j.isEdge&&Ot(s),this.config.tooltips.controls){const{classNames:n,selectors:a}=this.config,o=`${a.controls.wrapper} ${a.labels} .${n.hidden}`,r=be.call(this,o);Array.from(r).forEach(u=>{M(u,this.config.classNames.hidden,!1),M(u,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(e){}},setMarkers(){var e,i;if(!this.duration||this.elements.markers)return;const t=(e=this.config.markers)===null||e===void 0||(i=e.points)===null||i===void 0?void 0:i.filter(({time:u})=>u>0&&u<this.duration);if(t==null||!t.length)return;const s=document.createDocumentFragment(),n=document.createDocumentFragment();let a=null;const o=`${this.config.classNames.tooltip}--visible`,r=u=>M(a,o,u);t.forEach(u=>{const d=k("span",{class:this.config.classNames.marker},""),b=u.time/this.duration*100+"%";a&&(d.addEventListener("mouseenter",()=>{u.label||(a.style.left=b,a.innerHTML=u.label,r(!0))}),d.addEventListener("mouseleave",()=>{r(!1)})),d.addEventListener("click",()=>{this.currentTime=u.time}),d.style.left=b,n.appendChild(d)}),s.appendChild(n),this.config.tooltips.seek||(a=k("span",{class:this.config.classNames.tooltip},""),s.appendChild(a)),this.elements.markers={points:n,tip:a},this.elements.progress.appendChild(s)}};function Gt(e,i=!0){let t=e;if(i){const s=document.createElement("a");s.href=t,t=s.href}try{return new URL(t)}catch(s){return null}}function Qt(e){const i=new URLSearchParams;return l.object(e)&&Object.entries(e).forEach(([t,s])=>{i.set(t,s)}),i}const _={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!D.textTracks)return void(l.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this));if(l.element(this.elements.captions)||(this.elements.captions=k("div",Z(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),ea(this.elements.captions,this.elements.wrapper)),j.isIE&&window.URL){const s=this.media.querySelectorAll("track");Array.from(s).forEach(n=>{const a=n.getAttribute("src"),o=Gt(a);o!==null&&o.hostname!==window.location.href.hostname&&["http:","https:"].includes(o.protocol)&&Ce(a,"blob").then(r=>{n.setAttribute("src",window.URL.createObjectURL(r))}).catch(()=>{te(n)})})}const e=Ze((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(s=>s.split("-")[0]));let i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();i==="auto"&&([i]=e);let t=this.storage.get("captions");if(l.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:i,languages:e}),this.isHTML5){const s=this.config.captions.update?"addtrack removetrack":"removetrack";x.call(this,this.media.textTracks,s,_.update.bind(this))}setTimeout(_.update.bind(this),0)},update(){const e=_.getTracks.call(this,!0),{active:i,language:t,meta:s,currentTrackNode:n}=this.captions,a=!!e.find(o=>o.language===t);this.isHTML5&&this.isVideo&&e.filter(o=>!s.get(o)).forEach(o=>{this.debug.log("Track added",o),s.set(o,{default:o.mode==="showing"}),o.mode==="showing"&&(o.mode="hidden"),x.call(this,o,"cuechange",()=>_.updateCues.call(this))}),(a&&this.language!==t||!e.includes(n))&&(_.setLanguage.call(this,t),_.toggle.call(this,i&&a)),this.elements&&M(this.elements.container,this.config.classNames.captions.enabled,!l.empty(e)),l.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this)},toggle(e,i=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,s=this.config.classNames.captions.active,n=l.nullOrUndefined(e)?!t:e;if(n!==t){if(i||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!i){const a=_.getTracks.call(this),o=_.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=o.language,void _.set.call(this,a.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),M(this.elements.container,s,n),this.captions.toggled=n,f.updateSetting.call(this,"captions"),A.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout(()=>{n&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,i=!0){const t=_.getTracks.call(this);if(e!==-1)if(l.number(e))if(e in t){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const s=t[e],{language:n}=s||{};this.captions.currentTrackNode=s,f.updateSetting.call(this,"captions"),i||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),A.call(this,this.media,"languagechange")}_.toggle.call(this,!0,i),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,i)},setLanguage(e,i=!0){if(!l.string(e))return void this.debug.warn("Invalid language argument",e);const t=e.toLowerCase();this.captions.language=t;const s=_.getTracks.call(this),n=_.findTrack.call(this,[t]);_.set.call(this,s.indexOf(n),i)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(i=>!this.isHTML5||e||this.captions.meta.has(i)).filter(i=>["captions","subtitles"].includes(i.kind))},findTrack(e,i=!1){const t=_.getTracks.call(this),s=o=>Number((this.captions.meta.get(o)||{}).default),n=Array.from(t).sort((o,r)=>s(r)-s(o));let a;return e.every(o=>(a=n.find(r=>r.language===o),!a)),a||(i?n[0]:void 0)},getCurrentTrack(){return _.getTracks.call(this)[this.currentTrack]},getLabel(e){let i=e;return!l.track(i)&&D.textTracks&&this.captions.toggled&&(i=_.getCurrentTrack.call(this)),l.track(i)?l.empty(i.label)?l.empty(i.language)?H.get("enabled",this.config):e.language.toUpperCase():i.label:H.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!l.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!l.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let i=e;if(!i){const s=_.getCurrentTrack.call(this);i=Array.from((s||{}).activeCues||[]).map(n=>n.getCueAsHTML()).map(da)}const t=i.map(s=>s.trim()).join(`
  2. `);if(t!==this.elements.captions.innerHTML){Fe(this.elements.captions);const s=k("span",Z(this.config.selectors.caption));s.innerHTML=t,this.elements.captions.appendChild(s),A.call(this,this.media,"cuechange")}}},Xt={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:[]}},We={active:"picture-in-picture",inactive:"inline"},ne={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Ye={audio:"audio",video:"video"};function pa(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?ne.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?ne.vimeo:null}const $e=()=>{};class ga{constructor(i=!1){this.enabled=window.console&&i,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):$e}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):$e}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):$e}}class Q{constructor(i){y(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;l.element(t)&&(t.pressed=this.active);const s=this.target===this.player.media?this.target:this.player.elements.container;A.call(this.player,s,this.active?"enterfullscreen":"exitfullscreen",!0)}),y(this,"toggleFallback",(t=!1)=>{var s,n;if(t?this.scrollPosition={x:(s=window.scrollX)!=null?s:0,y:(n=window.scrollY)!=null?n:0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",M(this.target,this.player.config.classNames.fullscreen.fallback,t),j.isIos){let a=document.head.querySelector('meta[name="viewport"]');const o="viewport-fit=cover";a||(a=document.createElement("meta"),a.setAttribute("name","viewport"));const r=l.string(a.content)&&a.content.includes(o);t?(this.cleanupViewport=!r,r||(a.content+=`,${o}`)):this.cleanupViewport&&(a.content=a.content.split(",").filter(u=>u.trim()!==o).join(","))}this.onChange()}),y(this,"trapFocus",t=>{if(j.isIos||j.isIPadOS||!this.active||t.key!=="Tab")return;const s=document.activeElement,n=be.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[a]=n,o=n[n.length-1];s!==o||t.shiftKey?s===a&&t.shiftKey&&(o.focus(),t.preventDefault()):(a.focus(),t.preventDefault())}),y(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Q.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");M(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),y(this,"enter",()=>{this.supported&&(j.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Q.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?l.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),y(this,"exit",()=>{if(this.supported)if(j.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),J(this.player.play());else if(!Q.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!l.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),y(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=i,this.prefix=Q.prefix,this.property=Q.property,this.scrollPosition={x:0,y:0},this.forceFallback=i.config.fullscreen.fallback==="force",this.player.elements.fullscreen=i.config.fullscreen.container&&ta(this.player.elements.container,i.config.fullscreen.container),x.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),x.call(this.player,this.player.elements.container,"dblclick",t=>{l.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),x.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 Q.nativeSupported&&!this.forceFallback}static get prefix(){if(l.function(document.exitFullscreen))return"";let i="";return["webkit","moz","ms"].some(t=>!(!l.function(document[`${t}ExitFullscreen`])&&!l.function(document[`${t}CancelFullScreen`]))&&(i=t,!0)),i}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Q.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Q.nativeSupported||!j.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Q.nativeSupported||this.forceFallback)return Be(this.target,this.player.config.classNames.fullscreen.fallback);const i=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return i&&i.shadowRoot?i===this.target.getRootNode().host:i===this.target}get target(){var i;return j.isIos&&this.player.config.fullscreen.iosNative?this.player.media:(i=this.player.elements.fullscreen)!=null?i:this.player.elements.container}}function xe(e,i=1){return new Promise((t,s)=>{const n=new Image,a=()=>{delete n.onload,delete n.onerror,(n.naturalWidth>=i?t:s)(n)};Object.assign(n,{onload:a,onerror:a,src:e})})}const L={addStyleHook(){M(this.elements.container,this.config.selectors.container.replace(".",""),!0),M(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 L.toggleNativeControls.call(this,!0);l.element(this.elements.controls)||(f.inject.call(this),this.listeners.controls()),L.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),L.checkPlaying.call(this),M(this.elements.container,this.config.classNames.pip.supported,D.pip&&this.isHTML5&&this.isVideo),M(this.elements.container,this.config.classNames.airplay.supported,D.airplay&&this.isHTML5),M(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{A.call(this,this.media,"ready")},0),L.setTitle.call(this),this.poster&&L.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&f.durationUpdate.call(this),this.config.mediaMetadata&&f.setMediaMetadata.call(this)},setTitle(){let e=H.get("play",this.config);if(l.string(this.config.title)&&!l.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(i=>{i.setAttribute("aria-label",e)}),this.isEmbed){const i=O.call(this,"iframe");if(!l.element(i))return;const t=l.empty(this.config.title)?"video":this.config.title,s=H.get("frameTitle",this.config);i.setAttribute("title",s.replace("{title}",t))}},togglePoster(e){M(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,i=!0){return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),na.call(this).then(()=>xe(e)).catch(t=>{throw e===this.poster&&L.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:""}),L.togglePoster.call(this,!0),e)))},checkPlaying(e){M(this.elements.container,this.config.classNames.playing,this.playing),M(this.elements.container,this.config.classNames.paused,this.paused),M(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(i=>{Object.assign(i,{pressed:this.playing}),i.setAttribute("aria-label",H.get(this.playing?"pause":"play",this.config))}),l.event(e)&&e.type==="timeupdate"||L.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{M(this.elements.container,this.config.classNames.loading,this.loading),L.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:i}=this.elements;if(i&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(e||this.loading||this.paused||i.pressed||i.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!l.empty(e)&&l.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),l.empty(this.media.style)&&this.media.removeAttribute("style")}};class fa{constructor(i){y(this,"firstTouch",()=>{const{player:t}=this,{elements:s}=t;t.touch=!0,M(s.container,t.config.classNames.isTouch,!0)}),y(this,"global",(t=!0)=>{const{player:s}=this;s.config.keyboard.global&&ve.call(s,window,"keydown keyup",this.handleKey,t,!1),ve.call(s,document.body,"click",this.toggleMenu,t),lt.call(s,document.body,"touchstart",this.firstTouch)}),y(this,"container",()=>{const{player:t}=this,{config:s,elements:n,timers:a}=t;!s.keyboard.global&&s.keyboard.focused&&x.call(t,n.container,"keydown keyup",this.handleKey,!1),x.call(t,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",u=>{const{controls:d}=n;d&&u.type==="enterfullscreen"&&(d.pressed=!1,d.hover=!1);let b=0;["touchstart","touchmove","mousemove"].includes(u.type)&&(L.toggleControls.call(t,!0),b=t.touch?3e3:2e3),clearTimeout(a.controls),a.controls=setTimeout(()=>L.toggleControls.call(t,!1),b)});const o=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const u=n.wrapper,{active:d}=t.fullscreen,[b,m]=ot.call(t),h=zt(`aspect-ratio: ${b} / ${m}`);if(!d)return void(h?(u.style.width=null,u.style.height=null):(u.style.maxWidth=null,u.style.margin=null));const[w,S]=aa(),T=w/S>b/m;h?(u.style.width=T?"auto":"100%",u.style.height=T?"100%":"auto"):(u.style.maxWidth=T?S/m*b+"px":null,u.style.margin=T?"0 auto":null)},r=()=>{clearTimeout(a.resized),a.resized=setTimeout(o,50)};x.call(t,n.container,"enterfullscreen exitfullscreen",u=>{const{target:d}=t.fullscreen;d===n.container&&(!t.isEmbed&&l.empty(t.config.ratio)||(o(),(u.type==="enterfullscreen"?x:Oe).call(t,window,"resize",r)))})}),y(this,"media",()=>{const{player:t}=this,{elements:s}=t;if(x.call(t,t.media,"timeupdate seeking seeked",a=>f.timeUpdate.call(t,a)),x.call(t,t.media,"durationchange loadeddata loadedmetadata",a=>f.durationUpdate.call(t,a)),x.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),x.call(t,t.media,"progress playing seeking seeked",a=>f.updateProgress.call(t,a)),x.call(t,t.media,"volumechange",a=>f.updateVolume.call(t,a)),x.call(t,t.media,"playing play pause ended emptied timeupdate",a=>L.checkPlaying.call(t,a)),x.call(t,t.media,"waiting canplay seeked playing",a=>L.checkLoading.call(t,a)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const a=O.call(t,`.${t.config.classNames.video}`);if(!l.element(a))return;x.call(t,s.container,"click",o=>{([s.container,a].includes(o.target)||a.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(o,t.restart,"restart"),this.proxy(o,()=>{J(t.play())},"play")):this.proxy(o,()=>{J(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&x.call(t,s.wrapper,"contextmenu",a=>{a.preventDefault()},!1),x.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),x.call(t,t.media,"ratechange",()=>{f.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),x.call(t,t.media,"qualitychange",a=>{f.updateSetting.call(t,"quality",null,a.detail.quality)}),x.call(t,t.media,"ready qualitychange",()=>{f.setDownloadUrl.call(t)});const n=t.config.events.concat(["keyup","keydown"]).join(" ");x.call(t,t.media,n,a=>{let{detail:o={}}=a;a.type==="error"&&(o=t.media.error),A.call(t,s.container,a.type,!0,o)})}),y(this,"proxy",(t,s,n)=>{const{player:a}=this,o=a.config.listeners[n];let r=!0;l.function(o)&&(r=o.call(a,t)),r!==!1&&l.function(s)&&s.call(a,t)}),y(this,"bind",(t,s,n,a,o=!0)=>{const{player:r}=this,u=r.config.listeners[a],d=l.function(u);x.call(r,t,s,b=>this.proxy(b,n,a),o&&!d)}),y(this,"controls",()=>{const{player:t}=this,{elements:s}=t,n=j.isIE?"change":"input";if(s.buttons.play&&Array.from(s.buttons.play).forEach(a=>{this.bind(a,"click",()=>{J(t.togglePlay())},"play")}),this.bind(s.buttons.restart,"click",t.restart,"restart"),this.bind(s.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(s.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(s.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(s.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(s.buttons.download,"click",()=>{A.call(t,t.media,"download")},"download"),this.bind(s.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(s.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(s.buttons.airplay,"click",t.airplay,"airplay"),this.bind(s.buttons.settings,"click",a=>{a.stopPropagation(),a.preventDefault(),f.toggleMenu.call(t,a)},null,!1),this.bind(s.buttons.settings,"keyup",a=>{[" ","Enter"].includes(a.key)&&(a.key!=="Enter"?(a.preventDefault(),a.stopPropagation(),f.toggleMenu.call(t,a)):f.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(s.settings.menu,"keydown",a=>{a.key==="Escape"&&f.toggleMenu.call(t,a)}),this.bind(s.inputs.seek,"mousedown mousemove",a=>{const o=s.progress.getBoundingClientRect(),r=100/o.width*(a.pageX-o.left);a.currentTarget.setAttribute("seek-value",r)}),this.bind(s.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",a=>{const o=a.currentTarget,r="play-on-seeked";if(l.keyboardEvent(a)&&!["ArrowLeft","ArrowRight"].includes(a.key))return;t.lastSeekTime=Date.now();const u=o.hasAttribute(r),d=["mouseup","touchend","keyup"].includes(a.type);u&&d?(o.removeAttribute(r),J(t.play())):!d&&t.playing&&(o.setAttribute(r,""),t.pause())}),j.isIos){const a=be.call(t,'input[type="range"]');Array.from(a).forEach(o=>this.bind(o,n,r=>Ot(r.target)))}this.bind(s.inputs.seek,n,a=>{const o=a.currentTarget;let r=o.getAttribute("seek-value");l.empty(r)&&(r=o.value),o.removeAttribute("seek-value"),t.currentTime=r/o.max*t.duration},"seek"),this.bind(s.progress,"mouseenter mouseleave mousemove",a=>f.updateSeekTooltip.call(t,a)),this.bind(s.progress,"mousemove touchmove",a=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startMove(a)}),this.bind(s.progress,"mouseleave touchend click",()=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.endMove(!1,!0)}),this.bind(s.progress,"mousedown touchstart",a=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startScrubbing(a)}),this.bind(s.progress,"mouseup touchend",a=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endScrubbing(a)}),j.isWebKit&&Array.from(be.call(t,'input[type="range"]')).forEach(a=>{this.bind(a,"input",o=>f.updateRangeFill.call(t,o.target))}),t.config.toggleInvert&&!l.element(s.display.duration)&&this.bind(s.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,f.timeUpdate.call(t))}),this.bind(s.inputs.volume,n,a=>{t.volume=a.target.value},"volume"),this.bind(s.controls,"mouseenter mouseleave",a=>{s.controls.hover=!t.touch&&a.type==="mouseenter"}),s.fullscreen&&Array.from(s.fullscreen.children).filter(a=>!a.contains(s.container)).forEach(a=>{this.bind(a,"mouseenter mouseleave",o=>{s.controls&&(s.controls.hover=!t.touch&&o.type==="mouseenter")})}),this.bind(s.controls,"mousedown mouseup touchstart touchend touchcancel",a=>{s.controls.pressed=["mousedown","touchstart"].includes(a.type)}),this.bind(s.controls,"focusin",()=>{const{config:a,timers:o}=t;M(s.controls,a.classNames.noTransition,!0),L.toggleControls.call(t,!0),setTimeout(()=>{M(s.controls,a.classNames.noTransition,!1)},0);const r=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>L.toggleControls.call(t,!1),r)}),this.bind(s.inputs.volume,"wheel",a=>{const o=a.webkitDirectionInvertedFromDevice,[r,u]=[a.deltaX,-a.deltaY].map(m=>o?-m:m),d=Math.sign(Math.abs(r)>Math.abs(u)?r:u);t.increaseVolume(d/50);const{volume:b}=t.media;(d===1&&b<1||d===-1&&b>0)&&a.preventDefault()},"volume",!1)}),this.player=i,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(i){const{player:t}=this,{elements:s}=t,{key:n,type:a,altKey:o,ctrlKey:r,metaKey:u,shiftKey:d}=i,b=a==="keydown",m=b&&n===this.lastKey;if(!(o||r||u||d)&&n){if(b){const w=document.activeElement;if(l.element(w)){const{editable:S}=t.config.selectors,{seek:T}=s.inputs;if(w!==T&&ue(w,S)||i.key===" "&&ue(w,'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(n)&&(i.preventDefault(),i.stopPropagation()),n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m||(h=parseInt(n,10),t.currentTime=t.duration/10*h);break;case" ":case"k":m||J(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":m||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":m||t.toggleCaptions();break;case"l":t.loop=!t.loop}n==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null;var h}}toggleMenu(i){f.toggleMenu.call(this.player,i)}}function ya(e,i){return e(i={exports:{}},i.exports),i.exports}var ba=ya(function(e,i){e.exports=function(){var t=function(){},s={},n={},a={};function o(h,w){h=h.push?h:[h];var S,T,E,g=[],p=h.length,C=p;for(S=function(F,B){B.length&&g.push(F),--C||w(g)};p--;)T=h[p],(E=n[T])?S(T,E):(a[T]=a[T]||[]).push(S)}function r(h,w){if(h){var S=a[h];if(n[h]=w,S)for(;S.length;)S[0](h,w),S.splice(0,1)}}function u(h,w){h.call&&(h={success:h}),w.length?(h.error||t)(w):(h.success||t)(h)}function d(h,w,S,T){var E,g,p=document,C=S.async,F=(S.numRetries||0)+1,B=S.before||t,N=h.replace(/[\?|#].*$/,""),R=h.replace(/^(css|img)!/,"");T=T||0,/(^css!|\.css$)/.test(N)?((g=p.createElement("link")).rel="stylesheet",g.href=R,(E="hideFocus"in g)&&g.relList&&(E=0,g.rel="preload",g.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(N)?(g=p.createElement("img")).src=R:((g=p.createElement("script")).src=h,g.async=C===void 0||C),g.onload=g.onerror=g.onbeforeload=function($){var W=$.type[0];if(E)try{g.sheet.cssText.length||(W="e")}catch(le){le.code!=18&&(W="e")}if(W=="e"){if((T+=1)<F)return d(h,w,S,T)}else if(g.rel=="preload"&&g.as=="style")return g.rel="stylesheet";w(h,W,$.defaultPrevented)},B(h,g)!==!1&&p.head.appendChild(g)}function b(h,w,S){var T,E,g=(h=h.push?h:[h]).length,p=g,C=[];for(T=function(F,B,N){if(B=="e"&&C.push(F),B=="b"){if(!N)return;C.push(F)}--g||w(C)},E=0;E<p;E++)d(h[E],T,S)}function m(h,w,S){var T,E;if(w&&w.trim&&(T=w),E=(T?S:w)||{},T){if(T in s)throw"LoadJS";s[T]=!0}function g(p,C){b(h,function(F){u(E,F),p&&u({success:p,error:C},F),r(T,F)},E)}if(E.returnPromise)return new Promise(g);g()}return m.ready=function(h,w){return o(h,function(S){u(w,S)}),m},m.done=function(h){r(h,[])},m.reset=function(){s={},n={},a={}},m.isDefined=function(h){return h in s},m}()});function rt(e){return new Promise((i,t)=>{ba(e,{success:i,error:t})})}function va(e){return l.empty(e)?null:l.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function wa(e){const i=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return i&&i.length===5?i[4]:null}function pe(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,A.call(this,this.media,e?"play":"pause"))}const et={setup(){const e=this;M(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,me.call(e),l.object(window.Vimeo)?et.ready.call(e):rt(e.config.urls.vimeo.sdk).then(()=>{et.ready.call(e)}).catch(i=>{e.debug.warn("Vimeo SDK (player.js) failed to load",i)})},ready(){const e=this,i=e.config.vimeo,{premium:t,referrerPolicy:s,...n}=i;let a=e.media.getAttribute("src"),o="";l.empty(a)?(a=e.media.getAttribute(e.config.attributes.embed.id),o=e.media.getAttribute(e.config.attributes.embed.hash)):o=wa(a);const r=o?{h:o}:{};t&&Object.assign(n,{controls:!1,sidedock:!1});const u=Qt({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...r,...n}),d=va(a),b=k("iframe"),m=Je(e.config.urls.vimeo.iframe,d,u);if(b.setAttribute("src",m),b.setAttribute("allowfullscreen",""),b.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),l.empty(s)||b.setAttribute("referrerPolicy",s),t||!i.customControls)b.setAttribute("data-poster",e.poster),e.media=Le(b,e.media);else{const p=k("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});p.appendChild(b),e.media=Le(p,e.media)}i.customControls||Ce(Je(e.config.urls.vimeo.api,m)).then(p=>{!l.empty(p)&&p.thumbnail_url&&L.setPoster.call(e,p.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(b,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(pe.call(e,!0),e.embed.play()),e.media.pause=()=>(pe.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:h}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>h,set(p){const{embed:C,media:F,paused:B,volume:N}=e,R=B&&!C.hasPlayed;F.seeking=!0,A.call(e,F,"seeking"),Promise.resolve(R&&C.setVolume(0)).then(()=>C.setCurrentTime(p)).then(()=>R&&C.pause()).then(()=>R&&C.setVolume(N)).catch(()=>{})}});let w=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>w,set(p){e.embed.setPlaybackRate(p).then(()=>{w=p,A.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:S}=e.config;Object.defineProperty(e.media,"volume",{get:()=>S,set(p){e.embed.setVolume(p).then(()=>{S=p,A.call(e,e.media,"volumechange")})}});let{muted:T}=e.config;Object.defineProperty(e.media,"muted",{get:()=>T,set(p){const C=!!l.boolean(p)&&p;e.embed.setMuted(!!C||e.config.muted).then(()=>{T=C,A.call(e,e.media,"volumechange")})}});let E,{loop:g}=e.config;Object.defineProperty(e.media,"loop",{get:()=>g,set(p){const C=l.boolean(p)?p:e.config.loop.active;e.embed.setLoop(C).then(()=>{g=C})}}),e.embed.getVideoUrl().then(p=>{E=p,f.setDownloadUrl.call(e)}).catch(p=>{this.debug.warn(p)}),Object.defineProperty(e.media,"currentSrc",{get:()=>E}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(p=>{const[C,F]=p;e.embed.ratio=Ut(C,F),me.call(this)}),e.embed.setAutopause(e.config.autopause).then(p=>{e.config.autopause=p}),e.embed.getVideoTitle().then(p=>{e.config.title=p,L.setTitle.call(this)}),e.embed.getCurrentTime().then(p=>{h=p,A.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(p=>{e.media.duration=p,A.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(p=>{e.media.textTracks=p,_.setup.call(e)}),e.embed.on("cuechange",({cues:p=[]})=>{const C=p.map(F=>ua(F.text));_.updateCues.call(e,C)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(p=>{pe.call(e,!p),p||A.call(e,e.media,"playing")}),l.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{A.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{A.call(e,e.media,"playing")}),e.embed.on("play",()=>{pe.call(e,!0),A.call(e,e.media,"playing")}),e.embed.on("pause",()=>{pe.call(e,!1)}),e.embed.on("timeupdate",p=>{e.media.seeking=!1,h=p.seconds,A.call(e,e.media,"timeupdate")}),e.embed.on("progress",p=>{e.media.buffered=p.percent,A.call(e,e.media,"progress"),parseInt(p.percent,10)===1&&A.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(C=>{C!==e.media.duration&&(e.media.duration=C,A.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,A.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,A.call(e,e.media,"ended")}),e.embed.on("error",p=>{e.media.error=p,A.call(e,e.media,"error")}),i.customControls&&setTimeout(()=>L.build.call(e),0)}};function Ta(e){return l.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function ge(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,A.call(this,this.media,e?"play":"pause"))}function ka(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const _e={setup(){if(M(this.elements.wrapper,this.config.classNames.embed,!0),l.object(window.YT)&&l.function(window.YT.Player))_e.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{l.function(e)&&e(),_e.ready.call(this)},rt(this.config.urls.youtube.sdk).catch(i=>{this.debug.warn("YouTube API failed to load",i)})}},getTitle(e){Ce(Je(this.config.urls.youtube.api,e)).then(i=>{if(l.object(i)){const{title:t,height:s,width:n}=i;this.config.title=t,L.setTitle.call(this),this.embed.ratio=Ut(n,s)}me.call(this)}).catch(()=>{me.call(this)})},ready(){const e=this,i=e.config.youtube,t=e.media&&e.media.getAttribute("id");if(!l.empty(t)&&t.startsWith("youtube-"))return;let s=e.media.getAttribute("src");l.empty(s)&&(s=e.media.getAttribute(this.config.attributes.embed.id));const n=Ta(s),a=k("div",{id:la(e.provider),"data-poster":i.customControls?e.poster:void 0});if(e.media=Le(a,e.media),i.customControls){const o=r=>`https://i.ytimg.com/vi/${n}/${r}default.jpg`;xe(o("maxres"),121).catch(()=>xe(o("sd"),121)).catch(()=>xe(o("hq"))).then(r=>L.setPoster.call(e,r.src)).then(r=>{r.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:n,host:ka(i),playerVars:I({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&i.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},i),events:{onError(o){if(!e.media.error){const r=o.data,u={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."}[r]||"An unknown error occurred";e.media.error={code:r,message:u},A.call(e,e.media,"error")}},onPlaybackRateChange(o){const r=o.target;e.media.playbackRate=r.getPlaybackRate(),A.call(e,e.media,"ratechange")},onReady(o){if(l.function(e.media.play))return;const r=o.target;_e.getTitle.call(e,n),e.media.play=()=>{ge.call(e,!0),r.playVideo()},e.media.pause=()=>{ge.call(e,!1),r.pauseVideo()},e.media.stop=()=>{r.stopVideo()},e.media.duration=r.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(r.getCurrentTime()),set(m){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,A.call(e,e.media,"seeking"),r.seekTo(m)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>r.getPlaybackRate(),set(m){r.setPlaybackRate(m)}});let{volume:u}=e.config;Object.defineProperty(e.media,"volume",{get:()=>u,set(m){u=m,r.setVolume(100*u),A.call(e,e.media,"volumechange")}});let{muted:d}=e.config;Object.defineProperty(e.media,"muted",{get:()=>d,set(m){const h=l.boolean(m)?m:d;d=h,r[h?"mute":"unMute"](),r.setVolume(100*u),A.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>r.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const b=r.getAvailablePlaybackRates();e.options.speed=b.filter(m=>e.config.speed.options.includes(m)),e.supported.ui&&i.customControls&&e.media.setAttribute("tabindex",-1),A.call(e,e.media,"timeupdate"),A.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=r.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&A.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),A.call(e,e.media,"canplaythrough"))},200),i.customControls&&setTimeout(()=>L.build.call(e),50)},onStateChange(o){const r=o.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(o.data)&&(e.media.seeking=!1,A.call(e,e.media,"seeked")),o.data){case-1:A.call(e,e.media,"timeupdate"),e.media.buffered=r.getVideoLoadedFraction(),A.call(e,e.media,"progress");break;case 0:ge.call(e,!1),e.media.loop?(r.stopVideo(),r.playVideo()):A.call(e,e.media,"ended");break;case 1:i.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(ge.call(e,!0),A.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{A.call(e,e.media,"timeupdate")},50),e.media.duration!==r.getDuration()&&(e.media.duration=r.getDuration(),A.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),ge.call(e,!1);break;case 3:A.call(e,e.media,"waiting")}A.call(e,e.elements.container,"statechange",!1,{code:o.data})}}})}},Kt={setup(){this.media?(M(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),M(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&M(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=k("div",{class:this.config.classNames.video}),jt(this.media,this.elements.wrapper),this.elements.poster=k("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?ae.setup.call(this):this.isYouTube?_e.setup.call(this):this.isVimeo&&et.setup.call(this)):this.debug.warn("No media element found!")}};class Aa{constructor(i){y(this,"load",()=>{this.enabled&&(l.object(window.google)&&l.object(window.google.ima)?this.ready():rt(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),y(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()}),y(this,"setupIMA",()=>{this.elements.container=k("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()}),y(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const s=new google.ima.AdsRequest;s.adTagUrl=this.tagUrl,s.linearAdSlotWidth=t.offsetWidth,s.linearAdSlotHeight=t.offsetHeight,s.nonLinearAdSlotWidth=t.offsetWidth,s.nonLinearAdSlotHeight=t.offsetHeight,s.forceNonLinearFullSlot=!1,s.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(s)}catch(s){this.onAdError(s)}}),y(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const s=He(Math.max(this.manager.getRemainingTime(),0)),n=`${H.get("advertisement",this.player.config)} - ${s}`;this.elements.container.setAttribute("data-badge-text",n)},100)}),y(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const s=new google.ima.AdsRenderingSettings;s.restoreCustomPlaybackStateOnAdBreakComplete=!0,s.enablePreloading=!0,this.manager=t.getAdsManager(this.player,s),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,n=>this.onAdError(n)),Object.keys(google.ima.AdEvent.Type).forEach(n=>{this.manager.addEventListener(google.ima.AdEvent.Type[n],a=>this.onAdEvent(a))}),this.trigger("loaded")}),y(this,"addCuePoints",()=>{l.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const s=this.player.elements.progress;if(l.element(s)){const n=100/this.player.duration*t,a=k("span",{class:this.player.config.classNames.cues});a.style.left=`${n.toString()}%`,s.appendChild(a)}}})}),y(this,"onAdEvent",t=>{const{container:s}=this.player.elements,n=t.getAd(),a=t.getAdData();switch((o=>{A.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=s.offsetWidth,n.height=s.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:a.adError&&this.player.debug.warn(`Non-fatal ad error: ${a.adError.getMessage()}`)}}),y(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),y(this,"listeners",()=>{const{container:t}=this.player.elements;let s;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{s=this.player.currentTime}),this.player.on("seeked",()=>{const n=this.player.currentTime;l.empty(this.cuePoints)||this.cuePoints.forEach((a,o)=>{s<a&&a<n&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),y(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(s){this.onAdError(s)}}).catch(()=>{})}),y(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,J(this.player.media.play())}),y(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),y(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),y(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(()=>{})}),y(this,"trigger",(t,...s)=>{const n=this.events[t];l.array(n)&&n.forEach(a=>{l.function(a)&&a.apply(this,s)})}),y(this,"on",(t,s)=>(l.array(this.events[t])||(this.events[t]=[]),this.events[t].push(s),this)),y(this,"startSafetyTimer",(t,s)=>{this.player.debug.log(`Safety timer invoked from: ${s}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),y(this,"clearSafetyTimer",t=>{l.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=i,this.config=i.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,s)=>{this.on("loaded",t),this.on("error",s)}),this.load()}get enabled(){const{config:i}=this;return this.player.isHTML5&&this.player.isVideo&&i.enabled&&(!l.empty(i.publisherId)||l.url(i.tagUrl))}get tagUrl(){const{config:i}=this;return l.url(i.tagUrl)?i.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Qt({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:i.publisherId})}`}}function Zt(e=0,i=0,t=255){return Math.min(Math.max(e,i),t)}const Ca=e=>{const i=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const s={};t.split(/\r\n|\n|\r/).forEach(n=>{if(l.number(s.startTime)){if(!l.empty(n.trim())&&l.empty(s.text)){const a=n.trim().split("#xywh=");[s.text]=a,a[1]&&([s.x,s.y,s.w,s.h]=a[1].split(","))}}else{const a=n.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})/);a&&(s.startTime=60*Number(a[1]||0)*60+60*Number(a[2])+Number(a[3])+ +`0.${a[4]}`,s.endTime=60*Number(a[6]||0)*60+60*Number(a[7])+Number(a[8])+ +`0.${a[9]}`)}}),s.text&&i.push(s)}),i},St=(e,i)=>{const t={};return e>i.width/i.height?(t.width=i.width,t.height=1/e*i.width):(t.height=i.height,t.width=e*i.height),t};class tt{constructor(i){y(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)})}),y(this,"getThumbnails",()=>new Promise(t=>{const{src:s}=this.player.config.previewThumbnails;if(l.empty(s))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort((a,o)=>a.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(l.function(s))s(a=>{this.thumbnails=a,n()});else{const a=(l.string(s)?[s]:s).map(o=>this.getThumbnail(o));Promise.all(a).then(n)}})),y(this,"getThumbnail",t=>new Promise(s=>{Ce(t).then(n=>{const a={frames:Ca(n),height:null,urlPrefix:""};a.frames[0].text.startsWith("/")||a.frames[0].text.startsWith("http://")||a.frames[0].text.startsWith("https://")||(a.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{a.height=o.naturalHeight,a.width=o.naturalWidth,this.thumbnails.push(a),s()},o.src=a.urlPrefix+a.frames[0].text})})),y(this,"startMove",t=>{if(this.loaded&&l.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 s,n;const a=this.player.elements.progress.getBoundingClientRect(),o=100/a.width*(t.pageX-a.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=He(this.seekTime);const r=(s=this.player.config.markers)===null||s===void 0||(n=s.points)===null||n===void 0?void 0:n.find(({time:u})=>u===Math.round(this.seekTime));r&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${r.label}<br>`)}this.showImageAtCurrentTime()}}),y(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),y(this,"startScrubbing",t=>{(l.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()))}),y(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):lt.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),y(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})}),y(this,"render",()=>{this.elements.thumb.container=k("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=k("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=k("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=k("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),l.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=k("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),y(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),y(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(a=>this.seekTime>=a.startTime&&this.seekTime<=a.endTime),s=t>=0;let n=0;this.mouseDown||this.toggleThumbContainer(s),s&&(this.thumbnails.forEach((a,o)=>{this.loadedImages.includes(a.frames[t].text)&&(n=o)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(n)))}),y(this,"loadImage",(t=0)=>{const s=this.showingThumb,n=this.thumbnails[t],{urlPrefix:a}=n,o=n.frames[s],r=n.frames[s].text,u=a+r;if(this.currentImageElement&&this.currentImageElement.dataset.filename===r)this.showImage(this.currentImageElement,o,t,s,r,!1),this.currentImageElement.dataset.index=s,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const d=new Image;d.src=u,d.dataset.index=s,d.dataset.filename=r,this.showingThumbFilename=r,this.player.debug.log(`Loading image: ${u}`),d.onload=()=>this.showImage(d,o,t,s,r,!0),this.loadingImage=d,this.removeOldImages(d)}}),y(this,"showImage",(t,s,n,a,o,r=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${a}. qual: ${n}. newimg: ${r}`),this.setImageSizeAndOffset(t,s),r&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(a,!0).then(this.preloadNearby(a,!1)).then(this.getHigherQuality(n,t,s,o))}),y(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(s=>{if(s.tagName.toLowerCase()!=="img")return;const n=this.usingSprites?500:1e3;if(s.dataset.index!==t.dataset.index&&!s.dataset.deleting){s.dataset.deleting=!0;const{currentImageContainer:a}=this;setTimeout(()=>{a.removeChild(s),this.player.debug.log(`Removing thumb: ${s.dataset.filename}`)},n)}})}),y(this,"preloadNearby",(t,s=!0)=>new Promise(n=>{setTimeout(()=>{const a=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===a){let o;o=s?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let r=!1;o.forEach(u=>{const d=u.text;if(d!==a&&!this.loadedImages.includes(d)){r=!0,this.player.debug.log(`Preloading thumb filename: ${d}`);const{urlPrefix:b}=this.thumbnails[0],m=b+d,h=new Image;h.src=m,h.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${d}`),this.loadedImages.includes(d)||this.loadedImages.push(d),n()}}}),r||n()}},300)})),y(this,"getHigherQuality",(t,s,n,a)=>{if(t<this.thumbnails.length-1){let o=s.naturalHeight;this.usingSprites&&(o=n.h),o<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===a&&(this.player.debug.log(`Showing higher quality thumb for: ${a}`),this.loadImage(t+1))},300)}}),y(this,"toggleThumbContainer",(t=!1,s=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,t),!t&&s&&(this.showingThumb=null,this.showingThumbFilename=null)}),y(this,"toggleScrubbingContainer",(t=!1)=>{const s=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(s,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),y(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),y(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const s=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${s}px`}else if(t.clientHeight<20&&t.clientWidth>20){const s=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${s}px`}}else{const s=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${s}px`}this.setThumbContainerPos()}),y(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),s=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,a=s.left-t.left+10,o=s.right-t.left-n.clientWidth-10,r=this.mousePosX-t.left-n.clientWidth/2,u=Zt(r,a,o);n.style.left=`${u}px`,n.style.setProperty("--preview-arrow-offset",r-u+"px")}),y(this,"setScrubbingContainerSize",()=>{const{width:t,height:s}=St(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=`${s}px`}),y(this,"setImageSizeAndOffset",(t,s)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/s.h;t.style.height=t.naturalHeight*n+"px",t.style.width=t.naturalWidth*n+"px",t.style.left=`-${s.x*n}px`,t.style.top=`-${s.y*n}px`}),this.player=i,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:i}=St(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return i}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(i){this.mouseDown?this.currentScrubbingImageElement=i:this.currentThumbnailImageElement=i}}const it={insertElements(e,i){l.string(i)?Tt(e,this.media,{src:i}):l.array(i)&&i.forEach(t=>{Tt(e,this.media,t)})},change(e){Ht(e,"sources.length")?(ae.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],te(this.media),this.media=null,l.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:i,type:t}=e,[{provider:s=ne.html5,src:n}]=i,a=s==="html5"?t:"div",o=s==="html5"?{}:{src:n};Object.assign(this,{provider:s,type:t,supported:D.check(t,s,this.config.playsinline),media:k(a,o)}),this.elements.container.appendChild(this.media),l.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),l.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","")),L.addStyleHook.call(this),this.isHTML5&&it.insertElements.call(this,"source",i),this.config.title=e.title,Kt.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&it.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&L.build.call(this),this.isHTML5&&this.media.load(),l.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 tt(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Te{constructor(i,t){if(y(this,"play",()=>l.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>J(this.media.play())),this.media.play()):null),y(this,"pause",()=>this.playing&&l.function(this.media.pause)?this.media.pause():null),y(this,"togglePlay",r=>(l.boolean(r)?r:!this.playing)?this.play():this.pause()),y(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):l.function(this.media.stop)&&this.media.stop()}),y(this,"restart",()=>{this.currentTime=0}),y(this,"rewind",r=>{this.currentTime-=l.number(r)?r:this.config.seekTime}),y(this,"forward",r=>{this.currentTime+=l.number(r)?r:this.config.seekTime}),y(this,"increaseVolume",r=>{const u=this.media.muted?0:this.volume;this.volume=u+(l.number(r)?r:0)}),y(this,"decreaseVolume",r=>{this.increaseVolume(-r)}),y(this,"airplay",()=>{D.airplay&&this.media.webkitShowPlaybackTargetPicker()}),y(this,"toggleControls",r=>{if(this.supported.ui&&!this.isAudio){const u=Be(this.elements.container,this.config.classNames.hideControls),d=r===void 0?void 0:!r,b=M(this.elements.container,this.config.classNames.hideControls,d);if(b&&l.array(this.config.controls)&&this.config.controls.includes("settings")&&!l.empty(this.config.settings)&&f.toggleMenu.call(this,!1),b!==u){const m=b?"controlshidden":"controlsshown";A.call(this,this.media,m)}return!b}return!1}),y(this,"on",(r,u)=>{x.call(this,this.elements.container,r,u)}),y(this,"once",(r,u)=>{lt.call(this,this.elements.container,r,u)}),y(this,"off",(r,u)=>{Oe(this.elements.container,r,u)}),y(this,"destroy",(r,u=!1)=>{if(!this.ready)return;const d=()=>{document.body.style.overflow="",this.embed=null,u?(Object.keys(this.elements).length&&(te(this.elements.buttons.play),te(this.elements.captions),te(this.elements.controls),te(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),l.function(r)&&r()):(sa.call(this),ae.cancelRequests.call(this),Le(this.elements.original,this.elements.container),A.call(this,this.elements.original,"destroyed",!0),l.function(r)&&r.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?(L.toggleNativeControls.call(this,!0),d()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&l.function(this.embed.destroy)&&this.embed.destroy(),d()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(d),setTimeout(d,200))}),y(this,"supports",r=>D.mime.call(this,r)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=D.touch,this.media=i,l.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||l.nodeList(this.media)||l.array(this.media))&&(this.media=this.media[0]),this.config=I({},Xt,Te.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(r){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 ga(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",D),l.nullOrUndefined(this.media)||!l.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(!D.check().api)return void this.debug.error("Setup failed: no support");const s=this.media.cloneNode(!0);s.autoplay=!1,this.elements.original=s;const n=this.media.tagName.toLowerCase();let a=null,o=null;switch(n){case"div":if(a=this.media.querySelector("iframe"),l.element(a)){if(o=Gt(a.getAttribute("src")),this.provider=pa(o.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",o.search.length){const r=["1","true"];r.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),r.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=r.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(l.empty(this.provider)||!Object.values(ne).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Ye.video;break;case"video":case"audio":this.type=n,this.provider=ne.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=D.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new fa(this),this.storage=new we(this),this.media.plyr=this,l.element(this.elements.container)||(this.elements.container=k("div"),jt(this.media,this.elements.container)),L.migrateStyles.call(this),L.addStyleHook.call(this),Kt.setup.call(this),this.config.debug&&x.call(this,this.elements.container,this.config.events.join(" "),r=>{this.debug.log(`event: ${r.type}`)}),this.fullscreen=new Q(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&L.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Aa(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>J(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new tt(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===ne.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===ne.youtube}get isVimeo(){return this.provider===ne.vimeo}get isVideo(){return this.type===Ye.video}get isAudio(){return this.type===Ye.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(i){if(!this.duration)return;const t=l.number(i)&&i>0;this.media.currentTime=t?Math.min(i,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:i}=this.media;return l.number(i)?i:i&&i.length&&this.duration>0?i.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const i=parseFloat(this.config.duration),t=(this.media||{}).duration,s=l.number(t)&&t!==1/0?t:0;return i||s}set volume(i){let t=i;l.string(t)&&(t=Number(t)),l.number(t)||(t=this.storage.get("volume")),l.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!l.empty(i)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(i){let t=i;l.boolean(t)||(t=this.storage.get("muted")),l.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(i){let t=null;l.number(i)&&(t=i),l.number(t)||(t=this.storage.get("speed")),l.number(t)||(t=this.config.speed.selected);const{minimumSpeed:s,maximumSpeed:n}=this;t=Zt(t,s,n),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(i){const t=this.config.quality,s=this.options.quality;if(!s.length)return;let n=[!l.empty(i)&&Number(i),this.storage.get("quality"),t.selected,t.default].find(l.number),a=!0;if(!s.includes(n)){const o=Vt(s,n);this.debug.warn(`Unsupported quality option: ${n}, using ${o} instead`),n=o,a=!1}t.selected=n,this.media.quality=n,a&&this.storage.set({quality:n})}get quality(){return this.media.quality}set loop(i){const t=l.boolean(i)?i:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(i){it.change.call(this,i)}get source(){return this.media.currentSrc}get download(){const{download:i}=this.config.urls;return l.url(i)?i:this.source}set download(i){l.url(i)&&(this.config.urls.download=i,f.setDownloadUrl.call(this))}set poster(i){this.isVideo?L.setPoster.call(this,i,!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 i=Ne(ot.call(this));return l.array(i)?i.join(":"):i}set ratio(i){this.isVideo?l.string(i)&&qt(i)?(this.config.ratio=Ne(i),me.call(this)):this.debug.error(`Invalid aspect ratio specified (${i})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(i){this.config.autoplay=l.boolean(i)?i:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(i){_.toggle.call(this,i,!1)}set currentTrack(i){_.set.call(this,i,!1),_.setup.call(this)}get currentTrack(){const{toggled:i,currentTrack:t}=this.captions;return i?t:-1}set language(i){_.setLanguage.call(this,i,!1)}get language(){return(_.getCurrentTrack.call(this)||{}).language}set pip(i){if(!D.pip)return;const t=l.boolean(i)?i:!this.pip;l.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?We.active:We.inactive),l.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return D.pip?l.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===We.active:null}setPreviewThumbnails(i){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,i),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new tt(this))}static supported(i,t){return D.check(i,t)}static loadSprite(i,t){return Yt(i,t)}static setup(i,t={}){let s=null;return l.string(i)?s=Array.from(document.querySelectorAll(i)):l.nodeList(i)?s=Array.from(i):l.array(i)&&(s=i.filter(l.element)),l.empty(s)?null:s.map(n=>new Te(n,t))}}Te.defaults=Jn(Xt);const V=Y({name:"NoteSvg",props:{fill:String,shadow:{type:Boolean,defalut:!1},shadowFill:{type:String,default:""},x:{type:Number,default:0},y:{type:Number,default:0}},render(){return c("svg",{width:"14",height:"24",viewBox:"0 0 14 24"},[c("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[c("rect",{x:"0",y:"0",width:"14",height:"24"},null),c("g",{fill:this.fill},[this.shadow&&c("ellipse",{fill:this.shadowFill||this.fill,transform:`translate(4.685927, 18.917813) scale(-1, -1) rotate(-32.000000) translate(${this.x+-4.685927}, ${this.y+-18.917813})`,cx:"4.68592654",cy:"18.9178127",rx:"3.70078457",ry:"2.92022453"},null),c("path",{d:"M1.95251677,0.68258909 C3.68583115,-0.400505943 5.78379192,-0.169765229 6.63844331,1.1979629 C7.4930947,2.56569103 6.78079761,4.55247575 5.04748323,5.63557079 C3.85503595,6.38069455 2.49000663,6.50399819 1.47594704,6.06306368 L1.47635248,22.0768926 L0.0162402201,22.0768926 L0.0154715991,4.11169688 C-0.117424115,2.8976469 0.612367024,1.52000759 1.95251677,0.68258909 Z",transform:"scale(-1, -1) translate(-10, -23) "},null)])])])}}),Sa="_container_1rrce_1",Pa="_noticeBar_1rrce_10",Ea="_pcContainer_1rrce_14",Fa="_icon_1rrce_17",xa="_status_1rrce_22",Ge={container:Sa,noticeBar:Pa,pcContainer:Ea,icon:Fa,status:xa},_a=Y({name:"detail-title",props:{text:{type:String,default:""},rightView:{type:Boolean,default:!0},onClick:{type:Function}},render(){return c("div",{class:[Ge.container,U.platform===oi.PC&&Ge.pcContainer]},[c(li,{text:this.text,color:"#000",class:Ge.noticeBar,background:"none"},null)])}}),Ma=Y({name:"header-top",props:{scoreData:{type:Object,default:()=>({})}},setup(e,{expose:i}){var E;const t=ri(),{scoreData:s}=ci(e),n=Qe({show:!1,shiyiShow:!1,isInitPlyr:!1,_plrl:null}),a={BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"},o={high:"#EF231D",low:"#0E79FF",right:"#01B996",wrong:"#8F4EFB",lack:"#FF8219",not:"#ADADAD",fast:"#F63582",slow:"#FFAA00"},r=Me(U.isPercussion?"cadence":"intonation"),u=Me(!1),d=()=>{pi()};ui(()=>{var g;(g=n._plrl)==null||g.destroy()});const b=g=>{r.value=g,s.value.itemType=g},m=di(()=>{const g=(s.value.videoFilePath||"").split(".").pop();return g==="wav"||g==="mp3"||g==="m4a"?"audio":"video"}),h=((E=navigator==null?void 0:navigator.userAgent)==null?void 0:E.includes("UAWEIVRD-W09"))||(t==null?void 0:t.iPad)||t.isTablet,w=()=>{n.show=!0,!n.isInitPlyr&&gi(()=>{const g=m.value==="audio"?"#audioSrc":"#videoSrc";n._plrl=new Te(g,{controls:["play-large","play","progress","current-time","duration"],fullscreen:{enabled:!1}}),m.value==="audio"&&setTimeout(()=>{const p=document.querySelector("#audioSrc"),C=document.querySelector("#audioVisualizer"),{pauseVisualDraw:F,playVisualDraw:B}=S(p,C);n._plrl.on("play",()=>{u.value=!0,B()}),n._plrl.on("pause",()=>{u.value=!1,F()})},600),n.isInitPlyr=!0})};function S(g,p,C=128){const F=p.getContext("2d");let{width:B,height:N}=p.getBoundingClientRect();B=Math.ceil(B),N=Math.ceil(N),p.width=B,p.height=N;const R=(G,oe,{lineGap:se,canvWidth:ze,canvHeight:Jt,canvFillColor:ei,lineColor:ct})=>{if(!oe)return;const qe=ze,ut=Jt;$(oe,qe,ut,ei);const Se=G.length;let X=(qe/2-se*Se)/Se;X<1&&(X=1);const dt=qe/2,de=ut/2;let Pe=dt;for(let ee=0;ee<Se;ee++){const re=G[ee]/255*de;F.fillStyle=ct,ee===0&&(Pe-=se/2),F.fillRect(Pe-X,de-re,X,re),F.fillRect(Pe-X,de,X,re),Pe-=X+se}let Ee=dt;for(let ee=0;ee<Se;ee++){const re=G[ee]/255*de;F.fillStyle=ct,ee===0&&(Ee+=se/2),F.fillRect(Ee,de-re,X,re),F.fillRect(Ee,de,X,re),Ee+=X+se}},$=(G,oe,se,ze)=>{G.clearRect(0,0,oe,se),G.fillStyle=ze,G.fillRect(0,0,oe,se)},W=()=>{const G=setInterval(()=>{if(le){clearInterval(G);return}R(T(48),F,{lineGap:2,canvWidth:B,canvHeight:N,canvFillColor:"transparent",lineColor:"rgba(255, 251, 251, 1)"})},300)};let le=!0;return{playVisualDraw:()=>{le=!1,W()},pauseVisualDraw:()=>{le=!0,requestAnimationFrame(()=>{F.clearRect(0,0,B,N)})}}}function T(g){const p=new Uint8Array(g),C=30,F=.01,B=.2;let R=150,$=F+Math.random()*(B-F);for(let W=0;W<g;W++){const le=1-W/g,je=R*le+(Math.random()-.5)*10,Ve=$+(Math.random()-.5)*.01,G=je*(.5+.5*Math.sin(Ve*W)),oe=Math.floor(Math.random()*C)-C/2;p[W]=Math.min(255,Math.max(0,Math.floor(G+oe))),R+=(je-R)*.05,$+=(Ve-$)*.05}return p}return()=>c(K,null,[c("div",{class:[v.headerTop,t.android&&v.android]},[c("div",{class:v.left},[c("div",{class:[v.back,!hi.isApp&&v.disabled],onClick:d},[c("img",{src:mn},null)]),c("div",{class:v.leftContent},[c(_a,{class:v.lcName,text:U.examSongName,rightView:!1},null),c("div",{class:v.lcScore},[a[s.value.heardLevel],P("|速度:"),Math.floor(s.value.speed),P("|综合分数:"),s.value.score,P("分")])])]),c("div",{class:[v.middle,h&&v.padMiddle]},[U.isPercussion?null:c("div",{onClick:()=>b("intonation"),class:[v.cItem,"evaluting-report-1",r.value==="intonation"&&v.active]},[c("span",{class:v.mScore},[s.value.intonation,P("分")]),c("span",{class:v.mLabel},[P("音准")])]),c("div",{onClick:()=>b("cadence"),class:[v.cItem,"evaluting-report-2",r.value==="cadence"&&v.active]},[c("span",{class:v.mScore},[s.value.cadence,P("分")]),c("span",{class:v.mLabel},[P("节奏")])]),U.isPercussion?null:c("div",{onClick:()=>b("integrity"),class:[v.cItem,"evaluting-report-3",r.value==="integrity"&&v.active]},[c("span",{class:v.mScore},[s.value.integrity,P("分")]),c("span",{class:v.mLabel},[P("完成度")])])]),c("div",{class:v.right},[c("div",{style:{display:s.value.videoFilePath?"":"none"},class:[v.btn,"evaluting-report-4"],onClick:w},[c("img",{class:v.iconBtn,src:gn},null),c("span",null,[P("回放")])]),c("div",{class:v.btn,onClick:()=>n.shiyiShow=!0},[c("img",{class:v.iconBtn,src:pn},null),c("span",null,[P("释义")])])]),s.value.musicType==="staff"?c(K,null,[c("div",{class:v.demos},[r.value==="intonation"&&c(K,null,[c("div",null,[c(V,{fill:"#EF231D"},null),c("span",null,[P("演奏偏高")])]),c("div",null,[c(V,{fill:"#0E79FF"},null),c("span",null,[P("演奏偏低")])])]),r.value==="cadence"&&c(K,null,[c("div",null,[c(V,{fill:"#F63582"},null),c("span",null,[P("节奏偏快")])]),c("div",null,[c(V,{fill:"#FFAA00"},null),c("span",null,[P("节奏偏慢")])])]),(r.value==="intonation"||r.value==="cadence")&&c(K,null,[c("div",null,[c(V,{fill:"#01B996"},null),c("span",null,[P("演奏正确")])]),c("div",null,[c(V,{fill:"#8F4EFB"},null),c("span",null,[P("演奏错误")])])]),r.value==="integrity"&&c("div",null,[c(V,{fill:"#FF8219"},null),c("span",null,[P("时值不足")])]),r.value==="integrity"&&c("div",null,[c(V,{fill:"#01B996"},null),c("span",null,[P("演奏正确")])]),c("div",null,[c(V,{fill:"#ADADAD"},null),c("span",null,[P("未演奏")])])])]):c(K,null,[c("div",{class:v.demos},[r.value==="intonation"&&c(K,null,[c("div",null,[c("i",{style:{background:o.high}},null),c("span",null,[P("演奏偏高")])]),c("div",null,[c("i",{style:{background:o.low}},null),c("span",null,[P("演奏偏低")])])]),r.value==="cadence"&&c(K,null,[c("div",null,[c("i",{style:{background:o.fast}},null),c("span",null,[P("节奏偏快")])]),c("div",null,[c("i",{style:{background:o.slow}},null),c("span",null,[P("节奏偏慢")])])]),(r.value==="intonation"||r.value==="cadence")&&c(K,null,[c("div",null,[c("i",{style:{background:o.right}},null),c("span",null,[P("演奏正确")])]),c("div",null,[c("i",{style:{background:o.wrong}},null),c("span",null,[P("演奏错误")])])]),r.value==="integrity"&&c("div",null,[c("i",{style:{background:o.lack}},null),c("span",null,[P("时值不足")])]),r.value==="integrity"&&c("div",null,[c("i",{style:{background:o.right}},null),c("span",null,[P("演奏正确")])]),c("div",null,[c("i",{style:{background:o.not}},null),c("span",null,[P("未演奏")])])])]),c(mt,{teleport:"body",class:["popup-custom","van-scale",v.popup],transition:"van-scale",show:n.show,"onUpdate:show":g=>n.show=g,closeable:!0,onClose:()=>{var g;(g=n._plrl)==null||g.pause()}},{default:()=>[c("div",{class:v.playerBoxContent},[c("div",{class:[v.playerBoxCon,h&&v.padPlayerBox]},[c("div",{class:[v.playerBox,m.value==="video"&&v.videoPlayerBox]},[m.value==="audio"?c("div",{class:v.audioBox},[c("div",{class:v.gramoBox},[c("div",{class:[v.gramoPan,!u.value&&v.imgRotate]},[c("img",{class:v.audioImg,src:yn},null)]),c("i",{class:v.audioPoint},null),c("i",{class:[v.audioZhen,!u.value&&v.active]},null)]),c("img",{src:bn,class:v.tyImg},null),c("canvas",{class:v.audioVisualizer,id:"audioVisualizer"},null),c("audio",{crossorigin:"anonymous",id:"audioSrc",src:s.value.videoFilePath,controls:"false",preload:"metadata",playsinline:!0},null),c("div",{onClick:()=>{n._plrl.play()},class:[v.playLarge,!u.value&&v.playIngShow]},null)]):c("video",{id:"videoSrc",class:v.videoBox,src:s.value.videoFilePath,"data-poster":vn,preload:"metadata",playsinline:!0},null)])])])]}),c(mt,{show:n.shiyiShow,"onUpdate:show":g=>n.shiyiShow=g,class:"popup-custom van-scale center-closeBtn shiyiBox",transition:"van-scale",teleport:"body",closeable:!0},{default:()=>[c("img",{onClick:()=>n.shiyiShow=!1,class:v.shiyiClose,src:fn},null),s.value.musicType==="staff"?c("div",{class:v.shiyiPopup},[c("img",{class:v.shiyiTop,src:ft},null),c("div",{class:v.items},[c("div",{class:v.item},[c(V,{fill:"#EF231D"},null),c("span",null,[P("红色音符:演奏偏高")])]),c("div",{class:v.item},[c(V,{fill:"#01B996"},null),c("span",null,[P("绿色音符:演奏正确")])]),c("div",{class:v.item},[c(V,{fill:"#0E79FF"},null),c("span",null,[P("蓝色音符:演奏偏低")])]),c("div",{class:v.item},[c(V,{fill:"#8F4EFB"},null),c("span",null,[P("紫色音符:演奏错误")])]),c("div",{class:v.item},[c(V,{fill:"#F63582"},null),c("span",null,[P("玫红色音符:节奏偏快")])]),c("div",{class:v.item},[c(V,{fill:"#FF8219"},null),c("span",null,[P("橙色音符:时值不足")])]),c("div",{class:v.item},[c(V,{fill:"#FFAA00"},null),c("span",null,[P("黄色音符:节奏偏慢")])]),c("div",{class:v.item},[c(V,{fill:"#ADADAD"},null),c("span",null,[P("灰色音符:未演奏")])])])]):c("div",{class:v.shiyiPopup},[c("img",{class:v.shiyiTop,src:ft},null),c("div",{class:v.items},[c("div",{class:v.itemTone},[c("i",{style:{background:o.high}},null),c("span",null,[P("玫红色音符:演奏偏高")])]),c("div",{class:v.itemTone},[c("i",{style:{background:"#01B996"}},null),c("span",null,[P("绿色音符:演奏正确")])]),c("div",{class:v.itemTone},[c("i",{style:{background:o.low}},null),c("span",null,[P("蓝色音符:演奏偏低")])]),c("div",{class:v.itemTone},[c("i",{style:{background:o.wrong}},null),c("span",null,[P("紫色音符:演奏错误")])]),c("div",{class:v.itemTone},[c("i",{style:{background:o.fast}},null),c("span",null,[P("玫红色音符:节奏偏快")])]),c("div",{class:v.itemTone},[c("i",{style:{background:o.lack}},null),c("span",null,[P("橙色音符:时值不足")])]),c("div",{class:v.itemTone},[c("i",{style:{background:o.slow}},null),c("span",null,[P("黄色音符:节奏偏慢")])]),c("div",{class:v.itemTone},[c("i",{style:{background:o.not}},null),c("span",null,[P("灰色音符:未演奏")])])])])]})]),c(mi,{videoFilePath:s.value.videoFilePath},null)])}}),La=Y({name:"ArrowSvg",props:{fill:String},render(){return c("svg",{id:"topSvg",width:"15px",height:"10px",viewBox:"0 0 10 7",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[c("g",{id:"页面-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[c("path",{d:"M1.61932444,0 L8.38067556,0 C8.84091285,1.06606835e-15 9.2140089,0.373096042 9.2140089,0.833333333 C9.2140089,1.00701915 9.15973962,1.17636453 9.05878679,1.31769849 L5.67811123,6.05064428 C5.41060373,6.42515477 4.89014533,6.51189784 4.51563484,6.24439035 C4.44080524,6.19094063 4.37533849,6.12547388 4.32188877,6.05064428 L0.941213211,1.31769849 C0.673705719,0.943188006 0.760448786,0.422729599 1.13495928,0.155222107 C1.27629324,0.0542692786 1.44563862,-3.01161341e-16 1.61932444,0 Z",id:"上",fill:"#FF9200",transform:"translate(5.000000, 3.500000) scale(1, -1) translate(-5.000000, -3.500000) "},null)])])}}),Ba=Y({name:"ArrowSvg",props:{fill:String},render(){return c("svg",{id:"bottomSvg",width:"15px",height:"10px",viewBox:"0 0 10 7",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[c("g",{id:"页面-223",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[c("path",{d:"M1.61932444,0 L8.38067556,0 C8.84091285,1.06606835e-15 9.2140089,0.373096042 9.2140089,0.833333333 C9.2140089,1.00701915 9.15973962,1.17636453 9.05878679,1.31769849 L5.67811123,6.05064428 C5.41060373,6.42515477 4.89014533,6.51189784 4.51563484,6.24439035 C4.44080524,6.19094063 4.37533849,6.12547388 4.32188877,6.05064428 L0.941213211,1.31769849 C0.673705719,0.943188006 0.760448786,0.422729599 1.13495928,0.155222107 C1.27629324,0.0542692786 1.44563862,-3.01161341e-16 1.61932444,0 Z",id:"下",fill:"#FF9200",transform:"translate(5.000000, 3.500000) scale(1, -1) rotate(-180.000000) translate(-5.000000, -3.500000) "},null)])])}}),Na=Y({name:"ArrowSvg",props:{fill:String},render(){return c("svg",{id:"leftSvg",width:"15px",height:"10px",viewBox:"0 0 10 7",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[c("g",{id:"页面-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[c("path",{d:"M0.119324437,1.5 L6.88067556,1.5 C7.34091285,1.5 7.7140089,1.87309604 7.7140089,2.33333333 C7.7140089,2.50701915 7.65973962,2.67636453 7.55878679,2.81769849 L4.17811123,7.55064428 C3.91060373,7.92515477 3.39014533,8.01189784 3.01563484,7.74439035 C2.94080524,7.69094063 2.87533849,7.62547388 2.82188877,7.55064428 L-0.558786789,2.81769849 C-0.826294281,2.44318801 -0.739551214,1.9227296 -0.365040725,1.65522211 C-0.223706765,1.55426928 -0.0543613774,1.5 0.119324437,1.5 Z",id:"左",fill:"#FF9200",transform:"translate(3.500000, 5.000000) scale(-1, -1) rotate(-90.000000) translate(-3.500000, -5.000000) "},null)])])}}),Ia=Y({name:"ArrowSvg",props:{fill:String},render(){return c("svg",{id:"rightSvg",width:"15px",height:"10px",viewBox:"0 0 10 7",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[c("g",{id:"页面-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[c("path",{d:"M0.119324437,1.5 L6.88067556,1.5 C7.34091285,1.5 7.7140089,1.87309604 7.7140089,2.33333333 C7.7140089,2.50701915 7.65973962,2.67636453 7.55878679,2.81769849 L4.17811123,7.55064428 C3.91060373,7.92515477 3.39014533,8.01189784 3.01563484,7.74439035 C2.94080524,7.69094063 2.87533849,7.62547388 2.82188877,7.55064428 L-0.558786789,2.81769849 C-0.826294281,2.44318801 -0.739551214,1.9227296 -0.365040725,1.65522211 C-0.223706765,1.55426928 -0.0543613774,1.5 0.119324437,1.5 Z",id:"右",fill:"#FF9200",transform:"translate(3.500000, 5.000000) scale(1, -1) rotate(-90.000000) translate(-3.500000, -5.000000) "},null)])])}}),he={RIGHT:z.right,WRONG:z.wrong,NOT_PLAYED:z.notPlay,EARLY:z.cadence_fast,LATE:z.cadence_slow,HIGH:z.intonation_high,LOW:z.intonation_low,SHORT:z.integrity_wrong},Ra=Y({name:"music-list",setup(){const e=fi(),i=Me([]),t=Me([]),s=Qe({videoFilePath:"",cadence:0,integrity:0,intonation:0,score:0,speed:0,heardLevel:"",itemType:"intonation",musicType:"staff"}),n=Qe({isLoading:!0,paddingLeft:"",headerHide:!1,musicalNotesPlayStats:[],userMeasureScore:{}}),a=async()=>{const m=await Ci();if(m!=null&&m.content){const{isSpecialShapedScreen:h,notchHeight:w}=m.content;h&&(n.paddingLeft="25px")}n.paddingLeft="20px"};yi(()=>{a(),bi()}),vi(async()=>{var w,S,T,E,g,p,C,F,B,N,R,$;U.isEvaluatReport=!0;const m=await wi(e.id);U.partIndex=Number((w=m==null?void 0:m.data)==null?void 0:w.partIndex);let h={};try{h=JSON.parse((S=m==null?void 0:m.data)==null?void 0:S.scoreData)}catch(W){console.error("解析评测结果:",W)}console.log("结果11",h),n.musicalNotesPlayStats=((T=h.musicalNotesPlayStats)==null?void 0:T.notesData)||[],n.userMeasureScore=h.userMeasureScore||{},s.heardLevel=(E=m.data)==null?void 0:E.heardLevel,s.cadence=(g=m.data)==null?void 0:g.cadence,s.integrity=(p=m.data)==null?void 0:p.integrity,s.intonation=(C=m.data)==null?void 0:C.intonation,s.score=(F=m.data)==null?void 0:F.score,s.speed=(B=m.data)==null?void 0:B.speed,s.videoFilePath=((N=m.data)==null?void 0:N.videoFilePath)||((R=m.data)==null?void 0:R.recordFilePath),await Ti(($=h.musicalNotesPlayStats)==null?void 0:$.examSongId),U.isSingleLine=!1,s.musicType=e.musicRenderType?e.musicRenderType:h.musicType?h.musicType:U.musicRenderType,U.musicRenderType=s.musicType,n.isLoading=!1});const o=()=>{let m=["RIGHT","WRONG","NOT_PLAYED"];return s.itemType==="intonation"?m.push("HIGH","LOW"):s.itemType==="cadence"?m.push("EARLY","LATE"):s.itemType==="integrity"&&(m=["SHORT","NORMAL","NOT_PLAYED"]),s.itemType==="cadence"?n.musicalNotesPlayStats.filter(h=>m.includes(h.rhythmicAssessment.result)):s.itemType==="integrity"?n.musicalNotesPlayStats.filter(h=>{var w;return m.includes((w=h.integrityAssessment)==null?void 0:w.result)}):n.musicalNotesPlayStats.filter(h=>{let w=h.pitchAssessment.result;return m.includes(w)})},r=()=>{d();const m=o();for(const h of m){const w=h.musicalNotesIndex!==void 0?h.musicalNotesIndex:h.index,S=t.value[w];setTimeout(()=>{if(i.value.includes(S.id))return;i.value.push(S.id);const T=document.getElementById("vf-"+S.id),E=document.getElementById("vf-"+S.id+"-stem");let g=s.itemType==="cadence"?h.rhythmicAssessment.result:s.itemType==="integrity"?h.integrityAssessment.result:h.pitchAssessment.result;const p=!1;s.itemType==="integrity"&&(g=g=h.integrityAssessment.result==="NORMAL"?"RIGHT":h.integrityAssessment.result==="SHORT"?"SHORT":g),E==null||E.classList.add(he[g]),T==null||T.classList.add(he[g]),T&&p&&(E==null||E.classList.remove(he[g]),T==null||T.classList.remove(he[g]),s.musicType==="staff"&&(E==null||E.classList.add(he.RIGHT),T==null||T.classList.add(he.RIGHT)),s.musicType)},300)}},u=m=>{if(!m)return;const h=m.classList.values();for(const w of h)(w==null?void 0:w.indexOf("vf-"))!==0&&m.classList.remove(w)},d=()=>{for(const m of i.value){u(document.getElementById("vf-"+m)),u(document.getElementById("vf-"+m+"-stem"));const h="vf-"+m+"-copy",w=document.getElementById(h);w&&w.remove()}i.value=[]},b=m=>{var T,E,g,p;U.musicRendered=!0,U.osmd=m,t.value=Si(m),console.log("🚀 ~ state.times:",t.value);const h=(E=(T=n.musicalNotesPlayStats)==null?void 0:T[0])==null?void 0:E.measureRenderIndex,w=(p=(g=n.musicalNotesPlayStats)==null?void 0:g.last())==null?void 0:p.measureRenderIndex;t.value=t.value.filter(C=>C.MeasureNumberXML>=h+1&&C.MeasureNumberXML<=w+1),Array.from(new Set(document.getElementsByClassName("vf-beam"))).forEach(C=>{C.classList.add(z.beam)}),r(),Pi()};return ki(()=>s.itemType,()=>{r()}),()=>c("div",{class:[z.detail,U.setting.eyeProtection&&"eyeProtection",z.shareBox],style:{paddingLeft:n.paddingLeft}},[c(pt,{name:"van-fade"},{default:()=>[!U.musicRendered&&c("div",{class:z.skeleton},[c(Qi,{class:z.skeleton,row:8},null)])]}),c("div",{class:["headHeight",z.headHeight,n.headerHide&&z.headHide],onClick:m=>m.stopPropagation()},[c(pt,{name:"van-slide-down"},{default:()=>[U.musicRendered&&c(Ma,{scoreData:s},null)]})]),c("div",{id:"scrollContainer",class:[z.container,!U.setting.displayCursor&&"hideCursor"]},[!n.isLoading&&c(Ai,{musicColor:"#1B1B1B",onRendered:b},null),c("div",{class:z.arrowSvg},[c(La,null,null),c(Ba,null,null),c(Na,null,null),c(Ia,null,null)])])])}});export{Ra as default};