plyr-rails 3.3.6 → 3.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -10
- data/lib/plyr/rails/version.rb +1 -1
- data/vendor/assets/javascripts/plyr.js +1 -2
- data/vendor/assets/stylesheets/plyr.css +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d2e0b1e47cbe9847ad95f74e6a2b5edadd1702846d08190adb3d0d16cd45fd
|
4
|
+
data.tar.gz: 51aba41ab20ed2182a25bf5de5c2a9fae810b6fa59d5d2abc2eadfb00f766989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 672806ffa51ff02f92267045b595761bbb484d2535e84a44e04d8a2e9b03ec66b08d287dbea998421e5d6b398c00386c8e068ffb820934e26ee25030b0ed6c91
|
7
|
+
data.tar.gz: 8f15dffeadb0e3b896932bea09ef491c77572ffe0b96a2c5a4d38014faae9d424589e608329fdcc929d1c8202ba79c5e4bc41dfcf636867d21f8846290b0dafb
|
data/README.md
CHANGED
@@ -38,24 +38,27 @@ Now you need to edit your `app/assets/javascripts/application.js` file and add t
|
|
38
38
|
//= require plyr
|
39
39
|
```
|
40
40
|
|
41
|
-
|
41
|
+
### Note: Usage code has be updated to plyr version 3. Please update your code, if you're using plyr version 2
|
42
42
|
|
43
|
-
Here is the example working code to test with your Rails application.
|
43
|
+
Here is the example of working code with Jquery to test with your Rails application.
|
44
44
|
|
45
45
|
Add this sample code to your `app/assets/javascripts/application.js` file
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
Using with Javascript and turbolinks
|
48
|
+
|
49
|
+
``` javascript
|
50
|
+
|
51
|
+
document.addEventListener("turbolinks:load", function() {
|
52
|
+
const player = new Plyr('#player');
|
50
53
|
});
|
51
54
|
|
52
55
|
```
|
53
56
|
|
54
|
-
Using with turbolinks
|
57
|
+
Using with Jquery required and turbolinks
|
55
58
|
|
56
59
|
``` javascript
|
57
60
|
$(document).on("turbolinks:load", function() {
|
58
|
-
new Plyr('#
|
61
|
+
const player = new Plyr('#player');
|
59
62
|
});
|
60
63
|
|
61
64
|
```
|
@@ -64,9 +67,7 @@ Add this sample code to your template file like `index.html.erb`
|
|
64
67
|
|
65
68
|
``` html
|
66
69
|
<!-- Place somewhere in the <body> of your page -->
|
67
|
-
<div id="plyr">
|
68
|
-
<div data-plyr-embed-id="bTqVqk7FSmY" data-plyr-provider"youtube"></div>
|
69
|
-
</div>
|
70
|
+
<div id="player" data-plyr-provider="youtube" data-plyr-embed-id="bTqVqk7FSmY"></div>
|
70
71
|
```
|
71
72
|
|
72
73
|
## More HTML examples
|
data/lib/plyr/rails/version.rb
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Plyr",t):e.Plyr=t()}(this,function(){"use strict";"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e,t,i=(function(e,t){var i;i=function(){var e=function(){},t={},i={},n={};function s(e,t){if(e){var s=n[e];if(i[e]=t,s)for(;s.length;)s[0](e,t),s.splice(0,1)}}function a(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function l(t,i,n,s){var a,r,o=document,c=n.async,u=(n.numRetries||0)+1,d=n.before||e,p=t.replace(/^(css|img)!/,"");s=s||0,/(^css!|\.css$)/.test(t)?(a=!0,(r=o.createElement("link")).rel="stylesheet",r.href=p):/(^img!|\.(png|gif|jpg|svg)$)/.test(t)?(r=o.createElement("img")).src=p:((r=o.createElement("script")).src=t,r.async=void 0===c||c),r.onload=r.onerror=r.onbeforeload=function(e){var o=e.type[0];if(a&&"hideFocus"in r)try{r.sheet.cssText.length||(o="e")}catch(e){o="e"}if("e"==o&&(s+=1)<u)return l(t,i,n,s);i(t,o,e.defaultPrevented)},!1!==d(t,r)&&o.head.appendChild(r)}function r(e,i,n){var r,o;if(i&&i.trim&&(r=i),o=(r?n:i)||{},r){if(r in t)throw"LoadJS";t[r]=!0}!function(e,t,i){var n,s,a=(e=e.push?e:[e]).length,r=a,o=[];for(n=function(e,i,n){if("e"==i&&o.push(e),"b"==i){if(!n)return;o.push(e)}--a||t(o)},s=0;s<r;s++)l(e[s],n,i)}(e,function(e){a(o,e),s(r,e)},o)}return r.ready=function(e,t){return function(e,t){var s,a,l,r=[],o=(e=e.push?e:[e]).length,c=o;for(s=function(e,i){i.length&&r.push(e),--c||t(r)};o--;)a=e[o],(l=i[a])?s(a,l):(n[a]=n[a]||[]).push(s)}(e,function(e){a(t,e)}),r},r.done=function(e){s(e,[])},r.reset=function(){t={},i={},n={}},r.isDefined=function(e){return e in t},r},e.exports=i()}(e={exports:{}},e.exports),e.exports),n={html5:"html5",youtube:"youtube",vimeo:"vimeo"},s={audio:"audio",video:"video"},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,s=!1,a=void 0;try{for(var l,r=e[Symbol.iterator]();!(n=(l=r.next()).done)&&(i.push(l.value),!t||i.length!==t);n=!0);}catch(e){s=!0,a=e}finally{try{!n&&r.return&&r.return()}finally{if(s)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c={is:{plyr:function(e){return this.instanceof(e,window.Plyr)},object:function(e){return this.getConstructor(e)===Object},number:function(e){return this.getConstructor(e)===Number&&!Number.isNaN(e)},string:function(e){return this.getConstructor(e)===String},boolean:function(e){return this.getConstructor(e)===Boolean},function:function(e){return this.getConstructor(e)===Function},array:function(e){return!this.nullOrUndefined(e)&&Array.isArray(e)},weakMap:function(e){return this.instanceof(e,window.WeakMap)},nodeList:function(e){return this.instanceof(e,window.NodeList)},element:function(e){return this.instanceof(e,window.Element)},textNode:function(e){return this.getConstructor(e)===Text},event:function(e){return this.instanceof(e,window.Event)},cue:function(e){return this.instanceof(e,window.TextTrackCue)||this.instanceof(e,window.VTTCue)},track:function(e){return this.instanceof(e,TextTrack)||!this.nullOrUndefined(e)&&this.string(e.kind)},url:function(e){return!this.nullOrUndefined(e)&&/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/.test(e)},nullOrUndefined:function(e){return null===e||void 0===e},empty:function(e){return this.nullOrUndefined(e)||(this.string(e)||this.array(e)||this.nodeList(e))&&!e.length||this.object(e)&&!Object.keys(e).length},instanceof:function(e,t){return Boolean(e&&t&&e instanceof t)},getConstructor:function(e){return this.nullOrUndefined(e)?null:e.constructor}},getBrowser:function(){return{isIE:!!document.documentMode,isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:/(iPad|iPhone|iPod)/gi.test(navigator.platform)}},fetch:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise(function(i,n){try{var s=new XMLHttpRequest;if(!("withCredentials"in s))return;s.addEventListener("load",function(){if("text"===t)try{i(JSON.parse(s.responseText))}catch(e){i(s.responseText)}else i(s.response)}),s.addEventListener("error",function(){throw new Error(s.statusText)}),s.open("GET",e,!0),s.responseType=t,s.send()}catch(e){n(e)}})},loadScript:function(e){return new Promise(function(t,n){i(e,{success:t,error:n})})},loadSprite:function(e,t){if(c.is.string(e)){var i=c.is.string(t),n=function(){return document.querySelectorAll("#"+t).length};if(!i||!n()){var s=document.createElement("div");if(c.toggleHidden(s,!0),i&&s.setAttribute("id",t),u.storage){var a=window.localStorage.getItem("cache-"+t);if(null!==a){var l=JSON.parse(a);return void r.call(s,l.content)}}c.fetch(e).then(function(e){c.is.empty(e)||(u.storage&&window.localStorage.setItem("cache-"+t,JSON.stringify({content:e})),r.call(s,e))}).catch(function(){})}}function r(e){i&&n()||(this.innerHTML=e,document.body.insertBefore(this,document.body.childNodes[0]))}},generateId:function(e){return e+"-"+Math.floor(1e4*Math.random())},wrap:function(e,t){var i=e.length?e:[e];Array.from(i).reverse().forEach(function(e,i){var n=i>0?t.cloneNode(!0):t,s=e.parentNode,a=e.nextSibling;n.appendChild(e),a?s.insertBefore(n,a):s.appendChild(n)})},createElement:function(e,t,i){var n=document.createElement(e);return c.is.object(t)&&c.setAttributes(n,t),c.is.string(i)&&(n.textContent=i),n},insertAfter:function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},insertElement:function(e,t,i,n){t.appendChild(c.createElement(e,i,n))},removeElement:function(e){c.is.nodeList(e)||c.is.array(e)?Array.from(e).forEach(c.removeElement):c.is.element(e)&&c.is.element(e.parentNode)&&e.parentNode.removeChild(e)},emptyElement:function(e){for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1},replaceElement:function(e,t){return c.is.element(t)&&c.is.element(t.parentNode)&&c.is.element(e)?(t.parentNode.replaceChild(e,t),e):null},setAttributes:function(e,t){c.is.element(e)&&!c.is.empty(t)&&Object.entries(t).forEach(function(t){var i=o(t,2),n=i[0],s=i[1];e.setAttribute(n,s)})},getAttributesFromSelector:function(e,t){if(!c.is.string(e)||c.is.empty(e))return{};var i={},n=t;return e.split(",").forEach(function(e){var t=e.trim(),s=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),l=a[0],r=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":c.is.object(n)&&c.is.string(n.class)&&(n.class+=" "+s),i.class=s;break;case"#":i.id=t.replace("#","");break;case"[":i[l]=r}}),i},toggleHidden:function(e,t){if(c.is.element(e)){var i=t;c.is.boolean(i)||(i=!e.hasAttribute("hidden")),i?e.setAttribute("hidden",""):e.removeAttribute("hidden")}},toggleClass:function(e,t,i){if(c.is.element(e)){var n=e.classList.contains(t);return e.classList[i?"add":"remove"](t),i&&!n||!i&&n}return null},hasClass:function(e,t){return c.is.element(e)&&e.classList.contains(t)},matches:function(e,t){var i={Element:Element};var n=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)};return n.call(e,t)},getElements:function(e){return this.elements.container.querySelectorAll(e)},getElement:function(e){return this.elements.container.querySelector(e)},getFocusElement:function(){var e=document.activeElement;return e=e&&e!==document.body?document.querySelector(":focus"):null},trapFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c.is.element(e)){var i=c.getElements.call(this,"button:not(:disabled), input:not(:disabled), [tabindex]"),n=i[0],s=i[i.length-1],a=function(e){if("Tab"===e.key&&9===e.keyCode){var t=c.getFocusElement();t!==s||e.shiftKey?t===n&&e.shiftKey&&(s.focus(),e.preventDefault()):(n.focus(),e.preventDefault())}};t?c.on(this.elements.container,"keydown",a,!1):c.off(this.elements.container,"keydown",a,!1)}},toggleListener:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(!c.is.empty(e)&&!c.is.empty(t)&&c.is.function(i))if(c.is.nodeList(e)||c.is.array(e))Array.from(e).forEach(function(e){e instanceof Node&&c.toggleListener.call(null,e,t,i,n,s,a)});else{var l=t.split(" "),r=a;u.passiveListeners&&(r={passive:s,capture:a}),l.forEach(function(t){e[n?"addEventListener":"removeEventListener"](t,i,r)})}},on:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];c.toggleListener(e,t,i,!0,n,s)},off:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];c.toggleListener(e,t,i,!1,n,s)},dispatchEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(c.is.element(e)&&!c.is.empty(t)){var s=new CustomEvent(t,{bubbles:i,detail:Object.assign({},n,{plyr:c.is.plyr(this)?this:null})});e.dispatchEvent(s)}},toggleState:function(e,t){if(c.is.array(e)||c.is.nodeList(e))Array.from(e).forEach(function(e){return c.toggleState(e,t)});else if(c.is.element(e)){var i="true"===e.getAttribute("aria-pressed"),n=c.is.boolean(t)?t:!i;e.setAttribute("aria-pressed",n)}},format:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return c.is.empty(e)?e:e.toString().replace(/{(\d+)}/g,function(e,t){return c.is.string(i[t])?i[t]:""})},getPercentage:function(e,t){return 0===e||0===t||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)},getHours:function(e){return parseInt(e/60/60%60,10)},getMinutes:function(e){return parseInt(e/60%60,10)},getSeconds:function(e){return parseInt(e%60,10)},formatTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!c.is.number(e))return this.formatTime(null,t,i);var n=function(e){return("0"+e).slice(-2)},s=this.getHours(e),a=this.getMinutes(e),l=this.getSeconds(e);return t||s>0?s+=":":s="",(i?"-":"")+s+n(a)+":"+n(l)},replaceAll:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString())},toTitleCase:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},toPascalCase:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return e=c.replaceAll(e,"-"," "),e=c.replaceAll(e,"_"," "),e=c.toTitleCase(e),c.replaceAll(e," ","")},toCamelCase:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(e=c.toPascalCase(e)).charAt(0).toLowerCase()+e.slice(1)},extend:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(!i.length)return e;var s=i.shift();return c.is.object(s)?(Object.keys(s).forEach(function(t){c.is.object(s[t])?(Object.keys(e).includes(t)||Object.assign(e,r({},t,{})),c.extend(e[t],s[t])):Object.assign(e,r({},t,s[t]))}),c.extend.apply(c,[e].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}(i)))):e},dedupe:function(e){return c.is.array(e)?e.filter(function(t,i){return e.indexOf(t)===i}):e},closest:function(e,t){return c.is.array(e)&&e.length?e.reduce(function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e}):null},getProviderByUrl:function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/.+$/.test(e)?n.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?n.vimeo:null},parseYouTubeId:function(e){if(c.is.empty(e))return null;return e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e},parseVimeoId:function(e){if(c.is.empty(e))return null;if(c.is.number(Number(e)))return e;return e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e},parseUrl:function(e){var t=document.createElement("a");return t.href=e,t},getUrlParams:function(e){var t=e;(e.startsWith("http://")||e.startsWith("https://"))&&(t=this.parseUrl(e).search);return this.is.empty(t)?null:t.slice(t.indexOf("?")+1).split("&").reduce(function(e,t){var i=t.split("="),n=o(i,2),s=n[0],a=n[1];return Object.assign(e,r({},s,decodeURIComponent(a)))},{})},buildUrlParams:function(e){return c.is.object(e)?Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&"):""},stripHTML:function(e){var t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText},getAspectRatio:function(e,t){var i=function e(t,i){return 0===i?t:e(i,t%i)}(e,t);return e/i+":"+t/i},get transitionEndEvent(){var e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(t).find(function(t){return void 0!==e.style[t]});return!!c.is.string(i)&&t[i]},repaint:function(e){setTimeout(function(){c.toggleHidden(e,!0),e.offsetHeight,c.toggleHidden(e,!1)},0)}},u={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,i){var n=!1,s=!1,a=c.getBrowser(),l=a.isIPhone&&i&&u.playsinline;switch(t+":"+e){case"html5:video":s=(n=u.video)&&u.rangeInput&&(!a.isIPhone||l);break;case"html5:audio":s=(n=u.audio)&&u.rangeInput;break;case"youtube:video":case"vimeo:video":n=!0,s=u.rangeInput&&(!a.isIPhone||l);break;default:s=(n=u.audio&&u.video)&&u.rangeInput}return{api:n,ui:s}},pip:!c.getBrowser().isIPhone&&c.is.function(c.createElement("video").webkitSetPresentationMode),airplay:c.is.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(e){var t=this.media;try{if(!this.isHTML5||!c.is.function(t.canPlayType))return!1;if(e.includes("codecs="))return t.canPlayType(e).replace(/no/,"");if(this.isVideo)switch(e){case"video/webm":return t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/no/,"");case"video/mp4":return t.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,"");case"video/ogg":return t.canPlayType('video/ogg; codecs="theora"').replace(/no/,"");default:return!1}else if(this.isAudio)switch(e){case"audio/mpeg":return t.canPlayType("audio/mpeg;").replace(/no/,"");case"audio/ogg":return t.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/,"");case"audio/wav":return t.canPlayType('audio/wav; codecs="1"').replace(/no/,"");default:return!1}}catch(e){return!1}return!1},textTracks:"textTracks"in document.createElement("video"),passiveListeners:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t)}catch(e){}return e}(),rangeInput:(t=document.createElement("input"),t.type="range","range"===t.type),touch:"ontouchstart"in document.documentElement,transitions:!1!==c.transitionEndEvent,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},d={getSources:function(){return this.isHTML5?this.media.querySelectorAll("source"):null},getQualityOptions:function(){if(!this.isHTML5)return null;var e=d.getSources.call(this);if(c.is.empty(e))return null;var t=Array.from(e).filter(function(e){return!c.is.empty(e.getAttribute("size"))});return c.is.empty(t)?null:c.dedupe(t.map(function(e){return Number(e.getAttribute("size"))}))},extend:function(){if(this.isHTML5){var e=this;Object.defineProperty(e.media,"quality",{get:function(){var t=d.getSources.call(e);if(c.is.empty(t))return null;var i=Array.from(t).filter(function(t){return t.getAttribute("src")===e.source});return c.is.empty(i)?null:Number(i[0].getAttribute("size"))},set:function(t){var i=d.getSources.call(e);if(!c.is.empty(i)){var n=Array.from(i).filter(function(e){return Number(e.getAttribute("size"))===t});if(!c.is.empty(n)){var s=n.filter(function(t){return u.mime.call(e,t.getAttribute("type"))});if(!c.is.empty(s)){c.dispatchEvent.call(e,e.media,"qualityrequested",!1,{quality:t});var a=e.currentTime,l=e.playing;e.media.src=s[0].getAttribute("src"),e.media.load(),l&&e.play(),e.currentTime=a,c.dispatchEvent.call(e,e.media,"qualitychange",!1,{quality:t})}}}}})}},cancelRequests:function(){this.isHTML5&&(c.removeElement(d.getSources()),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c.is.empty(e)||c.is.empty(t)||!Object.keys(t.i18n).includes(e))return"";var i=t.i18n[e],n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach(function(e){var t=o(e,2),n=t[0],s=t[1];i=c.replaceAll(i,n,s)}),i},h=c.getBrowser(),m={addStyleHook:function(){c.toggleClass(this.elements.container,this.config.selectors.container.replace(".",""),!0),c.toggleClass(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for "+this.provider+" "+this.type),void m.toggleNativeControls.call(this,!0);c.is.element(this.elements.controls)||(f.inject.call(this),this.listeners.controls()),m.toggleNativeControls.call(this),y.setup.call(this),this.volume=null,this.muted=null,this.speed=null,this.loop=null,this.quality=null,m.updateVolume.call(this),m.timeUpdate.call(this),m.checkPlaying.call(this),c.toggleClass(this.elements.container,this.config.classNames.pip.supported,u.pip&&this.isHTML5&&this.isVideo),c.toggleClass(this.elements.container,this.config.classNames.airplay.supported,u.airplay&&this.isHTML5),c.toggleClass(this.elements.container,this.config.classNames.isIos,h.isIos),c.toggleClass(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(function(){c.dispatchEvent.call(e,e.media,"ready")},0),m.setTitle.call(this),m.setPoster.call(this)},setTitle:function(){var e=p("play",this.config);if(c.is.string(this.config.title)&&!c.is.empty(this.config.title)&&(e+=", "+this.config.title,this.elements.container.setAttribute("aria-label",this.config.title)),c.is.nodeList(this.elements.buttons.play)&&Array.from(this.elements.buttons.play).forEach(function(t){t.setAttribute("aria-label",e)}),this.isEmbed){var t=c.getElement.call(this,"iframe");if(!c.is.element(t))return;var i=c.is.empty(this.config.title)?"video":this.config.title,n=p("frameTitle",this.config);t.setAttribute("title",n.replace("{title}",i))}},setPoster:function(){if(c.is.element(this.elements.poster)&&!c.is.empty(this.poster)){var e=this.poster.split(",");this.elements.poster.style.backgroundImage=e.map(function(e){return"url('"+e+"')"}).join(",")}},checkPlaying:function(e){c.toggleClass(this.elements.container,this.config.classNames.playing,this.playing),c.toggleClass(this.elements.container,this.config.classNames.paused,this.paused),c.toggleClass(this.elements.container,this.config.classNames.stopped,this.stopped),c.toggleState(this.elements.buttons.play,this.playing),c.is.event(e)&&"timeupdate"===e.type||this.toggleControls(!this.playing)},checkLoading:function(e){var t=this;this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(function(){c.toggleClass(t.elements.container,t.config.classNames.loading,t.loading),t.toggleControls(t.loading)},this.loading?250:0)},checkFailed:function(){var e=this;this.failed=3===this.media.networkState,this.failed&&(c.toggleClass(this.elements.container,this.config.classNames.loading,!1),c.toggleClass(this.elements.container,this.config.classNames.error,!0)),clearTimeout(this.timers.failed),this.timers.loading=setTimeout(function(){c.toggleClass(e.elements.container,e.config.classNames.loading,e.loading),e.toggleControls(e.loading)},this.loading?250:0)},updateVolume:function(){this.supported.ui&&(c.is.element(this.elements.inputs.volume)&&m.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),c.is.element(this.elements.buttons.mute)&&c.toggleState(this.elements.buttons.mute,this.muted||0===this.volume))},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;c.is.element(e)&&(e.value=t,f.updateRangeFill.call(this,e))},setProgress:function(e,t){var i=c.is.number(t)?t:0,n=c.is.element(e)?e:this.elements.display.buffer;if(c.is.element(n)){n.value=i;var s=n.getElementsByTagName("span")[0];c.is.element(s)&&(s.childNodes[0].nodeValue=i)}},updateProgress:function(e){if(this.supported.ui&&c.is.event(e)){var t=0;if(e)switch(e.type){case"timeupdate":case"seeking":t=c.getPercentage(this.currentTime,this.duration),"timeupdate"===e.type&&m.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":m.setProgress.call(this,this.elements.display.buffer,100*this.buffered)}}},updateTimeDisplay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(c.is.element(e)&&c.is.number(t)){var n=c.getHours(this.duration)>0;e.textContent=c.formatTime(t,n,i)}},timeUpdate:function(e){var t=!c.is.element(this.elements.display.duration)&&this.config.invertTime;m.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||m.updateProgress.call(this,e)},durationUpdate:function(){if(this.supported.ui){var e=c.is.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&m.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&m.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),f.updateSeekTooltip.call(this)}}},g=c.getBrowser(),f={updateRangeFill:function(e){var t=c.is.event(e)?e.target:e;c.is.element(t)&&"range"===t.getAttribute("type")&&(t.setAttribute("aria-valuenow",t.value),g.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%"))},getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location).host!==window.location.host||g.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=c.getElement.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:c.getElements.call(this,this.config.selectors.buttons.play),pause:c.getElement.call(this,this.config.selectors.buttons.pause),restart:c.getElement.call(this,this.config.selectors.buttons.restart),rewind:c.getElement.call(this,this.config.selectors.buttons.rewind),fastForward:c.getElement.call(this,this.config.selectors.buttons.fastForward),mute:c.getElement.call(this,this.config.selectors.buttons.mute),pip:c.getElement.call(this,this.config.selectors.buttons.pip),airplay:c.getElement.call(this,this.config.selectors.buttons.airplay),settings:c.getElement.call(this,this.config.selectors.buttons.settings),captions:c.getElement.call(this,this.config.selectors.buttons.captions),fullscreen:c.getElement.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=c.getElement.call(this,this.config.selectors.progress),this.elements.inputs={seek:c.getElement.call(this,this.config.selectors.inputs.seek),volume:c.getElement.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:c.getElement.call(this,this.config.selectors.display.buffer),currentTime:c.getElement.call(this,this.config.selectors.display.currentTime),duration:c.getElement.call(this,this.config.selectors.display.duration)},c.is.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector("."+this.config.classNames.tooltip)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon:function(e,t){var i=f.getIconUrl.call(this),n=(i.cors?"":i.url)+"#"+this.config.iconPrefix,s=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributes(s,c.extend(t,{role:"presentation",focusable:"false"}));var a=document.createElementNS("http://www.w3.org/2000/svg","use"),l=n+"-"+e;return"href"in a?a.setAttributeNS("http://www.w3.org/1999/xlink","href",l):a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),s.appendChild(a),s},createLabel:function(e,t){var i=p(e,this.config),n=Object.assign({},t);switch(e){case"pip":i="PIP";break;case"airplay":i="AirPlay"}return"class"in n?n.class+=" "+this.config.classNames.hidden:n.class=this.config.classNames.hidden,c.createElement("span",n,i)},createBadge:function(e){if(c.is.empty(e))return null;var t=c.createElement("span",{class:this.config.classNames.menu.value});return t.appendChild(c.createElement("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var i=c.createElement("button"),n=Object.assign({},t),s=c.toCamelCase(e),a=!1,l=void 0,r=void 0,o=void 0,u=void 0;switch("type"in n||(n.type="button"),"class"in n?n.class.includes(this.config.classNames.control)&&(n.class+=" "+this.config.classNames.control):n.class=this.config.classNames.control,e){case"play":a=!0,l="play",o="pause",r="play",u="pause";break;case"mute":a=!0,l="mute",o="unmute",r="volume",u="muted";break;case"captions":a=!0,l="enableCaptions",o="disableCaptions",r="captions-off",u="captions-on";break;case"fullscreen":a=!0,l="enterFullscreen",o="exitFullscreen",r="enter-fullscreen",u="exit-fullscreen";break;case"play-large":n.class+=" "+this.config.classNames.control+"--overlaid",s="play",l="play",r="play";break;default:l=s,r=e}return a?(i.appendChild(f.createIcon.call(this,u,{class:"icon--pressed"})),i.appendChild(f.createIcon.call(this,r,{class:"icon--not-pressed"})),i.appendChild(f.createLabel.call(this,o,{class:"label--pressed"})),i.appendChild(f.createLabel.call(this,l,{class:"label--not-pressed"})),n["aria-pressed"]=!1):(i.appendChild(f.createIcon.call(this,r)),i.appendChild(f.createLabel.call(this,l))),c.extend(n,c.getAttributesFromSelector(this.config.selectors.buttons[s],n)),c.setAttributes(i,n),"play"===s?(c.is.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(i)):this.elements.buttons[s]=i,i},createRange:function(e,t){var i=c.createElement("label",{for:t.id,id:t.id+"-label",class:this.config.classNames.hidden},p(e,this.config)),n=c.createElement("input",c.extend(c.getAttributesFromSelector(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-labelledby":t.id+"-label","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,f.updateRangeFill.call(this,n),{label:i,input:n}},createProgress:function(e,t){var i=c.createElement("progress",c.extend(c.getAttributesFromSelector(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"presentation","aria-hidden":!0},t));if("volume"!==e){i.appendChild(c.createElement("span",null,"0"));var n="";switch(e){case"played":n=p("played",this.config);break;case"buffer":n=p("buffered",this.config)}i.textContent="% "+n.toLowerCase()}return this.elements.display[e]=i,i},createTime:function(e){var t=c.getAttributesFromSelector(this.config.selectors.display[e]),i=c.createElement("div",c.extend(t,{class:"plyr__time "+t.class,"aria-label":p(e,this.config)}),"00:00");return this.elements.display[e]=i,i},createMenuItem:function(e,t,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=c.createElement("li"),r=c.createElement("label",{class:this.config.classNames.control}),o=c.createElement("input",c.extend(c.getAttributesFromSelector(this.config.selectors.inputs[i]),{type:"radio",name:"plyr-"+i,value:e,checked:a,class:"plyr__sr-only"})),u=c.createElement("span",{hidden:""});r.appendChild(o),r.appendChild(u),r.insertAdjacentHTML("beforeend",n),c.is.element(s)&&r.appendChild(s),l.appendChild(r),t.appendChild(l)},updateSeekTooltip:function(e){var t=this;if(this.config.tooltips.seek&&c.is.element(this.elements.inputs.seek)&&c.is.element(this.elements.display.seekTooltip)&&0!==this.duration){var i=0,n=this.elements.inputs.seek.getBoundingClientRect(),s=this.config.classNames.tooltip+"--visible",a=function(e){c.toggleClass(t.elements.display.seekTooltip,s,e)};if(this.touch)a(!1);else{if(c.is.event(e))i=100/n.width*(e.pageX-n.left);else{if(!c.hasClass(this.elements.display.seekTooltip,s))return;i=parseFloat(this.elements.display.seekTooltip.style.left,10)}i<0?i=0:i>100&&(i=100),m.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*i),this.elements.display.seekTooltip.style.left=i+"%",c.is.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&a("mouseenter"===e.type)}}},toggleTab:function(e,t){c.toggleHidden(this.elements.settings.tabs[e],!t)},setQualityMenu:function(e){var t=this;if(c.is.element(this.elements.settings.panes.quality)){var i=this.elements.settings.panes.quality.querySelector("ul");c.is.array(e)&&(this.options.quality=e.filter(function(e){return t.config.quality.options.includes(e)}));var n=!c.is.empty(this.options.quality)&&this.options.quality.length>1;if(f.toggleTab.call(this,"quality",n),f.checkMenu.call(this),n){c.emptyElement(i);this.options.quality.sort(function(e,i){var n=t.config.quality.options;return n.indexOf(e)>n.indexOf(i)?1:-1}).forEach(function(e){var n=f.getLabel.call(t,"quality",e);f.createMenuItem.call(t,e,i,"quality",n,function(e){var i="";switch(e){case 2160:i="4K";break;case 1440:case 1080:case 720:i="HD";break;case 576:case 480:i="SD"}return i.length?f.createBadge.call(t,i):null}(e))}),f.updateSetting.call(this,"quality",i)}}},getLabel:function(e,t){switch(e){case"speed":return 1===t?p("normal",this.config):t+"×";case"quality":return c.is.number(t)?t+"p":c.toTitleCase(t);case"captions":return y.getLabel.call(this);default:return null}},updateSetting:function(e,t,i){var n=this.elements.settings.panes[e],s=null,a=t;switch(e){case"captions":s=this.captions.active?this.options.captions.length>2||!this.options.captions.some(function(e){return"enabled"===e})?this.captions.language:"enabled":"";break;default:if(s=c.is.empty(i)?this[e]:i,c.is.empty(s)&&(s=this.config[e].default),!c.is.empty(this.options[e])&&!this.options[e].includes(s))return void this.debug.warn("Unsupported value of '"+s+"' for "+e);if(!this.config[e].options.includes(s))return void this.debug.warn("Disabled value of '"+s+"' for "+e)}if(c.is.element(a)||(a=n&&n.querySelector("ul")),c.is.element(a)){this.elements.settings.tabs[e].querySelector("."+this.config.classNames.menu.value).innerHTML=f.getLabel.call(this,e,s);var l=a&&a.querySelector('input[value="'+s+'"]');c.is.element(l)&&(l.checked=!0)}},setCaptionsMenu:function(){var e=this,t=this.elements.settings.panes.captions.querySelector("ul"),i=y.getTracks.call(this).length;if(f.toggleTab.call(this,"captions",i),c.emptyElement(t),f.checkMenu.call(this),i){var n=y.getTracks.call(this).map(function(t){return{language:c.is.empty(t.language)?"enabled":t.language,label:y.getLabel.call(e,t)}});n.unshift({language:"",label:p("disabled",this.config)}),n.forEach(function(i){f.createMenuItem.call(e,i.language,t,"language",i.label,"enabled"!==i.language?f.createBadge.call(e,i.language.toUpperCase()):null,i.language.toLowerCase()===e.captions.language.toLowerCase())}),this.options.captions=n.map(function(e){return e.language}),f.updateSetting.call(this,"captions",t)}},setSpeedMenu:function(e){var t=this;if(this.config.controls.includes("settings")&&this.config.settings.includes("speed")&&c.is.element(this.elements.settings.panes.speed)){c.is.array(e)?this.options.speed=e:(this.isHTML5||this.isVimeo)&&(this.options.speed=[.5,.75,1,1.25,1.5,1.75,2]),this.options.speed=this.options.speed.filter(function(e){return t.config.speed.options.includes(e)});var i=!c.is.empty(this.options.speed)&&this.options.speed.length>1;if(f.toggleTab.call(this,"speed",i),f.checkMenu.call(this),i){var n=this.elements.settings.panes.speed.querySelector("ul");c.emptyElement(n),this.options.speed.forEach(function(e){var i=f.getLabel.call(t,"speed",e);f.createMenuItem.call(t,e,n,"speed",i)}),f.updateSetting.call(this,"speed",n)}}},checkMenu:function(){var e=this.elements.settings.tabs,t=!c.is.empty(e)&&Object.values(e).some(function(e){return!e.hidden});c.toggleHidden(this.elements.settings.menu,!t)},toggleMenu:function(e){var t=this.elements.settings.form,i=this.elements.buttons.settings;if(c.is.element(t)&&c.is.element(i)){var n=c.is.boolean(e)?e:c.is.element(t)&&t.hasAttribute("hidden");if(c.is.event(e)){var s=c.is.element(t)&&t.contains(e.target),a=e.target===this.elements.buttons.settings;if(s||!s&&!a&&n)return;a&&e.stopPropagation()}c.is.element(i)&&i.setAttribute("aria-expanded",n),c.is.element(t)&&(c.toggleHidden(t,!n),c.toggleClass(this.elements.container,this.config.classNames.menu.open,n),n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",-1))}},getTabSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),Array.from(t.querySelectorAll("input[name]")).forEach(function(e){var t=e.getAttribute("name");e.setAttribute("name",t+"-clone")}),e.parentNode.appendChild(t);var i=t.scrollWidth,n=t.scrollHeight;return c.removeElement(t),{width:i,height:n}},showTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.elements.settings.menu,i=document.getElementById(e);if(c.is.element(i)&&"tabpanel"===i.getAttribute("role")){var n=t.querySelector('[role="tabpanel"]:not([hidden])'),s=n.parentNode;if(Array.from(t.querySelectorAll('[aria-controls="'+n.getAttribute("id")+'"]')).forEach(function(e){e.setAttribute("aria-expanded",!1)}),u.transitions&&!u.reducedMotion){s.style.width=n.scrollWidth+"px",s.style.height=n.scrollHeight+"px";var a=f.getTabSize.call(this,i);c.on(s,c.transitionEndEvent,function e(t){t.target===s&&["width","height"].includes(t.propertyName)&&(s.style.width="",s.style.height="",c.off(s,c.transitionEndEvent,e))}),s.style.width=a.width+"px",s.style.height=a.height+"px"}c.toggleHidden(n,!0),n.setAttribute("tabindex",-1),c.toggleHidden(i,!1);var l=c.getElements.call(this,'[aria-controls="'+e+'"]');Array.from(l).forEach(function(e){e.setAttribute("aria-expanded",!0)}),i.removeAttribute("tabindex"),i.querySelectorAll("button:not(:disabled), input:not(:disabled), [tabindex]")[0].focus()}},create:function(e){var t=this;if(c.is.empty(this.config.controls))return null;var i=c.createElement("div",c.getAttributesFromSelector(this.config.selectors.controls.wrapper));if(this.config.controls.includes("restart")&&i.appendChild(f.createButton.call(this,"restart")),this.config.controls.includes("rewind")&&i.appendChild(f.createButton.call(this,"rewind")),this.config.controls.includes("play")&&i.appendChild(f.createButton.call(this,"play")),this.config.controls.includes("fast-forward")&&i.appendChild(f.createButton.call(this,"fast-forward")),this.config.controls.includes("progress")){var n=c.createElement("div",c.getAttributesFromSelector(this.config.selectors.progress)),s=f.createRange.call(this,"seek",{id:"plyr-seek-"+e.id});if(n.appendChild(s.label),n.appendChild(s.input),n.appendChild(f.createProgress.call(this,"buffer")),this.config.tooltips.seek){var a=c.createElement("span",{role:"tooltip",class:this.config.classNames.tooltip},"00:00");n.appendChild(a),this.elements.display.seekTooltip=a}this.elements.progress=n,i.appendChild(this.elements.progress)}if(this.config.controls.includes("current-time")&&i.appendChild(f.createTime.call(this,"currentTime")),this.config.controls.includes("duration")&&i.appendChild(f.createTime.call(this,"duration")),this.config.controls.includes("mute")&&i.appendChild(f.createButton.call(this,"mute")),this.config.controls.includes("volume")){var l=c.createElement("div",{class:"plyr__volume"}),r={max:1,step:.05,value:this.config.volume},o=f.createRange.call(this,"volume",c.extend(r,{id:"plyr-volume-"+e.id}));l.appendChild(o.label),l.appendChild(o.input),this.elements.volume=l,i.appendChild(l)}if(this.config.controls.includes("captions")&&i.appendChild(f.createButton.call(this,"captions")),this.config.controls.includes("settings")&&!c.is.empty(this.config.settings)){var h=c.createElement("div",{class:"plyr__menu",hidden:""});h.appendChild(f.createButton.call(this,"settings",{id:"plyr-settings-toggle-"+e.id,"aria-haspopup":!0,"aria-controls":"plyr-settings-"+e.id,"aria-expanded":!1}));var m=c.createElement("form",{class:"plyr__menu__container",id:"plyr-settings-"+e.id,hidden:"","aria-labelled-by":"plyr-settings-toggle-"+e.id,role:"tablist",tabindex:-1}),g=c.createElement("div"),y=c.createElement("div",{id:"plyr-settings-"+e.id+"-home","aria-labelled-by":"plyr-settings-toggle-"+e.id,role:"tabpanel"}),v=c.createElement("ul",{role:"tablist"});this.config.settings.forEach(function(i){var n=c.createElement("li",{role:"tab",hidden:""}),s=c.createElement("button",c.extend(c.getAttributesFromSelector(t.config.selectors.buttons.settings),{type:"button",class:t.config.classNames.control+" "+t.config.classNames.control+"--forward",id:"plyr-settings-"+e.id+"-"+i+"-tab","aria-haspopup":!0,"aria-controls":"plyr-settings-"+e.id+"-"+i,"aria-expanded":!1}),p(i,t.config)),a=c.createElement("span",{class:t.config.classNames.menu.value});a.innerHTML=e[i],s.appendChild(a),n.appendChild(s),v.appendChild(n),t.elements.settings.tabs[i]=n}),y.appendChild(v),g.appendChild(y),this.config.settings.forEach(function(i){var n=c.createElement("div",{id:"plyr-settings-"+e.id+"-"+i,hidden:"","aria-labelled-by":"plyr-settings-"+e.id+"-"+i+"-tab",role:"tabpanel",tabindex:-1}),s=c.createElement("button",{type:"button",class:t.config.classNames.control+" "+t.config.classNames.control+"--back","aria-haspopup":!0,"aria-controls":"plyr-settings-"+e.id+"-home","aria-expanded":!1},p(i,t.config));n.appendChild(s);var a=c.createElement("ul");n.appendChild(a),g.appendChild(n),t.elements.settings.panes[i]=n}),m.appendChild(g),h.appendChild(m),i.appendChild(h),this.elements.settings.form=m,this.elements.settings.menu=h}return this.config.controls.includes("pip")&&u.pip&&i.appendChild(f.createButton.call(this,"pip")),this.config.controls.includes("airplay")&&u.airplay&&i.appendChild(f.createButton.call(this,"airplay")),this.config.controls.includes("fullscreen")&&i.appendChild(f.createButton.call(this,"fullscreen")),this.config.controls.includes("play-large")&&this.elements.container.appendChild(f.createButton.call(this,"play-large")),this.elements.controls=i,this.isHTML5&&f.setQualityMenu.call(this,d.getQualityOptions.call(this)),f.setSpeedMenu.call(this),i},inject:function(){var e=this;if(this.config.loadSprite){var t=f.getIconUrl.call(this);t.cors&&c.loadSprite(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var n={id:this.id,seektime:this.config.seekTime,title:this.config.title},s=!0;c.is.string(this.config.controls)||c.is.element(this.config.controls)?i=this.config.controls:c.is.function(this.config.controls)?i=this.config.controls.call(this,n):(i=f.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:y.getLabel.call(this)}),s=!1);var a=function(e){var t=e;return Object.entries(n).forEach(function(e){var i=o(e,2),n=i[0],s=i[1];t=c.replaceAll(t,"{"+n+"}",s)}),t};s&&(c.is.string(this.config.controls)?i=a(i):c.is.element(i)&&(i.innerHTML=a(i.innerHTML)));var l=void 0;if(c.is.string(this.config.selectors.controls.container)&&(l=document.querySelector(this.config.selectors.controls.container)),c.is.element(l)||(l=this.elements.container),c.is.element(i)?l.appendChild(i):i&&l.insertAdjacentHTML("beforeend",i),c.is.element(this.elements.controls)||f.findElements.call(this),window.navigator.userAgent.includes("Edge")&&c.repaint(l),this.config.tooltips.controls){var r=c.getElements.call(this,[this.config.selectors.controls.wrapper," ",this.config.selectors.labels," .",this.config.classNames.hidden].join(""));Array.from(r).forEach(function(t){c.toggleClass(t,e.config.classNames.hidden,!1),c.toggleClass(t,e.config.classNames.tooltip,!0),t.setAttribute("role","tooltip")})}}},y={setup:function(){if(this.supported.ui){var e=this.storage.get("language");if(c.is.empty(e)||(this.captions.language=e),c.is.empty(this.captions.language)&&(this.captions.language=this.config.captions.language.toLowerCase()),!c.is.boolean(this.captions.active)){var t=this.storage.get("captions");c.is.boolean(t)?this.captions.active=t:this.captions.active=this.config.captions.active}if(!this.isVideo||this.isYouTube||this.isHTML5&&!u.textTracks)c.is.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this);else{c.is.element(this.elements.captions)||(this.elements.captions=c.createElement("div",c.getAttributesFromSelector(this.config.selectors.captions)),c.insertAfter(this.elements.captions,this.elements.wrapper)),c.toggleClass(this.elements.container,this.config.classNames.captions.enabled,!c.is.empty(y.getTracks.call(this)));var i=y.getTracks.call(this);if(!c.is.empty(i)){if(c.getBrowser().isIE&&window.URL){var n=this.media.querySelectorAll("track");Array.from(n).forEach(function(e){var t=e.getAttribute("src"),i=c.parseUrl(t);i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&c.fetch(t,"blob").then(function(t){e.setAttribute("src",window.URL.createObjectURL(t))}).catch(function(){c.removeElement(e)})})}y.setLanguage.call(this),y.show.call(this),c.is.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this)}}}},setLanguage:function(){var e=this;if(this.isHTML5&&this.isVideo){y.getTracks.call(this).forEach(function(t){c.on(t,"cuechange",function(t){return y.setCue.call(e,t)}),t.mode="hidden"});var t=y.getCurrentTrack.call(this);c.is.track(t)&&Array.from(t.activeCues||[]).length&&y.setCue.call(this,t)}else this.isVimeo&&this.captions.active&&this.embed.enableTextTrack(this.language)},getTracks:function(){return c.is.nullOrUndefined(this.media)?[]:Array.from(this.media.textTracks||[]).filter(function(e){return["captions","subtitles"].includes(e.kind)})},getCurrentTrack:function(){var e=this,t=y.getTracks.call(this);if(!t.length)return null;var i=t.find(function(t){return t.language.toLowerCase()===e.language});(i||(i=c.getElement.call(this,"track[default]")),i)||(i=o(t,1)[0]);return i},getLabel:function(e){var t=e;return!c.is.track(t)&&u.textTracks&&this.captions.active&&(t=y.getCurrentTrack.call(this)),c.is.track(t)?c.is.empty(t.label)?c.is.empty(t.language)?p("enabled",this.config):e.language.toUpperCase():t.label:p("disabled",this.config)},setCue:function(e){var t=c.is.event(e)?e.target:e,i=t.activeCues,n=i.length&&i[0];t===y.getCurrentTrack.call(this)&&(c.is.cue(n)?y.setText.call(this,n.getCueAsHTML()):y.setText.call(this,null),c.dispatchEvent.call(this,this.media,"cuechange"))},setText:function(e){if(this.supported.ui)if(c.is.element(this.elements.captions)){var t=c.createElement("span");c.emptyElement(this.elements.captions);var i=c.is.nullOrUndefined(e)?"":e;c.is.string(i)?t.textContent=i.trim():t.appendChild(i),this.elements.captions.appendChild(t)}else this.debug.warn("No captions element to render to")},show:function(){var e=this.storage.get("captions");c.is.boolean(e)?this.captions.active=e:e=this.config.captions.active,e&&(c.toggleClass(this.elements.container,this.config.classNames.captions.active,!0),c.toggleState(this.elements.buttons.captions,!0))}},v=function(){},b=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];a(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}return l(e,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):v}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):v}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):v}}]),e}(),k={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:"16:9",clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.3.6/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240,"default"]},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:(navigator.language||navigator.userLanguage).split("-")[0]},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",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad"},urls:{vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/v2/video/{0}.json"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://www.googleapis.com/youtube/v3/videos?id={0}&key={1}&fields=items(snippet(title))&part=snippet",poster:"https://img.youtube.com/vi/{0}/maxresdefault.jpg,https://img.youtube.com/vi/{0}/hqdefault.jpg"},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,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","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","qualityrequested","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"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress--buffer",played:".plyr__progress--played",loop:".plyr__progress--loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",menu:{quality:".js-plyr__menu__list--quality"}},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",ads:"plyr__ads",control:"plyr__control",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",error:"plyr--has-error",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",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"},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},keys:{google:null},ads:{enabled:!1,publisherId:""}},w=c.getBrowser();function E(){if(this.enabled){var e=this.player.elements.buttons.fullscreen;c.is.element(e)&&c.toggleState(e,this.active),c.dispatchEvent(this.target,this.active?"enterfullscreen":"exitfullscreen",!0),w.isIos||c.trapFocus.call(this.player,this.target,this.active)}}function T(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",c.toggleClass(this.target,this.player.config.classNames.fullscreen.fallback,e),E.call(this)}var A=function(){function e(t){var i=this;a(this,e),this.player=t,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},c.on(document,"ms"===this.prefix?"MSFullscreenChange":this.prefix+"fullscreenchange",function(){E.call(i)}),c.on(this.player.elements.container,"dblclick",function(e){c.is.element(i.player.elements.controls)&&i.player.elements.controls.contains(e.target)||i.toggle()}),this.update()}return l(e,[{key:"update",value:function(){this.enabled?this.player.debug.log((e.native?"Native":"Fallback")+" fullscreen enabled"):this.player.debug.log("Fullscreen not supported and fallback disabled"),c.toggleClass(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(w.isIos&&this.player.config.fullscreen.iosNative?this.player.playing&&this.target.webkitEnterFullscreen():e.native?this.prefix?c.is.empty(this.prefix)||this.target[this.prefix+"Request"+this.property]():this.target.requestFullscreen():T.call(this,!0))}},{key:"exit",value:function(){if(this.enabled)if(w.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),this.player.play();else if(e.native)if(this.prefix){if(!c.is.empty(this.prefix)){var t="moz"===this.prefix?"Cancel":"Exit";document[""+this.prefix+t+this.property]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document);else T.call(this,!1)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"enabled",get:function(){return(e.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){return!!this.enabled&&(e.native?(this.prefix?document[""+this.prefix+this.property+"Element"]:document.fullscreenElement)===this.target:c.hasClass(this.target,this.player.config.classNames.fullscreen.fallback))}},{key:"target",get:function(){return w.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(c.is.function(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some(function(t){return!(!c.is.function(document[t+"ExitFullscreen"])&&!c.is.function(document[t+"CancelFullScreen"]))&&(e=t,!0)}),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),e}(),C=c.getBrowser(),S=function(){function e(t){a(this,e),this.player=t,this.lastKey=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}return l(e,[{key:"handleKey",value:function(e){var t=this,i=e.keyCode?e.keyCode:e.which,n="keydown"===e.type,s=n&&i===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&c.is.number(i)){if(n){var a=c.getFocusElement();if(c.is.element(a)&&c.matches(a,this.player.config.selectors.editable))return;switch([48,49,50,51,52,53,54,56,57,32,75,38,40,77,39,37,70,67,73,76,79].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:s||(t.player.currentTime=t.player.duration/10*(i-48));break;case 32:case 75:s||this.player.togglePlay();break;case 38:this.player.increaseVolume(.1);break;case 40:this.player.decreaseVolume(.1);break;case 77:s||(this.player.muted=!this.player.muted);break;case 39:this.player.forward();break;case 37:this.player.rewind();break;case 70:this.player.fullscreen.toggle();break;case 67:s||this.player.toggleCaptions();break;case 76:this.player.loop=!this.player.loop}!this.player.fullscreen.enabled&&this.player.fullscreen.active&&27===i&&this.player.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}}},{key:"toggleMenu",value:function(e){f.toggleMenu.call(this.player,e)}},{key:"firstTouch",value:function(){this.player.touch=!0,c.toggleClass(this.player.elements.container,this.player.config.classNames.isTouch,!0),c.off(document.body,"touchstart",this.firstTouch)}},{key:"global",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.player.config.keyboard.global&&c.toggleListener(window,"keydown keyup",this.handleKey,e,!1),c.toggleListener(document.body,"click",this.toggleMenu,e),c.on(document.body,"touchstart",this.firstTouch)}},{key:"container",value:function(){var e=this;!this.player.config.keyboard.global&&this.player.config.keyboard.focused&&c.on(this.player.elements.container,"keydown keyup",this.handleKey,!1),c.on(this.player.elements.container,"focusout",function(t){c.toggleClass(t.target,e.player.config.classNames.tabFocus,!1)}),c.on(this.player.elements.container,"keydown",function(t){9===t.keyCode&&setTimeout(function(){c.toggleClass(c.getFocusElement(),e.player.config.classNames.tabFocus,!0)},0)}),this.player.config.hideControls&&c.on(this.player.elements.container,"mouseenter mouseleave mousemove touchstart touchend touchmove enterfullscreen exitfullscreen",function(t){e.player.toggleControls(t)})}},{key:"media",value:function(){var e=this;if(c.on(this.player.media,"timeupdate seeking",function(t){return m.timeUpdate.call(e.player,t)}),c.on(this.player.media,"durationchange loadeddata loadedmetadata",function(t){return m.durationUpdate.call(e.player,t)}),c.on(this.player.media,"loadeddata",function(){c.toggleHidden(e.player.elements.volume,!e.player.hasAudio),c.toggleHidden(e.player.elements.buttons.mute,!e.player.hasAudio)}),c.on(this.player.media,"ended",function(){e.player.isHTML5&&e.player.isVideo&&e.player.config.resetOnEnd&&e.player.restart()}),c.on(this.player.media,"progress playing",function(t){return m.updateProgress.call(e.player,t)}),c.on(this.player.media,"volumechange",function(t){return m.updateVolume.call(e.player,t)}),c.on(this.player.media,"playing play pause ended emptied timeupdate",function(t){return m.checkPlaying.call(e.player,t)}),c.on(this.player.media,"waiting canplay seeked playing",function(t){return m.checkLoading.call(e.player,t)}),c.on(this.player.media,"playing",function(){e.player.ads&&e.player.ads.enabled&&!e.player.ads.initialized&&e.player.ads.managerPromise.then(function(){return e.player.ads.play()}).catch(function(){return e.player.play()})}),this.player.supported.ui&&this.player.config.clickToPlay&&!this.player.isAudio){var t=c.getElement.call(this.player,"."+this.player.config.classNames.video);if(!c.is.element(t))return;c.on(t,"click",function(){e.player.config.hideControls&&e.player.touch&&!e.player.paused||(e.player.paused?e.player.play():e.player.ended?(e.player.restart(),e.player.play()):e.player.pause())})}this.player.supported.ui&&this.player.config.disableContextMenu&&c.on(this.player.elements.wrapper,"contextmenu",function(e){e.preventDefault()},!1),c.on(this.player.media,"volumechange",function(){e.player.storage.set({volume:e.player.volume,muted:e.player.muted})}),c.on(this.player.media,"ratechange",function(){f.updateSetting.call(e.player,"speed"),e.player.storage.set({speed:e.player.speed})}),c.on(this.player.media,"qualityrequested",function(t){e.player.storage.set({quality:t.detail.quality})}),c.on(this.player.media,"qualitychange",function(t){f.updateSetting.call(e.player,"quality",null,t.detail.quality)}),c.on(this.player.media,"languagechange",function(){f.updateSetting.call(e.player,"captions"),e.player.storage.set({language:e.player.language})}),c.on(this.player.media,"captionsenabled captionsdisabled",function(){f.updateSetting.call(e.player,"captions"),e.player.storage.set({captions:e.player.captions.active})}),c.on(this.player.media,this.player.config.events.concat(["keyup","keydown"]).join(" "),function(t){var i={};"error"===t.type&&(i=e.player.media.error),c.dispatchEvent.call(e.player,e.player.elements.container,t.type,!0,i)})}},{key:"controls",value:function(){var e=this,t=C.isIE?"change":"input",i=function(t,i,n){var s=e.player.config.listeners[n],a=!0;c.is.function(s)&&(a=s.call(e.player,t)),a&&c.is.function(i)&&i.call(e.player,t)},n=function(t,n,s,a){var l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=e.player.config.listeners[a],o=c.is.function(r);c.on(t,n,function(e){return i(e,s,a)},l&&!o)};n(this.player.elements.buttons.play,"click",this.player.togglePlay,"play"),n(this.player.elements.buttons.restart,"click",this.player.restart,"restart"),n(this.player.elements.buttons.rewind,"click",this.player.rewind,"rewind"),n(this.player.elements.buttons.fastForward,"click",this.player.forward,"fastForward"),n(this.player.elements.buttons.mute,"click",function(){e.player.muted=!e.player.muted},"mute"),n(this.player.elements.buttons.captions,"click",this.player.toggleCaptions),n(this.player.elements.buttons.fullscreen,"click",function(){e.player.fullscreen.toggle()},"fullscreen"),n(this.player.elements.buttons.pip,"click",function(){e.player.pip="toggle"},"pip"),n(this.player.elements.buttons.airplay,"click",this.player.airplay,"airplay"),n(this.player.elements.buttons.settings,"click",function(t){f.toggleMenu.call(e.player,t)}),n(this.player.elements.settings.form,"click",function(t){t.stopPropagation();var n=function(){var t="plyr-settings-"+e.player.id+"-home";f.showTab.call(e.player,t)};if(c.matches(t.target,e.player.config.selectors.inputs.language))i(t,function(){e.player.language=t.target.value,n()},"language");else if(c.matches(t.target,e.player.config.selectors.inputs.quality))i(t,function(){e.player.quality=t.target.value,n()},"quality");else if(c.matches(t.target,e.player.config.selectors.inputs.speed))i(t,function(){e.player.speed=parseFloat(t.target.value),n()},"speed");else{var s=t.target;f.showTab.call(e.player,s.getAttribute("aria-controls"))}}),n(this.player.elements.inputs.seek,t,function(t){e.player.currentTime=t.target.value/t.target.max*e.player.duration},"seek"),this.player.config.toggleInvert&&!c.is.element(this.player.elements.display.duration)&&n(this.player.elements.display.currentTime,"click",function(){0!==e.player.currentTime&&(e.player.config.invertTime=!e.player.config.invertTime,m.timeUpdate.call(e.player))}),n(this.player.elements.inputs.volume,t,function(t){e.player.volume=t.target.value},"volume"),C.isWebkit&&n(c.getElements.call(this.player,'input[type="range"]'),"input",function(t){f.updateRangeFill.call(e.player,t.target)}),n(this.player.elements.progress,"mouseenter mouseleave mousemove",function(t){return f.updateSeekTooltip.call(e.player,t)}),this.player.config.hideControls&&(n(this.player.elements.controls,"mouseenter mouseleave",function(t){e.player.elements.controls.hover=!e.player.touch&&"mouseenter"===t.type}),n(this.player.elements.controls,"mousedown mouseup touchstart touchend touchcancel",function(t){e.player.elements.controls.pressed=["mousedown","touchstart"].includes(t.type)}),n(this.player.elements.controls,"focusin focusout",function(t){e.player.toggleControls(t)})),n(this.player.elements.inputs.volume,"wheel",function(t){var i=t.webkitDirectionInvertedFromDevice,n=0;(t.deltaY<0||t.deltaX>0)&&(i?(e.player.decreaseVolume(.02),n=-1):(e.player.increaseVolume(.02),n=1)),(t.deltaY>0||t.deltaX<0)&&(i?(e.player.increaseVolume(.02),n=1):(e.player.decreaseVolume(.02),n=-1)),(1===n&&e.player.media.volume<1||-1===n&&e.player.media.volume>0)&&t.preventDefault()},"volume",!1)}},{key:"clear",value:function(){this.global(!1)}}]),e}(),N={setup:function(){var e=this;c.toggleClass(this.elements.wrapper,this.config.classNames.embed,!0),N.setAspectRatio.call(this),c.is.object(window.Vimeo)?N.ready.call(this):c.loadScript(this.config.urls.vimeo.sdk).then(function(){N.ready.call(e)}).catch(function(t){e.debug.warn("Vimeo API failed to load",t)})},setAspectRatio:function(e){var t=c.is.string(e)?e.split(":"):this.config.ratio.split(":"),i=100/t[0]*t[1];if(this.elements.wrapper.style.paddingBottom=i+"%",this.supported.ui){var n=(240-i)/4.8;this.media.style.transform="translateY(-"+n+"%)"}},ready:function(){var e=this,t=this,i={loop:t.config.loop.active,autoplay:t.autoplay,byline:!1,portrait:!1,title:!1,speed:!0,transparent:0,gesture:"media",playsinline:!this.config.fullscreen.iosNative},n=c.buildUrlParams(i),s=t.media.getAttribute("src");c.is.empty(s)&&(s=t.media.getAttribute(t.config.attributes.embed.id));var a=c.parseVimeoId(s),l=c.createElement("iframe"),r=c.format(t.config.urls.vimeo.iframe,a,n);l.setAttribute("src",r),l.setAttribute("allowfullscreen",""),l.setAttribute("allowtransparency",""),l.setAttribute("allow","autoplay");var o=c.createElement("div",{class:t.config.classNames.embedContainer});o.appendChild(l),t.media=c.replaceElement(o,t.media),c.fetch(c.format(t.config.urls.vimeo.api,a),"json").then(function(e){if(!c.is.empty(e)){var i=new URL(e[0].thumbnail_large);i.pathname=i.pathname.split("_")[0]+".jpg",t.media.setAttribute("poster",i.href),m.setPoster.call(t)}}),t.embed=new window.Vimeo.Player(l,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=function(){t.embed.play().then(function(){t.media.paused=!1})},t.media.pause=function(){t.embed.pause().then(function(){t.media.paused=!0})},t.media.stop=function(){t.pause(),t.currentTime=0};var u=t.media.currentTime;Object.defineProperty(t.media,"currentTime",{get:function(){return u},set:function(e){var i=t.media.paused;t.media.seeking=!0,c.dispatchEvent.call(t,t.media,"seeking"),t.embed.setCurrentTime(e).catch(function(){}),i&&t.pause()}});var d=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:function(){return d},set:function(e){t.embed.setPlaybackRate(e).then(function(){d=e,c.dispatchEvent.call(t,t.media,"ratechange")}).catch(function(e){"Error"===e.name&&f.setSpeedMenu.call(t,[])})}});var p=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return p},set:function(e){t.embed.setVolume(e).then(function(){p=e,c.dispatchEvent.call(t,t.media,"volumechange")})}});var h=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return h},set:function(e){var i=!!c.is.boolean(e)&&e;t.embed.setVolume(i?0:t.config.volume).then(function(){h=i,c.dispatchEvent.call(t,t.media,"volumechange")})}});var g=t.config.loop;Object.defineProperty(t.media,"loop",{get:function(){return g},set:function(e){var i=c.is.boolean(e)?e:t.config.loop.active;t.embed.setLoop(i).then(function(){g=i})}});var v=void 0;t.embed.getVideoUrl().then(function(e){v=e}).catch(function(t){e.debug.warn(t)}),Object.defineProperty(t.media,"currentSrc",{get:function(){return v}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(function(t){var i=c.getAspectRatio(t[0],t[1]);N.setAspectRatio.call(e,i)}),t.embed.setAutopause(t.config.autopause).then(function(e){t.config.autopause=e}),t.embed.getVideoTitle().then(function(i){t.config.title=i,m.setTitle.call(e)}),t.embed.getCurrentTime().then(function(e){u=e,c.dispatchEvent.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(function(e){t.media.duration=e,c.dispatchEvent.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(function(e){t.media.textTracks=e,y.setup.call(t)}),t.embed.on("cuechange",function(e){var i=null;e.cues.length&&(i=c.stripHTML(e.cues[0].text)),y.setText.call(t,i)}),t.embed.on("loaded",function(){c.is.element(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("play",function(){t.media.paused&&c.dispatchEvent.call(t,t.media,"play"),t.media.paused=!1,c.dispatchEvent.call(t,t.media,"playing")}),t.embed.on("pause",function(){t.media.paused=!0,c.dispatchEvent.call(t,t.media,"pause")}),t.embed.on("timeupdate",function(e){t.media.seeking=!1,u=e.seconds,c.dispatchEvent.call(t,t.media,"timeupdate")}),t.embed.on("progress",function(e){t.media.buffered=e.percent,c.dispatchEvent.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&c.dispatchEvent.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(function(e){e!==t.media.duration&&(t.media.duration=e,c.dispatchEvent.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",function(){t.media.seeking=!1,c.dispatchEvent.call(t,t.media,"seeked"),c.dispatchEvent.call(t,t.media,"play")}),t.embed.on("ended",function(){t.media.paused=!0,c.dispatchEvent.call(t,t.media,"ended")}),t.embed.on("error",function(e){t.media.error=e,c.dispatchEvent.call(t,t.media,"error")}),setTimeout(function(){return m.build.call(t)},0)}};function P(e){switch(e){case"hd2160":return 2160;case 2160:return"hd2160";case"hd1440":return 1440;case 1440:return"hd1440";case"hd1080":return 1080;case 1080:return"hd1080";case"hd720":return 720;case 720:return"hd720";case"large":return 480;case 480:return"large";case"medium":return 360;case 360:return"medium";case"small":return 240;case 240:return"small";default:return"default"}}var x={setup:function(){var e=this;c.toggleClass(this.elements.wrapper,this.config.classNames.embed,!0),x.setAspectRatio.call(this),c.is.object(window.YT)&&c.is.function(window.YT.Player)?x.ready.call(this):(c.loadScript(this.config.urls.youtube.sdk).catch(function(t){e.debug.warn("YouTube API failed to load",t)}),window.onYouTubeReadyCallbacks=window.onYouTubeReadyCallbacks||[],window.onYouTubeReadyCallbacks.push(function(){x.ready.call(e)}),window.onYouTubeIframeAPIReady=function(){window.onYouTubeReadyCallbacks.forEach(function(e){e()})})},getTitle:function(e){var t=this;if(c.is.function(this.embed.getVideoData)){var i=this.embed.getVideoData().title;if(c.is.empty(i))return this.config.title=i,void m.setTitle.call(this)}var n=this.config.keys.google;if(c.is.string(n)&&!c.is.empty(n)){var s=c.format(this.config.urls.youtube.api,e,n);c.fetch(s).then(function(e){c.is.object(e)&&(t.config.title=e.items[0].snippet.title,m.setTitle.call(t))}).catch(function(){})}},setAspectRatio:function(){var e=this.config.ratio.split(":");this.elements.wrapper.style.paddingBottom=100/e[0]*e[1]+"%"},ready:function(){var e=this,t=e.media.getAttribute("id");if(c.is.empty(t)||!t.startsWith("youtube-")){var i=e.media.getAttribute("src");c.is.empty(i)&&(i=e.media.getAttribute(this.config.attributes.embed.id));var n=c.parseYouTubeId(i),s=c.generateId(e.provider),a=c.createElement("div",{id:s});e.media=c.replaceElement(a,e.media),e.media.setAttribute("poster",c.format(e.config.urls.youtube.poster,n)),e.embed=new window.YT.Player(s,{videoId:n,playerVars:{autoplay:e.config.autoplay?1:0,controls:e.supported.ui?0:1,rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,disablekb:1,playsinline:1,widget_referrer:window?window.location.href:null,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language},events:{onError:function(t){if(!c.is.object(e.media.error)){var i={code:t.data};switch(t.data){case 2:i.message="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.";break;case 5:i.message="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:i.message="The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.";break;case 101:case 150:i.message="The owner of the requested video does not allow it to be played in embedded players.";break;default:i.message="An unknown error occured"}e.media.error=i,c.dispatchEvent.call(e,e.media,"error")}},onPlaybackQualityChange:function(){c.dispatchEvent.call(e,e.media,"qualitychange",!1,{quality:e.media.quality})},onPlaybackRateChange:function(t){var i=t.target;e.media.playbackRate=i.getPlaybackRate(),c.dispatchEvent.call(e,e.media,"ratechange")},onReady:function(t){var i=t.target;x.getTitle.call(e,n),e.media.play=function(){i.playVideo()},e.media.pause=function(){i.pauseVideo()},e.media.stop=function(){i.stopVideo()},e.media.duration=i.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(t){var n=e.media.paused;e.media.seeking=!0,c.dispatchEvent.call(e,e.media,"seeking"),i.seekTo(t),n&&e.pause()}}),Object.defineProperty(e.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(e){i.setPlaybackRate(e)}}),Object.defineProperty(e.media,"quality",{get:function(){return P(i.getPlaybackQuality())},set:function(t){var n=t;i.setPlaybackQuality(P(n)),c.dispatchEvent.call(e,e.media,"qualityrequested",!1,{quality:n})}});var s=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return s},set:function(t){s=t,i.setVolume(100*s),c.dispatchEvent.call(e,e.media,"volumechange")}});var a=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return a},set:function(t){var n=c.is.boolean(t)?t:a;a=n,i[n?"mute":"unMute"](),c.dispatchEvent.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}}),e.options.speed=i.getAvailablePlaybackRates(),e.supported.ui&&e.media.setAttribute("tabindex",-1),c.dispatchEvent.call(e,e.media,"timeupdate"),c.dispatchEvent.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(function(){e.media.buffered=i.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&c.dispatchEvent.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),c.dispatchEvent.call(e,e.media,"canplaythrough"))},200),setTimeout(function(){return m.build.call(e)},50)},onStateChange:function(t){var i,n=t.target;switch(clearInterval(e.timers.playing),t.data){case-1:c.dispatchEvent.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),c.dispatchEvent.call(e,e.media,"progress");break;case 0:e.media.paused=!0,e.media.loop?(n.stopVideo(),n.playVideo()):c.dispatchEvent.call(e,e.media,"ended");break;case 1:e.media.seeking&&c.dispatchEvent.call(e,e.media,"seeked"),e.media.seeking=!1,e.media.paused&&c.dispatchEvent.call(e,e.media,"play"),e.media.paused=!1,c.dispatchEvent.call(e,e.media,"playing"),e.timers.playing=setInterval(function(){c.dispatchEvent.call(e,e.media,"timeupdate")},50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),c.dispatchEvent.call(e,e.media,"durationchange")),f.setQualityMenu.call(e,(i=n.getAvailableQualityLevels(),c.is.empty(i)?i:c.dedupe(i.map(function(e){return P(e)}))));break;case 2:e.media.paused=!0,c.dispatchEvent.call(e,e.media,"pause")}c.dispatchEvent.call(e,e.elements.container,"statechange",!1,{code:t.data})}}})}}},L={setup:function(){if(this.media)if(c.toggleClass(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),c.toggleClass(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&c.toggleClass(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=c.createElement("div",{class:this.config.classNames.video}),c.wrap(this.media,this.elements.wrapper),this.elements.poster=c.createElement("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isEmbed)switch(this.provider){case"youtube":x.setup.call(this);break;case"vimeo":N.setup.call(this)}else this.isHTML5&&d.extend.call(this);else this.debug.warn("No media element found!")}},M=function(){function e(t){var i=this;a(this,e),this.player=t,this.publisherId=t.config.ads.publisherId,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(function(e,t){i.on("loaded",e),i.on("error",t)}),this.load()}return l(e,[{key:"load",value:function(){var e=this;this.enabled&&(c.is.object(window.google)&&c.is.object(window.google.ima)?this.ready():c.loadScript(this.player.config.urls.googleIMA.sdk).then(function(){e.ready()}).catch(function(){e.trigger("error",new Error("Google IMA SDK failed to load"))}))}},{key:"ready",value:function(){var e=this;this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(function(){e.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}},{key:"setupIMA",value:function(){this.elements.container=c.createElement("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),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container),this.requestAds()}},{key:"requestAds",value:function(){var e=this,t=this.player.elements.container;try{this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){return e.onAdsManagerLoaded(t)},!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(t){return e.onAdError(t)},!1);var i=new google.ima.AdsRequest;i.adTagUrl=this.tagUrl,i.linearAdSlotWidth=t.offsetWidth,i.linearAdSlotHeight=t.offsetHeight,i.nonLinearAdSlotWidth=t.offsetWidth,i.nonLinearAdSlotHeight=t.offsetHeight,i.forceNonLinearFullSlot=!1,i.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(i)}catch(e){this.onAdError(e)}}},{key:"pollCountdown",value:function(){var e=this;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]))return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(function(){var t=c.formatTime(Math.max(e.manager.getRemainingTime(),0)),i=p("advertisement",e.player.config)+" - "+t;e.elements.container.setAttribute("data-badge-text",i)},100)}},{key:"onAdsManagerLoaded",value:function(e){var t=this,i=new google.ima.AdsRenderingSettings;i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i.enablePreloading=!0,this.manager=e.getAdsManager(this.player,i),this.cuePoints=this.manager.getCuePoints(),c.is.empty(this.cuePoints)||this.cuePoints.forEach(function(e){if(0!==e&&-1!==e&&e<t.player.duration){var i=t.player.elements.progress;if(c.is.element(i)){var n=100/t.player.duration*e,s=c.createElement("span",{class:t.player.config.classNames.cues});s.style.left=n.toString()+"%",i.appendChild(s)}}}),this.manager.setVolume(this.player.volume),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return t.onAdError(e)}),Object.keys(google.ima.AdEvent.Type).forEach(function(e){t.manager.addEventListener(google.ima.AdEvent.Type[e],function(e){return t.onAdEvent(e)})}),this.trigger("loaded")}},{key:"onAdEvent",value:function(e){var t=this,i=this.player.elements.container,n=e.getAd(),s=function(e){var i="ads"+e.replace(/_/g,"").toLowerCase();c.dispatchEvent.call(t.player,t.player.media,i)};switch(e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),s(e.type),this.pollCountdown(!0),n.isLinear()||(n.width=i.offsetWidth,n.height=i.offsetHeight);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:s(e.type),this.loadAds();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:s(e.type),this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:s(e.type),this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.STARTED:case google.ima.AdEvent.Type.MIDPOINT:case google.ima.AdEvent.Type.COMPLETE:case google.ima.AdEvent.Type.IMPRESSION:case google.ima.AdEvent.Type.CLICK:s(e.type)}}},{key:"onAdError",value:function(e){this.cancel(),this.player.debug.warn("Ads error",e)}},{key:"listeners",value:function(){var e=this,t=this.player.elements.container,i=void 0;this.player.on("ended",function(){e.loader.contentComplete()}),this.player.on("seeking",function(){return i=e.player.currentTime}),this.player.on("seeked",function(){var t=e.player.currentTime;c.is.empty(e.cuePoints)||e.cuePoints.forEach(function(n,s){i<n&&n<t&&(e.manager.discardAdBreak(),e.cuePoints.splice(s,1))})}),window.addEventListener("resize",function(){e.manager&&e.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}},{key:"play",value:function(){var e=this,t=this.player.elements.container;this.managerPromise||this.resumeContent(),this.managerPromise.then(function(){e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}}).catch(function(){})}},{key:"resumeContent",value:function(){this.elements.container.style.zIndex="",this.playing=!1,this.player.currentTime<this.player.duration&&this.player.play()}},{key:"pauseContent",value:function(){this.elements.container.style.zIndex=3,this.playing=!0,this.player.pause()}},{key:"cancel",value:function(){this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}},{key:"loadAds",value:function(){var e=this;this.managerPromise.then(function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise(function(t){e.on("loaded",t),e.player.debug.log(e.manager)}),e.requestAds()}).catch(function(){})}},{key:"trigger",value:function(e){for(var t=this,i=arguments.length,n=Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];var a=this.events[e];c.is.array(a)&&a.forEach(function(e){c.is.function(e)&&e.apply(t,n)})}},{key:"on",value:function(e,t){return c.is.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this}},{key:"startSafetyTimer",value:function(e,t){var i=this;this.player.debug.log("Safety timer invoked from: "+t),this.safetyTimer=setTimeout(function(){i.cancel(),i.clearSafetyTimer("startSafetyTimer()")},e)}},{key:"clearSafetyTimer",value:function(e){c.is.nullOrUndefined(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: "+e),clearTimeout(this.safetyTimer),this.safetyTimer=null)}},{key:"enabled",get:function(){return this.player.isVideo&&this.player.config.ads.enabled&&!c.is.empty(this.publisherId)}},{key:"tagUrl",get:function(){var e={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:this.publisherId};return"https://go.aniview.com/api/adserver6/vast/?"+c.buildUrlParams(e)}}]),e}(),I={insertElements:function(e,t){var i=this;c.is.string(t)?c.insertElement(e,this.media,{src:t}):c.is.array(t)&&t.forEach(function(t){c.insertElement(e,i.media,t)})},change:function(e){var t=this;c.is.object(e)&&"sources"in e&&e.sources.length?(d.cancelRequests.call(this),this.destroy.call(this,function(){switch(t.options.quality=[],c.removeElement(t.media),t.media=null,c.is.element(t.elements.container)&&t.elements.container.removeAttribute("class"),t.type=e.type,t.provider=c.is.empty(e.sources[0].provider)?n.html5:e.sources[0].provider,t.supported=u.check(t.type,t.provider,t.config.playsinline),t.provider+":"+t.type){case"html5:video":t.media=c.createElement("video");break;case"html5:audio":t.media=c.createElement("audio");break;case"youtube:video":case"vimeo:video":t.media=c.createElement("div",{src:e.sources[0].src})}t.elements.container.appendChild(t.media),c.is.boolean(e.autoplay)&&(t.config.autoplay=e.autoplay),t.isHTML5&&(t.config.crossorigin&&t.media.setAttribute("crossorigin",""),t.config.autoplay&&t.media.setAttribute("autoplay",""),c.is.empty(e.poster)||(t.poster=e.poster),t.config.loop.active&&t.media.setAttribute("loop",""),t.config.muted&&t.media.setAttribute("muted",""),t.config.playsinline&&t.media.setAttribute("playsinline","")),m.addStyleHook.call(t),t.isHTML5&&I.insertElements.call(t,"source",e.sources),t.config.title=e.title,L.setup.call(t),t.isHTML5&&("tracks"in e&&I.insertElements.call(t,"track",e.tracks),t.media.load()),(t.isHTML5||t.isEmbed&&!t.supported.ui)&&m.build.call(t),t.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}},q=function(){function e(t){a(this,e),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}return l(e,[{key:"get",value:function(t){if(!e.supported)return null;var i=window.localStorage.getItem(this.key);if(c.is.empty(i))return null;var n=JSON.parse(i);return c.is.string(t)&&t.length?n[t]:n}},{key:"set",value:function(t){if(e.supported&&this.enabled&&c.is.object(t)){var i=this.get();c.is.empty(i)&&(i={}),c.extend(i,t),window.localStorage.setItem(this.key,JSON.stringify(i))}}}],[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;return window.localStorage.setItem("___test","___test"),window.localStorage.removeItem("___test"),!0}catch(e){return!1}}}]),e}();return function(){function e(t,i){var l=this;if(a(this,e),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=u.touch,this.media=t,c.is.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||c.is.nodeList(this.media)||c.is.array(this.media))&&(this.media=this.media[0]),this.config=c.extend({},k,i||{},function(){try{return JSON.parse(l.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container:null,buttons:{},display:{},progress:{},inputs:{},settings:{menu:null,panes:{},tabs:{}},captions:null},this.captions={active:null,currentTrack:null},this.fullscreen={active:!1},this.options={speed:[],quality:[],captions:[]},this.debug=new b(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",u),!c.is.nullOrUndefined(this.media)&&c.is.element(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(u.check().api){var r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;var o=this.media.tagName.toLowerCase(),d=null,p=null,h=null;switch(o){case"div":if(d=this.media.querySelector("iframe"),c.is.element(d)){if(p=d.getAttribute("src"),this.provider=c.getProviderByUrl(p),this.elements.container=this.media,this.media=d,this.elements.container.className="",h=c.getUrlParams(p),!c.is.empty(h)){var g=["1","true"];g.includes(h.autoplay)&&(this.config.autoplay=!0),g.includes(h.loop)&&(this.config.loop.active=!0),this.isYouTube?this.config.playsinline=g.includes(h.playsinline):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(c.is.empty(this.provider)||!Object.keys(n).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=s.video;break;case"video":case"audio":this.type=o,this.provider=n.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),this.media.hasAttribute("playsinline")&&(this.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=u.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.listeners=new S(this),this.storage=new q(this),this.media.plyr=this,c.is.element(this.elements.container)||(this.elements.container=c.createElement("div"),c.wrap(this.media,this.elements.container)),this.elements.container.setAttribute("tabindex",0),m.addStyleHook.call(this),L.setup.call(this),this.config.debug&&c.on(this.elements.container,this.config.events.join(" "),function(e){l.debug.log("event: "+e.type)}),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&m.build.call(this),this.listeners.container(),this.listeners.global(),this.fullscreen=new A(this),this.ads=new M(this),this.config.autoplay&&this.play()):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return l(e,[{key:"play",value:function(){return c.is.function(this.media.play)?this.media.play():null}},{key:"pause",value:function(){this.playing&&c.is.function(this.media.pause)&&this.media.pause()}},{key:"togglePlay",value:function(e){(c.is.boolean(e)?e:!this.playing)?this.play():this.pause()}},{key:"stop",value:function(){this.isHTML5?(this.pause(),this.restart()):c.is.function(this.media.stop)&&this.media.stop()}},{key:"restart",value:function(){this.currentTime=0}},{key:"rewind",value:function(e){this.currentTime=this.currentTime-(c.is.number(e)?e:this.config.seekTime)}},{key:"forward",value:function(e){this.currentTime=this.currentTime+(c.is.number(e)?e:this.config.seekTime)}},{key:"increaseVolume",value:function(e){var t=this.media.muted?0:this.volume;this.volume=t+(c.is.number(e)?e:1)}},{key:"decreaseVolume",value:function(e){var t=this.media.muted?0:this.volume;this.volume=t-(c.is.number(e)?e:1)}},{key:"toggleCaptions",value:function(e){if(this.supported.ui){var t=c.is.boolean(e)?e:!this.elements.container.classList.contains(this.config.classNames.captions.active);this.captions.active!==t&&(this.captions.active=t,c.toggleState(this.elements.buttons.captions,this.captions.active),c.toggleClass(this.elements.container,this.config.classNames.captions.active,this.captions.active),c.dispatchEvent.call(this,this.media,this.captions.active?"captionsenabled":"captionsdisabled"))}}},{key:"airplay",value:function(){u.airplay&&this.media.webkitShowPlaybackTargetPicker()}},{key:"toggleControls",value:function(e){var t=this;if(c.is.element(this.elements.controls)&&this.supported.ui&&!this.isAudio){var i=0,n=e,s=!1;if(!c.is.boolean(e))if(c.is.event(e)){s="enterfullscreen"===e.type;n=["touchstart","touchmove","mouseenter","mousemove","focusin"].includes(e.type),["touchmove","touchend","mousemove"].includes(e.type)&&(i=2e3),this.touch||"focusin"!==e.type||(i=3e3,c.toggleClass(this.elements.controls,this.config.classNames.noTransition,!0))}else n=c.hasClass(this.elements.container,this.config.classNames.hideControls);if(clearTimeout(this.timers.controls),n||this.paused||this.loading){if(c.toggleClass(this.elements.container,this.config.classNames.hideControls,!1)&&c.dispatchEvent.call(this,this.media,"controlsshown"),this.paused||this.loading)return;this.touch&&(i=3e3)}n&&!this.playing||(this.timers.controls=setTimeout(function(){c.is.element(t.elements.controls)&&((!t.elements.controls.pressed&&!t.elements.controls.hover||s)&&(c.hasClass(t.elements.container,t.config.classNames.hideControls)||c.toggleClass(t.elements.controls,t.config.classNames.noTransition,!1),c.toggleClass(t.elements.container,t.config.classNames.hideControls,t.config.hideControls)&&(c.dispatchEvent.call(t,t.media,"controlshidden"),t.config.controls.includes("settings")&&!c.is.empty(t.config.settings)&&f.toggleMenu.call(t,!1))))},i))}}},{key:"on",value:function(e,t){c.on(this.elements.container,e,t)}},{key:"off",value:function(e,t){c.off(this.elements.container,e,t)}},{key:"destroy",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ready){var n=function(){document.body.style.overflow="",t.embed=null,i?(Object.keys(t.elements).length&&(c.removeElement(t.elements.buttons.play),c.removeElement(t.elements.captions),c.removeElement(t.elements.controls),c.removeElement(t.elements.wrapper),t.elements.buttons.play=null,t.elements.captions=null,t.elements.controls=null,t.elements.wrapper=null),c.is.function(e)&&e()):(t.listeners.clear(),c.replaceElement(t.elements.original,t.elements.container),c.dispatchEvent.call(t,t.elements.original,"destroyed",!0),c.is.function(e)&&e.call(t.elements.original),t.ready=!1,setTimeout(function(){t.elements=null,t.media=null},200))};switch(this.stop(),this.provider+":"+this.type){case"html5:video":case"html5:audio":clearTimeout(this.timers.loading),m.toggleNativeControls.call(this,!0),n();break;case"youtube:video":clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&c.is.function(this.embed.destroy)&&this.embed.destroy(),n();break;case"vimeo:video":null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200)}}}},{key:"supports",value:function(e){return u.mime.call(this,e)}},{key:"isHTML5",get:function(){return Boolean(this.provider===n.html5)}},{key:"isEmbed",get:function(){return Boolean(this.isYouTube||this.isVimeo)}},{key:"isYouTube",get:function(){return Boolean(this.provider===n.youtube)}},{key:"isVimeo",get:function(){return Boolean(this.provider===n.vimeo)}},{key:"isVideo",get:function(){return Boolean(this.type===s.video)}},{key:"isAudio",get:function(){return Boolean(this.type===s.audio)}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",set:function(e){var t=0;c.is.number(e)&&(t=e),t<0?t=0:t>this.duration&&(t=this.duration),this.media.currentTime=t,this.debug.log("Seeking to "+this.currentTime+" seconds")},get:function(){return Number(this.media.currentTime)}},{key:"buffered",get:function(){var e=this.media.buffered;return c.is.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var e=parseFloat(this.config.duration),t=this.media?Number(this.media.duration):0;return Number.isNaN(e)?t:e}},{key:"volume",set:function(e){var t=e;c.is.string(t)&&(t=Number(t)),c.is.number(t)||(t=this.storage.get("volume")),c.is.number(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!c.is.empty(e)&&this.muted&&t>0&&(this.muted=!1)},get:function(){return Number(this.media.volume)}},{key:"muted",set:function(e){var t=e;c.is.boolean(t)||(t=this.storage.get("muted")),c.is.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t},get:function(){return Boolean(this.media.muted)}},{key:"hasAudio",get:function(){return!this.isHTML5||(!!this.isAudio||(Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)))}},{key:"speed",set:function(e){var t=null;c.is.number(e)&&(t=e),c.is.number(t)||(t=this.storage.get("speed")),c.is.number(t)||(t=this.config.speed.selected),t<.1&&(t=.1),t>2&&(t=2),this.config.speed.options.includes(t)?(this.config.speed.selected=t,this.media.playbackRate=t):this.debug.warn("Unsupported speed ("+t+")")},get:function(){return Number(this.media.playbackRate)}},{key:"quality",set:function(e){var t=null;if(c.is.empty(e)||(t=Number(e)),c.is.number(t)&&0!==t||(t=this.storage.get("quality")),c.is.number(t)||(t=this.config.quality.selected),c.is.number(t)||(t=this.config.quality.default),this.options.quality.length){if(!this.options.quality.includes(t)){var i=c.closest(this.options.quality,t);this.debug.warn("Unsupported quality option: "+t+", using "+i+" instead"),t=i}this.config.quality.selected=t,this.media.quality=t}},get:function(){return this.media.quality}},{key:"loop",set:function(e){var t=c.is.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t},get:function(){return Boolean(this.media.loop)}},{key:"source",set:function(e){I.change.call(this,e)},get:function(){return this.media.currentSrc}},{key:"poster",set:function(e){this.isVideo?c.is.string(e)&&(this.media.setAttribute("poster",e),m.setPoster.call(this)):this.debug.warn("Poster can only be set for video")},get:function(){return this.isVideo?this.media.getAttribute("poster"):null}},{key:"autoplay",set:function(e){var t=c.is.boolean(e)?e:this.config.autoplay;this.config.autoplay=t},get:function(){return Boolean(this.config.autoplay)}},{key:"language",set:function(e){if(c.is.string(e))if(c.is.empty(e))this.toggleCaptions(!1);else{var t=e.toLowerCase();this.options.captions.includes(t)?(this.toggleCaptions(!0),"enabled"!==t&&this.language!==t&&(this.captions.language=t,y.setText.call(this,null),y.setLanguage.call(this),c.dispatchEvent.call(this,this.media,"languagechange"))):this.debug.warn("Unsupported language option: "+t)}},get:function(){return this.captions.language}},{key:"pip",set:function(e){var t="picture-in-picture",i="inline";if(u.pip){var n=c.is.boolean(e)?e:this.pip===i;this.media.webkitSetPresentationMode(n?t:i)}},get:function(){return u.pip?this.media.webkitPresentationMode:null}}],[{key:"supported",value:function(e,t,i){return u.check(e,t,i)}},{key:"loadSprite",value:function(e,t){return c.loadSprite(e,t)}},{key:"setup",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;return c.is.string(t)?n=Array.from(document.querySelectorAll(t)):c.is.nodeList(t)?n=Array.from(t):c.is.array(t)&&(n=t.filter(function(e){return c.is.element(e)})),c.is.empty(n)?null:n.map(function(t){return new e(t,i)})}}]),e}()});
|
2
|
-
//# sourceMappingURL=plyr.min.js.map
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Plyr",t):e.Plyr=t()}(this,function(){"use strict";"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e,t,i=(function(e,t){var i;i=function(){var e=function(){},t={},i={},n={};function s(e,t){if(e){var s=n[e];if(i[e]=t,s)for(;s.length;)s[0](e,t),s.splice(0,1)}}function a(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function l(t,i,n,s){var a,r,o=document,c=n.async,u=(n.numRetries||0)+1,d=n.before||e,p=t.replace(/^(css|img)!/,"");s=s||0,/(^css!|\.css$)/.test(t)?(a=!0,(r=o.createElement("link")).rel="stylesheet",r.href=p):/(^img!|\.(png|gif|jpg|svg)$)/.test(t)?(r=o.createElement("img")).src=p:((r=o.createElement("script")).src=t,r.async=void 0===c||c),r.onload=r.onerror=r.onbeforeload=function(e){var o=e.type[0];if(a&&"hideFocus"in r)try{r.sheet.cssText.length||(o="e")}catch(e){o="e"}if("e"==o&&(s+=1)<u)return l(t,i,n,s);i(t,o,e.defaultPrevented)},!1!==d(t,r)&&o.head.appendChild(r)}function r(e,i,n){var r,o;if(i&&i.trim&&(r=i),o=(r?n:i)||{},r){if(r in t)throw"LoadJS";t[r]=!0}!function(e,t,i){var n,s,a=(e=e.push?e:[e]).length,r=a,o=[];for(n=function(e,i,n){if("e"==i&&o.push(e),"b"==i){if(!n)return;o.push(e)}--a||t(o)},s=0;s<r;s++)l(e[s],n,i)}(e,function(e){a(o,e),s(r,e)},o)}return r.ready=function(e,t){return function(e,t){var s,a,l,r=[],o=(e=e.push?e:[e]).length,c=o;for(s=function(e,i){i.length&&r.push(e),--c||t(r)};o--;)a=e[o],(l=i[a])?s(a,l):(n[a]=n[a]||[]).push(s)}(e,function(e){a(t,e)}),r},r.done=function(e){s(e,[])},r.reset=function(){t={},i={},n={}},r.isDefined=function(e){return e in t},r},e.exports=i()}(e={exports:{}},e.exports),e.exports),n={html5:"html5",youtube:"youtube",vimeo:"vimeo"},s={audio:"audio",video:"video"},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,s=!1,a=void 0;try{for(var l,r=e[Symbol.iterator]();!(n=(l=r.next()).done)&&(i.push(l.value),!t||i.length!==t);n=!0);}catch(e){s=!0,a=e}finally{try{!n&&r.return&&r.return()}finally{if(s)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c={is:{plyr:function(e){return this.instanceof(e,window.Plyr)},object:function(e){return this.getConstructor(e)===Object},number:function(e){return this.getConstructor(e)===Number&&!Number.isNaN(e)},string:function(e){return this.getConstructor(e)===String},boolean:function(e){return this.getConstructor(e)===Boolean},function:function(e){return this.getConstructor(e)===Function},array:function(e){return!this.nullOrUndefined(e)&&Array.isArray(e)},weakMap:function(e){return this.instanceof(e,window.WeakMap)},nodeList:function(e){return this.instanceof(e,window.NodeList)},element:function(e){return this.instanceof(e,window.Element)},textNode:function(e){return this.getConstructor(e)===Text},event:function(e){return this.instanceof(e,window.Event)},cue:function(e){return this.instanceof(e,window.TextTrackCue)||this.instanceof(e,window.VTTCue)},track:function(e){return this.instanceof(e,TextTrack)||!this.nullOrUndefined(e)&&this.string(e.kind)},url:function(e){return!this.nullOrUndefined(e)&&/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/.test(e)},nullOrUndefined:function(e){return null===e||void 0===e},empty:function(e){return this.nullOrUndefined(e)||(this.string(e)||this.array(e)||this.nodeList(e))&&!e.length||this.object(e)&&!Object.keys(e).length},instanceof:function(e,t){return Boolean(e&&t&&e instanceof t)},getConstructor:function(e){return this.nullOrUndefined(e)?null:e.constructor}},getBrowser:function(){return{isIE:!!document.documentMode,isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:/(iPad|iPhone|iPod)/gi.test(navigator.platform)}},fetch:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise(function(i,n){try{var s=new XMLHttpRequest;if(!("withCredentials"in s))return;s.addEventListener("load",function(){if("text"===t)try{i(JSON.parse(s.responseText))}catch(e){i(s.responseText)}else i(s.response)}),s.addEventListener("error",function(){throw new Error(s.statusText)}),s.open("GET",e,!0),s.responseType=t,s.send()}catch(e){n(e)}})},loadScript:function(e){return new Promise(function(t,n){i(e,{success:t,error:n})})},loadSprite:function(e,t){if(c.is.string(e)){var i=c.is.string(t),n=function(){return document.querySelectorAll("#"+t).length};if(!i||!n()){var s=document.createElement("div");if(c.toggleHidden(s,!0),i&&s.setAttribute("id",t),u.storage){var a=window.localStorage.getItem("cache-"+t);if(null!==a){var l=JSON.parse(a);return void r.call(s,l.content)}}c.fetch(e).then(function(e){c.is.empty(e)||(u.storage&&window.localStorage.setItem("cache-"+t,JSON.stringify({content:e})),r.call(s,e))}).catch(function(){})}}function r(e){i&&n()||(this.innerHTML=e,document.body.insertBefore(this,document.body.childNodes[0]))}},generateId:function(e){return e+"-"+Math.floor(1e4*Math.random())},wrap:function(e,t){var i=e.length?e:[e];Array.from(i).reverse().forEach(function(e,i){var n=i>0?t.cloneNode(!0):t,s=e.parentNode,a=e.nextSibling;n.appendChild(e),a?s.insertBefore(n,a):s.appendChild(n)})},createElement:function(e,t,i){var n=document.createElement(e);return c.is.object(t)&&c.setAttributes(n,t),c.is.string(i)&&(n.textContent=i),n},insertAfter:function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},insertElement:function(e,t,i,n){t.appendChild(c.createElement(e,i,n))},removeElement:function(e){c.is.nodeList(e)||c.is.array(e)?Array.from(e).forEach(c.removeElement):c.is.element(e)&&c.is.element(e.parentNode)&&e.parentNode.removeChild(e)},emptyElement:function(e){for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1},replaceElement:function(e,t){return c.is.element(t)&&c.is.element(t.parentNode)&&c.is.element(e)?(t.parentNode.replaceChild(e,t),e):null},setAttributes:function(e,t){c.is.element(e)&&!c.is.empty(t)&&Object.entries(t).forEach(function(t){var i=o(t,2),n=i[0],s=i[1];e.setAttribute(n,s)})},getAttributesFromSelector:function(e,t){if(!c.is.string(e)||c.is.empty(e))return{};var i={},n=t;return e.split(",").forEach(function(e){var t=e.trim(),s=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),l=a[0],r=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":c.is.object(n)&&c.is.string(n.class)&&(n.class+=" "+s),i.class=s;break;case"#":i.id=t.replace("#","");break;case"[":i[l]=r}}),i},toggleHidden:function(e,t){if(c.is.element(e)){var i=t;c.is.boolean(i)||(i=!e.hasAttribute("hidden")),i?e.setAttribute("hidden",""):e.removeAttribute("hidden")}},toggleClass:function(e,t,i){if(c.is.element(e)){var n=e.classList.contains(t);return e.classList[i?"add":"remove"](t),i&&!n||!i&&n}return null},hasClass:function(e,t){return c.is.element(e)&&e.classList.contains(t)},matches:function(e,t){var i={Element:Element};var n=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)};return n.call(e,t)},getElements:function(e){return this.elements.container.querySelectorAll(e)},getElement:function(e){return this.elements.container.querySelector(e)},getFocusElement:function(){var e=document.activeElement;return e=e&&e!==document.body?document.querySelector(":focus"):null},trapFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(c.is.element(e)){var i=c.getElements.call(this,"button:not(:disabled), input:not(:disabled), [tabindex]"),n=i[0],s=i[i.length-1],a=function(e){if("Tab"===e.key&&9===e.keyCode){var t=c.getFocusElement();t!==s||e.shiftKey?t===n&&e.shiftKey&&(s.focus(),e.preventDefault()):(n.focus(),e.preventDefault())}};t?c.on(this.elements.container,"keydown",a,!1):c.off(this.elements.container,"keydown",a,!1)}},toggleListener:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(!c.is.empty(e)&&!c.is.empty(t)&&c.is.function(i))if(c.is.nodeList(e)||c.is.array(e))Array.from(e).forEach(function(e){e instanceof Node&&c.toggleListener.call(null,e,t,i,n,s,a)});else{var l=t.split(" "),r=a;u.passiveListeners&&(r={passive:s,capture:a}),l.forEach(function(t){e[n?"addEventListener":"removeEventListener"](t,i,r)})}},on:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];c.toggleListener(e,t,i,!0,n,s)},off:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];c.toggleListener(e,t,i,!1,n,s)},dispatchEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(c.is.element(e)&&!c.is.empty(t)){var s=new CustomEvent(t,{bubbles:i,detail:Object.assign({},n,{plyr:c.is.plyr(this)?this:null})});e.dispatchEvent(s)}},toggleState:function(e,t){if(c.is.array(e)||c.is.nodeList(e))Array.from(e).forEach(function(e){return c.toggleState(e,t)});else if(c.is.element(e)){var i="true"===e.getAttribute("aria-pressed"),n=c.is.boolean(t)?t:!i;e.setAttribute("aria-pressed",n)}},format:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return c.is.empty(e)?e:e.toString().replace(/{(\d+)}/g,function(e,t){return c.is.string(i[t])?i[t]:""})},getPercentage:function(e,t){return 0===e||0===t||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)},getHours:function(e){return parseInt(e/60/60%60,10)},getMinutes:function(e){return parseInt(e/60%60,10)},getSeconds:function(e){return parseInt(e%60,10)},formatTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!c.is.number(e))return this.formatTime(null,t,i);var n=function(e){return("0"+e).slice(-2)},s=this.getHours(e),a=this.getMinutes(e),l=this.getSeconds(e);return t||s>0?s+=":":s="",(i?"-":"")+s+n(a)+":"+n(l)},replaceAll:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString())},toTitleCase:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString().replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},toPascalCase:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return e=c.replaceAll(e,"-"," "),e=c.replaceAll(e,"_"," "),e=c.toTitleCase(e),c.replaceAll(e," ","")},toCamelCase:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(e=c.toPascalCase(e)).charAt(0).toLowerCase()+e.slice(1)},extend:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(!i.length)return e;var s=i.shift();return c.is.object(s)?(Object.keys(s).forEach(function(t){c.is.object(s[t])?(Object.keys(e).includes(t)||Object.assign(e,r({},t,{})),c.extend(e[t],s[t])):Object.assign(e,r({},t,s[t]))}),c.extend.apply(c,[e].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}(i)))):e},dedupe:function(e){return c.is.array(e)?e.filter(function(t,i){return e.indexOf(t)===i}):e},closest:function(e,t){return c.is.array(e)&&e.length?e.reduce(function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e}):null},getProviderByUrl:function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/.+$/.test(e)?n.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?n.vimeo:null},parseYouTubeId:function(e){if(c.is.empty(e))return null;return e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e},parseVimeoId:function(e){if(c.is.empty(e))return null;if(c.is.number(Number(e)))return e;return e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e},parseUrl:function(e){var t=document.createElement("a");return t.href=e,t},getUrlParams:function(e){var t=e;(e.startsWith("http://")||e.startsWith("https://"))&&(t=this.parseUrl(e).search);return this.is.empty(t)?null:t.slice(t.indexOf("?")+1).split("&").reduce(function(e,t){var i=t.split("="),n=o(i,2),s=n[0],a=n[1];return Object.assign(e,r({},s,decodeURIComponent(a)))},{})},buildUrlParams:function(e){return c.is.object(e)?Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&"):""},stripHTML:function(e){var t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText},getAspectRatio:function(e,t){var i=function e(t,i){return 0===i?t:e(i,t%i)}(e,t);return e/i+":"+t/i},get transitionEndEvent(){var e=document.createElement("span"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(t).find(function(t){return void 0!==e.style[t]});return!!c.is.string(i)&&t[i]},repaint:function(e){setTimeout(function(){c.toggleHidden(e,!0),e.offsetHeight,c.toggleHidden(e,!1)},0)}},u={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,i){var n=!1,s=!1,a=c.getBrowser(),l=a.isIPhone&&i&&u.playsinline;switch(t+":"+e){case"html5:video":s=(n=u.video)&&u.rangeInput&&(!a.isIPhone||l);break;case"html5:audio":s=(n=u.audio)&&u.rangeInput;break;case"youtube:video":case"vimeo:video":n=!0,s=u.rangeInput&&(!a.isIPhone||l);break;default:s=(n=u.audio&&u.video)&&u.rangeInput}return{api:n,ui:s}},pip:!c.getBrowser().isIPhone&&c.is.function(c.createElement("video").webkitSetPresentationMode),airplay:c.is.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(e){var t=this.media;try{if(!this.isHTML5||!c.is.function(t.canPlayType))return!1;if(e.includes("codecs="))return t.canPlayType(e).replace(/no/,"");if(this.isVideo)switch(e){case"video/webm":return t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/no/,"");case"video/mp4":return t.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,"");case"video/ogg":return t.canPlayType('video/ogg; codecs="theora"').replace(/no/,"");default:return!1}else if(this.isAudio)switch(e){case"audio/mpeg":return t.canPlayType("audio/mpeg;").replace(/no/,"");case"audio/ogg":return t.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/,"");case"audio/wav":return t.canPlayType('audio/wav; codecs="1"').replace(/no/,"");default:return!1}}catch(e){return!1}return!1},textTracks:"textTracks"in document.createElement("video"),passiveListeners:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t)}catch(e){}return e}(),rangeInput:(t=document.createElement("input"),t.type="range","range"===t.type),touch:"ontouchstart"in document.documentElement,transitions:!1!==c.transitionEndEvent,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},d={getSources:function(){return this.isHTML5?this.media.querySelectorAll("source"):null},getQualityOptions:function(){if(!this.isHTML5)return null;var e=d.getSources.call(this);if(c.is.empty(e))return null;var t=Array.from(e).filter(function(e){return!c.is.empty(e.getAttribute("size"))});return c.is.empty(t)?null:c.dedupe(t.map(function(e){return Number(e.getAttribute("size"))}))},extend:function(){if(this.isHTML5){var e=this;Object.defineProperty(e.media,"quality",{get:function(){var t=d.getSources.call(e);if(c.is.empty(t))return null;var i=Array.from(t).filter(function(t){return t.getAttribute("src")===e.source});return c.is.empty(i)?null:Number(i[0].getAttribute("size"))},set:function(t){var i=d.getSources.call(e);if(!c.is.empty(i)){var n=Array.from(i).filter(function(e){return Number(e.getAttribute("size"))===t});if(!c.is.empty(n)){var s=n.filter(function(t){return u.mime.call(e,t.getAttribute("type"))});if(!c.is.empty(s)){c.dispatchEvent.call(e,e.media,"qualityrequested",!1,{quality:t});var a=e.currentTime,l=e.playing;e.media.src=s[0].getAttribute("src"),e.media.load(),l&&e.play(),e.currentTime=a,c.dispatchEvent.call(e,e.media,"qualitychange",!1,{quality:t})}}}}})}},cancelRequests:function(){this.isHTML5&&(c.removeElement(d.getSources()),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(c.is.empty(e)||c.is.empty(t)||!Object.keys(t.i18n).includes(e))return"";var i=t.i18n[e],n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach(function(e){var t=o(e,2),n=t[0],s=t[1];i=c.replaceAll(i,n,s)}),i},h=c.getBrowser(),m={addStyleHook:function(){c.toggleClass(this.elements.container,this.config.selectors.container.replace(".",""),!0),c.toggleClass(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for "+this.provider+" "+this.type),void m.toggleNativeControls.call(this,!0);c.is.element(this.elements.controls)||(f.inject.call(this),this.listeners.controls()),m.toggleNativeControls.call(this),y.setup.call(this),this.volume=null,this.muted=null,this.speed=null,this.loop=null,this.quality=null,m.updateVolume.call(this),m.timeUpdate.call(this),m.checkPlaying.call(this),c.toggleClass(this.elements.container,this.config.classNames.pip.supported,u.pip&&this.isHTML5&&this.isVideo),c.toggleClass(this.elements.container,this.config.classNames.airplay.supported,u.airplay&&this.isHTML5),c.toggleClass(this.elements.container,this.config.classNames.isIos,h.isIos),c.toggleClass(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(function(){c.dispatchEvent.call(e,e.media,"ready")},0),m.setTitle.call(this),m.setPoster.call(this)},setTitle:function(){var e=p("play",this.config);if(c.is.string(this.config.title)&&!c.is.empty(this.config.title)&&(e+=", "+this.config.title,this.elements.container.setAttribute("aria-label",this.config.title)),c.is.nodeList(this.elements.buttons.play)&&Array.from(this.elements.buttons.play).forEach(function(t){t.setAttribute("aria-label",e)}),this.isEmbed){var t=c.getElement.call(this,"iframe");if(!c.is.element(t))return;var i=c.is.empty(this.config.title)?"video":this.config.title,n=p("frameTitle",this.config);t.setAttribute("title",n.replace("{title}",i))}},setPoster:function(){if(c.is.element(this.elements.poster)&&!c.is.empty(this.poster)){var e=this.poster.split(",");this.elements.poster.style.backgroundImage=e.map(function(e){return"url('"+e+"')"}).join(",")}},checkPlaying:function(e){c.toggleClass(this.elements.container,this.config.classNames.playing,this.playing),c.toggleClass(this.elements.container,this.config.classNames.paused,this.paused),c.toggleClass(this.elements.container,this.config.classNames.stopped,this.stopped),c.toggleState(this.elements.buttons.play,this.playing),c.is.event(e)&&"timeupdate"===e.type||this.toggleControls(!this.playing)},checkLoading:function(e){var t=this;this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(function(){c.toggleClass(t.elements.container,t.config.classNames.loading,t.loading),t.toggleControls(t.loading)},this.loading?250:0)},checkFailed:function(){var e=this;this.failed=3===this.media.networkState,this.failed&&(c.toggleClass(this.elements.container,this.config.classNames.loading,!1),c.toggleClass(this.elements.container,this.config.classNames.error,!0)),clearTimeout(this.timers.failed),this.timers.loading=setTimeout(function(){c.toggleClass(e.elements.container,e.config.classNames.loading,e.loading),e.toggleControls(e.loading)},this.loading?250:0)},updateVolume:function(){this.supported.ui&&(c.is.element(this.elements.inputs.volume)&&m.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),c.is.element(this.elements.buttons.mute)&&c.toggleState(this.elements.buttons.mute,this.muted||0===this.volume))},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;c.is.element(e)&&(e.value=t,f.updateRangeFill.call(this,e))},setProgress:function(e,t){var i=c.is.number(t)?t:0,n=c.is.element(e)?e:this.elements.display.buffer;if(c.is.element(n)){n.value=i;var s=n.getElementsByTagName("span")[0];c.is.element(s)&&(s.childNodes[0].nodeValue=i)}},updateProgress:function(e){if(this.supported.ui&&c.is.event(e)){var t=0;if(e)switch(e.type){case"timeupdate":case"seeking":t=c.getPercentage(this.currentTime,this.duration),"timeupdate"===e.type&&m.setRange.call(this,this.elements.inputs.seek,t);break;case"playing":case"progress":m.setProgress.call(this,this.elements.display.buffer,100*this.buffered)}}},updateTimeDisplay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(c.is.element(e)&&c.is.number(t)){var n=c.getHours(this.duration)>0;e.textContent=c.formatTime(t,n,i)}},timeUpdate:function(e){var t=!c.is.element(this.elements.display.duration)&&this.config.invertTime;m.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||m.updateProgress.call(this,e)},durationUpdate:function(){if(this.supported.ui){var e=c.is.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&m.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&m.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),f.updateSeekTooltip.call(this)}}},g=c.getBrowser(),f={updateRangeFill:function(e){var t=c.is.event(e)?e.target:e;c.is.element(t)&&"range"===t.getAttribute("type")&&(t.setAttribute("aria-valuenow",t.value),g.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%"))},getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location).host!==window.location.host||g.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=c.getElement.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:c.getElements.call(this,this.config.selectors.buttons.play),pause:c.getElement.call(this,this.config.selectors.buttons.pause),restart:c.getElement.call(this,this.config.selectors.buttons.restart),rewind:c.getElement.call(this,this.config.selectors.buttons.rewind),fastForward:c.getElement.call(this,this.config.selectors.buttons.fastForward),mute:c.getElement.call(this,this.config.selectors.buttons.mute),pip:c.getElement.call(this,this.config.selectors.buttons.pip),airplay:c.getElement.call(this,this.config.selectors.buttons.airplay),settings:c.getElement.call(this,this.config.selectors.buttons.settings),captions:c.getElement.call(this,this.config.selectors.buttons.captions),fullscreen:c.getElement.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=c.getElement.call(this,this.config.selectors.progress),this.elements.inputs={seek:c.getElement.call(this,this.config.selectors.inputs.seek),volume:c.getElement.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:c.getElement.call(this,this.config.selectors.display.buffer),currentTime:c.getElement.call(this,this.config.selectors.display.currentTime),duration:c.getElement.call(this,this.config.selectors.display.duration)},c.is.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector("."+this.config.classNames.tooltip)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon:function(e,t){var i=f.getIconUrl.call(this),n=(i.cors?"":i.url)+"#"+this.config.iconPrefix,s=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttributes(s,c.extend(t,{role:"presentation",focusable:"false"}));var a=document.createElementNS("http://www.w3.org/2000/svg","use"),l=n+"-"+e;return"href"in a?a.setAttributeNS("http://www.w3.org/1999/xlink","href",l):a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),s.appendChild(a),s},createLabel:function(e,t){var i=p(e,this.config),n=Object.assign({},t);switch(e){case"pip":i="PIP";break;case"airplay":i="AirPlay"}return"class"in n?n.class+=" "+this.config.classNames.hidden:n.class=this.config.classNames.hidden,c.createElement("span",n,i)},createBadge:function(e){if(c.is.empty(e))return null;var t=c.createElement("span",{class:this.config.classNames.menu.value});return t.appendChild(c.createElement("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var i=c.createElement("button"),n=Object.assign({},t),s=c.toCamelCase(e),a=!1,l=void 0,r=void 0,o=void 0,u=void 0;switch("type"in n||(n.type="button"),"class"in n?n.class.includes(this.config.classNames.control)&&(n.class+=" "+this.config.classNames.control):n.class=this.config.classNames.control,e){case"play":a=!0,l="play",o="pause",r="play",u="pause";break;case"mute":a=!0,l="mute",o="unmute",r="volume",u="muted";break;case"captions":a=!0,l="enableCaptions",o="disableCaptions",r="captions-off",u="captions-on";break;case"fullscreen":a=!0,l="enterFullscreen",o="exitFullscreen",r="enter-fullscreen",u="exit-fullscreen";break;case"play-large":n.class+=" "+this.config.classNames.control+"--overlaid",s="play",l="play",r="play";break;default:l=s,r=e}return a?(i.appendChild(f.createIcon.call(this,u,{class:"icon--pressed"})),i.appendChild(f.createIcon.call(this,r,{class:"icon--not-pressed"})),i.appendChild(f.createLabel.call(this,o,{class:"label--pressed"})),i.appendChild(f.createLabel.call(this,l,{class:"label--not-pressed"})),n["aria-pressed"]=!1):(i.appendChild(f.createIcon.call(this,r)),i.appendChild(f.createLabel.call(this,l))),c.extend(n,c.getAttributesFromSelector(this.config.selectors.buttons[s],n)),c.setAttributes(i,n),"play"===s?(c.is.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(i)):this.elements.buttons[s]=i,i},createRange:function(e,t){var i=c.createElement("label",{for:t.id,id:t.id+"-label",class:this.config.classNames.hidden},p(e,this.config)),n=c.createElement("input",c.extend(c.getAttributesFromSelector(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-labelledby":t.id+"-label","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=n,f.updateRangeFill.call(this,n),{label:i,input:n}},createProgress:function(e,t){var i=c.createElement("progress",c.extend(c.getAttributesFromSelector(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"presentation","aria-hidden":!0},t));if("volume"!==e){i.appendChild(c.createElement("span",null,"0"));var n="";switch(e){case"played":n=p("played",this.config);break;case"buffer":n=p("buffered",this.config)}i.textContent="% "+n.toLowerCase()}return this.elements.display[e]=i,i},createTime:function(e){var t=c.getAttributesFromSelector(this.config.selectors.display[e]),i=c.createElement("div",c.extend(t,{class:"plyr__time "+t.class,"aria-label":p(e,this.config)}),"00:00");return this.elements.display[e]=i,i},createMenuItem:function(e,t,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=c.createElement("li"),r=c.createElement("label",{class:this.config.classNames.control}),o=c.createElement("input",c.extend(c.getAttributesFromSelector(this.config.selectors.inputs[i]),{type:"radio",name:"plyr-"+i,value:e,checked:a,class:"plyr__sr-only"})),u=c.createElement("span",{hidden:""});r.appendChild(o),r.appendChild(u),r.insertAdjacentHTML("beforeend",n),c.is.element(s)&&r.appendChild(s),l.appendChild(r),t.appendChild(l)},updateSeekTooltip:function(e){var t=this;if(this.config.tooltips.seek&&c.is.element(this.elements.inputs.seek)&&c.is.element(this.elements.display.seekTooltip)&&0!==this.duration){var i=0,n=this.elements.inputs.seek.getBoundingClientRect(),s=this.config.classNames.tooltip+"--visible",a=function(e){c.toggleClass(t.elements.display.seekTooltip,s,e)};if(this.touch)a(!1);else{if(c.is.event(e))i=100/n.width*(e.pageX-n.left);else{if(!c.hasClass(this.elements.display.seekTooltip,s))return;i=parseFloat(this.elements.display.seekTooltip.style.left,10)}i<0?i=0:i>100&&(i=100),m.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*i),this.elements.display.seekTooltip.style.left=i+"%",c.is.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&a("mouseenter"===e.type)}}},toggleTab:function(e,t){c.toggleHidden(this.elements.settings.tabs[e],!t)},setQualityMenu:function(e){var t=this;if(c.is.element(this.elements.settings.panes.quality)){var i=this.elements.settings.panes.quality.querySelector("ul");c.is.array(e)&&(this.options.quality=e.filter(function(e){return t.config.quality.options.includes(e)}));var n=!c.is.empty(this.options.quality)&&this.options.quality.length>1;if(f.toggleTab.call(this,"quality",n),f.checkMenu.call(this),n){c.emptyElement(i);this.options.quality.sort(function(e,i){var n=t.config.quality.options;return n.indexOf(e)>n.indexOf(i)?1:-1}).forEach(function(e){var n=f.getLabel.call(t,"quality",e);f.createMenuItem.call(t,e,i,"quality",n,function(e){var i="";switch(e){case 2160:i="4K";break;case 1440:case 1080:case 720:i="HD";break;case 576:case 480:i="SD"}return i.length?f.createBadge.call(t,i):null}(e))}),f.updateSetting.call(this,"quality",i)}}},getLabel:function(e,t){switch(e){case"speed":return 1===t?p("normal",this.config):t+"×";case"quality":return c.is.number(t)?t+"p":c.toTitleCase(t);case"captions":return y.getLabel.call(this);default:return null}},updateSetting:function(e,t,i){var n=this.elements.settings.panes[e],s=null,a=t;switch(e){case"captions":s=this.captions.active?this.options.captions.length>2||!this.options.captions.some(function(e){return"enabled"===e})?this.captions.language:"enabled":"";break;default:if(s=c.is.empty(i)?this[e]:i,c.is.empty(s)&&(s=this.config[e].default),!c.is.empty(this.options[e])&&!this.options[e].includes(s))return void this.debug.warn("Unsupported value of '"+s+"' for "+e);if(!this.config[e].options.includes(s))return void this.debug.warn("Disabled value of '"+s+"' for "+e)}if(c.is.element(a)||(a=n&&n.querySelector("ul")),c.is.element(a)){this.elements.settings.tabs[e].querySelector("."+this.config.classNames.menu.value).innerHTML=f.getLabel.call(this,e,s);var l=a&&a.querySelector('input[value="'+s+'"]');c.is.element(l)&&(l.checked=!0)}},setCaptionsMenu:function(){var e=this,t=this.elements.settings.panes.captions.querySelector("ul"),i=y.getTracks.call(this).length;if(f.toggleTab.call(this,"captions",i),c.emptyElement(t),f.checkMenu.call(this),i){var n=y.getTracks.call(this).map(function(t){return{language:c.is.empty(t.language)?"enabled":t.language,label:y.getLabel.call(e,t)}});n.unshift({language:"",label:p("disabled",this.config)}),n.forEach(function(i){f.createMenuItem.call(e,i.language,t,"language",i.label,"enabled"!==i.language?f.createBadge.call(e,i.language.toUpperCase()):null,i.language.toLowerCase()===e.captions.language.toLowerCase())}),this.options.captions=n.map(function(e){return e.language}),f.updateSetting.call(this,"captions",t)}},setSpeedMenu:function(e){var t=this;if(this.config.controls.includes("settings")&&this.config.settings.includes("speed")&&c.is.element(this.elements.settings.panes.speed)){c.is.array(e)?this.options.speed=e:(this.isHTML5||this.isVimeo)&&(this.options.speed=[.5,.75,1,1.25,1.5,1.75,2]),this.options.speed=this.options.speed.filter(function(e){return t.config.speed.options.includes(e)});var i=!c.is.empty(this.options.speed)&&this.options.speed.length>1;if(f.toggleTab.call(this,"speed",i),f.checkMenu.call(this),i){var n=this.elements.settings.panes.speed.querySelector("ul");c.emptyElement(n),this.options.speed.forEach(function(e){var i=f.getLabel.call(t,"speed",e);f.createMenuItem.call(t,e,n,"speed",i)}),f.updateSetting.call(this,"speed",n)}}},checkMenu:function(){var e=this.elements.settings.tabs,t=!c.is.empty(e)&&Object.values(e).some(function(e){return!e.hidden});c.toggleHidden(this.elements.settings.menu,!t)},toggleMenu:function(e){var t=this.elements.settings.form,i=this.elements.buttons.settings;if(c.is.element(t)&&c.is.element(i)){var n=c.is.boolean(e)?e:c.is.element(t)&&t.hasAttribute("hidden");if(c.is.event(e)){var s=c.is.element(t)&&t.contains(e.target),a=e.target===this.elements.buttons.settings;if(s||!s&&!a&&n)return;a&&e.stopPropagation()}c.is.element(i)&&i.setAttribute("aria-expanded",n),c.is.element(t)&&(c.toggleHidden(t,!n),c.toggleClass(this.elements.container,this.config.classNames.menu.open,n),n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",-1))}},getTabSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),Array.from(t.querySelectorAll("input[name]")).forEach(function(e){var t=e.getAttribute("name");e.setAttribute("name",t+"-clone")}),e.parentNode.appendChild(t);var i=t.scrollWidth,n=t.scrollHeight;return c.removeElement(t),{width:i,height:n}},showTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.elements.settings.menu,i=document.getElementById(e);if(c.is.element(i)&&"tabpanel"===i.getAttribute("role")){var n=t.querySelector('[role="tabpanel"]:not([hidden])'),s=n.parentNode;if(Array.from(t.querySelectorAll('[aria-controls="'+n.getAttribute("id")+'"]')).forEach(function(e){e.setAttribute("aria-expanded",!1)}),u.transitions&&!u.reducedMotion){s.style.width=n.scrollWidth+"px",s.style.height=n.scrollHeight+"px";var a=f.getTabSize.call(this,i);c.on(s,c.transitionEndEvent,function e(t){t.target===s&&["width","height"].includes(t.propertyName)&&(s.style.width="",s.style.height="",c.off(s,c.transitionEndEvent,e))}),s.style.width=a.width+"px",s.style.height=a.height+"px"}c.toggleHidden(n,!0),n.setAttribute("tabindex",-1),c.toggleHidden(i,!1);var l=c.getElements.call(this,'[aria-controls="'+e+'"]');Array.from(l).forEach(function(e){e.setAttribute("aria-expanded",!0)}),i.removeAttribute("tabindex"),i.querySelectorAll("button:not(:disabled), input:not(:disabled), [tabindex]")[0].focus()}},create:function(e){var t=this;if(c.is.empty(this.config.controls))return null;var i=c.createElement("div",c.getAttributesFromSelector(this.config.selectors.controls.wrapper));if(this.config.controls.includes("restart")&&i.appendChild(f.createButton.call(this,"restart")),this.config.controls.includes("rewind")&&i.appendChild(f.createButton.call(this,"rewind")),this.config.controls.includes("play")&&i.appendChild(f.createButton.call(this,"play")),this.config.controls.includes("fast-forward")&&i.appendChild(f.createButton.call(this,"fast-forward")),this.config.controls.includes("progress")){var n=c.createElement("div",c.getAttributesFromSelector(this.config.selectors.progress)),s=f.createRange.call(this,"seek",{id:"plyr-seek-"+e.id});if(n.appendChild(s.label),n.appendChild(s.input),n.appendChild(f.createProgress.call(this,"buffer")),this.config.tooltips.seek){var a=c.createElement("span",{role:"tooltip",class:this.config.classNames.tooltip},"00:00");n.appendChild(a),this.elements.display.seekTooltip=a}this.elements.progress=n,i.appendChild(this.elements.progress)}if(this.config.controls.includes("current-time")&&i.appendChild(f.createTime.call(this,"currentTime")),this.config.controls.includes("duration")&&i.appendChild(f.createTime.call(this,"duration")),this.config.controls.includes("mute")&&i.appendChild(f.createButton.call(this,"mute")),this.config.controls.includes("volume")){var l=c.createElement("div",{class:"plyr__volume"}),r={max:1,step:.05,value:this.config.volume},o=f.createRange.call(this,"volume",c.extend(r,{id:"plyr-volume-"+e.id}));l.appendChild(o.label),l.appendChild(o.input),this.elements.volume=l,i.appendChild(l)}if(this.config.controls.includes("captions")&&i.appendChild(f.createButton.call(this,"captions")),this.config.controls.includes("settings")&&!c.is.empty(this.config.settings)){var h=c.createElement("div",{class:"plyr__menu",hidden:""});h.appendChild(f.createButton.call(this,"settings",{id:"plyr-settings-toggle-"+e.id,"aria-haspopup":!0,"aria-controls":"plyr-settings-"+e.id,"aria-expanded":!1}));var m=c.createElement("form",{class:"plyr__menu__container",id:"plyr-settings-"+e.id,hidden:"","aria-labelled-by":"plyr-settings-toggle-"+e.id,role:"tablist",tabindex:-1}),g=c.createElement("div"),y=c.createElement("div",{id:"plyr-settings-"+e.id+"-home","aria-labelled-by":"plyr-settings-toggle-"+e.id,role:"tabpanel"}),v=c.createElement("ul",{role:"tablist"});this.config.settings.forEach(function(i){var n=c.createElement("li",{role:"tab",hidden:""}),s=c.createElement("button",c.extend(c.getAttributesFromSelector(t.config.selectors.buttons.settings),{type:"button",class:t.config.classNames.control+" "+t.config.classNames.control+"--forward",id:"plyr-settings-"+e.id+"-"+i+"-tab","aria-haspopup":!0,"aria-controls":"plyr-settings-"+e.id+"-"+i,"aria-expanded":!1}),p(i,t.config)),a=c.createElement("span",{class:t.config.classNames.menu.value});a.innerHTML=e[i],s.appendChild(a),n.appendChild(s),v.appendChild(n),t.elements.settings.tabs[i]=n}),y.appendChild(v),g.appendChild(y),this.config.settings.forEach(function(i){var n=c.createElement("div",{id:"plyr-settings-"+e.id+"-"+i,hidden:"","aria-labelled-by":"plyr-settings-"+e.id+"-"+i+"-tab",role:"tabpanel",tabindex:-1}),s=c.createElement("button",{type:"button",class:t.config.classNames.control+" "+t.config.classNames.control+"--back","aria-haspopup":!0,"aria-controls":"plyr-settings-"+e.id+"-home","aria-expanded":!1},p(i,t.config));n.appendChild(s);var a=c.createElement("ul");n.appendChild(a),g.appendChild(n),t.elements.settings.panes[i]=n}),m.appendChild(g),h.appendChild(m),i.appendChild(h),this.elements.settings.form=m,this.elements.settings.menu=h}return this.config.controls.includes("pip")&&u.pip&&i.appendChild(f.createButton.call(this,"pip")),this.config.controls.includes("airplay")&&u.airplay&&i.appendChild(f.createButton.call(this,"airplay")),this.config.controls.includes("fullscreen")&&i.appendChild(f.createButton.call(this,"fullscreen")),this.config.controls.includes("play-large")&&this.elements.container.appendChild(f.createButton.call(this,"play-large")),this.elements.controls=i,this.isHTML5&&f.setQualityMenu.call(this,d.getQualityOptions.call(this)),f.setSpeedMenu.call(this),i},inject:function(){var e=this;if(this.config.loadSprite){var t=f.getIconUrl.call(this);t.cors&&c.loadSprite(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var n={id:this.id,seektime:this.config.seekTime,title:this.config.title},s=!0;c.is.string(this.config.controls)||c.is.element(this.config.controls)?i=this.config.controls:c.is.function(this.config.controls)?i=this.config.controls.call(this,n):(i=f.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:y.getLabel.call(this)}),s=!1);var a=function(e){var t=e;return Object.entries(n).forEach(function(e){var i=o(e,2),n=i[0],s=i[1];t=c.replaceAll(t,"{"+n+"}",s)}),t};s&&(c.is.string(this.config.controls)?i=a(i):c.is.element(i)&&(i.innerHTML=a(i.innerHTML)));var l=void 0;if(c.is.string(this.config.selectors.controls.container)&&(l=document.querySelector(this.config.selectors.controls.container)),c.is.element(l)||(l=this.elements.container),c.is.element(i)?l.appendChild(i):i&&l.insertAdjacentHTML("beforeend",i),c.is.element(this.elements.controls)||f.findElements.call(this),window.navigator.userAgent.includes("Edge")&&c.repaint(l),this.config.tooltips.controls){var r=c.getElements.call(this,[this.config.selectors.controls.wrapper," ",this.config.selectors.labels," .",this.config.classNames.hidden].join(""));Array.from(r).forEach(function(t){c.toggleClass(t,e.config.classNames.hidden,!1),c.toggleClass(t,e.config.classNames.tooltip,!0),t.setAttribute("role","tooltip")})}}},y={setup:function(){if(this.supported.ui){var e=this.storage.get("language");if(c.is.empty(e)||(this.captions.language=e),c.is.empty(this.captions.language)&&(this.captions.language=this.config.captions.language.toLowerCase()),!c.is.boolean(this.captions.active)){var t=this.storage.get("captions");c.is.boolean(t)?this.captions.active=t:this.captions.active=this.config.captions.active}if(!this.isVideo||this.isYouTube||this.isHTML5&&!u.textTracks)c.is.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this);else{c.is.element(this.elements.captions)||(this.elements.captions=c.createElement("div",c.getAttributesFromSelector(this.config.selectors.captions)),c.insertAfter(this.elements.captions,this.elements.wrapper)),c.toggleClass(this.elements.container,this.config.classNames.captions.enabled,!c.is.empty(y.getTracks.call(this)));var i=y.getTracks.call(this);if(!c.is.empty(i)){if(c.getBrowser().isIE&&window.URL){var n=this.media.querySelectorAll("track");Array.from(n).forEach(function(e){var t=e.getAttribute("src"),i=c.parseUrl(t);i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&c.fetch(t,"blob").then(function(t){e.setAttribute("src",window.URL.createObjectURL(t))}).catch(function(){c.removeElement(e)})})}y.setLanguage.call(this),y.show.call(this),c.is.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this)}}}},setLanguage:function(){var e=this;if(this.isHTML5&&this.isVideo){y.getTracks.call(this).forEach(function(t){c.on(t,"cuechange",function(t){return y.setCue.call(e,t)}),t.mode="hidden"});var t=y.getCurrentTrack.call(this);c.is.track(t)&&Array.from(t.activeCues||[]).length&&y.setCue.call(this,t)}else this.isVimeo&&this.captions.active&&this.embed.enableTextTrack(this.language)},getTracks:function(){return c.is.nullOrUndefined(this.media)?[]:Array.from(this.media.textTracks||[]).filter(function(e){return["captions","subtitles"].includes(e.kind)})},getCurrentTrack:function(){var e=this,t=y.getTracks.call(this);if(!t.length)return null;var i=t.find(function(t){return t.language.toLowerCase()===e.language});(i||(i=c.getElement.call(this,"track[default]")),i)||(i=o(t,1)[0]);return i},getLabel:function(e){var t=e;return!c.is.track(t)&&u.textTracks&&this.captions.active&&(t=y.getCurrentTrack.call(this)),c.is.track(t)?c.is.empty(t.label)?c.is.empty(t.language)?p("enabled",this.config):e.language.toUpperCase():t.label:p("disabled",this.config)},setCue:function(e){var t=c.is.event(e)?e.target:e,i=t.activeCues,n=i.length&&i[0];t===y.getCurrentTrack.call(this)&&(c.is.cue(n)?y.setText.call(this,n.getCueAsHTML()):y.setText.call(this,null),c.dispatchEvent.call(this,this.media,"cuechange"))},setText:function(e){if(this.supported.ui)if(c.is.element(this.elements.captions)){var t=c.createElement("span");c.emptyElement(this.elements.captions);var i=c.is.nullOrUndefined(e)?"":e;c.is.string(i)?t.textContent=i.trim():t.appendChild(i),this.elements.captions.appendChild(t)}else this.debug.warn("No captions element to render to")},show:function(){var e=this.storage.get("captions");c.is.boolean(e)?this.captions.active=e:e=this.config.captions.active,e&&(c.toggleClass(this.elements.container,this.config.classNames.captions.active,!0),c.toggleState(this.elements.buttons.captions,!0))}},v=function(){},b=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];a(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}return l(e,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):v}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):v}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):v}}]),e}(),k={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:"16:9",clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.3.7/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240,"default"]},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:(navigator.language||navigator.userLanguage).split("-")[0]},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",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad"},urls:{vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/v2/video/{0}.json"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://www.googleapis.com/youtube/v3/videos?id={0}&key={1}&fields=items(snippet(title))&part=snippet",poster:"https://img.youtube.com/vi/{0}/maxresdefault.jpg,https://img.youtube.com/vi/{0}/hqdefault.jpg"},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,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","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","qualityrequested","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"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress--buffer",played:".plyr__progress--played",loop:".plyr__progress--loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",menu:{quality:".js-plyr__menu__list--quality"}},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",ads:"plyr__ads",control:"plyr__control",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",error:"plyr--has-error",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",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"},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},keys:{google:null},ads:{enabled:!1,publisherId:""}},w=c.getBrowser();function E(){if(this.enabled){var e=this.player.elements.buttons.fullscreen;c.is.element(e)&&c.toggleState(e,this.active),c.dispatchEvent(this.target,this.active?"enterfullscreen":"exitfullscreen",!0),w.isIos||c.trapFocus.call(this.player,this.target,this.active)}}function T(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=e?"hidden":"",c.toggleClass(this.target,this.player.config.classNames.fullscreen.fallback,e),E.call(this)}var A=function(){function e(t){var i=this;a(this,e),this.player=t,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},c.on(document,"ms"===this.prefix?"MSFullscreenChange":this.prefix+"fullscreenchange",function(){E.call(i)}),c.on(this.player.elements.container,"dblclick",function(e){c.is.element(i.player.elements.controls)&&i.player.elements.controls.contains(e.target)||i.toggle()}),this.update()}return l(e,[{key:"update",value:function(){this.enabled?this.player.debug.log((e.native?"Native":"Fallback")+" fullscreen enabled"):this.player.debug.log("Fullscreen not supported and fallback disabled"),c.toggleClass(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}},{key:"enter",value:function(){this.enabled&&(w.isIos&&this.player.config.fullscreen.iosNative?this.player.playing&&this.target.webkitEnterFullscreen():e.native?this.prefix?c.is.empty(this.prefix)||this.target[this.prefix+"Request"+this.property]():this.target.requestFullscreen():T.call(this,!0))}},{key:"exit",value:function(){if(this.enabled)if(w.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),this.player.play();else if(e.native)if(this.prefix){if(!c.is.empty(this.prefix)){var t="moz"===this.prefix?"Cancel":"Exit";document[""+this.prefix+t+this.property]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document);else T.call(this,!1)}},{key:"toggle",value:function(){this.active?this.exit():this.enter()}},{key:"enabled",get:function(){return(e.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){return!!this.enabled&&(e.native?(this.prefix?document[""+this.prefix+this.property+"Element"]:document.fullscreenElement)===this.target:c.hasClass(this.target,this.player.config.classNames.fullscreen.fallback))}},{key:"target",get:function(){return w.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(c.is.function(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some(function(t){return!(!c.is.function(document[t+"ExitFullscreen"])&&!c.is.function(document[t+"CancelFullScreen"]))&&(e=t,!0)}),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),e}(),C=c.getBrowser(),S=function(){function e(t){a(this,e),this.player=t,this.lastKey=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}return l(e,[{key:"handleKey",value:function(e){var t=this,i=e.keyCode?e.keyCode:e.which,n="keydown"===e.type,s=n&&i===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&c.is.number(i)){if(n){var a=c.getFocusElement();if(c.is.element(a)&&c.matches(a,this.player.config.selectors.editable))return;switch([48,49,50,51,52,53,54,56,57,32,75,38,40,77,39,37,70,67,73,76,79].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:s||(t.player.currentTime=t.player.duration/10*(i-48));break;case 32:case 75:s||this.player.togglePlay();break;case 38:this.player.increaseVolume(.1);break;case 40:this.player.decreaseVolume(.1);break;case 77:s||(this.player.muted=!this.player.muted);break;case 39:this.player.forward();break;case 37:this.player.rewind();break;case 70:this.player.fullscreen.toggle();break;case 67:s||this.player.toggleCaptions();break;case 76:this.player.loop=!this.player.loop}!this.player.fullscreen.enabled&&this.player.fullscreen.active&&27===i&&this.player.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}}},{key:"toggleMenu",value:function(e){f.toggleMenu.call(this.player,e)}},{key:"firstTouch",value:function(){this.player.touch=!0,c.toggleClass(this.player.elements.container,this.player.config.classNames.isTouch,!0),c.off(document.body,"touchstart",this.firstTouch)}},{key:"global",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.player.config.keyboard.global&&c.toggleListener(window,"keydown keyup",this.handleKey,e,!1),c.toggleListener(document.body,"click",this.toggleMenu,e),c.on(document.body,"touchstart",this.firstTouch)}},{key:"container",value:function(){var e=this;!this.player.config.keyboard.global&&this.player.config.keyboard.focused&&c.on(this.player.elements.container,"keydown keyup",this.handleKey,!1),c.on(this.player.elements.container,"focusout",function(t){c.toggleClass(t.target,e.player.config.classNames.tabFocus,!1)}),c.on(this.player.elements.container,"keydown",function(t){9===t.keyCode&&setTimeout(function(){c.toggleClass(c.getFocusElement(),e.player.config.classNames.tabFocus,!0)},0)}),this.player.config.hideControls&&c.on(this.player.elements.container,"mouseenter mouseleave mousemove touchstart touchend touchmove enterfullscreen exitfullscreen",function(t){e.player.toggleControls(t)})}},{key:"media",value:function(){var e=this;if(c.on(this.player.media,"timeupdate seeking",function(t){return m.timeUpdate.call(e.player,t)}),c.on(this.player.media,"durationchange loadeddata loadedmetadata",function(t){return m.durationUpdate.call(e.player,t)}),c.on(this.player.media,"loadeddata",function(){c.toggleHidden(e.player.elements.volume,!e.player.hasAudio),c.toggleHidden(e.player.elements.buttons.mute,!e.player.hasAudio)}),c.on(this.player.media,"ended",function(){e.player.isHTML5&&e.player.isVideo&&e.player.config.resetOnEnd&&e.player.restart()}),c.on(this.player.media,"progress playing",function(t){return m.updateProgress.call(e.player,t)}),c.on(this.player.media,"volumechange",function(t){return m.updateVolume.call(e.player,t)}),c.on(this.player.media,"playing play pause ended emptied timeupdate",function(t){return m.checkPlaying.call(e.player,t)}),c.on(this.player.media,"waiting canplay seeked playing",function(t){return m.checkLoading.call(e.player,t)}),c.on(this.player.media,"playing",function(){e.player.ads&&e.player.ads.enabled&&!e.player.ads.initialized&&e.player.ads.managerPromise.then(function(){return e.player.ads.play()}).catch(function(){return e.player.play()})}),this.player.supported.ui&&this.player.config.clickToPlay&&!this.player.isAudio){var t=c.getElement.call(this.player,"."+this.player.config.classNames.video);if(!c.is.element(t))return;c.on(t,"click",function(){e.player.config.hideControls&&e.player.touch&&!e.player.paused||(e.player.paused?e.player.play():e.player.ended?(e.player.restart(),e.player.play()):e.player.pause())})}this.player.supported.ui&&this.player.config.disableContextMenu&&c.on(this.player.elements.wrapper,"contextmenu",function(e){e.preventDefault()},!1),c.on(this.player.media,"volumechange",function(){e.player.storage.set({volume:e.player.volume,muted:e.player.muted})}),c.on(this.player.media,"ratechange",function(){f.updateSetting.call(e.player,"speed"),e.player.storage.set({speed:e.player.speed})}),c.on(this.player.media,"qualityrequested",function(t){e.player.storage.set({quality:t.detail.quality})}),c.on(this.player.media,"qualitychange",function(t){f.updateSetting.call(e.player,"quality",null,t.detail.quality)}),c.on(this.player.media,"languagechange",function(){f.updateSetting.call(e.player,"captions"),e.player.storage.set({language:e.player.language})}),c.on(this.player.media,"captionsenabled captionsdisabled",function(){f.updateSetting.call(e.player,"captions"),e.player.storage.set({captions:e.player.captions.active})}),c.on(this.player.media,this.player.config.events.concat(["keyup","keydown"]).join(" "),function(t){var i={};"error"===t.type&&(i=e.player.media.error),c.dispatchEvent.call(e.player,e.player.elements.container,t.type,!0,i)})}},{key:"controls",value:function(){var e=this,t=C.isIE?"change":"input",i=function(t,i,n){var s=e.player.config.listeners[n],a=!0;c.is.function(s)&&(a=s.call(e.player,t)),a&&c.is.function(i)&&i.call(e.player,t)},n=function(t,n,s,a){var l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=e.player.config.listeners[a],o=c.is.function(r);c.on(t,n,function(e){return i(e,s,a)},l&&!o)};n(this.player.elements.buttons.play,"click",this.player.togglePlay,"play"),n(this.player.elements.buttons.restart,"click",this.player.restart,"restart"),n(this.player.elements.buttons.rewind,"click",this.player.rewind,"rewind"),n(this.player.elements.buttons.fastForward,"click",this.player.forward,"fastForward"),n(this.player.elements.buttons.mute,"click",function(){e.player.muted=!e.player.muted},"mute"),n(this.player.elements.buttons.captions,"click",this.player.toggleCaptions),n(this.player.elements.buttons.fullscreen,"click",function(){e.player.fullscreen.toggle()},"fullscreen"),n(this.player.elements.buttons.pip,"click",function(){e.player.pip="toggle"},"pip"),n(this.player.elements.buttons.airplay,"click",this.player.airplay,"airplay"),n(this.player.elements.buttons.settings,"click",function(t){f.toggleMenu.call(e.player,t)}),n(this.player.elements.settings.form,"click",function(t){t.stopPropagation();var n=function(){var t="plyr-settings-"+e.player.id+"-home";f.showTab.call(e.player,t)};if(c.matches(t.target,e.player.config.selectors.inputs.language))i(t,function(){e.player.language=t.target.value,n()},"language");else if(c.matches(t.target,e.player.config.selectors.inputs.quality))i(t,function(){e.player.quality=t.target.value,n()},"quality");else if(c.matches(t.target,e.player.config.selectors.inputs.speed))i(t,function(){e.player.speed=parseFloat(t.target.value),n()},"speed");else{var s=t.target;f.showTab.call(e.player,s.getAttribute("aria-controls"))}}),n(this.player.elements.inputs.seek,t,function(t){e.player.currentTime=t.target.value/t.target.max*e.player.duration},"seek"),this.player.config.toggleInvert&&!c.is.element(this.player.elements.display.duration)&&n(this.player.elements.display.currentTime,"click",function(){0!==e.player.currentTime&&(e.player.config.invertTime=!e.player.config.invertTime,m.timeUpdate.call(e.player))}),n(this.player.elements.inputs.volume,t,function(t){e.player.volume=t.target.value},"volume"),C.isWebkit&&n(c.getElements.call(this.player,'input[type="range"]'),"input",function(t){f.updateRangeFill.call(e.player,t.target)}),n(this.player.elements.progress,"mouseenter mouseleave mousemove",function(t){return f.updateSeekTooltip.call(e.player,t)}),this.player.config.hideControls&&(n(this.player.elements.controls,"mouseenter mouseleave",function(t){e.player.elements.controls.hover=!e.player.touch&&"mouseenter"===t.type}),n(this.player.elements.controls,"mousedown mouseup touchstart touchend touchcancel",function(t){e.player.elements.controls.pressed=["mousedown","touchstart"].includes(t.type)}),n(this.player.elements.controls,"focusin focusout",function(t){e.player.toggleControls(t)})),n(this.player.elements.inputs.volume,"wheel",function(t){var i=t.webkitDirectionInvertedFromDevice,n=0;(t.deltaY<0||t.deltaX>0)&&(i?(e.player.decreaseVolume(.02),n=-1):(e.player.increaseVolume(.02),n=1)),(t.deltaY>0||t.deltaX<0)&&(i?(e.player.increaseVolume(.02),n=1):(e.player.decreaseVolume(.02),n=-1)),(1===n&&e.player.media.volume<1||-1===n&&e.player.media.volume>0)&&t.preventDefault()},"volume",!1)}},{key:"clear",value:function(){this.global(!1)}}]),e}(),N={setup:function(){var e=this;c.toggleClass(this.elements.wrapper,this.config.classNames.embed,!0),N.setAspectRatio.call(this),c.is.object(window.Vimeo)?N.ready.call(this):c.loadScript(this.config.urls.vimeo.sdk).then(function(){N.ready.call(e)}).catch(function(t){e.debug.warn("Vimeo API failed to load",t)})},setAspectRatio:function(e){var t=c.is.string(e)?e.split(":"):this.config.ratio.split(":"),i=100/t[0]*t[1];if(this.elements.wrapper.style.paddingBottom=i+"%",this.supported.ui){var n=(240-i)/4.8;this.media.style.transform="translateY(-"+n+"%)"}},ready:function(){var e=this,t=this,i={loop:t.config.loop.active,autoplay:t.autoplay,byline:!1,portrait:!1,title:!1,speed:!0,transparent:0,gesture:"media",playsinline:!this.config.fullscreen.iosNative},n=c.buildUrlParams(i),s=t.media.getAttribute("src");c.is.empty(s)&&(s=t.media.getAttribute(t.config.attributes.embed.id));var a=c.parseVimeoId(s),l=c.createElement("iframe"),r=c.format(t.config.urls.vimeo.iframe,a,n);l.setAttribute("src",r),l.setAttribute("allowfullscreen",""),l.setAttribute("allowtransparency",""),l.setAttribute("allow","autoplay");var o=c.createElement("div",{class:t.config.classNames.embedContainer});o.appendChild(l),t.media=c.replaceElement(o,t.media),c.fetch(c.format(t.config.urls.vimeo.api,a),"json").then(function(e){if(!c.is.empty(e)){var i=new URL(e[0].thumbnail_large);i.pathname=i.pathname.split("_")[0]+".jpg",t.media.setAttribute("poster",i.href),m.setPoster.call(t)}}),t.embed=new window.Vimeo.Player(l,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=function(){t.embed.play().then(function(){t.media.paused=!1})},t.media.pause=function(){t.embed.pause().then(function(){t.media.paused=!0})},t.media.stop=function(){t.pause(),t.currentTime=0};var u=t.media.currentTime;Object.defineProperty(t.media,"currentTime",{get:function(){return u},set:function(e){var i=t.media.paused;t.media.seeking=!0,c.dispatchEvent.call(t,t.media,"seeking"),t.embed.setCurrentTime(e).catch(function(){}),i&&t.pause()}});var d=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:function(){return d},set:function(e){t.embed.setPlaybackRate(e).then(function(){d=e,c.dispatchEvent.call(t,t.media,"ratechange")}).catch(function(e){"Error"===e.name&&f.setSpeedMenu.call(t,[])})}});var p=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return p},set:function(e){t.embed.setVolume(e).then(function(){p=e,c.dispatchEvent.call(t,t.media,"volumechange")})}});var h=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return h},set:function(e){var i=!!c.is.boolean(e)&&e;t.embed.setVolume(i?0:t.config.volume).then(function(){h=i,c.dispatchEvent.call(t,t.media,"volumechange")})}});var g=t.config.loop;Object.defineProperty(t.media,"loop",{get:function(){return g},set:function(e){var i=c.is.boolean(e)?e:t.config.loop.active;t.embed.setLoop(i).then(function(){g=i})}});var v=void 0;t.embed.getVideoUrl().then(function(e){v=e}).catch(function(t){e.debug.warn(t)}),Object.defineProperty(t.media,"currentSrc",{get:function(){return v}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(function(t){var i=c.getAspectRatio(t[0],t[1]);N.setAspectRatio.call(e,i)}),t.embed.setAutopause(t.config.autopause).then(function(e){t.config.autopause=e}),t.embed.getVideoTitle().then(function(i){t.config.title=i,m.setTitle.call(e)}),t.embed.getCurrentTime().then(function(e){u=e,c.dispatchEvent.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(function(e){t.media.duration=e,c.dispatchEvent.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(function(e){t.media.textTracks=e,y.setup.call(t)}),t.embed.on("cuechange",function(e){var i=null;e.cues.length&&(i=c.stripHTML(e.cues[0].text)),y.setText.call(t,i)}),t.embed.on("loaded",function(){c.is.element(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("play",function(){t.media.paused&&c.dispatchEvent.call(t,t.media,"play"),t.media.paused=!1,c.dispatchEvent.call(t,t.media,"playing")}),t.embed.on("pause",function(){t.media.paused=!0,c.dispatchEvent.call(t,t.media,"pause")}),t.embed.on("timeupdate",function(e){t.media.seeking=!1,u=e.seconds,c.dispatchEvent.call(t,t.media,"timeupdate")}),t.embed.on("progress",function(e){t.media.buffered=e.percent,c.dispatchEvent.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&c.dispatchEvent.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(function(e){e!==t.media.duration&&(t.media.duration=e,c.dispatchEvent.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",function(){t.media.seeking=!1,c.dispatchEvent.call(t,t.media,"seeked"),c.dispatchEvent.call(t,t.media,"play")}),t.embed.on("ended",function(){t.media.paused=!0,c.dispatchEvent.call(t,t.media,"ended")}),t.embed.on("error",function(e){t.media.error=e,c.dispatchEvent.call(t,t.media,"error")}),setTimeout(function(){return m.build.call(t)},0)}};function P(e){switch(e){case"hd2160":return 2160;case 2160:return"hd2160";case"hd1440":return 1440;case 1440:return"hd1440";case"hd1080":return 1080;case 1080:return"hd1080";case"hd720":return 720;case 720:return"hd720";case"large":return 480;case 480:return"large";case"medium":return 360;case 360:return"medium";case"small":return 240;case 240:return"small";default:return"default"}}var x={setup:function(){var e=this;c.toggleClass(this.elements.wrapper,this.config.classNames.embed,!0),x.setAspectRatio.call(this),c.is.object(window.YT)&&c.is.function(window.YT.Player)?x.ready.call(this):(c.loadScript(this.config.urls.youtube.sdk).catch(function(t){e.debug.warn("YouTube API failed to load",t)}),window.onYouTubeReadyCallbacks=window.onYouTubeReadyCallbacks||[],window.onYouTubeReadyCallbacks.push(function(){x.ready.call(e)}),window.onYouTubeIframeAPIReady=function(){window.onYouTubeReadyCallbacks.forEach(function(e){e()})})},getTitle:function(e){var t=this;if(c.is.function(this.embed.getVideoData)){var i=this.embed.getVideoData().title;if(c.is.empty(i))return this.config.title=i,void m.setTitle.call(this)}var n=this.config.keys.google;if(c.is.string(n)&&!c.is.empty(n)){var s=c.format(this.config.urls.youtube.api,e,n);c.fetch(s).then(function(e){c.is.object(e)&&(t.config.title=e.items[0].snippet.title,m.setTitle.call(t))}).catch(function(){})}},setAspectRatio:function(){var e=this.config.ratio.split(":");this.elements.wrapper.style.paddingBottom=100/e[0]*e[1]+"%"},ready:function(){var e=this,t=e.media.getAttribute("id");if(c.is.empty(t)||!t.startsWith("youtube-")){var i=e.media.getAttribute("src");c.is.empty(i)&&(i=e.media.getAttribute(this.config.attributes.embed.id));var n=c.parseYouTubeId(i),s=c.generateId(e.provider),a=c.createElement("div",{id:s});e.media=c.replaceElement(a,e.media),e.media.setAttribute("poster",c.format(e.config.urls.youtube.poster,n)),e.embed=new window.YT.Player(s,{videoId:n,playerVars:{autoplay:e.config.autoplay?1:0,controls:e.supported.ui?0:1,rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,disablekb:1,playsinline:1,widget_referrer:window?window.location.href:null,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language},events:{onError:function(t){if(!c.is.object(e.media.error)){var i={code:t.data};switch(t.data){case 2:i.message="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.";break;case 5:i.message="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:i.message="The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.";break;case 101:case 150:i.message="The owner of the requested video does not allow it to be played in embedded players.";break;default:i.message="An unknown error occured"}e.media.error=i,c.dispatchEvent.call(e,e.media,"error")}},onPlaybackQualityChange:function(){c.dispatchEvent.call(e,e.media,"qualitychange",!1,{quality:e.media.quality})},onPlaybackRateChange:function(t){var i=t.target;e.media.playbackRate=i.getPlaybackRate(),c.dispatchEvent.call(e,e.media,"ratechange")},onReady:function(t){var i=t.target;x.getTitle.call(e,n),e.media.play=function(){i.playVideo()},e.media.pause=function(){i.pauseVideo()},e.media.stop=function(){i.stopVideo()},e.media.duration=i.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(t){var n=e.media.paused;e.media.seeking=!0,c.dispatchEvent.call(e,e.media,"seeking"),i.seekTo(t),n&&e.pause()}}),Object.defineProperty(e.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(e){i.setPlaybackRate(e)}}),Object.defineProperty(e.media,"quality",{get:function(){return P(i.getPlaybackQuality())},set:function(t){var n=t;i.setPlaybackQuality(P(n)),c.dispatchEvent.call(e,e.media,"qualityrequested",!1,{quality:n})}});var s=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return s},set:function(t){s=t,i.setVolume(100*s),c.dispatchEvent.call(e,e.media,"volumechange")}});var a=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return a},set:function(t){var n=c.is.boolean(t)?t:a;a=n,i[n?"mute":"unMute"](),c.dispatchEvent.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}}),e.options.speed=i.getAvailablePlaybackRates(),e.supported.ui&&e.media.setAttribute("tabindex",-1),c.dispatchEvent.call(e,e.media,"timeupdate"),c.dispatchEvent.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(function(){e.media.buffered=i.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&c.dispatchEvent.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),c.dispatchEvent.call(e,e.media,"canplaythrough"))},200),setTimeout(function(){return m.build.call(e)},50)},onStateChange:function(t){var i,n=t.target;switch(clearInterval(e.timers.playing),t.data){case-1:c.dispatchEvent.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),c.dispatchEvent.call(e,e.media,"progress");break;case 0:e.media.paused=!0,e.media.loop?(n.stopVideo(),n.playVideo()):c.dispatchEvent.call(e,e.media,"ended");break;case 1:e.media.seeking&&c.dispatchEvent.call(e,e.media,"seeked"),e.media.seeking=!1,e.media.paused&&c.dispatchEvent.call(e,e.media,"play"),e.media.paused=!1,c.dispatchEvent.call(e,e.media,"playing"),e.timers.playing=setInterval(function(){c.dispatchEvent.call(e,e.media,"timeupdate")},50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),c.dispatchEvent.call(e,e.media,"durationchange")),f.setQualityMenu.call(e,(i=n.getAvailableQualityLevels(),c.is.empty(i)?i:c.dedupe(i.map(function(e){return P(e)}))));break;case 2:e.media.paused=!0,c.dispatchEvent.call(e,e.media,"pause")}c.dispatchEvent.call(e,e.elements.container,"statechange",!1,{code:t.data})}}})}}},L={setup:function(){if(this.media)if(c.toggleClass(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),c.toggleClass(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&c.toggleClass(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=c.createElement("div",{class:this.config.classNames.video}),c.wrap(this.media,this.elements.wrapper),this.elements.poster=c.createElement("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isEmbed)switch(this.provider){case"youtube":x.setup.call(this);break;case"vimeo":N.setup.call(this)}else this.isHTML5&&d.extend.call(this);else this.debug.warn("No media element found!")}},M=function(){function e(t){var i=this;a(this,e),this.player=t,this.publisherId=t.config.ads.publisherId,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(function(e,t){i.on("loaded",e),i.on("error",t)}),this.load()}return l(e,[{key:"load",value:function(){var e=this;this.enabled&&(c.is.object(window.google)&&c.is.object(window.google.ima)?this.ready():c.loadScript(this.player.config.urls.googleIMA.sdk).then(function(){e.ready()}).catch(function(){e.trigger("error",new Error("Google IMA SDK failed to load"))}))}},{key:"ready",value:function(){var e=this;this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(function(){e.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}},{key:"setupIMA",value:function(){this.elements.container=c.createElement("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),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container),this.requestAds()}},{key:"requestAds",value:function(){var e=this,t=this.player.elements.container;try{this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(t){return e.onAdsManagerLoaded(t)},!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(t){return e.onAdError(t)},!1);var i=new google.ima.AdsRequest;i.adTagUrl=this.tagUrl,i.linearAdSlotWidth=t.offsetWidth,i.linearAdSlotHeight=t.offsetHeight,i.nonLinearAdSlotWidth=t.offsetWidth,i.nonLinearAdSlotHeight=t.offsetHeight,i.forceNonLinearFullSlot=!1,i.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(i)}catch(e){this.onAdError(e)}}},{key:"pollCountdown",value:function(){var e=this;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]))return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(function(){var t=c.formatTime(Math.max(e.manager.getRemainingTime(),0)),i=p("advertisement",e.player.config)+" - "+t;e.elements.container.setAttribute("data-badge-text",i)},100)}},{key:"onAdsManagerLoaded",value:function(e){var t=this,i=new google.ima.AdsRenderingSettings;i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i.enablePreloading=!0,this.manager=e.getAdsManager(this.player,i),this.cuePoints=this.manager.getCuePoints(),c.is.empty(this.cuePoints)||this.cuePoints.forEach(function(e){if(0!==e&&-1!==e&&e<t.player.duration){var i=t.player.elements.progress;if(c.is.element(i)){var n=100/t.player.duration*e,s=c.createElement("span",{class:t.player.config.classNames.cues});s.style.left=n.toString()+"%",i.appendChild(s)}}}),this.manager.setVolume(this.player.volume),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,function(e){return t.onAdError(e)}),Object.keys(google.ima.AdEvent.Type).forEach(function(e){t.manager.addEventListener(google.ima.AdEvent.Type[e],function(e){return t.onAdEvent(e)})}),this.trigger("loaded")}},{key:"onAdEvent",value:function(e){var t=this,i=this.player.elements.container,n=e.getAd(),s=function(e){var i="ads"+e.replace(/_/g,"").toLowerCase();c.dispatchEvent.call(t.player,t.player.media,i)};switch(e.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),s(e.type),this.pollCountdown(!0),n.isLinear()||(n.width=i.offsetWidth,n.height=i.offsetHeight);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:s(e.type),this.loadAds();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:s(e.type),this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:s(e.type),this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.STARTED:case google.ima.AdEvent.Type.MIDPOINT:case google.ima.AdEvent.Type.COMPLETE:case google.ima.AdEvent.Type.IMPRESSION:case google.ima.AdEvent.Type.CLICK:s(e.type)}}},{key:"onAdError",value:function(e){this.cancel(),this.player.debug.warn("Ads error",e)}},{key:"listeners",value:function(){var e=this,t=this.player.elements.container,i=void 0;this.player.on("ended",function(){e.loader.contentComplete()}),this.player.on("seeking",function(){return i=e.player.currentTime}),this.player.on("seeked",function(){var t=e.player.currentTime;c.is.empty(e.cuePoints)||e.cuePoints.forEach(function(n,s){i<n&&n<t&&(e.manager.discardAdBreak(),e.cuePoints.splice(s,1))})}),window.addEventListener("resize",function(){e.manager&&e.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}},{key:"play",value:function(){var e=this,t=this.player.elements.container;this.managerPromise||this.resumeContent(),this.managerPromise.then(function(){e.elements.displayContainer.initialize();try{e.initialized||(e.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),e.manager.start()),e.initialized=!0}catch(t){e.onAdError(t)}}).catch(function(){})}},{key:"resumeContent",value:function(){this.elements.container.style.zIndex="",this.playing=!1,this.player.currentTime<this.player.duration&&this.player.play()}},{key:"pauseContent",value:function(){this.elements.container.style.zIndex=3,this.playing=!0,this.player.pause()}},{key:"cancel",value:function(){this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}},{key:"loadAds",value:function(){var e=this;this.managerPromise.then(function(){e.manager&&e.manager.destroy(),e.managerPromise=new Promise(function(t){e.on("loaded",t),e.player.debug.log(e.manager)}),e.requestAds()}).catch(function(){})}},{key:"trigger",value:function(e){for(var t=this,i=arguments.length,n=Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];var a=this.events[e];c.is.array(a)&&a.forEach(function(e){c.is.function(e)&&e.apply(t,n)})}},{key:"on",value:function(e,t){return c.is.array(this.events[e])||(this.events[e]=[]),this.events[e].push(t),this}},{key:"startSafetyTimer",value:function(e,t){var i=this;this.player.debug.log("Safety timer invoked from: "+t),this.safetyTimer=setTimeout(function(){i.cancel(),i.clearSafetyTimer("startSafetyTimer()")},e)}},{key:"clearSafetyTimer",value:function(e){c.is.nullOrUndefined(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: "+e),clearTimeout(this.safetyTimer),this.safetyTimer=null)}},{key:"enabled",get:function(){return this.player.isVideo&&this.player.config.ads.enabled&&!c.is.empty(this.publisherId)}},{key:"tagUrl",get:function(){var e={AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:this.publisherId};return"https://go.aniview.com/api/adserver6/vast/?"+c.buildUrlParams(e)}}]),e}(),I={insertElements:function(e,t){var i=this;c.is.string(t)?c.insertElement(e,this.media,{src:t}):c.is.array(t)&&t.forEach(function(t){c.insertElement(e,i.media,t)})},change:function(e){var t=this;c.is.object(e)&&"sources"in e&&e.sources.length?(d.cancelRequests.call(this),this.destroy.call(this,function(){switch(t.options.quality=[],c.removeElement(t.media),t.media=null,c.is.element(t.elements.container)&&t.elements.container.removeAttribute("class"),t.type=e.type,t.provider=c.is.empty(e.sources[0].provider)?n.html5:e.sources[0].provider,t.supported=u.check(t.type,t.provider,t.config.playsinline),t.provider+":"+t.type){case"html5:video":t.media=c.createElement("video");break;case"html5:audio":t.media=c.createElement("audio");break;case"youtube:video":case"vimeo:video":t.media=c.createElement("div",{src:e.sources[0].src})}t.elements.container.appendChild(t.media),c.is.boolean(e.autoplay)&&(t.config.autoplay=e.autoplay),t.isHTML5&&(t.config.crossorigin&&t.media.setAttribute("crossorigin",""),t.config.autoplay&&t.media.setAttribute("autoplay",""),c.is.empty(e.poster)||(t.poster=e.poster),t.config.loop.active&&t.media.setAttribute("loop",""),t.config.muted&&t.media.setAttribute("muted",""),t.config.playsinline&&t.media.setAttribute("playsinline","")),m.addStyleHook.call(t),t.isHTML5&&I.insertElements.call(t,"source",e.sources),t.config.title=e.title,L.setup.call(t),t.isHTML5&&("tracks"in e&&I.insertElements.call(t,"track",e.tracks),t.media.load()),(t.isHTML5||t.isEmbed&&!t.supported.ui)&&m.build.call(t),t.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}},q=function(){function e(t){a(this,e),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}return l(e,[{key:"get",value:function(t){if(!e.supported)return null;var i=window.localStorage.getItem(this.key);if(c.is.empty(i))return null;var n=JSON.parse(i);return c.is.string(t)&&t.length?n[t]:n}},{key:"set",value:function(t){if(e.supported&&this.enabled&&c.is.object(t)){var i=this.get();c.is.empty(i)&&(i={}),c.extend(i,t),window.localStorage.setItem(this.key,JSON.stringify(i))}}}],[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;return window.localStorage.setItem("___test","___test"),window.localStorage.removeItem("___test"),!0}catch(e){return!1}}}]),e}();return function(){function e(t,i){var l=this;if(a(this,e),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=u.touch,this.media=t,c.is.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||c.is.nodeList(this.media)||c.is.array(this.media))&&(this.media=this.media[0]),this.config=c.extend({},k,i||{},function(){try{return JSON.parse(l.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container:null,buttons:{},display:{},progress:{},inputs:{},settings:{menu:null,panes:{},tabs:{}},captions:null},this.captions={active:null,currentTrack:null},this.fullscreen={active:!1},this.options={speed:[],quality:[],captions:[]},this.debug=new b(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",u),!c.is.nullOrUndefined(this.media)&&c.is.element(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(u.check().api){var r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;var o=this.media.tagName.toLowerCase(),d=null,p=null,h=null;switch(o){case"div":if(d=this.media.querySelector("iframe"),c.is.element(d)){if(p=d.getAttribute("src"),this.provider=c.getProviderByUrl(p),this.elements.container=this.media,this.media=d,this.elements.container.className="",h=c.getUrlParams(p),!c.is.empty(h)){var g=["1","true"];g.includes(h.autoplay)&&(this.config.autoplay=!0),g.includes(h.loop)&&(this.config.loop.active=!0),this.isYouTube?this.config.playsinline=g.includes(h.playsinline):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(c.is.empty(this.provider)||!Object.keys(n).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=s.video;break;case"video":case"audio":this.type=o,this.provider=n.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),this.media.hasAttribute("playsinline")&&(this.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=u.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.listeners=new S(this),this.storage=new q(this),this.media.plyr=this,c.is.element(this.elements.container)||(this.elements.container=c.createElement("div"),c.wrap(this.media,this.elements.container)),this.elements.container.setAttribute("tabindex",0),m.addStyleHook.call(this),L.setup.call(this),this.config.debug&&c.on(this.elements.container,this.config.events.join(" "),function(e){l.debug.log("event: "+e.type)}),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&m.build.call(this),this.listeners.container(),this.listeners.global(),this.fullscreen=new A(this),this.ads=new M(this),this.config.autoplay&&this.play()):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return l(e,[{key:"play",value:function(){return c.is.function(this.media.play)?this.media.play():null}},{key:"pause",value:function(){this.playing&&c.is.function(this.media.pause)&&this.media.pause()}},{key:"togglePlay",value:function(e){(c.is.boolean(e)?e:!this.playing)?this.play():this.pause()}},{key:"stop",value:function(){this.isHTML5?(this.pause(),this.restart()):c.is.function(this.media.stop)&&this.media.stop()}},{key:"restart",value:function(){this.currentTime=0}},{key:"rewind",value:function(e){this.currentTime=this.currentTime-(c.is.number(e)?e:this.config.seekTime)}},{key:"forward",value:function(e){this.currentTime=this.currentTime+(c.is.number(e)?e:this.config.seekTime)}},{key:"increaseVolume",value:function(e){var t=this.media.muted?0:this.volume;this.volume=t+(c.is.number(e)?e:1)}},{key:"decreaseVolume",value:function(e){var t=this.media.muted?0:this.volume;this.volume=t-(c.is.number(e)?e:1)}},{key:"toggleCaptions",value:function(e){if(this.supported.ui){var t=c.is.boolean(e)?e:!this.elements.container.classList.contains(this.config.classNames.captions.active);this.captions.active!==t&&(this.captions.active=t,c.toggleState(this.elements.buttons.captions,this.captions.active),c.toggleClass(this.elements.container,this.config.classNames.captions.active,this.captions.active),c.dispatchEvent.call(this,this.media,this.captions.active?"captionsenabled":"captionsdisabled"))}}},{key:"airplay",value:function(){u.airplay&&this.media.webkitShowPlaybackTargetPicker()}},{key:"toggleControls",value:function(e){var t=this;if(c.is.element(this.elements.controls)&&this.supported.ui&&!this.isAudio){var i=0,n=e,s=!1;if(!c.is.boolean(e))if(c.is.event(e)){s="enterfullscreen"===e.type;n=["touchstart","touchmove","mouseenter","mousemove","focusin"].includes(e.type),["touchmove","touchend","mousemove"].includes(e.type)&&(i=2e3),this.touch||"focusin"!==e.type||(i=3e3,c.toggleClass(this.elements.controls,this.config.classNames.noTransition,!0))}else n=c.hasClass(this.elements.container,this.config.classNames.hideControls);if(clearTimeout(this.timers.controls),n||this.paused||this.loading){if(c.toggleClass(this.elements.container,this.config.classNames.hideControls,!1)&&c.dispatchEvent.call(this,this.media,"controlsshown"),this.paused||this.loading)return;this.touch&&(i=3e3)}n&&!this.playing||(this.timers.controls=setTimeout(function(){c.is.element(t.elements.controls)&&((!t.elements.controls.pressed&&!t.elements.controls.hover||s)&&(c.hasClass(t.elements.container,t.config.classNames.hideControls)||c.toggleClass(t.elements.controls,t.config.classNames.noTransition,!1),c.toggleClass(t.elements.container,t.config.classNames.hideControls,t.config.hideControls)&&(c.dispatchEvent.call(t,t.media,"controlshidden"),t.config.controls.includes("settings")&&!c.is.empty(t.config.settings)&&f.toggleMenu.call(t,!1))))},i))}}},{key:"on",value:function(e,t){c.on(this.elements.container,e,t)}},{key:"off",value:function(e,t){c.off(this.elements.container,e,t)}},{key:"destroy",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ready){var n=function(){document.body.style.overflow="",t.embed=null,i?(Object.keys(t.elements).length&&(c.removeElement(t.elements.buttons.play),c.removeElement(t.elements.captions),c.removeElement(t.elements.controls),c.removeElement(t.elements.wrapper),t.elements.buttons.play=null,t.elements.captions=null,t.elements.controls=null,t.elements.wrapper=null),c.is.function(e)&&e()):(t.listeners.clear(),c.replaceElement(t.elements.original,t.elements.container),c.dispatchEvent.call(t,t.elements.original,"destroyed",!0),c.is.function(e)&&e.call(t.elements.original),t.ready=!1,setTimeout(function(){t.elements=null,t.media=null},200))};switch(this.stop(),this.provider+":"+this.type){case"html5:video":case"html5:audio":clearTimeout(this.timers.loading),m.toggleNativeControls.call(this,!0),n();break;case"youtube:video":clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&c.is.function(this.embed.destroy)&&this.embed.destroy(),n();break;case"vimeo:video":null!==this.embed&&this.embed.unload().then(n),setTimeout(n,200)}}}},{key:"supports",value:function(e){return u.mime.call(this,e)}},{key:"isHTML5",get:function(){return Boolean(this.provider===n.html5)}},{key:"isEmbed",get:function(){return Boolean(this.isYouTube||this.isVimeo)}},{key:"isYouTube",get:function(){return Boolean(this.provider===n.youtube)}},{key:"isVimeo",get:function(){return Boolean(this.provider===n.vimeo)}},{key:"isVideo",get:function(){return Boolean(this.type===s.video)}},{key:"isAudio",get:function(){return Boolean(this.type===s.audio)}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",set:function(e){var t=0;c.is.number(e)&&(t=e),t<0?t=0:t>this.duration&&(t=this.duration),this.media.currentTime=t,this.debug.log("Seeking to "+this.currentTime+" seconds")},get:function(){return Number(this.media.currentTime)}},{key:"buffered",get:function(){var e=this.media.buffered;return c.is.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var e=parseFloat(this.config.duration),t=this.media?Number(this.media.duration):0;return Number.isNaN(e)?t:e}},{key:"volume",set:function(e){var t=e;c.is.string(t)&&(t=Number(t)),c.is.number(t)||(t=this.storage.get("volume")),c.is.number(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!c.is.empty(e)&&this.muted&&t>0&&(this.muted=!1)},get:function(){return Number(this.media.volume)}},{key:"muted",set:function(e){var t=e;c.is.boolean(t)||(t=this.storage.get("muted")),c.is.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t},get:function(){return Boolean(this.media.muted)}},{key:"hasAudio",get:function(){return!this.isHTML5||(!!this.isAudio||(Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)))}},{key:"speed",set:function(e){var t=null;c.is.number(e)&&(t=e),c.is.number(t)||(t=this.storage.get("speed")),c.is.number(t)||(t=this.config.speed.selected),t<.1&&(t=.1),t>2&&(t=2),this.config.speed.options.includes(t)?(this.config.speed.selected=t,this.media.playbackRate=t):this.debug.warn("Unsupported speed ("+t+")")},get:function(){return Number(this.media.playbackRate)}},{key:"quality",set:function(e){var t=null;if(c.is.empty(e)||(t=Number(e)),c.is.number(t)&&0!==t||(t=this.storage.get("quality")),c.is.number(t)||(t=this.config.quality.selected),c.is.number(t)||(t=this.config.quality.default),this.options.quality.length){if(!this.options.quality.includes(t)){var i=c.closest(this.options.quality,t);this.debug.warn("Unsupported quality option: "+t+", using "+i+" instead"),t=i}this.config.quality.selected=t,this.media.quality=t}},get:function(){return this.media.quality}},{key:"loop",set:function(e){var t=c.is.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t},get:function(){return Boolean(this.media.loop)}},{key:"source",set:function(e){I.change.call(this,e)},get:function(){return this.media.currentSrc}},{key:"poster",set:function(e){this.isVideo?c.is.string(e)&&(this.media.setAttribute("poster",e),m.setPoster.call(this)):this.debug.warn("Poster can only be set for video")},get:function(){return this.isVideo?this.media.getAttribute("poster"):null}},{key:"autoplay",set:function(e){var t=c.is.boolean(e)?e:this.config.autoplay;this.config.autoplay=t},get:function(){return Boolean(this.config.autoplay)}},{key:"language",set:function(e){if(c.is.string(e))if(c.is.empty(e))this.toggleCaptions(!1);else{var t=e.toLowerCase();this.options.captions.includes(t)?(this.toggleCaptions(!0),"enabled"!==t&&this.language!==t&&(this.captions.language=t,y.setText.call(this,null),y.setLanguage.call(this),c.dispatchEvent.call(this,this.media,"languagechange"))):this.debug.warn("Unsupported language option: "+t)}},get:function(){return this.captions.language}},{key:"pip",set:function(e){var t="picture-in-picture",i="inline";if(u.pip){var n=c.is.boolean(e)?e:this.pip===i;this.media.webkitSetPresentationMode(n?t:i)}},get:function(){return u.pip?this.media.webkitPresentationMode:null}}],[{key:"supported",value:function(e,t,i){return u.check(e,t,i)}},{key:"loadSprite",value:function(e,t){return c.loadSprite(e,t)}},{key:"setup",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;return c.is.string(t)?n=Array.from(document.querySelectorAll(t)):c.is.nodeList(t)?n=Array.from(t):c.is.array(t)&&(n=t.filter(function(e){return c.is.element(e)})),c.is.empty(n)?null:n.map(function(t){return new e(t,i)})}}]),e}()});
|
@@ -1 +1 @@
|
|
1
|
-
@keyframes plyr-progress{to{background-position:25px 0}}@keyframes plyr-popup{0%{opacity:.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{from{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;direction:ltr;font-family:Avenir,"Avenir Next","Helvetica Neue","Segoe UI",Helvetica,Arial,sans-serif;font-variant-numeric:tabular-nums;font-weight:500;line-height:1.7;max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow .3s ease}.plyr audio,.plyr video{border-radius:inherit;height:auto;vertical-align:middle;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui ::after,.plyr--full-ui ::before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:#4f5b5f;border-radius:2px;color:#fff;font-size:9px;line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in .3s ease;bottom:0;color:#fff;display:none;font-size:14px;left:0;padding:10px;position:absolute;text-align:center;transform:translateY(-40px);transition:transform .4s ease-in-out;width:100%}.plyr__captions span{background:rgba(0,0,0,.8);border-radius:2px;-webkit-box-decoration-break:clone;box-decoration-break:clone;line-height:185%;padding:.2em .5em;white-space:pre-wrap}.plyr__captions span div{display:inline}.plyr__captions span:empty{display:none}@media (min-width:480px){.plyr__captions{font-size:16px;padding:20px}}@media (min-width:768px){.plyr__captions{font-size:18px}}.plyr--captions-active .plyr__captions{display:block}.plyr--hide-controls .plyr__captions{transform:translateY(-15px)}.plyr__control{background:0 0;border:0;border-radius:3px;color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:7px;position:relative;transition:all .3s ease}.plyr__control svg{display:block;fill:currentColor;height:18px;pointer-events:none;width:18px}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr__control[aria-pressed=false] .icon--pressed,.plyr__control[aria-pressed=false] .label--pressed,.plyr__control[aria-pressed=true] .icon--not-pressed,.plyr__control[aria-pressed=true] .label--not-pressed{display:none}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:#1aafff;color:#fff}.plyr__control--overlaid{background:rgba(26,175,255,.8);border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15);color:#fff;display:none;left:50%;padding:15px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.plyr__control--overlaid svg{height:20px;left:2px;position:relative;width:20px}.plyr__control--overlaid:focus,.plyr__control--overlaid:hover{background:#1aafff}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;text-align:center}.plyr__controls .plyr__menu,.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>.plyr__control{margin-left:5px}.plyr__controls .plyr__menu:first-child,.plyr__controls .plyr__menu:first-child+[data-plyr=pause],.plyr__controls .plyr__progress:first-child,.plyr__controls .plyr__progress:first-child+[data-plyr=pause],.plyr__controls .plyr__time:first-child,.plyr__controls .plyr__time:first-child+[data-plyr=pause],.plyr__controls>.plyr__control:first-child,.plyr__controls>.plyr__control:first-child+[data-plyr=pause]{margin-left:0}.plyr__controls .plyr__volume{margin-left:5px}@media (min-width:480px){.plyr__controls .plyr__menu,.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>.plyr__control{margin-left:10px}.plyr__controls .plyr__menu+.plyr__control,.plyr__controls>.plyr__control+.plyr__control,.plyr__controls>.plyr__control+.plyr__menu{margin-left:5px}}.plyr--video .plyr__controls{background:linear-gradient(transparent,rgba(0,0,0,.7));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:#fff;left:0;padding:35px 10px 10px;position:absolute;right:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out;z-index:2}.plyr--video .plyr__controls .plyr__control svg{-webkit-filter:drop-shadow(0 1px 1px rgba(0, 0, 0, .15));filter:drop-shadow(0 1px 1px rgba(0, 0, 0, .15))}.plyr--video .plyr__controls .plyr__control.plyr__tab-focus,.plyr--video .plyr__controls .plyr__control:hover,.plyr--video .plyr__controls .plyr__control[aria-expanded=true]{background:#1aafff;color:#fff}.plyr--audio .plyr__controls{background:#fff;border-radius:inherit;color:#4f5b5f;padding:10px}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr [data-plyr=airplay],.plyr [data-plyr=captions],.plyr [data-plyr=fullscreen],.plyr [data-plyr=pip]{display:none}.plyr--airplay-supported [data-plyr=airplay],.plyr--captions-enabled [data-plyr=captions],.plyr--fullscreen-enabled [data-plyr=fullscreen],.plyr--pip-supported [data-plyr=pip]{display:inline-block}.plyr__video-embed{height:0;padding-bottom:56.25%;position:relative}.plyr__video-embed iframe{border:0;height:100%;left:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.plyr--full-ui .plyr__video-embed iframe{pointer-events:none}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform .3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup .2s ease;background:rgba(255,255,255,.9);border-radius:4px;bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,.15);color:#4f5b5f;font-size:16px;margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height .35s cubic-bezier(.4,0,.2,1),width .35s cubic-bezier(.4,0,.2,1)}.plyr__menu__container::after{border:4px solid transparent;border-top-color:rgba(255,255,255,.9);content:'';height:0;position:absolute;right:15px;top:100%;width:0}.plyr__menu__container ul{list-style:none;margin:0;overflow:hidden;padding:7px}.plyr__menu__container ul li{margin-top:2px}.plyr__menu__container ul li:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:#4f5b5f;display:flex;font-size:14px;padding:4px 14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.plyr__menu__container .plyr__control::after{border:4px solid transparent;content:'';position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:28px}.plyr__menu__container .plyr__control--forward::after{border-left-color:rgba(79,91,95,.8);right:5px}.plyr__menu__container .plyr__control--forward.plyr__tab-focus::after,.plyr__menu__container .plyr__control--forward:hover::after{border-left-color:currentColor}.plyr__menu__container .plyr__control--back{font-weight:500;margin:7px;margin-bottom:3px;padding-left:28px;position:relative;width:calc(100% - 14px)}.plyr__menu__container .plyr__control--back::after{border-right-color:rgba(79,91,95,.8);left:7px}.plyr__menu__container .plyr__control--back::before{background:#b7c5cd;box-shadow:0 1px 0 #fff;content:'';height:1px;left:0;margin-top:4px;overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus::after,.plyr__menu__container .plyr__control--back:hover::after{border-right-color:currentColor}.plyr__menu__container label.plyr__control{padding-left:7px}.plyr__menu__container label.plyr__control input[type=radio]+span{background:rgba(0,0,0,.1);border-radius:100%;display:block;flex-shrink:0;height:16px;margin-right:10px;position:relative;transition:all .3s ease;width:16px}.plyr__menu__container label.plyr__control input[type=radio]+span::after{background:#fff;border-radius:100%;content:'';height:6px;left:5px;opacity:0;position:absolute;top:5px;transform:scale(0);transition:transform .3s ease,opacity .3s ease;width:6px}.plyr__menu__container label.plyr__control input[type=radio]:checked+span{background:#1aafff}.plyr__menu__container label.plyr__control input[type=radio]:checked+span::after{opacity:1;transform:scale(1)}.plyr__menu__container label.plyr__control input[type=radio]:focus+span{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr__menu__container label.plyr__control.plyr__tab-focus input[type=radio]+span,.plyr__menu__container label.plyr__control:hover input[type=radio]+span{background:rgba(0,0,0,.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:-7px;overflow:hidden;padding-left:25px;pointer-events:none}.plyr__progress{display:flex;flex:1;position:relative}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:14px;left:0}.plyr__progress--buffer{-webkit-appearance:none;background:0 0;border:0;border-radius:100px;height:6px;left:0;margin:-3px 0 0;padding:0;position:absolute;top:50%;width:100%}.plyr__progress--buffer::-webkit-progress-bar{background:0 0;transition:width .2s ease}.plyr__progress--buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:6px}.plyr__progress--buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:6px;transition:width .2s ease}.plyr__progress--buffer::-ms-fill{border-radius:100px;transition:width .2s ease}.plyr--video .plyr__progress--buffer{box-shadow:0 1px 1px rgba(0,0,0,.15);color:rgba(255,255,255,.25)}.plyr--audio .plyr__progress--buffer{color:rgba(183,197,205,.66)}.plyr--loading .plyr__progress--buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg,rgba(47,52,61,.6) 25%,transparent 25%,transparent 50%,rgba(47,52,61,.6) 50%,rgba(47,52,61,.6) 75%,transparent 75%,transparent);background-repeat:repeat-x;background-size:25px 25px;color:transparent}.plyr--video.plyr--loading .plyr__progress--buffer{background-color:rgba(255,255,255,.25)}.plyr--audio.plyr--loading .plyr__progress--buffer{background-color:rgba(183,197,205,.66)}.plyr__poster{background-color:#000;background-position:50% 50%;background-repeat:no-repeat;background-size:100% 100%;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .3s ease;width:100%;z-index:1}.plyr--stopped .plyr__poster{opacity:1}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:0 0;border:0;border-radius:28px;color:#1aafff;display:block;height:20px;margin:0;padding:0;transition:box-shadow .3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-webkit-user-select:none;user-select:none;background-image:linear-gradient(to right,currentColor var(--value,0),transparent var(--value,0))}.plyr--full-ui input[type=range]::-webkit-slider-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2);box-sizing:border-box;height:14px;position:relative;transition:all .2s ease;width:14px;-webkit-appearance:none;margin-top:-4px}.plyr--full-ui input[type=range]::-moz-range-track{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-moz-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2);box-sizing:border-box;height:14px;position:relative;transition:all .2s ease;width:14px}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:3px;height:6px}.plyr--full-ui input[type=range]::-ms-track{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-ms-user-select:none;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-ms-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-ms-user-select:none;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2);box-sizing:border-box;height:14px;position:relative;transition:all .2s ease;width:14px;margin-top:0}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:rgba(255,255,255,.25)}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:rgba(255,255,255,.25)}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:rgba(255,255,255,.25)}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(255,255,255,.5)}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(255,255,255,.5)}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(255,255,255,.5)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:rgba(183,197,205,.66)}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:rgba(183,197,205,.66)}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:rgba(183,197,205,.66)}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(0,0,0,.1)}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(0,0,0,.1)}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(0,0,0,.1)}.plyr__time{font-size:14px}.plyr__time+.plyr__time::before{content:'\2044';margin-right:10px}@media (max-width:767px){.plyr__time+.plyr__time{display:none}}.plyr--video .plyr__time{text-shadow:0 1px 1px rgba(0,0,0,.15)}.plyr__tooltip{background:rgba(255,255,255,.9);border-radius:3px;bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,.15);color:#4f5b5f;font-size:14px;font-weight:500;line-height:1.3;margin-bottom:10px;opacity:0;padding:5px 7.5px;pointer-events:none;position:absolute;transform:translate(-50%,10px) scale(.8);transform-origin:50% 100%;transition:transform .2s .1s ease,opacity .2s .1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,.9);bottom:-4px;content:'';height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr .plyr__control:hover .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%,0) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translate(0,10px) scale(.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip::before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip::before{left:16px}.plyr__controls>.plyr__control:last-child .plyr__tooltip{right:0;transform:translate(0,10px) scale(.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:16px;transform:translateX(50%)}.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip{transform:translate(0,0) scale(1)}.plyr--video{overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:#000;border-radius:inherit;overflow:hidden;position:relative;z-index:0}.plyr__volume{flex:1;position:relative}.plyr__volume input[type=range]{position:relative;z-index:2}@media (min-width:480px){.plyr__volume{max-width:50px}}@media (min-width:768px){.plyr__volume{max-width:80px}}.plyr--is-ios .plyr__volume{display:none!important}.plyr--is-ios.plyr--vimeo [data-plyr=mute]{display:none!important}.plyr--has-error{pointer-events:none}.plyr--has-error::after{align-items:center;background:#000;color:#fff;content:attr(data-plyr-error);display:flex;font-size:16px;height:100%;justify-content:center;left:0;position:absolute;text-align:center;text-shadow:0 1px 1px #000;top:0;width:100%;z-index:10}.plyr:-webkit-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:fullscreen video{height:100%}.plyr:-webkit-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-moz-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-ms-fullscreen .plyr__video-wrapper{height:100%;width:100%}.plyr:fullscreen .plyr__video-wrapper{height:100%;width:100%}.plyr:-webkit-full-screen .plyr__video-embed{overflow:visible}.plyr:-moz-full-screen .plyr__video-embed{overflow:visible}.plyr:-ms-fullscreen .plyr__video-embed{overflow:visible}.plyr:fullscreen .plyr__video-embed{overflow:visible}.plyr:-webkit-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-moz-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-ms-fullscreen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:fullscreen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:21px}.plyr:-moz-full-screen .plyr__captions{font-size:21px}.plyr:-ms-fullscreen .plyr__captions{font-size:21px}.plyr:fullscreen .plyr__captions{font-size:21px}}.plyr:-webkit-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-webkit-full-screen .plyr__video-embed{overflow:visible}.plyr:-webkit-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:21px}}.plyr:-moz-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-moz-full-screen .plyr__video-embed{overflow:visible}.plyr:-moz-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-moz-full-screen .plyr__captions{font-size:21px}}.plyr:-ms-fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__video-wrapper{height:100%;width:100%}.plyr:-ms-fullscreen .plyr__video-embed{overflow:visible}.plyr:-ms-fullscreen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:21px}}.plyr--fullscreen-fallback{background:#000;border-radius:0!important;height:100%;margin:0;width:100%;bottom:0;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__video-wrapper{height:100%;width:100%}.plyr--fullscreen-fallback .plyr__video-embed{overflow:visible}.plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:21px}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads::after{background:rgba(47,52,61,.8);border-radius:2px;bottom:10px;color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:10px;z-index:3}.plyr__ads::after:empty{display:none}.plyr__cues{background:currentColor;display:block;height:6px;left:0;margin:-3px 0 0;opacity:.8;position:absolute;top:50%;width:3px;z-index:3}.plyr--no-transition{transition:none!important}.plyr__sr-only{clip:rect(1px,1px,1px,1px);overflow:hidden;border:0!important;height:1px!important;padding:0!important;position:absolute!important;width:1px!important}
|
1
|
+
@keyframes plyr-progress{to{background-position:25px 0}}@keyframes plyr-popup{0%{opacity:.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{from{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;direction:ltr;font-family:Avenir,"Avenir Next","Helvetica Neue","Segoe UI",Helvetica,Arial,sans-serif;font-variant-numeric:tabular-nums;font-weight:500;line-height:1.7;max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow .3s ease}.plyr audio,.plyr video{border-radius:inherit;height:auto;vertical-align:middle;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui ::after,.plyr--full-ui ::before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:#4f5b5f;border-radius:2px;color:#fff;font-size:9px;line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in .3s ease;bottom:0;color:#fff;display:none;font-size:14px;left:0;padding:10px;position:absolute;text-align:center;transform:translateY(-40px);transition:transform .4s ease-in-out;width:100%}.plyr__captions span{background:rgba(0,0,0,.8);border-radius:2px;-webkit-box-decoration-break:clone;box-decoration-break:clone;line-height:185%;padding:.2em .5em;white-space:pre-wrap}.plyr__captions span div{display:inline}.plyr__captions span:empty{display:none}@media (min-width:480px){.plyr__captions{font-size:16px;padding:20px}}@media (min-width:768px){.plyr__captions{font-size:18px}}.plyr--captions-active .plyr__captions{display:block}.plyr--hide-controls .plyr__captions{transform:translateY(-15px)}.plyr__control{background:0 0;border:0;border-radius:3px;color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:7px;position:relative;transition:all .3s ease}.plyr__control svg{display:block;fill:currentColor;height:18px;pointer-events:none;width:18px}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr__control[aria-pressed=false] .icon--pressed,.plyr__control[aria-pressed=false] .label--pressed,.plyr__control[aria-pressed=true] .icon--not-pressed,.plyr__control[aria-pressed=true] .label--not-pressed{display:none}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:#1aafff;color:#fff}.plyr__control--overlaid{background:rgba(26,175,255,.8);border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15);color:#fff;display:none;left:50%;padding:15px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.plyr__control--overlaid svg{height:20px;left:2px;position:relative;width:20px}.plyr__control--overlaid:focus,.plyr__control--overlaid:hover{background:#1aafff}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;text-align:center}.plyr__controls .plyr__menu,.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>.plyr__control{margin-left:5px}.plyr__controls .plyr__menu:first-child,.plyr__controls .plyr__menu:first-child+[data-plyr=pause],.plyr__controls .plyr__progress:first-child,.plyr__controls .plyr__progress:first-child+[data-plyr=pause],.plyr__controls .plyr__time:first-child,.plyr__controls .plyr__time:first-child+[data-plyr=pause],.plyr__controls>.plyr__control:first-child,.plyr__controls>.plyr__control:first-child+[data-plyr=pause]{margin-left:0}.plyr__controls .plyr__volume{margin-left:5px}@media (min-width:480px){.plyr__controls .plyr__menu,.plyr__controls .plyr__progress,.plyr__controls .plyr__time,.plyr__controls>.plyr__control{margin-left:10px}.plyr__controls .plyr__menu+.plyr__control,.plyr__controls>.plyr__control+.plyr__control,.plyr__controls>.plyr__control+.plyr__menu{margin-left:5px}}.plyr--video .plyr__controls{background:linear-gradient(transparent,rgba(0,0,0,.7));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:#fff;left:0;padding:35px 10px 10px;position:absolute;right:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out;z-index:2}.plyr--video .plyr__controls .plyr__control svg{-webkit-filter:drop-shadow(0 1px 1px rgba(0, 0, 0, .15));filter:drop-shadow(0 1px 1px rgba(0, 0, 0, .15))}.plyr--video .plyr__controls .plyr__control.plyr__tab-focus,.plyr--video .plyr__controls .plyr__control:hover,.plyr--video .plyr__controls .plyr__control[aria-expanded=true]{background:#1aafff;color:#fff}.plyr--audio .plyr__controls{background:#fff;border-radius:inherit;color:#4f5b5f;padding:10px}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr [data-plyr=airplay],.plyr [data-plyr=captions],.plyr [data-plyr=fullscreen],.plyr [data-plyr=pip]{display:none}.plyr--airplay-supported [data-plyr=airplay],.plyr--captions-enabled [data-plyr=captions],.plyr--fullscreen-enabled [data-plyr=fullscreen],.plyr--pip-supported [data-plyr=pip]{display:inline-block}.plyr__video-embed{height:0;padding-bottom:56.25%;position:relative}.plyr__video-embed iframe{border:0;height:100%;left:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.plyr--full-ui .plyr__video-embed iframe{pointer-events:none}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform .3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup .2s ease;background:rgba(255,255,255,.9);border-radius:4px;bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,.15);color:#4f5b5f;font-size:16px;margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height .35s cubic-bezier(.4,0,.2,1),width .35s cubic-bezier(.4,0,.2,1)}.plyr__menu__container::after{border:4px solid transparent;border-top-color:rgba(255,255,255,.9);content:'';height:0;position:absolute;right:15px;top:100%;width:0}.plyr__menu__container ul{list-style:none;margin:0;overflow:hidden;padding:7px}.plyr__menu__container ul li{margin-top:2px}.plyr__menu__container ul li:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:#4f5b5f;display:flex;font-size:14px;padding:4px 14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.plyr__menu__container .plyr__control::after{border:4px solid transparent;content:'';position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:28px}.plyr__menu__container .plyr__control--forward::after{border-left-color:rgba(79,91,95,.8);right:5px}.plyr__menu__container .plyr__control--forward.plyr__tab-focus::after,.plyr__menu__container .plyr__control--forward:hover::after{border-left-color:currentColor}.plyr__menu__container .plyr__control--back{font-weight:500;margin:7px;margin-bottom:3px;padding-left:28px;position:relative;width:calc(100% - 14px)}.plyr__menu__container .plyr__control--back::after{border-right-color:rgba(79,91,95,.8);left:7px}.plyr__menu__container .plyr__control--back::before{background:#b7c5cd;box-shadow:0 1px 0 #fff;content:'';height:1px;left:0;margin-top:4px;overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus::after,.plyr__menu__container .plyr__control--back:hover::after{border-right-color:currentColor}.plyr__menu__container label.plyr__control{padding-left:7px}.plyr__menu__container label.plyr__control input[type=radio]+span{background:rgba(0,0,0,.1);border-radius:100%;display:block;flex-shrink:0;height:16px;margin-right:10px;position:relative;transition:all .3s ease;width:16px}.plyr__menu__container label.plyr__control input[type=radio]+span::after{background:#fff;border-radius:100%;content:'';height:6px;left:5px;opacity:0;position:absolute;top:5px;transform:scale(0);transition:transform .3s ease,opacity .3s ease;width:6px}.plyr__menu__container label.plyr__control input[type=radio]:checked+span{background:#1aafff}.plyr__menu__container label.plyr__control input[type=radio]:checked+span::after{opacity:1;transform:scale(1)}.plyr__menu__container label.plyr__control input[type=radio]:focus+span{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr__menu__container label.plyr__control.plyr__tab-focus input[type=radio]+span,.plyr__menu__container label.plyr__control:hover input[type=radio]+span{background:rgba(0,0,0,.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:-7px;overflow:hidden;padding-left:25px;pointer-events:none}.plyr__progress{display:flex;flex:1;position:relative}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:14px;left:0}.plyr__progress--buffer{-webkit-appearance:none;background:0 0;border:0;border-radius:100px;height:6px;left:0;margin:-3px 0 0;padding:0;position:absolute;top:50%;width:100%}.plyr__progress--buffer::-webkit-progress-bar{background:0 0;transition:width .2s ease}.plyr__progress--buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:6px}.plyr__progress--buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:6px;transition:width .2s ease}.plyr__progress--buffer::-ms-fill{border-radius:100px;transition:width .2s ease}.plyr--video .plyr__progress--buffer{box-shadow:0 1px 1px rgba(0,0,0,.15);color:rgba(255,255,255,.25)}.plyr--audio .plyr__progress--buffer{color:rgba(183,197,205,.66)}.plyr--loading .plyr__progress--buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg,rgba(47,52,61,.6) 25%,transparent 25%,transparent 50%,rgba(47,52,61,.6) 50%,rgba(47,52,61,.6) 75%,transparent 75%,transparent);background-repeat:repeat-x;background-size:25px 25px;color:transparent}.plyr--video.plyr--loading .plyr__progress--buffer{background-color:rgba(255,255,255,.25)}.plyr--audio.plyr--loading .plyr__progress--buffer{background-color:rgba(183,197,205,.66)}.plyr__poster{background-color:#000;background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .3s ease;width:100%;z-index:1;pointer-events:none}.plyr--stopped .plyr__poster{opacity:1}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:0 0;border:0;border-radius:28px;color:#1aafff;display:block;height:20px;margin:0;padding:0;transition:box-shadow .3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-webkit-user-select:none;user-select:none;background-image:linear-gradient(to right,currentColor var(--value,0),transparent var(--value,0))}.plyr--full-ui input[type=range]::-webkit-slider-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2);box-sizing:border-box;height:14px;position:relative;transition:all .2s ease;width:14px;-webkit-appearance:none;margin-top:-4px}.plyr--full-ui input[type=range]::-moz-range-track{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-moz-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2);box-sizing:border-box;height:14px;position:relative;transition:all .2s ease;width:14px}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:3px;height:6px}.plyr--full-ui input[type=range]::-ms-track{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-ms-user-select:none;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-ms-user-select:none;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:0 0;border:0;border-radius:3px;height:6px;transition:all .3s ease;-ms-user-select:none;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:#fff;border:0;border-radius:100%;box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2);box-sizing:border-box;height:14px;position:relative;transition:all .2s ease;width:14px;margin-top:0}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{box-shadow:0 0 0 3px rgba(26,175,255,.35);outline:0}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:rgba(255,255,255,.25)}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:rgba(255,255,255,.25)}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:rgba(255,255,255,.25)}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(255,255,255,.5)}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(255,255,255,.5)}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(255,255,255,.5)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:rgba(183,197,205,.66)}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:rgba(183,197,205,.66)}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:rgba(183,197,205,.66)}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(0,0,0,.1)}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(0,0,0,.1)}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:0 1px 1px rgba(0,0,0,.15),0 0 0 1px rgba(47,52,61,.2),0 0 0 3px rgba(0,0,0,.1)}.plyr__time{font-size:14px}.plyr__time+.plyr__time::before{content:'\2044';margin-right:10px}@media (max-width:767px){.plyr__time+.plyr__time{display:none}}.plyr--video .plyr__time{text-shadow:0 1px 1px rgba(0,0,0,.15)}.plyr__tooltip{background:rgba(255,255,255,.9);border-radius:3px;bottom:100%;box-shadow:0 1px 2px rgba(0,0,0,.15);color:#4f5b5f;font-size:14px;font-weight:500;line-height:1.3;margin-bottom:10px;opacity:0;padding:5px 7.5px;pointer-events:none;position:absolute;transform:translate(-50%,10px) scale(.8);transform-origin:50% 100%;transition:transform .2s .1s ease,opacity .2s .1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,.9);bottom:-4px;content:'';height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr .plyr__control:hover .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%,0) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translate(0,10px) scale(.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip::before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip::before{left:16px}.plyr__controls>.plyr__control:last-child .plyr__tooltip{right:0;transform:translate(0,10px) scale(.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:16px;transform:translateX(50%)}.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip{transform:translate(0,0) scale(1)}.plyr--video{overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:#000;border-radius:inherit;overflow:hidden;position:relative;z-index:0}.plyr__volume{flex:1;position:relative}.plyr__volume input[type=range]{position:relative;z-index:2}@media (min-width:480px){.plyr__volume{max-width:50px}}@media (min-width:768px){.plyr__volume{max-width:80px}}.plyr--is-ios .plyr__volume{display:none!important}.plyr--is-ios.plyr--vimeo [data-plyr=mute]{display:none!important}.plyr--has-error{pointer-events:none}.plyr--has-error::after{align-items:center;background:#000;color:#fff;content:attr(data-plyr-error);display:flex;font-size:16px;height:100%;justify-content:center;left:0;position:absolute;text-align:center;text-shadow:0 1px 1px #000;top:0;width:100%;z-index:10}.plyr:-webkit-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:fullscreen video{height:100%}.plyr:-webkit-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-moz-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-ms-fullscreen .plyr__video-wrapper{height:100%;width:100%}.plyr:fullscreen .plyr__video-wrapper{height:100%;width:100%}.plyr:-webkit-full-screen .plyr__video-embed{overflow:visible}.plyr:-moz-full-screen .plyr__video-embed{overflow:visible}.plyr:-ms-fullscreen .plyr__video-embed{overflow:visible}.plyr:fullscreen .plyr__video-embed{overflow:visible}.plyr:-webkit-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-moz-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-ms-fullscreen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:fullscreen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:21px}.plyr:-moz-full-screen .plyr__captions{font-size:21px}.plyr:-ms-fullscreen .plyr__captions{font-size:21px}.plyr:fullscreen .plyr__captions{font-size:21px}}.plyr:-webkit-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-webkit-full-screen .plyr__video-embed{overflow:visible}.plyr:-webkit-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:21px}}.plyr:-moz-full-screen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__video-wrapper{height:100%;width:100%}.plyr:-moz-full-screen .plyr__video-embed{overflow:visible}.plyr:-moz-full-screen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-moz-full-screen .plyr__captions{font-size:21px}}.plyr:-ms-fullscreen{background:#000;border-radius:0!important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__video-wrapper{height:100%;width:100%}.plyr:-ms-fullscreen .plyr__video-embed{overflow:visible}.plyr:-ms-fullscreen.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:21px}}.plyr--fullscreen-fallback{background:#000;border-radius:0!important;height:100%;margin:0;width:100%;bottom:0;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__video-wrapper{height:100%;width:100%}.plyr--fullscreen-fallback .plyr__video-embed{overflow:visible}.plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{height:0;top:50%;transform:translateY(-50%)}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width:1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:21px}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads::after{background:rgba(47,52,61,.8);border-radius:2px;bottom:10px;color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:10px;z-index:3}.plyr__ads::after:empty{display:none}.plyr__cues{background:currentColor;display:block;height:6px;left:0;margin:-3px 0 0;opacity:.8;position:absolute;top:50%;width:3px;z-index:3}.plyr--no-transition{transition:none!important}.plyr__sr-only{clip:rect(1px,1px,1px,1px);overflow:hidden;border:0!important;height:1px!important;padding:0!important;position:absolute!important;width:1px!important}
|