PageSourceSearch

https://www.sncu.nl/npm.plyr-react.bundle.a533344944f7209b97c9.min.js?46645661350d155abcef

js sncu.nl collected 2026-10-04 09:49:12 UTC 110,547 bytes, 1 lines download raw bytes

1(self.webpackChunkspa=self.webpackChunkspa||[]).push([[207],{6158:function(e,t,kt){"object"==typeof navigator&&(e.exports=function(){"use strict";function l(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function F(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function H(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function R(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?H(Object(i),!0).forEach(function(e){F(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var V={addCSS:!0,thumbWidth:15,watch:!0};function B(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}var t=function(e){return null!=e?e.constructor:null},U=function(e,t){return!!(e&&t&&e instanceof t)},W=function(e){return null==e},z=function(e){return t(e)===Object},K=function(e){return t(e)===String},Y=function(e){return Array.isArray(e)},Q=function(e){return U(e,NodeList)},X=K,J=Y,G=Q,Z=function(e){return U(e,Element)},ee=function(e){return U(e,Event)},te=function(e){return W(e)||(K(e)||Y(e)||Q(e))&&!e.length||z(e)&&!Object.keys(e).length};function ie(e,t){if(1>t){var i=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(i))}return Math.round(e/t)*t}var se=function(){function c(e,t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,c),Z(e)?this.element=e:X(e)&&(this.element=document.querySelector(e)),Z(this.element)&&te(this.element.rangeTouch)&&(this.config=R({},V,{},t),this.init())}return function(e,t,i){t&&s(e.prototype,t),i&&s(e,i)}(c,[{key:"init",value:function(){c.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(){c.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,i=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(e){t.element[i](e,function(e){return t.set(e)},!1)})}},{key:"get",value:function(e){if(!c.enabled||!ee(e))return null;var t,i=e.target,s=e.changedTouches[0],n=parseFloat(i.getAttribute("min"))||0,a=parseFloat(i.getAttribute("max"))||100,l=parseFloat(i.getAttribute("step"))||1,o=i.getBoundingClientRect(),r=100/o.width*(this.config.thumbWidth/2)/100;return 0>(t=100/o.width*(s.clientX-o.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*r:50<t&&(t+=2*(t-50)*r),n+ie(t/100*(a-n),l)}},{key:"set",value:function(e){c.enabled&&ee(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),function(e,t){if(e&&t){var i=new Event(t,{bubbles:!0});e.dispatchEvent(i)}}(e.target,"touchend"===e.type?"change":"input"))}}],[{key:"setup",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=null;if(te(t)||X(t)?e=Array.from(document.querySelectorAll(X(t)?t:'input[type="range"]')):Z(t)?e=[t]:G(t)?e=Array.from(t):J(t)&&(e=t.filter(Z)),te(e))return null;var s=R({},V,{},i);if(X(t)&&s.watch){var n=new MutationObserver(function(e){Array.from(e).forEach(function(e){Array.from(e.addedNodes).forEach(function(e){Z(e)&&B(e,t)&&new c(e,s)})})});n.observe(document.body,{childList:!0,subtree:!0})}return e.map(function(e){return new c(e,i)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),c}();const ne=e=>null!=e?e.constructor:null,i=(e,t)=>Boolean(e&&t&&e instanceof t),ae=e=>null==e,le=e=>ne(e)===Object,oe=e=>ne(e)===String,re=e=>ne(e)===Function,ce=e=>Array.isArray(e),he=e=>i(e,NodeList),ue=e=>ae(e)||(oe(e)||ce(e)||he(e))&&!e.length||le(e)&&!Object.keys(e).length;var o=ae,n=le,v=e=>ne(e)===Number&&!Number.isNaN(e),r=oe,w=e=>ne(e)===Boolean,c=re,d=ce,de=he,T=e=>null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument,h=e=>i(e,Event),u=e=>i(e,KeyboardEvent),pe=e=>i(e,TextTrack)||!ae(e)&&oe(e.kind),me=e=>i(e,Promise)&&re(e.then),ge=e=>{if(i(e,window.URL))return!0;
1if(!oe(e))return!1;let t=e;e.startsWith("http://")&&e.startsWith("https://")||(t=`http://${e}`);try{return!ue(new URL(t).hostname)}catch(e){return!1}},k=ue;const fe=(()=>{const t=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(e).find(e=>void 0!==t.style[e]);return!!r(i)&&e[i]})();function ye(e,t){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(e){}},t)}const p={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function be(e,t){return t.split(".").reduce((e,t)=>e&&e[t],e)}function m(t={},...e){if(!e.length)return t;const i=e.shift();return n(i)?(Object.keys(i).forEac
1h(e=>{n(i[e])?(Object.keys(t).includes(e)||Object.assign(t,{[e]:{}}),m(t[e],i[e])):Object.assign(t,{[e]:i[e]})}),m(t,...e)):t}function ve(e,a){const t=e.length?e:[e];Array.from(t).reverse().forEach((e,t)=>{const i=t>0?a.cloneNode(!0):a,s=e.parentNode,n=e.nextSibling;i.appendChild(e),n?s.insertBefore(i,n):s.appendChild(i)})}function we(i,e){T(i)&&!k(e)&&Object.entries(e).filter(([,e])=>!o(e)).forEach(([e,t])=>i.setAttribute(e,t))}function C(e,t,i){const s=document.createElement(e);return n(t)&&we(s,t),r(i)&&(s.innerText=i),s}function Te(e,t,i,s){T(t)&&t.appendChild(C(e,i,s))}function g(e){de(e)||d(e)?Array.from(e).forEach(g):T(e)&&T(e.parentNode)&&e.parentNode.removeChild(e)}function ke(e){if(!T(e))return;let{length:t}=e.childNodes;for(;t>0;)e.removeChild(e.lastChild),t-=1}function Ce(e,t){return T(t)&&T(t.parentNode)&&T(e)?(t.parentNode.replaceChild(e,t),e):null}function f(e,t){if(!r(e)||k(e))return{};const l={},o=m({},t);return e.split(",").forEach(e=>{const t=e.trim(),i=t.replace(".",""),s=t.replace(/[[\]]/g,"").split("="),[n]=s,a=s.length>1?s[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":r(o.class)?l.class=`${o.class} ${i}`:l.class=i;break;case"#":l.id=t.replace("#","");break;case"[":l[n]=a}}),m(o,l)}function y(e,t){if(!T(e))return;let i=t;w(i)||(i=!e.hidden),e.hidden=i}function b(t,i,s){if(de(t))return Array.from(t).map(e=>b(e,i,s));if(T(t)){let e="toggle";return void 0!==s&&(e=s?"add":"remove"),t.classList[e](i),t.classList.contains(i)}return!1}function Ae(e,t){return T(e)&&e.classList.contains(t)}function A(e,t){const{prototype:i}=Element;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function a(e){return this.elements.container.querySelectorAll(e)}function S(e){return this.elements.container.querySelector(e)}function Se(e=null,t=!1){T(e)&&(e.focus({preventScroll:!0}),t&&b(e,this.config.classNames.tabFocus))}const Pe={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},P={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,t,i){const s=p.isIPhone&&i&&P.playsinline,n=P[e]||"html5"!==t;return{api:n,ui:n&&P.rangeInput&&("video"!==e||!p.isIPhone||s)}},pip:!(p.isIPhone||!c(C("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||C("video").disablePictureInPicture)),airplay:c(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(k(e))return!1;const[t]=e.split("/");let i=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(Pe).includes(i)&&(i+=`; codecs="${Pe[e]}"`);try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range","range"===e.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==fe,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Ee=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e})();function E(t,e,i,s=!1,n=!0,a=!1){if(!t||!("addEventListener"in t)||k(e)||!c(i))return;const l=e.split(" ");let o=a;Ee&&(o={passive:n,capture:a}),l.forEach(e=>{this&&this.eventListeners&&s&&this.eventListeners.push({element:t,type:e,callback:i,options:o}),t[s?"addEventListener":"removeEventListener"](e,i,o)})}function N(e,t="",i,s=!0,n=!1){E.call(this,e,t,i,!0,s,n)}function Ne(e,t="",i,s=!0,n=!1){E.call(this,e,t,i,!1,s,n)}function xe(t,i="",s,n=!0,a=!1){const l=(...e)=>{Ne(t,i,l,n,a),s.apply(this,e)};E.call(this,t,i,l,!0,n,a)}function x(e,t="",i=!1,s={}){if(!T(e)||k(t))return;const n=new CustomEvent(t,{bubbles:i,detail:{...s,plyr:this}});e.dispatchEvent(n)}function Me(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:t,type:i,callback:s,options:n}=e;t.removeEventListener(i,s,n)}),this.eventListeners=[])}function Ie(){return new Promise(e=>this.ready?setTimeout(e,0):N.call(this,this.elements.container,"ready",e)).then(()=>{})}function M(e){me(e)&&e.then(null,()=>{})}function Le(i){return d(i)?i.filter((e,t)=>
1i.indexOf(e)===t):i}function $e(e,i){return d(e)&&e.length?e.reduce((e,t)=>Math.abs(t-i)<Math.abs(e-i)?t:e):null}function Oe(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const _e=[[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,[t,i])=>({...e,[t/i]:[t,i]}),{});function je(e){if(!(d(e)||r(e)&&e.includes(":")))return!1;return(d(e)?e:e.split(":")).map(Number).every(v)}function qe(e){if(!d(e)||!e.every(v))return null;const[t,i]=e,s=(e,t)=>0===t?e:s(t,e%t),n=s(t,i);return[t/n,i/n]}function De(e){const t=e=>je(e)?e.split(":").map(Number):null;let i=t(e);if(null===i&&(i=t(this.config.ratio)),null===i&&!k(this.embed)&&d(this.embed.ratio)&&({ratio:i}=this.embed),null===i&&this.isHTML5){const{videoWidth:e,videoHeight:t}=this.media;i=[e,t]}return qe(i)}function I(e){if(!this.isVideo)return{};const{wrapper:t}=this.elements,i=De.call(this,e);if(!d(i))return{};const[s,n]=qe(i),a=100/s*n;if(Oe(`aspect-ratio: ${s}/${n}`)?t.style.aspectRatio=`${s}/${n}`:t.style.paddingBottom=`${a}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const e=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),i=(e-a)/(e/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform=`translateY(-${i}%)`}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:i}}function Fe(e,t,i=.05){const s=e/t,n=$e(Object.keys(_e),s);return Math.abs(n-s)<=i?_e[n]:[e,t]}const L={getSources(){if(!this.isHTML5)return[];return Array.from(this.media.querySelectorAll("source")).filter(e=>{const t=e.getAttribute("type");return!!k(t)||P.mime.call(this,t)})},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:L.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const o=this;o.options.speed=o.config.speed.options,k(this.config.ratio)||I.call(o),Object.defineProperty(o.media,"quality",{get(){const e=L.getSources.call(o).find(e=>e.getAttribute("src")===o.source);return e&&Number(e.getAttribute("size"))},set(t){if(o.quality!==t){if(o.config.quality.forced&&c(o.config.quality.onChange))o.config.quality.onChange(t);else{const e=L.getSources.call(o).find(e=>Number(e.getAttribute("size"))===t);if(!e)return;const{currentTime:i,paused:s,preload:n,readyState:a,playbackRate:l}=o.media;o.media.src=e.getAttribute("src"),("none"!==n||a)&&(o.once("loadedmetadata",()=>{o.speed=l,o.currentTime=i,s||M(o.play())}),o.media.load())}x.call(o,o.media,"qualitychange",!1,{quality:t})}}})},cancelRequests(){this.isHTML5&&(g(L.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function He(e,...i){return k(e)?e:e.toString().replace(/{(\d+)}/g,(e,t)=>i[t].toString())}const Re=(e="",t="",i="")=>e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString()),Ve=(e="")=>e.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase());function Be(e=""){let t=e.toString();return t=function(e=""){let t=e.toString();return t=Re(t,"-"," "),t=Re(t,"_"," "),t=Ve(t),Re(t," ","")}(t),t.charAt(0).toLowerCase()+t.slice(1)}function Ue(e){const t=document.createElement("div");return t.appendChild(e),t.innerHTML}const We={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},$={get(e="",t={}){if(k(e)||k(t))return"";let i=be(t.i18n,e);if(k(i))return Object.keys(We).includes(e)?We[e]:"";const s={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(s).forEach(([e,t])=>{i=Re(i,e,t)}),i}};class ze{constructor(e){l(this,"get",e=>{if(!ze.supported||!this.enabled)return null;const t=window.localStorage.getItem(this.key);if(k(t))return null;const i=JSON.parse(t);return r(e)&&e.length?i[e]:i}),l(this,"set",e=>{if(!ze.supported||!this.enabled)return;if(!n(e))return;let t=this.get();k(t)&&(t={}),m(t,e);try{window.localStorage.setItem(this.key,JSON.stringify(t))}catch(e){}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}function Ke(e,s="text"){return new Promise((t,i)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if("text"===s)try{t(JSON.parse(i.responseText))}catch(e){t(i.responseText)}else t(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",e,!0),i.responseType=s,i.send()}catch(e){i(e)}})}function Ye(e,t){if(!r(e))return;const i=r(t);let s=!1;const n=()=>null!==document.getElementById(t),a=(e,t)=>{e.innerHTML=t,i&&n()||document.body.insertAdjacentElement("afterbegin",e)};if(!i||!n()){const n=ze.supported,l=document.createElement("div");if(l.setAttribute("hidden",""),i&&l.setAttribute("id",t),n){const e=window.localStorage.getItem(`cache-${t}`);if(s=null!==e,s){const t=JSON.parse(e);a(l,t.content)}}Ke(e).then(e=>{if(!k(e)){if(n)try{window.localStorage.setItem(`cache-${t}`,JSON.stringify({content:e}))}catch(e){}a(l,e)}}).catch(()=>{})}}const Qe=e=>Math.trunc(e/60/60%60,10);function Xe(e=0,t=!1,i=!1){if(!v(e))return Xe(void 0,t,i);const s=e=>`0${e}`.slice(-2);let n=Qe(e);const a=(l=e,Math.trunc(l/60%60,10));var l;const o=(e=>Math.trunc(e%60,10))(e);return n=t||n>0?`${n}:`:"",`${i&&e>0?"-":""}${n}${s(a)}:${s(o)}`}const O={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,i=e.host!==t||p.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements(){try{return this.elements.controls=S.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:a.call(this,this.config.selectors.buttons.play),pause:S.call(this,this.config.selectors.buttons.pause),restart:S.call(this,this.config.selectors.buttons.restart),rewind:S.call(this,this.config.selectors.buttons.rewind),fastForward:S.call(this,this.config.selectors.buttons.fastForward),mute:S.call(this,this.config.selectors.buttons.mute),pip:S.call(this,this.config.selectors.buttons.pip),airplay:S.call(this,this.config.selectors.buttons.airplay),settings:S.call(this,this.config.selectors.buttons.settings),captions:S.call(this,this.config.selectors.buttons.captions),fullscreen:S.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=S.call(this,this.config.selectors.progress),this.elements.inputs={seek:S.call(this,this.config.selectors.inputs.seek),volume:S.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:S.call(this,this.config.selectors.display.buffer),currentTime:S.call(this,this.config.selectors.display.currentTime),duration:S.call(this,this.config.selectors.display.duration)},T(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,t){const i="http://www.w3.org/2000/svg",s=O.getIconUrl.call(this),n=`${s.cors?"":s.url}#${this.config.iconPrefix}`,a=document.createElementNS(i,"svg");we(a,m(t,{"aria-hidden":"true",focusable:"false"}));const l=document.createElementNS(i,"use"),o=`${n}-${e}`;return"href"in l&&l.setAttributeNS("http://www.w3.org/1999/xlink","href",o),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o),a.appendChild(l),a},createLabel(e,t={}){const i=$.get(e,this.config);return C("span",{...t,class:[t.class,this.config.classNames.hidden].filter(
1Boolean).join(" ")},i)},createBadge(e){if(k(e))return null;const t=C("span",{class:this.config.classNames.menu.value});return t.appendChild(C("span",{class:this.config.classNames.menu.badge},e)),t},createButton(e,t){const i=m({},t);let s=Be(e);const n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(e=>{Object.keys(i).includes(e)&&(n[e]=i[e],delete i[e])}),"button"!==n.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some(e=>e===this.config.classNames.control)||m(i,{class:`${i.class} ${this.config.classNames.control}`}):i.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":i.class+=` ${this.config.classNames.control}--overlaid`,s="play",n.label="play",n.icon="play";break;default:k(n.label)&&(n.label=s),k(n.icon)&&(n.icon=e)}const a=C(n.element);return n.toggle?(a.appendChild(O.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(O.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(O.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(O.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(O.createIcon.call(this,n.icon)),a.appendChild(O.createLabel.call(this,n.label))),m(i,f(this.config.selectors.buttons[s],i)),we(a,i),"play"===s?(d(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(a)):this.elements.buttons[s]=a,a},createRange(e,t){const i=C("input",m(f(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":$.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=i,O.updateRangeFill.call(this,i),se.setup(i),i},createProgress(e,t){const i=C("progress",m(f(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){i.appendChild(C("span",null,"0"));const t={played:"played",buffer:"buffered"}[e],s=t?$.get(t,this.config):"";i.innerText=`% ${s.toLowerCase()}`}return this.elements.display[e]=i,i},createTime(e,t){const i=f(this.config.selectors.display[e],t),s=C("div",m(i,{class:`${i.class?i.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":$.get(e,this.config)}),"00:00");return this.elements.display[e]=s,s},bindMenuItemShortcuts(s,e){N.call(this,s,"keydown keyup",t=>{if(![32,38,39,40].includes(t.which))return;if(t.preventDefault(),t.stopPropagation(),"keydown"===t.type)return;const i=A(s,'[role="menuitemradio"]');if(!i&&[32,39].includes(t.which))O.showMenuPanel.call(this,e,!0);else{let e;32!==t.which&&(40===t.which||i&&39===t.which?(e=s.nextElementSibling,T(e)||(e=s.parentNode.firstElementChild)):(e=s.previousElementSibling,T(e)||(e=s.parentNode.lastElementChild)),Se.call(this,e,!0))}},!1),N.call(this,s,"keyup",e=>{13===e.which&&O.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:t,list:e,type:i,title:s,badge:n=null,checked:a=!1}){const l=f(this.config.selectors.inputs[i]),o=C("button",m(l,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${l.class?l.class:""}`.trim(),"aria-checked":a,value:t})),r=C("span");r.innerHTML=s,T(n)&&r.appendChild(n),o.appendChild(r),Object.defineProperty(o,"checked",{enumerable:!0,get:()=>"true"===o.getAttribute("aria-checked"),set(e){e&&Array.from(o.parentNode.children).filter(e=>A(e,'[role="menuitemradio"]')).forEach(e=>e.setAttribute("aria-checked","false")),o.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(o,"click keyup",e=>{if(!u(e)||32===e.which){switch(e.preventDefault(),e.stopPropagation(),o.checked=!0,i){case"language":this.currentTrack=Number(t);break;
1case"quality":this.quality=t;break;case"speed":this.speed=parseFloat(t)}O.showMenuPanel.call(this,"home",u(e))}},i,!1),O.bindMenuItemShortcuts.call(this,o,i),e.appendChild(o)},formatTime(e=0,t=!1){if(!v(e))return e;return Xe(e,Qe(this.duration)>0,t)},updateTimeDisplay(e=null,t=0,i=!1){T(e)&&v(t)&&(e.innerText=O.formatTime(t,i))},updateVolume(){this.supported.ui&&(T(this.elements.inputs.volume)&&O.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),T(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(e,t=0){T(e)&&(e.value=t,O.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!h(e))return;let t=0;const i=(e,t)=>{const i=v(t)?t:0,s=T(e)?e:this.elements.display.buffer;if(T(s)){s.value=i;const e=s.getElementsByTagName("span")[0];T(e)&&(e.childNodes[0].nodeValue=i)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":s=this.currentTime,n=this.duration,t=0===s||0===n||Number.isNaN(s)||Number.isNaN(n)?0:(s/n*100).toFixed(2),"timeupdate"===e.type&&O.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":i(this.elements.display.buffer,100*this.buffered)}var s,n},updateRangeFill(e){const t=h(e)?e.target:e;if(T(t)&&"range"===t.getAttribute("type")){if(A(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);const e=O.formatTime(this.currentTime),i=O.formatTime(this.duration),s=$.get("seekLabel",this.config);t.setAttribute("aria-valuetext",s.replace("{currentTime}",e).replace("{duration}",i))}else if(A(t,this.config.selectors.inputs.volume)){const e=100*t.value;t.setAttribute("aria-valuenow",e),t.setAttribute("aria-valuetext",`${e.toFixed(1)}%`)}else t.setAttribute("aria-valuenow",t.value);p.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip(e){if(!this.config.tooltips.seek||!T(this.elements.inputs.seek)||!T(this.elements.display.seekTooltip)||0===this.duration)return;const t=`${this.config.classNames.tooltip}--visible`,i=e=>b(this.elements.display.seekTooltip,t,e);if(this.touch)return void i(!1);let s=0;const n=this.elements.progress.getBoundingClientRect();if(h(e))s=100/n.width*(e.pageX-n.left);else{if(!Ae(this.elements.display.seekTooltip,t))return;s=parseFloat(this.elements.display.seekTooltip.style.left,10)}s<0?s=0:s>100&&(s=100),O.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*s),this.elements.display.seekTooltip.style.left=`${s}%`,h(e)&&["mouseenter","mouseleave"].includes(e.type)&&i("mouseenter"===e.type)},timeUpdate(e){const t=!T(this.elements.display.duration)&&this.config.invertTime;O.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||O.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return y(this.elements.display.currentTime,!0),void y(this.elements.progress,!0);T(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=T(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&O.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&O.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),O.updateSeekTooltip.call(this)},toggleMenuButton(e,t){y(this.elements.settings.buttons[e],!t)},updateSetting(e,t,i){const s=this.elements.settings.panels[e];let n=null,a=t;if("captions"===e)n=this.currentTrack;else{if(n=k(i)?this[e]:i,k(n)&&(n=this.config[e].default),!k(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(T(a)||(a=s&&s.querySelector('[role="menu"]')),!T(a))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=O.getLabel.call(this,e,n);const l=a&&a.querySelector(`[value="${n}"]`);T(l)&&(l.checked=!0)},getLabel(e,t){switch(e){case"speed":return 1===t?$.get("normal",this.config):`${t}&times;`;case"quality":if(v(t)){const e=$.get(`qualityLabel.${t}`,this.config);return e.length?e:`${t}p`}return Ve(t);case"captions":return _.getLabel.call(this);default:return null}},setQualityMenu(e){if(!T(this.elements.settings.panels.quality))return;const t="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');d(e)&&(this.options.quality=Le(e).filter(e=>this.config.quality.options.includes(e)));const s=!k(this.options.quality)&&this.options.quality.length>1;if(O.toggleMenuButton.call(this,t,s),ke(i),O.checkMenu.call(this),!s)return;const n=e=>{const t=$.get(`qualityBadge.${e}`,this.config);return t.length?O.createBadge.call(this,t):null};this.options.quality.sort((e,t)=>
1{const i=this.config.quality.options;return i.indexOf(e)>i.indexOf(t)?1:-1}).forEach(e=>{O.createMenuItem.call(this,{value:e,list:i,type:t,title:O.getLabel.call(this,"quality",e),badge:n(e)})}),O.updateSetting.call(this,t,i)},setCaptionsMenu(){if(!T(this.elements.settings.panels.captions))return;const e="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=_.getTracks.call(this),s=Boolean(t.length);if(O.toggleMenuButton.call(this,e,s),ke(i),O.checkMenu.call(this),!s)return;const n=t.map((e,t)=>({value:t,checked:this.captions.toggled&&this.currentTrack===t,title:_.getLabel.call(this,e),badge:e.language&&O.createBadge.call(this,e.language.toUpperCase()),list:i,type:"language"}));n.unshift({value:-1,checked:!this.captions.toggled,title:$.get("disabled",this.config),list:i,type:"language"}),n.forEach(O.createMenuItem.bind(this)),O.updateSetting.call(this,e,i)},setSpeedMenu(){if(!T(this.elements.settings.panels.speed))return;const t="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(e=>e>=this.minimumSpeed&&e<=this.maximumSpeed);const e=!k(this.options.speed)&&this.options.speed.length>1;O.toggleMenuButton.call(this,t,e),ke(i),O.checkMenu.call(this),e&&(this.options.speed.forEach(e=>{O.createMenuItem.call(this,{value:e,list:i,type:t,title:O.getLabel.call(this,"speed",e)})}),O.updateSetting.call(this,t,i))},checkMenu(){const{buttons:e}=this.elements.settings,t=!k(e)&&Object.values(e).some(e=>!e.hidden);y(this.elements.settings.menu,!t)},focusFirstMenuItem(e,t=!1){if(this.elements.settings.popup.hidden)return;let i=e;T(i)||(i=Object.values(this.elements.settings.panels).find(e=>!e.hidden));const s=i.querySelector('[role^="menuitem"]');Se.call(this,s,t)},toggleMenu(e){const{popup:t}=this.elements.settings,i=this.elements.buttons.settings;if(!T(t)||!T(i))return;const{hidden:s}=t;let n=s;if(w(e))n=e;else if(u(e)&&27===e.which)n=!1;else if(h(e)){const s=c(e.composedPath)?e.composedPath()[0]:e.target,a=t.contains(s);if(a||!a&&e.target!==i&&n)return}i.setAttribute("aria-expanded",n),y(t,!n),b(this.elements.container,this.config.classNames.menu.open,n),n&&u(e)?O.focusFirstMenuItem.call(this,null,!0):n||s||Se.call(this,i,u(e))},getMenuSize(e){const t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);const i=t.scrollWidth,s=t.scrollHeight;return g(t),{width:i,height:s}},showMenuPanel(e="",t=!1){const i=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!T(i))return;const s=i.parentNode,n=Array.from(s.children).find(e=>!e.hidden);if(P.transitions&&!P.reducedMotion){s.style.width=`${n.scrollWidth}px`,s.style.height=`${n.scrollHeight}px`;const e=O.getMenuSize.call(this,i),t=e=>{e.target===s&&["width","height"].includes(e.propertyName)&&(s.style.width="",s.style.height="",Ne.call(this,s,fe,t))};N.call(this,s,fe,t),s.style.width=`${e.width}px`,s.style.height=`${e.height}px`}y(n,!0),y(i,!1),O.focusFirstMenuItem.call(this,i,t)}
vendor: 4,320 bytes, line 1
1,setDownloadUrl(){const e=this.elements.buttons.download;T(e)&&e.setAttribute("href",this.download)},create(o){const{bindMenuItemShortcuts:r,createButton:i,createProgress:e,createRange:s,createTime:c,setQualityMenu:t,setSpeedMenu:n,showMenuPanel:h}=O;this.elements.controls=null,d(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));const a=C("div",f(this.config.selectors.controls.wrapper));this.elements.controls=a;const u={class:"plyr__controls__item"};return Le(d(this.config.controls)?this.config.controls:[]).forEach(t=>{if("restart"===t&&a.appendChild(i.call(this,"restart",u)),"rewind"===t&&a.appendChild(i.call(this,"rewind",u)),"play"===t&&a.appendChild(i.call(this,"play",u)),"fast-forward"===t&&a.appendChild(i.call(this,"fast-forward",u)),"progress"===t){const r=C("div",{class:`${u.class} plyr__progress__container`}),i=C("div",f(this.config.selectors.progress));if(i.appendChild(s.call(this,"seek",{id:`plyr-seek-${o.id}`})),i.appendChild(e.call(this,"buffer")),this.config.tooltips.seek){const o=C("span",{class:this.config.classNames.tooltip},"00:00");i.appendChild(o),this.elements.display.seekTooltip=o}this.elements.progress=i,r.appendChild(this.elements.progress),a.appendChild(r)}if("current-time"===t&&a.appendChild(c.call(this,"currentTime",u)),"duration"===t&&a.appendChild(c.call(this,"duration",u)),"mute"===t||"volume"===t){let{volume:e}=this.elements;if(T(e)&&a.contains(e)||(e=C("div",m({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=e,a.appendChild(e)),"mute"===t&&e.appendChild(i.call(this,"mute")),"volume"===t&&!p.isIos){const i={max:1,step:.05,value:this.config.volume};e.appendChild(s.call(this,"volume",m(i,{id:`plyr-volume-${o.id}`})))}}if("captions"===t&&a.appendChild(i.call(this,"captions",u)),"settings"===t&&!k(this.config.settings)){const e=C("div",m({},u,{class:`${u.class} plyr__menu`.trim(),hidden:""}));e.appendChild(i.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${o.id}`,"aria-expanded":!1}));const s=C("div",{class:"plyr__menu__container",id:`plyr-settings-${o.id}`,hidden:""}),c=C("div"),t=C("div",{id:`plyr-settings-${o.id}-home`}),l=C("div",{role:"menu"});t.appendChild(l),c.appendChild(t),this.elements.settings.panels.home=t,this.config.settings.forEach(e=>{const t=C("button",m(f(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));r.call(this,t,e),N.call(this,t,"click",()=>{h.call(this,e,!1)});const i=C("span",null,$.get(e,this.config)),s=C("span",{class:this.config.classNames.menu.value});s.innerHTML=o[e],i.appendChild(s),t.appendChild(i),l.appendChild(t);const n=C("div",{id:`plyr-settings-${o.id}-${e}`,hidden:""}),a=C("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});a.appendChild(C("span",{"aria-hidden":!0},$.get(e,this.config))),a.appendChild(C("span",{class:this.config.classNames.hidden},$.get("menuBack",this.config))),N.call(this,n,"keydown",e=>{37===e.which&&(e.preventDefault(),e.stopPropagation(),h.call(this,"home",!0))},!1),N.call(this,a,"click",()=>{h.call(this,"home",!1)}),n.appendChild(a),n.appendChild(C("div",{role:"menu"})),c.appendChild(n),this.elements.settings.buttons[e]=t,this.elements.settings.panels[e]=n}),s.appendChild(c),e.appendChild(s),a.appendChild(e),this.elements.settings.popup=s,this.elements.settings.menu=e}if("pip"===t&&P.pip&&a.appendChild(i.call(this,"pip",u)),"airplay"===t&&P.airplay&&a.appendChild(i.call(this,"airplay",u)),"download"===t){const o=m({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(o.download="");const{download:r}=this.config.urls;!ge(r)&&this.isEmbed&&m(o,{icon:`logo-${this.provider}`,label:this.provider}),a.appendChild(i.call(this,"download",o))}"fullscreen"===t&&a.appendChild(i.call(this,"fullscreen",u))}),this.isHTML5&&t.call(this,L.getQualityOptions.call(this)),n.call(this),a},inject(){if(this.config.loadSprite){const t=O.getIconUrl.call(this);t.cors&&Ye(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let t=null;this.elements.controls=null;const s={id:this.id,seektime:this.config.seekTime,title:this.config.title};let e=!0;
1c(this.config.controls)&&(this.config.controls=this.config.controls.call(this,s)),this.config.controls||(this.config.controls=[]),T(this.config.controls)||r(this.config.controls)?t=this.config.controls:(t=O.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:_.getLabel.call(this)}),e=!1);let i;e&&r(this.config.controls)&&(t=(e=>{let i=e;return Object.entries(s).forEach(([e,t])=>{i=Re(i,`{${e}}`,t)}),i})(t)),r(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),T(i)||(i=this.elements.container);if(i[T(t)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",t),T(this.elements.controls)||O.findElements.call(this),!k(this.elements.buttons)){const t=t=>{const i=this.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:()=>Ae(t,i),set(e=!1){b(t,i,e)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(e=>{d(e)||de(e)?Array.from(e).filter(Boolean).forEach(t):t(e)})}if(p.isEdge&&ye(i),this.config.tooltips.controls){const{classNames:t,selectors:s}=this.config,e=`${s.controls.wrapper} ${s.labels} .${t.hidden}`,i=a.call(this,e);Array.from(i).forEach(e=>{b(e,this.config.classNames.hidden,!1),b(e,this.config.classNames.tooltip,!0)})}}};function Je(e,t=!0){let i=e;if(t){const e=document.createElement("a");e.href=i,i=e.href}try{return new URL(i)}catch(e){return null}}function Ge(e){const i=new URLSearchParams;return n(e)&&Object.entries(e).forEach(([e,t])=>{i.set(e,t)}),i}const _={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!P.textTracks)return void(d(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&O.setCaptionsMenu.call(this));var e,t;if(T(this.elements.captions)||(this.elements.captions=C("div",f(this.config.selectors.captions)),e=this.elements.captions,t=this.elements.wrapper,T(e)&&T(t)&&t.parentNode.insertBefore(e,t.nextSibling)),p.isIE&&window.URL){const e=this.media.querySelectorAll("track");Array.from(e).forEach(t=>{const e=t.getAttribute("src"),i=Je(e);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&Ke(e,"blob").then(e=>{t.setAttribute("src",window.URL.createObjectURL(e))}).catch(()=>{g(t)})})}const i=Le((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(e=>e.split("-")[0]));let s=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===s&&([s]=i);let n=this.storage.get("captions");if(w(n)||({active:n}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:n,language:s,languages:i}),this.isHTML5){const e=this.config.captions.update?"addtrack removetrack":"removetrack";N.call(this,this.media.textTracks,e,_.update.bind(this))}setTimeout(_.update.bind(this),0)},update(){const e=_.getTracks.call(this,!0),{active:t,language:i,meta:s,currentTrackNode:n}=this.captions,a=Boolean(e.find(e=>e.language===i));this.isHTML5&&this.isVideo&&e.filter(e=>!s.get(e)).forEach(e=>{this.debug.log("Track added",e),s.set(e,{default:"showing"===e.mode}),"showing"===e.mode&&(e.mode="hidden"),N.call(this,e,"cuechange",()=>_.updateCues.call(this))}),(a&&this.language!==i||!e.includes(n))&&(_.setLanguage.call(this,i),_.toggle.call(this,t&&a)),this.elements&&b(this.elements.container,this.config.classNames.captions.enabled,!k(e)),d(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&O.setCaptionsMenu.call(this)},toggle(e,t=!0){if(!this.supported.ui)return;const{toggled:i}=this.captions,s=this.config.classNames.captions.active,n=o(e)?!i:e;if(n!==i){if(t||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!t){const e=_.getTracks.call(this),t=_.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=t.language,void _.set.call(this,e.indexOf(t))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),b(this.elements.container,s,n),this.captions.toggled=n,O.updateSetting.call(this,"captions"),x.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout(()=>{n&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,t=!0){const i=_.getTracks.call(this);
vendor: 1,256 bytes, line 1
1if(-1!==e)if(v(e))if(e in i){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const s=i[e],{language:n}=s||{};this.captions.currentTrackNode=s,O.updateSetting.call(this,"captions"),t||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),x.call(this,this.media,"languagechange")}_.toggle.call(this,!0,t),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,t)},setLanguage(e,t=!0){if(!r(e))return void this.debug.warn("Invalid language argument",e);const i=e.toLowerCase();this.captions.language=i;const s=_.getTracks.call(this),n=_.findTrack.call(this,[i]);_.set.call(this,s.indexOf(n),t)},getTracks(t=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||t||this.captions.meta.has(e)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(e,t=!1){const i=_.getTracks.call(this),s=e=>Number((this.captions.meta.get(e)||{}).default),n=Array.from(i).sort((e,t)=>s(t)-s(e));let a;return e.every(t=>(a=n.find(e=>e.language===t),!a)),a||(t?n[0]:void 0)},getCurrentTrack(){return _.getTracks.call(this)[this.currentTrack]},getLabel(e){let t=e;
vendor: 4,347 bytes, line 1
1return!pe(t)&&P.textTracks&&this.captions.toggled&&(t=_.getCurrentTrack.call(this)),pe(t)?k(t.label)?k(t.language)?$.get("enabled",this.config):e.language.toUpperCase():t.label:$.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!T(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!o(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let t=e;if(!t){const e=_.getCurrentTrack.call(this);t=Array.from((e||{}).activeCues||[]).map(e=>e.getCueAsHTML()).map(Ue)}const i=t.map(e=>e.trim()).join("\n");if(i!==this.elements.captions.innerHTML){ke(this.elements.captions);const e=C("span",f(this.config.selectors.caption));e.innerHTML=i,this.elements.captions.appendChild(e),x.call(this,this.media,"cuechange")}}},Ze={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.6.12/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="qual
1ity"]'},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",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",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"},tabFocus:"plyr__tab-focus",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}},et="picture-in-picture",tt="inline",j={html5:"html5",youtube:"youtube",vimeo:"vimeo"},e="audio",it="video",st=()=>{};class nt{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):st}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):st}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):st}}class q{constructor(e){l(this,"onChange",()=>{if(!this.enabled)return;const e=this.player.elements.buttons.fullscreen;T(e)&&(e.pressed=this.active);const t=this.target===this.player.media?this.target:this.player.elements.container;x.call(this.player,t,this.active?"enterfullscreen":"exitfullscreen",!0)}),l(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",b(this.target,this.player.config.classNames.fullscreen.fallback,t),p.isIos){let e=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";e||(e=document.createElement("meta"),e.setAttribute("name","viewport"));const s=r(e.content)&&e.content.includes(i);t?(this.cleanupViewport=!s,s||(e.content+=`,${i}`)):this.cleanupViewport&&(e.content=e.content.split(",").filter(e=>e.trim()!==i).join(","))}this.onChange()}),l(this,"trapFocus",e=>{if(p.isIos||!this.active||"Tab"!==e.key||9!==e.keyCode)return;const t=document.activeElement,i=a.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[s]=i,n=i[i.length-1];t!==n||e.shiftKey?t===s&&e.shiftKey&&(n.focus(),e.preventDefault()):(s.focus(),e.preventDefault())}),l(this,"update",()=>{if(this.enabled){let e;e=this.forceFallback?"Fallback (forced)":q.native?"Native":"Fallback",this.player.debug.log(`${e} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");b(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}),l(this,"enter",()=>{this.enabled&&(p.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!q.native||this.forceFallback?this.toggleFallback(!0):this.prefix?k(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),l(this,"exit",()=>{if(this.enabled)if(p.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),M(this.player.play());else if(!q.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!k(this.prefix)){const e="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${e}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),l(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=q.prefix,this.property=q.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(e,t){const{prototype:i}=Element;return(i.closest||function(){let e=this;do{if(A.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,e.config.fullscreen.container),N.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),N.call(this.player,this.player.elements.container,"dblclick",e=>{T(this.player.elements.controls)&&this.player.elements.controls.contains(e.target)||this.player.listeners.proxy(e,this.toggle,"fullscreen")}),N.call(this,this.player.elements.container,"keydown",e=>this.trapFocus(e)),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return q.native&&!this.forceFallback}static get prefix(){if(c(document.exitFullscreen))return"";let t="";return["webkit","moz","ms"].some(e=>!(!c(document[`${e}ExitFullscreen`])&&!c(document[`${e}CancelFullScreen`]))&&(t=e,!0)),t}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get enabled(){return(q.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!q.native||this.forceFallback)return Ae(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return p.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}
1function at(n,a=1){return new Promise((e,t)=>{const i=new Image,s=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=a?e:t)(i)};Object.assign(i,{onload:s,onerror:s,src:n})})}const D={addStyleHook(){b(this.elements.container,this.config.selectors.container.replace(".",""),!0),b(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 D.toggleNativeControls.call(this,!0);T(this.elements.controls)||(O.inject.call(this),this.listeners.controls()),D.toggleNativeControls.call(this),this.isHTML5&&_.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,O.updateVolume.call(this),O.timeUpdate.call(this),O.durationUpdate.call(this),D.checkPlaying.call(this),b(this.elements.container,this.config.classNames.pip.supported,P.pip&&this.isHTML5&&this.isVideo),b(this.elements.container,this.config.classNames.airplay.supported,P.airplay&&this.isHTML5),b(this.elements.container,this.config.classNames.isIos,p.isIos),b(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{x.call(this,this.media,"ready")},0),D.setTitle.call(this),this.poster&&D.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&O.durationUpdate.call(this)},setTitle(){let t=$.get("play",this.config);if(r(this.config.title)&&!k(this.config.title)&&(t+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",t)}),this.isEmbed){const t=S.call(this,"iframe");if(!T(t))return;const e=k(this.config.title)?"video":this.config.title,i=$.get("frameTitle",this.config);t.setAttribute("title",i.replace("{title}",e))}},togglePoster(e){b(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(t,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),Ie.call(this).then(()=>at(t)).catch(e=>{throw t===this.poster&&D.togglePoster.call(this,!1),e}).then(()=>{if(t!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${t}')`,backgroundSize:""}),D.togglePoster.call(this,!0),t)))},checkPlaying(e){b(this.elements.container,this.config.classNames.playing,this.playing),b(this.elements.container,this.config.classNames.paused,this.paused),b(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",$.get(this.playing?"pause":"play",this.config))}),h(e)&&"timeupdate"===e.type||D.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{b(this.elements.container,this.config.classNames.loading,this.loading),D.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:t}=this.elements;if(t&&this.config.hideControls){const i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||i))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!k(e)&&r(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),k(this.media.style)&&this.media.removeAttribute("style")}};class lt{constructor(e){l(this,"firstTouch",()=>{const{player:e}=this,{elements:t}=e;e.touch=!0,b(t.container,e.config.classNames.isTouch,!0)}),l(this,"setTabFocus",e=>{const{player:t}=this,{elements:i}=t;if(clearTimeout(this.focusTimer),"keydown"===e.type&&9!==e.which)return;"keydown"===e.type&&(this.lastKeyDown=e.timeStamp);const s=e.timeStamp-this.lastKeyDown<=20;("focus"!==e.type||s)&&((()=>{const e=t.config.classNames.tabFocus;b(a.call(t,`.${e}`),e,!1)})(),"focusout"!==e.type&&(this.focusTimer=setTimeout(()=>{const e=document.activeElement;i.container.contains(e)&&b(document.activeElement,t.config.classNames.tabFocus,!0)},10)))}),l(this,"global",(e=!0)=>{const{player:t}=this;t.config.keyboard.global&&E.call(t,window,"keydown keyup",this.handleKey,e,!1),E.call(t,document.body,"click",this.toggleMenu,e),xe.call(t,document.body,"touchstart",this.firstTouch),E.call(t,document.body,"keydown focus blur focusout",this.setTabFocus,e,!1,!0)}),l(this,"container",()=>{const{player:r}=this,{config:e,elements:c,timers:s}=r;!e.keyboard.global&&e.keyboard.focused&&N.call(r,c.container,"keydown keyup",this.handleKey,!1),N.call(r,c.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",e=>{const{controls:t}=c;t&&"enterfullscreen"===e.type&&(t.pressed=!1,t.hover=!1);let i=0;["touchstart","touchmove","mousemove"].includes(e.type)&&(D.toggleControls.call(r,!0),i=r.touch?3e3:2e3),clearTimeout(s.controls),s.controls=setTimeout(()=>D.toggleControls.call(r,!1),i)});const i=()=>
vendor: 3,678 bytes, line 1
1{if(!r.isVimeo||r.config.vimeo.premium)return;const e=c.wrapper,{active:t}=r.fullscreen,[i,s]=De.call(r),n=Oe(`aspect-ratio: ${i} / ${s}`);if(!t)return void(n?(e.style.width=null,e.style.height=null):(e.style.maxWidth=null,e.style.margin=null));const[a,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],o=a/l>i/s;n?(e.style.width=o?"auto":"100%",e.style.height=o?"100%":"auto"):(e.style.maxWidth=o?l/s*i+"px":null,e.style.margin=o?"0 auto":null)},n=()=>{clearTimeout(s.resized),s.resized=setTimeout(i,50)};N.call(r,c.container,"enterfullscreen exitfullscreen",e=>{const{target:t}=r.fullscreen;if(t!==c.container)return;if(!r.isEmbed&&k(r.config.ratio))return;i();("enterfullscreen"===e.type?N:Ne).call(r,window,"resize",n)})}),l(this,"media",()=>{const{player:i}=this,{elements:s}=i;if(N.call(i,i.media,"timeupdate seeking seeked",e=>O.timeUpdate.call(i,e)),N.call(i,i.media,"durationchange loadeddata loadedmetadata",e=>O.durationUpdate.call(i,e)),N.call(i,i.media,"ended",()=>{i.isHTML5&&i.isVideo&&i.config.resetOnEnd&&(i.restart(),i.pause())}),N.call(i,i.media,"progress playing seeking seeked",e=>O.updateProgress.call(i,e)),N.call(i,i.media,"volumechange",e=>O.updateVolume.call(i,e)),N.call(i,i.media,"playing play pause ended emptied timeupdate",e=>D.checkPlaying.call(i,e)),N.call(i,i.media,"waiting canplay seeked playing",e=>D.checkLoading.call(i,e)),i.supported.ui&&i.config.clickToPlay&&!i.isAudio){const t=S.call(i,`.${i.config.classNames.video}`);if(!T(t))return;N.call(i,s.container,"click",e=>{([s.container,t].includes(e.target)||t.contains(e.target))&&(i.touch&&i.config.hideControls||(i.ended?(this.proxy(e,i.restart,"restart"),this.proxy(e,()=>{M(i.play())},"play")):this.proxy(e,()=>{M(i.togglePlay())},"play")))})}i.supported.ui&&i.config.disableContextMenu&&N.call(i,s.wrapper,"contextmenu",e=>{e.preventDefault()},!1),N.call(i,i.media,"volumechange",()=>{i.storage.set({volume:i.volume,muted:i.muted})}),N.call(i,i.media,"ratechange",()=>{O.updateSetting.call(i,"speed"),i.storage.set({speed:i.speed})}),N.call(i,i.media,"qualitychange",e=>{O.updateSetting.call(i,"quality",null,e.detail.quality)}),N.call(i,i.media,"ready qualitychange",()=>{O.setDownloadUrl.call(i)});const t=i.config.events.concat(["keyup","keydown"]).join(" ");N.call(i,i.media,t,e=>{let{detail:t={}}=e;"error"===e.type&&(t=i.media.error),x.call(i,s.container,e.type,!0,t)})}),l(this,"proxy",(e,t,i)=>{const{player:s}=this,n=s.config.listeners[i];let a=!0;c(n)&&(a=n.call(s,e)),!1!==a&&c(t)&&t.call(s,e)}),l(this,"bind",(e,t,i,s,n=!0)=>{const{player:a}=this,l=a.config.listeners[s],o=c(l);N.call(a,e,t,e=>this.proxy(e,i,s),n&&!o)}),l(this,"controls",()=>{const{player:l}=this,{elements:s}=l,t=p.isIE?"change":"input";if(s.buttons.play&&Array.from(s.buttons.play).forEach(e=>{this.bind(e,"click",()=>{M(l.togglePlay())},"play")}),this.bind(s.buttons.restart,"click",l.restart,"restart"),this.bind(s.buttons.rewind,"click",()=>{l.lastSeekTime=Date.now(),l.rewind()},"rewind"),this.bind(s.buttons.fastForward,"click",()=>{l.lastSeekTime=Date.now(),l.forward()},"fastForward"),this.bind(s.buttons.mute,"click",()=>{l.muted=!l.muted},"mute"),this.bind(s.buttons.captions,"click",()=>l.toggleCaptions()),this.bind(s.buttons.download,"click",()=>{x.call(l,l.media,"download")},"download"),this.bind(s.buttons.fullscreen,"click",()=>{l.fullscreen.toggle()},"fullscreen"),this.bind(s.buttons.pip,"click",()=>{l.pip="toggle"},"pip"),this.bind(s.buttons.airplay,"click",l.airplay,"airplay"),this.bind(s.buttons.settings,"click",e=>{e.stopPropagation(),e.preventDefault(),O.toggleMenu.call(l,e)}
1,null,!1),this.bind(s.buttons.settings,"keyup",e=>{const t=e.which;[13,32].includes(t)&&(13!==t?(e.preventDefault(),e.stopPropagation(),O.toggleMenu.call(l,e)):O.focusFirstMenuItem.call(l,null,!0))},null,!1),this.bind(s.settings.menu,"keydown",e=>{27===e.which&&O.toggleMenu.call(l,e)}),this.bind(s.inputs.seek,"mousedown mousemove",e=>{const t=s.progress.getBoundingClientRect(),i=100/t.width*(e.pageX-t.left);e.currentTarget.setAttribute("seek-value",i)}),this.bind(s.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",e=>{const t=e.currentTarget,i=e.keyCode?e.keyCode:e.which,s="play-on-seeked";if(u(e)&&39!==i&&37!==i)return;l.lastSeekTime=Date.now();const n=t.hasAttribute(s),a=["mouseup","touchend","keyup"].includes(e.type);n&&a?(t.removeAttribute(s),M(l.play())):!a&&l.playing&&(t.setAttribute(s,""),l.pause())}),p.isIos){const s=a.call(l,'input[type="range"]');Array.from(s).forEach(e=>this.bind(e,t,e=>ye(e.target)))}this.bind(s.inputs.seek,t,e=>{const t=e.currentTarget;let i=t.getAttribute("seek-value");k(i)&&(i=t.value),t.removeAttribute("seek-value"),l.currentTime=i/t.max*l.duration},"seek"),this.bind(s.progress,"mouseenter mouseleave mousemove",e=>O.updateSeekTooltip.call(l,e)),this.bind(s.progress,"mousemove touchmove",e=>{const{previewThumbnails:t}=l;t&&t.loaded&&t.startMove(e)}),this.bind(s.progress,"mouseleave touchend click",()=>{const{previewThumbnails:e}=l;e&&e.loaded&&e.endMove(!1,!0)}),this.bind(s.progress,"mousedown touchstart",e=>{const{previewThumbnails:t}=l;t&&t.loaded&&t.startScrubbing(e)}),this.bind(s.progress,"mouseup touchend",e=>{const{previewThumbnails:t}=l;t&&t.loaded&&t.endScrubbing(e)}),p.isWebkit&&Array.from(a.call(l,'input[type="range"]')).forEach(e=>{this.bind(e,"input",e=>O.updateRangeFill.call(l,e.target))}),l.config.toggleInvert&&!T(s.display.duration)&&this.bind(s.display.currentTime,"click",()=>{0!==l.currentTime&&(l.config.invertTime=!l.config.invertTime,O.timeUpdate.call(l))}),this.bind(s.inputs.volume,t,e=>{l.volume=e.target.value},"volume"),this.bind(s.controls,"mouseenter mouseleave",e=>{s.controls.hover=!l.touch&&"mouseenter"===e.type}),s.fullscreen&&Array.from(s.fullscreen.children).filter(e=>
1!e.contains(s.container)).forEach(e=>{this.bind(e,"mouseenter mouseleave",e=>{s.controls&&(s.controls.hover=!l.touch&&"mouseenter"===e.type)})}),this.bind(s.controls,"mousedown mouseup touchstart touchend touchcancel",e=>{s.controls.pressed=["mousedown","touchstart"].includes(e.type)}),this.bind(s.controls,"focusin",()=>{const{config:e,timers:t}=l;b(s.controls,e.classNames.noTransition,!0),D.toggleControls.call(l,!0),setTimeout(()=>{b(s.controls,e.classNames.noTransition,!1)},0);const i=this.touch?3e3:4e3;clearTimeout(t.controls),t.controls=setTimeout(()=>D.toggleControls.call(l,!1),i)}),this.bind(s.inputs.volume,"wheel",e=>{const t=e.webkitDirectionInvertedFromDevice,[i,s]=[e.deltaX,-e.deltaY].map(e=>t?-e:e),n=Math.sign(Math.abs(i)>Math.abs(s)?i:s);l.increaseVolume(n/50);const{volume:a}=l.media;(1===n&&a<1||-1===n&&a>0)&&e.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:i}=t,s=e.keyCode?e.keyCode:e.which,n="keydown"===e.type,a=n&&s===this.lastKey;if(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;if(!v(s))return;if(n){const n=document.activeElement;if(T(n)){const{editable:s}=t.config.selectors,{seek:a}=i.inputs;if(n!==a&&A(n,s))return;if(32===e.which&&A(n,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(s)&&(e.preventDefault(),e.stopPropagation()),s){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:a||(t.currentTime=t.duration/10*(s-48));break;case 32:case 75:a||M(t.togglePlay());break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:a||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:a||t.toggleCaptions();break;case 76:t.loop=!t.loop}27===s&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=s}else this.lastKey=null}toggleMenu(e){O.toggleMenu.call(this.player,e)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof kt.g?kt.g:"undefined"!=typeof self&&self;var ot=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e,t){e.exports=function(){var d=function(){},l={},r={},c={};function i(e,i){e=e.push?e:[e];var t,s,n,a=[],l=e.length,o=l;for(t=function(e,t){t.length&&a.push(e),--o||i(a)};l--;)s=e[l],(n=r[s])?t(s,n):(c[s]=c[s]||[]).push(t)}function o(e,t){if(e){var i=c[e];if(r[e]=t,i)for(;i.length;)i[0](e,t),i.splice(0,1)}}function h(e,t){e.call&&(e={success:e}),t.length?(e.error||d)(t):(e.success||d)(e)}function p(i,s,n,a){var l,o,e=document,t=n.async,r=(n.numRetries||0)+1,c=n.before||d,h=i.replace(/[\?|#].*$/,""),u=i.replace(/^(css|img)!/,"");a=a||0,/(^css!|\.css$)/.test(h)?((o=e.createElement("link")).rel="stylesheet",o.href=u,(l="hideFocus"in o)&&o.relList&&(l=0,o.rel="preload",o.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(h)?(o=e.createElement("img")).src=u:((o=e.createElement("script")).src=i,o.async=void 0===t||t),o.onload=o.onerror=o.onbeforeload=function(e){var t=e.type[0];if(l)try{o.sheet.cssText.length||(t="e")}catch(e){18!=e.code&&(t="e")}if("e"==t){if((a+=1)<r)return p(i,s,n,a)}else if("preload"==o.rel&&"style"==o.as)return o.rel="stylesheet";s(i,t,e.defaultPrevented)},!1!==c(i,o)&&e.head.appendChild(o)}function u(e,s,t){var i,n,a=(e=e.push?e:[e]).length,l=a,o=[];for(i=function(e,t,i){if("e"==t&&o.push(e),"b"==t){if(!i)return;o.push(e)}--a||s(o)},n=0;n<l;n++)p(e[n],i,t)}function s(e,t,i){var s,n;if(t&&t.trim&&(s=t),n=(s?i:t)||{},s){if(s in l)throw"LoadJS";l[s]=!0}function a(t,i){u(e,function(e){h(n,e),t&&h({success:t,error:i},e),o(s,e)},n)}if(n.returnPromise)return new Promise(a);a()}return s.ready=function(e,t){return i(e,function(e){h(t,e)}),s},s.done=function(e){o(e,[])},s.reset=function(){l={},r={},c={}},s.isDefined=function(e){return e in l},s}()}),rt;function ct(i){return new Promise((e,t)=>
1{ot(i,{success:e,error:t})})}function ht(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,x.call(this,this.media,e?"play":"pause"))}const ut={setup(){const t=this;b(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,I.call(t),n(window.Vimeo)?ut.ready.call(t):ct(t.config.urls.vimeo.sdk).then(()=>{ut.ready.call(t)}).catch(e=>{t.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const l=this,e=l.config.vimeo,{premium:t,referrerPolicy:i,...s}=e;let n=l.media.getAttribute("src"),a="";k(n)?(n=l.media.getAttribute(l.config.attributes.embed.id),a=l.media.getAttribute(l.config.attributes.embed.hash)):a=function(e){const t=e.match(/^.*(?:vimeo.com\/|video\/)(?:\d+)(?:\?.*&*h=|\/)+(?<hash>[\d,a-f]+)/);return t?t.groups.hash:null}(n);const o=a?{h:a}:{};t&&Object.assign(s,{controls:!1,sidedock:!1});const r=Ge({loop:l.config.loop.active,autoplay:l.autoplay,muted:l.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...o,...s}),c=k(h=n)?null:v(Number(h))?h:h.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:h;var h;const u=C("iframe"),d=He(l.config.urls.vimeo.iframe,c,r);if(u.setAttribute("src",d),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),k(i)||u.setAttribute("referrerPolicy",i),t||!e.customControls)u.setAttribute("data-poster",l.poster),l.media=Ce(u,l.media);else{const e=C("div",{class:l.config.classNames.embedContainer,"data-poster":l.poster});e.appendChild(u),l.media=Ce(e,l.media)}e.customControls||Ke(He(l.config.urls.vimeo.api,d)).then(e=>{!k(e)&&e.thumbnail_url&&D.setPoster.call(l,e.thumbnail_url).catch(()=>{})}),l.embed=new window.Vimeo.Player(u,{autopause:l.config.autopause,muted:l.muted}),l.media.paused=!0,l.media.currentTime=0,l.supported.ui&&l.embed.disableTextTrack(),l.media.play=()=>(ht.call(l,!0),l.embed.play()),l.media.pause=()=>(ht.call(l,!1),l.embed.pause()),l.media.stop=()=>{l.pause(),l.currentTime=0};let{currentTime:p}=l.media;Object.defineProperty(l.media,"currentTime",{get:()=>p,set(e){const{embed:t,media:i,paused:s,volume:n}=l,a=s&&!t.hasPlayed;i.seeking=!0,x.call(l,i,"seeking"),Promise.resolve(a&&t.setVolume(0)).then(()=>t.setCurrentTime(e)).then(()=>a&&t.pause()).then(()=>a&&t.setVolume(n)).catch(()=>{})}});let m=l.config.speed.selected;Object.defineProperty(l.media,"playbackRate",{get:()=>m,set(e){l.embed.setPlaybackRate(e).then(()=>{m=e,x.call(l,l.media,"ratechange")}).catch(()=>{l.options.speed=[1]})}});let{volume:g}=l.config;Object.defineProperty(l.media,"volume",{get:()=>g,set(e){l.embed.setVolume(e).then(()=>{g=e,x.call(l,l.media,"volumechange")})}});let{muted:f}=l.config;Object.defineProperty(l.media,"muted",{get:()=>f,set(e){const t=!!w(e)&&e;l.embed.setVolume(t?0:l.config.volume).then(()=>{f=t,x.call(l,l.media,"volumechange")})}});let y,{loop:b}=l.config;Object.defineProperty(l.media,"loop",{get:()=>b,set(e){const t=w(e)?e:l.config.loop.active;l.embed.setLoop(t).then(()=>{b=t})}}),l.embed.getVideoUrl().then(e=>{y=e,O.setDownloadUrl.call(l)}).catch(e=>{this.debug.warn(e)}),Object.defineProperty(l.media,"currentSrc",{get:()=>y}),Object.defineProperty(l.media,"ended",{get:()=>l.currentTime===l.duration}),Promise.all([l.embed.getVideoWidth(),l.embed.getVideoHeight()]).then(e=>{const[t,i]=e;l.embed.ratio=Fe(t,i),I.call(this)}),l.embed.setAutopause(l.config.autopause).then(e=>{l.config.autopause=e}),l.embed.getVideoTitle().then(e=>{l.config.title=e,D.setTitle.call(this)}),l.embed.getCurrentTime().then(e=>{p=e,x.call(l,l.media,"timeupdate")}),l.embed.getDuration().then(e=>{l.media.duration=e,x.call(l,l.media,"durationchange")}),l.embed.getTextTracks().then(e=>{l.media.textTracks=e,_.setup.call(l)}),l.embed.on("cuechange",({cues:e=[]})=>{const t=e.map(e=>function(e){const t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText}(e.text));_.updateCues.call(l,t)}),l.embed.on("loaded",()=>{if(l.embed.getPaused().then(e=>{ht.call(l,!e),e||x.call(l,l.media,"playing")}),T(l.embed.element)&&l.supported.ui)l.embed.element.setAttribute("tabindex",-1)}),l.embed.on("bufferstart",()=>{x.call(l,l.media,"waiting")}),l.embed.on("bufferend",()=>{x.call(l,l.media,"playing")}),l.embed.on("play",()=>{ht.call(l,!0),x.call(l,l.media,"playing")}),l.embed.on("pause",()=>{ht.call(l,!1)}),l.embed.on("timeupdate",e=>{l.media.seeking=!1,p=e.seconds,x.call(l,l.media,"timeupdate")}),l.embed.on("progress",e=>{l.media.buffered=e.percent,x.call(l,l.media,"progress"),1===parseInt(e.percent,10)&&x.call(l,l.media,"canplaythrough"),l.embed.getDuration().then(e=>{e!==l.media.duration&&(l.media.duration=e,x.call(l,l.media,"durationchange"))})}),l.embed.on("seeked",()=>{l.media.seeking=!1,x.call(l,l.media,"seeked")}),l.embed.on("ended",()=>{l.media.paused=!0,x.call(l,l.media,"ended")}),l.embed.on("error",e=>{l.media.error=e,x.call(l,l.media,"error")}),e.customControls&&setTimeout(()=>D.build.call(l),0)}};function dt(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,x.call(this,this.media,e?"play":"pause"))}function pt(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}const mt={setup(){if(b(this.elements.wrapper,this.config.classNames.embed,!0),n(window.YT)&&c(window.YT.Player))mt.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{c(e)&&e(),mt.ready.call(this)},ct(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(e){Ke(He(this.config.urls.youtube.api,e)).then(e=>{if(n(e)){const{title:t,height:i,width:s}=e;this.config.title=t,D.setTitle.call(this),this.embed.ratio=Fe(s,i)}I.call(this)}).catch(()=>{I.call(this)})},ready(){const a=this,l=a.config.youtube,e=a.media&&a.media.getAttribute("id");if(!k(e)&&e.startsWith("youtube-"))return;let t=a.media.getAttribute("src");k(t)&&(t=a.media.getAttribute(this.config.attributes.embed.id));const o=k(i=t)?null:i.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:i;var i;const s=C("div",{id:`${a.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":l.customControls?a.poster:void 0});if(a.media=Ce(s,a.media),l.customControls){const l=e=>`https://i.ytimg.com/vi/${o}/${e}default.jpg`;at(l("maxres"),121).catch(()=>
vendor: 10,925 bytes, line 1
1at(l("sd"),121)).catch(()=>at(l("hq"))).then(e=>D.setPoster.call(a,e.src)).then(e=>{e.includes("maxres")||(a.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}a.embed=new window.YT.Player(a.media,{videoId:o,host:pt(l),playerVars:m({},{autoplay:a.config.autoplay?1:0,hl:a.config.hl,controls:a.supported.ui&&l.customControls?0:1,disablekb:1,playsinline:a.config.fullscreen.iosNative?0:1,cc_load_policy:a.captions.active?1:0,cc_lang_pref:a.config.captions.language,widget_referrer:window?window.location.href:null},l),events:{onError(e){if(!a.media.error){const t=e.data,i={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."}[t]||"An unknown error occured";a.media.error={code:t,message:i},x.call(a,a.media,"error")}},onPlaybackRateChange(e){const t=e.target;a.media.playbackRate=t.getPlaybackRate(),x.call(a,a.media,"ratechange")},onReady(e){if(c(a.media.play))return;const i=e.target;mt.getTitle.call(a,o),a.media.play=()=>{dt.call(a,!0),i.playVideo()},a.media.pause=()=>{dt.call(a,!1),i.pauseVideo()},a.media.stop=()=>{i.stopVideo()},a.media.duration=i.getDuration(),a.media.paused=!0,a.media.currentTime=0,Object.defineProperty(a.media,"currentTime",{get:()=>Number(i.getCurrentTime()),set(e){a.paused&&!a.embed.hasPlayed&&a.embed.mute(),a.media.seeking=!0,x.call(a,a.media,"seeking"),i.seekTo(e)}}),Object.defineProperty(a.media,"playbackRate",{get:()=>i.getPlaybackRate(),set(e){i.setPlaybackRate(e)}});let{volume:s}=a.config;Object.defineProperty(a.media,"volume",{get:()=>s,set(e){s=e,i.setVolume(100*s),x.call(a,a.media,"volumechange")}});let{muted:n}=a.config;Object.defineProperty(a.media,"muted",{get:()=>n,set(e){const t=w(e)?e:n;n=t,i[t?"mute":"unMute"](),i.setVolume(100*s),x.call(a,a.media,"volumechange")}}),Object.defineProperty(a.media,"currentSrc",{get:()=>i.getVideoUrl()}),Object.defineProperty(a.media,"ended",{get:()=>a.currentTime===a.duration});const t=i.getAvailablePlaybackRates();a.options.speed=t.filter(e=>a.config.speed.options.includes(e)),a.supported.ui&&l.customControls&&a.media.setAttribute("tabindex",-1),x.call(a,a.media,"timeupdate"),x.call(a,a.media,"durationchange"),clearInterval(a.timers.buffering),a.timers.buffering=setInterval(()=>{a.media.buffered=i.getVideoLoadedFraction(),(null===a.media.lastBuffered||a.media.lastBuffered<a.media.buffered)&&x.call(a,a.media,"progress"),a.media.lastBuffered=a.media.buffered,1===a.media.buffered&&(clearInterval(a.timers.buffering),x.call(a,a.media,"canplaythrough"))},200),l.customControls&&setTimeout(()=>D.build.call(a),50)},onStateChange(e){const t=e.target;clearInterval(a.timers.playing);switch(a.media.seeking&&[1,2].includes(e.data)&&(a.media.seeking=!1,x.call(a,a.media,"seeked")),e.data){case-1:x.call(a,a.media,"timeupdate"),a.media.buffered=t.getVideoLoadedFraction(),x.call(a,a.media,"progress");break;case 0:dt.call(a,!1),a.media.loop?(t.stopVideo(),t.playVideo()):x.call(a,a.media,"ended");break;case 1:l.customControls&&!a.config.autoplay&&a.media.paused&&!a.embed.hasPlayed?a.media.pause():(dt.call(a,!0),x.call(a,a.media,"playing"),a.timers.playing=setInterval(()=>{x.call(a,a.media,"timeupdate")},50),a.media.duration!==t.getDuration()&&(a.media.duration=t.getDuration(),x.call(a,a.media,"durationchange")));break;case 2:a.muted||a.embed.unMute(),dt.call(a,!1);break;case 3:x.call(a,a.media,"waiting")}x.call(a,a.elements.container,"statechange",!1,{code:e.data})}}})}},gt={setup(){this.media?(b(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),b(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&b(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=C("div",{class:this.config.classNames.video}),ve(this.media,this.elements.wrapper),this.elements.poster=C("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?L.setup.call(this):this.isYouTube?mt.setup.call(this):this.isVimeo&&ut.setup.call(this)):this.debug.warn("No media element found!")}};class ft{constructor(e){l(this,"load",()=>{this.enabled&&(n(window.google)&&n(window.google.ima)?this.ready():ct(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),l(this,"ready",()=>{var e;this.enabled||((e=this).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),l(this,"setupIMA",()=>{this.elements.container=C("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,e=>this.onAdsManagerLoaded(e),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e=>this.onAdError(e),!1),this.requestAds()}),l(this,"requestAds",()=>{const{container:e}=this.player.elements;try{const t=new google.ima.AdsRequest;t.adTagUrl=this.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(t)}catch(e){this.onAdError(e)}}),l(this,"pollCountdown",(e=!1)=>{if(!e)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const e=Xe(Math.max(this.manager.getRemainingTime(),0)),t=`${$.get("advertisement",this.player.config)} - ${e}`;this.elements.container.setAttribute("data-badge-text",t)},100)}),l(this,"onAdsManagerLoaded",e=>{if(!this.enabled)return;const t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,this.manager=e.getAdsManager(this.player,t),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,e=>this.onAdError(e)),Object.keys(google.ima.AdEvent.Type).forEach(e=>{this.manager.addEventListener(google.ima.AdEvent.Type[e],e=>this.onAdEvent(e))}),this.trigger("loaded")}),l(this,"addCuePoints",()=>{k(this.cuePoints)||this.cuePoints.forEach(e=>{if(0!==e&&-1!==e&&e<this.player.duration){const t=this.player.elements.progress;if(T(t)){const i=100/this.player.duration*e,s=C("span",{class:this.player.config.classNames.cues});s.style.left=`${i.toString()}%`,t.appendChild(s)}}})}),l(this,"onAdEvent",e=>{const{container:t}=this.player.elements,i=e.getAd(),s=e.getAdData();switch((e=>{x.call(this.player,this.player.media,`ads${e.replace(/_/g,"").toLowerCase()}`)})(e.type),e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=t.offsetWidth,i.height=t.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:s.adError&&this.player.debug.warn(`Non-fatal ad error: ${s.adError.getMessage()}`)}}),l(this,"onAdError",e=>{this.cancel(),this.player.debug.warn("Ads error",e)}),l(this,"listeners",()=>{const{container:e}=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 i=this.player.currentTime;k(this.cuePoints)||this.cuePoints.forEach((e,t)=>{s<e&&e<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(t,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL)})}),l(this,"play",()=>{const{container:e}=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(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(e){this.onAdError(e)}}).catch(()=>{})}),l(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,M(this.player.media.play())}),l(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),l(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),l(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(e=>{this.on("loaded",e),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),l(this,"trigger",(e,...t)=>{const i=this.events[e];d(i)&&i.forEach(e=>{c(e)&&e.apply(this,t)})}),l(this,"on",(e,t)=>(d(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this)),l(this,"startSafetyTimer",(e,t)=>{this.player.debug.log(`Safety timer invoked from: ${t}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},e)}),l(this,"clearSafetyTimer",e=>{o(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${e}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((e,t)=>
1{this.on("loaded",e),this.on("error",t)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!k(e.publisherId)||ge(e.tagUrl))}get tagUrl(){const{config:e}=this;if(ge(e.tagUrl))return e.tagUrl;return`https://go.aniview.com/api/adserver6/vast/?${Ge({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}const yt=e=>{const t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(e=>{const s={};e.split(/\r\n|\n|\r/).forEach(e=>{if(v(s.startTime)){if(!k(e.trim())&&k(s.text)){const t=e.trim().split("#xywh=");[s.text]=t,t[1]&&([s.x,s.y,s.w,s.h]=t[1].split(","))}}else{const i=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);i&&(s.startTime=60*Number(i[1]||0)*60+60*Number(i[2])+Number(i[3])+Number(`0.${i[4]}`),s.endTime=60*Number(i[6]||0)*60+60*Number(i[7])+Number(i[8])+Number(`0.${i[9]}`))}}),s.text&&t.push(s)}),t},bt=(e,t)=>{const i={};return e>t.width/t.height?(i.width=t.width,i.height=1/e*t.width):(i.height=t.height,i.width=e*t.height),i};class vt{constructor(e){l(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.loaded=!0)})}),l(this,"getThumbnails",()=>new Promise(e=>{const{src:t}=this.player.config.previewThumbnails;if(k(t))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((e,t)=>e.height-t.height),this.player.debug.log("Preview thumbnails",this.thumbnails),e()};if(c(t))t(e=>{this.thumbnails=e,i()});else{const e=(r(t)?[t]:t).map(e=>this.getThumbnail(e));Promise.all(e).then(i)}})),l(this,"getThumbnail",n=>new Promise(s=>{Ke(n).then(e=>{const t={frames:yt(e),height:null,urlPrefix:""};t.frames[0].text.startsWith("/")||t.frames[0].text.startsWith("http://")||t.frames[0].text.startsWith("https://")||(t.urlPrefix=n.substring(0,n.lastIndexOf("/")+1));const i=new Image;i.onload=()=>{t.height=i.naturalHeight,t.width=i.naturalWidth,this.thumbnails.push(t),s()},i.src=t.urlPrefix+t.frames[0].text})})),l(this,"startMove",e=>{if(this.loaded&&h(e)&&["touchmove","mousemove"].includes(e.type)&&this.player.media.duration){if("touchmove"===e.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{const t=this.player.elements.progress.getBoundingClientRect(),i=100/t.width*(e.pageX-t.left);this.seekTime=this.player.media.duration*(i/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=e.pageX,this.elements.thumb.time.innerText=Xe(this.seekTime)}this.showImageAtCurrentTime()}}),l(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),l(this,"startScrubbing",e=>{(o(e.button)||!1===e.button||0===e.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),l(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):xe.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),l(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})}),l(this,"render",()=>{this.elements.thumb.container=C("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=C("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const e=C("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=C("span",{},"00:00"),e.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(e),T(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=C("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),l(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),l(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();
1const i=this.thumbnails[0].frames.findIndex(e=>this.seekTime>=e.startTime&&this.seekTime<=e.endTime),e=i>=0;let s=0;this.mouseDown||this.toggleThumbContainer(e),e&&(this.thumbnails.forEach((e,t)=>{this.loadedImages.includes(e.frames[i].text)&&(s=t)}),i!==this.showingThumb&&(this.showingThumb=i,this.loadImage(s)))}),l(this,"loadImage",(e=0)=>{const t=this.showingThumb,i=this.thumbnails[e],{urlPrefix:s}=i,n=i.frames[t],a=i.frames[t].text,l=s+a;if(this.currentImageElement&&this.currentImageElement.dataset.filename===a)this.showImage(this.currentImageElement,n,e,t,a,!1),this.currentImageElement.dataset.index=t,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const i=new Image;i.src=l,i.dataset.index=t,i.dataset.filename=a,this.showingThumbFilename=a,this.player.debug.log(`Loading image: ${l}`),i.onload=()=>this.showImage(i,n,e,t,a,!0),this.loadingImage=i,this.removeOldImages(i)}}),l(this,"showImage",(e,t,i,s,n,a=!0)=>{this.player.debug.log(`Showing thumb: ${n}. num: ${s}. qual: ${i}. newimg: ${a}`),this.setImageSizeAndOffset(e,t),a&&(this.currentImageContainer.appendChild(e),this.currentImageElement=e,this.loadedImages.includes(n)||this.loadedImages.push(n)),this.preloadNearby(s,!0).then(this.preloadNearby(s,!1)).then(this.getHigherQuality(i,e,t,n))}),l(this,"removeOldImages",i=>{Array.from(this.currentImageContainer.children).forEach(e=>{if("img"!==e.tagName.toLowerCase())return;const t=this.usingSprites?500:1e3;if(e.dataset.index!==i.dataset.index&&!e.dataset.deleting){e.dataset.deleting=!0;const{currentImageContainer:i}=this;setTimeout(()=>{i.removeChild(e),this.player.debug.log(`Removing thumb: ${e.dataset.filename}`)},t)}})}),l(this,"preloadNearby",(t,i=!0)=>new Promise(a=>{setTimeout(()=>{const n=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===n){let e;e=i?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let s=!1;e.forEach(e=>{const t=e.text;if(t!==n&&!this.loadedImages.includes(t)){s=!0,this.player.debug.log(`Preloading thumb filename: ${t}`);const{urlPrefix:e}=this.thumbnails[0],n=e+t,i=new Image;i.src=n,i.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${t}`),this.loadedImages.includes(t)||this.loadedImages.push(t),a()}}}),s||a()}},300)})),l(this,"getHigherQuality",(t,i,s,n)=>{if(t<this.thumbnails.length-1){let e=i.naturalHeight;this.usingSprites&&(e=s.h),e<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===n&&(this.player.debug.log(`Showing higher quality thumb for: ${n}`),this.loadImage(t+1))},300)}}),l(this,"toggleThumbContainer",(e=!1,t=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,e),!e&&t&&(this.showingThumb=null,this.showingThumbFilename=null)}),l(this,"toggleScrubbingContainer",(e=!1)=>{const t=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(t,e),e||(this.showingThumb=null,this.showingThumbFilename=null)}),l(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),l(this,"setThumbContainerSizeAndPos",()=>{if(this.sizeSpecifiedInCSS){if(this.elements.thumb.imageContainer.clientHeight>20&&this.elements.thumb.imageContainer.clientWidth<20){const e=Math.floor(this.elements.thumb.imageContainer.clientHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.width=`${e}px`}else if(this.elements.thumb.imageContainer.clientHeight<20&&this.elements.thumb.imageContainer.clientWidth>20){const t=Math.floor(this.elements.thumb.imageContainer.clientWidth/this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${t}px`}}else{const i=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${this.thumbContainerHeight}px`,this.elements.thumb.imageContainer.style.width=`${i}px`}this.setThumbContainerPos()}),l(this,"setThumbContainerPos",()=>{const e=this.player.elements.progress.getBoundingClientRect(),t=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,s=t.left-e.left+10,n=t.right-e.left-i.clientWidth-10;let a=this.mousePosX-e.left-i.clientWidth/2;a<s&&(a=s),a>n&&(a=n),i.style.left=`${a}px`}),l(this,"setScrubbingContainerSize",()=>{const{width:e,height:t}=bt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${e}px`,this.elements.scrubbing.container.style.height=`${t}px`}),l(this,"setImageSizeAndOffset",(e,t)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/t.h;
1e.style.height=e.naturalHeight*i+"px",e.style.width=e.naturalWidth*i+"px",e.style.left=`-${t.x*i}px`,e.style.top=`-${t.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=bt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const wt={insertElements(t,e){r(e)?Te(t,this.media,{src:e}):d(e)&&e.forEach(e=>{Te(t,this.media,e)})},change(l){be(l,"sources.length")?(L.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],g(this.media),this.media=null,T(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=l,[{provider:i=j.html5,src:s}]=e,n="html5"===i?t:"div",a="html5"===i?{}:{src:s};Object.assign(this,{provider:i,type:t,supported:P.check(t,i,this.config.playsinline),media:C(n,a)}),this.elements.container.appendChild(this.media),w(l.autoplay)&&(this.config.autoplay=l.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),k(l.poster)||(this.poster=l.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),D.addStyleHook.call(this),this.isHTML5&&wt.insertElements.call(this,"source",e),this.config.title=l.title,gt.setup.call(this),this.isHTML5&&Object.keys(l).includes("tracks")&&wt.insertElements.call(this,"track",l.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&D.build.call(this),this.isHTML5&&this.media.load(),k(l.previewThumbnails)||(Object.assign(this.config.previewThumbnails,l.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vt(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Tt{constructor(e,t){if(l(this,"play",()=>c(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>M(this.media.play())),this.media.play()):null),l(this,"pause",()=>this.playing&&c(this.media.pause)?this.media.pause():null),l(this,"togglePlay",e=>(w(e)?e:!this.playing)?this.play():this.pause()),l(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):c(this.media.stop)&&this.media.stop()}),l(this,"restart",()=>{this.currentTime=0}),l(this,"rewind",e=>{this.currentTime-=v(e)?e:this.config.seekTime}),l(this,"forward",e=>{this.currentTime+=v(e)?e:this.config.seekTime}),l(this,"increaseVolume",e=>{const t=this.media.muted?0:this.volume;this.volume=t+(v(e)?e:0)}),l(this,"decreaseVolume",e=>{this.increaseVolume(-e)}),l(this,"airplay",()=>{P.airplay&&this.media.webkitShowPlaybackTargetPicker()}),l(this,"toggleControls",e=>{if(this.supported.ui&&!this.isAudio){const t=Ae(this.elements.container,this.config.classNames.hideControls),i=void 0===e?void 0:!e,s=b(this.elements.container,this.config.classNames.hideControls,i);if(s&&d(this.config.controls)&&this.config.controls.includes("settings")&&!k(this.config.settings)&&O.toggleMenu.call(this,!1),s!==t){const e=s?"controlshidden":"controlsshown";x.call(this,this.media,e)}return!s}return!1}),l(this,"on",(e,t)=>{N.call(this,this.elements.container,e,t)}),l(this,"once",(e,t)=>{xe.call(this,this.elements.container,e,t)}),l(this,"off",(e,t)=>{Ne(this.elements.container,e,t)}),l(this,"destroy",(e,t=!1)=>
1{if(!this.ready)return;const i=()=>{document.body.style.overflow="",this.embed=null,t?(Object.keys(this.elements).length&&(g(this.elements.buttons.play),g(this.elements.captions),g(this.elements.controls),g(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),c(e)&&e()):(Me.call(this),L.cancelRequests.call(this),Ce(this.elements.original,this.elements.container),x.call(this,this.elements.original,"destroyed",!0),c(e)&&e.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?(D.toggleNativeControls.call(this,!0),i()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&c(this.embed.destroy)&&this.embed.destroy(),i()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(i),setTimeout(i,200))}),l(this,"supports",e=>P.mime.call(this,e)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=P.touch,this.media=e,r(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||de(this.media)||d(this.media))&&(this.media=this.media[0]),this.config=m({},Ze,Tt.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(e){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 nt(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",P),o(this.media)||!T(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(!P.check().api)return void this.debug.error("Setup failed: no support");const i=this.media.cloneNode(!0);i.autoplay=!1,this.elements.original=i;const s=this.media.tagName.toLowerCase();let n=null,a=null;switch(s){case"div":if(n=this.media.querySelector("iframe"),T(n)){if(a=Je(n.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?j.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?j.vimeo:null}(a.toString()),this.elements.container=this.media,this.media=n,this.elements.container.className="",a.search.length){const l=["1","true"];l.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(k(this.provider)||!Object.values(j).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=it;break;case"video":case"audio":this.type=s,this.provider=j.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=P.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new lt(this),this.storage=new ze(this),this.media.plyr=this,T(this.elements.container)||(this.elements.container=C("div",{tabindex:0}),ve(this.media,this.elements.container)),D.migrateStyles.call(this),D.addStyleHook.call(this),gt.setup.call(this),this.config.debug&&N.call(this,this.elements.container,this.config.events.join(" "),e=>{this.debug.log(`event: ${e.type}`)}),this.fullscreen=new q(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&D.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new ft(this)),this.isHTML5&&this.config.auto
1play&&this.once("canplay",()=>M(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vt(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===j.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===j.youtube}get isVimeo(){return this.provider===j.vimeo}get isVideo(){return this.type===it}get isAudio(){return this.type===e}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(e){if(!this.duration)return;const t=v(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return v(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,i=v(t)&&t!==1/0?t:0;return e||i}set volume(e){let t=e;r(t)&&(t=Number(t)),v(t)||(t=this.storage.get("volume")),v(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!k(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;w(t)||(t=this.storage.get("muted")),w(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||(!!this.isAudio||(Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)))}set speed(e){let t=null;v(e)&&(t=e),v(t)||(t=this.storage.get("speed")),v(t)||(t=this.config.speed.selected);const{minimumSpeed:i,maximumSpeed:s}=this;t=function(e=0,t=0,i=255){return Math.min(Math.max(e,t),i)}(t,i,s),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,i=this.options.quality;if(!i.length)return;let s=[!k(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(v),n=!0;if(!i.includes(s)){const e=$e(i,s);this.debug.warn(`Unsupported quality option: ${s}, using ${e} instead`),s=e,n=!1}t.selected=s,this.media.quality=s,n&&this.storage.set({quality:s})}get quality(){return this.media.quality}set loop(e){const t=w(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(e){wt.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return ge(e)?e:this.source}set download(e){ge(e)&&(this.config.urls.download=e,O.setDownloadUrl.call(this))}set poster(e){this.isVideo?D.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=qe(De.call(this));return d(e)?e.join(":"):e}set ratio(e){this.isVideo?r(e)&&je(e)?(this.config.ratio=qe(e),I.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){const t=w(e)?e:this.config.autoplay;this.config.autoplay=t}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(e){_.toggle.call(this,e,!1)}set currentTrack(e){_.set.call(this,e,!1),_.setup()}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){_.setLanguage.call(this,e,!1)}get language(){return(_.getCurrentTrack.call(this)||{}).language}set pip(e){if(!P.pip)return;const t=w(e)?e:!this.pip;c(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?et:tt),c(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return P.pip?k(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===et:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new vt(this))}
1static supported(e,t,i){return P.check(e,t,i)}static loadSprite(e,t){return Ye(e,t)}static setup(e,t={}){let i=null;return r(e)?i=Array.from(document.querySelectorAll(e)):de(e)?i=Array.from(e):d(e)&&(i=e.filter(T)),k(i)?null:i.map(e=>new Tt(e,t))}}return Tt.defaults=(rt=Ze,JSON.parse(JSON.stringify(rt))),Tt}())},8105:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var d=i(355),t=i(6158),s=i.n(t);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i,s=arguments[t];for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e}).apply(this,arguments)}function m(e,t){if(null==e)return{};var i,s=function(e,t){if(null==e)return{};for(var i,s={},n=Object.keys(e),a=0;a<n.length;a++)i=n[a],0<=t.indexOf(i)||(s[i]=e[i]);return s}(e,t);if(Object.getOwnPropertySymbols)for(var n=Object.getOwnPropertySymbols(e),a=0;a<n.length;a++)i=n[a],0<=t.indexOf(i)||Object.prototype.propertyIsEnumerable.call(e,i)&&(s[i]=e[i]);return s}function g(e,t){var i=t.options,t=t.source;return(i=new(s())(".plyr-react",i||{})).source=t,i}function f(e){e&&e.destroy()}function n(){}function y(e){return e?function(){return{plyr:e}}:function(){return new Proxy({plyr:{source:null}},{get:function(e,t){return"plyr"===t?e[t]:n}})}}i=d.forwardRef(function(e,t){var i,s,n,a,l,o,r,c=e.source,h=e.options,h=void 0===h?null:h,e=m(e,["source","options"]),u=(t=t,u={instantiate:g,getAPI:y,destroy:f,params:{options:h,source:c}},void 0===(h=[h,c])&&(h=[]),i=(c=(0,d.useState)(null))[0],s=c[1],n=(0,d.useRef)(null),a=u.instantiate,l=u.destroy,o=u.getAPI,r=u.params,(0,d.useEffect)(function(){var e=a(n.current,r);return s(e),function(){l&&l(e,r)}},h),c=(0,d.useMemo)(function(){return o(i,r)},[i]),(0,d.useImperativeHandle)(t,c,[c]),n);return d.createElement("video",p({ref:u,className:"plyr-react plyr"},e))});i.displayName="Plyr",i.defaultProps={options:{controls:["rewind","play","fast-forward","progress","current-time","duration","mute","volume","settings","fullscreen"],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",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop"}},source:{type:"video",sources:[{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:720},{src:"https://cdn.plyr.io/static/blank.mp4",type:"video/mp4",size:1080}]}};const a=i}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.