Version Description
- September 13, 2021 =
- Fix memory leak sometimes causing longer videos to freeze or crash.
Download this release
Release Info
Developer | 2winfactor |
Plugin | The Ultimate Video Player For WordPress – by Presto Player |
Version | 1.6.5 |
Comparing to | |
See all releases |
Code changes from version 1.6.4 to 1.6.5
- dist/components/cjs/hls-b33ebabb.js +144 -0
- dist/components/cjs/hls-f65f486f.js +0 -106
- dist/components/cjs/{learndash-df0b2c0a.js → learndash-c05955c2.js} +1 -1
- dist/components/cjs/presto-action-bar_8.cjs.entry.js +9 -6
- dist/components/cjs/{presto-player-c6544c2c.js → presto-player-75916563.js} +2 -2
- dist/components/cjs/presto-player.cjs.entry.js +1 -1
- dist/components/cjs/presto-video.cjs.entry.js +4 -1
- dist/components/collection/components/core/features/presto-dynamic-overlays/presto-dynamic-overlays.js +7 -4
- dist/components/collection/components/core/player/presto-player/player/hls.js +5 -3
- dist/components/collection/components/core/player/presto-video/presto-video.js +4 -1
- dist/components/collection/components/core/player/presto-youtube/presto-youtube.css +22 -4
- dist/components/collection/components/core/player/presto-youtube/presto-youtube.js +1 -1
- dist/components/esm/hls-1bc0f44d.js +142 -0
- dist/components/esm/hls-d5a12ac0.js +0 -104
- dist/components/esm/{learndash-4a7a2b65.js → learndash-b6b8d73b.js} +1 -1
- dist/components/esm/presto-action-bar_8.entry.js +9 -6
- dist/components/esm/{presto-player-34097a14.js → presto-player-d6f84938.js} +2 -2
- dist/components/esm/presto-player.entry.js +1 -1
- dist/components/esm/presto-video.entry.js +4 -1
- dist/components/web-components/p-1a099489.js +0 -1
- dist/components/web-components/{p-5b5a31a5.js → p-2cd80361.js} +1 -1
- dist/components/web-components/p-6828d2d9.entry.js +1 -0
- dist/components/web-components/p-80162be3.entry.js +1 -0
- dist/components/web-components/p-8b226722.entry.js +0 -1
- dist/components/web-components/p-8c3f8656.entry.js +1 -0
- dist/components/web-components/{p-0c9b972a.js → p-ad3b0509.js} +1 -1
- dist/components/web-components/p-befb412c.entry.js +0 -1
- dist/components/web-components/p-c5caf800.entry.js +0 -1
- dist/components/web-components/p-cd166efe.js +1 -0
- dist/components/web-components/web-components.esm.js +1 -1
- dist/player/global-18e6daa2.css +0 -20
- dist/player/global-18e6daa2.css.map +0 -1
- dist/player/global-cb63282d.js +0 -19
- dist/player/global-cb63282d.js.map +0 -1
- dist/player/global.dependencies.wp.json +1 -1
- dist/player/manifest.json +16 -16
- dist/player/runtime-aede2208.js +0 -18
- dist/player/runtime-aede2208.js.map +0 -1
- inc/Services/Scripts.php +1 -20
- inc/Support/Block.php +4 -1
- languages/presto-player.pot +1 -5
- presto-player.php +1 -1
- readme.txt +9 -0
- src/player/global.css +40 -0
- src/player/global.js +0 -1
- src/player/global.scss +0 -20
- vendor/composer/installed.php +2 -2
dist/components/cjs/hls-b33ebabb.js
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
'use strict';
|
2 |
+
|
3 |
+
const index = require('./index-858a23c7.js');
|
4 |
+
const prestoPlayer_entry = require('./presto-player-75916563.js');
|
5 |
+
|
6 |
+
var loadHLS = function loadHLS(_ref) {
|
7 |
+
var config = _ref.config,
|
8 |
+
selector = _ref.selector,
|
9 |
+
src = _ref.src,
|
10 |
+
preload = _ref.preload;
|
11 |
+
return new Promise( /*#__PURE__*/function () {
|
12 |
+
var _ref2 = index._asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(resolve, reject) {
|
13 |
+
var _wp, autoStartLoad, hls;
|
14 |
+
|
15 |
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
16 |
+
while (1) {
|
17 |
+
switch (_context.prev = _context.next) {
|
18 |
+
case 0:
|
19 |
+
if (window.Hls) {
|
20 |
+
_context.next = 6;
|
21 |
+
break;
|
22 |
+
}
|
23 |
+
|
24 |
+
case 1:
|
25 |
+
if (window.hasOwnProperty('Hls')) {
|
26 |
+
_context.next = 6;
|
27 |
+
break;
|
28 |
+
}
|
29 |
+
|
30 |
+
_context.next = 4;
|
31 |
+
return new Promise(function (resolve) {
|
32 |
+
return setTimeout(resolve, 50);
|
33 |
+
});
|
34 |
+
|
35 |
+
case 4:
|
36 |
+
_context.next = 1;
|
37 |
+
break;
|
38 |
+
|
39 |
+
case 6:
|
40 |
+
if (!window.Hls.isSupported()) {
|
41 |
+
_context.next = 14;
|
42 |
+
break;
|
43 |
+
}
|
44 |
+
|
45 |
+
// should we autoload start
|
46 |
+
autoStartLoad = !['metadata', 'none'].includes(preload); // always autoload in admin for preview
|
47 |
+
|
48 |
+
if ((_wp = wp) !== null && _wp !== void 0 && _wp.blocks) {
|
49 |
+
autoStartLoad = true;
|
50 |
+
} // maybe don't auto start load depending on performance parameter
|
51 |
+
|
52 |
+
|
53 |
+
hls = new window.Hls({
|
54 |
+
autoStartLoad: autoStartLoad
|
55 |
+
});
|
56 |
+
hls.loadSource(src); // update menu container to dynamically display quality
|
57 |
+
|
58 |
+
hls.on(window.Hls.Events.LEVEL_SWITCHED, function (event, data) {
|
59 |
+
var span = selector.closest('.presto-player__wrapper').querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span");
|
60 |
+
|
61 |
+
if (hls.autoLevelEnabled) {
|
62 |
+
span.innerHTML = "AUTO (".concat(hls.levels[data.level].height, "p)");
|
63 |
+
} else {
|
64 |
+
span.innerHTML = "AUTO";
|
65 |
+
}
|
66 |
+
}); // From the m3u8 playlist, hls parses the manifest and returns
|
67 |
+
// all available video qualities. This is important, in this approach,
|
68 |
+
// we will have one source on the Plyr player.
|
69 |
+
|
70 |
+
hls.on(window.Hls.Events.MANIFEST_PARSED, function (event, data) {
|
71 |
+
// Transform available levels into an array of integers (height values).
|
72 |
+
var availableQualities = hls.levels.map(function (l) {
|
73 |
+
return l.height;
|
74 |
+
});
|
75 |
+
availableQualities.unshift(0); //prepend 0 to quality array;
|
76 |
+
// do start level
|
77 |
+
|
78 |
+
var startLevel = availableQualities.findIndex(function (qty) {
|
79 |
+
var _prestoPlayer;
|
80 |
+
|
81 |
+
return qty === parseInt((_prestoPlayer = prestoPlayer) === null || _prestoPlayer === void 0 ? void 0 : _prestoPlayer.hls_start_level);
|
82 |
+
});
|
83 |
+
hls.startLevel = startLevel ? startLevel - 1 : 2; // Add new qualities to option
|
84 |
+
|
85 |
+
config.quality = {
|
86 |
+
default: 0,
|
87 |
+
options: availableQualities,
|
88 |
+
// this ensures Plyr to use Hls to update quality level
|
89 |
+
forced: true,
|
90 |
+
onChange: function onChange(newQuality) {
|
91 |
+
if (newQuality === 0) {
|
92 |
+
prestoHLS.currentLevel = -1; //Enable AUTO quality if option.value = 0
|
93 |
+
} else {
|
94 |
+
prestoHLS.levels.forEach(function (level, levelIndex) {
|
95 |
+
if (level.height === newQuality) {
|
96 |
+
console.log('Found quality match with ' + newQuality);
|
97 |
+
prestoHLS.currentLevel = levelIndex;
|
98 |
+
}
|
99 |
+
});
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}; // attach media and make our HLS options available globally
|
103 |
+
|
104 |
+
hls.attachMedia(selector);
|
105 |
+
window.prestoHLS = hls; // Initialize player
|
106 |
+
|
107 |
+
var player = new prestoPlayer_entry.PrestoPlayer(selector, index._objectSpread2({}, config));
|
108 |
+
player.hls = hls; // make sure we start loading on the first play
|
109 |
+
|
110 |
+
var firstPlay = function firstPlay() {
|
111 |
+
hls.startLoad(-1);
|
112 |
+
player.off('waiting', firstPlay);
|
113 |
+
};
|
114 |
+
|
115 |
+
player.on('waiting', firstPlay); // Handle changing captions
|
116 |
+
|
117 |
+
player.on('languagechange', function () {
|
118 |
+
// Caption support is still flaky. See: https://github.com/sampotts/plyr/issues/994
|
119 |
+
setTimeout(function () {
|
120 |
+
return hls.subtitleTrack = player.currentTrack;
|
121 |
+
}, 50);
|
122 |
+
});
|
123 |
+
return resolve(player);
|
124 |
+
});
|
125 |
+
return _context.abrupt("return");
|
126 |
+
|
127 |
+
case 14:
|
128 |
+
return _context.abrupt("return", resolve(new prestoPlayer_entry.PrestoPlayer(selector, index._objectSpread2({}, config))));
|
129 |
+
|
130 |
+
case 15:
|
131 |
+
case "end":
|
132 |
+
return _context.stop();
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}, _callee);
|
136 |
+
}));
|
137 |
+
|
138 |
+
return function (_x, _x2) {
|
139 |
+
return _ref2.apply(this, arguments);
|
140 |
+
};
|
141 |
+
}());
|
142 |
+
};
|
143 |
+
|
144 |
+
exports.default = loadHLS;
|
dist/components/cjs/hls-f65f486f.js
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
'use strict';
|
2 |
-
|
3 |
-
const index = require('./index-858a23c7.js');
|
4 |
-
const prestoPlayer_entry = require('./presto-player-c6544c2c.js');
|
5 |
-
|
6 |
-
const hls = (function (_ref) {
|
7 |
-
var config = _ref.config,
|
8 |
-
selector = _ref.selector,
|
9 |
-
src = _ref.src,
|
10 |
-
preload = _ref.preload;
|
11 |
-
return new Promise(function (resolve, reject) {
|
12 |
-
if (!window.Hls) {
|
13 |
-
return;
|
14 |
-
}
|
15 |
-
|
16 |
-
if (window.Hls.isSupported()) {
|
17 |
-
var _wp;
|
18 |
-
|
19 |
-
// should we autoload start
|
20 |
-
var autoStartLoad = !['metadata', 'none'].includes(preload); // always autoload in admin for preview
|
21 |
-
|
22 |
-
if ((_wp = wp) !== null && _wp !== void 0 && _wp.blocks) {
|
23 |
-
autoStartLoad = true;
|
24 |
-
} // maybe don't auto start load depending on performance parameter
|
25 |
-
|
26 |
-
|
27 |
-
var hls = new window.Hls({
|
28 |
-
autoStartLoad: autoStartLoad
|
29 |
-
});
|
30 |
-
hls.loadSource(src); // update menu container to dynamically display quality
|
31 |
-
|
32 |
-
hls.on(window.Hls.Events.LEVEL_SWITCHED, function (event, data) {
|
33 |
-
var span = selector.closest('.presto-player__wrapper').querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span");
|
34 |
-
|
35 |
-
if (hls.autoLevelEnabled) {
|
36 |
-
span.innerHTML = "AUTO (".concat(hls.levels[data.level].height, "p)");
|
37 |
-
} else {
|
38 |
-
span.innerHTML = "AUTO";
|
39 |
-
}
|
40 |
-
}); // From the m3u8 playlist, hls parses the manifest and returns
|
41 |
-
// all available video qualities. This is important, in this approach,
|
42 |
-
// we will have one source on the Plyr player.
|
43 |
-
|
44 |
-
hls.on(window.Hls.Events.MANIFEST_PARSED, function (event, data) {
|
45 |
-
// Transform available levels into an array of integers (height values).
|
46 |
-
var availableQualities = hls.levels.map(function (l) {
|
47 |
-
return l.height;
|
48 |
-
});
|
49 |
-
availableQualities.unshift(0); //prepend 0 to quality array;
|
50 |
-
// do start level
|
51 |
-
|
52 |
-
var startLevel = availableQualities.findIndex(function (qty) {
|
53 |
-
var _prestoPlayer;
|
54 |
-
|
55 |
-
return qty === parseInt((_prestoPlayer = prestoPlayer) === null || _prestoPlayer === void 0 ? void 0 : _prestoPlayer.hls_start_level);
|
56 |
-
});
|
57 |
-
hls.startLevel = startLevel ? startLevel - 1 : 2; // Add new qualities to option
|
58 |
-
|
59 |
-
config.quality = {
|
60 |
-
default: 0,
|
61 |
-
options: availableQualities,
|
62 |
-
// this ensures Plyr to use Hls to update quality level
|
63 |
-
forced: true,
|
64 |
-
onChange: function onChange(newQuality) {
|
65 |
-
if (newQuality === 0) {
|
66 |
-
prestoHLS.currentLevel = -1; //Enable AUTO quality if option.value = 0
|
67 |
-
} else {
|
68 |
-
prestoHLS.levels.forEach(function (level, levelIndex) {
|
69 |
-
if (level.height === newQuality) {
|
70 |
-
console.log('Found quality match with ' + newQuality);
|
71 |
-
prestoHLS.currentLevel = levelIndex;
|
72 |
-
}
|
73 |
-
});
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}; // attach media and make our HLS options available globally
|
77 |
-
|
78 |
-
hls.attachMedia(selector);
|
79 |
-
window.prestoHLS = hls; // Initialize player
|
80 |
-
|
81 |
-
var player = new prestoPlayer_entry.PrestoPlayer(selector, index._objectSpread2({}, config));
|
82 |
-
player.hls = hls; // make sure we start loading on the first play
|
83 |
-
|
84 |
-
var firstPlay = function firstPlay() {
|
85 |
-
hls.startLoad(-1);
|
86 |
-
player.off('waiting', firstPlay);
|
87 |
-
};
|
88 |
-
|
89 |
-
player.on('waiting', firstPlay); // Handle changing captions
|
90 |
-
|
91 |
-
player.on('languagechange', function () {
|
92 |
-
// Caption support is still flaky. See: https://github.com/sampotts/plyr/issues/994
|
93 |
-
setTimeout(function () {
|
94 |
-
return hls.subtitleTrack = player.currentTrack;
|
95 |
-
}, 50);
|
96 |
-
});
|
97 |
-
return resolve(player);
|
98 |
-
});
|
99 |
-
return;
|
100 |
-
}
|
101 |
-
|
102 |
-
return resolve(new prestoPlayer_entry.PrestoPlayer(selector, index._objectSpread2({}, config)));
|
103 |
-
});
|
104 |
-
});
|
105 |
-
|
106 |
-
exports.default = hls;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/components/cjs/{learndash-df0b2c0a.js → learndash-c05955c2.js}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
'use strict';
|
2 |
|
3 |
-
const prestoPlayer_entry = require('./presto-player-
|
4 |
require('./index-858a23c7.js');
|
5 |
|
6 |
const learndash = (function (player) {
|
1 |
'use strict';
|
2 |
|
3 |
+
const prestoPlayer_entry = require('./presto-player-75916563.js');
|
4 |
require('./index-858a23c7.js');
|
5 |
|
6 |
const learndash = (function (player) {
|
dist/components/cjs/presto-action-bar_8.cjs.entry.js
CHANGED
@@ -381,13 +381,16 @@ const PrestoDynamicOverlays = class {
|
|
381 |
* Blow up if any funny business.
|
382 |
*/
|
383 |
checkValidity() {
|
384 |
-
var _a, _b, _c, _d, _e, _f, _g;
|
385 |
// only if we are playing
|
386 |
if (!this.player.playing) {
|
387 |
return;
|
388 |
}
|
|
|
|
|
|
|
389 |
// make sure container and other divs are not removed.
|
390 |
-
if (!((
|
391 |
this.reloadComponent.emit();
|
392 |
}
|
393 |
// check for funny business on overlays.
|
@@ -397,10 +400,10 @@ const PrestoDynamicOverlays = class {
|
|
397 |
});
|
398 |
// check for any funny business on watermark
|
399 |
if (this.shouldShowWatermark('top-left') && this.watermarkRef.left) {
|
400 |
-
this.checkComponent(this.watermarkRef.left, (
|
401 |
}
|
402 |
if (this.shouldShowWatermark('top-right') && this.watermarkRef.right) {
|
403 |
-
this.checkComponent(this.watermarkRef.right, (
|
404 |
}
|
405 |
}
|
406 |
/**
|
@@ -758,7 +761,7 @@ const PrestoVimeo = class {
|
|
758 |
};
|
759 |
PrestoVimeo.style = prestoVimeoCss;
|
760 |
|
761 |
-
const prestoYoutubeCss = ":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}";
|
762 |
|
763 |
const PrestoYoutube = class {
|
764 |
constructor(hostRef) {
|
@@ -842,7 +845,7 @@ const PrestoYoutube = class {
|
|
842 |
return (index.h("div", { class: "fallback-container" }, index.h("iframe", { src: this.src, allowFullScreen: true, allowtransparency: true, allow: "autoplay" })));
|
843 |
}
|
844 |
if (this.lazyLoad) {
|
845 |
-
return (index.h("div", null, index.h("presto-video", { part: "video", getRef: this.getRef, poster: this.poster, src: "" }), index.h("div", { class: "presto-player__play-cover", onClick: () => this.loadPlayer() })));
|
846 |
}
|
847 |
return index.h("div", { class: "plyr__video-embed", part: "embed", ref: this.getRef, "data-plyr-provider": "youtube", "data-plyr-embed-id": this.getId(this.src) });
|
848 |
}
|
381 |
* Blow up if any funny business.
|
382 |
*/
|
383 |
checkValidity() {
|
384 |
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
385 |
// only if we are playing
|
386 |
if (!this.player.playing) {
|
387 |
return;
|
388 |
}
|
389 |
+
if (!((_a = this === null || this === void 0 ? void 0 : this.overlays) === null || _a === void 0 ? void 0 : _a.length) && !((_c = (_b = this.preset) === null || _b === void 0 ? void 0 : _b.watermark) === null || _c === void 0 ? void 0 : _c.enabled)) {
|
390 |
+
return;
|
391 |
+
}
|
392 |
// make sure container and other divs are not removed.
|
393 |
+
if (!((_d = this.container) === null || _d === void 0 ? void 0 : _d.offsetParent) || !((_e = this.topLeft) === null || _e === void 0 ? void 0 : _e.offsetParent) || !((_f = this.topRight) === null || _f === void 0 ? void 0 : _f.offsetParent)) {
|
394 |
this.reloadComponent.emit();
|
395 |
}
|
396 |
// check for funny business on overlays.
|
400 |
});
|
401 |
// check for any funny business on watermark
|
402 |
if (this.shouldShowWatermark('top-left') && this.watermarkRef.left) {
|
403 |
+
this.checkComponent(this.watermarkRef.left, (_h = (_g = this.preset) === null || _g === void 0 ? void 0 : _g.watermark) === null || _h === void 0 ? void 0 : _h.text, () => this.reloadComponent.emit());
|
404 |
}
|
405 |
if (this.shouldShowWatermark('top-right') && this.watermarkRef.right) {
|
406 |
+
this.checkComponent(this.watermarkRef.right, (_k = (_j = this.preset) === null || _j === void 0 ? void 0 : _j.watermark) === null || _k === void 0 ? void 0 : _k.text, () => this.reloadComponent.emit());
|
407 |
}
|
408 |
}
|
409 |
/**
|
761 |
};
|
762 |
PrestoVimeo.style = prestoVimeoCss;
|
763 |
|
764 |
+
const prestoYoutubeCss = ":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0 !important;padding-bottom:56.25%;position:relative}}";
|
765 |
|
766 |
const PrestoYoutube = class {
|
767 |
constructor(hostRef) {
|
845 |
return (index.h("div", { class: "fallback-container" }, index.h("iframe", { src: this.src, allowFullScreen: true, allowtransparency: true, allow: "autoplay" })));
|
846 |
}
|
847 |
if (this.lazyLoad) {
|
848 |
+
return (index.h("div", null, index.h("presto-video", { part: "video", getRef: this.getRef, poster: this.poster, src: "", provider: "youtube" }), index.h("div", { class: "presto-player__play-cover", onClick: () => this.loadPlayer() })));
|
849 |
}
|
850 |
return index.h("div", { class: "plyr__video-embed", part: "embed", ref: this.getRef, "data-plyr-provider": "youtube", "data-plyr-embed-id": this.getId(this.src) });
|
851 |
}
|
dist/components/cjs/{presto-player-c6544c2c.js → presto-player-75916563.js}
RENAMED
@@ -5242,7 +5242,7 @@ function PrestoPlayer$1 (element) {
|
|
5242 |
var player = new Plyr(element, setup); // conditionally load learndash
|
5243 |
|
5244 |
if (typeof learndash_video_data !== 'undefined') {
|
5245 |
-
Promise.resolve().then(function () { return require('./learndash-
|
5246 |
var learnDash = module.default;
|
5247 |
learnDash(player);
|
5248 |
});
|
@@ -5295,7 +5295,7 @@ const createPlayer = (function (_ref) {
|
|
5295 |
|
5296 |
// dynamically load hls module if we have an hls video
|
5297 |
if (src && isHLS(src)) {
|
5298 |
-
return Promise.resolve().then(function () { return require('./hls-
|
5299 |
var hls = module.default;
|
5300 |
return hls({
|
5301 |
config: config,
|
5242 |
var player = new Plyr(element, setup); // conditionally load learndash
|
5243 |
|
5244 |
if (typeof learndash_video_data !== 'undefined') {
|
5245 |
+
Promise.resolve().then(function () { return require('./learndash-c05955c2.js'); }).then(function (module) {
|
5246 |
var learnDash = module.default;
|
5247 |
learnDash(player);
|
5248 |
});
|
5295 |
|
5296 |
// dynamically load hls module if we have an hls video
|
5297 |
if (src && isHLS(src)) {
|
5298 |
+
return Promise.resolve().then(function () { return require('./hls-b33ebabb.js'); }).then(function (module) {
|
5299 |
var hls = module.default;
|
5300 |
return hls({
|
5301 |
config: config,
|
dist/components/cjs/presto-player.cjs.entry.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
Object.defineProperty(exports, '__esModule', { value: true });
|
4 |
|
5 |
-
const prestoPlayer_entry = require('./presto-player-
|
6 |
require('./index-858a23c7.js');
|
7 |
|
8 |
|
2 |
|
3 |
Object.defineProperty(exports, '__esModule', { value: true });
|
4 |
|
5 |
+
const prestoPlayer_entry = require('./presto-player-75916563.js');
|
6 |
require('./index-858a23c7.js');
|
7 |
|
8 |
|
dist/components/cjs/presto-video.cjs.entry.js
CHANGED
@@ -11,7 +11,10 @@ const PrestoVideo = class {
|
|
11 |
index.registerInstance(this, hostRef);
|
12 |
}
|
13 |
render() {
|
14 |
-
return (index.h("video", { class:
|
|
|
|
|
|
|
15 |
!!this.tracks.length &&
|
16 |
this.tracks.map(track => index.h("track", { kind: "captions", label: (track === null || track === void 0 ? void 0 : track.label) ? track.label : 'Captions', src: track === null || track === void 0 ? void 0 : track.src, srclang: (track === null || track === void 0 ? void 0 : track.srcLang) ? track === null || track === void 0 ? void 0 : track.srcLang : 'en' }))));
|
17 |
}
|
11 |
index.registerInstance(this, hostRef);
|
12 |
}
|
13 |
render() {
|
14 |
+
return (index.h("video", { class: {
|
15 |
+
'presto-player__player': true,
|
16 |
+
'plyr__video-embed': ['youtube', 'vimeo'].includes(this.provider),
|
17 |
+
}, part: "video", ref: this.getRef, autoplay: this.autoplay, preload: this.preload, "data-poster": this.poster, playsinline: this.playsinline }, index.h("source", { src: this.src }), !!this.tracks &&
|
18 |
!!this.tracks.length &&
|
19 |
this.tracks.map(track => index.h("track", { kind: "captions", label: (track === null || track === void 0 ? void 0 : track.label) ? track.label : 'Captions', src: track === null || track === void 0 ? void 0 : track.src, srclang: (track === null || track === void 0 ? void 0 : track.srcLang) ? track === null || track === void 0 ? void 0 : track.srcLang : 'en' }))));
|
20 |
}
|
dist/components/collection/components/core/features/presto-dynamic-overlays/presto-dynamic-overlays.js
CHANGED
@@ -20,13 +20,16 @@ export class PrestoDynamicOverlays {
|
|
20 |
* Blow up if any funny business.
|
21 |
*/
|
22 |
checkValidity() {
|
23 |
-
var _a, _b, _c, _d, _e, _f, _g;
|
24 |
// only if we are playing
|
25 |
if (!this.player.playing) {
|
26 |
return;
|
27 |
}
|
|
|
|
|
|
|
28 |
// make sure container and other divs are not removed.
|
29 |
-
if (!((
|
30 |
this.reloadComponent.emit();
|
31 |
}
|
32 |
// check for funny business on overlays.
|
@@ -36,10 +39,10 @@ export class PrestoDynamicOverlays {
|
|
36 |
});
|
37 |
// check for any funny business on watermark
|
38 |
if (this.shouldShowWatermark('top-left') && this.watermarkRef.left) {
|
39 |
-
this.checkComponent(this.watermarkRef.left, (
|
40 |
}
|
41 |
if (this.shouldShowWatermark('top-right') && this.watermarkRef.right) {
|
42 |
-
this.checkComponent(this.watermarkRef.right, (
|
43 |
}
|
44 |
}
|
45 |
/**
|
20 |
* Blow up if any funny business.
|
21 |
*/
|
22 |
checkValidity() {
|
23 |
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
24 |
// only if we are playing
|
25 |
if (!this.player.playing) {
|
26 |
return;
|
27 |
}
|
28 |
+
if (!((_a = this === null || this === void 0 ? void 0 : this.overlays) === null || _a === void 0 ? void 0 : _a.length) && !((_c = (_b = this.preset) === null || _b === void 0 ? void 0 : _b.watermark) === null || _c === void 0 ? void 0 : _c.enabled)) {
|
29 |
+
return;
|
30 |
+
}
|
31 |
// make sure container and other divs are not removed.
|
32 |
+
if (!((_d = this.container) === null || _d === void 0 ? void 0 : _d.offsetParent) || !((_e = this.topLeft) === null || _e === void 0 ? void 0 : _e.offsetParent) || !((_f = this.topRight) === null || _f === void 0 ? void 0 : _f.offsetParent)) {
|
33 |
this.reloadComponent.emit();
|
34 |
}
|
35 |
// check for funny business on overlays.
|
39 |
});
|
40 |
// check for any funny business on watermark
|
41 |
if (this.shouldShowWatermark('top-left') && this.watermarkRef.left) {
|
42 |
+
this.checkComponent(this.watermarkRef.left, (_h = (_g = this.preset) === null || _g === void 0 ? void 0 : _g.watermark) === null || _h === void 0 ? void 0 : _h.text, () => this.reloadComponent.emit());
|
43 |
}
|
44 |
if (this.shouldShowWatermark('top-right') && this.watermarkRef.right) {
|
45 |
+
this.checkComponent(this.watermarkRef.right, (_k = (_j = this.preset) === null || _j === void 0 ? void 0 : _j.watermark) === null || _k === void 0 ? void 0 : _k.text, () => this.reloadComponent.emit());
|
46 |
}
|
47 |
}
|
48 |
/**
|
dist/components/collection/components/core/player/presto-player/player/hls.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import PrestoPlayer from './presto-player';
|
2 |
|
3 |
-
|
4 |
-
return new Promise((resolve, reject) => {
|
5 |
if (!window.Hls) {
|
6 |
-
|
7 |
}
|
8 |
|
9 |
if (window.Hls.isSupported()) {
|
@@ -95,3 +95,5 @@ export default ({ config, selector, src, preload }) => {
|
|
95 |
return resolve(new PrestoPlayer(selector, { ...config }));
|
96 |
});
|
97 |
};
|
|
|
|
1 |
import PrestoPlayer from './presto-player';
|
2 |
|
3 |
+
const loadHLS = ({ config, selector, src, preload }) => {
|
4 |
+
return new Promise(async (resolve, reject) => {
|
5 |
if (!window.Hls) {
|
6 |
+
while (!window.hasOwnProperty('Hls')) await new Promise(resolve => setTimeout(resolve, 50));
|
7 |
}
|
8 |
|
9 |
if (window.Hls.isSupported()) {
|
95 |
return resolve(new PrestoPlayer(selector, { ...config }));
|
96 |
});
|
97 |
};
|
98 |
+
|
99 |
+
export default loadHLS;
|
dist/components/collection/components/core/player/presto-video/presto-video.js
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
import { Component, h, Prop } from '@stencil/core';
|
2 |
export class PrestoVideo {
|
3 |
render() {
|
4 |
-
return (h("video", { class:
|
|
|
|
|
|
|
5 |
h("source", { src: this.src }),
|
6 |
!!this.tracks &&
|
7 |
!!this.tracks.length &&
|
1 |
import { Component, h, Prop } from '@stencil/core';
|
2 |
export class PrestoVideo {
|
3 |
render() {
|
4 |
+
return (h("video", { class: {
|
5 |
+
'presto-player__player': true,
|
6 |
+
'plyr__video-embed': ['youtube', 'vimeo'].includes(this.provider),
|
7 |
+
}, part: "video", ref: this.getRef, autoplay: this.autoplay, preload: this.preload, "data-poster": this.poster, playsinline: this.playsinline },
|
8 |
h("source", { src: this.src }),
|
9 |
!!this.tracks &&
|
10 |
!!this.tracks.length &&
|
dist/components/collection/components/core/player/presto-youtube/presto-youtube.css
CHANGED
@@ -3,9 +3,27 @@
|
|
3 |
}
|
4 |
|
5 |
.fallback-container {
|
6 |
-
position: relative;
|
|
|
|
|
|
|
|
|
7 |
}
|
8 |
-
.fallback-container iframe,
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
}
|
11 |
-
|
3 |
}
|
4 |
|
5 |
.fallback-container {
|
6 |
+
position: relative;
|
7 |
+
padding-bottom: 56.25%;
|
8 |
+
padding-top: 30px;
|
9 |
+
height: 0;
|
10 |
+
overflow: hidden;
|
11 |
}
|
12 |
+
.fallback-container iframe,
|
13 |
+
.fallback-container object,
|
14 |
+
.fallback-container embed {
|
15 |
+
position: absolute;
|
16 |
+
top: 0;
|
17 |
+
left: 0;
|
18 |
+
width: 100%;
|
19 |
+
height: 100%;
|
20 |
+
}
|
21 |
+
/** make sure the height applies */
|
22 |
+
@supports not (aspect-ratio: 16/9) {
|
23 |
+
.plyr__video-embed,
|
24 |
+
.plyr__video-wrapper--fixed-ratio {
|
25 |
+
height: 0 !important;
|
26 |
+
padding-bottom: 56.25%;
|
27 |
+
position: relative;
|
28 |
+
}
|
29 |
}
|
|
dist/components/collection/components/core/player/presto-youtube/presto-youtube.js
CHANGED
@@ -80,7 +80,7 @@ export class PrestoYoutube {
|
|
80 |
}
|
81 |
if (this.lazyLoad) {
|
82 |
return (h("div", null,
|
83 |
-
h("presto-video", { part: "video", getRef: this.getRef, poster: this.poster, src: "" }),
|
84 |
h("div", { class: "presto-player__play-cover", onClick: () => this.loadPlayer() })));
|
85 |
}
|
86 |
return h("div", { class: "plyr__video-embed", part: "embed", ref: this.getRef, "data-plyr-provider": "youtube", "data-plyr-embed-id": this.getId(this.src) });
|
80 |
}
|
81 |
if (this.lazyLoad) {
|
82 |
return (h("div", null,
|
83 |
+
h("presto-video", { part: "video", getRef: this.getRef, poster: this.poster, src: "", provider: "youtube" }),
|
84 |
h("div", { class: "presto-player__play-cover", onClick: () => this.loadPlayer() })));
|
85 |
}
|
86 |
return h("div", { class: "plyr__video-embed", part: "embed", ref: this.getRef, "data-plyr-provider": "youtube", "data-plyr-embed-id": this.getId(this.src) });
|
dist/components/esm/hls-1bc0f44d.js
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { l as _asyncToGenerator, d as _objectSpread2 } from './index-65cf7490.js';
|
2 |
+
import { P as PrestoPlayer } from './presto-player-d6f84938.js';
|
3 |
+
|
4 |
+
var loadHLS = function loadHLS(_ref) {
|
5 |
+
var config = _ref.config,
|
6 |
+
selector = _ref.selector,
|
7 |
+
src = _ref.src,
|
8 |
+
preload = _ref.preload;
|
9 |
+
return new Promise( /*#__PURE__*/function () {
|
10 |
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(resolve, reject) {
|
11 |
+
var _wp, autoStartLoad, hls;
|
12 |
+
|
13 |
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
14 |
+
while (1) {
|
15 |
+
switch (_context.prev = _context.next) {
|
16 |
+
case 0:
|
17 |
+
if (window.Hls) {
|
18 |
+
_context.next = 6;
|
19 |
+
break;
|
20 |
+
}
|
21 |
+
|
22 |
+
case 1:
|
23 |
+
if (window.hasOwnProperty('Hls')) {
|
24 |
+
_context.next = 6;
|
25 |
+
break;
|
26 |
+
}
|
27 |
+
|
28 |
+
_context.next = 4;
|
29 |
+
return new Promise(function (resolve) {
|
30 |
+
return setTimeout(resolve, 50);
|
31 |
+
});
|
32 |
+
|
33 |
+
case 4:
|
34 |
+
_context.next = 1;
|
35 |
+
break;
|
36 |
+
|
37 |
+
case 6:
|
38 |
+
if (!window.Hls.isSupported()) {
|
39 |
+
_context.next = 14;
|
40 |
+
break;
|
41 |
+
}
|
42 |
+
|
43 |
+
// should we autoload start
|
44 |
+
autoStartLoad = !['metadata', 'none'].includes(preload); // always autoload in admin for preview
|
45 |
+
|
46 |
+
if ((_wp = wp) !== null && _wp !== void 0 && _wp.blocks) {
|
47 |
+
autoStartLoad = true;
|
48 |
+
} // maybe don't auto start load depending on performance parameter
|
49 |
+
|
50 |
+
|
51 |
+
hls = new window.Hls({
|
52 |
+
autoStartLoad: autoStartLoad
|
53 |
+
});
|
54 |
+
hls.loadSource(src); // update menu container to dynamically display quality
|
55 |
+
|
56 |
+
hls.on(window.Hls.Events.LEVEL_SWITCHED, function (event, data) {
|
57 |
+
var span = selector.closest('.presto-player__wrapper').querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span");
|
58 |
+
|
59 |
+
if (hls.autoLevelEnabled) {
|
60 |
+
span.innerHTML = "AUTO (".concat(hls.levels[data.level].height, "p)");
|
61 |
+
} else {
|
62 |
+
span.innerHTML = "AUTO";
|
63 |
+
}
|
64 |
+
}); // From the m3u8 playlist, hls parses the manifest and returns
|
65 |
+
// all available video qualities. This is important, in this approach,
|
66 |
+
// we will have one source on the Plyr player.
|
67 |
+
|
68 |
+
hls.on(window.Hls.Events.MANIFEST_PARSED, function (event, data) {
|
69 |
+
// Transform available levels into an array of integers (height values).
|
70 |
+
var availableQualities = hls.levels.map(function (l) {
|
71 |
+
return l.height;
|
72 |
+
});
|
73 |
+
availableQualities.unshift(0); //prepend 0 to quality array;
|
74 |
+
// do start level
|
75 |
+
|
76 |
+
var startLevel = availableQualities.findIndex(function (qty) {
|
77 |
+
var _prestoPlayer;
|
78 |
+
|
79 |
+
return qty === parseInt((_prestoPlayer = prestoPlayer) === null || _prestoPlayer === void 0 ? void 0 : _prestoPlayer.hls_start_level);
|
80 |
+
});
|
81 |
+
hls.startLevel = startLevel ? startLevel - 1 : 2; // Add new qualities to option
|
82 |
+
|
83 |
+
config.quality = {
|
84 |
+
default: 0,
|
85 |
+
options: availableQualities,
|
86 |
+
// this ensures Plyr to use Hls to update quality level
|
87 |
+
forced: true,
|
88 |
+
onChange: function onChange(newQuality) {
|
89 |
+
if (newQuality === 0) {
|
90 |
+
prestoHLS.currentLevel = -1; //Enable AUTO quality if option.value = 0
|
91 |
+
} else {
|
92 |
+
prestoHLS.levels.forEach(function (level, levelIndex) {
|
93 |
+
if (level.height === newQuality) {
|
94 |
+
console.log('Found quality match with ' + newQuality);
|
95 |
+
prestoHLS.currentLevel = levelIndex;
|
96 |
+
}
|
97 |
+
});
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}; // attach media and make our HLS options available globally
|
101 |
+
|
102 |
+
hls.attachMedia(selector);
|
103 |
+
window.prestoHLS = hls; // Initialize player
|
104 |
+
|
105 |
+
var player = new PrestoPlayer(selector, _objectSpread2({}, config));
|
106 |
+
player.hls = hls; // make sure we start loading on the first play
|
107 |
+
|
108 |
+
var firstPlay = function firstPlay() {
|
109 |
+
hls.startLoad(-1);
|
110 |
+
player.off('waiting', firstPlay);
|
111 |
+
};
|
112 |
+
|
113 |
+
player.on('waiting', firstPlay); // Handle changing captions
|
114 |
+
|
115 |
+
player.on('languagechange', function () {
|
116 |
+
// Caption support is still flaky. See: https://github.com/sampotts/plyr/issues/994
|
117 |
+
setTimeout(function () {
|
118 |
+
return hls.subtitleTrack = player.currentTrack;
|
119 |
+
}, 50);
|
120 |
+
});
|
121 |
+
return resolve(player);
|
122 |
+
});
|
123 |
+
return _context.abrupt("return");
|
124 |
+
|
125 |
+
case 14:
|
126 |
+
return _context.abrupt("return", resolve(new PrestoPlayer(selector, _objectSpread2({}, config))));
|
127 |
+
|
128 |
+
case 15:
|
129 |
+
case "end":
|
130 |
+
return _context.stop();
|
131 |
+
}
|
132 |
+
}
|
133 |
+
}, _callee);
|
134 |
+
}));
|
135 |
+
|
136 |
+
return function (_x, _x2) {
|
137 |
+
return _ref2.apply(this, arguments);
|
138 |
+
};
|
139 |
+
}());
|
140 |
+
};
|
141 |
+
|
142 |
+
export default loadHLS;
|
dist/components/esm/hls-d5a12ac0.js
DELETED
@@ -1,104 +0,0 @@
|
|
1 |
-
import { d as _objectSpread2 } from './index-65cf7490.js';
|
2 |
-
import { P as PrestoPlayer } from './presto-player-34097a14.js';
|
3 |
-
|
4 |
-
const hls = (function (_ref) {
|
5 |
-
var config = _ref.config,
|
6 |
-
selector = _ref.selector,
|
7 |
-
src = _ref.src,
|
8 |
-
preload = _ref.preload;
|
9 |
-
return new Promise(function (resolve, reject) {
|
10 |
-
if (!window.Hls) {
|
11 |
-
return;
|
12 |
-
}
|
13 |
-
|
14 |
-
if (window.Hls.isSupported()) {
|
15 |
-
var _wp;
|
16 |
-
|
17 |
-
// should we autoload start
|
18 |
-
var autoStartLoad = !['metadata', 'none'].includes(preload); // always autoload in admin for preview
|
19 |
-
|
20 |
-
if ((_wp = wp) !== null && _wp !== void 0 && _wp.blocks) {
|
21 |
-
autoStartLoad = true;
|
22 |
-
} // maybe don't auto start load depending on performance parameter
|
23 |
-
|
24 |
-
|
25 |
-
var hls = new window.Hls({
|
26 |
-
autoStartLoad: autoStartLoad
|
27 |
-
});
|
28 |
-
hls.loadSource(src); // update menu container to dynamically display quality
|
29 |
-
|
30 |
-
hls.on(window.Hls.Events.LEVEL_SWITCHED, function (event, data) {
|
31 |
-
var span = selector.closest('.presto-player__wrapper').querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span");
|
32 |
-
|
33 |
-
if (hls.autoLevelEnabled) {
|
34 |
-
span.innerHTML = "AUTO (".concat(hls.levels[data.level].height, "p)");
|
35 |
-
} else {
|
36 |
-
span.innerHTML = "AUTO";
|
37 |
-
}
|
38 |
-
}); // From the m3u8 playlist, hls parses the manifest and returns
|
39 |
-
// all available video qualities. This is important, in this approach,
|
40 |
-
// we will have one source on the Plyr player.
|
41 |
-
|
42 |
-
hls.on(window.Hls.Events.MANIFEST_PARSED, function (event, data) {
|
43 |
-
// Transform available levels into an array of integers (height values).
|
44 |
-
var availableQualities = hls.levels.map(function (l) {
|
45 |
-
return l.height;
|
46 |
-
});
|
47 |
-
availableQualities.unshift(0); //prepend 0 to quality array;
|
48 |
-
// do start level
|
49 |
-
|
50 |
-
var startLevel = availableQualities.findIndex(function (qty) {
|
51 |
-
var _prestoPlayer;
|
52 |
-
|
53 |
-
return qty === parseInt((_prestoPlayer = prestoPlayer) === null || _prestoPlayer === void 0 ? void 0 : _prestoPlayer.hls_start_level);
|
54 |
-
});
|
55 |
-
hls.startLevel = startLevel ? startLevel - 1 : 2; // Add new qualities to option
|
56 |
-
|
57 |
-
config.quality = {
|
58 |
-
default: 0,
|
59 |
-
options: availableQualities,
|
60 |
-
// this ensures Plyr to use Hls to update quality level
|
61 |
-
forced: true,
|
62 |
-
onChange: function onChange(newQuality) {
|
63 |
-
if (newQuality === 0) {
|
64 |
-
prestoHLS.currentLevel = -1; //Enable AUTO quality if option.value = 0
|
65 |
-
} else {
|
66 |
-
prestoHLS.levels.forEach(function (level, levelIndex) {
|
67 |
-
if (level.height === newQuality) {
|
68 |
-
console.log('Found quality match with ' + newQuality);
|
69 |
-
prestoHLS.currentLevel = levelIndex;
|
70 |
-
}
|
71 |
-
});
|
72 |
-
}
|
73 |
-
}
|
74 |
-
}; // attach media and make our HLS options available globally
|
75 |
-
|
76 |
-
hls.attachMedia(selector);
|
77 |
-
window.prestoHLS = hls; // Initialize player
|
78 |
-
|
79 |
-
var player = new PrestoPlayer(selector, _objectSpread2({}, config));
|
80 |
-
player.hls = hls; // make sure we start loading on the first play
|
81 |
-
|
82 |
-
var firstPlay = function firstPlay() {
|
83 |
-
hls.startLoad(-1);
|
84 |
-
player.off('waiting', firstPlay);
|
85 |
-
};
|
86 |
-
|
87 |
-
player.on('waiting', firstPlay); // Handle changing captions
|
88 |
-
|
89 |
-
player.on('languagechange', function () {
|
90 |
-
// Caption support is still flaky. See: https://github.com/sampotts/plyr/issues/994
|
91 |
-
setTimeout(function () {
|
92 |
-
return hls.subtitleTrack = player.currentTrack;
|
93 |
-
}, 50);
|
94 |
-
});
|
95 |
-
return resolve(player);
|
96 |
-
});
|
97 |
-
return;
|
98 |
-
}
|
99 |
-
|
100 |
-
return resolve(new PrestoPlayer(selector, _objectSpread2({}, config)));
|
101 |
-
});
|
102 |
-
});
|
103 |
-
|
104 |
-
export default hls;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/components/esm/{learndash-4a7a2b65.js → learndash-b6b8d73b.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { r as resumeProgress } from './presto-player-
|
2 |
import './index-65cf7490.js';
|
3 |
|
4 |
const learndash = (function (player) {
|
1 |
+
import { r as resumeProgress } from './presto-player-d6f84938.js';
|
2 |
import './index-65cf7490.js';
|
3 |
|
4 |
const learndash = (function (player) {
|
dist/components/esm/presto-action-bar_8.entry.js
CHANGED
@@ -377,13 +377,16 @@ const PrestoDynamicOverlays = class {
|
|
377 |
* Blow up if any funny business.
|
378 |
*/
|
379 |
checkValidity() {
|
380 |
-
var _a, _b, _c, _d, _e, _f, _g;
|
381 |
// only if we are playing
|
382 |
if (!this.player.playing) {
|
383 |
return;
|
384 |
}
|
|
|
|
|
|
|
385 |
// make sure container and other divs are not removed.
|
386 |
-
if (!((
|
387 |
this.reloadComponent.emit();
|
388 |
}
|
389 |
// check for funny business on overlays.
|
@@ -393,10 +396,10 @@ const PrestoDynamicOverlays = class {
|
|
393 |
});
|
394 |
// check for any funny business on watermark
|
395 |
if (this.shouldShowWatermark('top-left') && this.watermarkRef.left) {
|
396 |
-
this.checkComponent(this.watermarkRef.left, (
|
397 |
}
|
398 |
if (this.shouldShowWatermark('top-right') && this.watermarkRef.right) {
|
399 |
-
this.checkComponent(this.watermarkRef.right, (
|
400 |
}
|
401 |
}
|
402 |
/**
|
@@ -754,7 +757,7 @@ const PrestoVimeo = class {
|
|
754 |
};
|
755 |
PrestoVimeo.style = prestoVimeoCss;
|
756 |
|
757 |
-
const prestoYoutubeCss = ":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}";
|
758 |
|
759 |
const PrestoYoutube = class {
|
760 |
constructor(hostRef) {
|
@@ -838,7 +841,7 @@ const PrestoYoutube = class {
|
|
838 |
return (h("div", { class: "fallback-container" }, h("iframe", { src: this.src, allowFullScreen: true, allowtransparency: true, allow: "autoplay" })));
|
839 |
}
|
840 |
if (this.lazyLoad) {
|
841 |
-
return (h("div", null, h("presto-video", { part: "video", getRef: this.getRef, poster: this.poster, src: "" }), h("div", { class: "presto-player__play-cover", onClick: () => this.loadPlayer() })));
|
842 |
}
|
843 |
return h("div", { class: "plyr__video-embed", part: "embed", ref: this.getRef, "data-plyr-provider": "youtube", "data-plyr-embed-id": this.getId(this.src) });
|
844 |
}
|
377 |
* Blow up if any funny business.
|
378 |
*/
|
379 |
checkValidity() {
|
380 |
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
381 |
// only if we are playing
|
382 |
if (!this.player.playing) {
|
383 |
return;
|
384 |
}
|
385 |
+
if (!((_a = this === null || this === void 0 ? void 0 : this.overlays) === null || _a === void 0 ? void 0 : _a.length) && !((_c = (_b = this.preset) === null || _b === void 0 ? void 0 : _b.watermark) === null || _c === void 0 ? void 0 : _c.enabled)) {
|
386 |
+
return;
|
387 |
+
}
|
388 |
// make sure container and other divs are not removed.
|
389 |
+
if (!((_d = this.container) === null || _d === void 0 ? void 0 : _d.offsetParent) || !((_e = this.topLeft) === null || _e === void 0 ? void 0 : _e.offsetParent) || !((_f = this.topRight) === null || _f === void 0 ? void 0 : _f.offsetParent)) {
|
390 |
this.reloadComponent.emit();
|
391 |
}
|
392 |
// check for funny business on overlays.
|
396 |
});
|
397 |
// check for any funny business on watermark
|
398 |
if (this.shouldShowWatermark('top-left') && this.watermarkRef.left) {
|
399 |
+
this.checkComponent(this.watermarkRef.left, (_h = (_g = this.preset) === null || _g === void 0 ? void 0 : _g.watermark) === null || _h === void 0 ? void 0 : _h.text, () => this.reloadComponent.emit());
|
400 |
}
|
401 |
if (this.shouldShowWatermark('top-right') && this.watermarkRef.right) {
|
402 |
+
this.checkComponent(this.watermarkRef.right, (_k = (_j = this.preset) === null || _j === void 0 ? void 0 : _j.watermark) === null || _k === void 0 ? void 0 : _k.text, () => this.reloadComponent.emit());
|
403 |
}
|
404 |
}
|
405 |
/**
|
757 |
};
|
758 |
PrestoVimeo.style = prestoVimeoCss;
|
759 |
|
760 |
+
const prestoYoutubeCss = ":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0 !important;padding-bottom:56.25%;position:relative}}";
|
761 |
|
762 |
const PrestoYoutube = class {
|
763 |
constructor(hostRef) {
|
841 |
return (h("div", { class: "fallback-container" }, h("iframe", { src: this.src, allowFullScreen: true, allowtransparency: true, allow: "autoplay" })));
|
842 |
}
|
843 |
if (this.lazyLoad) {
|
844 |
+
return (h("div", null, h("presto-video", { part: "video", getRef: this.getRef, poster: this.poster, src: "", provider: "youtube" }), h("div", { class: "presto-player__play-cover", onClick: () => this.loadPlayer() })));
|
845 |
}
|
846 |
return h("div", { class: "plyr__video-embed", part: "embed", ref: this.getRef, "data-plyr-provider": "youtube", "data-plyr-embed-id": this.getId(this.src) });
|
847 |
}
|
dist/components/esm/{presto-player-34097a14.js → presto-player-d6f84938.js}
RENAMED
@@ -5240,7 +5240,7 @@ function PrestoPlayer$1 (element) {
|
|
5240 |
var player = new Plyr(element, setup); // conditionally load learndash
|
5241 |
|
5242 |
if (typeof learndash_video_data !== 'undefined') {
|
5243 |
-
import('./learndash-
|
5244 |
var learnDash = module.default;
|
5245 |
learnDash(player);
|
5246 |
});
|
@@ -5293,7 +5293,7 @@ const createPlayer = (function (_ref) {
|
|
5293 |
|
5294 |
// dynamically load hls module if we have an hls video
|
5295 |
if (src && isHLS(src)) {
|
5296 |
-
return import('./hls-
|
5297 |
var hls = module.default;
|
5298 |
return hls({
|
5299 |
config: config,
|
5240 |
var player = new Plyr(element, setup); // conditionally load learndash
|
5241 |
|
5242 |
if (typeof learndash_video_data !== 'undefined') {
|
5243 |
+
import('./learndash-b6b8d73b.js').then(function (module) {
|
5244 |
var learnDash = module.default;
|
5245 |
learnDash(player);
|
5246 |
});
|
5293 |
|
5294 |
// dynamically load hls module if we have an hls video
|
5295 |
if (src && isHLS(src)) {
|
5296 |
+
return import('./hls-1bc0f44d.js').then(function (module) {
|
5297 |
var hls = module.default;
|
5298 |
return hls({
|
5299 |
config: config,
|
dist/components/esm/presto-player.entry.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
export { a as presto_player } from './presto-player-
|
2 |
import './index-65cf7490.js';
|
1 |
+
export { a as presto_player } from './presto-player-d6f84938.js';
|
2 |
import './index-65cf7490.js';
|
dist/components/esm/presto-video.entry.js
CHANGED
@@ -7,7 +7,10 @@ const PrestoVideo = class {
|
|
7 |
registerInstance(this, hostRef);
|
8 |
}
|
9 |
render() {
|
10 |
-
return (h("video", { class:
|
|
|
|
|
|
|
11 |
!!this.tracks.length &&
|
12 |
this.tracks.map(track => h("track", { kind: "captions", label: (track === null || track === void 0 ? void 0 : track.label) ? track.label : 'Captions', src: track === null || track === void 0 ? void 0 : track.src, srclang: (track === null || track === void 0 ? void 0 : track.srcLang) ? track === null || track === void 0 ? void 0 : track.srcLang : 'en' }))));
|
13 |
}
|
7 |
registerInstance(this, hostRef);
|
8 |
}
|
9 |
render() {
|
10 |
+
return (h("video", { class: {
|
11 |
+
'presto-player__player': true,
|
12 |
+
'plyr__video-embed': ['youtube', 'vimeo'].includes(this.provider),
|
13 |
+
}, part: "video", ref: this.getRef, autoplay: this.autoplay, preload: this.preload, "data-poster": this.poster, playsinline: this.playsinline }, h("source", { src: this.src }), !!this.tracks &&
|
14 |
!!this.tracks.length &&
|
15 |
this.tracks.map(track => h("track", { kind: "captions", label: (track === null || track === void 0 ? void 0 : track.label) ? track.label : 'Captions', src: track === null || track === void 0 ? void 0 : track.src, srclang: (track === null || track === void 0 ? void 0 : track.srcLang) ? track === null || track === void 0 ? void 0 : track.srcLang : 'en' }))));
|
16 |
}
|
dist/components/web-components/p-1a099489.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{d as n}from"./p-3cd9ce84.js";import{P as t}from"./p-0c9b972a.js";export default function(o){var r=o.config,e=o.selector,a=o.src,i=o.preload;return new Promise((function(o){if(window.Hls){if(window.Hls.isSupported()){var u,w=!["metadata","none"].includes(i);null!==(u=wp)&&void 0!==u&&u.blocks&&(w=!0);var p=new window.Hls({autoStartLoad:w});return p.loadSource(a),p.on(window.Hls.Events.LEVEL_SWITCHED,(function(n,t){e.closest(".presto-player__wrapper").querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span").innerHTML=p.autoLevelEnabled?"AUTO (".concat(p.levels[t.level].height,"p)"):"AUTO"})),void p.on(window.Hls.Events.MANIFEST_PARSED,(function(){var a=p.levels.map((function(n){return n.height}));a.unshift(0);var i=a.findIndex((function(n){var t;return n===parseInt(null===(t=prestoPlayer)||void 0===t?void 0:t.hls_start_level)}));p.startLevel=i?i-1:2,r.quality={default:0,options:a,forced:!0,onChange:function(n){0===n?prestoHLS.currentLevel=-1:prestoHLS.levels.forEach((function(t,o){t.height===n&&(console.log("Found quality match with "+n),prestoHLS.currentLevel=o)}))}},p.attachMedia(e),window.prestoHLS=p;var u=new t(e,n({},r));return u.hls=p,u.on("waiting",(function n(){p.startLoad(-1),u.off("waiting",n)})),u.on("languagechange",(function(){setTimeout((function(){return p.subtitleTrack=u.currentTrack}),50)})),o(u)}))}return o(new t(e,n({},r)))}}))}
|
|
dist/components/web-components/{p-5b5a31a5.js → p-2cd80361.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{r as e}from"./p-
|
1 |
+
import{r as e}from"./p-ad3b0509.js";import"./p-3cd9ce84.js";export default function(a){var d,o,s,i,r,_,l,t,n,p,v;if("undefined"!=typeof learndash_video_data&&"presto"===(null===(d=learndash_video_data)||void 0===d?void 0:d.videos_found_provider)){if(e(a),window.learndash_video_data.videos_auto_complete="on"===(null===(o=prestoPlayer)||void 0===o||null===(s=o.learndash)||void 0===s?void 0:s.lesson_video_auto_complete),window.learndash_video_data.videos_hide_complete_button="AFTER"===(null===(i=learndash_video_data)||void 0===i?void 0:i.videos_shown)&&"on"===(null===(r=prestoPlayer)||void 0===r||null===(_=r.learndash)||void 0===_?void 0:_.lesson_video_hide_complete_button),window.learndash_video_data.videos_auto_complete_delay=null===(l=prestoPlayer)||void 0===l||null===(t=l.learndash)||void 0===t?void 0:t.lesson_video_auto_complete_delay,window.learndash_video_data.videos_auto_complete_delay_message=null===(n=prestoPlayer)||void 0===n||null===(p=n.learndash)||void 0===p?void 0:p.videos_auto_complete_delay_message,window.learndash_video_data.video_track_path="/","BEFORE"===(null===(v=learndash_video_data)||void 0===v?void 0:v.videos_shown))return learndash_video_data.videos_auto_complete=!1,jQuery(document).trigger("learndash_video_disable_assets",[!0]),void jQuery((function(){"1"===learndash_video_data.video_debug&&console.log("PRESTO: init"),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').length&&("1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(true)"),LearnDash_disable_assets(!0),LearnDash_watchPlayers(),document.querySelectorAll('presto-player[data-video-progression="true"][data-video-provider="'+learndash_video_data.videos_found_provider+'"]').forEach((function(e,a){var d="presto-player__wrapper-player-"+a,o=e.getAttribute("id");void 0!==o&&""!=o||e.setAttribute("id",o=d),ld_video_players[d]={},ld_video_players[d].player_key=d,ld_video_players[d].player_type=learndash_video_data.videos_found_provider,ld_video_players[d].player_id=o,ld_video_players[d].player_wrapper=e.closest("presto-player"),void 0!==ld_video_players[d].player_wrapper?ld_video_players[d].player_cookie_key=ld_video_players[d].player_wrapper.getAttribute("data-video-cookie-key"):ld_video_players[d].player_cookie_key="",ld_video_players[d].player_cookie_values=LearnDash_Video_Progress_initSettings(ld_video_players[d]),"complete"===LearnDash_Video_Progress_getSetting(ld_video_players[d],"video_state")?(LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()):(wp.hooks.addAction("presto.playerTimeUpdate","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),e.duration&&e.duration===e.currentTime&&(LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd())})),wp.hooks.addAction("presto.playerPlaying","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is playing"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_duration",e.duration),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","play")})),wp.hooks.addAction("presto.playerPause","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: Video is paused"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),console.log(e.duration),console.log(e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","pause")})),wp.hooks.addAction("presto.playerEnded","presto-player",(function(e){"1"===learndash_video_data.video_debug&&console.log("PRESTO: video ended"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: setting 'video_state' to 'complete'"),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_time",e.currentTime),LearnDash_Video_Progress_setSetting(ld_video_players[d],"video_state","complete"),"1"===learndash_video_data.video_debug&&console.log("PRESTO: calling LearnDash_disable_assets(false)"),LearnDash_disable_assets(!1),LearnDash_watchPlayersEnd()})))})))}));window.LearnDash_disable_assets(!0),wp.hooks.addAction("presto.playerEnded","presto-player",(function(){window.LearnDash_disable_assets(!1)}))}}
|
dist/components/web-components/p-6828d2d9.entry.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
import{r as i,h as t,g as o,c as l}from"./p-3cd9ce84.js";function s(i){let t,o=i.split(":");return o.length>1&&(t=60*parseInt(o[0])),parseInt(o[1])+parseInt(t)}function e(){var i=navigator.userAgent||navigator.vendor;return/windows phone/i.test(i)?"Windows Phone":/android/i.test(i)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}function n(){return"iOS"===e()}function d(i){var t,o,l,s,e;if(i.fullscreen.active&&i.fullscreen.exit(),n()&&!(null===(o=null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.blockAttributes)||void 0===o?void 0:o.playsinline)&&("function"==typeof(null===(l=null==i?void 0:i.media)||void 0===l?void 0:l.webkitExitFullScreen)&&(null==i||i.media.webkitExitFullScreen()),"function"==typeof(null===(s=null==i?void 0:i.embed)||void 0===s?void 0:s.exitFullscreen)&&(null===(e=null==i?void 0:i.embed)||void 0===e||e.exitFullscreen()),function(i){var t,o;return n()&&"youtube"===i.provider&&!(null===(o=null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.blockAttributes)||void 0===o?void 0:o.playsinline)}(i))){const t=i.currentTime;i.currentTime=i.duration,i.once("playing",(()=>{i.currentTime=t}))}}const r=class{constructor(t){i(this,t),this.show=!1,this.youtubeRenderKey=1}componentWillLoad(){this.handleDuration()}handleButtonCountChange(i,t){(null==i?void 0:i.button_count)!==(null==t?void 0:t.button_count)&&this.youtubeRenderKey++,(null==i?void 0:i.enabled)&&this.handleDuration()}handleDuration(){var i,t;this.show=!!(null===(i=null===window||void 0===window?void 0:window.wp)||void 0===i?void 0:i.blocks)||function({current:i,duration:t,showAfter:o}){if(i===o)return!0;let l=i/t*100;return 99.9<l&&(l=100),l>=o}({current:this.currentTime,duration:this.duration,showAfter:(null===(t=this.config)||void 0===t?void 0:t.percentage_start)||0})}youtubeButton(){var i,o,l,s;if("youtube"===(null===(i=this.config)||void 0===i?void 0:i.button_type)&&(null===(o=this.youtube)||void 0===o?void 0:o.channelId))return t("presto-youtube-subscribe-button",{key:this.youtubeRenderKey,channel:null===(l=this.youtube)||void 0===l?void 0:l.channelId,showCount:null===(s=this.config)||void 0===s?void 0:s.button_count})}customButton(){var i,o,l,s,e,n,d,r,a,h,v;if("custom"===(null===(i=this.config)||void 0===i?void 0:i.button_type))return t("presto-player-button",{type:"primary",size:"small",href:null===(l=null===(o=this.config)||void 0===o?void 0:o.button_link)||void 0===l?void 0:l.url,target:(null===(e=null===(s=this.config)||void 0===s?void 0:s.button_link)||void 0===e?void 0:e.opensInNewTab)?"_blank":"_self",style:Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(n=this.config)||void 0===n?void 0:n.button_radius}px`},(null===(d=this.config)||void 0===d?void 0:d.button_color)?{"--presto-player-button-color":`${null===(r=this.config)||void 0===r?void 0:r.button_color}`}:{}),(null===(a=this.config)||void 0===a?void 0:a.button_text_color)?{"--presto-player-button-text":`${null===(h=this.config)||void 0===h?void 0:h.button_text_color}`}:{})},null===(v=this.config)||void 0===v?void 0:v.button_text)}render(){var i,o;return t("presto-action-bar-ui",{open:this.show,style:{"--presto-action-bar-background":(null===(i=this.config)||void 0===i?void 0:i.background_color)||"#1d1d1d"}},null===(o=this.config)||void 0===o?void 0:o.text,t("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return o(this)}static get watchers(){return{config:["handleButtonCountChange"],currentTime:["handleDuration"],duration:["handleDuration"]}}};r.style=":host{display:block}";const a=class{constructor(t){i(this,t)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return t("presto-video",{getRef:this.getRef,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}},h=class{constructor(t){i(this,t),this.playVideo=l(this,"playVideo",7),this.rewatchVideo=l(this,"rewatchVideo",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handlePlayerInit(i,t){t||(this.player.on("ended",(()=>{this.ended=!0})),this.player.on("timeupdate",(()=>{this.currentTime=this.player.currentTime})))}timePassed({current:i,duration:t,showAfter:o}){if(i===o)return!0;let l=i/t*100;return 99.9<l&&(l=100),l>=o}handleEnded(i){var t,o;if(i){if(100!==(null===(o=null===(t=this.preset)||void 0===t?void 0:t.cta)||void 0===o?void 0:o.percentage))return;this.show=!0}}handleFullScreen(){this.show&&d(this.player)}handleDuration(){var i,t;this.enabled=!this.skipped&&(null===(t=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===t?void 0:t.enabled),this.handleTime()}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleEnabled(){this.show&&(this.skipped||this.player&&this.player.pause())}handleTime(){var i,t;this.enabled&&(this.skipped||100!==(null===(t=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===t?void 0:t.percentage)&&this.checkTime())}checkTime(){var i,t;this.show=this.timePassed({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===t?void 0:t.percentage)||0})}skip(){this.skipped=!0,this.show=!1,this.playVideo.emit()}rewatch(){this.ended=!1,this.show=!1,this.rewatchVideo.emit(),this.player.once("timeupdate",(()=>{setTimeout((()=>this.player.play()),500)})),this.player.restart()}render(){var i,o,l,s,e,n,d,r,a,h,v,u,c,p,y,m,f,b,w,g,_,k,x,P,S,T,L,C;if(this.show)return t("presto-cta-overlay-ui",{style:Object.assign(Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(o=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===o?void 0:o.button_radius}px`},(null===(s=null===(l=this.preset)||void 0===l?void 0:l.cta)||void 0===s?void 0:s.background_opacity)?{"--presto-player-cta-background-opacity":""+(null===(n=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===n?void 0:n.background_opacity)/100}:{}),(null===(r=null===(d=this.preset)||void 0===d?void 0:d.cta)||void 0===r?void 0:r.button_color)?{"--presto-player-button-color":`${null===(h=null===(a=this.preset)||void 0===a?void 0:a.cta)||void 0===h?void 0:h.button_color}`}:{}),(null===(u=null===(v=this.preset)||void 0===v?void 0:v.cta)||void 0===u?void 0:u.button_text_color)?{"--presto-player-button-text":`${null===(p=null===(c=this.preset)||void 0===c?void 0:c.cta)||void 0===p?void 0:p.button_text_color}`}:{}),direction:this.direction,class:"cta-overlay",headline:null===(m=null===(y=this.preset)||void 0===y?void 0:y.cta)||void 0===m?void 0:m.headline,"bottom-text":null===(b=null===(f=this.preset)||void 0===f?void 0:f.cta)||void 0===b?void 0:b.bottom_text,"show-button":null===(g=null===(w=this.preset)||void 0===w?void 0:w.cta)||void 0===g?void 0:g.show_button,buttonLink:null===(k=null===(_=this.preset)||void 0===_?void 0:_.cta)||void 0===k?void 0:k.button_link,allowSkip:!this.ended&&(null===(P=null===(x=this.preset)||void 0===x?void 0:x.cta)||void 0===P?void 0:P.show_skip),allowRewatch:this.ended&&(null===(T=null===(S=this.preset)||void 0===S?void 0:S.cta)||void 0===T?void 0:T.show_rewatch),"button-text":null===(C=null===(L=this.preset)||void 0===L?void 0:L.cta)||void 0===C?void 0:C.button_text,onSkip:()=>this.skip(),onRewatch:()=>this.rewatch(),i18n:this.i18n})}static get watchers(){return{player:["handlePlayerInit"],ended:["handleEnded"],currentTime:["handleFullScreen","handlePercentagePassed","handleEnabled","handleTime"],duration:["handleDuration","handlePercentagePassed"]}}};h.style=":host{display:block}";const v=class{constructor(t){i(this,t),this.reloadComponent=l(this,"reloadComponent",7),this.watermarkRef={left:null,right:null},this.destroy=!1,this.refs={}}componentDidLoad(){this.player.on("timeupdate",(i=>{this.currentTime=i.detail.plyr.currentTime,this.checkValidity()}))}checkValidity(){var i,t,o,l,s,e,n,d,r,a;this.player.playing&&((null===(i=null==this?void 0:this.overlays)||void 0===i?void 0:i.length)||(null===(o=null===(t=this.preset)||void 0===t?void 0:t.watermark)||void 0===o?void 0:o.enabled))&&((null===(l=this.container)||void 0===l?void 0:l.offsetParent)&&(null===(s=this.topLeft)||void 0===s?void 0:s.offsetParent)&&(null===(e=this.topRight)||void 0===e?void 0:e.offsetParent)||this.reloadComponent.emit(),Object.keys(this.refs||{}).forEach((i=>{const{overlay:t,component:o}=this.refs[i];this.checkComponent(o,t.text,(()=>this.reloadComponent.emit()))})),this.shouldShowWatermark("top-left")&&this.watermarkRef.left&&this.checkComponent(this.watermarkRef.left,null===(d=null===(n=this.preset)||void 0===n?void 0:n.watermark)||void 0===d?void 0:d.text,(()=>this.reloadComponent.emit())),this.shouldShowWatermark("top-right")&&this.watermarkRef.right&&this.checkComponent(this.watermarkRef.right,null===(a=null===(r=this.preset)||void 0===r?void 0:r.watermark)||void 0===a?void 0:a.text,(()=>this.reloadComponent.emit())))}checkComponent(i,t,o){if(!(null==i?void 0:i.offsetParent))return o();if(!i.shadowRoot.querySelector("slot"))return o();if(this.player&&this.player.playing){const l=i.shadowRoot.querySelector("slot").assignedNodes()[0];if(l){if(l.parentElement.innerHTML!=t)return o();const i=getComputedStyle(l.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(i.fontSize,10)<10)return o();const s=function(i){var t=i.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return t?[t[1],t[2],t[3],"1"]:(t=i.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[t[1],t[2],t[3],t[4]]:void 0}(i.color);if("1"!==(null==s?void 0:s[3]))return o()}}}shouldShowOverlay(i){if(void 0!==this.currentTime)return!(this.currentTime<s(null==i?void 0:i.startTime)||this.currentTime>s(null==i?void 0:i.endTime))}renderOverlay(i){var o,l;return t("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(i)},ref:t=>this.refs[i.id]={overlay:i,component:t},key:i.id,position:i.position,href:null===(o=null==i?void 0:i.link)||void 0===o?void 0:o.url,target:(null===(l=null==i?void 0:i.link)||void 0===l?void 0:l.opensInNewTab)?"_blank":"_self",innerHTML:this.shouldShowOverlay(i)?i.text:"",style:{"--presto-dynamic-overlay-color":(null==i?void 0:i.color)||"#fff","--presto-dynamic-overlay-background":(null==i?void 0:i.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null==i?void 0:i.opacity)?(i.opacity/100).toString():"1"}})}shouldShowWatermark(i){var t,o,l;if(!(null===(o=null===(t=this.preset)||void 0===t?void 0:t.watermark)||void 0===o?void 0:o.enabled))return!1;const s=null===(l=this.preset)||void 0===l?void 0:l.watermark;return"randomize"===s.position?Math.floor((this.player.currentTime||0)/10)%2==0?"top-left"===i:"top-right"===i:s.position===i||!s.position&&"top-right"===i}render(){var i,o,l,s,e,n,d,r,a,h,v;if(this.enabled&&((null===(i=null==this?void 0:this.overlays)||void 0===i?void 0:i.length)||(null===(l=null===(o=this.preset)||void 0===o?void 0:o.watermark)||void 0===l?void 0:l.enabled)))return t("div",{class:"overlays",ref:i=>this.container=i},t("div",{class:"top-left",ref:i=>this.topLeft=i},!!this.shouldShowWatermark("top-left")&&t("presto-dynamic-overlay-ui",{ref:i=>this.watermarkRef.left=i,style:{"--presto-dynamic-overlay-color":(null===(s=this.preset.watermark)||void 0===s?void 0:s.color)||"#fff","--presto-dynamic-overlay-background":(null===(e=this.preset.watermark)||void 0===e?void 0:e.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(n=this.preset.watermark)||void 0===n?void 0:n.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-left",innerHTML:this.preset.watermark.text}),!!(null===(d=null==this?void 0:this.overlays)||void 0===d?void 0:d.length)&&this.overlays.map((i=>"top-left"!==i.position?"":this.renderOverlay(i)))),t("div",{class:"top-right",ref:i=>this.topRight=i},!!this.shouldShowWatermark("top-right")&&t("presto-dynamic-overlay-ui",{ref:i=>this.watermarkRef.right=i,style:{"--presto-dynamic-overlay-color":(null===(r=this.preset.watermark)||void 0===r?void 0:r.color)||"#fff","--presto-dynamic-overlay-background":(null===(a=this.preset.watermark)||void 0===a?void 0:a.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(h=this.preset.watermark)||void 0===h?void 0:h.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-right",innerHTML:this.preset.watermark.text}),!!(null===(v=null==this?void 0:this.overlays)||void 0===v?void 0:v.length)&&this.overlays.map((i=>"top-right"!==i.position?"":this.renderOverlay(i)))))}get el(){return o(this)}};v.style=".top-left,.top-right{position:absolute;display:block;padding:20px;max-width:45%;z-index:20;display:flex;flex-direction:column;flex-wrap:wrap}.top-left{top:0;left:0}.top-right{top:0;right:0;align-items:flex-end}presto-dynamic-overlay-ui{overflow:hidden;height:0;opacity:0;transition:height 0ms 400ms, opacity 400ms 0ms}presto-dynamic-overlay-ui.visible{margin-bottom:10px;height:auto;opacity:1;transition:height 0ms 0ms, opacity 500ms 0ms}";const u=class{constructor(t){i(this,t),this.playVideo=l(this,"playVideo",7)}setStorage(i){window.localStorage.setItem("presto.videos.email_collection",JSON.stringify({[this.videoId]:i}))}getStorage(){return window.localStorage.getItem("presto.videos.email_collection")}componentWillLoad(){this.handleDuration()}timePassed({current:i,duration:t,showAfter:o}){if(i===o)return!0;let l=i/t*100;return 99.9<l&&(l=100),l>=o}handlePlayerInit(i,t){t||(this.player.on("timeupdate",(()=>{this.currentTime=this.player.currentTime})),this.player.on("play playing timeupdate",(()=>{this.getStorage()||this.show&&this.player.pause()})))}handleDuration(){var i,t;this.enabled=!this.getStorage()&&(null===(t=null===(i=this.preset)||void 0===i?void 0:i.email_collection)||void 0===t?void 0:t.enabled),this.handleTime()}handleTime(){this.enabled&&(this.getStorage()||(this.checkTime(),this.show&&d(this.player)))}checkTime(){var i,t;this.show=this.timePassed({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null===(i=this.preset)||void 0===i?void 0:i.email_collection)||void 0===t?void 0:t.percentage)||0})}async getNonce(){var i;return fetch(`${null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.ajaxurl}?action=presto_refresh_progress_nonce`)}async submit(i){var t;this.loading=!0,this.error="";const o=await this.getNonce(),{data:l}=await o.json();try{let o=await fetch(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl,{method:"post",body:new URLSearchParams(Object.assign({action:"presto_player_email_submit",nonce:l,preset_id:this.preset.id,video_id:this.videoId},(null==i?void 0:i.detail)||{}))});const{success:s,data:e}=await o.json();if(!s)throw e;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(i){const t=null==i?void 0:i[0];t&&"string"==typeof t&&(this.error=t)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}render(){var i,o,l,s,e,n,d,r;if(this.show)return t("presto-email-overlay-ui",{direction:this.direction,class:"email-overlay",headline:null===(o=null===(i=this.preset)||void 0===i?void 0:i.email_collection)||void 0===o?void 0:o.headline,bottomText:null===(s=null===(l=this.preset)||void 0===l?void 0:l.email_collection)||void 0===s?void 0:s.bottom_text,allowSkip:null===(n=null===(e=this.preset)||void 0===e?void 0:e.email_collection)||void 0===n?void 0:n.allow_skip,buttonText:null===(r=null===(d=this.preset)||void 0===d?void 0:d.email_collection)||void 0===r?void 0:r.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:i=>this.submit(i),onSkip:()=>this.skip(),i18n:this.i18n})}static get watchers(){return{player:["handlePlayerInit"],duration:["handleDuration"],currentTime:["handleTime"]}}};u.style=":host{display:block}";const c=class{constructor(t){i(this,t),this.playVideo=l(this,"playVideo",7)}render(){var i,o,l,s,e,n,d,r,a;return t("div",{class:"presto-player__muted-overlay",onClick:()=>{this.mutedPreview=!1,this.playVideo.emit()}},(null===(i=this.preset)||void 0===i?void 0:i["play-large"])&&t("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},t("svg",{id:"plyr-play",viewBox:"0 0 18 18"},t("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),t("span",{class:"plyr__sr-only"},"Play")),(null===(o=this.mutedOverlay)||void 0===o?void 0:o.enabled)&&(null===(l=this.mutedOverlay)||void 0===l?void 0:l.src)?t("div",{class:"presto-player__overlay is-image",part:"muted-overlay-image",style:{width:`${(null===(s=this.mutedOverlay)||void 0===s?void 0:s.width)||50}%`,left:100*((null===(n=null===(e=this.mutedOverlay)||void 0===e?void 0:e.focalPoint)||void 0===n?void 0:n.x)||.5)+"%",top:100*((null===(r=null===(d=this.mutedOverlay)||void 0===d?void 0:d.focalPoint)||void 0===r?void 0:r.y)||.5)+"%"}},t("img",{src:null===(a=this.mutedOverlay)||void 0===a?void 0:a.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};c.style=":host{display:block}";const p=class{constructor(t){i(this,t)}getId(i){const t=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(i||"");return(null==t?void 0:t[5])||""}render(){if(this.src)return"Android"!==e()||(i=window.navigator.standalone,o=window.navigator.userAgent.toLowerCase(),l=/safari/.test(o),/iphone|ipod|ipad/.test(o)?!i&&l||i||l:!o.includes("wv"))?t("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"vimeo","data-plyr-embed-id":this.getId(this.src)}):t("div",{class:"presto-iframe-fallback-container"},t("iframe",{src:`https://player.vimeo.com/video/${this.getId(this.src)}?loop=false&byline=false&portrait=false&title=false&speed=true&transparent=0&gesture=media`,allowFullScreen:!0,allowTransparency:!0,allow:"autoplay",style:{width:"100%"},class:"presto-fallback-iframe"}));var i,o,l}};p.style=":host{display:block}";const y=class{constructor(t){i(this,t),this.reload=l(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.on("statechange",(i=>{var t,o,l,s,e;1===i.detail.code&&((null===(e=null===(s=null===(l=null===(o=null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.plyr)||void 0===o?void 0:o.config)||void 0===l?void 0:l.blockAttributes)||void 0===s?void 0:s.mutedPreview)||void 0===e?void 0:e.enabled)||(this.player.muted=!1))}))}getId(i){var t;const o=(i||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return o&&11===(null===(t=null==o?void 0:o[2])||void 0===t?void 0:t.length)?o[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var i;let t=null===(i=window.navigator)||void 0===i?void 0:i.standalone,o=window.navigator.userAgent.toLowerCase(),l=/safari/.test(o),s=/iphone|ipod|ipad/.test(o);this.isWebView=s?!t&&!l:o.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&n()&&(this.lazyLoad=!1)}render(){return this.isWebView?t("div",{class:"fallback-container"},t("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?t("div",null,t("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:"",provider:"youtube"}),t("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):t("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"youtube","data-plyr-embed-id":this.getId(this.src)})}static get watchers(){return{player:["handlePlayerChange"]}}};y.style=":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0 !important;padding-bottom:56.25%;position:relative}}";export{r as presto_action_bar,a as presto_bunny,h as presto_cta_overlay,v as presto_dynamic_overlays,u as presto_email_overlay,c as presto_muted_overlay,p as presto_vimeo,y as presto_youtube}
|
dist/components/web-components/p-80162be3.entry.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
import{r as s,h as t}from"./p-3cd9ce84.js";const i=class{constructor(t){s(this,t)}render(){return t("video",{class:{"presto-player__player":!0,"plyr__video-embed":["youtube","vimeo"].includes(this.provider)},part:"video",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster,playsinline:this.playsinline},t("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((s=>t("track",{kind:"captions",label:(null==s?void 0:s.label)?s.label:"Captions",src:null==s?void 0:s.src,srclang:(null==s?void 0:s.srcLang)?null==s?void 0:s.srcLang:"en"}))))}};i.style=":host{display:block}";export{i as presto_video}
|
dist/components/web-components/p-8b226722.entry.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{r as i,h as t,g as o,c as l}from"./p-3cd9ce84.js";function s(i){let t,o=i.split(":");return o.length>1&&(t=60*parseInt(o[0])),parseInt(o[1])+parseInt(t)}function e(){var i=navigator.userAgent||navigator.vendor;return/windows phone/i.test(i)?"Windows Phone":/android/i.test(i)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}function n(){return"iOS"===e()}function d(i){var t,o,l,s,e;if(i.fullscreen.active&&i.fullscreen.exit(),n()&&!(null===(o=null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.blockAttributes)||void 0===o?void 0:o.playsinline)&&("function"==typeof(null===(l=null==i?void 0:i.media)||void 0===l?void 0:l.webkitExitFullScreen)&&(null==i||i.media.webkitExitFullScreen()),"function"==typeof(null===(s=null==i?void 0:i.embed)||void 0===s?void 0:s.exitFullscreen)&&(null===(e=null==i?void 0:i.embed)||void 0===e||e.exitFullscreen()),function(i){var t,o;return n()&&"youtube"===i.provider&&!(null===(o=null===(t=null==i?void 0:i.config)||void 0===t?void 0:t.blockAttributes)||void 0===o?void 0:o.playsinline)}(i))){const t=i.currentTime;i.currentTime=i.duration,i.once("playing",(()=>{i.currentTime=t}))}}const r=class{constructor(t){i(this,t),this.show=!1,this.youtubeRenderKey=1}componentWillLoad(){this.handleDuration()}handleButtonCountChange(i,t){(null==i?void 0:i.button_count)!==(null==t?void 0:t.button_count)&&this.youtubeRenderKey++,(null==i?void 0:i.enabled)&&this.handleDuration()}handleDuration(){var i,t;this.show=!!(null===(i=null===window||void 0===window?void 0:window.wp)||void 0===i?void 0:i.blocks)||function({current:i,duration:t,showAfter:o}){if(i===o)return!0;let l=i/t*100;return 99.9<l&&(l=100),l>=o}({current:this.currentTime,duration:this.duration,showAfter:(null===(t=this.config)||void 0===t?void 0:t.percentage_start)||0})}youtubeButton(){var i,o,l,s;if("youtube"===(null===(i=this.config)||void 0===i?void 0:i.button_type)&&(null===(o=this.youtube)||void 0===o?void 0:o.channelId))return t("presto-youtube-subscribe-button",{key:this.youtubeRenderKey,channel:null===(l=this.youtube)||void 0===l?void 0:l.channelId,showCount:null===(s=this.config)||void 0===s?void 0:s.button_count})}customButton(){var i,o,l,s,e,n,d,r,a,h,v;if("custom"===(null===(i=this.config)||void 0===i?void 0:i.button_type))return t("presto-player-button",{type:"primary",size:"small",href:null===(l=null===(o=this.config)||void 0===o?void 0:o.button_link)||void 0===l?void 0:l.url,target:(null===(e=null===(s=this.config)||void 0===s?void 0:s.button_link)||void 0===e?void 0:e.opensInNewTab)?"_blank":"_self",style:Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(n=this.config)||void 0===n?void 0:n.button_radius}px`},(null===(d=this.config)||void 0===d?void 0:d.button_color)?{"--presto-player-button-color":`${null===(r=this.config)||void 0===r?void 0:r.button_color}`}:{}),(null===(a=this.config)||void 0===a?void 0:a.button_text_color)?{"--presto-player-button-text":`${null===(h=this.config)||void 0===h?void 0:h.button_text_color}`}:{})},null===(v=this.config)||void 0===v?void 0:v.button_text)}render(){var i,o;return t("presto-action-bar-ui",{open:this.show,style:{"--presto-action-bar-background":(null===(i=this.config)||void 0===i?void 0:i.background_color)||"#1d1d1d"}},null===(o=this.config)||void 0===o?void 0:o.text,t("div",{slot:"button"},this.youtubeButton(),this.customButton()))}get el(){return o(this)}static get watchers(){return{config:["handleButtonCountChange"],currentTime:["handleDuration"],duration:["handleDuration"]}}};r.style=":host{display:block}";const a=class{constructor(t){i(this,t)}componentWillLoad(){this.poster=this.poster||this.thumbnail}render(){return t("presto-video",{getRef:this.getRef,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}},h=class{constructor(t){i(this,t),this.playVideo=l(this,"playVideo",7),this.rewatchVideo=l(this,"rewatchVideo",7),this.percentagePassed=0}componentWillLoad(){this.handleDuration()}handlePlayerInit(i,t){t||(this.player.on("ended",(()=>{this.ended=!0})),this.player.on("timeupdate",(()=>{this.currentTime=this.player.currentTime})))}timePassed({current:i,duration:t,showAfter:o}){if(i===o)return!0;let l=i/t*100;return 99.9<l&&(l=100),l>=o}handleEnded(i){var t,o;if(i){if(100!==(null===(o=null===(t=this.preset)||void 0===t?void 0:t.cta)||void 0===o?void 0:o.percentage))return;this.show=!0}}handleFullScreen(){this.show&&d(this.player)}handleDuration(){var i,t;this.enabled=!this.skipped&&(null===(t=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===t?void 0:t.enabled),this.handleTime()}handlePercentagePassed(){this.percentagePassed=this.currentTime/this.duration*100}handleEnabled(){this.show&&(this.skipped||this.player&&this.player.pause())}handleTime(){var i,t;this.enabled&&(this.skipped||100!==(null===(t=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===t?void 0:t.percentage)&&this.checkTime())}checkTime(){var i,t;this.show=this.timePassed({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===t?void 0:t.percentage)||0})}skip(){this.skipped=!0,this.show=!1,this.playVideo.emit()}rewatch(){this.ended=!1,this.show=!1,this.rewatchVideo.emit(),this.player.once("timeupdate",(()=>{setTimeout((()=>this.player.play()),500)})),this.player.restart()}render(){var i,o,l,s,e,n,d,r,a,h,v,u,c,p,y,m,f,b,w,g,_,k,x,P,S,T,L,C;if(this.show)return t("presto-cta-overlay-ui",{style:Object.assign(Object.assign(Object.assign({"--presto-player-button-border-radius":`${null===(o=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===o?void 0:o.button_radius}px`},(null===(s=null===(l=this.preset)||void 0===l?void 0:l.cta)||void 0===s?void 0:s.background_opacity)?{"--presto-player-cta-background-opacity":""+(null===(n=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===n?void 0:n.background_opacity)/100}:{}),(null===(r=null===(d=this.preset)||void 0===d?void 0:d.cta)||void 0===r?void 0:r.button_color)?{"--presto-player-button-color":`${null===(h=null===(a=this.preset)||void 0===a?void 0:a.cta)||void 0===h?void 0:h.button_color}`}:{}),(null===(u=null===(v=this.preset)||void 0===v?void 0:v.cta)||void 0===u?void 0:u.button_text_color)?{"--presto-player-button-text":`${null===(p=null===(c=this.preset)||void 0===c?void 0:c.cta)||void 0===p?void 0:p.button_text_color}`}:{}),direction:this.direction,class:"cta-overlay",headline:null===(m=null===(y=this.preset)||void 0===y?void 0:y.cta)||void 0===m?void 0:m.headline,"bottom-text":null===(b=null===(f=this.preset)||void 0===f?void 0:f.cta)||void 0===b?void 0:b.bottom_text,"show-button":null===(g=null===(w=this.preset)||void 0===w?void 0:w.cta)||void 0===g?void 0:g.show_button,buttonLink:null===(k=null===(_=this.preset)||void 0===_?void 0:_.cta)||void 0===k?void 0:k.button_link,allowSkip:!this.ended&&(null===(P=null===(x=this.preset)||void 0===x?void 0:x.cta)||void 0===P?void 0:P.show_skip),allowRewatch:this.ended&&(null===(T=null===(S=this.preset)||void 0===S?void 0:S.cta)||void 0===T?void 0:T.show_rewatch),"button-text":null===(C=null===(L=this.preset)||void 0===L?void 0:L.cta)||void 0===C?void 0:C.button_text,onSkip:()=>this.skip(),onRewatch:()=>this.rewatch(),i18n:this.i18n})}static get watchers(){return{player:["handlePlayerInit"],ended:["handleEnded"],currentTime:["handleFullScreen","handlePercentagePassed","handleEnabled","handleTime"],duration:["handleDuration","handlePercentagePassed"]}}};h.style=":host{display:block}";const v=class{constructor(t){i(this,t),this.reloadComponent=l(this,"reloadComponent",7),this.watermarkRef={left:null,right:null},this.destroy=!1,this.refs={}}componentDidLoad(){this.player.on("timeupdate",(i=>{this.currentTime=i.detail.plyr.currentTime,this.checkValidity()}))}checkValidity(){var i,t,o,l,s,e,n;this.player.playing&&((null===(i=this.container)||void 0===i?void 0:i.offsetParent)&&(null===(t=this.topLeft)||void 0===t?void 0:t.offsetParent)&&(null===(o=this.topRight)||void 0===o?void 0:o.offsetParent)||this.reloadComponent.emit(),Object.keys(this.refs||{}).forEach((i=>{const{overlay:t,component:o}=this.refs[i];this.checkComponent(o,t.text,(()=>this.reloadComponent.emit()))})),this.shouldShowWatermark("top-left")&&this.watermarkRef.left&&this.checkComponent(this.watermarkRef.left,null===(s=null===(l=this.preset)||void 0===l?void 0:l.watermark)||void 0===s?void 0:s.text,(()=>this.reloadComponent.emit())),this.shouldShowWatermark("top-right")&&this.watermarkRef.right&&this.checkComponent(this.watermarkRef.right,null===(n=null===(e=this.preset)||void 0===e?void 0:e.watermark)||void 0===n?void 0:n.text,(()=>this.reloadComponent.emit())))}checkComponent(i,t,o){if(!(null==i?void 0:i.offsetParent))return o();if(!i.shadowRoot.querySelector("slot"))return o();if(this.player&&this.player.playing){const l=i.shadowRoot.querySelector("slot").assignedNodes()[0];if(l){if(l.parentElement.innerHTML!=t)return o();const i=getComputedStyle(l.parentElement.shadowRoot.querySelector(".overlay-text"));if(parseInt(i.fontSize,10)<10)return o();const s=function(i){var t=i.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return t?[t[1],t[2],t[3],"1"]:(t=i.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[t[1],t[2],t[3],t[4]]:void 0}(i.color);if("1"!==(null==s?void 0:s[3]))return o()}}}shouldShowOverlay(i){if(void 0!==this.currentTime)return!(this.currentTime<s(null==i?void 0:i.startTime)||this.currentTime>s(null==i?void 0:i.endTime))}renderOverlay(i){var o,l;return t("presto-dynamic-overlay-ui",{class:{visible:this.shouldShowOverlay(i)},ref:t=>this.refs[i.id]={overlay:i,component:t},key:i.id,position:i.position,href:null===(o=null==i?void 0:i.link)||void 0===o?void 0:o.url,target:(null===(l=null==i?void 0:i.link)||void 0===l?void 0:l.opensInNewTab)?"_blank":"_self",innerHTML:this.shouldShowOverlay(i)?i.text:"",style:{"--presto-dynamic-overlay-color":(null==i?void 0:i.color)||"#fff","--presto-dynamic-overlay-background":(null==i?void 0:i.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null==i?void 0:i.opacity)?(i.opacity/100).toString():"1"}})}shouldShowWatermark(i){var t,o,l;if(!(null===(o=null===(t=this.preset)||void 0===t?void 0:t.watermark)||void 0===o?void 0:o.enabled))return!1;const s=null===(l=this.preset)||void 0===l?void 0:l.watermark;return"randomize"===s.position?Math.floor((this.player.currentTime||0)/10)%2==0?"top-left"===i:"top-right"===i:s.position===i||!s.position&&"top-right"===i}render(){var i,o,l,s,e,n,d,r,a,h,v;if(this.enabled&&((null===(i=null==this?void 0:this.overlays)||void 0===i?void 0:i.length)||(null===(l=null===(o=this.preset)||void 0===o?void 0:o.watermark)||void 0===l?void 0:l.enabled)))return t("div",{class:"overlays",ref:i=>this.container=i},t("div",{class:"top-left",ref:i=>this.topLeft=i},!!this.shouldShowWatermark("top-left")&&t("presto-dynamic-overlay-ui",{ref:i=>this.watermarkRef.left=i,style:{"--presto-dynamic-overlay-color":(null===(s=this.preset.watermark)||void 0===s?void 0:s.color)||"#fff","--presto-dynamic-overlay-background":(null===(e=this.preset.watermark)||void 0===e?void 0:e.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(n=this.preset.watermark)||void 0===n?void 0:n.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-left",innerHTML:this.preset.watermark.text}),!!(null===(d=null==this?void 0:this.overlays)||void 0===d?void 0:d.length)&&this.overlays.map((i=>"top-left"!==i.position?"":this.renderOverlay(i)))),t("div",{class:"top-right",ref:i=>this.topRight=i},!!this.shouldShowWatermark("top-right")&&t("presto-dynamic-overlay-ui",{ref:i=>this.watermarkRef.right=i,style:{"--presto-dynamic-overlay-color":(null===(r=this.preset.watermark)||void 0===r?void 0:r.color)||"#fff","--presto-dynamic-overlay-background":(null===(a=this.preset.watermark)||void 0===a?void 0:a.backgroundColor)||"#333","--presto-dynamic-overlay-opacity":(null===(h=this.preset.watermark)||void 0===h?void 0:h.opacity)?(this.preset.watermark.opacity/100).toString():"1"},class:"visible",position:"top-right",innerHTML:this.preset.watermark.text}),!!(null===(v=null==this?void 0:this.overlays)||void 0===v?void 0:v.length)&&this.overlays.map((i=>"top-right"!==i.position?"":this.renderOverlay(i)))))}get el(){return o(this)}};v.style=".top-left,.top-right{position:absolute;display:block;padding:20px;max-width:45%;z-index:20;display:flex;flex-direction:column;flex-wrap:wrap}.top-left{top:0;left:0}.top-right{top:0;right:0;align-items:flex-end}presto-dynamic-overlay-ui{overflow:hidden;height:0;opacity:0;transition:height 0ms 400ms, opacity 400ms 0ms}presto-dynamic-overlay-ui.visible{margin-bottom:10px;height:auto;opacity:1;transition:height 0ms 0ms, opacity 500ms 0ms}";const u=class{constructor(t){i(this,t),this.playVideo=l(this,"playVideo",7)}setStorage(i){window.localStorage.setItem("presto.videos.email_collection",JSON.stringify({[this.videoId]:i}))}getStorage(){return window.localStorage.getItem("presto.videos.email_collection")}componentWillLoad(){this.handleDuration()}timePassed({current:i,duration:t,showAfter:o}){if(i===o)return!0;let l=i/t*100;return 99.9<l&&(l=100),l>=o}handlePlayerInit(i,t){t||(this.player.on("timeupdate",(()=>{this.currentTime=this.player.currentTime})),this.player.on("play playing timeupdate",(()=>{this.getStorage()||this.show&&this.player.pause()})))}handleDuration(){var i,t;this.enabled=!this.getStorage()&&(null===(t=null===(i=this.preset)||void 0===i?void 0:i.email_collection)||void 0===t?void 0:t.enabled),this.handleTime()}handleTime(){this.enabled&&(this.getStorage()||(this.checkTime(),this.show&&d(this.player)))}checkTime(){var i,t;this.show=this.timePassed({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null===(i=this.preset)||void 0===i?void 0:i.email_collection)||void 0===t?void 0:t.percentage)||0})}async getNonce(){var i;return fetch(`${null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.ajaxurl}?action=presto_refresh_progress_nonce`)}async submit(i){var t;this.loading=!0,this.error="";const o=await this.getNonce(),{data:l}=await o.json();try{let o=await fetch(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl,{method:"post",body:new URLSearchParams(Object.assign({action:"presto_player_email_submit",nonce:l,preset_id:this.preset.id,video_id:this.videoId},(null==i?void 0:i.detail)||{}))});const{success:s,data:e}=await o.json();if(!s)throw e;this.setStorage("collected"),this.show=!1,this.playVideo.emit()}catch(i){const t=null==i?void 0:i[0];t&&"string"==typeof t&&(this.error=t)}finally{this.loading=!1}}skip(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}render(){var i,o,l,s,e,n,d,r;if(this.show)return t("presto-email-overlay-ui",{direction:this.direction,class:"email-overlay",headline:null===(o=null===(i=this.preset)||void 0===i?void 0:i.email_collection)||void 0===o?void 0:o.headline,bottomText:null===(s=null===(l=this.preset)||void 0===l?void 0:l.email_collection)||void 0===s?void 0:s.bottom_text,allowSkip:null===(n=null===(e=this.preset)||void 0===e?void 0:e.email_collection)||void 0===n?void 0:n.allow_skip,buttonText:null===(r=null===(d=this.preset)||void 0===d?void 0:d.email_collection)||void 0===r?void 0:r.button_text,isLoading:this.loading,errorMessage:this.error,onSubmitForm:i=>this.submit(i),onSkip:()=>this.skip(),i18n:this.i18n})}static get watchers(){return{player:["handlePlayerInit"],duration:["handleDuration"],currentTime:["handleTime"]}}};u.style=":host{display:block}";const c=class{constructor(t){i(this,t),this.playVideo=l(this,"playVideo",7)}render(){var i,o,l,s,e,n,d,r,a;return t("div",{class:"presto-player__muted-overlay",onClick:()=>{this.mutedPreview=!1,this.playVideo.emit()}},(null===(i=this.preset)||void 0===i?void 0:i["play-large"])&&t("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},t("svg",{id:"plyr-play",viewBox:"0 0 18 18"},t("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),t("span",{class:"plyr__sr-only"},"Play")),(null===(o=this.mutedOverlay)||void 0===o?void 0:o.enabled)&&(null===(l=this.mutedOverlay)||void 0===l?void 0:l.src)?t("div",{class:"presto-player__overlay is-image",part:"muted-overlay-image",style:{width:`${(null===(s=this.mutedOverlay)||void 0===s?void 0:s.width)||50}%`,left:100*((null===(n=null===(e=this.mutedOverlay)||void 0===e?void 0:e.focalPoint)||void 0===n?void 0:n.x)||.5)+"%",top:100*((null===(r=null===(d=this.mutedOverlay)||void 0===d?void 0:d.focalPoint)||void 0===r?void 0:r.y)||.5)+"%"}},t("img",{src:null===(a=this.mutedOverlay)||void 0===a?void 0:a.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}};c.style=":host{display:block}";const p=class{constructor(t){i(this,t)}getId(i){const t=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(i||"");return(null==t?void 0:t[5])||""}render(){if(this.src)return"Android"!==e()||(i=window.navigator.standalone,o=window.navigator.userAgent.toLowerCase(),l=/safari/.test(o),/iphone|ipod|ipad/.test(o)?!i&&l||i||l:!o.includes("wv"))?t("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"vimeo","data-plyr-embed-id":this.getId(this.src)}):t("div",{class:"presto-iframe-fallback-container"},t("iframe",{src:`https://player.vimeo.com/video/${this.getId(this.src)}?loop=false&byline=false&portrait=false&title=false&speed=true&transparent=0&gesture=media`,allowFullScreen:!0,allowTransparency:!0,allow:"autoplay",style:{width:"100%"},class:"presto-fallback-iframe"}));var i,o,l}};p.style=":host{display:block}";const y=class{constructor(t){i(this,t),this.reload=l(this,"reload",7)}handlePlayerChange(){this.player&&this.fixes()}fixes(){this.player.on("statechange",(i=>{var t,o,l,s,e;1===i.detail.code&&((null===(e=null===(s=null===(l=null===(o=null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.plyr)||void 0===o?void 0:o.config)||void 0===l?void 0:l.blockAttributes)||void 0===s?void 0:s.mutedPreview)||void 0===e?void 0:e.enabled)||(this.player.muted=!1))}))}getId(i){var t;const o=(i||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return o&&11===(null===(t=null==o?void 0:o[2])||void 0===t?void 0:t.length)?o[2]:null}loadPlayer(){this.lazyLoad=!1,this.reloadPlayer=!0}componentDidRender(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}setWebView(){var i;let t=null===(i=window.navigator)||void 0===i?void 0:i.standalone,o=window.navigator.userAgent.toLowerCase(),l=/safari/.test(o),s=/iphone|ipod|ipad/.test(o);this.isWebView=s?!t&&!l:o.includes("wv")}componentWillLoad(){this.setWebView(),this.poster||(this.poster=`//img.youtube.com/vi/${this.getId(this.src)}/maxresdefault.jpg`),this.lazyLoad&&n()&&(this.lazyLoad=!1)}render(){return this.isWebView?t("div",{class:"fallback-container"},t("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?t("div",null,t("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:""}),t("div",{class:"presto-player__play-cover",onClick:()=>this.loadPlayer()})):t("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"youtube","data-plyr-embed-id":this.getId(this.src)})}static get watchers(){return{player:["handlePlayerChange"]}}};y.style=":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}";export{r as presto_action_bar,a as presto_bunny,h as presto_cta_overlay,v as presto_dynamic_overlays,u as presto_email_overlay,c as presto_muted_overlay,p as presto_vimeo,y as presto_youtube}
|
|
dist/components/web-components/p-8c3f8656.entry.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
export{a as presto_player}from"./p-ad3b0509.js";import"./p-3cd9ce84.js";
|
dist/components/web-components/{p-0c9b972a.js → p-ad3b0509.js}
RENAMED
@@ -1 +1 @@
|
|
1 |
-
import{a as t,d as r,e,f as i,i as n,j as o,_ as a,k as l,l as s,m as p,r as u,c,h as d,H as h,g as y}from"./p-3cd9ce84.js";var f=["premium","referrerPolicy"];function v(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function g(t,r){for(var e=0;e<r.length;e++){var i=r[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function m(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,i)}return e}function b(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?m(Object(e),!0).forEach((function(r){_(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):m(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var w={addCSS:!0,thumbWidth:15,watch:!0};function k(t,r){return function(){return Array.from(document.querySelectorAll(r)).includes(this)}.call(t,r)}var x=function(t){return null!=t?t.constructor:null},z=function(t,r){return!!(t&&r&&t instanceof r)},j=function(t){return x(t)===String},T=function(t){return Array.isArray(t)},P=function(t){return z(t,NodeList)},O=j,S=T,C=P,I=function(t){return z(t,Element)},M=function(t){return z(t,Event)},A=function(t){return function(t){return null==t}(t)||(j(t)||T(t)||P(t))&&!t.length||function(t){return x(t)===Object}(t)&&!Object.keys(t).length};var E,F,N,R=function(){function t(r,e){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,t),I(r)?this.element=r:O(r)&&(this.element=document.querySelector(r)),I(this.element)&&A(this.element.rangeTouch)&&(this.config=b({},w,{},e),this.init())}return function(t,r,e){r&&g(t.prototype,r),e&&g(t,e)}(t,[{key:"init",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var r=this,e=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){r.element[e](t,(function(t){return r.set(t)}),!1)}))}},{key:"get",value:function(r){if(!t.enabled||!M(r))return null;var e,i=r.target,n=r.changedTouches[0],o=parseFloat(i.getAttribute("min"))||0,a=parseFloat(i.getAttribute("max"))||100,l=parseFloat(i.getAttribute("step"))||1,s=i.getBoundingClientRect(),p=100/s.width*(this.config.thumbWidth/2)/100;return 0>(e=100/s.width*(n.clientX-s.left))?e=0:100<e&&(e=100),50>e?e-=(100-2*e)*p:50<e&&(e+=2*(e-50)*p),o+function(t,r){if(1>r){var e=function(t){var r="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return r?Math.max(0,(r[1]?r[1].length:0)-(r[2]?+r[2]:0)):0}(r);return parseFloat(t.toFixed(e))}return Math.round(t/r)*r}(e/100*(a-o),l)}},{key:"set",value:function(r){t.enabled&&M(r)&&!r.target.disabled&&(r.preventDefault(),r.target.value=this.get(r),function(t,r){if(t&&r){var e=new Event(r,{bubbles:!0});t.dispatchEvent(e)}}(r.target,"touchend"===r.type?"change":"input"))}}],[{key:"setup",value:function(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(A(r)||O(r)?i=Array.from(document.querySelectorAll(O(r)?r:'input[type="range"]')):I(r)?i=[r]:C(r)?i=Array.from(r):S(r)&&(i=r.filter(I)),A(i))return null;var n=b({},w,{},e);if(O(r)&&n.watch){var o=new MutationObserver((function(e){Array.from(e).forEach((function(e){Array.from(e.addedNodes).forEach((function(e){I(e)&&k(e,r)&&new t(e,n)}))}))}));o.observe(document.body,{childList:!0,subtree:!0})}return i.map((function(r){return new t(r,e)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),L=function(t){return null!=t?t.constructor:null},q=function(t,r){return Boolean(t&&r&&t instanceof r)},B=function(t){return null==t},D=function(t){return L(t)===Object},U=function(t){return L(t)===String},H=function(t){return L(t)===Function},V=function(t){return Array.isArray(t)},$=function(t){return q(t,NodeList)},Q=function(t){return B(t)||(U(t)||V(t)||$(t))&&!t.length||D(t)&&!Object.keys(t).length},Y=B,J=D,W=function(t){return L(t)===Number&&!Number.isNaN(t)},G=U,K=function(t){return L(t)===Boolean},X=H,Z=V,tt=$,rt=function(t){return null!==t&&"object"==n(t)&&1===t.nodeType&&"object"==n(t.style)&&"object"==n(t.ownerDocument)},et=function(t){return q(t,Event)},it=function(t){return q(t,KeyboardEvent)},nt=function(t){return q(t,TextTrack)||!B(t)&&U(t.kind)},ot=function(t){if(q(t,window.URL))return!0;if(!U(t))return!1;var r=t;t.startsWith("http://")&&t.startsWith("https://")||(r="http://".concat(t));try{return!Q(new URL(r).hostname)}catch(t){return!1}},at=Q,lt=(E=document.createElement("span"),F={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},N=Object.keys(F).find((function(t){return void 0!==E.style[t]})),!!G(N)&&F[N]);function st(t,r){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),r)}var pt={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function ut(t,r){return r.split(".").reduce((function(t,r){return t&&t[r]}),t)}function ct(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];if(!i.length)return t;var o=i.shift();return J(o)?(Object.keys(o).forEach((function(r){J(o[r])?(Object.keys(t).includes(r)||Object.assign(t,e({},r,{})),ct(t[r],o[r])):Object.assign(t,e({},r,o[r]))})),ct.apply(void 0,[t].concat(i))):t}function dt(t,r){Array.from(t.length?t:[t]).reverse().forEach((function(t,e){var i=e>0?r.cloneNode(!0):r,n=t.parentNode,o=t.nextSibling;i.appendChild(t),o?n.insertBefore(i,o):n.appendChild(i)}))}function ht(r,e){rt(r)&&!at(e)&&Object.entries(e).filter((function(r){var e=t(r,2);return!Y(e[1])})).forEach((function(e){var i=t(e,2);return r.setAttribute(i[0],i[1])}))}function yt(t,r,e){var i=document.createElement(t);return J(r)&&ht(i,r),G(e)&&(i.innerText=e),i}function ft(t,r,e,i){rt(r)&&r.appendChild(yt(t,e,i))}function vt(t){tt(t)||Z(t)?Array.from(t).forEach(vt):rt(t)&&rt(t.parentNode)&&t.parentNode.removeChild(t)}function gt(t){if(rt(t))for(var r=t.childNodes.length;r>0;)t.removeChild(t.lastChild),r-=1}function _t(t,r){return rt(r)&&rt(r.parentNode)&&rt(t)?(r.parentNode.replaceChild(t,r),t):null}function mt(r,e){if(!G(r)||at(r))return{};var i={},n=ct({},e);return r.split(",").forEach((function(r){var e=r.trim(),o=e.replace(".",""),a=e.replace(/[[\]]/g,"").split("="),l=t(a,1)[0],s=a.length>1?a[1].replace(/["']/g,""):"";switch(e.charAt(0)){case".":i.class=G(n.class)?"".concat(n.class," ").concat(o):o;break;case"#":i.id=e.replace("#","");break;case"[":i[l]=s}})),ct(n,i)}function bt(t,r){if(rt(t)){var e=r;K(e)||(e=!t.hidden),t.hidden=e}}function wt(t,r,e){if(tt(t))return Array.from(t).map((function(t){return wt(t,r,e)}));if(rt(t)){var i="toggle";return void 0!==e&&(i=e?"add":"remove"),t.classList[i](r),t.classList.contains(r)}return!1}function kt(t,r){return rt(t)&&t.classList.contains(r)}function xt(t,r){var e=Element.prototype;return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(){return Array.from(document.querySelectorAll(r)).includes(this)}).call(t,r)}function zt(t){return this.elements.container.querySelectorAll(t)}function jt(t){return this.elements.container.querySelector(t)}function Tt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];rt(t)&&(t.focus({preventScroll:!0}),r&&wt(t,this.config.classNames.tabFocus))}var Pt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Ot={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,r,e){var i=Ot[t]||"html5"!==r;return{api:i,ui:i&&Ot.rangeInput&&("video"!==t||!pt.isIPhone||pt.isIPhone&&e&&Ot.playsinline)}},pip:!(pt.isIPhone||!X(yt("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||yt("video").disablePictureInPicture)),airplay:X(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(r){if(at(r))return!1;var e=r.split("/"),i=t(e,1),n=r;if(!this.isHTML5||i[0]!==this.type)return!1;Object.keys(Pt).includes(n)&&(n+='; codecs="'.concat(Pt[r],'"'));try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(r){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var t=document.createElement("input");return t.type="range","range"===t.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==lt,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},St=function(){var t=!1;try{var r=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){}return t}();function Ct(t,r,e){var i=this,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&"addEventListener"in t&&!at(r)&&X(e)){var l=r.split(" "),s=a;St&&(s={passive:o,capture:a}),l.forEach((function(r){i&&i.eventListeners&&n&&i.eventListeners.push({element:t,type:r,callback:e,options:s}),t[n?"addEventListener":"removeEventListener"](r,e,s)}))}}function It(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Ct.call(this,t,r,e,!0,i,n)}function Mt(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Ct.call(this,t,r,e,!1,i,n)}function At(t){var r=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function a(){for(var l=arguments.length,s=new Array(l),p=0;p<l;p++)s[p]=arguments[p];Mt(t,e,a,n,o),i.apply(r,s)};Ct.call(this,t,e,a,!0,n,o)}function Et(t){var e=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(rt(t)&&!at(e)){var o=new CustomEvent(e,{bubbles:i,detail:r(r({},n),{},{plyr:this})});t.dispatchEvent(o)}}function Ft(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function Nt(){var t=this;return new Promise((function(r){return t.ready?setTimeout(r,0):It.call(t,t.elements.container,"ready",r)})).then((function(){}))}function Rt(t){(function(t){return q(t,Promise)&&H(t.then)})(t)&&t.then(null,(function(){}))}function Lt(t){return Z(t)?t.filter((function(r,e){return t.indexOf(r)===e})):t}function qt(t,r){return Z(t)&&t.length?t.reduce((function(t,e){return Math.abs(e-r)<Math.abs(t-r)?e:t})):null}function Bt(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var Dt=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((function(i,n){var o=t(n,2),a=o[0],l=o[1];return r(r({},i),{},e({},a/l,[a,l]))}),{});function Ut(t){return!!(Z(t)||G(t)&&t.includes(":"))&&(Z(t)?t:t.split(":")).map(Number).every(W)}function Ht(r){if(!Z(r)||!r.every(W))return null;var e=t(r,2),i=e[0],n=e[1],o=function t(r,e){return 0===e?r:t(e,r%e)}(i,n);return[i/o,n/o]}function Vt(t){var r=function(t){return Ut(t)?t.split(":").map(Number):null},e=r(t);if(null===e&&(e=r(this.config.ratio)),null===e&&!at(this.embed)&&Z(this.embed.ratio)&&(e=this.embed.ratio),null===e&&this.isHTML5){var i=this.media;e=[i.videoWidth,i.videoHeight]}return Ht(e)}function $t(r){if(!this.isVideo)return{};var e=this.elements.wrapper,i=Vt.call(this,r);if(!Z(i))return{};var n=Ht(i),o=t(n,2),a=o[0],l=o[1],s=100/a*l;if(Bt("aspect-ratio: ".concat(a,"/").concat(l))?e.style.aspectRatio="".concat(a,"/").concat(l):e.style.paddingBottom="".concat(s,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),u=(p-s)/(p/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:i}}function Qt(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,i=t/r,n=qt(Object.keys(Dt),i);return Math.abs(n-i)<=e?Dt[n]:[t,r]}var Yt={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(r){var e=r.getAttribute("type");return!!at(e)||Ot.mime.call(t,e)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:Yt.getSources.call(this).map((function(t){return Number(t.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var t=this;t.options.speed=t.config.speed.options,at(this.config.ratio)||$t.call(t),Object.defineProperty(t.media,"quality",{get:function(){var r=Yt.getSources.call(t).find((function(r){return r.getAttribute("src")===t.source}));return r&&Number(r.getAttribute("size"))},set:function(r){if(t.quality!==r){if(t.config.quality.forced&&X(t.config.quality.onChange))t.config.quality.onChange(r);else{var e=Yt.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===r}));if(!e)return;var i=t.media,n=i.currentTime,o=i.paused,a=i.preload,l=i.readyState,s=i.playbackRate;t.media.src=e.getAttribute("src"),("none"!==a||l)&&(t.once("loadedmetadata",(function(){t.speed=s,t.currentTime=n,o||Rt(t.play())})),t.media.load())}Et.call(t,t.media,"qualitychange",!1,{quality:r})}}})}},cancelRequests:function(){this.isHTML5&&(vt(Yt.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Jt(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function Wt(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];return at(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,r){return e[r].toString()}))}var Gt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(r.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),e.toString())},Kt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.toString().replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))};function Xt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=t.toString();return r=Gt(r,"-"," "),r=Gt(r,"_"," "),r=Kt(r),Gt(r," ","")}function Zt(t){var r=document.createElement("div");return r.appendChild(t),r.innerHTML}var tr={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},rr=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(at(r)||at(e))return"";var i=ut(e.i18n,r);if(at(i))return Object.keys(tr).includes(r)?tr[r]:"";var n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach((function(r){var e=t(r,2);i=Gt(i,e[0],e[1])})),i},er=function(){function t(r){var e=this;o(this,t),v(this,"get",(function(r){if(!t.supported||!e.enabled)return null;var i=window.localStorage.getItem(e.key);if(at(i))return null;var n=JSON.parse(i);return G(r)&&r.length?n[r]:n})),v(this,"set",(function(r){if(t.supported&&e.enabled&&J(r)){var i=e.get();at(i)&&(i={}),ct(i,r),window.localStorage.setItem(e.key,JSON.stringify(i))}})),this.enabled=r.config.storage.enabled,this.key=r.config.storage.key}return i(t,null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}]),t}();function ir(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(e,i){try{var n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",(function(){if("text"===r)try{e(JSON.parse(n.responseText))}catch(t){e(n.responseText)}else e(n.response)})),n.addEventListener("error",(function(){throw new Error(n.status)})),n.open("GET",t,!0),n.responseType=r,n.send()}catch(t){i(t)}}))}function nr(t,r){if(G(t)){var e=G(r),i=function(){return null!==document.getElementById(r)},n=function(t,r){t.innerHTML=r,e&&i()||document.body.insertAdjacentElement("afterbegin",t)};if(!e||!i()){var o=er.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),e&&a.setAttribute("id",r),o){var l=window.localStorage.getItem("cache-".concat(r));if(null!==l){var s=JSON.parse(l);n(a,s.content)}}ir(t).then((function(t){at(t)||(o&&window.localStorage.setItem("cache-".concat(r),JSON.stringify({content:t})),n(a,t))})).catch((function(){}))}}}var or=function(t){return Math.trunc(t/60/60%60,10)},ar=function(t){return Math.trunc(t%60,10)};function lr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!W(t))return lr(void 0,r,e);var i,n=function(t){return"0".concat(t).slice(-2)},o=or(t),a=(i=t,Math.trunc(i/60%60,10)),l=ar(t);return o=r||o>0?"".concat(o,":"):"","".concat(e&&t>0?"-":"").concat(o).concat(n(a),":").concat(n(l))}var sr={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),r=window.location.host?window.location.host:window.top.location.host,e=t.host!==r||pt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=jt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:zt.call(this,this.config.selectors.buttons.play),pause:jt.call(this,this.config.selectors.buttons.pause),restart:jt.call(this,this.config.selectors.buttons.restart),rewind:jt.call(this,this.config.selectors.buttons.rewind),fastForward:jt.call(this,this.config.selectors.buttons.fastForward),mute:jt.call(this,this.config.selectors.buttons.mute),pip:jt.call(this,this.config.selectors.buttons.pip),airplay:jt.call(this,this.config.selectors.buttons.airplay),settings:jt.call(this,this.config.selectors.buttons.settings),captions:jt.call(this,this.config.selectors.buttons.captions),fullscreen:jt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=jt.call(this,this.config.selectors.progress),this.elements.inputs={seek:jt.call(this,this.config.selectors.inputs.seek),volume:jt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:jt.call(this,this.config.selectors.display.buffer),currentTime:jt.call(this,this.config.selectors.display.currentTime),duration:jt.call(this,this.config.selectors.display.duration)},rt(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon:function(t,r){var e="http://www.w3.org/2000/svg",i=sr.getIconUrl.call(this),n="".concat(i.cors?"":i.url,"#").concat(this.config.iconPrefix),o=document.createElementNS(e,"svg");ht(o,ct(r,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(e,"use"),l="".concat(n,"-").concat(t);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),o.appendChild(a),o},createLabel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=rr(t,this.config);return yt("span",r(r({},e),{},{class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),i)},createBadge:function(t){if(at(t))return null;var r=yt("span",{class:this.config.classNames.menu.value});return r.appendChild(yt("span",{class:this.config.classNames.menu.badge},t)),r},createButton:function(t,r){var e=this,i=ct({},r),n=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=Xt(t)).charAt(0).toLowerCase()+t.slice(1)}(t),o={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(t){Object.keys(i).includes(t)&&(o[t]=i[t],delete i[t])})),"button"!==o.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some((function(t){return t===e.config.classNames.control}))||ct(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,t){case"play":o.toggle=!0,o.label="play",o.labelPressed="pause",o.icon="play",o.iconPressed="pause";break;case"mute":o.toggle=!0,o.label="mute",o.labelPressed="unmute",o.icon="volume",o.iconPressed="muted";break;case"captions":o.toggle=!0,o.label="enableCaptions",o.labelPressed="disableCaptions",o.icon="captions-off",o.iconPressed="captions-on";break;case"fullscreen":o.toggle=!0,o.label="enterFullscreen",o.labelPressed="exitFullscreen",o.icon="enter-fullscreen",o.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),n="play",o.label="play",o.icon="play";break;default:at(o.label)&&(o.label=n),at(o.icon)&&(o.icon=t)}var a=yt(o.element);return o.toggle?(a.appendChild(sr.createIcon.call(this,o.iconPressed,{class:"icon--pressed"})),a.appendChild(sr.createIcon.call(this,o.icon,{class:"icon--not-pressed"})),a.appendChild(sr.createLabel.call(this,o.labelPressed,{class:"label--pressed"})),a.appendChild(sr.createLabel.call(this,o.label,{class:"label--not-pressed"}))):(a.appendChild(sr.createIcon.call(this,o.icon)),a.appendChild(sr.createLabel.call(this,o.label))),ct(i,mt(this.config.selectors.buttons[n],i)),ht(a,i),"play"===n?(Z(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(a)):this.elements.buttons[n]=a,a},createRange:function(t,r){var e=yt("input",ct(mt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":rr(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},r));return this.elements.inputs[t]=e,sr.updateRangeFill.call(this,e),R.setup(e),e},createProgress:function(t,r){var e=yt("progress",ct(mt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},r));if("volume"!==t){e.appendChild(yt("span",null,"0"));var i={played:"played",buffer:"buffered"}[t],n=i?rr(i,this.config):"";e.innerText="% ".concat(n.toLowerCase())}return this.elements.display[t]=e,e},createTime:function(t,r){var e=mt(this.config.selectors.display[t],r),i=yt("div",ct(e,{class:"".concat(e.class?e.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":rr(t,this.config)}),"00:00");return this.elements.display[t]=i,i},bindMenuItemShortcuts:function(t,r){var e=this;It.call(this,t,"keydown keyup",(function(i){if([32,38,39,40].includes(i.which)&&(i.preventDefault(),i.stopPropagation(),"keydown"!==i.type)){var n,o=xt(t,'[role="menuitemradio"]');!o&&[32,39].includes(i.which)?sr.showMenuPanel.call(e,r,!0):32!==i.which&&(40===i.which||o&&39===i.which?rt(n=t.nextElementSibling)||(n=t.parentNode.firstElementChild):rt(n=t.previousElementSibling)||(n=t.parentNode.lastElementChild),Tt.call(e,n,!0))}}),!1),It.call(this,t,"keyup",(function(t){13===t.which&&sr.focusFirstMenuItem.call(e,null,!0)}))},createMenuItem:function(t){var r=this,e=t.value,i=t.list,n=t.type,o=t.title,a=t.badge,l=void 0===a?null:a,s=t.checked,p=void 0!==s&&s,u=mt(this.config.selectors.inputs[n]),c=yt("button",ct(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:e})),d=yt("span");d.innerHTML=o,rt(l)&&d.appendChild(l),c.appendChild(d),Object.defineProperty(c,"checked",{enumerable:!0,get:function(){return"true"===c.getAttribute("aria-checked")},set:function(t){t&&Array.from(c.parentNode.children).filter((function(t){return xt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),c.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(c,"click keyup",(function(t){if(!it(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),c.checked=!0,n){case"language":r.currentTrack=Number(e);break;case"quality":r.quality=e;break;case"speed":r.speed=parseFloat(e)}sr.showMenuPanel.call(r,"home",it(t))}}),n,!1),sr.bindMenuItemShortcuts.call(this,c,n),i.appendChild(c)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return W(t)?lr(t,or(this.duration)>0,r):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];rt(t)&&W(r)&&(t.innerText=sr.formatTime(r,e))},updateVolume:function(){this.supported.ui&&(rt(this.elements.inputs.volume)&&sr.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),rt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;rt(t)&&(t.value=r,sr.updateRangeFill.call(this,t))},updateProgress:function(t){var r=this;if(this.supported.ui&&et(t)){var e=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":e=function(t,r){return 0===t||0===r||Number.isNaN(t)||Number.isNaN(r)?0:(t/r*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&sr.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":!function(t,e){var i=W(e)?e:0,n=rt(t)?t:r.elements.display.buffer;if(rt(n)){n.value=i;var o=n.getElementsByTagName("span")[0];rt(o)&&(o.childNodes[0].nodeValue=i)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var r=et(t)?t.target:t;if(rt(r)&&"range"===r.getAttribute("type")){if(xt(r,this.config.selectors.inputs.seek)){r.setAttribute("aria-valuenow",this.currentTime);var e=sr.formatTime(this.currentTime),i=sr.formatTime(this.duration),n=rr("seekLabel",this.config);r.setAttribute("aria-valuetext",n.replace("{currentTime}",e).replace("{duration}",i))}else if(xt(r,this.config.selectors.inputs.volume)){var o=100*r.value;r.setAttribute("aria-valuenow",o),r.setAttribute("aria-valuetext","".concat(o.toFixed(1),"%"))}else r.setAttribute("aria-valuenow",r.value);pt.isWebkit&&r.style.setProperty("--value",r.value/r.max*100+"%")}},updateSeekTooltip:function(t){var r=this;if(this.config.tooltips.seek&&rt(this.elements.inputs.seek)&&rt(this.elements.display.seekTooltip)&&0!==this.duration){var e="".concat(this.config.classNames.tooltip,"--visible"),i=function(t){return wt(r.elements.display.seekTooltip,e,t)};if(this.touch)i(!1);else{var n=0,o=this.elements.progress.getBoundingClientRect();if(et(t))n=100/o.width*(t.pageX-o.left);else{if(!kt(this.elements.display.seekTooltip,e))return;n=parseFloat(this.elements.display.seekTooltip.style.left,10)}n<0?n=0:n>100&&(n=100),sr.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*n),this.elements.display.seekTooltip.style.left="".concat(n,"%"),et(t)&&["mouseenter","mouseleave"].includes(t.type)&&i("mouseenter"===t.type)}}},timeUpdate:function(t){var r=!rt(this.elements.display.duration)&&this.config.invertTime;sr.updateTimeDisplay.call(this,this.elements.display.currentTime,r?this.duration-this.currentTime:this.currentTime,r),t&&"timeupdate"===t.type&&this.media.seeking||sr.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return bt(this.elements.display.currentTime,!0),void bt(this.elements.progress,!0);rt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=rt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&sr.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&sr.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),sr.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,r){bt(this.elements.settings.buttons[t],!r)},updateSetting:function(t,r,e){var i=this.elements.settings.panels[t],n=null,o=r;if("captions"===t)n=this.currentTrack;else{if(n=at(e)?this[t]:e,at(n)&&(n=this.config[t].default),!at(this.options[t])&&!this.options[t].includes(n))return void this.debug.warn("Unsupported value of '".concat(n,"' for ").concat(t));if(!this.config[t].options.includes(n))return void this.debug.warn("Disabled value of '".concat(n,"' for ").concat(t))}if(rt(o)||(o=i&&i.querySelector('[role="menu"]')),rt(o)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=sr.getLabel.call(this,t,n);var a=o&&o.querySelector('[value="'.concat(n,'"]'));rt(a)&&(a.checked=!0)}},getLabel:function(t,r){switch(t){case"speed":return 1===r?rr("normal",this.config):"".concat(r,"×");case"quality":if(W(r)){if(0===r)return rr("auto",this.config);var e=rr("qualityLabel.".concat(r),this.config);return e.length?e:"".concat(r,"p")}return Kt(r);case"captions":return cr.getLabel.call(this);default:return null}},setQualityMenu:function(t){var r=this;if(rt(this.elements.settings.panels.quality)){var e="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');Z(t)&&(this.options.quality=Lt(t).filter((function(t){return r.config.quality.options.includes(t)})));var n=!at(this.options.quality)&&this.options.quality.length>1;if(sr.toggleMenuButton.call(this,e,n),gt(i),sr.checkMenu.call(this),n){var o=function(t){var e=rr("qualityBadge.".concat(t),r.config);return e.length?sr.createBadge.call(r,e):null};this.options.quality.sort((function(t,e){var i=r.config.quality.options;return i.indexOf(t)>i.indexOf(e)?1:-1})).forEach((function(t){sr.createMenuItem.call(r,{value:t,list:i,type:e,title:sr.getLabel.call(r,"quality",t),badge:o(t)})})),sr.updateSetting.call(this,e,i)}}},setCaptionsMenu:function(){var t=this;if(rt(this.elements.settings.panels.captions)){var r="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=cr.getTracks.call(this),n=Boolean(i.length);if(sr.toggleMenuButton.call(this,r,n),gt(e),sr.checkMenu.call(this),n){var o=i.map((function(r,i){return{value:i,checked:t.captions.toggled&&t.currentTrack===i,title:cr.getLabel.call(t,r),badge:r.language&&sr.createBadge.call(t,r.language.toUpperCase()),list:e,type:"language"}}));o.unshift({value:-1,checked:!this.captions.toggled,title:rr("disabled",this.config),list:e,type:"language"}),o.forEach(sr.createMenuItem.bind(this)),sr.updateSetting.call(this,r,e)}}},setSpeedMenu:function(){var t=this;if(rt(this.elements.settings.panels.speed)){var r="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(r){return r>=t.minimumSpeed&&r<=t.maximumSpeed}));var i=!at(this.options.speed)&&this.options.speed.length>1;sr.toggleMenuButton.call(this,r,i),gt(e),sr.checkMenu.call(this),i&&(this.options.speed.forEach((function(i){sr.createMenuItem.call(t,{value:i,list:e,type:r,title:sr.getLabel.call(t,"speed",i)})})),sr.updateSetting.call(this,r,e))}},checkMenu:function(){var t=this.elements.settings.buttons,r=!at(t)&&Object.values(t).some((function(t){return!t.hidden}));bt(this.elements.settings.menu,!r)},focusFirstMenuItem:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var e=t;rt(e)||(e=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var i=e.querySelector('[role^="menuitem"]');Tt.call(this,i,r)}},toggleMenu:function(t){var r=this.elements.settings.popup,e=this.elements.buttons.settings;if(rt(r)&&rt(e)){var i=r.hidden,n=i;if(K(t))n=t;else if(it(t)&&27===t.which)n=!1;else if(et(t)){var o=X(t.composedPath)?t.composedPath()[0]:t.target,a=r.contains(o);if(a||!a&&t.target!==e&&n)return}e.setAttribute("aria-expanded",n),bt(r,!n),wt(this.elements.container,this.config.classNames.menu.open,n),n&&it(t)?sr.focusFirstMenuItem.call(this,null,!0):n||i||Tt.call(this,e,it(t))}},getMenuSize:function(t){var r=t.cloneNode(!0);r.style.position="absolute",r.style.opacity=0,r.removeAttribute("hidden"),t.parentNode.appendChild(r);var e=r.scrollWidth,i=r.scrollHeight;return vt(r),{width:e,height:i}},showMenuPanel:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(r));if(rt(i)){var n=i.parentNode,o=Array.from(n.children).find((function(t){return!t.hidden}));if(Ot.transitions&&!Ot.reducedMotion){n.style.width="".concat(o.scrollWidth,"px"),n.style.height="".concat(o.scrollHeight,"px");var a=sr.getMenuSize.call(this,i),l=function r(e){e.target===n&&["width","height"].includes(e.propertyName)&&(n.style.width="",n.style.height="",Mt.call(t,n,lt,r))};It.call(this,n,lt,l),n.style.width="".concat(a.width,"px"),n.style.height="".concat(a.height,"px")}bt(o,!0),bt(i,!1),sr.focusFirstMenuItem.call(this,i,e)}},setDownloadUrl:function(){var t=this.elements.buttons.download;rt(t)&&t.setAttribute("href",this.download)},create:function(t){var r=this,e=sr.bindMenuItemShortcuts,i=sr.createButton,n=sr.createProgress,o=sr.createRange,a=sr.createTime,l=sr.setQualityMenu,s=sr.setSpeedMenu,p=sr.showMenuPanel;this.elements.controls=null,Z(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));var u=yt("div",mt(this.config.selectors.controls.wrapper));this.elements.controls=u;var c={class:"plyr__controls__item"};return Lt(Z(this.config.controls)?this.config.controls:[]).forEach((function(l){if("restart"===l&&u.appendChild(i.call(r,"restart",c)),"rewind"===l&&u.appendChild(i.call(r,"rewind",c)),"play"===l&&u.appendChild(i.call(r,"play",c)),"fast-forward"===l&&u.appendChild(i.call(r,"fast-forward",c)),"progress"===l){var s=yt("div",{class:"".concat(c.class," plyr__progress__container")}),d=yt("div",mt(r.config.selectors.progress));if(d.appendChild(o.call(r,"seek",{id:"plyr-seek-".concat(t.id)})),d.appendChild(n.call(r,"buffer")),r.config.tooltips.seek){var h=yt("span",{class:r.config.classNames.tooltip},"00:00");d.appendChild(h),r.elements.display.seekTooltip=h}r.elements.progress=d,s.appendChild(r.elements.progress),u.appendChild(s)}if("current-time"===l&&u.appendChild(a.call(r,"currentTime",c)),"duration"===l&&u.appendChild(a.call(r,"duration",c)),"mute"===l||"volume"===l){var y=r.elements.volume;rt(y)&&u.contains(y)||(y=yt("div",ct({},c,{class:"".concat(c.class," plyr__volume").trim()})),r.elements.volume=y,u.appendChild(y)),"mute"===l&&y.appendChild(i.call(r,"mute")),"volume"!==l||pt.isIos||y.appendChild(o.call(r,"volume",ct({max:1,step:.05,value:r.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===l&&u.appendChild(i.call(r,"captions",c)),"settings"===l&&!at(r.config.settings)){var f=yt("div",ct({},c,{class:"".concat(c.class," plyr__menu").trim(),hidden:""}));f.appendChild(i.call(r,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var v=yt("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),g=yt("div"),_=yt("div",{id:"plyr-settings-".concat(t.id,"-home")}),m=yt("div",{role:"menu"});_.appendChild(m),g.appendChild(_),r.elements.settings.panels.home=_,r.config.settings.forEach((function(i){var n=yt("button",ct(mt(r.config.selectors.buttons.settings),{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(r,n,i),It.call(r,n,"click",(function(){p.call(r,i,!1)}));var o=yt("span",null,rr(i,r.config)),a=yt("span",{class:r.config.classNames.menu.value});a.innerHTML=t[i],o.appendChild(a),n.appendChild(o),m.appendChild(n);var l=yt("div",{id:"plyr-settings-".concat(t.id,"-").concat(i),hidden:""}),s=yt("button",{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--back")});s.appendChild(yt("span",{"aria-hidden":!0},rr(i,r.config))),s.appendChild(yt("span",{class:r.config.classNames.hidden},rr("menuBack",r.config))),It.call(r,l,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(r,"home",!0))}),!1),It.call(r,s,"click",(function(){p.call(r,"home",!1)})),l.appendChild(s),l.appendChild(yt("div",{role:"menu"})),g.appendChild(l),r.elements.settings.buttons[i]=n,r.elements.settings.panels[i]=l})),v.appendChild(g),f.appendChild(v),u.appendChild(f),r.elements.settings.popup=v,r.elements.settings.menu=f}if("pip"===l&&Ot.pip&&u.appendChild(i.call(r,"pip",c)),"airplay"===l&&Ot.airplay&&u.appendChild(i.call(r,"airplay",c)),"download"===l){var b=ct({},c,{element:"a",href:r.download,target:"_blank"});r.isHTML5&&(b.download=""),!ot(r.config.urls.download)&&r.isEmbed&&ct(b,{icon:"logo-".concat(r.provider),label:r.provider}),u.appendChild(i.call(r,"download",b))}"fullscreen"===l&&u.appendChild(i.call(r,"fullscreen",c))})),this.isHTML5&&l.call(this,Yt.getQualityOptions.call(this)),s.call(this),u},inject:function(){var r=this;if(this.config.loadSprite){var e=sr.getIconUrl.call(this);e.cors&&nr(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var n,o={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(X(this.config.controls)&&(this.config.controls=this.config.controls.call(this,o)),this.config.controls||(this.config.controls=[]),rt(this.config.controls)||G(this.config.controls)?i=this.config.controls:(i=sr.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:cr.getLabel.call(this)}),a=!1),a&&G(this.config.controls)&&(i=function(r){var e=r;return Object.entries(o).forEach((function(r){var i=t(r,2),n=i[1];e=Gt(e,"{".concat(i[0],"}"),n)})),e}(i)),G(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),rt(n)||(n=this.elements.container),n[rt(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),rt(this.elements.controls)||sr.findElements.call(this),!at(this.elements.buttons)){var l=function(t){var e=r.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return kt(t,e)},set:function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];wt(t,e,r)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){Z(t)||tt(t)?Array.from(t).filter(Boolean).forEach(l):l(t)}))}if(pt.isEdge&&st(n),this.config.tooltips.controls){var s=this.config,p=s.classNames,u=s.selectors,c="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),d=zt.call(this,c);Array.from(d).forEach((function(t){wt(t,r.config.classNames.hidden,!1),wt(t,r.config.classNames.tooltip,!0)}))}}};function pr(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t;if(r){var i=document.createElement("a");i.href=e,e=i.href}try{return new URL(e)}catch(t){return null}}function ur(r){var e=new URLSearchParams;return J(r)&&Object.entries(r).forEach((function(r){var i=t(r,2);e.set(i[0],i[1])})),e}var cr={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Ot.textTracks)Z(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&sr.setCaptionsMenu.call(this);else{if(rt(this.elements.captions)||(this.elements.captions=yt("div",mt(this.config.selectors.captions)),function(t,r){rt(t)&&rt(r)&&r.parentNode.insertBefore(t,r.nextSibling)}(this.elements.captions,this.elements.wrapper)),pt.isIE&&window.URL){var r=this.media.querySelectorAll("track");Array.from(r).forEach((function(t){var r=t.getAttribute("src"),e=pr(r);null!==e&&e.hostname!==window.location.href.hostname&&["http:","https:"].includes(e.protocol)&&ir(r,"blob").then((function(r){t.setAttribute("src",window.URL.createObjectURL(r))})).catch((function(){vt(t)}))}))}var e=Lt((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===i&&(i=t(e,1)[0]);var n=this.storage.get("captions");K(n)||(n=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:n,language:i,languages:e}),this.isHTML5&&It.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",cr.update.bind(this)),setTimeout(cr.update.bind(this),0)}},update:function(){var t=this,r=cr.getTracks.call(this,!0),e=this.captions,i=e.active,n=e.language,o=e.meta,a=e.currentTrackNode,l=Boolean(r.find((function(t){return t.language===n})));this.isHTML5&&this.isVideo&&r.filter((function(t){return!o.get(t)})).forEach((function(r){t.debug.log("Track added",r),o.set(r,{default:"showing"===r.mode}),"showing"===r.mode&&(r.mode="hidden"),It.call(t,r,"cuechange",(function(){return cr.updateCues.call(t)}))})),(l&&this.language!==n||!r.includes(a))&&(cr.setLanguage.call(this,n),cr.toggle.call(this,i&&l)),wt(this.elements.container,this.config.classNames.captions.enabled,!at(r)),Z(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&sr.setCaptionsMenu.call(this)},toggle:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var i=this.captions.toggled,n=this.config.classNames.captions.active,o=Y(t)?!i:t;if(o!==i){if(e||(this.captions.active=o,this.storage.set({captions:o})),!this.language&&o&&!e){var l=cr.getTracks.call(this),s=cr.findTrack.call(this,[this.captions.language].concat(a(this.captions.languages)),!0);return this.captions.language=s.language,void cr.set.call(this,l.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=o),wt(this.elements.container,n,o),this.captions.toggled=o,sr.updateSetting.call(this,"captions"),Et.call(this,this.media,o?"captionsenabled":"captionsdisabled")}setTimeout((function(){o&&r.captions.toggled&&r.captions.currentTrackNode&&(r.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=cr.getTracks.call(this);if(-1!==t)if(W(t))if(t in e){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var i=e[t],n=i||{},o=n.language;this.captions.currentTrackNode=i,sr.updateSetting.call(this,"captions"),r||(this.captions.language=o,this.storage.set({language:o})),this.isVimeo&&this.embed.enableTextTrack(o),Et.call(this,this.media,"languagechange")}cr.toggle.call(this,!0,r),this.isHTML5&&this.isVideo&&cr.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else cr.toggle.call(this,!1,r)},setLanguage:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(G(t)){var e=t.toLowerCase();this.captions.language=e;var i=cr.getTracks.call(this),n=cr.findTrack.call(this,[e]);cr.set.call(this,i.indexOf(n),r)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(e){return!t.isHTML5||r||t.captions.meta.has(e)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var r,e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=cr.getTracks.call(this),o=function(t){return Number((e.captions.meta.get(t)||{}).default)},a=Array.from(n).sort((function(t,r){return o(r)-o(t)}));return t.every((function(t){return!(r=a.find((function(r){return r.language===t})))})),r||(i?a[0]:void 0)},getCurrentTrack:function(){return cr.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var r=t;return!nt(r)&&Ot.textTracks&&this.captions.toggled&&(r=cr.getCurrentTrack.call(this)),nt(r)?at(r.label)?at(r.language)?rr("enabled",this.config):t.language.toUpperCase():r.label:rr("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(rt(this.elements.captions))if(Y(t)||Array.isArray(t)){var r=t;if(!r){var e=cr.getCurrentTrack.call(this);r=Array.from((e||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(Zt)}var i=r.map((function(t){return t.trim()})).join("\n");if(i!==this.elements.captions.innerHTML){gt(this.elements.captions);var n=yt("span",mt(this.config.selectors.caption));n.innerHTML=i,this.elements.captions.appendChild(n),Et.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},dr={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"},auto:"AUTO"},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},hr={html5:"html5",youtube:"youtube",vimeo:"vimeo"},yr=function(){},fr=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o(this,t),this.enabled=window.console&&r,this.enabled&&this.log("Debugging enabled")}return i(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):yr}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):yr}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):yr}}]),t}(),vr=function(){function r(e){var i=this;o(this,r),v(this,"onChange",(function(){if(i.enabled){var t=i.player.elements.buttons.fullscreen;rt(t)&&(t.pressed=i.active),Et.call(i.player,i.target===i.player.media?i.target:i.player.elements.container,i.active?"enterfullscreen":"exitfullscreen",!0)}})),v(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?i.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(i.scrollPosition.x,i.scrollPosition.y),document.body.style.overflow=t?"hidden":"",wt(i.target,i.player.config.classNames.fullscreen.fallback,t),pt.isIos){var r=document.head.querySelector('meta[name="viewport"]'),e="viewport-fit=cover";r||(r=document.createElement("meta")).setAttribute("name","viewport");var n=G(r.content)&&r.content.includes(e);t?(i.cleanupViewport=!n,n||(r.content+=",".concat(e))):i.cleanupViewport&&(r.content=r.content.split(",").filter((function(t){return t.trim()!==e})).join(","))}i.onChange()})),v(this,"trapFocus",(function(r){if(!pt.isIos&&i.active&&"Tab"===r.key&&9===r.keyCode){var e=document.activeElement,n=zt.call(i.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),o=t(n,1)[0],a=n[n.length-1];e!==a||r.shiftKey?e===o&&r.shiftKey&&(a.focus(),r.preventDefault()):(o.focus(),r.preventDefault())}})),v(this,"update",(function(){i.player.debug.log(i.enabled?"".concat(i.forceFallback?"Fallback (forced)":r.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),wt(i.player.elements.container,i.player.config.classNames.fullscreen.enabled,i.enabled)})),v(this,"enter",(function(){i.enabled&&(pt.isIos&&i.player.config.fullscreen.iosNative?i.player.isVimeo?i.player.embed.requestFullscreen():i.target.webkitEnterFullscreen():!r.native||i.forceFallback?i.toggleFallback(!0):i.prefix?at(i.prefix)||i.target["".concat(i.prefix,"Request").concat(i.property)]():i.target.requestFullscreen({navigationUI:"hide"}))})),v(this,"exit",(function(){if(i.enabled)if(pt.isIos&&i.player.config.fullscreen.iosNative)i.target.webkitExitFullscreen(),Rt(i.player.play());else if(!r.native||i.forceFallback)i.toggleFallback(!1);else if(i.prefix){if(!at(i.prefix)){var t="moz"===i.prefix?"Cancel":"Exit";document["".concat(i.prefix).concat(t).concat(i.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),v(this,"toggle",(function(){i.active?i.exit():i.enter()})),this.player=e,this.prefix=r.prefix,this.property=r.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(t,r){return(Element.prototype.closest||function(){var t=this;do{if(xt.matches(t,r))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,r)}(this.player.elements.container,e.config.fullscreen.container),It.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){i.onChange()})),It.call(this.player,this.player.elements.container,"dblclick",(function(t){rt(i.player.elements.controls)&&i.player.elements.controls.contains(t.target)||i.player.listeners.proxy(t,i.toggle,"fullscreen")})),It.call(this,this.player.elements.container,"keydown",(function(t){return i.trapFocus(t)})),this.update()}return i(r,[{key:"usingNative",get:function(){return r.native&&!this.forceFallback}},{key:"enabled",get:function(){return(r.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!r.native||this.forceFallback)return kt(this.target,this.player.config.classNames.fullscreen.fallback);var t=this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}},{key:"target",get:function(){return pt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(X(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(r){return!(!X(document["".concat(r,"ExitFullscreen")])&&!X(document["".concat(r,"CancelFullScreen")])||(t=r,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),r}();function gr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(e,i){var n=new Image,o=function(){delete n.onload,delete n.onerror,(n.naturalWidth>=r?e:i)(n)};Object.assign(n,{onload:o,onerror:o,src:t})}))}var _r={addStyleHook:function(){wt(this.elements.container,this.config.selectors.container.replace(".",""),!0),wt(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var t=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void _r.toggleNativeControls.call(this,!0);rt(this.elements.controls)||(sr.inject.call(this),this.listeners.controls()),_r.toggleNativeControls.call(this),this.isHTML5&&cr.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,sr.updateVolume.call(this),sr.timeUpdate.call(this),_r.checkPlaying.call(this),wt(this.elements.container,this.config.classNames.pip.supported,Ot.pip&&this.isHTML5&&this.isVideo),wt(this.elements.container,this.config.classNames.airplay.supported,Ot.airplay&&this.isHTML5),wt(this.elements.container,this.config.classNames.isIos,pt.isIos),wt(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){Et.call(t,t.media,"ready")}),0),_r.setTitle.call(this),this.poster&&_r.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&sr.durationUpdate.call(this)},setTitle:function(){var t=rr("play",this.config);if(G(this.config.title)&&!at(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(r){r.setAttribute("aria-label",t)})),this.isEmbed){var r=jt.call(this,"iframe");if(!rt(r))return;var e=at(this.config.title)?"video":this.config.title,i=rr("frameTitle",this.config);r.setAttribute("title",i.replace("{title}",e))}},togglePoster:function(t){wt(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),Nt.call(this).then((function(){return gr(t)})).catch((function(e){throw t===r.poster&&_r.togglePoster.call(r,!1),e})).then((function(){if(t!==r.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(r.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),_r.togglePoster.call(r,!0),t})))},checkPlaying:function(t){var r=this;wt(this.elements.container,this.config.classNames.playing,this.playing),wt(this.elements.container,this.config.classNames.paused,this.paused),wt(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:r.playing}),t.setAttribute("aria-label",rr(r.playing?"pause":"play",r.config))})),et(t)&&"timeupdate"===t.type||_r.toggleControls.call(this)},checkLoading:function(t){var r=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){wt(r.elements.container,r.config.classNames.loading,r.loading),_r.toggleControls.call(r)}),this.loading?250:0)},toggleControls:function(t){var r=this.elements.controls;if(r&&this.config.hideControls){var e=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||r.pressed||r.hover||e))}},migrateStyles:function(){var t=this;Object.values(r({},this.media.style)).filter((function(t){return!at(t)&&G(t)&&t.startsWith("--plyr")})).forEach((function(r){t.elements.container.style.setProperty(r,t.media.style.getPropertyValue(r)),t.media.style.removeProperty(r)})),at(this.media.style)&&this.media.removeAttribute("style")}},mr=function(){function r(e){var i=this;o(this,r),v(this,"firstTouch",(function(){var t=i.player,r=t.elements;t.touch=!0,wt(r.container,t.config.classNames.isTouch,!0)})),v(this,"setTabFocus",(function(t){var r=i.player,e=r.elements;clearTimeout(i.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(i.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-i.lastKeyDown<=20)&&(function(){var t=r.config.classNames.tabFocus;wt(zt.call(r,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(i.focusTimer=setTimeout((function(){var t=document.activeElement;e.container.contains(t)&&wt(document.activeElement,r.config.classNames.tabFocus,!0)}),10))))})),v(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=i.player;r.config.keyboard.global&&Ct.call(r,window,"keydown keyup",i.handleKey,t,!1),Ct.call(r,document.body,"click",i.toggleMenu,t),At.call(r,document.body,"touchstart",i.firstTouch),Ct.call(r,document.body,"keydown focus blur focusout",i.setTabFocus,t,!1,!0)})),v(this,"container",(function(){var r=i.player,e=r.config,n=r.elements,o=r.timers;!e.keyboard.global&&e.keyboard.focused&&It.call(r,n.container,"keydown keyup",i.handleKey,!1),It.call(r,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(t){var e=n.controls;e&&"enterfullscreen"===t.type&&(e.pressed=!1,e.hover=!1);var i=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(_r.toggleControls.call(r,!0),i=r.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout((function(){return _r.toggleControls.call(r,!1)}),i)}));var a=function(){if(r.isVimeo&&!r.config.vimeo.premium){var e=n.wrapper,i=r.fullscreen.active,o=Vt.call(r),a=t(o,2),l=a[0],s=a[1],p=Bt("aspect-ratio: ".concat(l," / ").concat(s));if(i){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=t(u,2),d=c[1],h=c[0]/d>l/s;p?(e.style.width=h?"auto":"100%",e.style.height=h?"100%":"auto"):(e.style.maxWidth=h?d/s*l+"px":null,e.style.margin=h?"0 auto":null)}else p?(e.style.width=null,e.style.height=null):(e.style.maxWidth=null,e.style.margin=null)}},l=function(){clearTimeout(o.resized),o.resized=setTimeout(a,50)};It.call(r,n.container,"enterfullscreen exitfullscreen",(function(t){r.fullscreen.target===n.container&&(!r.isEmbed&&at(r.config.ratio)||(a(),("enterfullscreen"===t.type?It:Mt).call(r,window,"resize",l)))}))})),v(this,"media",(function(){var t=i.player,r=t.elements;if(It.call(t,t.media,"timeupdate seeking seeked",(function(r){return sr.timeUpdate.call(t,r)})),It.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(r){return sr.durationUpdate.call(t,r)})),It.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),It.call(t,t.media,"progress playing seeking seeked",(function(r){return sr.updateProgress.call(t,r)})),It.call(t,t.media,"volumechange",(function(r){return sr.updateVolume.call(t,r)})),It.call(t,t.media,"playing play pause ended emptied timeupdate",(function(r){return _r.checkPlaying.call(t,r)})),It.call(t,t.media,"waiting canplay seeked playing",(function(r){return _r.checkLoading.call(t,r)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var e=jt.call(t,".".concat(t.config.classNames.video));if(!rt(e))return;It.call(t,r.container,"click",(function(n){([r.container,e].includes(n.target)||e.contains(n.target))&&(t.touch&&t.config.hideControls||(t.ended?(i.proxy(n,t.restart,"restart"),i.proxy(n,(function(){Rt(t.play())}),"play")):i.proxy(n,(function(){Rt(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&It.call(t,r.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),It.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),It.call(t,t.media,"ratechange",(function(){sr.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),It.call(t,t.media,"qualitychange",(function(r){sr.updateSetting.call(t,"quality",null,r.detail.quality)})),It.call(t,t.media,"ready qualitychange",(function(){sr.setDownloadUrl.call(t)}));var n=t.config.events.concat(["keyup","keydown"]).join(" ");It.call(t,t.media,n,(function(e){var i=e.detail,n=void 0===i?{}:i;"error"===e.type&&(n=t.media.error),Et.call(t,r.container,e.type,!0,n)}))})),v(this,"proxy",(function(t,r,e){var n=i.player,o=n.config.listeners[e],a=!0;X(o)&&(a=o.call(n,t)),!1!==a&&X(r)&&r.call(n,t)})),v(this,"bind",(function(t,r,e,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=i.player,l=a.config.listeners[n],s=X(l);It.call(a,t,r,(function(t){return i.proxy(t,e,n)}),o&&!s)})),v(this,"controls",(function(){var r=i.player,e=r.elements,n=pt.isIE?"change":"input";if(e.buttons.play&&Array.from(e.buttons.play).forEach((function(t){i.bind(t,"click",(function(){Rt(r.togglePlay())}),"play")})),i.bind(e.buttons.restart,"click",r.restart,"restart"),i.bind(e.buttons.rewind,"click",(function(){r.lastSeekTime=Date.now(),r.rewind()}),"rewind"),i.bind(e.buttons.fastForward,"click",(function(){r.lastSeekTime=Date.now(),r.forward()}),"fastForward"),i.bind(e.buttons.mute,"click",(function(){r.muted=!r.muted}),"mute"),i.bind(e.buttons.captions,"click",(function(){return r.toggleCaptions()})),i.bind(e.buttons.download,"click",(function(){Et.call(r,r.media,"download")}),"download"),i.bind(e.buttons.fullscreen,"click",(function(){r.fullscreen.toggle()}),"fullscreen"),i.bind(e.buttons.pip,"click",(function(){r.pip="toggle"}),"pip"),i.bind(e.buttons.airplay,"click",r.airplay,"airplay"),i.bind(e.buttons.settings,"click",(function(t){t.stopPropagation(),t.preventDefault(),sr.toggleMenu.call(r,t)}),null,!1),i.bind(e.buttons.settings,"keyup",(function(t){var e=t.which;[13,32].includes(e)&&(13!==e?(t.preventDefault(),t.stopPropagation(),sr.toggleMenu.call(r,t)):sr.focusFirstMenuItem.call(r,null,!0))}),null,!1),i.bind(e.settings.menu,"keydown",(function(t){27===t.which&&sr.toggleMenu.call(r,t)})),i.bind(e.inputs.seek,"mousedown mousemove",(function(t){var r=e.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/r.width*(t.pageX-r.left))})),i.bind(e.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(t){var e=t.currentTarget,i=t.keyCode?t.keyCode:t.which,n="play-on-seeked";if(!it(t)||39===i||37===i){r.lastSeekTime=Date.now();var o=e.hasAttribute(n),a=["mouseup","touchend","keyup"].includes(t.type);o&&a?(e.removeAttribute(n),Rt(r.play())):!a&&r.playing&&(e.setAttribute(n,""),r.pause())}})),pt.isIos){var o=zt.call(r,'input[type="range"]');Array.from(o).forEach((function(t){return i.bind(t,n,(function(t){return st(t.target)}))}))}i.bind(e.inputs.seek,n,(function(t){var e=t.currentTarget,i=e.getAttribute("seek-value");at(i)&&(i=e.value),e.removeAttribute("seek-value"),r.currentTime=i/e.max*r.duration}),"seek"),i.bind(e.progress,"mouseenter mouseleave mousemove",(function(t){return sr.updateSeekTooltip.call(r,t)})),i.bind(e.progress,"mousemove touchmove",(function(t){var e=r.previewThumbnails;e&&e.loaded&&e.startMove(t)})),i.bind(e.progress,"mouseleave touchend click",(function(){var t=r.previewThumbnails;t&&t.loaded&&t.endMove(!1,!0)})),i.bind(e.progress,"mousedown touchstart",(function(t){var e=r.previewThumbnails;e&&e.loaded&&e.startScrubbing(t)})),i.bind(e.progress,"mouseup touchend",(function(t){var e=r.previewThumbnails;e&&e.loaded&&e.endScrubbing(t)})),pt.isWebkit&&Array.from(zt.call(r,'input[type="range"]')).forEach((function(t){i.bind(t,"input",(function(t){return sr.updateRangeFill.call(r,t.target)}))})),r.config.toggleInvert&&!rt(e.display.duration)&&i.bind(e.display.currentTime,"click",(function(){0!==r.currentTime&&(r.config.invertTime=!r.config.invertTime,sr.timeUpdate.call(r))})),i.bind(e.inputs.volume,n,(function(t){r.volume=t.target.value}),"volume"),i.bind(e.controls,"mouseenter mouseleave",(function(t){e.controls.hover=!r.touch&&"mouseenter"===t.type})),e.fullscreen&&Array.from(e.fullscreen.children).filter((function(t){return!t.contains(e.container)})).forEach((function(t){i.bind(t,"mouseenter mouseleave",(function(t){e.controls.hover=!r.touch&&"mouseenter"===t.type}))})),i.bind(e.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){e.controls.pressed=["mousedown","touchstart"].includes(t.type)})),i.bind(e.controls,"focusin",(function(){var t=r.config,n=r.timers;wt(e.controls,t.classNames.noTransition,!0),_r.toggleControls.call(r,!0),setTimeout((function(){wt(e.controls,t.classNames.noTransition,!1)}),0);var o=i.touch?3e3:4e3;clearTimeout(n.controls),n.controls=setTimeout((function(){return _r.toggleControls.call(r,!1)}),o)})),i.bind(e.inputs.volume,"wheel",(function(e){var i=e.webkitDirectionInvertedFromDevice,n=[e.deltaX,-e.deltaY].map((function(t){return i?-t:t})),o=t(n,2),a=o[0],l=o[1],s=Math.sign(Math.abs(a)>Math.abs(l)?a:l);r.increaseVolume(s/50);var p=r.media.volume;(1===s&&p<1||-1===s&&p>0)&&e.preventDefault()}),"volume",!1)})),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return i(r,[{key:"handleKey",value:function(t){var r=this.player,e=r.elements,i=t.keyCode?t.keyCode:t.which,n="keydown"===t.type,o=n&&i===this.lastKey;if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&W(i))if(n){var a=document.activeElement;if(rt(a)){if(a!==e.inputs.seek&&xt(a,r.config.selectors.editable))return;if(32===t.which&&xt(a,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(t.preventDefault(),t.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:o||(r.currentTime=r.duration/10*(i-48));break;case 32:case 75:o||Rt(r.togglePlay());break;case 38:r.increaseVolume(.1);break;case 40:r.decreaseVolume(.1);break;case 77:o||(r.muted=!r.muted);break;case 39:r.forward();break;case 37:r.rewind();break;case 70:r.fullscreen.toggle();break;case 67:o||r.toggleCaptions();break;case 76:r.loop=!r.loop}27===i&&!r.fullscreen.usingNative&&r.fullscreen.active&&r.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}},{key:"toggleMenu",value:function(t){sr.toggleMenu.call(this.player,t)}}]),r}(),br=function(t,r){return function(t){t.exports=function(){var t=function(){},r={},e={},i={};function n(t,r){if(t){var n=i[t];if(e[t]=r,n)for(;n.length;)n[0](t,r),n.splice(0,1)}}function o(r,e){r.call&&(r={success:r}),e.length?(r.error||t)(e):(r.success||t)(r)}function a(r,e,i,n){var o,l,s=document,p=i.async,u=(i.numRetries||0)+1,c=i.before||t,d=r.replace(/[\?|#].*$/,""),h=r.replace(/^(css|img)!/,"");n=n||0,/(^css!|\.css$)/.test(d)?((l=s.createElement("link")).rel="stylesheet",l.href=h,(o="hideFocus"in l)&&l.relList&&(o=0,l.rel="preload",l.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(d)?(l=s.createElement("img")).src=h:((l=s.createElement("script")).src=r,l.async=void 0===p||p),l.onload=l.onerror=l.onbeforeload=function(t){var s=t.type[0];if(o)try{l.sheet.cssText.length||(s="e")}catch(t){18!=t.code&&(s="e")}if("e"==s){if((n+=1)<u)return a(r,e,i,n)}else if("preload"==l.rel&&"style"==l.as)return l.rel="stylesheet";e(r,s,t.defaultPrevented)},!1!==c(r,l)&&s.head.appendChild(l)}function l(t,r,e){var i,n,o=(t=t.push?t:[t]).length,l=o,s=[];for(i=function(t,e,i){if("e"==e&&s.push(t),"b"==e){if(!i)return;s.push(t)}--o||r(s)},n=0;n<l;n++)a(t[n],i,e)}function s(t,e,i){var a,s;if(e&&e.trim&&(a=e),s=(a?i:e)||{},a){if(a in r)throw"LoadJS";r[a]=!0}function p(r,e){l(t,(function(t){o(s,t),r&&o({success:r,error:e},t),n(a,t)}),s)}if(s.returnPromise)return new Promise(p);p()}return s.ready=function(t,r){return function(t,r){var n,o,a,l=[],s=(t=t.push?t:[t]).length,p=s;for(n=function(t,e){e.length&&l.push(t),--p||r(l)};s--;)(a=e[o=t[s]])?n(o,a):(i[o]=i[o]||[]).push(n)}(t,(function(t){o(r,t)})),s},s.done=function(t){n(t,[])},s.reset=function(){r={},e={},i={}},s.isDefined=function(t){return t in r},s}()}(r={exports:{}}),r.exports}();function wr(t){return new Promise((function(r,e){br(t,{success:r,error:e})}))}function kr(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Et.call(this,this.media,t?"play":"pause"))}var xr={setup:function(){var t=this;wt(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,$t.call(t),J(window.Vimeo)?xr.ready.call(t):wr(t.config.urls.vimeo.sdk).then((function(){xr.ready.call(t)})).catch((function(r){t.debug.warn("Vimeo SDK (player.js) failed to load",r)}))},ready:function(){var e=this,i=this,n=i.config.vimeo,o=n.premium,a=n.referrerPolicy,s=l(n,f);o&&Object.assign(s,{controls:!1,sidedock:!1});var p=ur(r({loop:i.config.loop.active,autoplay:i.autoplay,muted:i.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},s)),u=i.media.getAttribute("src");at(u)&&(u=i.media.getAttribute(i.config.attributes.embed.id));var c=function(t){return at(t)?null:W(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(u),d=yt("iframe"),h=Wt(i.config.urls.vimeo.iframe,c,p);if(d.setAttribute("src",h),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),at(a)||d.setAttribute("referrerPolicy",a),o||!n.customControls)d.setAttribute("data-poster",i.poster),i.media=_t(d,i.media);else{var y=yt("div",{class:i.config.classNames.embedContainer,"data-poster":i.poster});y.appendChild(d),i.media=_t(y,i.media)}n.customControls||ir(Wt(i.config.urls.vimeo.api,h)).then((function(t){!at(t)&&t.thumbnail_url&&_r.setPoster.call(i,t.thumbnail_url).catch((function(){}))})),i.embed=new window.Vimeo.Player(d,{autopause:i.config.autopause,muted:i.muted}),i.media.paused=!0,i.media.currentTime=0,i.supported.ui&&i.embed.disableTextTrack(),i.media.play=function(){return kr.call(i,!0),i.embed.play()},i.media.pause=function(){return kr.call(i,!1),i.embed.pause()},i.media.stop=function(){i.pause(),i.currentTime=0};var v=i.media.currentTime;Object.defineProperty(i.media,"currentTime",{get:function(){return v},set:function(t){var r=i.embed,e=i.media,n=i.volume,o=i.paused&&!r.hasPlayed;e.seeking=!0,Et.call(i,e,"seeking"),Promise.resolve(o&&r.setVolume(0)).then((function(){return r.setCurrentTime(t)})).then((function(){return o&&r.pause()})).then((function(){return o&&r.setVolume(n)})).catch((function(){}))}});var g=i.config.speed.selected;Object.defineProperty(i.media,"playbackRate",{get:function(){return g},set:function(t){i.embed.setPlaybackRate(t).then((function(){g=t,Et.call(i,i.media,"ratechange")})).catch((function(){i.options.speed=[1]}))}});var _=i.config.volume;Object.defineProperty(i.media,"volume",{get:function(){return _},set:function(t){i.embed.setVolume(t).then((function(){_=t,Et.call(i,i.media,"volumechange")}))}});var m=i.config.muted;Object.defineProperty(i.media,"muted",{get:function(){return m},set:function(t){var r=!!K(t)&&t;i.embed.setVolume(r?0:i.config.volume).then((function(){m=r,Et.call(i,i.media,"volumechange")}))}});var b,w=i.config.loop;Object.defineProperty(i.media,"loop",{get:function(){return w},set:function(t){var r=K(t)?t:i.config.loop.active;i.embed.setLoop(r).then((function(){w=r}))}}),i.embed.getVideoUrl().then((function(t){b=t,sr.setDownloadUrl.call(i)})).catch((function(t){e.debug.warn(t)})),Object.defineProperty(i.media,"currentSrc",{get:function(){return b}}),Object.defineProperty(i.media,"ended",{get:function(){return i.currentTime===i.duration}}),Promise.all([i.embed.getVideoWidth(),i.embed.getVideoHeight()]).then((function(r){var n=t(r,2);i.embed.ratio=Qt(n[0],n[1]),$t.call(e)})),i.embed.setAutopause(i.config.autopause).then((function(t){i.config.autopause=t})),i.embed.getVideoTitle().then((function(t){i.config.title=t,_r.setTitle.call(e)})),i.embed.getCurrentTime().then((function(t){v=t,Et.call(i,i.media,"timeupdate")})),i.embed.getDuration().then((function(t){i.media.duration=t,Et.call(i,i.media,"durationchange")})),i.embed.getTextTracks().then((function(t){i.media.textTracks=t,cr.setup.call(i)})),i.embed.on("cuechange",(function(t){var r=t.cues,e=(void 0===r?[]:r).map((function(t){return function(t){var r=document.createDocumentFragment(),e=document.createElement("div");return r.appendChild(e),e.innerHTML=t,r.firstChild.innerText}(t.text)}));cr.updateCues.call(i,e)})),i.embed.on("loaded",(function(){i.embed.getPaused().then((function(t){kr.call(i,!t),t||Et.call(i,i.media,"playing")})),rt(i.embed.element)&&i.supported.ui&&i.embed.element.setAttribute("tabindex",-1)})),i.embed.on("bufferstart",(function(){Et.call(i,i.media,"waiting")})),i.embed.on("bufferend",(function(){Et.call(i,i.media,"playing")})),i.embed.on("play",(function(){kr.call(i,!0),Et.call(i,i.media,"playing")})),i.embed.on("pause",(function(){kr.call(i,!1)})),i.embed.on("timeupdate",(function(t){i.media.seeking=!1,v=t.seconds,Et.call(i,i.media,"timeupdate")})),i.embed.on("progress",(function(t){i.media.buffered=t.percent,Et.call(i,i.media,"progress"),1===parseInt(t.percent,10)&&Et.call(i,i.media,"canplaythrough"),i.embed.getDuration().then((function(t){t!==i.media.duration&&(i.media.duration=t,Et.call(i,i.media,"durationchange"))}))})),i.embed.on("seeked",(function(){i.media.seeking=!1,Et.call(i,i.media,"seeked")})),i.embed.on("ended",(function(){i.media.paused=!0,Et.call(i,i.media,"ended")})),i.embed.on("error",(function(t){i.media.error=t,Et.call(i,i.media,"error")})),n.customControls&&setTimeout((function(){return _r.build.call(i)}),0)}};function zr(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Et.call(this,this.media,t?"play":"pause"))}function jr(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Tr,Pr,Or,Sr,Cr,Ir,Mr={setup:function(){var t=this;if(wt(this.elements.wrapper,this.config.classNames.embed,!0),J(window.YT)&&X(window.YT.Player))Mr.ready.call(this);else{var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){X(r)&&r(),Mr.ready.call(t)},wr(this.config.urls.youtube.sdk).catch((function(r){t.debug.warn("YouTube API failed to load",r)}))}},getTitle:function(t){var r=this;ir(Wt(this.config.urls.youtube.api,t)).then((function(t){if(J(t)){var e=t.height,i=t.width;r.config.title=t.title,_r.setTitle.call(r),r.embed.ratio=Qt(i,e)}$t.call(r)})).catch((function(){$t.call(r)}))},ready:function(){var t=this,r=t.config.youtube,e=t.media&&t.media.getAttribute("id");if(at(e)||!e.startsWith("youtube-")){var i=t.media.getAttribute("src");at(i)&&(i=t.media.getAttribute(this.config.attributes.embed.id));var n=function(t){return at(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(i),o=yt("div",{id:Jt(t.provider),"data-poster":r.customControls?t.poster:void 0});if(t.media=_t(o,t.media),r.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(n,"/").concat(t,"default.jpg")};gr(a("maxres"),121).catch((function(){return gr(a("sd"),121)})).catch((function(){return gr(a("hq"))})).then((function(r){return _r.setPoster.call(t,r.src)})).then((function(r){r.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:n,host:jr(r),playerVars:ct({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&r.customControls?0:1,disablekb:1,playsinline:t.config.fullscreen.iosNative?0:1,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},r),events:{onError:function(r){if(!t.media.error){var e=r.data;t.media.error={code:e,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[e]||"An unknown error occured"},Et.call(t,t.media,"error")}},onPlaybackRateChange:function(r){t.media.playbackRate=r.target.getPlaybackRate(),Et.call(t,t.media,"ratechange")},onReady:function(e){if(!X(t.media.play)){var i=e.target;Mr.getTitle.call(t,n),t.media.play=function(){zr.call(t,!0),i.playVideo()},t.media.pause=function(){zr.call(t,!1),i.pauseVideo()},t.media.stop=function(){i.stopVideo()},t.media.duration=i.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(r){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,Et.call(t,t.media,"seeking"),i.seekTo(r)}}),Object.defineProperty(t.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(t){i.setPlaybackRate(t)}});var o=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return o},set:function(r){i.setVolume(100*(o=r)),Et.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(r){var e=K(r)?r:a;a=e,i[e?"mute":"unMute"](),i.setVolume(100*o),Et.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}});var l=i.getAvailablePlaybackRates();t.options.speed=l.filter((function(r){return t.config.speed.options.includes(r)})),t.supported.ui&&r.customControls&&t.media.setAttribute("tabindex",-1),Et.call(t,t.media,"timeupdate"),Et.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval((function(){t.media.buffered=i.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&Et.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),Et.call(t,t.media,"canplaythrough"))}),200),r.customControls&&setTimeout((function(){return _r.build.call(t)}),50)}},onStateChange:function(e){var i=e.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(e.data)&&(t.media.seeking=!1,Et.call(t,t.media,"seeked")),e.data){case-1:Et.call(t,t.media,"timeupdate"),t.media.buffered=i.getVideoLoadedFraction(),Et.call(t,t.media,"progress");break;case 0:zr.call(t,!1),t.media.loop?(i.stopVideo(),i.playVideo()):Et.call(t,t.media,"ended");break;case 1:r.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(zr.call(t,!0),Et.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){Et.call(t,t.media,"timeupdate")}),50),t.media.duration!==i.getDuration()&&(t.media.duration=i.getDuration(),Et.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),zr.call(t,!1);break;case 3:Et.call(t,t.media,"waiting")}Et.call(t,t.elements.container,"statechange",!1,{code:e.data})}}})}}},Ar={setup:function(){this.media?(wt(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),wt(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&wt(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=yt("div",{class:this.config.classNames.video}),dt(this.media,this.elements.wrapper),this.elements.poster=yt("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Yt.setup.call(this):this.isYouTube?Mr.setup.call(this):this.isVimeo&&xr.setup.call(this)):this.debug.warn("No media element found!")}},Er=function(){function t(r){var e=this;o(this,t),v(this,"load",(function(){e.enabled&&(J(window.google)&&J(window.google.ima)?e.ready():wr(e.player.config.urls.googleIMA.sdk).then((function(){e.ready()})).catch((function(){e.trigger("error",new Error("Google IMA SDK failed to load"))})))})),v(this,"ready",(function(){var t;e.enabled||((t=e).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),e.startSafetyTimer(12e3,"ready()"),e.managerPromise.then((function(){e.clearSafetyTimer("onAdsManagerLoaded()")})),e.listeners(),e.setupIMA()})),v(this,"setupIMA",(function(){e.elements.container=yt("div",{class:e.player.config.classNames.ads}),e.player.elements.container.appendChild(e.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(e.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(e.player.config.playsinline),e.elements.displayContainer=new google.ima.AdDisplayContainer(e.elements.container,e.player.media),e.loader=new google.ima.AdsLoader(e.elements.displayContainer),e.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return e.onAdsManagerLoaded(t)}),!1),e.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)}),!1),e.requestAds()})),v(this,"requestAds",(function(){var t=e.player.elements.container;try{var r=new google.ima.AdsRequest;r.adTagUrl=e.tagUrl,r.linearAdSlotWidth=t.offsetWidth,r.linearAdSlotHeight=t.offsetHeight,r.nonLinearAdSlotWidth=t.offsetWidth,r.nonLinearAdSlotHeight=t.offsetHeight,r.forceNonLinearFullSlot=!1,r.setAdWillPlayMuted(!e.player.muted),e.loader.requestAds(r)}catch(t){e.onAdError(t)}})),v(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(e.countdownTimer),void e.elements.container.removeAttribute("data-badge-text");e.countdownTimer=setInterval((function(){var t=lr(Math.max(e.manager.getRemainingTime(),0)),r="".concat(rr("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",r)}),100)})),v(this,"onAdsManagerLoaded",(function(t){if(e.enabled){var r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0,e.manager=t.getAdsManager(e.player,r),e.cuePoints=e.manager.getCuePoints(),e.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){e.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return e.onAdEvent(t)}))})),e.trigger("loaded")}})),v(this,"addCuePoints",(function(){at(e.cuePoints)||e.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<e.player.duration){var r=e.player.elements.progress;if(rt(r)){var i=100/e.player.duration*t,n=yt("span",{class:e.player.config.classNames.cues});n.style.left="".concat(i.toString(),"%"),r.appendChild(n)}}}))})),v(this,"onAdEvent",(function(t){var r=e.player.elements.container,i=t.getAd(),n=t.getAdData();switch(function(t){Et.call(e.player,e.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:e.trigger("loaded"),e.pollCountdown(!0),i.isLinear()||(i.width=r.offsetWidth,i.height=r.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:e.manager.setVolume(e.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:e.player.ended?e.loadAds():e.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:e.pollCountdown(),e.resumeContent();break;case google.ima.AdEvent.Type.LOG:n.adError&&e.player.debug.warn("Non-fatal ad error: ".concat(n.adError.getMessage()))}})),v(this,"onAdError",(function(t){e.cancel(),e.player.debug.warn("Ads error",t)})),v(this,"listeners",(function(){var t,r=e.player.elements.container;e.player.on("canplay",(function(){e.addCuePoints()})),e.player.on("ended",(function(){e.loader.contentComplete()})),e.player.on("timeupdate",(function(){t=e.player.currentTime})),e.player.on("seeked",(function(){var r=e.player.currentTime;at(e.cuePoints)||e.cuePoints.forEach((function(i,n){t<i&&i<r&&(e.manager.discardAdBreak(),e.cuePoints.splice(n,1))}))})),window.addEventListener("resize",(function(){e.manager&&e.manager.resize(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL)}))})),v(this,"play",(function(){var t=e.player.elements.container;e.managerPromise||e.resumeContent(),e.managerPromise.then((function(){e.manager.setVolume(e.player.volume),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(){}))})),v(this,"resumeContent",(function(){e.elements.container.style.zIndex="",e.playing=!1,Rt(e.player.media.play())})),v(this,"pauseContent",(function(){e.elements.container.style.zIndex=3,e.playing=!0,e.player.media.pause()})),v(this,"cancel",(function(){e.initialized&&e.resumeContent(),e.trigger("error"),e.loadAds()})),v(this,"loadAds",(function(){e.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.initialized=!1,e.requestAds()})).catch((function(){}))})),v(this,"trigger",(function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];var o=e.events[t];Z(o)&&o.forEach((function(t){X(t)&&t.apply(e,i)}))})),v(this,"on",(function(t,r){return Z(e.events[t])||(e.events[t]=[]),e.events[t].push(r),e})),v(this,"startSafetyTimer",(function(t,r){e.player.debug.log("Safety timer invoked from: ".concat(r)),e.safetyTimer=setTimeout((function(){e.cancel(),e.clearSafetyTimer("startSafetyTimer()")}),t)})),v(this,"clearSafetyTimer",(function(t){Y(e.safetyTimer)||(e.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(e.safetyTimer),e.safetyTimer=null)})),this.player=r,this.config=r.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(t,r){e.on("loaded",t),e.on("error",r)})),this.load()}return i(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!at(t.publisherId)||ot(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return ot(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(ur({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId}))}}]),t}(),Fr=function(r){var e=[];return r.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(r){var i={};r.split(/\r\n|\n|\r/).forEach((function(r){if(W(i.startTime)){if(!at(r.trim())&&at(i.text)){var e,n,o,a=r.trim().split("#xywh=");e=t(a,1),i.text=e[0],a[1]&&(n=a[1].split(","),o=t(n,4),i.x=o[0],i.y=o[1],i.w=o[2],i.h=o[3])}}else{var l=r.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);l&&(i.startTime=60*Number(l[1]||0)*60+60*Number(l[2])+Number(l[3])+Number("0.".concat(l[4])),i.endTime=60*Number(l[6]||0)*60+60*Number(l[7])+Number(l[8])+Number("0.".concat(l[9])))}})),i.text&&e.push(i)})),e},Nr=function(t,r){var e={};return t>r.width/r.height?(e.width=r.width,e.height=1/t*r.width):(e.height=r.height,e.width=t*r.height),e},Rr=function(){function t(r){var e=this;o(this,t),v(this,"load",(function(){e.player.elements.display.seekTooltip&&(e.player.elements.display.seekTooltip.hidden=e.enabled),e.enabled&&e.getThumbnails().then((function(){e.enabled&&(e.render(),e.determineContainerAutoSizing(),e.loaded=!0)}))})),v(this,"getThumbnails",(function(){return new Promise((function(t){var r=e.player.config.previewThumbnails.src;if(at(r))throw new Error("Missing previewThumbnails.src config attribute");var i=function(){e.thumbnails.sort((function(t,r){return t.height-r.height})),e.player.debug.log("Preview thumbnails",e.thumbnails),t()};if(X(r))r((function(t){e.thumbnails=t,i()}));else{var n=(G(r)?[r]:r).map((function(t){return e.getThumbnail(t)}));Promise.all(n).then(i)}}))})),v(this,"getThumbnail",(function(t){return new Promise((function(r){ir(t).then((function(i){var n={frames:Fr(i),height:null,urlPrefix:""};n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));var o=new Image;o.onload=function(){n.height=o.naturalHeight,n.width=o.naturalWidth,e.thumbnails.push(n),r()},o.src=n.urlPrefix+n.frames[0].text}))}))})),v(this,"startMove",(function(t){if(e.loaded&&et(t)&&["touchmove","mousemove"].includes(t.type)&&e.player.media.duration){if("touchmove"===t.type)e.seekTime=e.player.media.duration*(e.player.elements.inputs.seek.value/100);else{var r=e.player.elements.progress.getBoundingClientRect();e.seekTime=e.player.media.duration*(100/r.width*(t.pageX-r.left)/100),e.seekTime<0&&(e.seekTime=0),e.seekTime>e.player.media.duration-1&&(e.seekTime=e.player.media.duration-1),e.mousePosX=t.pageX,e.elements.thumb.time.innerText=lr(e.seekTime)}e.showImageAtCurrentTime()}})),v(this,"endMove",(function(){e.toggleThumbContainer(!1,!0)})),v(this,"startScrubbing",(function(t){(Y(t.button)||!1===t.button||0===t.button)&&(e.mouseDown=!0,e.player.media.duration&&(e.toggleScrubbingContainer(!0),e.toggleThumbContainer(!1,!0),e.showImageAtCurrentTime()))})),v(this,"endScrubbing",(function(){e.mouseDown=!1,Math.ceil(e.lastTime)===Math.ceil(e.player.media.currentTime)?e.toggleScrubbingContainer(!1):At.call(e.player,e.player.media,"timeupdate",(function(){e.mouseDown||e.toggleScrubbingContainer(!1)}))})),v(this,"listeners",(function(){e.player.on("play",(function(){e.toggleThumbContainer(!1,!0)})),e.player.on("seeked",(function(){e.toggleThumbContainer(!1)})),e.player.on("timeupdate",(function(){e.lastTime=e.player.media.currentTime}))})),v(this,"render",(function(){e.elements.thumb.container=yt("div",{class:e.player.config.classNames.previewThumbnails.thumbContainer}),e.elements.thumb.imageContainer=yt("div",{class:e.player.config.classNames.previewThumbnails.imageContainer}),e.elements.thumb.container.appendChild(e.elements.thumb.imageContainer);var t=yt("div",{class:e.player.config.classNames.previewThumbnails.timeContainer});e.elements.thumb.time=yt("span",{},"00:00"),t.appendChild(e.elements.thumb.time),e.elements.thumb.container.appendChild(t),rt(e.player.elements.progress)&&e.player.elements.progress.appendChild(e.elements.thumb.container),e.elements.scrubbing.container=yt("div",{class:e.player.config.classNames.previewThumbnails.scrubbingContainer}),e.player.elements.wrapper.appendChild(e.elements.scrubbing.container)})),v(this,"destroy",(function(){e.elements.thumb.container&&e.elements.thumb.container.remove(),e.elements.scrubbing.container&&e.elements.scrubbing.container.remove()})),v(this,"showImageAtCurrentTime",(function(){e.mouseDown?e.setScrubbingContainerSize():e.setThumbContainerSizeAndPos();var t=e.thumbnails[0].frames.findIndex((function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime})),r=t>=0,i=0;e.mouseDown||e.toggleThumbContainer(r),r&&(e.thumbnails.forEach((function(r,n){e.loadedImages.includes(r.frames[t].text)&&(i=n)})),t!==e.showingThumb&&(e.showingThumb=t,e.loadImage(i)))})),v(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=e.showingThumb,i=e.thumbnails[t],n=i.urlPrefix,o=i.frames[r],a=i.frames[r].text,l=n+a;if(e.currentImageElement&&e.currentImageElement.dataset.filename===a)e.showImage(e.currentImageElement,o,t,r,a,!1),e.currentImageElement.dataset.index=r,e.removeOldImages(e.currentImageElement);else{e.loadingImage&&e.usingSprites&&(e.loadingImage.onload=null);var s=new Image;s.src=l,s.dataset.index=r,s.dataset.filename=a,e.showingThumbFilename=a,e.player.debug.log("Loading image: ".concat(l)),s.onload=function(){return e.showImage(s,o,t,r,a,!0)},e.loadingImage=s,e.removeOldImages(s)}})),v(this,"showImage",(function(t,r,i,n,o){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e.player.debug.log("Showing thumb: ".concat(o,". num: ").concat(n,". qual: ").concat(i,". newimg: ").concat(a)),e.setImageSizeAndOffset(t,r),a&&(e.currentImageContainer.appendChild(t),e.currentImageElement=t,e.loadedImages.includes(o)||e.loadedImages.push(o)),e.preloadNearby(n,!0).then(e.preloadNearby(n,!1)).then(e.getHigherQuality(i,t,r,o))})),v(this,"removeOldImages",(function(t){Array.from(e.currentImageContainer.children).forEach((function(r){if("img"===r.tagName.toLowerCase()){var i=e.usingSprites?500:1e3;if(r.dataset.index!==t.dataset.index&&!r.dataset.deleting){r.dataset.deleting=!0;var n=e.currentImageContainer;setTimeout((function(){n.removeChild(r),e.player.debug.log("Removing thumb: ".concat(r.dataset.filename))}),i)}}}))})),v(this,"preloadNearby",(function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(i){setTimeout((function(){var n=e.thumbnails[0].frames[t].text;if(e.showingThumbFilename===n){var o;o=r?e.thumbnails[0].frames.slice(t):e.thumbnails[0].frames.slice(0,t).reverse();var a=!1;o.forEach((function(t){var r=t.text;if(r!==n&&!e.loadedImages.includes(r)){a=!0,e.player.debug.log("Preloading thumb filename: ".concat(r));var o=e.thumbnails[0].urlPrefix+r,l=new Image;l.src=o,l.onload=function(){e.player.debug.log("Preloaded thumb filename: ".concat(r)),e.loadedImages.includes(r)||e.loadedImages.push(r),i()}}})),a||i()}}),300)}))})),v(this,"getHigherQuality",(function(t,r,i,n){if(t<e.thumbnails.length-1){var o=r.naturalHeight;e.usingSprites&&(o=i.h),o<e.thumbContainerHeight&&setTimeout((function(){e.showingThumbFilename===n&&(e.player.debug.log("Showing higher quality thumb for: ".concat(n)),e.loadImage(t+1))}),300)}})),v(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.player.config.classNames.previewThumbnails.thumbContainerShown;e.elements.thumb.container.classList.toggle(i,t),!t&&r&&(e.showingThumb=null,e.showingThumbFilename=null)})),v(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.player.config.classNames.previewThumbnails.scrubbingContainerShown;e.elements.scrubbing.container.classList.toggle(r,t),t||(e.showingThumb=null,e.showingThumbFilename=null)})),v(this,"determineContainerAutoSizing",(function(){(e.elements.thumb.imageContainer.clientHeight>20||e.elements.thumb.imageContainer.clientWidth>20)&&(e.sizeSpecifiedInCSS=!0)})),v(this,"setThumbContainerSizeAndPos",(function(){if(e.sizeSpecifiedInCSS){if(e.elements.thumb.imageContainer.clientHeight>20&&e.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(e.elements.thumb.imageContainer.clientHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(e.elements.thumb.imageContainer.clientHeight<20&&e.elements.thumb.imageContainer.clientWidth>20){var r=Math.floor(e.elements.thumb.imageContainer.clientWidth/e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(r,"px")}}else{var i=Math.floor(e.thumbContainerHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(e.thumbContainerHeight,"px"),e.elements.thumb.imageContainer.style.width="".concat(i,"px")}e.setThumbContainerPos()})),v(this,"setThumbContainerPos",(function(){var t=e.player.elements.progress.getBoundingClientRect(),r=e.player.elements.container.getBoundingClientRect(),i=e.elements.thumb.container,n=r.left-t.left+10,o=r.right-t.left-i.clientWidth-10,a=e.mousePosX-t.left-i.clientWidth/2;a<n&&(a=n),a>o&&(a=o),i.style.left="".concat(a,"px")})),v(this,"setScrubbingContainerSize",(function(){var t=Nr(e.thumbAspectRatio,{width:e.player.media.clientWidth,height:e.player.media.clientHeight}),r=t.height;e.elements.scrubbing.container.style.width="".concat(t.width,"px"),e.elements.scrubbing.container.style.height="".concat(r,"px")})),v(this,"setImageSizeAndOffset",(function(t,r){if(e.usingSprites){var i=e.thumbContainerHeight/r.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left="-".concat(r.x*i,"px"),t.style.top="-".concat(r.y*i,"px")}})),this.player=r,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return i(t,[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?Nr(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}]),t}(),Lr={insertElements:function(t,r){var e=this;G(r)?ft(t,this.media,{src:r}):Z(r)&&r.forEach((function(r){ft(t,e.media,r)}))},change:function(r){var e=this;ut(r,"sources.length")?(Yt.cancelRequests.call(this),this.destroy.call(this,(function(){e.options.quality=[],vt(e.media),e.media=null,rt(e.elements.container)&&e.elements.container.removeAttribute("class");var i=r.sources,n=r.type,o=t(i,1)[0],a=o.provider,l=void 0===a?hr.html5:a,s="html5"===l?n:"div",p="html5"===l?{}:{src:o.src};Object.assign(e,{provider:l,type:n,supported:Ot.check(n,l,e.config.playsinline),media:yt(s,p)}),e.elements.container.appendChild(e.media),K(r.autoplay)&&(e.config.autoplay=r.autoplay),e.isHTML5&&(e.config.crossorigin&&e.media.setAttribute("crossorigin",""),e.config.autoplay&&e.media.setAttribute("autoplay",""),at(r.poster)||(e.poster=r.poster),e.config.loop.active&&e.media.setAttribute("loop",""),e.config.muted&&e.media.setAttribute("muted",""),e.config.playsinline&&e.media.setAttribute("playsinline","")),_r.addStyleHook.call(e),e.isHTML5&&Lr.insertElements.call(e,"source",i),e.config.title=r.title,Ar.setup.call(e),e.isHTML5&&Object.keys(r).includes("tracks")&&Lr.insertElements.call(e,"track",r.tracks),(e.isHTML5||e.isEmbed&&!e.supported.ui)&&_r.build.call(e),e.isHTML5&&e.media.load(),at(r.previewThumbnails)||(Object.assign(e.config.previewThumbnails,r.previewThumbnails),e.previewThumbnails&&e.previewThumbnails.loaded&&(e.previewThumbnails.destroy(),e.previewThumbnails=null),e.config.previewThumbnails.enabled&&(e.previewThumbnails=new Rr(e))),e.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},qr=function(){function t(r,e){var i=this;if(o(this,t),v(this,"play",(function(){return X(i.media.play)?(i.ads&&i.ads.enabled&&i.ads.managerPromise.then((function(){return i.ads.play()})).catch((function(){return Rt(i.media.play())})),i.media.play()):null})),v(this,"pause",(function(){return i.playing&&X(i.media.pause)?i.media.pause():null})),v(this,"togglePlay",(function(t){return(K(t)?t:!i.playing)?i.play():i.pause()})),v(this,"stop",(function(){i.isHTML5?(i.pause(),i.restart()):X(i.media.stop)&&i.media.stop()})),v(this,"restart",(function(){i.currentTime=0})),v(this,"rewind",(function(t){i.currentTime-=W(t)?t:i.config.seekTime})),v(this,"forward",(function(t){i.currentTime+=W(t)?t:i.config.seekTime})),v(this,"increaseVolume",(function(t){i.volume=(i.media.muted?0:i.volume)+(W(t)?t:0)})),v(this,"decreaseVolume",(function(t){i.increaseVolume(-t)})),v(this,"airplay",(function(){Ot.airplay&&i.media.webkitShowPlaybackTargetPicker()})),v(this,"toggleControls",(function(t){if(i.supported.ui&&!i.isAudio){var r=kt(i.elements.container,i.config.classNames.hideControls),e=wt(i.elements.container,i.config.classNames.hideControls,void 0===t?void 0:!t);return e&&Z(i.config.controls)&&i.config.controls.includes("settings")&&!at(i.config.settings)&&sr.toggleMenu.call(i,!1),e!==r&&Et.call(i,i.media,e?"controlshidden":"controlsshown"),!e}return!1})),v(this,"on",(function(t,r){It.call(i,i.elements.container,t,r)})),v(this,"once",(function(t,r){At.call(i,i.elements.container,t,r)})),v(this,"off",(function(t,r){Mt(i.elements.container,t,r)})),v(this,"destroy",(function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i.ready){var e=function(){document.body.style.overflow="",i.embed=null,r?(Object.keys(i.elements).length&&(vt(i.elements.buttons.play),vt(i.elements.captions),vt(i.elements.controls),vt(i.elements.wrapper),i.elements.buttons.play=null,i.elements.captions=null,i.elements.controls=null,i.elements.wrapper=null),X(t)&&t()):(Ft.call(i),Yt.cancelRequests.call(i),_t(i.elements.original,i.elements.container),Et.call(i,i.elements.original,"destroyed",!0),X(t)&&t.call(i.elements.original),i.ready=!1,setTimeout((function(){i.elements=null,i.media=null}),200))};i.stop(),clearTimeout(i.timers.loading),clearTimeout(i.timers.controls),clearTimeout(i.timers.resized),i.isHTML5?(_r.toggleNativeControls.call(i,!0),e()):i.isYouTube?(clearInterval(i.timers.buffering),clearInterval(i.timers.playing),null!==i.embed&&X(i.embed.destroy)&&i.embed.destroy(),e()):i.isVimeo&&(null!==i.embed&&i.embed.unload().then(e),setTimeout(e,200))}})),v(this,"supports",(function(t){return Ot.mime.call(i,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Ot.touch,this.media=r,G(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||tt(this.media)||Z(this.media))&&(this.media=this.media[0]),this.config=ct({},dr,t.defaults,e||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(t){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new fr(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Ot),!Y(this.media)&&rt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Ot.check().api){var n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;var a=this.media.tagName.toLowerCase(),l=null,s=null;switch(a){case"div":if(l=this.media.querySelector("iframe"),rt(l)){if(s=pr(l.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?hr.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?hr.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=l,this.elements.container.className="",s.search.length){var p=["1","true"];p.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),p.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=p.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(at(this.provider)||!Object.values(hr).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=a,this.provider=hr.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Ot.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new mr(this),this.storage=new er(this),this.media.plyr=this,rt(this.elements.container)||(this.elements.container=yt("div",{tabindex:0}),dt(this.media,this.elements.container)),_r.migrateStyles.call(this),_r.addStyleHook.call(this),Ar.setup.call(this),this.config.debug&&It.call(this,this.elements.container,this.config.events.join(" "),(function(t){i.debug.log("event: ".concat(t.type))})),this.fullscreen=new vr(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&_r.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Er(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return Rt(i.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Rr(this))):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 i(t,[{key:"isHTML5",get:function(){return this.provider===hr.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===hr.youtube}},{key:"isVimeo",get:function(){return this.provider===hr.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{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",get:function(){return Number(this.media.currentTime)},set:function(t){if(this.duration){var r=W(t)&&t>0;this.media.currentTime=r?Math.min(t,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var t=this.media.buffered;return W(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var t=parseFloat(this.config.duration),r=(this.media||{}).duration,e=W(r)&&r!==1/0?r:0;return t||e}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var r=t;G(r)&&(r=Number(r)),W(r)||(r=this.storage.get("volume")),W(r)||(r=this.config.volume),r>1&&(r=1),r<0&&(r=0),this.config.volume=r,this.media.volume=r,!at(t)&&this.muted&&r>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var r=t;K(r)||(r=this.storage.get("muted")),K(r)||(r=this.config.muted),this.config.muted=r,this.media.muted=r}},{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",get:function(){return Number(this.media.playbackRate)},set:function(t){var r=this,e=null;W(t)&&(e=t),W(e)||(e=this.storage.get("speed")),W(e)||(e=this.config.speed.selected),e=function(){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),t)}(e,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=e,setTimeout((function(){r.media.playbackRate=e}),0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,a(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,a(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(t){var r=this.config.quality,e=this.options.quality;if(e.length){var i=[!at(t)&&Number(t),this.storage.get("quality"),r.selected,r.default].find(W),n=!0;if(!e.includes(i)){var o=qt(e,i);this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(o," instead")),i=o,n=!1}r.selected=i,this.media.quality=i,n&&this.storage.set({quality:i})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(t){var r=K(t)?t:this.config.loop.active;this.config.loop.active=r,this.media.loop=r}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){Lr.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return ot(t)?t:this.source},set:function(t){ot(t)&&(this.config.urls.download=t,sr.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(t){this.isVideo?_r.setPoster.call(this,t,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var t=Ht(Vt.call(this));return Z(t)?t.join(":"):t},set:function(t){this.isVideo?G(t)&&Ut(t)?(this.config.ratio=Ht(t),$t.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(t,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(t){var r=K(t)?t:this.config.autoplay;this.config.autoplay=r}},{key:"toggleCaptions",value:function(t){cr.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){cr.set.call(this,t,!1)}},{key:"language",get:function(){return(cr.getCurrentTrack.call(this)||{}).language},set:function(t){cr.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Ot.pip?at(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Ot.pip){var r=K(t)?t:!this.pip;X(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(r?"picture-in-picture":"inline"),X(this.media.requestPictureInPicture)&&(!this.pip&&r?this.media.requestPictureInPicture():this.pip&&!r&&document.exitPictureInPicture())}}}],[{key:"supported",value:function(t,r,e){return Ot.check(t,r,e)}},{key:"loadSprite",value:function(t,r){return nr(t,r)}},{key:"setup",value:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return G(r)?i=Array.from(document.querySelectorAll(r)):tt(r)?i=Array.from(r):Z(r)&&(i=r.filter(rt)),at(i)?null:i.map((function(r){return new t(r,e)}))}}]),t}();function Br(t){t.on("timeupdate",(function(){return function(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&null!==(e=r.mutedPreview)&&void 0!==e&&e.enabled||function(t){var r;0!==t.currentTime&&null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&localStorage.setItem("player-progress-".concat(Dr(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return Ur(t)})),t.on("loadeddata",(function(){return Ur(t)}))}function Dr(t){var r,e;return null==t||null===(r=t.config)||void 0===r||null===(e=r.blockAttributes)||void 0===e?void 0:e.id}function Ur(t){var r,e,i;if(null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&(null==t||null===(e=t.config)||void 0===e||null===(i=e.mutedPreview)||void 0===i||!i.enabled)){var n=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(Dr(t))))}(t);return t.hls&&n>=0&&t.hls.startLoad(n),t.duration&&(n=Math.min(n,t.duration)),!n||n<1?0:(t.currentTime=n,null!=t&&t.isVimeo&&setTimeout((function(){t.embed.setCurrentTime(n||0)}),0),n)}}qr.defaults=JSON.parse(JSON.stringify(dr));var Hr=(null===(Tr=window)||void 0===Tr||null===(Pr=Tr.prestoPlayer)||void 0===Pr||null===(Or=Pr.i18n)||void 0===Or?void 0:Or.hide_chapters)||"Hide Chapters",Vr=(null===(Sr=window)||void 0===Sr||null===(Cr=Sr.prestoPlayer)||void 0===Cr||null===(Ir=Cr.i18n)||void 0===Ir?void 0:Ir.show_chapters)||"Show Chapters";const $r='<button class="plyr__controls__item plyr__control" type="button" data-plyr="chapters">\n<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">\n <line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line>\n <line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line>\n <line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>\n</svg>\n<span class="label--pressed plyr__tooltip" role="tooltip">'.concat(Hr,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(Vr,"</span>\n</button>\n");var Qr,Yr,Jr;const Wr='\n<div class="presto-player-toc__wrapper">\n <div class="presto-player-toc__cover" data-player-toc-cover></div>\n <div class="presto-player-toc">\n <div class="presto-player-toc__title">'.concat((null===(Qr=window)||void 0===Qr||null===(Yr=Qr.prestoPlayer)||void 0===Yr||null===(Jr=Yr.i18n)||void 0===Jr?void 0:Jr.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function Gr(t){var r,e,i,o,l,s,p,u,c,d,h,y,f,v=0,g={},_=null,m=0;if(i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return t;var r={};return t.forEach((function(t){var e,i=t.time.split(":");i.length>1&&(e=60*parseInt(i[0])),r[parseInt(i[1])+parseInt(e)]=t})),r}((null===(r=o=t.detail.plyr)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.chapters)||[]),"html5"!==o.provider||o.duration){if(i&&Object.keys(i).length){l=jQuery(o.elements.container).closest(".presto-player__wrapper").find(".plyr");var b=(f=jQuery(o.elements.controls)).find(".plyr__time");b=b.length?b:f.find(".plyr__progress__container"),(c=l.find('[data-plyr="chapters"]')).length||(c=jQuery($r).insertAfter(b)),(p=l.find(".presto-player-toc__wrapper")).length||(p=jQuery(Wr).appendTo(l)),d=p.find("[data-player-toc-cover]"),u=p.find("[data-player-toc]"),s=l.find(".plyr__progress__container");var w,k=jQuery('<div class="presto-player__chapters"></div>').appendTo(s);h=jQuery('<div class="presto-player__chapter-markers"></div>').appendTo(k),w=0,u.find(".presto-player-toc__chapter").length||(Object.keys(i).forEach((function(t){w++;var r=jQuery(function(t){var r=t.name,e=void 0===r?"Untitled":r,i=t.order,n=void 0===i?1:i,o=t.highlight;return'<div class="presto-player-toc__chapter '.concat(void 0!==o&&o?"is-highlighted":"",'" data-chapter-item>\n \n <span class="presto-player-toc__order">\n ').concat(n,'\n </span>\n <span class="presto-player-toc__name">\n ').concat(e,"\n </div>\n</div>")}({name:i[t].title,order:w})).appendTo(u);r.data("presto-player-timestamp",t),g[t]=r,r.on("click",(function(){o.currentTime=parseFloat(t),o.play(),j(!1)}))})),y=p.find("[data-chapter-item]")),z(),c.off("click"),c.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),_=window.setInterval((function(){m++,o.duration&&(z(),window.clearInterval(_)),m>50&&window.clearInterval(_)}),100),d.off("click"),d.on("click",(function(){return j(!1)})),u.off("mouseleave"),u.on("mouseleave",(function t(){if(o.playing){var r=setTimeout((function(){j(!1),u.off("mouseleave",t)}),2e3);u.on("mouseenter",(function(){clearTimeout(r)}))}}))}}else o.on("loadedmetadata",Gr);function x(){v=o.currentTime;var t=Object.keys(i).filter((function(t){return t<=v})).map((function(t){return parseInt(t,10)})),r=Math.max.apply(Math,a(t));y&&y.removeClass("is-highlighted"),jQuery(g[r||0]).addClass("is-highlighted")}function z(){o.duration&&(Object.keys(i).forEach((function(t){if(parseInt(t)&&!h.find("[data-timestamp=".concat(t,"]")).length){var r,e,n,a,l=i[t],s=parseInt(t)/o.duration*100,p=jQuery((r={position:s,name:"".concat(l.title)},e=r.position,n=r.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===e?0:e,'%" data-timeline-marker>\n <span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(a,"</span>\n </div>"))).prependTo(h);p.attr("data-timestamp",t),p.data("timestamp",t),p.on("click",(function(){o.currentTime=parseInt(t),o.play()}))}})),p.find("[data-timeline-marker]"))}function j(t){void 0!==n(t)?p.toggleClass("is-showing",t):p.toggleClass("is-showing")}}var Kr;function Xr(t){Kr=t,jQuery(Kr.elements.container).closest(".presto-player__wrapper"),Kr.on("ready",Gr),Kr.on("controlshidden",Zr),Kr.on("controlsshown",te)}function Zr(t){var r,e,i;jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function te(t){var r,e,i;jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function re(t){var e,i;return r(r(r({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}function ee(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasPlayed||(t.config.hasPlayed=!0,null===(e=window)||void 0===e||e.gtag("event","Play",re(t)))}function ie(t){var r;null===(r=window)||void 0===r||r.gtag("event","Pause",re(t))}function ne(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasLoaded||(t.config.hasLoaded=!0,null===(e=window)||void 0===e||e.gtag("event","Player Load",re(t)))}var oe,ae={25:!1,50:!1,75:!1,100:!1};function le(t){if(t.currentTime){var r=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(ae).forEach((function(e){var i;!ae[e]&&r>=parseInt(e)&&(ae[e]=!0,null===(i=window)||void 0===i||i.gtag("event","".concat(e," Percent Played"),re(t)))}))}}var se="presto-player.analytics",pe="";function ue(t){(oe=t).config.analytics&&(wp.hooks.hasAction("presto.nonceRefreshed",se)||wp.hooks.addAction("presto.nonceRefreshed",se,(function(t){pe=t})),wp.hooks.hasAction("presto.playerPlay",se)||wp.hooks.addAction("presto.playerPlay",se,ce),wp.hooks.hasAction("presto.playerEnded",se)||wp.hooks.addAction("presto.playerEnded",se,ce),wp.hooks.hasAction("presto.playerHidden",se)||wp.hooks.addAction("presto.playerHidden",se,ce),wp.hooks.hasAction("presto.playerPause",se)||wp.hooks.addAction("presto.playerPause",se,ce),wp.hooks.hasAction("presto.playerSeeked",se)||wp.hooks.addAction("presto.playerSeeked",se,ce))}function ce(t){de(function(t){var e,i;return r(r(r({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}(t))}function de(t){var r,e,i,n,o,a,l,s;if(pe){var p,u,c=new FormData;c.append("action","presto_player_progress"),c.append("duration",null==t?void 0:t.video_current_time),c.append("video_id",null===(r=oe)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.id),c.append("nonce",pe),null!==(i=window)&&void 0!==i&&null!==(n=i.prestoPlayer)&&void 0!==n&&n.debug_navigator?jQuery.ajax({type:"POST",url:null===(o=window)||void 0===o||null===(a=o.prestoPlayer)||void 0===a?void 0:a.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress",duration:null==t?void 0:t.video_current_time,video_id:null===(l=oe)||void 0===l||null===(s=l.config)||void 0===s?void 0:s.id,nonce:pe}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,c)}}function he(t){var r,e;null!==(r=window)&&void 0!==r&&null!==(e=r.prestoPlayer)&&void 0!==e&&e.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",ee),wp.hooks.addAction("presto.playerPause","presto-player",ie),wp.hooks.addAction("presto.playerReady","presto-player",ne),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",le))}(),ue(t))}const ye=function(t){t.on("ready",(function(){var r,e,i,n;null==t||null===(r=t.config)||void 0===r||!r.logo||null!=t&&null!==(e=t.config)&&void 0!==e&&e.logo_added||(jQuery('<img src="'.concat(null==t||null===(i=t.config)||void 0===i?void 0:i.logo,'" class="presto-player__logo is-bottom-right" part="logo">')).insertBefore(null==t||null===(n=t.elements)||void 0===n?void 0:n.controls),t.config.logo_added=!0)}))};function fe(t){var r;null!=t&&null!==(r=t.config)&&void 0!==r&&r.poster&&(t.poster=t.config.poster)}const ve=function(t){t.on("ready",(function(){ge("Ready",t)})),t.on("play",(function(){ge("Play",t)})),t.on("playing",(function(){ge("Playing",t)})),t.on("pause",(function(){ge("Pause",t)})),t.on("ended",(function(){ge("Ended",t)})),t.on("seeked",(function(){ge("Seeked",t)})),t.on("timeupdate",(function(){ge("TimeUpdate",t)})),t.on("enterfullscreen",(function(){ge("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){ge("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){ge("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(r){var e;switch(null==r||null===(e=r.detail)||void 0===e?void 0:e.code){case 0:ge("Ended",t);break;case 1:ge("Play",t);break;case 2:ge("Pause",t)}}))};function ge(t,r){window.wp.hooks.doAction("presto.player".concat(t),r)}let _e,me=Date.now();const be=t=>{var r,e;if(!t.automations)return;(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e?void 0:e.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{_e=t})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerTimeUpdate","presto-player",n),null===window||void 0===window||window.wp.hooks.addAction("presto.playerEnded","presto-player",(t=>n(t,100)));let i={0:!1,10:!1,20:!1,30:!1,40:!1,50:!1,60:!1,70:!1,80:!1,90:!1,100:!1};function n(t,r=null){var e;_e&&(null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.ajaxProgress)&&(r||(r=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(i).forEach((e=>{var i,n,o,a,l,s,p,u,c;const d=parseInt(e);if(!t.watched[d]&&r>=d){t.watched[d]=!0;let r=new FormData;if(r.append("action","presto_player_progress_percent"),r.append("id",null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.id),r.append("percent",d.toString()),r.append("visit_time",me.toString()),r.append("nonce",_e),(null===(n=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===n?void 0:n.debug)&&console.log(`${d} percent watched.`),null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug_navigator)window.jQuery.ajax({type:"POST",url:null===(u=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===u?void 0:u.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress_percent",id:null===(c=null==t?void 0:t.config)||void 0===c?void 0:c.id,visit_time:me,percent:d,nonce:_e}});else{let e=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,r);(null===(l=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===l?void 0:l.debug)&&(e?console.log("Successfully queued progress:",{id:null===(s=null==t?void 0:t.config)||void 0===s?void 0:s.id,percent:d,visit_time:me,nonce:_e}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:d,visit_time:me,nonce:_e}))}}})))}};let we=!1,ke=!1;function xe(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const ze=t=>{var r,e;(t.config.analytics||t.config.automations)&&(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e||e.addAction("presto.playerPlaying","presto-player",(()=>{null===window||void 0===window||window.wp.hooks.doAction("presto.playerGetNonce")})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerGetNonce","presto-player",(()=>{var t;we||ke||(ke=!0,fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`).then(xe).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),we=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{ke=!1})))})))},je=function(t){var r=window.navigator.userAgent;if(r.match(/iPad/i)||r.match(/iPhone/i)){var e=function(t,r){for(var e,i,n,o=null==t||null===(e=t.elements)||void 0===e||null===(i=e.container)||void 0===i||null===(n=i.getRootNode())||void 0===n?void 0:n.host;(null!=o?o.nodeType:void 0)===Node.ELEMENT_NODE&&"BODY"!==o.tagName&&"HTML"!==o.tagName;)r?o.classList.add("presto-player-fullscreen-open"):o.classList.remove("presto-player-fullscreen-open"),o=o.parentNode};wp.hooks.addAction("presto.playerEnterFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active&&e(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active||e(t,!1)}))}},Te=function(){var t=s(regeneratorRuntime.mark((function t(r){var e,i,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ResizeObserver"in window!=0){t.next=5;break}return t.next=3,import("./p-97e2763b.js");case 3:window.ResizeObserver=t.sent.ResizeObserver;case 5:if(n=new ResizeObserver((function(t){var r,e=p(t);try{for(e.s();!(r=e.n()).done;){var i=r.value,n=i.contentRect;jQuery(i.target).find(".plyr__menu__container").css({maxHeight:"".concat(n.height-48,"px")})}}catch(t){e.e(t)}finally{e.f()}})),null!=r&&null!==(e=r.elements)&&void 0!==e&&e.container){t.next=8;break}return t.abrupt("return");case 8:n.observe(null==r||null===(i=r.elements)||void 0===i?void 0:i.container),r.on("playing",(function(){var t,e,i=null==r||null===(t=r.elements)||void 0===t?void 0:t.container.getBoundingClientRect();jQuery(null==r||null===(e=r.elements)||void 0===e?void 0:e.container).find(".plyr__menu__container").css({maxHeight:"".concat(i.height-48,"px")})}));case 10:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();function Pe(t){var e,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r(r(r({},n),{iconUrl:"".concat(null===(e=window)||void 0===e||null===(i=e.prestoPlayer)||void 0===i?void 0:i.plugin_url,"img/sprite.svg")}),{chapters:(null==n?void 0:n.chapters)||[],controls:(null==n?void 0:n.controls)||[],settings:Object.keys((null==n?void 0:n.settings)||{}).length?n.settings:{}}),a=new qr(t,o);return"undefined"!=typeof learndash_video_data&&import("./p-5b5a31a5.js").then((function(t){(0,t.default)(a)})),"undefined"!=typeof _tutorobject&&import("./p-f0bc72f2.js").then((function(t){(0,t.default)(a)})),ve(a),je(a),Te(a),ye(a),fe(a),Xr(a),prestoPlayer.isAdmin||(ze(a),be(o),Br(a),he(a)),a}function Oe(t){return"string"==typeof t&&t.includes(".m3u8")}const Se=class{constructor(t){u(this,t),this.loaded=c(this,"loaded",7),this.isAdmin=!1,this.previouslyPlaying=!1}async play(){return this.shouldLazyLoad=!1,this.player.play()}async restart(){return this.shouldLazyLoad=!1,this.player.restart()}async pause(){return this.player.pause()}async stop(){return this.player.stop()}async fullscreenToggle(t){return this.player.fullscreen.toggle(t)}async on(t,r){return this.player.on(t,r)}async off(t,r){return this.player.off(t,r)}async handleCurrentTimeChange(t){this.player&&Number.isInteger(t)&&(this.player.duration&&(this.player.currentTime=Math.min(this.player.currentTime,this.player.duration)),this.shouldLazyLoad&&(this.shouldLazyLoad=!1,await new Promise((t=>{setTimeout((async()=>{await this.initialize(),t()}),50)}))),this.player.embed&&!this.player.playing?(this.player.currentTime=t,this.player.muted=!0,this.player.play(),this.player.once("timeupdate",(()=>{this.player.pause(),this.player.currentTime=t,this.player.muted=!1}))):this.player.currentTime=t)}handleStickyChange(){(function(t){for(var r=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)r.push(t=t.parentNode);return r})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:r,branding:e,src:i,analytics:n,automations:o,autoplay:a,blockAttributes:l={},provider:s="",provider_video_id:p="",youtube:u,type:c,isAdmin:d,i18n:h,storage:y={enabled:!d,key:`presto-player-${t.id}`}}){var f,v,g,_;const m=["settings"],b=[...["youtube","vimeo"].includes(s)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((r=>((null==t?void 0:t[r])||m.includes(r))&&!b.includes(r)));(null===(f=null==l?void 0:l.mutedPreview)||void 0===f?void 0:f.enabled)&&(y={enabled:!1});let k=Object.assign(Object.assign(Object.assign(Object.assign({id:null==l?void 0:l.id,title:(null==l?void 0:l.title)||"",blockAttributes:Object.assign(Object.assign({},l),{type:c}),src:i,ajaxProgress:!0,analytics:n,automations:o,mutedPreview:{enabled:null===(v=null==l?void 0:l.mutedPreview)||void 0===v?void 0:v.enabled},chapters:r,controls:w,settings:["captions","quality","loop",...(null==t?void 0:t.speed)?["speed"]:[]],hideControls:null==t?void 0:t.auto_hide,captions:{active:null==t?void 0:t.captions_enabled,language:"auto",update:!1},logo:null==e?void 0:e.logo,logo_width:null==e?void 0:e.logo_width,hide_logo:null==t?void 0:t.hide_logo,lazy_load_youtube:null==t?void 0:t.lazy_load_youtube,save_player_position:!!(null==t?void 0:t.save_player_position),sticky_scroll:null==t?void 0:t.sticky_scroll,play_video_viewport:null==t?void 0:t.play_video_viewport,autoplay:!(!a||(null===(g=window.wp)||void 0===g?void 0:g.blocks))},s?{provider:s}:{}),p?{provider_video_id:p}:{}),(null==l?void 0:l.poster)?{poster:l.poster}:{}),{invertTime:!t.hasOwnProperty("invert_time")||(null==t?void 0:t.invert_time),storage:y,resetOnEnd:!!(null==t?void 0:t.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==l?void 0:l.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==l?void 0:l.playsInline)},tooltips:{controls:!0,seek:!0},i18n:h});return(null===(_=null===window||void 0===window?void 0:window.wp)||void 0===_?void 0:_.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}({preset:this.preset,chapters:this.chapters,branding:this.branding,analytics:!!this.analytics,automations:!!this.automations,autoplay:!this.isAdmin&&!!this.autoplay,blockAttributes:this.blockAttributes,provider:this.provider,youtube:this.youtube,provider_video_id:this.provider_video_id,i18n:this.i18n})),this.iconUrl?{iconUrl:this.iconUrl}:{})}getPlayerData(){return{selector:this.playerEl,src:this.src||"",preload:this.preload,provider:this.provider,config:this.getConfig(),isAdmin:this.isAdmin}}async createPlayer(){return await(t=this.getPlayerData(),e=t.config,i=t.selector,n=t.src,o=t.preload,n&&Oe(n)?import("./p-1a099489.js").then((function(t){return(0,t.default)({config:e,selector:i,src:n,preload:o})})):new Promise((function(t){return t(new Pe(i,r({},e)))})));var t,e,i,n,o}handlePlayerElementChange(){var t;(({src:t,el:r,preload:e,currentTime:i})=>{if(!r.getAttribute("hls_loaded")&&["metadata","none"].includes(e)&&Oe(t)){if(i>0)return r.style.height=null,r.style.paddingBottom=null,void r.setAttribute("hls_loaded","1");r.style.height="0px",r.style.paddingBottom="56.25%"}})({src:this.src,el:this.playerEl,preload:this.preload,currentTime:null===(t=null==this?void 0:this.player)||void 0===t?void 0:t.currentTime})}handleMutedPreview(t){var r,e,i,n,o,a,l;this.player&&!this.isAdmin&&(!t&&this.preset.captions_enabled&&setTimeout((()=>{var t;this.player.toggleCaptions(null===(t=null==this?void 0:this.preset)||void 0===t?void 0:t.captions_enabled)}),0),(null===(i=null===(e=null===(r=this.originalConfig)||void 0===r?void 0:r.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled)&&(({player:t,mutedPreview:r,captions:e,progress:i,savePosition:n,onPlay:o})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=r,t.muted=r,t.loop=r,t.config.ajaxProgress=!r&&i,t.config.save_player_position=!r&&n;try{t.toggleCaptions(!!r&&!!e)}catch(t){}return setTimeout((()=>{Ur(t)||t.restart(),setTimeout((()=>{t.muted=r,o()}),0)}),0),t}console.log("ios device, do not do muted autoplay")})({player:this.player,mutedPreview:this.mutedPreview,captions:!!(null===(o=null===(n=this.blockAttributes)||void 0===n?void 0:n.mutedPreview)||void 0===o?void 0:o.captions),progress:null===(a=this.originalConfig)||void 0===a?void 0:a.ajaxProgress,savePosition:null===(l=this.originalConfig)||void 0===l?void 0:l.save_player_position,onPlay:()=>this.play()}))}onPlayerReady(){var t,r;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration,this.mutedPreview=null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled,this.renderDynamicOverlays(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Oe(this.src)&&this.player.once("playing",(()=>{this.playerEl.style.height=null,this.playerEl.style.paddingBottom=null,this.playerEl.setAttribute("hls_loaded","1")})),this.player.on("playing",(()=>this.playClass="presto-player--playing")),this.player.on("pause",(()=>this.playClass="presto-player--paused")),this.player.on("ended",(()=>this.playClass="presto-player--ended"))}handlePlayerEvents(t){t.on("ready",(t=>{this.player=t.detail.plyr,this.onPlayerReady()}))}handleLazyLoadChange(){"youtube"!==this.provider||this.shouldLazyLoad||this.isAdmin||setTimeout((()=>{this.onReload("play")}),50)}shouldLazyLoadVideo(){var t,r,e;return"youtube"===this.provider&&!this.autoplay&&!(null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled)&&!!(null===(e=this.preset)||void 0===e?void 0:e.lazy_load_youtube)}componentWillLoad(){var t,r,e;const i=null===(t=this.el.children)||void 0===t?void 0:t[0];i&&i.classList&&i.classList.contains("presto-iframe-fallback-container")&&i.remove(),this.shouldLazyLoad=this.shouldLazyLoadVideo(),this.i18n=(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.i18n)||(null===(e=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===e?void 0:e.i18n),this.originalConfig||(this.originalConfig=this.getConfig()),this.trackIntersection()}async componentDidLoad(){setTimeout((()=>{this.initialize(),this.loaded.emit(!0)}),0)}async initialize(){const t=await this.createPlayer();return this.handlePlayerEvents(t),this.syncVideoHeight(),((t,r)=>{if(!r)return;const e=document.createElement("style");t.shadowRoot.append(e),e.appendChild(document.createTextNode(r))})(this.el,this.css),t}async onReload(t){const r=await this.initialize();"play"==t&&r.on("ready",(()=>{this.play(),r.muted=!0,r.muted=!1,r.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-97e2763b.js");window.ResizeObserver=t.ResizeObserver}new ResizeObserver((()=>{this.isSticky||(this.videoHeight=this.el.getBoundingClientRect().height)})).observe(this.el)}playVideoOnlyInViewport(){var t;!this.isAdmin&&(null===(t=this.preset)||void 0===t?void 0:t.play_video_viewport)&&this.player&&("visible"===document.visibilityState?this.observer.observe(this.el):(this.player.playing&&(this.previouslyPlaying=!0),this.pause(),this.observer.disconnect()))}trackIntersection(){this.observer=new IntersectionObserver((t=>{this.handleVisibilityIntersection(null==t?void 0:t[0])})),this.observer.observe(this.el)}handleVisibilityIntersection(t){t&&(this.handleStickyScroll(t),this.handleVisibilityPlayChange(t))}handleStickyScroll(t){var r,e;if(!(null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.playing))return void(this.isSticky=!1);let i=t.boundingClientRect;if(this.isSticky=i.height<-i.top,"visible"===document.visibilityState&&this.isSticky&&this.player){const t=()=>{window.removeEventListener("scroll",t),this.player.paused&&(this.isSticky=!1)};this.player.once("pause",(()=>{window.addEventListener("scroll",t)}))}}handleVisibilityPlayChange(t){var r,e,i;if(!this.isAdmin&&(null===(r=this.preset)||void 0===r?void 0:r.play_video_viewport)&&(!this.player&&this.originalConfig.autoplay&&(this.previouslyPlaying=!0,this.autoplay=!!(null==t?void 0:t.isIntersecting)),this.player)){if(null==t?void 0:t.isIntersecting)return this.originalConfig.autoplay&&(this.autoplay=!0),this.previouslyPlaying&&this.play(),void(this.previouslyPlaying=!1);if("visible"!==document.visibilityState||!this.isSticky){if(null===(i=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled)return this.previouslyPlaying=!0,this.pause(),void this.player.once("playing",(()=>{this.previouslyPlaying=!0,this.pause()}));this.player.playing&&(this.previouslyPlaying=!0),this.pause()}}}renderMutedOverlay(){var t;if(this.player&&this.mutedPreview&&!this.isAdmin)return d("presto-muted-overlay",{mutedOverlay:null===(t=this.player.config.blockAttributes)||void 0===t?void 0:t.mutedOverlay,preset:this.preset,onPlayVideo:()=>{this.mutedPreview=!1,this.play()}})}renderVideo(){var t;switch(this.provider){case"vimeo":return d("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return d("presto-youtube",{onReload:t=>this.onReload(null==t?void 0:t.detail),player:this.player,getRef:t=>this.playerEl=t,lazyLoad:this.shouldLazyLoad,poster:this.poster,src:this.src});case"bunny":return d("presto-bunny",{thumbnail:null===(t=null==this?void 0:this.bunny)||void 0===t?void 0:t.thumbnail,getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks});default:return d("presto-video",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}}renderCTA(){var t,r,e;if((null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&(null===(e=null===(r=this.preset)||void 0===r?void 0:r.cta)||void 0===e?void 0:e.enabled))return d("presto-cta-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,onPlayVideo:()=>{this.mutedPreview=!1,this.play()},onRewatchVideo:()=>{this.mutedPreview=!1},duration:this.duration})}renderEmailOverlay(){var t,r;if((null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&!(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.logged_in))return d("presto-email-overlay",{direction:this.direction,player:this.player,preset:this.preset,videoId:this.video_id,i18n:this.i18n,onPlayVideo:()=>{this.mutedPreview=!1,this.play()},duration:this.duration})}renderActionBar(){var t,r,e;if(null===(r=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===r?void 0:r.enabled)return d("presto-action-bar",{config:this.preset.action_bar,currentTime:null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.currentTime,duration:this.duration,youtube:this.youtube})}stickyPositionClass(){var t,r;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,r,e,i,n;this.player&&((null===(t=null==this?void 0:this.overlaysComponent)||void 0===t?void 0:t.offsetParent)||(this.overlaysComponent=document.createElement("presto-dynamic-overlays"),this.overlaysComponent.addEventListener("reloadComponent",(()=>{this.overlaysComponent.remove(),this.overlaysComponent=document.createElement("presto-dynamic-overlays")}),{once:!0})),this.overlaysComponent.style.cssText="display: block !important; opacity: 1 !important; visibility: visible !important;",this.overlaysComponent.overlays=this.overlays,this.overlaysComponent.preset=this.preset,this.overlaysComponent.player=this.player,this.overlaysComponent.enabled=!(null===(i=null===(e=null===(r=this.player)||void 0===r?void 0:r.config)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled),(null===(n=null==this?void 0:this.overlaysComponent)||void 0===n?void 0:n.offsetParent)||this.player.elements.wrapper.append(this.overlaysComponent))}render(){var t,r,e,i,n;return d(h,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},d("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"presto-sticky":""}\n ${this.stickyPositionClass()}\n ${"rtl"===this.direction?"rtl":""}\n ${!!(null===(t=this.preset)||void 0===t?void 0:t.skin)&&`skin-${null===(r=this.preset)||void 0===r?void 0:r.skin}`}\n ${(null===(e=this.preset)||void 0===e?void 0:e.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(i=this.preset)||void 0===i?void 0:i.caption_style)?`caption-style-${null===(n=this.preset)||void 0===n?void 0:n.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}`},d("div",null,d("slot",{name:"player-start"}),this.renderCTA(),this.renderEmailOverlay(),d("slot",{name:"player-before-video"}),this.renderVideo(),d("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),d("slot",{name:"player-end"}))))}get el(){return y(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};Se.style='@charset "UTF-8";@keyframes plyr-progress{to{background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:0.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;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:var(--plyr-font-weight-regular, 400);line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;z-index:0}.plyr video,.plyr audio,.plyr iframe{display:block;height:100%;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:var(--plyr-badge-background, #4a5464);border-radius:var(--plyr-badge-border-radius, 2px);color:var(--plyr-badge-text-color, #fff);font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in 0.3s ease;bottom:0;display:none;font-size:var(--plyr-font-size-small, 13px);left:0;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform 0.4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width: 480px){.plyr__captions{font-size:var(--plyr-font-size-base, 15px);padding:calc(var(--plyr-control-spacing, 10px) * 2)}}@media (min-width: 768px){.plyr__captions{font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;box-decoration-break:clone;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:0.2em 0.5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:transparent;border:0;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:calc(var(--plyr-control-spacing, 10px) * 0.7);position:relative;transition:all 0.3s ease}.plyr__control svg{display:block;fill:currentColor;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}a.plyr__control::after,a.plyr__control::before{display:none}.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,.plyr__control.plyr__control--pressed .label--not-pressed{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 calc(var(--plyr-control-spacing, 10px) / 2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time{padding-left:0}.plyr__controls:empty{display:none}.plyr [data-plyr=captions],.plyr [data-plyr=pip],.plyr [data-plyr=airplay],.plyr [data-plyr=fullscreen]{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--pip-supported [data-plyr=pip],.plyr--airplay-supported [data-plyr=airplay],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform 0.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 0.2s ease;background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));border-radius:4px;bottom:100%;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-menu-color, #4a5464);font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container::after{border:var(--plyr-menu-arrow-size, 4px) solid transparent;border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));content:"";height:0;position:absolute;right:calc(((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7)) - (var(--plyr-menu-arrow-size, 4px) / 2));top:100%;width:0}.plyr__menu__container [role=menu]{padding:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control::after{border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4)}.plyr__menu__container .plyr__control--forward::after{border-left-color:var(--plyr-menu-arrow-color, #728197);right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.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:var(--plyr-font-weight-regular, 400);margin:calc(var(--plyr-control-spacing, 10px) * 0.7);margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4);position:relative;width:calc(100% - (calc(var(--plyr-control-spacing, 10px) * 0.7) * 2))}.plyr__menu__container .plyr__control--back::after{border-right-color:var(--plyr-menu-arrow-color, #728197);left:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back::before{background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);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 .plyr__control[role=menuitemradio]{padding-left:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container .plyr__control[role=menuitemradio]::before,.plyr__menu__container .plyr__control[role=menuitemradio]::after{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]::before{background:rgba(0, 0, 0, 0.1);content:"";display:block;flex-shrink:0;height:16px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before{background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus::before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover::before{background:rgba(35, 40, 47, 0.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) - 2) * -1);overflow:hidden;padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:transparent;border:0;border-radius:calc(var(--plyr-range-thumb-height, 13px) * 2);color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:calc((var(--plyr-range-thumb-active-shadow-width, 3px) * 2) + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;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:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);-webkit-appearance:none;margin-top:calc(((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px)) / 2) * -1)}.plyr--full-ui input[type=range]::-moz-range-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);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{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:var(--plyr-video-background, var(--plyr-video-background, black));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity 0.2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time::before{content:"⁄";margin-right:var(--plyr-control-spacing, 10px)}@media (max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-tooltip-color, #4a5464);font-size:var(--plyr-font-size-small, 13px);font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:calc(var(--plyr-control-spacing, 10px) / 2) calc(calc(var(--plyr-control-spacing, 10px) / 2) * 1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:hover .plyr__tooltip,.plyr .plyr__control.plyr__tab-focus .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(0.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:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7))}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7));transform:translateX(50%)}.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible{transform:translate(0, 0) scale(1)}.plyr__progress{left:calc(var(--plyr-range-thumb-height, 13px) * 0.5);margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:calc(var(--plyr-range-thumb-height, 13px) * -0.5);margin-right:calc(var(--plyr-range-thumb-height, 13px) * -0.5);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:calc((var(--plyr-range-track-height, 5px) / 2) * -1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:transparent}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;transition:width 0.2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, transparent 25%, transparent 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, transparent 75%, transparent);background-repeat:repeat-x;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:calc(var(--plyr-control-spacing, 10px) / 2);margin-right:calc(var(--plyr-control-spacing, 10px) / 2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:var(--plyr-audio-control-color, #4a5464);padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--audio .plyr__progress__buffer{color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:var(--plyr-video-background, var(--plyr-video-background, black));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:var(--plyr-video-background, var(--plyr-video-background, black));margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:var(--plyr-video-control-color, #fff);left:0;padding:calc(var(--plyr-control-spacing, 10px) / 2);padding-top:calc(var(--plyr-control-spacing, 10px) * 2);position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.plyr--video .plyr__controls{padding:var(--plyr-control-spacing, 10px);padding-top:calc(var(--plyr-control-spacing, 10px) * 3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:0.9;padding:calc(var(--plyr-control-spacing, 10px) * 1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:0.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:hover,.plyr__control--overlaid:focus{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--video .plyr__progress__buffer{color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 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__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:var(--plyr-font-size-xlarge, 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__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:var(--plyr-font-size-xlarge, 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__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:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.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:var(--plyr-font-size-xlarge, 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:#23282f;border-radius:2px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads::after:empty{display:none}.plyr__cues{background:currentColor;display:block;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height, 5px)/2 0 0;opacity:0.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:3px;bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translate(0, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0, 0) scale(1)}.plyr__preview-thumb::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:rgba(0, 0, 0, 0.55);border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity 0.3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.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}.plyr [hidden]{display:none !important}video,iframe{max-width:100%}.plyr--html5 .plyr__video-wrapper,.plyr--youtube .plyr__video-wrapper{height:100%}.plyr__video-wrapper{z-index:1}.presto-player__wrapper{position:relative;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper img{max-width:100%}.presto-player__wrapper .plyr.plyr--video.plyr--menu-open{overflow:hidden}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{top:50%;transform:translateY(-50%)}.presto-player__wrapper .plyr--fullscreen-fallback.plyr{border-radius:0 !important}.presto-player__wrapper .plyr--fullscreen-fallback.plyr iframe{border-radius:0 !important}.presto-player__wrapper .plyr__menu__container{overflow:auto}.presto-player__wrapper .plyr__menu__container:after{display:none}.presto-player__wrapper img{border:none}.presto-player__wrapper video{margin:auto}.presto-player__wrapper iframe{height:100%}.presto-player__wrapper .plyr--video .plyr__control:active,.presto-player__wrapper .plyr--video .plyr__control:focus{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .plyr__poster{background-size:cover;z-index:2}.presto-player__wrapper .presto-player__logo{margin:0;display:block;position:absolute;z-index:3;opacity:0.5;object-fit:contain;transition:bottom 0.4s ease-in-out;max-width:var(--presto-player-logo-width, 75px)}.presto-player__wrapper .presto-player__logo.is-bottom-right{left:auto;right:20px;top:auto;bottom:60px}.presto-player__wrapper .presto-player__logo.is-bottom-left{left:20px;right:auto;top:auto;bottom:60px}@media screen and (min-width: 380px){.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-left,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-left{bottom:20px}}.presto-player__wrapper .presto-player-progress__marker{width:16px;height:16px;padding:0;border:2px solid rgba(255, 255, 255, 0.5);position:absolute;border-radius:9999px;bottom:calc(50% - 8px);z-index:9;margin-left:-8px !important}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__poster{display:none}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__control.plyr__control--overlaid{display:none}.presto-player__wrapper .presto-player__wrapper .plyr__control--overlaid{z-index:4}.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{background:inherit;border:none;outline:0;position:absolute;top:50%;transform:translate(-50%, -50%)}.presto-player__wrapper .plyr__controls__item.plyr__progress__container{position:relative}.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{box-shadow:none}.presto-player__wrapper .plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75)))}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--video .plyr__controls{padding-bottom:calc(var(--plyr-control-spacing, 10px) + env(safe-area-inset-bottom))}.presto-player__wrapper .presto-player-toc{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";line-height:1.4;position:absolute;top:auto;right:0;left:0;bottom:0;max-height:calc(100%);max-width:calc(100%);background:rgba(255, 255, 255, 0.9);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));left:auto;padding:20px 15px;border-radius:4px;width:100%;z-index:9;box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);white-space:nowrap;z-index:3;display:flex;flex-direction:column;transition:bottom 0.25s ease}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc{right:20px;bottom:60px;width:300px;max-height:calc(100% - 80px);max-width:calc(100vw - 70px)}}.presto-player__wrapper .presto-player-toc__wrapper{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out, visibility 0.3s ease-in-out}.presto-player__wrapper .presto-player-toc__wrapper.is-showing{visibility:visible;opacity:1}.presto-player__wrapper .presto-player-toc__cover{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3}.presto-player__wrapper .presto-player-toc__list{flex:1;overflow:auto}.presto-player__wrapper .presto-player-toc__title{font-size:12px;font-weight:bold;margin-bottom:10px;margin-left:10px;margin-right:10px;display:none}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc__title{display:block}}.presto-player__wrapper .presto-player-toc__name{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.presto-player__wrapper .presto-player-toc__chapter{padding:12px;border-radius:3px;cursor:pointer;line-height:1;display:flex;align-items:center;transition:background-color 0.4s ease, color 0.4s ease;margin-bottom:2px;position:relative}.presto-player__wrapper .presto-player-toc__chapter:last-child{margin-bottom:0}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted,.presto-player__wrapper .presto-player-toc__chapter:hover{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted{padding-right:30px}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted:after{background:rgba(255, 255, 255, 0.5);content:"";display:block;flex-shrink:0;height:8px;width:8px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;border-radius:9999px;position:absolute;right:7px}.presto-player__wrapper .presto-player-toc__order{margin-right:12px;opacity:0.5}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper.rtl .presto-player-toc__order{order:2;margin-left:12px;margin-right:0}.presto-player__wrapper.rtl .presto-player-toc__name{direction:rtl}.presto-player__wrapper .presto-player-error{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.9);color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;text-align:center}.presto-player__wrapper .presto-player-error__title{font-size:18px;font-weight:bold;margin-bottom:8px}.presto-player__wrapper .presto-player-error__description{opacity:0.75}.presto-player__wrapper.hide-youtube-ui .plyr__video-embed iframe{top:-50%;height:200%}.presto-player__wrapper .plyr--vimeo.plyr--playing .plyr__video-embed__container{pointer-events:none}.presto-player__wrapper .plyr__control--overlaid{border-radius:6px;padding-left:26px;padding-right:26px;position:absolute !important;top:50% !important}.presto-player__wrapper.skin-stacked .plyr__controls{flex-wrap:wrap}.presto-player__wrapper.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.presto-player__wrapper.skin-stacked .plyr__controls{justify-content:flex-start}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.presto-player__wrapper.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.presto-player__wrapper.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.presto-player__wrapper.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:calc(50%)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}.presto-sticky-parent{z-index:99998}@media screen and (min-width: 960px){.presto-sticky{--presto-sticky-space:15px;position:fixed;z-index:3000;max-width:var(--presto-sticky-width, 380px);width:100vw}.presto-sticky .plyr__controls,.presto-sticky .presto-player-toc__wrapper,.presto-sticky presto-action-bar,.presto-sticky .presto-player__logo{display:none}.presto-sticky--top-left{top:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--top-center{top:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--top-right{top:var(--presto-sticky-space);right:var(--presto-sticky-space)}.presto-sticky--center-left{top:0;bottom:0;margin:auto 0;left:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--center-center{top:0;bottom:0;right:0;left:0;margin:auto;display:flex;align-items:center}.presto-sticky--center-right{top:0;bottom:0;margin:auto 0;right:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--bottom-left{bottom:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--bottom-center{bottom:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--bottom-right{bottom:var(--presto-sticky-space);right:var(--presto-sticky-space)}}.presto-player__overlay{position:absolute;top:50%;left:50%;z-index:3}.presto-player__muted-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.presto-player__muted-overlay .plyr__control--overlaid{display:block;opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay{cursor:pointer}.presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid{opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay .presto-player__logo{display:none}.presto-player__wrapper.is-muted-overlay .plyr__controls{display:none}.presto-player__wrapper.is-muted-overlay .plyr .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(0) !important}.presto-player__wrapper.rtl .plyr__captions{direction:rtl}.presto-player__wrapper .plyr__captions{z-index:1}.presto-player__wrapper.caption-style-full .plyr__captions{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));padding-top:0;padding-bottom:0}.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 13px) * -4))}.presto-player__wrapper.caption-style-full.skin-stacked .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 17px) * -4))}.presto-player__play-cover{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.presto-player__chapters{width:100%;position:absolute;top:0;height:100%}.presto-player__chapter-markers{margin:0 8px;height:100%;position:relative}.presto-player-progress__marker.plyr__controls__item.plyr__control:hover{border:0;background:#fff}.presto-iframe-fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.presto-iframe-fallback-container embed,.presto-iframe-fallback-container iframe,.presto-iframe-fallback-container object{position:absolute;top:0;left:0;width:100%;height:100%}@media (min-aspect-ratio: 16/9){.hide-youtube-ui presto-youtube .plyr:fullscreen .plyr__video-wrapper{width:calc(calc(1600 / 9) * 1vh)}}';export{Pe as P,Se as a,Ur as r}
|
1 |
+
import{a as t,d as r,e,f as i,i as n,j as o,_ as a,k as l,l as s,m as p,r as u,c,h as d,H as h,g as y}from"./p-3cd9ce84.js";var f=["premium","referrerPolicy"];function v(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function g(t,r){for(var e=0;e<r.length;e++){var i=r[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function m(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,i)}return e}function b(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?m(Object(e),!0).forEach((function(r){_(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):m(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var w={addCSS:!0,thumbWidth:15,watch:!0};function k(t,r){return function(){return Array.from(document.querySelectorAll(r)).includes(this)}.call(t,r)}var x=function(t){return null!=t?t.constructor:null},z=function(t,r){return!!(t&&r&&t instanceof r)},j=function(t){return x(t)===String},T=function(t){return Array.isArray(t)},P=function(t){return z(t,NodeList)},O=j,S=T,C=P,I=function(t){return z(t,Element)},M=function(t){return z(t,Event)},A=function(t){return function(t){return null==t}(t)||(j(t)||T(t)||P(t))&&!t.length||function(t){return x(t)===Object}(t)&&!Object.keys(t).length};var E,F,N,R=function(){function t(r,e){(function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")})(this,t),I(r)?this.element=r:O(r)&&(this.element=document.querySelector(r)),I(this.element)&&A(this.element.rangeTouch)&&(this.config=b({},w,{},e),this.init())}return function(t,r,e){r&&g(t.prototype,r),e&&g(t,e)}(t,[{key:"init",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var r=this,e=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(t){r.element[e](t,(function(t){return r.set(t)}),!1)}))}},{key:"get",value:function(r){if(!t.enabled||!M(r))return null;var e,i=r.target,n=r.changedTouches[0],o=parseFloat(i.getAttribute("min"))||0,a=parseFloat(i.getAttribute("max"))||100,l=parseFloat(i.getAttribute("step"))||1,s=i.getBoundingClientRect(),p=100/s.width*(this.config.thumbWidth/2)/100;return 0>(e=100/s.width*(n.clientX-s.left))?e=0:100<e&&(e=100),50>e?e-=(100-2*e)*p:50<e&&(e+=2*(e-50)*p),o+function(t,r){if(1>r){var e=function(t){var r="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return r?Math.max(0,(r[1]?r[1].length:0)-(r[2]?+r[2]:0)):0}(r);return parseFloat(t.toFixed(e))}return Math.round(t/r)*r}(e/100*(a-o),l)}},{key:"set",value:function(r){t.enabled&&M(r)&&!r.target.disabled&&(r.preventDefault(),r.target.value=this.get(r),function(t,r){if(t&&r){var e=new Event(r,{bubbles:!0});t.dispatchEvent(e)}}(r.target,"touchend"===r.type?"change":"input"))}}],[{key:"setup",value:function(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(A(r)||O(r)?i=Array.from(document.querySelectorAll(O(r)?r:'input[type="range"]')):I(r)?i=[r]:C(r)?i=Array.from(r):S(r)&&(i=r.filter(I)),A(i))return null;var n=b({},w,{},e);if(O(r)&&n.watch){var o=new MutationObserver((function(e){Array.from(e).forEach((function(e){Array.from(e.addedNodes).forEach((function(e){I(e)&&k(e,r)&&new t(e,n)}))}))}));o.observe(document.body,{childList:!0,subtree:!0})}return i.map((function(r){return new t(r,e)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}(),L=function(t){return null!=t?t.constructor:null},q=function(t,r){return Boolean(t&&r&&t instanceof r)},B=function(t){return null==t},D=function(t){return L(t)===Object},U=function(t){return L(t)===String},H=function(t){return L(t)===Function},V=function(t){return Array.isArray(t)},$=function(t){return q(t,NodeList)},Q=function(t){return B(t)||(U(t)||V(t)||$(t))&&!t.length||D(t)&&!Object.keys(t).length},Y=B,J=D,W=function(t){return L(t)===Number&&!Number.isNaN(t)},G=U,K=function(t){return L(t)===Boolean},X=H,Z=V,tt=$,rt=function(t){return null!==t&&"object"==n(t)&&1===t.nodeType&&"object"==n(t.style)&&"object"==n(t.ownerDocument)},et=function(t){return q(t,Event)},it=function(t){return q(t,KeyboardEvent)},nt=function(t){return q(t,TextTrack)||!B(t)&&U(t.kind)},ot=function(t){if(q(t,window.URL))return!0;if(!U(t))return!1;var r=t;t.startsWith("http://")&&t.startsWith("https://")||(r="http://".concat(t));try{return!Q(new URL(r).hostname)}catch(t){return!1}},at=Q,lt=(E=document.createElement("span"),F={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},N=Object.keys(F).find((function(t){return void 0!==E.style[t]})),!!G(N)&&F[N]);function st(t,r){setTimeout((function(){try{t.hidden=!0,t.hidden=!1}catch(t){}}),r)}var pt={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function ut(t,r){return r.split(".").reduce((function(t,r){return t&&t[r]}),t)}function ct(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];if(!i.length)return t;var o=i.shift();return J(o)?(Object.keys(o).forEach((function(r){J(o[r])?(Object.keys(t).includes(r)||Object.assign(t,e({},r,{})),ct(t[r],o[r])):Object.assign(t,e({},r,o[r]))})),ct.apply(void 0,[t].concat(i))):t}function dt(t,r){Array.from(t.length?t:[t]).reverse().forEach((function(t,e){var i=e>0?r.cloneNode(!0):r,n=t.parentNode,o=t.nextSibling;i.appendChild(t),o?n.insertBefore(i,o):n.appendChild(i)}))}function ht(r,e){rt(r)&&!at(e)&&Object.entries(e).filter((function(r){var e=t(r,2);return!Y(e[1])})).forEach((function(e){var i=t(e,2);return r.setAttribute(i[0],i[1])}))}function yt(t,r,e){var i=document.createElement(t);return J(r)&&ht(i,r),G(e)&&(i.innerText=e),i}function ft(t,r,e,i){rt(r)&&r.appendChild(yt(t,e,i))}function vt(t){tt(t)||Z(t)?Array.from(t).forEach(vt):rt(t)&&rt(t.parentNode)&&t.parentNode.removeChild(t)}function gt(t){if(rt(t))for(var r=t.childNodes.length;r>0;)t.removeChild(t.lastChild),r-=1}function _t(t,r){return rt(r)&&rt(r.parentNode)&&rt(t)?(r.parentNode.replaceChild(t,r),t):null}function mt(r,e){if(!G(r)||at(r))return{};var i={},n=ct({},e);return r.split(",").forEach((function(r){var e=r.trim(),o=e.replace(".",""),a=e.replace(/[[\]]/g,"").split("="),l=t(a,1)[0],s=a.length>1?a[1].replace(/["']/g,""):"";switch(e.charAt(0)){case".":i.class=G(n.class)?"".concat(n.class," ").concat(o):o;break;case"#":i.id=e.replace("#","");break;case"[":i[l]=s}})),ct(n,i)}function bt(t,r){if(rt(t)){var e=r;K(e)||(e=!t.hidden),t.hidden=e}}function wt(t,r,e){if(tt(t))return Array.from(t).map((function(t){return wt(t,r,e)}));if(rt(t)){var i="toggle";return void 0!==e&&(i=e?"add":"remove"),t.classList[i](r),t.classList.contains(r)}return!1}function kt(t,r){return rt(t)&&t.classList.contains(r)}function xt(t,r){var e=Element.prototype;return(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(){return Array.from(document.querySelectorAll(r)).includes(this)}).call(t,r)}function zt(t){return this.elements.container.querySelectorAll(t)}function jt(t){return this.elements.container.querySelector(t)}function Tt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];rt(t)&&(t.focus({preventScroll:!0}),r&&wt(t,this.config.classNames.tabFocus))}var Pt={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Ot={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(t,r,e){var i=Ot[t]||"html5"!==r;return{api:i,ui:i&&Ot.rangeInput&&("video"!==t||!pt.isIPhone||pt.isIPhone&&e&&Ot.playsinline)}},pip:!(pt.isIPhone||!X(yt("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||yt("video").disablePictureInPicture)),airplay:X(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(r){if(at(r))return!1;var e=r.split("/"),i=t(e,1),n=r;if(!this.isHTML5||i[0]!==this.type)return!1;Object.keys(Pt).includes(n)&&(n+='; codecs="'.concat(Pt[r],'"'));try{return Boolean(n&&this.media.canPlayType(n).replace(/no/,""))}catch(r){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var t=document.createElement("input");return t.type="range","range"===t.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==lt,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},St=function(){var t=!1;try{var r=Object.defineProperty({},"passive",{get:function(){return t=!0,null}});window.addEventListener("test",null,r),window.removeEventListener("test",null,r)}catch(t){}return t}();function Ct(t,r,e){var i=this,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t&&"addEventListener"in t&&!at(r)&&X(e)){var l=r.split(" "),s=a;St&&(s={passive:o,capture:a}),l.forEach((function(r){i&&i.eventListeners&&n&&i.eventListeners.push({element:t,type:r,callback:e,options:s}),t[n?"addEventListener":"removeEventListener"](r,e,s)}))}}function It(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Ct.call(this,t,r,e,!0,i,n)}function Mt(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2?arguments[2]:void 0,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Ct.call(this,t,r,e,!1,i,n)}function At(t){var r=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=function a(){for(var l=arguments.length,s=new Array(l),p=0;p<l;p++)s[p]=arguments[p];Mt(t,e,a,n,o),i.apply(r,s)};Ct.call(this,t,e,a,!0,n,o)}function Et(t){var e=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(rt(t)&&!at(e)){var o=new CustomEvent(e,{bubbles:i,detail:r(r({},n),{},{plyr:this})});t.dispatchEvent(o)}}function Ft(){this&&this.eventListeners&&(this.eventListeners.forEach((function(t){t.element.removeEventListener(t.type,t.callback,t.options)})),this.eventListeners=[])}function Nt(){var t=this;return new Promise((function(r){return t.ready?setTimeout(r,0):It.call(t,t.elements.container,"ready",r)})).then((function(){}))}function Rt(t){(function(t){return q(t,Promise)&&H(t.then)})(t)&&t.then(null,(function(){}))}function Lt(t){return Z(t)?t.filter((function(r,e){return t.indexOf(r)===e})):t}function qt(t,r){return Z(t)&&t.length?t.reduce((function(t,e){return Math.abs(e-r)<Math.abs(t-r)?e:t})):null}function Bt(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}var Dt=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((function(i,n){var o=t(n,2),a=o[0],l=o[1];return r(r({},i),{},e({},a/l,[a,l]))}),{});function Ut(t){return!!(Z(t)||G(t)&&t.includes(":"))&&(Z(t)?t:t.split(":")).map(Number).every(W)}function Ht(r){if(!Z(r)||!r.every(W))return null;var e=t(r,2),i=e[0],n=e[1],o=function t(r,e){return 0===e?r:t(e,r%e)}(i,n);return[i/o,n/o]}function Vt(t){var r=function(t){return Ut(t)?t.split(":").map(Number):null},e=r(t);if(null===e&&(e=r(this.config.ratio)),null===e&&!at(this.embed)&&Z(this.embed.ratio)&&(e=this.embed.ratio),null===e&&this.isHTML5){var i=this.media;e=[i.videoWidth,i.videoHeight]}return Ht(e)}function $t(r){if(!this.isVideo)return{};var e=this.elements.wrapper,i=Vt.call(this,r);if(!Z(i))return{};var n=Ht(i),o=t(n,2),a=o[0],l=o[1],s=100/a*l;if(Bt("aspect-ratio: ".concat(a,"/").concat(l))?e.style.aspectRatio="".concat(a,"/").concat(l):e.style.paddingBottom="".concat(s,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),u=(p-s)/(p/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(u,"%)")}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:i}}function Qt(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,i=t/r,n=qt(Object.keys(Dt),i);return Math.abs(n-i)<=e?Dt[n]:[t,r]}var Yt={getSources:function(){var t=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(r){var e=r.getAttribute("type");return!!at(e)||Ot.mime.call(t,e)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:Yt.getSources.call(this).map((function(t){return Number(t.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var t=this;t.options.speed=t.config.speed.options,at(this.config.ratio)||$t.call(t),Object.defineProperty(t.media,"quality",{get:function(){var r=Yt.getSources.call(t).find((function(r){return r.getAttribute("src")===t.source}));return r&&Number(r.getAttribute("size"))},set:function(r){if(t.quality!==r){if(t.config.quality.forced&&X(t.config.quality.onChange))t.config.quality.onChange(r);else{var e=Yt.getSources.call(t).find((function(t){return Number(t.getAttribute("size"))===r}));if(!e)return;var i=t.media,n=i.currentTime,o=i.paused,a=i.preload,l=i.readyState,s=i.playbackRate;t.media.src=e.getAttribute("src"),("none"!==a||l)&&(t.once("loadedmetadata",(function(){t.speed=s,t.currentTime=n,o||Rt(t.play())})),t.media.load())}Et.call(t,t.media,"qualitychange",!1,{quality:r})}}})}},cancelRequests:function(){this.isHTML5&&(vt(Yt.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Jt(t){return"".concat(t,"-").concat(Math.floor(1e4*Math.random()))}function Wt(t){for(var r=arguments.length,e=new Array(r>1?r-1:0),i=1;i<r;i++)e[i-1]=arguments[i];return at(t)?t:t.toString().replace(/{(\d+)}/g,(function(t,r){return e[r].toString()}))}var Gt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t.replace(new RegExp(r.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),e.toString())},Kt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.toString().replace(/\w\S*/g,(function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}))};function Xt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=t.toString();return r=Gt(r,"-"," "),r=Gt(r,"_"," "),r=Kt(r),Gt(r," ","")}function Zt(t){var r=document.createElement("div");return r.appendChild(t),r.innerHTML}var tr={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},rr=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(at(r)||at(e))return"";var i=ut(e.i18n,r);if(at(i))return Object.keys(tr).includes(r)?tr[r]:"";var n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach((function(r){var e=t(r,2);i=Gt(i,e[0],e[1])})),i},er=function(){function t(r){var e=this;o(this,t),v(this,"get",(function(r){if(!t.supported||!e.enabled)return null;var i=window.localStorage.getItem(e.key);if(at(i))return null;var n=JSON.parse(i);return G(r)&&r.length?n[r]:n})),v(this,"set",(function(r){if(t.supported&&e.enabled&&J(r)){var i=e.get();at(i)&&(i={}),ct(i,r),window.localStorage.setItem(e.key,JSON.stringify(i))}})),this.enabled=r.config.storage.enabled,this.key=r.config.storage.key}return i(t,null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}]),t}();function ir(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(e,i){try{var n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",(function(){if("text"===r)try{e(JSON.parse(n.responseText))}catch(t){e(n.responseText)}else e(n.response)})),n.addEventListener("error",(function(){throw new Error(n.status)})),n.open("GET",t,!0),n.responseType=r,n.send()}catch(t){i(t)}}))}function nr(t,r){if(G(t)){var e=G(r),i=function(){return null!==document.getElementById(r)},n=function(t,r){t.innerHTML=r,e&&i()||document.body.insertAdjacentElement("afterbegin",t)};if(!e||!i()){var o=er.supported,a=document.createElement("div");if(a.setAttribute("hidden",""),e&&a.setAttribute("id",r),o){var l=window.localStorage.getItem("cache-".concat(r));if(null!==l){var s=JSON.parse(l);n(a,s.content)}}ir(t).then((function(t){at(t)||(o&&window.localStorage.setItem("cache-".concat(r),JSON.stringify({content:t})),n(a,t))})).catch((function(){}))}}}var or=function(t){return Math.trunc(t/60/60%60,10)},ar=function(t){return Math.trunc(t%60,10)};function lr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!W(t))return lr(void 0,r,e);var i,n=function(t){return"0".concat(t).slice(-2)},o=or(t),a=(i=t,Math.trunc(i/60%60,10)),l=ar(t);return o=r||o>0?"".concat(o,":"):"","".concat(e&&t>0?"-":"").concat(o).concat(n(a),":").concat(n(l))}var sr={getIconUrl:function(){var t=new URL(this.config.iconUrl,window.location),r=window.location.host?window.location.host:window.top.location.host,e=t.host!==r||pt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements:function(){try{return this.elements.controls=jt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:zt.call(this,this.config.selectors.buttons.play),pause:jt.call(this,this.config.selectors.buttons.pause),restart:jt.call(this,this.config.selectors.buttons.restart),rewind:jt.call(this,this.config.selectors.buttons.rewind),fastForward:jt.call(this,this.config.selectors.buttons.fastForward),mute:jt.call(this,this.config.selectors.buttons.mute),pip:jt.call(this,this.config.selectors.buttons.pip),airplay:jt.call(this,this.config.selectors.buttons.airplay),settings:jt.call(this,this.config.selectors.buttons.settings),captions:jt.call(this,this.config.selectors.buttons.captions),fullscreen:jt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=jt.call(this,this.config.selectors.progress),this.elements.inputs={seek:jt.call(this,this.config.selectors.inputs.seek),volume:jt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:jt.call(this,this.config.selectors.display.buffer),currentTime:jt.call(this,this.config.selectors.display.currentTime),duration:jt.call(this,this.config.selectors.display.duration)},rt(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon:function(t,r){var e="http://www.w3.org/2000/svg",i=sr.getIconUrl.call(this),n="".concat(i.cors?"":i.url,"#").concat(this.config.iconPrefix),o=document.createElementNS(e,"svg");ht(o,ct(r,{"aria-hidden":"true",focusable:"false"}));var a=document.createElementNS(e,"use"),l="".concat(n,"-").concat(t);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),o.appendChild(a),o},createLabel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=rr(t,this.config);return yt("span",r(r({},e),{},{class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),i)},createBadge:function(t){if(at(t))return null;var r=yt("span",{class:this.config.classNames.menu.value});return r.appendChild(yt("span",{class:this.config.classNames.menu.badge},t)),r},createButton:function(t,r){var e=this,i=ct({},r),n=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toString();return(t=Xt(t)).charAt(0).toLowerCase()+t.slice(1)}(t),o={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(t){Object.keys(i).includes(t)&&(o[t]=i[t],delete i[t])})),"button"!==o.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some((function(t){return t===e.config.classNames.control}))||ct(i,{class:"".concat(i.class," ").concat(this.config.classNames.control)}):i.class=this.config.classNames.control,t){case"play":o.toggle=!0,o.label="play",o.labelPressed="pause",o.icon="play",o.iconPressed="pause";break;case"mute":o.toggle=!0,o.label="mute",o.labelPressed="unmute",o.icon="volume",o.iconPressed="muted";break;case"captions":o.toggle=!0,o.label="enableCaptions",o.labelPressed="disableCaptions",o.icon="captions-off",o.iconPressed="captions-on";break;case"fullscreen":o.toggle=!0,o.label="enterFullscreen",o.labelPressed="exitFullscreen",o.icon="enter-fullscreen",o.iconPressed="exit-fullscreen";break;case"play-large":i.class+=" ".concat(this.config.classNames.control,"--overlaid"),n="play",o.label="play",o.icon="play";break;default:at(o.label)&&(o.label=n),at(o.icon)&&(o.icon=t)}var a=yt(o.element);return o.toggle?(a.appendChild(sr.createIcon.call(this,o.iconPressed,{class:"icon--pressed"})),a.appendChild(sr.createIcon.call(this,o.icon,{class:"icon--not-pressed"})),a.appendChild(sr.createLabel.call(this,o.labelPressed,{class:"label--pressed"})),a.appendChild(sr.createLabel.call(this,o.label,{class:"label--not-pressed"}))):(a.appendChild(sr.createIcon.call(this,o.icon)),a.appendChild(sr.createLabel.call(this,o.label))),ct(i,mt(this.config.selectors.buttons[n],i)),ht(a,i),"play"===n?(Z(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(a)):this.elements.buttons[n]=a,a},createRange:function(t,r){var e=yt("input",ct(mt(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":rr(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},r));return this.elements.inputs[t]=e,sr.updateRangeFill.call(this,e),R.setup(e),e},createProgress:function(t,r){var e=yt("progress",ct(mt(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},r));if("volume"!==t){e.appendChild(yt("span",null,"0"));var i={played:"played",buffer:"buffered"}[t],n=i?rr(i,this.config):"";e.innerText="% ".concat(n.toLowerCase())}return this.elements.display[t]=e,e},createTime:function(t,r){var e=mt(this.config.selectors.display[t],r),i=yt("div",ct(e,{class:"".concat(e.class?e.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":rr(t,this.config)}),"00:00");return this.elements.display[t]=i,i},bindMenuItemShortcuts:function(t,r){var e=this;It.call(this,t,"keydown keyup",(function(i){if([32,38,39,40].includes(i.which)&&(i.preventDefault(),i.stopPropagation(),"keydown"!==i.type)){var n,o=xt(t,'[role="menuitemradio"]');!o&&[32,39].includes(i.which)?sr.showMenuPanel.call(e,r,!0):32!==i.which&&(40===i.which||o&&39===i.which?rt(n=t.nextElementSibling)||(n=t.parentNode.firstElementChild):rt(n=t.previousElementSibling)||(n=t.parentNode.lastElementChild),Tt.call(e,n,!0))}}),!1),It.call(this,t,"keyup",(function(t){13===t.which&&sr.focusFirstMenuItem.call(e,null,!0)}))},createMenuItem:function(t){var r=this,e=t.value,i=t.list,n=t.type,o=t.title,a=t.badge,l=void 0===a?null:a,s=t.checked,p=void 0!==s&&s,u=mt(this.config.selectors.inputs[n]),c=yt("button",ct(u,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(u.class?u.class:"").trim(),"aria-checked":p,value:e})),d=yt("span");d.innerHTML=o,rt(l)&&d.appendChild(l),c.appendChild(d),Object.defineProperty(c,"checked",{enumerable:!0,get:function(){return"true"===c.getAttribute("aria-checked")},set:function(t){t&&Array.from(c.parentNode.children).filter((function(t){return xt(t,'[role="menuitemradio"]')})).forEach((function(t){return t.setAttribute("aria-checked","false")})),c.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(c,"click keyup",(function(t){if(!it(t)||32===t.which){switch(t.preventDefault(),t.stopPropagation(),c.checked=!0,n){case"language":r.currentTrack=Number(e);break;case"quality":r.quality=e;break;case"speed":r.speed=parseFloat(e)}sr.showMenuPanel.call(r,"home",it(t))}}),n,!1),sr.bindMenuItemShortcuts.call(this,c,n),i.appendChild(c)},formatTime:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return W(t)?lr(t,or(this.duration)>0,r):t},updateTimeDisplay:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];rt(t)&&W(r)&&(t.innerText=sr.formatTime(r,e))},updateVolume:function(){this.supported.ui&&(rt(this.elements.inputs.volume)&&sr.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),rt(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;rt(t)&&(t.value=r,sr.updateRangeFill.call(this,t))},updateProgress:function(t){var r=this;if(this.supported.ui&&et(t)){var e=0;if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":e=function(t,r){return 0===t||0===r||Number.isNaN(t)||Number.isNaN(r)?0:(t/r*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===t.type&&sr.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":!function(t,e){var i=W(e)?e:0,n=rt(t)?t:r.elements.display.buffer;if(rt(n)){n.value=i;var o=n.getElementsByTagName("span")[0];rt(o)&&(o.childNodes[0].nodeValue=i)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(t){var r=et(t)?t.target:t;if(rt(r)&&"range"===r.getAttribute("type")){if(xt(r,this.config.selectors.inputs.seek)){r.setAttribute("aria-valuenow",this.currentTime);var e=sr.formatTime(this.currentTime),i=sr.formatTime(this.duration),n=rr("seekLabel",this.config);r.setAttribute("aria-valuetext",n.replace("{currentTime}",e).replace("{duration}",i))}else if(xt(r,this.config.selectors.inputs.volume)){var o=100*r.value;r.setAttribute("aria-valuenow",o),r.setAttribute("aria-valuetext","".concat(o.toFixed(1),"%"))}else r.setAttribute("aria-valuenow",r.value);pt.isWebkit&&r.style.setProperty("--value",r.value/r.max*100+"%")}},updateSeekTooltip:function(t){var r=this;if(this.config.tooltips.seek&&rt(this.elements.inputs.seek)&&rt(this.elements.display.seekTooltip)&&0!==this.duration){var e="".concat(this.config.classNames.tooltip,"--visible"),i=function(t){return wt(r.elements.display.seekTooltip,e,t)};if(this.touch)i(!1);else{var n=0,o=this.elements.progress.getBoundingClientRect();if(et(t))n=100/o.width*(t.pageX-o.left);else{if(!kt(this.elements.display.seekTooltip,e))return;n=parseFloat(this.elements.display.seekTooltip.style.left,10)}n<0?n=0:n>100&&(n=100),sr.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*n),this.elements.display.seekTooltip.style.left="".concat(n,"%"),et(t)&&["mouseenter","mouseleave"].includes(t.type)&&i("mouseenter"===t.type)}}},timeUpdate:function(t){var r=!rt(this.elements.display.duration)&&this.config.invertTime;sr.updateTimeDisplay.call(this,this.elements.display.currentTime,r?this.duration-this.currentTime:this.currentTime,r),t&&"timeupdate"===t.type&&this.media.seeking||sr.updateProgress.call(this,t)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return bt(this.elements.display.currentTime,!0),void bt(this.elements.progress,!0);rt(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var t=rt(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&sr.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&sr.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),sr.updateSeekTooltip.call(this)}},toggleMenuButton:function(t,r){bt(this.elements.settings.buttons[t],!r)},updateSetting:function(t,r,e){var i=this.elements.settings.panels[t],n=null,o=r;if("captions"===t)n=this.currentTrack;else{if(n=at(e)?this[t]:e,at(n)&&(n=this.config[t].default),!at(this.options[t])&&!this.options[t].includes(n))return void this.debug.warn("Unsupported value of '".concat(n,"' for ").concat(t));if(!this.config[t].options.includes(n))return void this.debug.warn("Disabled value of '".concat(n,"' for ").concat(t))}if(rt(o)||(o=i&&i.querySelector('[role="menu"]')),rt(o)){this.elements.settings.buttons[t].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=sr.getLabel.call(this,t,n);var a=o&&o.querySelector('[value="'.concat(n,'"]'));rt(a)&&(a.checked=!0)}},getLabel:function(t,r){switch(t){case"speed":return 1===r?rr("normal",this.config):"".concat(r,"×");case"quality":if(W(r)){if(0===r)return rr("auto",this.config);var e=rr("qualityLabel.".concat(r),this.config);return e.length?e:"".concat(r,"p")}return Kt(r);case"captions":return cr.getLabel.call(this);default:return null}},setQualityMenu:function(t){var r=this;if(rt(this.elements.settings.panels.quality)){var e="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');Z(t)&&(this.options.quality=Lt(t).filter((function(t){return r.config.quality.options.includes(t)})));var n=!at(this.options.quality)&&this.options.quality.length>1;if(sr.toggleMenuButton.call(this,e,n),gt(i),sr.checkMenu.call(this),n){var o=function(t){var e=rr("qualityBadge.".concat(t),r.config);return e.length?sr.createBadge.call(r,e):null};this.options.quality.sort((function(t,e){var i=r.config.quality.options;return i.indexOf(t)>i.indexOf(e)?1:-1})).forEach((function(t){sr.createMenuItem.call(r,{value:t,list:i,type:e,title:sr.getLabel.call(r,"quality",t),badge:o(t)})})),sr.updateSetting.call(this,e,i)}}},setCaptionsMenu:function(){var t=this;if(rt(this.elements.settings.panels.captions)){var r="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=cr.getTracks.call(this),n=Boolean(i.length);if(sr.toggleMenuButton.call(this,r,n),gt(e),sr.checkMenu.call(this),n){var o=i.map((function(r,i){return{value:i,checked:t.captions.toggled&&t.currentTrack===i,title:cr.getLabel.call(t,r),badge:r.language&&sr.createBadge.call(t,r.language.toUpperCase()),list:e,type:"language"}}));o.unshift({value:-1,checked:!this.captions.toggled,title:rr("disabled",this.config),list:e,type:"language"}),o.forEach(sr.createMenuItem.bind(this)),sr.updateSetting.call(this,r,e)}}},setSpeedMenu:function(){var t=this;if(rt(this.elements.settings.panels.speed)){var r="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(r){return r>=t.minimumSpeed&&r<=t.maximumSpeed}));var i=!at(this.options.speed)&&this.options.speed.length>1;sr.toggleMenuButton.call(this,r,i),gt(e),sr.checkMenu.call(this),i&&(this.options.speed.forEach((function(i){sr.createMenuItem.call(t,{value:i,list:e,type:r,title:sr.getLabel.call(t,"speed",i)})})),sr.updateSetting.call(this,r,e))}},checkMenu:function(){var t=this.elements.settings.buttons,r=!at(t)&&Object.values(t).some((function(t){return!t.hidden}));bt(this.elements.settings.menu,!r)},focusFirstMenuItem:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var e=t;rt(e)||(e=Object.values(this.elements.settings.panels).find((function(t){return!t.hidden})));var i=e.querySelector('[role^="menuitem"]');Tt.call(this,i,r)}},toggleMenu:function(t){var r=this.elements.settings.popup,e=this.elements.buttons.settings;if(rt(r)&&rt(e)){var i=r.hidden,n=i;if(K(t))n=t;else if(it(t)&&27===t.which)n=!1;else if(et(t)){var o=X(t.composedPath)?t.composedPath()[0]:t.target,a=r.contains(o);if(a||!a&&t.target!==e&&n)return}e.setAttribute("aria-expanded",n),bt(r,!n),wt(this.elements.container,this.config.classNames.menu.open,n),n&&it(t)?sr.focusFirstMenuItem.call(this,null,!0):n||i||Tt.call(this,e,it(t))}},getMenuSize:function(t){var r=t.cloneNode(!0);r.style.position="absolute",r.style.opacity=0,r.removeAttribute("hidden"),t.parentNode.appendChild(r);var e=r.scrollWidth,i=r.scrollHeight;return vt(r),{width:e,height:i}},showMenuPanel:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(r));if(rt(i)){var n=i.parentNode,o=Array.from(n.children).find((function(t){return!t.hidden}));if(Ot.transitions&&!Ot.reducedMotion){n.style.width="".concat(o.scrollWidth,"px"),n.style.height="".concat(o.scrollHeight,"px");var a=sr.getMenuSize.call(this,i),l=function r(e){e.target===n&&["width","height"].includes(e.propertyName)&&(n.style.width="",n.style.height="",Mt.call(t,n,lt,r))};It.call(this,n,lt,l),n.style.width="".concat(a.width,"px"),n.style.height="".concat(a.height,"px")}bt(o,!0),bt(i,!1),sr.focusFirstMenuItem.call(this,i,e)}},setDownloadUrl:function(){var t=this.elements.buttons.download;rt(t)&&t.setAttribute("href",this.download)},create:function(t){var r=this,e=sr.bindMenuItemShortcuts,i=sr.createButton,n=sr.createProgress,o=sr.createRange,a=sr.createTime,l=sr.setQualityMenu,s=sr.setSpeedMenu,p=sr.showMenuPanel;this.elements.controls=null,Z(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));var u=yt("div",mt(this.config.selectors.controls.wrapper));this.elements.controls=u;var c={class:"plyr__controls__item"};return Lt(Z(this.config.controls)?this.config.controls:[]).forEach((function(l){if("restart"===l&&u.appendChild(i.call(r,"restart",c)),"rewind"===l&&u.appendChild(i.call(r,"rewind",c)),"play"===l&&u.appendChild(i.call(r,"play",c)),"fast-forward"===l&&u.appendChild(i.call(r,"fast-forward",c)),"progress"===l){var s=yt("div",{class:"".concat(c.class," plyr__progress__container")}),d=yt("div",mt(r.config.selectors.progress));if(d.appendChild(o.call(r,"seek",{id:"plyr-seek-".concat(t.id)})),d.appendChild(n.call(r,"buffer")),r.config.tooltips.seek){var h=yt("span",{class:r.config.classNames.tooltip},"00:00");d.appendChild(h),r.elements.display.seekTooltip=h}r.elements.progress=d,s.appendChild(r.elements.progress),u.appendChild(s)}if("current-time"===l&&u.appendChild(a.call(r,"currentTime",c)),"duration"===l&&u.appendChild(a.call(r,"duration",c)),"mute"===l||"volume"===l){var y=r.elements.volume;rt(y)&&u.contains(y)||(y=yt("div",ct({},c,{class:"".concat(c.class," plyr__volume").trim()})),r.elements.volume=y,u.appendChild(y)),"mute"===l&&y.appendChild(i.call(r,"mute")),"volume"!==l||pt.isIos||y.appendChild(o.call(r,"volume",ct({max:1,step:.05,value:r.config.volume},{id:"plyr-volume-".concat(t.id)})))}if("captions"===l&&u.appendChild(i.call(r,"captions",c)),"settings"===l&&!at(r.config.settings)){var f=yt("div",ct({},c,{class:"".concat(c.class," plyr__menu").trim(),hidden:""}));f.appendChild(i.call(r,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(t.id),"aria-expanded":!1}));var v=yt("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(t.id),hidden:""}),g=yt("div"),_=yt("div",{id:"plyr-settings-".concat(t.id,"-home")}),m=yt("div",{role:"menu"});_.appendChild(m),g.appendChild(_),r.elements.settings.panels.home=_,r.config.settings.forEach((function(i){var n=yt("button",ct(mt(r.config.selectors.buttons.settings),{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(r,n,i),It.call(r,n,"click",(function(){p.call(r,i,!1)}));var o=yt("span",null,rr(i,r.config)),a=yt("span",{class:r.config.classNames.menu.value});a.innerHTML=t[i],o.appendChild(a),n.appendChild(o),m.appendChild(n);var l=yt("div",{id:"plyr-settings-".concat(t.id,"-").concat(i),hidden:""}),s=yt("button",{type:"button",class:"".concat(r.config.classNames.control," ").concat(r.config.classNames.control,"--back")});s.appendChild(yt("span",{"aria-hidden":!0},rr(i,r.config))),s.appendChild(yt("span",{class:r.config.classNames.hidden},rr("menuBack",r.config))),It.call(r,l,"keydown",(function(t){37===t.which&&(t.preventDefault(),t.stopPropagation(),p.call(r,"home",!0))}),!1),It.call(r,s,"click",(function(){p.call(r,"home",!1)})),l.appendChild(s),l.appendChild(yt("div",{role:"menu"})),g.appendChild(l),r.elements.settings.buttons[i]=n,r.elements.settings.panels[i]=l})),v.appendChild(g),f.appendChild(v),u.appendChild(f),r.elements.settings.popup=v,r.elements.settings.menu=f}if("pip"===l&&Ot.pip&&u.appendChild(i.call(r,"pip",c)),"airplay"===l&&Ot.airplay&&u.appendChild(i.call(r,"airplay",c)),"download"===l){var b=ct({},c,{element:"a",href:r.download,target:"_blank"});r.isHTML5&&(b.download=""),!ot(r.config.urls.download)&&r.isEmbed&&ct(b,{icon:"logo-".concat(r.provider),label:r.provider}),u.appendChild(i.call(r,"download",b))}"fullscreen"===l&&u.appendChild(i.call(r,"fullscreen",c))})),this.isHTML5&&l.call(this,Yt.getQualityOptions.call(this)),s.call(this),u},inject:function(){var r=this;if(this.config.loadSprite){var e=sr.getIconUrl.call(this);e.cors&&nr(e.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var n,o={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(X(this.config.controls)&&(this.config.controls=this.config.controls.call(this,o)),this.config.controls||(this.config.controls=[]),rt(this.config.controls)||G(this.config.controls)?i=this.config.controls:(i=sr.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:cr.getLabel.call(this)}),a=!1),a&&G(this.config.controls)&&(i=function(r){var e=r;return Object.entries(o).forEach((function(r){var i=t(r,2),n=i[1];e=Gt(e,"{".concat(i[0],"}"),n)})),e}(i)),G(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),rt(n)||(n=this.elements.container),n[rt(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),rt(this.elements.controls)||sr.findElements.call(this),!at(this.elements.buttons)){var l=function(t){var e=r.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return kt(t,e)},set:function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];wt(t,e,r)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(t){Z(t)||tt(t)?Array.from(t).filter(Boolean).forEach(l):l(t)}))}if(pt.isEdge&&st(n),this.config.tooltips.controls){var s=this.config,p=s.classNames,u=s.selectors,c="".concat(u.controls.wrapper," ").concat(u.labels," .").concat(p.hidden),d=zt.call(this,c);Array.from(d).forEach((function(t){wt(t,r.config.classNames.hidden,!1),wt(t,r.config.classNames.tooltip,!0)}))}}};function pr(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=t;if(r){var i=document.createElement("a");i.href=e,e=i.href}try{return new URL(e)}catch(t){return null}}function ur(r){var e=new URLSearchParams;return J(r)&&Object.entries(r).forEach((function(r){var i=t(r,2);e.set(i[0],i[1])})),e}var cr={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!Ot.textTracks)Z(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&sr.setCaptionsMenu.call(this);else{if(rt(this.elements.captions)||(this.elements.captions=yt("div",mt(this.config.selectors.captions)),function(t,r){rt(t)&&rt(r)&&r.parentNode.insertBefore(t,r.nextSibling)}(this.elements.captions,this.elements.wrapper)),pt.isIE&&window.URL){var r=this.media.querySelectorAll("track");Array.from(r).forEach((function(t){var r=t.getAttribute("src"),e=pr(r);null!==e&&e.hostname!==window.location.href.hostname&&["http:","https:"].includes(e.protocol)&&ir(r,"blob").then((function(r){t.setAttribute("src",window.URL.createObjectURL(r))})).catch((function(){vt(t)}))}))}var e=Lt((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(t){return t.split("-")[0]}))),i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===i&&(i=t(e,1)[0]);var n=this.storage.get("captions");K(n)||(n=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:n,language:i,languages:e}),this.isHTML5&&It.call(this,this.media.textTracks,this.config.captions.update?"addtrack removetrack":"removetrack",cr.update.bind(this)),setTimeout(cr.update.bind(this),0)}},update:function(){var t=this,r=cr.getTracks.call(this,!0),e=this.captions,i=e.active,n=e.language,o=e.meta,a=e.currentTrackNode,l=Boolean(r.find((function(t){return t.language===n})));this.isHTML5&&this.isVideo&&r.filter((function(t){return!o.get(t)})).forEach((function(r){t.debug.log("Track added",r),o.set(r,{default:"showing"===r.mode}),"showing"===r.mode&&(r.mode="hidden"),It.call(t,r,"cuechange",(function(){return cr.updateCues.call(t)}))})),(l&&this.language!==n||!r.includes(a))&&(cr.setLanguage.call(this,n),cr.toggle.call(this,i&&l)),wt(this.elements.container,this.config.classNames.captions.enabled,!at(r)),Z(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&sr.setCaptionsMenu.call(this)},toggle:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var i=this.captions.toggled,n=this.config.classNames.captions.active,o=Y(t)?!i:t;if(o!==i){if(e||(this.captions.active=o,this.storage.set({captions:o})),!this.language&&o&&!e){var l=cr.getTracks.call(this),s=cr.findTrack.call(this,[this.captions.language].concat(a(this.captions.languages)),!0);return this.captions.language=s.language,void cr.set.call(this,l.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=o),wt(this.elements.container,n,o),this.captions.toggled=o,sr.updateSetting.call(this,"captions"),Et.call(this,this.media,o?"captionsenabled":"captionsdisabled")}setTimeout((function(){o&&r.captions.toggled&&r.captions.currentTrackNode&&(r.captions.currentTrackNode.mode="hidden")}))}},set:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],e=cr.getTracks.call(this);if(-1!==t)if(W(t))if(t in e){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;var i=e[t],n=i||{},o=n.language;this.captions.currentTrackNode=i,sr.updateSetting.call(this,"captions"),r||(this.captions.language=o,this.storage.set({language:o})),this.isVimeo&&this.embed.enableTextTrack(o),Et.call(this,this.media,"languagechange")}cr.toggle.call(this,!0,r),this.isHTML5&&this.isVideo&&cr.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else cr.toggle.call(this,!1,r)},setLanguage:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(G(t)){var e=t.toLowerCase();this.captions.language=e;var i=cr.getTracks.call(this),n=cr.findTrack.call(this,[e]);cr.set.call(this,i.indexOf(n),r)}else this.debug.warn("Invalid language argument",t)},getTracks:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(e){return!t.isHTML5||r||t.captions.meta.has(e)})).filter((function(t){return["captions","subtitles"].includes(t.kind)}))},findTrack:function(t){var r,e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=cr.getTracks.call(this),o=function(t){return Number((e.captions.meta.get(t)||{}).default)},a=Array.from(n).sort((function(t,r){return o(r)-o(t)}));return t.every((function(t){return!(r=a.find((function(r){return r.language===t})))})),r||(i?a[0]:void 0)},getCurrentTrack:function(){return cr.getTracks.call(this)[this.currentTrack]},getLabel:function(t){var r=t;return!nt(r)&&Ot.textTracks&&this.captions.toggled&&(r=cr.getCurrentTrack.call(this)),nt(r)?at(r.label)?at(r.language)?rr("enabled",this.config):t.language.toUpperCase():r.label:rr("disabled",this.config)},updateCues:function(t){if(this.supported.ui)if(rt(this.elements.captions))if(Y(t)||Array.isArray(t)){var r=t;if(!r){var e=cr.getCurrentTrack.call(this);r=Array.from((e||{}).activeCues||[]).map((function(t){return t.getCueAsHTML()})).map(Zt)}var i=r.map((function(t){return t.trim()})).join("\n");if(i!==this.elements.captions.innerHTML){gt(this.elements.captions);var n=yt("span",mt(this.config.selectors.caption));n.innerHTML=i,this.elements.captions.appendChild(n),Et.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",t);else this.debug.warn("No captions element to render to")}},dr={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"},auto:"AUTO"},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},hr={html5:"html5",youtube:"youtube",vimeo:"vimeo"},yr=function(){},fr=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o(this,t),this.enabled=window.console&&r,this.enabled&&this.log("Debugging enabled")}return i(t,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):yr}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):yr}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):yr}}]),t}(),vr=function(){function r(e){var i=this;o(this,r),v(this,"onChange",(function(){if(i.enabled){var t=i.player.elements.buttons.fullscreen;rt(t)&&(t.pressed=i.active),Et.call(i.player,i.target===i.player.media?i.target:i.player.elements.container,i.active?"enterfullscreen":"exitfullscreen",!0)}})),v(this,"toggleFallback",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t?i.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(i.scrollPosition.x,i.scrollPosition.y),document.body.style.overflow=t?"hidden":"",wt(i.target,i.player.config.classNames.fullscreen.fallback,t),pt.isIos){var r=document.head.querySelector('meta[name="viewport"]'),e="viewport-fit=cover";r||(r=document.createElement("meta")).setAttribute("name","viewport");var n=G(r.content)&&r.content.includes(e);t?(i.cleanupViewport=!n,n||(r.content+=",".concat(e))):i.cleanupViewport&&(r.content=r.content.split(",").filter((function(t){return t.trim()!==e})).join(","))}i.onChange()})),v(this,"trapFocus",(function(r){if(!pt.isIos&&i.active&&"Tab"===r.key&&9===r.keyCode){var e=document.activeElement,n=zt.call(i.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),o=t(n,1)[0],a=n[n.length-1];e!==a||r.shiftKey?e===o&&r.shiftKey&&(a.focus(),r.preventDefault()):(o.focus(),r.preventDefault())}})),v(this,"update",(function(){i.player.debug.log(i.enabled?"".concat(i.forceFallback?"Fallback (forced)":r.native?"Native":"Fallback"," fullscreen enabled"):"Fullscreen not supported and fallback disabled"),wt(i.player.elements.container,i.player.config.classNames.fullscreen.enabled,i.enabled)})),v(this,"enter",(function(){i.enabled&&(pt.isIos&&i.player.config.fullscreen.iosNative?i.player.isVimeo?i.player.embed.requestFullscreen():i.target.webkitEnterFullscreen():!r.native||i.forceFallback?i.toggleFallback(!0):i.prefix?at(i.prefix)||i.target["".concat(i.prefix,"Request").concat(i.property)]():i.target.requestFullscreen({navigationUI:"hide"}))})),v(this,"exit",(function(){if(i.enabled)if(pt.isIos&&i.player.config.fullscreen.iosNative)i.target.webkitExitFullscreen(),Rt(i.player.play());else if(!r.native||i.forceFallback)i.toggleFallback(!1);else if(i.prefix){if(!at(i.prefix)){var t="moz"===i.prefix?"Cancel":"Exit";document["".concat(i.prefix).concat(t).concat(i.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),v(this,"toggle",(function(){i.active?i.exit():i.enter()})),this.player=e,this.prefix=r.prefix,this.property=r.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(t,r){return(Element.prototype.closest||function(){var t=this;do{if(xt.matches(t,r))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,r)}(this.player.elements.container,e.config.fullscreen.container),It.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){i.onChange()})),It.call(this.player,this.player.elements.container,"dblclick",(function(t){rt(i.player.elements.controls)&&i.player.elements.controls.contains(t.target)||i.player.listeners.proxy(t,i.toggle,"fullscreen")})),It.call(this,this.player.elements.container,"keydown",(function(t){return i.trapFocus(t)})),this.update()}return i(r,[{key:"usingNative",get:function(){return r.native&&!this.forceFallback}},{key:"enabled",get:function(){return(r.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!r.native||this.forceFallback)return kt(this.target,this.player.config.classNames.fullscreen.fallback);var t=this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}},{key:"target",get:function(){return pt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(X(document.exitFullscreen))return"";var t="";return["webkit","moz","ms"].some((function(r){return!(!X(document["".concat(r,"ExitFullscreen")])&&!X(document["".concat(r,"CancelFullScreen")])||(t=r,0))})),t}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),r}();function gr(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(e,i){var n=new Image,o=function(){delete n.onload,delete n.onerror,(n.naturalWidth>=r?e:i)(n)};Object.assign(n,{onload:o,onerror:o,src:t})}))}var _r={addStyleHook:function(){wt(this.elements.container,this.config.selectors.container.replace(".",""),!0),wt(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var t=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void _r.toggleNativeControls.call(this,!0);rt(this.elements.controls)||(sr.inject.call(this),this.listeners.controls()),_r.toggleNativeControls.call(this),this.isHTML5&&cr.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,sr.updateVolume.call(this),sr.timeUpdate.call(this),_r.checkPlaying.call(this),wt(this.elements.container,this.config.classNames.pip.supported,Ot.pip&&this.isHTML5&&this.isVideo),wt(this.elements.container,this.config.classNames.airplay.supported,Ot.airplay&&this.isHTML5),wt(this.elements.container,this.config.classNames.isIos,pt.isIos),wt(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){Et.call(t,t.media,"ready")}),0),_r.setTitle.call(this),this.poster&&_r.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&sr.durationUpdate.call(this)},setTitle:function(){var t=rr("play",this.config);if(G(this.config.title)&&!at(this.config.title)&&(t+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(r){r.setAttribute("aria-label",t)})),this.isEmbed){var r=jt.call(this,"iframe");if(!rt(r))return;var e=at(this.config.title)?"video":this.config.title,i=rr("frameTitle",this.config);r.setAttribute("title",i.replace("{title}",e))}},togglePoster:function(t){wt(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster:function(t){var r=this,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),Nt.call(this).then((function(){return gr(t)})).catch((function(e){throw t===r.poster&&_r.togglePoster.call(r,!1),e})).then((function(){if(t!==r.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(r.elements.poster.style,{backgroundImage:"url('".concat(t,"')"),backgroundSize:""}),_r.togglePoster.call(r,!0),t})))},checkPlaying:function(t){var r=this;wt(this.elements.container,this.config.classNames.playing,this.playing),wt(this.elements.container,this.config.classNames.paused,this.paused),wt(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(t){Object.assign(t,{pressed:r.playing}),t.setAttribute("aria-label",rr(r.playing?"pause":"play",r.config))})),et(t)&&"timeupdate"===t.type||_r.toggleControls.call(this)},checkLoading:function(t){var r=this;this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){wt(r.elements.container,r.config.classNames.loading,r.loading),_r.toggleControls.call(r)}),this.loading?250:0)},toggleControls:function(t){var r=this.elements.controls;if(r&&this.config.hideControls){var e=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||r.pressed||r.hover||e))}},migrateStyles:function(){var t=this;Object.values(r({},this.media.style)).filter((function(t){return!at(t)&&G(t)&&t.startsWith("--plyr")})).forEach((function(r){t.elements.container.style.setProperty(r,t.media.style.getPropertyValue(r)),t.media.style.removeProperty(r)})),at(this.media.style)&&this.media.removeAttribute("style")}},mr=function(){function r(e){var i=this;o(this,r),v(this,"firstTouch",(function(){var t=i.player,r=t.elements;t.touch=!0,wt(r.container,t.config.classNames.isTouch,!0)})),v(this,"setTabFocus",(function(t){var r=i.player,e=r.elements;clearTimeout(i.focusTimer),("keydown"!==t.type||9===t.which)&&("keydown"===t.type&&(i.lastKeyDown=t.timeStamp),("focus"!==t.type||t.timeStamp-i.lastKeyDown<=20)&&(function(){var t=r.config.classNames.tabFocus;wt(zt.call(r,".".concat(t)),t,!1)}(),"focusout"!==t.type&&(i.focusTimer=setTimeout((function(){var t=document.activeElement;e.container.contains(t)&&wt(document.activeElement,r.config.classNames.tabFocus,!0)}),10))))})),v(this,"global",(function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=i.player;r.config.keyboard.global&&Ct.call(r,window,"keydown keyup",i.handleKey,t,!1),Ct.call(r,document.body,"click",i.toggleMenu,t),At.call(r,document.body,"touchstart",i.firstTouch),Ct.call(r,document.body,"keydown focus blur focusout",i.setTabFocus,t,!1,!0)})),v(this,"container",(function(){var r=i.player,e=r.config,n=r.elements,o=r.timers;!e.keyboard.global&&e.keyboard.focused&&It.call(r,n.container,"keydown keyup",i.handleKey,!1),It.call(r,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(t){var e=n.controls;e&&"enterfullscreen"===t.type&&(e.pressed=!1,e.hover=!1);var i=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(_r.toggleControls.call(r,!0),i=r.touch?3e3:2e3),clearTimeout(o.controls),o.controls=setTimeout((function(){return _r.toggleControls.call(r,!1)}),i)}));var a=function(){if(r.isVimeo&&!r.config.vimeo.premium){var e=n.wrapper,i=r.fullscreen.active,o=Vt.call(r),a=t(o,2),l=a[0],s=a[1],p=Bt("aspect-ratio: ".concat(l," / ").concat(s));if(i){var u=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],c=t(u,2),d=c[1],h=c[0]/d>l/s;p?(e.style.width=h?"auto":"100%",e.style.height=h?"100%":"auto"):(e.style.maxWidth=h?d/s*l+"px":null,e.style.margin=h?"0 auto":null)}else p?(e.style.width=null,e.style.height=null):(e.style.maxWidth=null,e.style.margin=null)}},l=function(){clearTimeout(o.resized),o.resized=setTimeout(a,50)};It.call(r,n.container,"enterfullscreen exitfullscreen",(function(t){r.fullscreen.target===n.container&&(!r.isEmbed&&at(r.config.ratio)||(a(),("enterfullscreen"===t.type?It:Mt).call(r,window,"resize",l)))}))})),v(this,"media",(function(){var t=i.player,r=t.elements;if(It.call(t,t.media,"timeupdate seeking seeked",(function(r){return sr.timeUpdate.call(t,r)})),It.call(t,t.media,"durationchange loadeddata loadedmetadata",(function(r){return sr.durationUpdate.call(t,r)})),It.call(t,t.media,"ended",(function(){t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())})),It.call(t,t.media,"progress playing seeking seeked",(function(r){return sr.updateProgress.call(t,r)})),It.call(t,t.media,"volumechange",(function(r){return sr.updateVolume.call(t,r)})),It.call(t,t.media,"playing play pause ended emptied timeupdate",(function(r){return _r.checkPlaying.call(t,r)})),It.call(t,t.media,"waiting canplay seeked playing",(function(r){return _r.checkLoading.call(t,r)})),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){var e=jt.call(t,".".concat(t.config.classNames.video));if(!rt(e))return;It.call(t,r.container,"click",(function(n){([r.container,e].includes(n.target)||e.contains(n.target))&&(t.touch&&t.config.hideControls||(t.ended?(i.proxy(n,t.restart,"restart"),i.proxy(n,(function(){Rt(t.play())}),"play")):i.proxy(n,(function(){Rt(t.togglePlay())}),"play")))}))}t.supported.ui&&t.config.disableContextMenu&&It.call(t,r.wrapper,"contextmenu",(function(t){t.preventDefault()}),!1),It.call(t,t.media,"volumechange",(function(){t.storage.set({volume:t.volume,muted:t.muted})})),It.call(t,t.media,"ratechange",(function(){sr.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})})),It.call(t,t.media,"qualitychange",(function(r){sr.updateSetting.call(t,"quality",null,r.detail.quality)})),It.call(t,t.media,"ready qualitychange",(function(){sr.setDownloadUrl.call(t)}));var n=t.config.events.concat(["keyup","keydown"]).join(" ");It.call(t,t.media,n,(function(e){var i=e.detail,n=void 0===i?{}:i;"error"===e.type&&(n=t.media.error),Et.call(t,r.container,e.type,!0,n)}))})),v(this,"proxy",(function(t,r,e){var n=i.player,o=n.config.listeners[e],a=!0;X(o)&&(a=o.call(n,t)),!1!==a&&X(r)&&r.call(n,t)})),v(this,"bind",(function(t,r,e,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=i.player,l=a.config.listeners[n],s=X(l);It.call(a,t,r,(function(t){return i.proxy(t,e,n)}),o&&!s)})),v(this,"controls",(function(){var r=i.player,e=r.elements,n=pt.isIE?"change":"input";if(e.buttons.play&&Array.from(e.buttons.play).forEach((function(t){i.bind(t,"click",(function(){Rt(r.togglePlay())}),"play")})),i.bind(e.buttons.restart,"click",r.restart,"restart"),i.bind(e.buttons.rewind,"click",(function(){r.lastSeekTime=Date.now(),r.rewind()}),"rewind"),i.bind(e.buttons.fastForward,"click",(function(){r.lastSeekTime=Date.now(),r.forward()}),"fastForward"),i.bind(e.buttons.mute,"click",(function(){r.muted=!r.muted}),"mute"),i.bind(e.buttons.captions,"click",(function(){return r.toggleCaptions()})),i.bind(e.buttons.download,"click",(function(){Et.call(r,r.media,"download")}),"download"),i.bind(e.buttons.fullscreen,"click",(function(){r.fullscreen.toggle()}),"fullscreen"),i.bind(e.buttons.pip,"click",(function(){r.pip="toggle"}),"pip"),i.bind(e.buttons.airplay,"click",r.airplay,"airplay"),i.bind(e.buttons.settings,"click",(function(t){t.stopPropagation(),t.preventDefault(),sr.toggleMenu.call(r,t)}),null,!1),i.bind(e.buttons.settings,"keyup",(function(t){var e=t.which;[13,32].includes(e)&&(13!==e?(t.preventDefault(),t.stopPropagation(),sr.toggleMenu.call(r,t)):sr.focusFirstMenuItem.call(r,null,!0))}),null,!1),i.bind(e.settings.menu,"keydown",(function(t){27===t.which&&sr.toggleMenu.call(r,t)})),i.bind(e.inputs.seek,"mousedown mousemove",(function(t){var r=e.progress.getBoundingClientRect();t.currentTarget.setAttribute("seek-value",100/r.width*(t.pageX-r.left))})),i.bind(e.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(t){var e=t.currentTarget,i=t.keyCode?t.keyCode:t.which,n="play-on-seeked";if(!it(t)||39===i||37===i){r.lastSeekTime=Date.now();var o=e.hasAttribute(n),a=["mouseup","touchend","keyup"].includes(t.type);o&&a?(e.removeAttribute(n),Rt(r.play())):!a&&r.playing&&(e.setAttribute(n,""),r.pause())}})),pt.isIos){var o=zt.call(r,'input[type="range"]');Array.from(o).forEach((function(t){return i.bind(t,n,(function(t){return st(t.target)}))}))}i.bind(e.inputs.seek,n,(function(t){var e=t.currentTarget,i=e.getAttribute("seek-value");at(i)&&(i=e.value),e.removeAttribute("seek-value"),r.currentTime=i/e.max*r.duration}),"seek"),i.bind(e.progress,"mouseenter mouseleave mousemove",(function(t){return sr.updateSeekTooltip.call(r,t)})),i.bind(e.progress,"mousemove touchmove",(function(t){var e=r.previewThumbnails;e&&e.loaded&&e.startMove(t)})),i.bind(e.progress,"mouseleave touchend click",(function(){var t=r.previewThumbnails;t&&t.loaded&&t.endMove(!1,!0)})),i.bind(e.progress,"mousedown touchstart",(function(t){var e=r.previewThumbnails;e&&e.loaded&&e.startScrubbing(t)})),i.bind(e.progress,"mouseup touchend",(function(t){var e=r.previewThumbnails;e&&e.loaded&&e.endScrubbing(t)})),pt.isWebkit&&Array.from(zt.call(r,'input[type="range"]')).forEach((function(t){i.bind(t,"input",(function(t){return sr.updateRangeFill.call(r,t.target)}))})),r.config.toggleInvert&&!rt(e.display.duration)&&i.bind(e.display.currentTime,"click",(function(){0!==r.currentTime&&(r.config.invertTime=!r.config.invertTime,sr.timeUpdate.call(r))})),i.bind(e.inputs.volume,n,(function(t){r.volume=t.target.value}),"volume"),i.bind(e.controls,"mouseenter mouseleave",(function(t){e.controls.hover=!r.touch&&"mouseenter"===t.type})),e.fullscreen&&Array.from(e.fullscreen.children).filter((function(t){return!t.contains(e.container)})).forEach((function(t){i.bind(t,"mouseenter mouseleave",(function(t){e.controls.hover=!r.touch&&"mouseenter"===t.type}))})),i.bind(e.controls,"mousedown mouseup touchstart touchend touchcancel",(function(t){e.controls.pressed=["mousedown","touchstart"].includes(t.type)})),i.bind(e.controls,"focusin",(function(){var t=r.config,n=r.timers;wt(e.controls,t.classNames.noTransition,!0),_r.toggleControls.call(r,!0),setTimeout((function(){wt(e.controls,t.classNames.noTransition,!1)}),0);var o=i.touch?3e3:4e3;clearTimeout(n.controls),n.controls=setTimeout((function(){return _r.toggleControls.call(r,!1)}),o)})),i.bind(e.inputs.volume,"wheel",(function(e){var i=e.webkitDirectionInvertedFromDevice,n=[e.deltaX,-e.deltaY].map((function(t){return i?-t:t})),o=t(n,2),a=o[0],l=o[1],s=Math.sign(Math.abs(a)>Math.abs(l)?a:l);r.increaseVolume(s/50);var p=r.media.volume;(1===s&&p<1||-1===s&&p>0)&&e.preventDefault()}),"volume",!1)})),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return i(r,[{key:"handleKey",value:function(t){var r=this.player,e=r.elements,i=t.keyCode?t.keyCode:t.which,n="keydown"===t.type,o=n&&i===this.lastKey;if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)&&W(i))if(n){var a=document.activeElement;if(rt(a)){if(a!==e.inputs.seek&&xt(a,r.config.selectors.editable))return;if(32===t.which&&xt(a,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(i)&&(t.preventDefault(),t.stopPropagation()),i){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:o||(r.currentTime=r.duration/10*(i-48));break;case 32:case 75:o||Rt(r.togglePlay());break;case 38:r.increaseVolume(.1);break;case 40:r.decreaseVolume(.1);break;case 77:o||(r.muted=!r.muted);break;case 39:r.forward();break;case 37:r.rewind();break;case 70:r.fullscreen.toggle();break;case 67:o||r.toggleCaptions();break;case 76:r.loop=!r.loop}27===i&&!r.fullscreen.usingNative&&r.fullscreen.active&&r.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null}},{key:"toggleMenu",value:function(t){sr.toggleMenu.call(this.player,t)}}]),r}(),br=function(t,r){return function(t){t.exports=function(){var t=function(){},r={},e={},i={};function n(t,r){if(t){var n=i[t];if(e[t]=r,n)for(;n.length;)n[0](t,r),n.splice(0,1)}}function o(r,e){r.call&&(r={success:r}),e.length?(r.error||t)(e):(r.success||t)(r)}function a(r,e,i,n){var o,l,s=document,p=i.async,u=(i.numRetries||0)+1,c=i.before||t,d=r.replace(/[\?|#].*$/,""),h=r.replace(/^(css|img)!/,"");n=n||0,/(^css!|\.css$)/.test(d)?((l=s.createElement("link")).rel="stylesheet",l.href=h,(o="hideFocus"in l)&&l.relList&&(o=0,l.rel="preload",l.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(d)?(l=s.createElement("img")).src=h:((l=s.createElement("script")).src=r,l.async=void 0===p||p),l.onload=l.onerror=l.onbeforeload=function(t){var s=t.type[0];if(o)try{l.sheet.cssText.length||(s="e")}catch(t){18!=t.code&&(s="e")}if("e"==s){if((n+=1)<u)return a(r,e,i,n)}else if("preload"==l.rel&&"style"==l.as)return l.rel="stylesheet";e(r,s,t.defaultPrevented)},!1!==c(r,l)&&s.head.appendChild(l)}function l(t,r,e){var i,n,o=(t=t.push?t:[t]).length,l=o,s=[];for(i=function(t,e,i){if("e"==e&&s.push(t),"b"==e){if(!i)return;s.push(t)}--o||r(s)},n=0;n<l;n++)a(t[n],i,e)}function s(t,e,i){var a,s;if(e&&e.trim&&(a=e),s=(a?i:e)||{},a){if(a in r)throw"LoadJS";r[a]=!0}function p(r,e){l(t,(function(t){o(s,t),r&&o({success:r,error:e},t),n(a,t)}),s)}if(s.returnPromise)return new Promise(p);p()}return s.ready=function(t,r){return function(t,r){var n,o,a,l=[],s=(t=t.push?t:[t]).length,p=s;for(n=function(t,e){e.length&&l.push(t),--p||r(l)};s--;)(a=e[o=t[s]])?n(o,a):(i[o]=i[o]||[]).push(n)}(t,(function(t){o(r,t)})),s},s.done=function(t){n(t,[])},s.reset=function(){r={},e={},i={}},s.isDefined=function(t){return t in r},s}()}(r={exports:{}}),r.exports}();function wr(t){return new Promise((function(r,e){br(t,{success:r,error:e})}))}function kr(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Et.call(this,this.media,t?"play":"pause"))}var xr={setup:function(){var t=this;wt(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,$t.call(t),J(window.Vimeo)?xr.ready.call(t):wr(t.config.urls.vimeo.sdk).then((function(){xr.ready.call(t)})).catch((function(r){t.debug.warn("Vimeo SDK (player.js) failed to load",r)}))},ready:function(){var e=this,i=this,n=i.config.vimeo,o=n.premium,a=n.referrerPolicy,s=l(n,f);o&&Object.assign(s,{controls:!1,sidedock:!1});var p=ur(r({loop:i.config.loop.active,autoplay:i.autoplay,muted:i.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},s)),u=i.media.getAttribute("src");at(u)&&(u=i.media.getAttribute(i.config.attributes.embed.id));var c=function(t){return at(t)?null:W(Number(t))?t:t.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:t}(u),d=yt("iframe"),h=Wt(i.config.urls.vimeo.iframe,c,p);if(d.setAttribute("src",h),d.setAttribute("allowfullscreen",""),d.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),at(a)||d.setAttribute("referrerPolicy",a),o||!n.customControls)d.setAttribute("data-poster",i.poster),i.media=_t(d,i.media);else{var y=yt("div",{class:i.config.classNames.embedContainer,"data-poster":i.poster});y.appendChild(d),i.media=_t(y,i.media)}n.customControls||ir(Wt(i.config.urls.vimeo.api,h)).then((function(t){!at(t)&&t.thumbnail_url&&_r.setPoster.call(i,t.thumbnail_url).catch((function(){}))})),i.embed=new window.Vimeo.Player(d,{autopause:i.config.autopause,muted:i.muted}),i.media.paused=!0,i.media.currentTime=0,i.supported.ui&&i.embed.disableTextTrack(),i.media.play=function(){return kr.call(i,!0),i.embed.play()},i.media.pause=function(){return kr.call(i,!1),i.embed.pause()},i.media.stop=function(){i.pause(),i.currentTime=0};var v=i.media.currentTime;Object.defineProperty(i.media,"currentTime",{get:function(){return v},set:function(t){var r=i.embed,e=i.media,n=i.volume,o=i.paused&&!r.hasPlayed;e.seeking=!0,Et.call(i,e,"seeking"),Promise.resolve(o&&r.setVolume(0)).then((function(){return r.setCurrentTime(t)})).then((function(){return o&&r.pause()})).then((function(){return o&&r.setVolume(n)})).catch((function(){}))}});var g=i.config.speed.selected;Object.defineProperty(i.media,"playbackRate",{get:function(){return g},set:function(t){i.embed.setPlaybackRate(t).then((function(){g=t,Et.call(i,i.media,"ratechange")})).catch((function(){i.options.speed=[1]}))}});var _=i.config.volume;Object.defineProperty(i.media,"volume",{get:function(){return _},set:function(t){i.embed.setVolume(t).then((function(){_=t,Et.call(i,i.media,"volumechange")}))}});var m=i.config.muted;Object.defineProperty(i.media,"muted",{get:function(){return m},set:function(t){var r=!!K(t)&&t;i.embed.setVolume(r?0:i.config.volume).then((function(){m=r,Et.call(i,i.media,"volumechange")}))}});var b,w=i.config.loop;Object.defineProperty(i.media,"loop",{get:function(){return w},set:function(t){var r=K(t)?t:i.config.loop.active;i.embed.setLoop(r).then((function(){w=r}))}}),i.embed.getVideoUrl().then((function(t){b=t,sr.setDownloadUrl.call(i)})).catch((function(t){e.debug.warn(t)})),Object.defineProperty(i.media,"currentSrc",{get:function(){return b}}),Object.defineProperty(i.media,"ended",{get:function(){return i.currentTime===i.duration}}),Promise.all([i.embed.getVideoWidth(),i.embed.getVideoHeight()]).then((function(r){var n=t(r,2);i.embed.ratio=Qt(n[0],n[1]),$t.call(e)})),i.embed.setAutopause(i.config.autopause).then((function(t){i.config.autopause=t})),i.embed.getVideoTitle().then((function(t){i.config.title=t,_r.setTitle.call(e)})),i.embed.getCurrentTime().then((function(t){v=t,Et.call(i,i.media,"timeupdate")})),i.embed.getDuration().then((function(t){i.media.duration=t,Et.call(i,i.media,"durationchange")})),i.embed.getTextTracks().then((function(t){i.media.textTracks=t,cr.setup.call(i)})),i.embed.on("cuechange",(function(t){var r=t.cues,e=(void 0===r?[]:r).map((function(t){return function(t){var r=document.createDocumentFragment(),e=document.createElement("div");return r.appendChild(e),e.innerHTML=t,r.firstChild.innerText}(t.text)}));cr.updateCues.call(i,e)})),i.embed.on("loaded",(function(){i.embed.getPaused().then((function(t){kr.call(i,!t),t||Et.call(i,i.media,"playing")})),rt(i.embed.element)&&i.supported.ui&&i.embed.element.setAttribute("tabindex",-1)})),i.embed.on("bufferstart",(function(){Et.call(i,i.media,"waiting")})),i.embed.on("bufferend",(function(){Et.call(i,i.media,"playing")})),i.embed.on("play",(function(){kr.call(i,!0),Et.call(i,i.media,"playing")})),i.embed.on("pause",(function(){kr.call(i,!1)})),i.embed.on("timeupdate",(function(t){i.media.seeking=!1,v=t.seconds,Et.call(i,i.media,"timeupdate")})),i.embed.on("progress",(function(t){i.media.buffered=t.percent,Et.call(i,i.media,"progress"),1===parseInt(t.percent,10)&&Et.call(i,i.media,"canplaythrough"),i.embed.getDuration().then((function(t){t!==i.media.duration&&(i.media.duration=t,Et.call(i,i.media,"durationchange"))}))})),i.embed.on("seeked",(function(){i.media.seeking=!1,Et.call(i,i.media,"seeked")})),i.embed.on("ended",(function(){i.media.paused=!0,Et.call(i,i.media,"ended")})),i.embed.on("error",(function(t){i.media.error=t,Et.call(i,i.media,"error")})),n.customControls&&setTimeout((function(){return _r.build.call(i)}),0)}};function zr(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,Et.call(this,this.media,t?"play":"pause"))}function jr(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Tr,Pr,Or,Sr,Cr,Ir,Mr={setup:function(){var t=this;if(wt(this.elements.wrapper,this.config.classNames.embed,!0),J(window.YT)&&X(window.YT.Player))Mr.ready.call(this);else{var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){X(r)&&r(),Mr.ready.call(t)},wr(this.config.urls.youtube.sdk).catch((function(r){t.debug.warn("YouTube API failed to load",r)}))}},getTitle:function(t){var r=this;ir(Wt(this.config.urls.youtube.api,t)).then((function(t){if(J(t)){var e=t.height,i=t.width;r.config.title=t.title,_r.setTitle.call(r),r.embed.ratio=Qt(i,e)}$t.call(r)})).catch((function(){$t.call(r)}))},ready:function(){var t=this,r=t.config.youtube,e=t.media&&t.media.getAttribute("id");if(at(e)||!e.startsWith("youtube-")){var i=t.media.getAttribute("src");at(i)&&(i=t.media.getAttribute(this.config.attributes.embed.id));var n=function(t){return at(t)?null:t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:t}(i),o=yt("div",{id:Jt(t.provider),"data-poster":r.customControls?t.poster:void 0});if(t.media=_t(o,t.media),r.customControls){var a=function(t){return"https://i.ytimg.com/vi/".concat(n,"/").concat(t,"default.jpg")};gr(a("maxres"),121).catch((function(){return gr(a("sd"),121)})).catch((function(){return gr(a("hq"))})).then((function(r){return _r.setPoster.call(t,r.src)})).then((function(r){r.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}t.embed=new window.YT.Player(t.media,{videoId:n,host:jr(r),playerVars:ct({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&r.customControls?0:1,disablekb:1,playsinline:t.config.fullscreen.iosNative?0:1,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},r),events:{onError:function(r){if(!t.media.error){var e=r.data;t.media.error={code:e,message:{2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[e]||"An unknown error occured"},Et.call(t,t.media,"error")}},onPlaybackRateChange:function(r){t.media.playbackRate=r.target.getPlaybackRate(),Et.call(t,t.media,"ratechange")},onReady:function(e){if(!X(t.media.play)){var i=e.target;Mr.getTitle.call(t,n),t.media.play=function(){zr.call(t,!0),i.playVideo()},t.media.pause=function(){zr.call(t,!1),i.pauseVideo()},t.media.stop=function(){i.stopVideo()},t.media.duration=i.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:function(){return Number(i.getCurrentTime())},set:function(r){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,Et.call(t,t.media,"seeking"),i.seekTo(r)}}),Object.defineProperty(t.media,"playbackRate",{get:function(){return i.getPlaybackRate()},set:function(t){i.setPlaybackRate(t)}});var o=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return o},set:function(r){i.setVolume(100*(o=r)),Et.call(t,t.media,"volumechange")}});var a=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return a},set:function(r){var e=K(r)?r:a;a=e,i[e?"mute":"unMute"](),i.setVolume(100*o),Et.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:function(){return i.getVideoUrl()}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}});var l=i.getAvailablePlaybackRates();t.options.speed=l.filter((function(r){return t.config.speed.options.includes(r)})),t.supported.ui&&r.customControls&&t.media.setAttribute("tabindex",-1),Et.call(t,t.media,"timeupdate"),Et.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval((function(){t.media.buffered=i.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&Et.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),Et.call(t,t.media,"canplaythrough"))}),200),r.customControls&&setTimeout((function(){return _r.build.call(t)}),50)}},onStateChange:function(e){var i=e.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(e.data)&&(t.media.seeking=!1,Et.call(t,t.media,"seeked")),e.data){case-1:Et.call(t,t.media,"timeupdate"),t.media.buffered=i.getVideoLoadedFraction(),Et.call(t,t.media,"progress");break;case 0:zr.call(t,!1),t.media.loop?(i.stopVideo(),i.playVideo()):Et.call(t,t.media,"ended");break;case 1:r.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(zr.call(t,!0),Et.call(t,t.media,"playing"),t.timers.playing=setInterval((function(){Et.call(t,t.media,"timeupdate")}),50),t.media.duration!==i.getDuration()&&(t.media.duration=i.getDuration(),Et.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),zr.call(t,!1);break;case 3:Et.call(t,t.media,"waiting")}Et.call(t,t.elements.container,"statechange",!1,{code:e.data})}}})}}},Ar={setup:function(){this.media?(wt(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),wt(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&wt(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=yt("div",{class:this.config.classNames.video}),dt(this.media,this.elements.wrapper),this.elements.poster=yt("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Yt.setup.call(this):this.isYouTube?Mr.setup.call(this):this.isVimeo&&xr.setup.call(this)):this.debug.warn("No media element found!")}},Er=function(){function t(r){var e=this;o(this,t),v(this,"load",(function(){e.enabled&&(J(window.google)&&J(window.google.ima)?e.ready():wr(e.player.config.urls.googleIMA.sdk).then((function(){e.ready()})).catch((function(){e.trigger("error",new Error("Google IMA SDK failed to load"))})))})),v(this,"ready",(function(){var t;e.enabled||((t=e).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),e.startSafetyTimer(12e3,"ready()"),e.managerPromise.then((function(){e.clearSafetyTimer("onAdsManagerLoaded()")})),e.listeners(),e.setupIMA()})),v(this,"setupIMA",(function(){e.elements.container=yt("div",{class:e.player.config.classNames.ads}),e.player.elements.container.appendChild(e.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(e.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(e.player.config.playsinline),e.elements.displayContainer=new google.ima.AdDisplayContainer(e.elements.container,e.player.media),e.loader=new google.ima.AdsLoader(e.elements.displayContainer),e.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){return e.onAdsManagerLoaded(t)}),!1),e.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)}),!1),e.requestAds()})),v(this,"requestAds",(function(){var t=e.player.elements.container;try{var r=new google.ima.AdsRequest;r.adTagUrl=e.tagUrl,r.linearAdSlotWidth=t.offsetWidth,r.linearAdSlotHeight=t.offsetHeight,r.nonLinearAdSlotWidth=t.offsetWidth,r.nonLinearAdSlotHeight=t.offsetHeight,r.forceNonLinearFullSlot=!1,r.setAdWillPlayMuted(!e.player.muted),e.loader.requestAds(r)}catch(t){e.onAdError(t)}})),v(this,"pollCountdown",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!t)return clearInterval(e.countdownTimer),void e.elements.container.removeAttribute("data-badge-text");e.countdownTimer=setInterval((function(){var t=lr(Math.max(e.manager.getRemainingTime(),0)),r="".concat(rr("advertisement",e.player.config)," - ").concat(t);e.elements.container.setAttribute("data-badge-text",r)}),100)})),v(this,"onAdsManagerLoaded",(function(t){if(e.enabled){var r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0,e.manager=t.getAdsManager(e.player,r),e.cuePoints=e.manager.getCuePoints(),e.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){return e.onAdError(t)})),Object.keys(google.ima.AdEvent.Type).forEach((function(t){e.manager.addEventListener(google.ima.AdEvent.Type[t],(function(t){return e.onAdEvent(t)}))})),e.trigger("loaded")}})),v(this,"addCuePoints",(function(){at(e.cuePoints)||e.cuePoints.forEach((function(t){if(0!==t&&-1!==t&&t<e.player.duration){var r=e.player.elements.progress;if(rt(r)){var i=100/e.player.duration*t,n=yt("span",{class:e.player.config.classNames.cues});n.style.left="".concat(i.toString(),"%"),r.appendChild(n)}}}))})),v(this,"onAdEvent",(function(t){var r=e.player.elements.container,i=t.getAd(),n=t.getAdData();switch(function(t){Et.call(e.player,e.player.media,"ads".concat(t.replace(/_/g,"").toLowerCase()))}(t.type),t.type){case google.ima.AdEvent.Type.LOADED:e.trigger("loaded"),e.pollCountdown(!0),i.isLinear()||(i.width=r.offsetWidth,i.height=r.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:e.manager.setVolume(e.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:e.player.ended?e.loadAds():e.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:e.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:e.pollCountdown(),e.resumeContent();break;case google.ima.AdEvent.Type.LOG:n.adError&&e.player.debug.warn("Non-fatal ad error: ".concat(n.adError.getMessage()))}})),v(this,"onAdError",(function(t){e.cancel(),e.player.debug.warn("Ads error",t)})),v(this,"listeners",(function(){var t,r=e.player.elements.container;e.player.on("canplay",(function(){e.addCuePoints()})),e.player.on("ended",(function(){e.loader.contentComplete()})),e.player.on("timeupdate",(function(){t=e.player.currentTime})),e.player.on("seeked",(function(){var r=e.player.currentTime;at(e.cuePoints)||e.cuePoints.forEach((function(i,n){t<i&&i<r&&(e.manager.discardAdBreak(),e.cuePoints.splice(n,1))}))})),window.addEventListener("resize",(function(){e.manager&&e.manager.resize(r.offsetWidth,r.offsetHeight,google.ima.ViewMode.NORMAL)}))})),v(this,"play",(function(){var t=e.player.elements.container;e.managerPromise||e.resumeContent(),e.managerPromise.then((function(){e.manager.setVolume(e.player.volume),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(){}))})),v(this,"resumeContent",(function(){e.elements.container.style.zIndex="",e.playing=!1,Rt(e.player.media.play())})),v(this,"pauseContent",(function(){e.elements.container.style.zIndex=3,e.playing=!0,e.player.media.pause()})),v(this,"cancel",(function(){e.initialized&&e.resumeContent(),e.trigger("error"),e.loadAds()})),v(this,"loadAds",(function(){e.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.initialized=!1,e.requestAds()})).catch((function(){}))})),v(this,"trigger",(function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];var o=e.events[t];Z(o)&&o.forEach((function(t){X(t)&&t.apply(e,i)}))})),v(this,"on",(function(t,r){return Z(e.events[t])||(e.events[t]=[]),e.events[t].push(r),e})),v(this,"startSafetyTimer",(function(t,r){e.player.debug.log("Safety timer invoked from: ".concat(r)),e.safetyTimer=setTimeout((function(){e.cancel(),e.clearSafetyTimer("startSafetyTimer()")}),t)})),v(this,"clearSafetyTimer",(function(t){Y(e.safetyTimer)||(e.player.debug.log("Safety timer cleared from: ".concat(t)),clearTimeout(e.safetyTimer),e.safetyTimer=null)})),this.player=r,this.config=r.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(t,r){e.on("loaded",t),e.on("error",r)})),this.load()}return i(t,[{key:"enabled",get:function(){var t=this.config;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!at(t.publisherId)||ot(t.tagUrl))}},{key:"tagUrl",get:function(){var t=this.config;return ot(t.tagUrl)?t.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(ur({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId}))}}]),t}(),Fr=function(r){var e=[];return r.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(r){var i={};r.split(/\r\n|\n|\r/).forEach((function(r){if(W(i.startTime)){if(!at(r.trim())&&at(i.text)){var e,n,o,a=r.trim().split("#xywh=");e=t(a,1),i.text=e[0],a[1]&&(n=a[1].split(","),o=t(n,4),i.x=o[0],i.y=o[1],i.w=o[2],i.h=o[3])}}else{var l=r.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);l&&(i.startTime=60*Number(l[1]||0)*60+60*Number(l[2])+Number(l[3])+Number("0.".concat(l[4])),i.endTime=60*Number(l[6]||0)*60+60*Number(l[7])+Number(l[8])+Number("0.".concat(l[9])))}})),i.text&&e.push(i)})),e},Nr=function(t,r){var e={};return t>r.width/r.height?(e.width=r.width,e.height=1/t*r.width):(e.height=r.height,e.width=t*r.height),e},Rr=function(){function t(r){var e=this;o(this,t),v(this,"load",(function(){e.player.elements.display.seekTooltip&&(e.player.elements.display.seekTooltip.hidden=e.enabled),e.enabled&&e.getThumbnails().then((function(){e.enabled&&(e.render(),e.determineContainerAutoSizing(),e.loaded=!0)}))})),v(this,"getThumbnails",(function(){return new Promise((function(t){var r=e.player.config.previewThumbnails.src;if(at(r))throw new Error("Missing previewThumbnails.src config attribute");var i=function(){e.thumbnails.sort((function(t,r){return t.height-r.height})),e.player.debug.log("Preview thumbnails",e.thumbnails),t()};if(X(r))r((function(t){e.thumbnails=t,i()}));else{var n=(G(r)?[r]:r).map((function(t){return e.getThumbnail(t)}));Promise.all(n).then(i)}}))})),v(this,"getThumbnail",(function(t){return new Promise((function(r){ir(t).then((function(i){var n={frames:Fr(i),height:null,urlPrefix:""};n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));var o=new Image;o.onload=function(){n.height=o.naturalHeight,n.width=o.naturalWidth,e.thumbnails.push(n),r()},o.src=n.urlPrefix+n.frames[0].text}))}))})),v(this,"startMove",(function(t){if(e.loaded&&et(t)&&["touchmove","mousemove"].includes(t.type)&&e.player.media.duration){if("touchmove"===t.type)e.seekTime=e.player.media.duration*(e.player.elements.inputs.seek.value/100);else{var r=e.player.elements.progress.getBoundingClientRect();e.seekTime=e.player.media.duration*(100/r.width*(t.pageX-r.left)/100),e.seekTime<0&&(e.seekTime=0),e.seekTime>e.player.media.duration-1&&(e.seekTime=e.player.media.duration-1),e.mousePosX=t.pageX,e.elements.thumb.time.innerText=lr(e.seekTime)}e.showImageAtCurrentTime()}})),v(this,"endMove",(function(){e.toggleThumbContainer(!1,!0)})),v(this,"startScrubbing",(function(t){(Y(t.button)||!1===t.button||0===t.button)&&(e.mouseDown=!0,e.player.media.duration&&(e.toggleScrubbingContainer(!0),e.toggleThumbContainer(!1,!0),e.showImageAtCurrentTime()))})),v(this,"endScrubbing",(function(){e.mouseDown=!1,Math.ceil(e.lastTime)===Math.ceil(e.player.media.currentTime)?e.toggleScrubbingContainer(!1):At.call(e.player,e.player.media,"timeupdate",(function(){e.mouseDown||e.toggleScrubbingContainer(!1)}))})),v(this,"listeners",(function(){e.player.on("play",(function(){e.toggleThumbContainer(!1,!0)})),e.player.on("seeked",(function(){e.toggleThumbContainer(!1)})),e.player.on("timeupdate",(function(){e.lastTime=e.player.media.currentTime}))})),v(this,"render",(function(){e.elements.thumb.container=yt("div",{class:e.player.config.classNames.previewThumbnails.thumbContainer}),e.elements.thumb.imageContainer=yt("div",{class:e.player.config.classNames.previewThumbnails.imageContainer}),e.elements.thumb.container.appendChild(e.elements.thumb.imageContainer);var t=yt("div",{class:e.player.config.classNames.previewThumbnails.timeContainer});e.elements.thumb.time=yt("span",{},"00:00"),t.appendChild(e.elements.thumb.time),e.elements.thumb.container.appendChild(t),rt(e.player.elements.progress)&&e.player.elements.progress.appendChild(e.elements.thumb.container),e.elements.scrubbing.container=yt("div",{class:e.player.config.classNames.previewThumbnails.scrubbingContainer}),e.player.elements.wrapper.appendChild(e.elements.scrubbing.container)})),v(this,"destroy",(function(){e.elements.thumb.container&&e.elements.thumb.container.remove(),e.elements.scrubbing.container&&e.elements.scrubbing.container.remove()})),v(this,"showImageAtCurrentTime",(function(){e.mouseDown?e.setScrubbingContainerSize():e.setThumbContainerSizeAndPos();var t=e.thumbnails[0].frames.findIndex((function(t){return e.seekTime>=t.startTime&&e.seekTime<=t.endTime})),r=t>=0,i=0;e.mouseDown||e.toggleThumbContainer(r),r&&(e.thumbnails.forEach((function(r,n){e.loadedImages.includes(r.frames[t].text)&&(i=n)})),t!==e.showingThumb&&(e.showingThumb=t,e.loadImage(i)))})),v(this,"loadImage",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=e.showingThumb,i=e.thumbnails[t],n=i.urlPrefix,o=i.frames[r],a=i.frames[r].text,l=n+a;if(e.currentImageElement&&e.currentImageElement.dataset.filename===a)e.showImage(e.currentImageElement,o,t,r,a,!1),e.currentImageElement.dataset.index=r,e.removeOldImages(e.currentImageElement);else{e.loadingImage&&e.usingSprites&&(e.loadingImage.onload=null);var s=new Image;s.src=l,s.dataset.index=r,s.dataset.filename=a,e.showingThumbFilename=a,e.player.debug.log("Loading image: ".concat(l)),s.onload=function(){return e.showImage(s,o,t,r,a,!0)},e.loadingImage=s,e.removeOldImages(s)}})),v(this,"showImage",(function(t,r,i,n,o){var a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];e.player.debug.log("Showing thumb: ".concat(o,". num: ").concat(n,". qual: ").concat(i,". newimg: ").concat(a)),e.setImageSizeAndOffset(t,r),a&&(e.currentImageContainer.appendChild(t),e.currentImageElement=t,e.loadedImages.includes(o)||e.loadedImages.push(o)),e.preloadNearby(n,!0).then(e.preloadNearby(n,!1)).then(e.getHigherQuality(i,t,r,o))})),v(this,"removeOldImages",(function(t){Array.from(e.currentImageContainer.children).forEach((function(r){if("img"===r.tagName.toLowerCase()){var i=e.usingSprites?500:1e3;if(r.dataset.index!==t.dataset.index&&!r.dataset.deleting){r.dataset.deleting=!0;var n=e.currentImageContainer;setTimeout((function(){n.removeChild(r),e.player.debug.log("Removing thumb: ".concat(r.dataset.filename))}),i)}}}))})),v(this,"preloadNearby",(function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(i){setTimeout((function(){var n=e.thumbnails[0].frames[t].text;if(e.showingThumbFilename===n){var o;o=r?e.thumbnails[0].frames.slice(t):e.thumbnails[0].frames.slice(0,t).reverse();var a=!1;o.forEach((function(t){var r=t.text;if(r!==n&&!e.loadedImages.includes(r)){a=!0,e.player.debug.log("Preloading thumb filename: ".concat(r));var o=e.thumbnails[0].urlPrefix+r,l=new Image;l.src=o,l.onload=function(){e.player.debug.log("Preloaded thumb filename: ".concat(r)),e.loadedImages.includes(r)||e.loadedImages.push(r),i()}}})),a||i()}}),300)}))})),v(this,"getHigherQuality",(function(t,r,i,n){if(t<e.thumbnails.length-1){var o=r.naturalHeight;e.usingSprites&&(o=i.h),o<e.thumbContainerHeight&&setTimeout((function(){e.showingThumbFilename===n&&(e.player.debug.log("Showing higher quality thumb for: ".concat(n)),e.loadImage(t+1))}),300)}})),v(this,"toggleThumbContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.player.config.classNames.previewThumbnails.thumbContainerShown;e.elements.thumb.container.classList.toggle(i,t),!t&&r&&(e.showingThumb=null,e.showingThumbFilename=null)})),v(this,"toggleScrubbingContainer",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=e.player.config.classNames.previewThumbnails.scrubbingContainerShown;e.elements.scrubbing.container.classList.toggle(r,t),t||(e.showingThumb=null,e.showingThumbFilename=null)})),v(this,"determineContainerAutoSizing",(function(){(e.elements.thumb.imageContainer.clientHeight>20||e.elements.thumb.imageContainer.clientWidth>20)&&(e.sizeSpecifiedInCSS=!0)})),v(this,"setThumbContainerSizeAndPos",(function(){if(e.sizeSpecifiedInCSS){if(e.elements.thumb.imageContainer.clientHeight>20&&e.elements.thumb.imageContainer.clientWidth<20){var t=Math.floor(e.elements.thumb.imageContainer.clientHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.width="".concat(t,"px")}else if(e.elements.thumb.imageContainer.clientHeight<20&&e.elements.thumb.imageContainer.clientWidth>20){var r=Math.floor(e.elements.thumb.imageContainer.clientWidth/e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(r,"px")}}else{var i=Math.floor(e.thumbContainerHeight*e.thumbAspectRatio);e.elements.thumb.imageContainer.style.height="".concat(e.thumbContainerHeight,"px"),e.elements.thumb.imageContainer.style.width="".concat(i,"px")}e.setThumbContainerPos()})),v(this,"setThumbContainerPos",(function(){var t=e.player.elements.progress.getBoundingClientRect(),r=e.player.elements.container.getBoundingClientRect(),i=e.elements.thumb.container,n=r.left-t.left+10,o=r.right-t.left-i.clientWidth-10,a=e.mousePosX-t.left-i.clientWidth/2;a<n&&(a=n),a>o&&(a=o),i.style.left="".concat(a,"px")})),v(this,"setScrubbingContainerSize",(function(){var t=Nr(e.thumbAspectRatio,{width:e.player.media.clientWidth,height:e.player.media.clientHeight}),r=t.height;e.elements.scrubbing.container.style.width="".concat(t.width,"px"),e.elements.scrubbing.container.style.height="".concat(r,"px")})),v(this,"setImageSizeAndOffset",(function(t,r){if(e.usingSprites){var i=e.thumbContainerHeight/r.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left="-".concat(r.x*i,"px"),t.style.top="-".concat(r.y*i,"px")}})),this.player=r,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return i(t,[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?Nr(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}]),t}(),Lr={insertElements:function(t,r){var e=this;G(r)?ft(t,this.media,{src:r}):Z(r)&&r.forEach((function(r){ft(t,e.media,r)}))},change:function(r){var e=this;ut(r,"sources.length")?(Yt.cancelRequests.call(this),this.destroy.call(this,(function(){e.options.quality=[],vt(e.media),e.media=null,rt(e.elements.container)&&e.elements.container.removeAttribute("class");var i=r.sources,n=r.type,o=t(i,1)[0],a=o.provider,l=void 0===a?hr.html5:a,s="html5"===l?n:"div",p="html5"===l?{}:{src:o.src};Object.assign(e,{provider:l,type:n,supported:Ot.check(n,l,e.config.playsinline),media:yt(s,p)}),e.elements.container.appendChild(e.media),K(r.autoplay)&&(e.config.autoplay=r.autoplay),e.isHTML5&&(e.config.crossorigin&&e.media.setAttribute("crossorigin",""),e.config.autoplay&&e.media.setAttribute("autoplay",""),at(r.poster)||(e.poster=r.poster),e.config.loop.active&&e.media.setAttribute("loop",""),e.config.muted&&e.media.setAttribute("muted",""),e.config.playsinline&&e.media.setAttribute("playsinline","")),_r.addStyleHook.call(e),e.isHTML5&&Lr.insertElements.call(e,"source",i),e.config.title=r.title,Ar.setup.call(e),e.isHTML5&&Object.keys(r).includes("tracks")&&Lr.insertElements.call(e,"track",r.tracks),(e.isHTML5||e.isEmbed&&!e.supported.ui)&&_r.build.call(e),e.isHTML5&&e.media.load(),at(r.previewThumbnails)||(Object.assign(e.config.previewThumbnails,r.previewThumbnails),e.previewThumbnails&&e.previewThumbnails.loaded&&(e.previewThumbnails.destroy(),e.previewThumbnails=null),e.config.previewThumbnails.enabled&&(e.previewThumbnails=new Rr(e))),e.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}},qr=function(){function t(r,e){var i=this;if(o(this,t),v(this,"play",(function(){return X(i.media.play)?(i.ads&&i.ads.enabled&&i.ads.managerPromise.then((function(){return i.ads.play()})).catch((function(){return Rt(i.media.play())})),i.media.play()):null})),v(this,"pause",(function(){return i.playing&&X(i.media.pause)?i.media.pause():null})),v(this,"togglePlay",(function(t){return(K(t)?t:!i.playing)?i.play():i.pause()})),v(this,"stop",(function(){i.isHTML5?(i.pause(),i.restart()):X(i.media.stop)&&i.media.stop()})),v(this,"restart",(function(){i.currentTime=0})),v(this,"rewind",(function(t){i.currentTime-=W(t)?t:i.config.seekTime})),v(this,"forward",(function(t){i.currentTime+=W(t)?t:i.config.seekTime})),v(this,"increaseVolume",(function(t){i.volume=(i.media.muted?0:i.volume)+(W(t)?t:0)})),v(this,"decreaseVolume",(function(t){i.increaseVolume(-t)})),v(this,"airplay",(function(){Ot.airplay&&i.media.webkitShowPlaybackTargetPicker()})),v(this,"toggleControls",(function(t){if(i.supported.ui&&!i.isAudio){var r=kt(i.elements.container,i.config.classNames.hideControls),e=wt(i.elements.container,i.config.classNames.hideControls,void 0===t?void 0:!t);return e&&Z(i.config.controls)&&i.config.controls.includes("settings")&&!at(i.config.settings)&&sr.toggleMenu.call(i,!1),e!==r&&Et.call(i,i.media,e?"controlshidden":"controlsshown"),!e}return!1})),v(this,"on",(function(t,r){It.call(i,i.elements.container,t,r)})),v(this,"once",(function(t,r){At.call(i,i.elements.container,t,r)})),v(this,"off",(function(t,r){Mt(i.elements.container,t,r)})),v(this,"destroy",(function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(i.ready){var e=function(){document.body.style.overflow="",i.embed=null,r?(Object.keys(i.elements).length&&(vt(i.elements.buttons.play),vt(i.elements.captions),vt(i.elements.controls),vt(i.elements.wrapper),i.elements.buttons.play=null,i.elements.captions=null,i.elements.controls=null,i.elements.wrapper=null),X(t)&&t()):(Ft.call(i),Yt.cancelRequests.call(i),_t(i.elements.original,i.elements.container),Et.call(i,i.elements.original,"destroyed",!0),X(t)&&t.call(i.elements.original),i.ready=!1,setTimeout((function(){i.elements=null,i.media=null}),200))};i.stop(),clearTimeout(i.timers.loading),clearTimeout(i.timers.controls),clearTimeout(i.timers.resized),i.isHTML5?(_r.toggleNativeControls.call(i,!0),e()):i.isYouTube?(clearInterval(i.timers.buffering),clearInterval(i.timers.playing),null!==i.embed&&X(i.embed.destroy)&&i.embed.destroy(),e()):i.isVimeo&&(null!==i.embed&&i.embed.unload().then(e),setTimeout(e,200))}})),v(this,"supports",(function(t){return Ot.mime.call(i,t)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Ot.touch,this.media=r,G(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||tt(this.media)||Z(this.media))&&(this.media=this.media[0]),this.config=ct({},dr,t.defaults,e||{},function(){try{return JSON.parse(i.media.getAttribute("data-plyr-config"))}catch(t){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new fr(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Ot),!Y(this.media)&&rt(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(Ot.check().api){var n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;var a=this.media.tagName.toLowerCase(),l=null,s=null;switch(a){case"div":if(l=this.media.querySelector("iframe"),rt(l)){if(s=pr(l.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?hr.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?hr.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=l,this.elements.container.className="",s.search.length){var p=["1","true"];p.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),p.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=p.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(at(this.provider)||!Object.values(hr).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type="video";break;case"video":case"audio":this.type=a,this.provider=hr.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=Ot.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new mr(this),this.storage=new er(this),this.media.plyr=this,rt(this.elements.container)||(this.elements.container=yt("div",{tabindex:0}),dt(this.media,this.elements.container)),_r.migrateStyles.call(this),_r.addStyleHook.call(this),Ar.setup.call(this),this.config.debug&&It.call(this,this.elements.container,this.config.events.join(" "),(function(t){i.debug.log("event: ".concat(t.type))})),this.fullscreen=new vr(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&_r.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Er(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return Rt(i.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Rr(this))):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 i(t,[{key:"isHTML5",get:function(){return this.provider===hr.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===hr.youtube}},{key:"isVimeo",get:function(){return this.provider===hr.vimeo}},{key:"isVideo",get:function(){return"video"===this.type}},{key:"isAudio",get:function(){return"audio"===this.type}},{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",get:function(){return Number(this.media.currentTime)},set:function(t){if(this.duration){var r=W(t)&&t>0;this.media.currentTime=r?Math.min(t,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var t=this.media.buffered;return W(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var t=parseFloat(this.config.duration),r=(this.media||{}).duration,e=W(r)&&r!==1/0?r:0;return t||e}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(t){var r=t;G(r)&&(r=Number(r)),W(r)||(r=this.storage.get("volume")),W(r)||(r=this.config.volume),r>1&&(r=1),r<0&&(r=0),this.config.volume=r,this.media.volume=r,!at(t)&&this.muted&&r>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(t){var r=t;K(r)||(r=this.storage.get("muted")),K(r)||(r=this.config.muted),this.config.muted=r,this.media.muted=r}},{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",get:function(){return Number(this.media.playbackRate)},set:function(t){var r=this,e=null;W(t)&&(e=t),W(e)||(e=this.storage.get("speed")),W(e)||(e=this.config.speed.selected),e=function(){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),t)}(e,this.minimumSpeed,this.maximumSpeed),this.config.speed.selected=e,setTimeout((function(){r.media.playbackRate=e}),0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,a(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,a(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(t){var r=this.config.quality,e=this.options.quality;if(e.length){var i=[!at(t)&&Number(t),this.storage.get("quality"),r.selected,r.default].find(W),n=!0;if(!e.includes(i)){var o=qt(e,i);this.debug.warn("Unsupported quality option: ".concat(i,", using ").concat(o," instead")),i=o,n=!1}r.selected=i,this.media.quality=i,n&&this.storage.set({quality:i})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(t){var r=K(t)?t:this.config.loop.active;this.config.loop.active=r,this.media.loop=r}},{key:"source",get:function(){return this.media.currentSrc},set:function(t){Lr.change.call(this,t)}},{key:"download",get:function(){var t=this.config.urls.download;return ot(t)?t:this.source},set:function(t){ot(t)&&(this.config.urls.download=t,sr.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(t){this.isVideo?_r.setPoster.call(this,t,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var t=Ht(Vt.call(this));return Z(t)?t.join(":"):t},set:function(t){this.isVideo?G(t)&&Ut(t)?(this.config.ratio=Ht(t),$t.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(t,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(t){var r=K(t)?t:this.config.autoplay;this.config.autoplay=r}},{key:"toggleCaptions",value:function(t){cr.toggle.call(this,t,!1)}},{key:"currentTrack",get:function(){var t=this.captions;return t.toggled?t.currentTrack:-1},set:function(t){cr.set.call(this,t,!1)}},{key:"language",get:function(){return(cr.getCurrentTrack.call(this)||{}).language},set:function(t){cr.setLanguage.call(this,t,!1)}},{key:"pip",get:function(){return Ot.pip?at(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:"picture-in-picture"===this.media.webkitPresentationMode:null},set:function(t){if(Ot.pip){var r=K(t)?t:!this.pip;X(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(r?"picture-in-picture":"inline"),X(this.media.requestPictureInPicture)&&(!this.pip&&r?this.media.requestPictureInPicture():this.pip&&!r&&document.exitPictureInPicture())}}}],[{key:"supported",value:function(t,r,e){return Ot.check(t,r,e)}},{key:"loadSprite",value:function(t,r){return nr(t,r)}},{key:"setup",value:function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;return G(r)?i=Array.from(document.querySelectorAll(r)):tt(r)?i=Array.from(r):Z(r)&&(i=r.filter(rt)),at(i)?null:i.map((function(r){return new t(r,e)}))}}]),t}();function Br(t){t.on("timeupdate",(function(){return function(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&null!==(e=r.mutedPreview)&&void 0!==e&&e.enabled||function(t){var r;0!==t.currentTime&&null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&localStorage.setItem("player-progress-".concat(Dr(t)),t.currentTime)}(t)}(t)})),t.on("ready",(function(){return Ur(t)})),t.on("loadeddata",(function(){return Ur(t)}))}function Dr(t){var r,e;return null==t||null===(r=t.config)||void 0===r||null===(e=r.blockAttributes)||void 0===e?void 0:e.id}function Ur(t){var r,e,i;if(null!=t&&null!==(r=t.config)&&void 0!==r&&r.save_player_position&&(null==t||null===(e=t.config)||void 0===e||null===(i=e.mutedPreview)||void 0===i||!i.enabled)){var n=function(t){return parseFloat(localStorage.getItem("player-progress-".concat(Dr(t))))}(t);return t.hls&&n>=0&&t.hls.startLoad(n),t.duration&&(n=Math.min(n,t.duration)),!n||n<1?0:(t.currentTime=n,null!=t&&t.isVimeo&&setTimeout((function(){t.embed.setCurrentTime(n||0)}),0),n)}}qr.defaults=JSON.parse(JSON.stringify(dr));var Hr=(null===(Tr=window)||void 0===Tr||null===(Pr=Tr.prestoPlayer)||void 0===Pr||null===(Or=Pr.i18n)||void 0===Or?void 0:Or.hide_chapters)||"Hide Chapters",Vr=(null===(Sr=window)||void 0===Sr||null===(Cr=Sr.prestoPlayer)||void 0===Cr||null===(Ir=Cr.i18n)||void 0===Ir?void 0:Ir.show_chapters)||"Show Chapters";const $r='<button class="plyr__controls__item plyr__control" type="button" data-plyr="chapters">\n<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">\n <line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line>\n <line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line>\n <line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>\n</svg>\n<span class="label--pressed plyr__tooltip" role="tooltip">'.concat(Hr,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(Vr,"</span>\n</button>\n");var Qr,Yr,Jr;const Wr='\n<div class="presto-player-toc__wrapper">\n <div class="presto-player-toc__cover" data-player-toc-cover></div>\n <div class="presto-player-toc">\n <div class="presto-player-toc__title">'.concat((null===(Qr=window)||void 0===Qr||null===(Yr=Qr.prestoPlayer)||void 0===Yr||null===(Jr=Yr.i18n)||void 0===Jr?void 0:Jr.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function Gr(t){var r,e,i,o,l,s,p,u,c,d,h,y,f,v=0,g={},_=null,m=0;if(i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t.length)return t;var r={};return t.forEach((function(t){var e,i=t.time.split(":");i.length>1&&(e=60*parseInt(i[0])),r[parseInt(i[1])+parseInt(e)]=t})),r}((null===(r=o=t.detail.plyr)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.chapters)||[]),"html5"!==o.provider||o.duration){if(i&&Object.keys(i).length){l=jQuery(o.elements.container).closest(".presto-player__wrapper").find(".plyr");var b=(f=jQuery(o.elements.controls)).find(".plyr__time");b=b.length?b:f.find(".plyr__progress__container"),(c=l.find('[data-plyr="chapters"]')).length||(c=jQuery($r).insertAfter(b)),(p=l.find(".presto-player-toc__wrapper")).length||(p=jQuery(Wr).appendTo(l)),d=p.find("[data-player-toc-cover]"),u=p.find("[data-player-toc]"),s=l.find(".plyr__progress__container");var w,k=jQuery('<div class="presto-player__chapters"></div>').appendTo(s);h=jQuery('<div class="presto-player__chapter-markers"></div>').appendTo(k),w=0,u.find(".presto-player-toc__chapter").length||(Object.keys(i).forEach((function(t){w++;var r=jQuery(function(t){var r=t.name,e=void 0===r?"Untitled":r,i=t.order,n=void 0===i?1:i,o=t.highlight;return'<div class="presto-player-toc__chapter '.concat(void 0!==o&&o?"is-highlighted":"",'" data-chapter-item>\n \n <span class="presto-player-toc__order">\n ').concat(n,'\n </span>\n <span class="presto-player-toc__name">\n ').concat(e,"\n </div>\n</div>")}({name:i[t].title,order:w})).appendTo(u);r.data("presto-player-timestamp",t),g[t]=r,r.on("click",(function(){o.currentTime=parseFloat(t),o.play(),j(!1)}))})),y=p.find("[data-chapter-item]")),z(),c.off("click"),c.on("click",j),x(),o.off("timeupdate"),o.on("timeupdate",x),_=window.setInterval((function(){m++,o.duration&&(z(),window.clearInterval(_)),m>50&&window.clearInterval(_)}),100),d.off("click"),d.on("click",(function(){return j(!1)})),u.off("mouseleave"),u.on("mouseleave",(function t(){if(o.playing){var r=setTimeout((function(){j(!1),u.off("mouseleave",t)}),2e3);u.on("mouseenter",(function(){clearTimeout(r)}))}}))}}else o.on("loadedmetadata",Gr);function x(){v=o.currentTime;var t=Object.keys(i).filter((function(t){return t<=v})).map((function(t){return parseInt(t,10)})),r=Math.max.apply(Math,a(t));y&&y.removeClass("is-highlighted"),jQuery(g[r||0]).addClass("is-highlighted")}function z(){o.duration&&(Object.keys(i).forEach((function(t){if(parseInt(t)&&!h.find("[data-timestamp=".concat(t,"]")).length){var r,e,n,a,l=i[t],s=parseInt(t)/o.duration*100,p=jQuery((r={position:s,name:"".concat(l.title)},e=r.position,n=r.name,a=void 0===n?"":n,'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(void 0===e?0:e,'%" data-timeline-marker>\n <span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(a,"</span>\n </div>"))).prependTo(h);p.attr("data-timestamp",t),p.data("timestamp",t),p.on("click",(function(){o.currentTime=parseInt(t),o.play()}))}})),p.find("[data-timeline-marker]"))}function j(t){void 0!==n(t)?p.toggleClass("is-showing",t):p.toggleClass("is-showing")}}var Kr;function Xr(t){Kr=t,jQuery(Kr.elements.container).closest(".presto-player__wrapper"),Kr.on("ready",Gr),Kr.on("controlshidden",Zr),Kr.on("controlsshown",te)}function Zr(t){var r,e,i;jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function te(t){var r,e,i;jQuery(null==t||null===(r=t.detail)||void 0===r||null===(e=r.plyr)||void 0===e||null===(i=e.elements)||void 0===i?void 0:i.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function re(t){var e,i;return r(r(r({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}function ee(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasPlayed||(t.config.hasPlayed=!0,null===(e=window)||void 0===e||e.gtag("event","Play",re(t)))}function ie(t){var r;null===(r=window)||void 0===r||r.gtag("event","Pause",re(t))}function ne(t){var r,e;null!=t&&null!==(r=t.config)&&void 0!==r&&r.hasLoaded||(t.config.hasLoaded=!0,null===(e=window)||void 0===e||e.gtag("event","Player Load",re(t)))}var oe,ae={25:!1,50:!1,75:!1,100:!1};function le(t){if(t.currentTime){var r=parseFloat(t.currentTime)/parseFloat(t.duration)*100;Object.keys(ae).forEach((function(e){var i;!ae[e]&&r>=parseInt(e)&&(ae[e]=!0,null===(i=window)||void 0===i||i.gtag("event","".concat(e," Percent Played"),re(t)))}))}}var se="presto-player.analytics",pe="";function ue(t){(oe=t).config.analytics&&(wp.hooks.hasAction("presto.nonceRefreshed",se)||wp.hooks.addAction("presto.nonceRefreshed",se,(function(t){pe=t})),wp.hooks.hasAction("presto.playerPlay",se)||wp.hooks.addAction("presto.playerPlay",se,ce),wp.hooks.hasAction("presto.playerEnded",se)||wp.hooks.addAction("presto.playerEnded",se,ce),wp.hooks.hasAction("presto.playerHidden",se)||wp.hooks.addAction("presto.playerHidden",se,ce),wp.hooks.hasAction("presto.playerPause",se)||wp.hooks.addAction("presto.playerPause",se,ce),wp.hooks.hasAction("presto.playerSeeked",se)||wp.hooks.addAction("presto.playerSeeked",se,ce))}function ce(t){de(function(t){var e,i;return r(r(r({video_current_time:parseInt((null==t?void 0:t.currentTime)||0),video_provider:(null==t?void 0:t.provider)||"html5"},null!=t&&t.duration?{video_duration:parseInt(null==t?void 0:t.duration)}:{}),null!=t&&t.source?{video_url:null==t?void 0:t.source}:{}),null!=t&&null!==(e=t.config)&&void 0!==e&&e.title?{video_title:null==t||null===(i=t.config)||void 0===i?void 0:i.title}:{})}(t))}function de(t){var r,e,i,n,o,a,l,s;if(pe){var p,u,c=new FormData;c.append("action","presto_player_progress"),c.append("duration",null==t?void 0:t.video_current_time),c.append("video_id",null===(r=oe)||void 0===r||null===(e=r.config)||void 0===e?void 0:e.id),c.append("nonce",pe),null!==(i=window)&&void 0!==i&&null!==(n=i.prestoPlayer)&&void 0!==n&&n.debug_navigator?jQuery.ajax({type:"POST",url:null===(o=window)||void 0===o||null===(a=o.prestoPlayer)||void 0===a?void 0:a.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress",duration:null==t?void 0:t.video_current_time,video_id:null===(l=oe)||void 0===l||null===(s=l.config)||void 0===s?void 0:s.id,nonce:pe}}):navigator.sendBeacon(null===(p=window)||void 0===p||null===(u=p.prestoPlayer)||void 0===u?void 0:u.ajaxurl,c)}}function he(t){var r,e;null!==(r=window)&&void 0!==r&&null!==(e=r.prestoPlayer)&&void 0!==e&&e.isPremium&&(function(){var t;null!==(t=window)&&void 0!==t&&t.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",ee),wp.hooks.addAction("presto.playerPause","presto-player",ie),wp.hooks.addAction("presto.playerReady","presto-player",ne),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",le))}(),ue(t))}const ye=function(t){t.on("ready",(function(){var r,e,i,n;null==t||null===(r=t.config)||void 0===r||!r.logo||null!=t&&null!==(e=t.config)&&void 0!==e&&e.logo_added||(jQuery('<img src="'.concat(null==t||null===(i=t.config)||void 0===i?void 0:i.logo,'" class="presto-player__logo is-bottom-right" part="logo">')).insertBefore(null==t||null===(n=t.elements)||void 0===n?void 0:n.controls),t.config.logo_added=!0)}))};function fe(t){var r;null!=t&&null!==(r=t.config)&&void 0!==r&&r.poster&&(t.poster=t.config.poster)}const ve=function(t){t.on("ready",(function(){ge("Ready",t)})),t.on("play",(function(){ge("Play",t)})),t.on("playing",(function(){ge("Playing",t)})),t.on("pause",(function(){ge("Pause",t)})),t.on("ended",(function(){ge("Ended",t)})),t.on("seeked",(function(){ge("Seeked",t)})),t.on("timeupdate",(function(){ge("TimeUpdate",t)})),t.on("enterfullscreen",(function(){ge("EnterFullScreen",t)})),t.on("exitfullscreen",(function(){ge("ExitFullScreen",t)})),document.addEventListener("visibilitychange",(function(){ge("hidden"===document.visibilityState?"Hidden":"Visible",t)})),t.on("statechange",(function(r){var e;switch(null==r||null===(e=r.detail)||void 0===e?void 0:e.code){case 0:ge("Ended",t);break;case 1:ge("Play",t);break;case 2:ge("Pause",t)}}))};function ge(t,r){window.wp.hooks.doAction("presto.player".concat(t),r)}let _e,me=Date.now();const be=t=>{var r,e;if(!t.automations)return;(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e?void 0:e.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(t=>{_e=t})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerTimeUpdate","presto-player",n),null===window||void 0===window||window.wp.hooks.addAction("presto.playerEnded","presto-player",(t=>n(t,100)));let i={0:!1,10:!1,20:!1,30:!1,40:!1,50:!1,60:!1,70:!1,80:!1,90:!1,100:!1};function n(t,r=null){var e;_e&&(null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.ajaxProgress)&&(r||(r=parseFloat(t.currentTime)/parseFloat(t.duration)*100),t.watched=t.watched||{},Object.keys(i).forEach((e=>{var i,n,o,a,l,s,p,u,c;const d=parseInt(e);if(!t.watched[d]&&r>=d){t.watched[d]=!0;let r=new FormData;if(r.append("action","presto_player_progress_percent"),r.append("id",null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.id),r.append("percent",d.toString()),r.append("visit_time",me.toString()),r.append("nonce",_e),(null===(n=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===n?void 0:n.debug)&&console.log(`${d} percent watched.`),null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.debug_navigator)window.jQuery.ajax({type:"POST",url:null===(u=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===u?void 0:u.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress_percent",id:null===(c=null==t?void 0:t.config)||void 0===c?void 0:c.id,visit_time:me,percent:d,nonce:_e}});else{let e=navigator.sendBeacon(null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.ajaxurl,r);(null===(l=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===l?void 0:l.debug)&&(e?console.log("Successfully queued progress:",{id:null===(s=null==t?void 0:t.config)||void 0===s?void 0:s.id,percent:d,visit_time:me,nonce:_e}):console.log("Failed to queue progress",{id:null===(p=null==t?void 0:t.config)||void 0===p?void 0:p.id,percent:d,visit_time:me,nonce:_e}))}}})))}};let we=!1,ke=!1;function xe(t){return t.status>=200&&t.status<300?Promise.resolve(t):Promise.reject(new Error(t.statusText))}const ze=t=>{var r,e;(t.config.analytics||t.config.automations)&&(null===(e=null===(r=null===window||void 0===window?void 0:window.wp)||void 0===r?void 0:r.hooks)||void 0===e||e.addAction("presto.playerPlaying","presto-player",(()=>{null===window||void 0===window||window.wp.hooks.doAction("presto.playerGetNonce")})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerGetNonce","presto-player",(()=>{var t;we||ke||(ke=!0,fetch(`${null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl}?action=presto_refresh_progress_nonce`).then(xe).then((t=>t.json())).then((({data:t})=>{null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),we=!0})).catch((function(t){console.log("Request failed",t)})).finally((()=>{ke=!1})))})))},je=function(t){var r=window.navigator.userAgent;if(r.match(/iPad/i)||r.match(/iPhone/i)){var e=function(t,r){for(var e,i,n,o=null==t||null===(e=t.elements)||void 0===e||null===(i=e.container)||void 0===i||null===(n=i.getRootNode())||void 0===n?void 0:n.host;(null!=o?o.nodeType:void 0)===Node.ELEMENT_NODE&&"BODY"!==o.tagName&&"HTML"!==o.tagName;)r?o.classList.add("presto-player-fullscreen-open"):o.classList.remove("presto-player-fullscreen-open"),o=o.parentNode};wp.hooks.addAction("presto.playerEnterFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active&&e(t,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var r;null!=t&&null!==(r=t.fullscreen)&&void 0!==r&&r.active||e(t,!1)}))}},Te=function(){var t=s(regeneratorRuntime.mark((function t(r){var e,i,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("ResizeObserver"in window!=0){t.next=5;break}return t.next=3,import("./p-97e2763b.js");case 3:window.ResizeObserver=t.sent.ResizeObserver;case 5:if(n=new ResizeObserver((function(t){var r,e=p(t);try{for(e.s();!(r=e.n()).done;){var i=r.value,n=i.contentRect;jQuery(i.target).find(".plyr__menu__container").css({maxHeight:"".concat(n.height-48,"px")})}}catch(t){e.e(t)}finally{e.f()}})),null!=r&&null!==(e=r.elements)&&void 0!==e&&e.container){t.next=8;break}return t.abrupt("return");case 8:n.observe(null==r||null===(i=r.elements)||void 0===i?void 0:i.container),r.on("playing",(function(){var t,e,i=null==r||null===(t=r.elements)||void 0===t?void 0:t.container.getBoundingClientRect();jQuery(null==r||null===(e=r.elements)||void 0===e?void 0:e.container).find(".plyr__menu__container").css({maxHeight:"".concat(i.height-48,"px")})}));case 10:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();function Pe(t){var e,i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r(r(r({},n),{iconUrl:"".concat(null===(e=window)||void 0===e||null===(i=e.prestoPlayer)||void 0===i?void 0:i.plugin_url,"img/sprite.svg")}),{chapters:(null==n?void 0:n.chapters)||[],controls:(null==n?void 0:n.controls)||[],settings:Object.keys((null==n?void 0:n.settings)||{}).length?n.settings:{}}),a=new qr(t,o);return"undefined"!=typeof learndash_video_data&&import("./p-2cd80361.js").then((function(t){(0,t.default)(a)})),"undefined"!=typeof _tutorobject&&import("./p-f0bc72f2.js").then((function(t){(0,t.default)(a)})),ve(a),je(a),Te(a),ye(a),fe(a),Xr(a),prestoPlayer.isAdmin||(ze(a),be(o),Br(a),he(a)),a}function Oe(t){return"string"==typeof t&&t.includes(".m3u8")}const Se=class{constructor(t){u(this,t),this.loaded=c(this,"loaded",7),this.isAdmin=!1,this.previouslyPlaying=!1}async play(){return this.shouldLazyLoad=!1,this.player.play()}async restart(){return this.shouldLazyLoad=!1,this.player.restart()}async pause(){return this.player.pause()}async stop(){return this.player.stop()}async fullscreenToggle(t){return this.player.fullscreen.toggle(t)}async on(t,r){return this.player.on(t,r)}async off(t,r){return this.player.off(t,r)}async handleCurrentTimeChange(t){this.player&&Number.isInteger(t)&&(this.player.duration&&(this.player.currentTime=Math.min(this.player.currentTime,this.player.duration)),this.shouldLazyLoad&&(this.shouldLazyLoad=!1,await new Promise((t=>{setTimeout((async()=>{await this.initialize(),t()}),50)}))),this.player.embed&&!this.player.playing?(this.player.currentTime=t,this.player.muted=!0,this.player.play(),this.player.once("timeupdate",(()=>{this.player.pause(),this.player.currentTime=t,this.player.muted=!1}))):this.player.currentTime=t)}handleStickyChange(){(function(t){for(var r=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)r.push(t=t.parentNode);return r})(this.el).forEach((t=>{t.classList.toggle("presto-sticky-parent",this.isSticky)}))}getConfig(){return Object.assign(Object.assign({},function({preset:t={},chapters:r,branding:e,src:i,analytics:n,automations:o,autoplay:a,blockAttributes:l={},provider:s="",provider_video_id:p="",youtube:u,type:c,isAdmin:d,i18n:h,storage:y={enabled:!d,key:`presto-player-${t.id}`}}){var f,v,g,_;const m=["settings"],b=[...["youtube","vimeo"].includes(s)?["pip"]:[]],w=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((r=>((null==t?void 0:t[r])||m.includes(r))&&!b.includes(r)));(null===(f=null==l?void 0:l.mutedPreview)||void 0===f?void 0:f.enabled)&&(y={enabled:!1});let k=Object.assign(Object.assign(Object.assign(Object.assign({id:null==l?void 0:l.id,title:(null==l?void 0:l.title)||"",blockAttributes:Object.assign(Object.assign({},l),{type:c}),src:i,ajaxProgress:!0,analytics:n,automations:o,mutedPreview:{enabled:null===(v=null==l?void 0:l.mutedPreview)||void 0===v?void 0:v.enabled},chapters:r,controls:w,settings:["captions","quality","loop",...(null==t?void 0:t.speed)?["speed"]:[]],hideControls:null==t?void 0:t.auto_hide,captions:{active:null==t?void 0:t.captions_enabled,language:"auto",update:!1},logo:null==e?void 0:e.logo,logo_width:null==e?void 0:e.logo_width,hide_logo:null==t?void 0:t.hide_logo,lazy_load_youtube:null==t?void 0:t.lazy_load_youtube,save_player_position:!!(null==t?void 0:t.save_player_position),sticky_scroll:null==t?void 0:t.sticky_scroll,play_video_viewport:null==t?void 0:t.play_video_viewport,autoplay:!(!a||(null===(g=window.wp)||void 0===g?void 0:g.blocks))},s?{provider:s}:{}),p?{provider_video_id:p}:{}),(null==l?void 0:l.poster)?{poster:l.poster}:{}),{invertTime:!t.hasOwnProperty("invert_time")||(null==t?void 0:t.invert_time),storage:y,resetOnEnd:!!(null==t?void 0:t.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==l?void 0:l.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==l?void 0:l.playsInline)},tooltips:{controls:!0,seek:!0},i18n:h});return(null===(_=null===window||void 0===window?void 0:window.wp)||void 0===_?void 0:_.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}({preset:this.preset,chapters:this.chapters,branding:this.branding,analytics:!!this.analytics,automations:!!this.automations,autoplay:!this.isAdmin&&!!this.autoplay,blockAttributes:this.blockAttributes,provider:this.provider,youtube:this.youtube,provider_video_id:this.provider_video_id,i18n:this.i18n})),this.iconUrl?{iconUrl:this.iconUrl}:{})}getPlayerData(){return{selector:this.playerEl,src:this.src||"",preload:this.preload,provider:this.provider,config:this.getConfig(),isAdmin:this.isAdmin}}async createPlayer(){return await(t=this.getPlayerData(),e=t.config,i=t.selector,n=t.src,o=t.preload,n&&Oe(n)?import("./p-cd166efe.js").then((function(t){return(0,t.default)({config:e,selector:i,src:n,preload:o})})):new Promise((function(t){return t(new Pe(i,r({},e)))})));var t,e,i,n,o}handlePlayerElementChange(){var t;(({src:t,el:r,preload:e,currentTime:i})=>{if(!r.getAttribute("hls_loaded")&&["metadata","none"].includes(e)&&Oe(t)){if(i>0)return r.style.height=null,r.style.paddingBottom=null,void r.setAttribute("hls_loaded","1");r.style.height="0px",r.style.paddingBottom="56.25%"}})({src:this.src,el:this.playerEl,preload:this.preload,currentTime:null===(t=null==this?void 0:this.player)||void 0===t?void 0:t.currentTime})}handleMutedPreview(t){var r,e,i,n,o,a,l;this.player&&!this.isAdmin&&(!t&&this.preset.captions_enabled&&setTimeout((()=>{var t;this.player.toggleCaptions(null===(t=null==this?void 0:this.preset)||void 0===t?void 0:t.captions_enabled)}),0),(null===(i=null===(e=null===(r=this.originalConfig)||void 0===r?void 0:r.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled)&&(({player:t,mutedPreview:r,captions:e,progress:i,savePosition:n,onPlay:o})=>{var a=window.navigator.userAgent;if(!a.match(/iPad/i)&&!a.match(/iPhone/i)){t.config.mutedPreview.enabled=r,t.muted=r,t.loop=r,t.config.ajaxProgress=!r&&i,t.config.save_player_position=!r&&n;try{t.toggleCaptions(!!r&&!!e)}catch(t){}return setTimeout((()=>{Ur(t)||t.restart(),setTimeout((()=>{t.muted=r,o()}),0)}),0),t}console.log("ios device, do not do muted autoplay")})({player:this.player,mutedPreview:this.mutedPreview,captions:!!(null===(o=null===(n=this.blockAttributes)||void 0===n?void 0:n.mutedPreview)||void 0===o?void 0:o.captions),progress:null===(a=this.originalConfig)||void 0===a?void 0:a.ajaxProgress,savePosition:null===(l=this.originalConfig)||void 0===l?void 0:l.save_player_position,onPlay:()=>this.play()}))}onPlayerReady(){var t,r;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.duration=this.player.duration,this.mutedPreview=null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled,this.renderDynamicOverlays(),this.player.on("timeupdate loadedmetadata",(()=>{this.duration=this.player.duration,this.renderDynamicOverlays()})),Oe(this.src)&&this.player.once("playing",(()=>{this.playerEl.style.height=null,this.playerEl.style.paddingBottom=null,this.playerEl.setAttribute("hls_loaded","1")})),this.player.on("playing",(()=>this.playClass="presto-player--playing")),this.player.on("pause",(()=>this.playClass="presto-player--paused")),this.player.on("ended",(()=>this.playClass="presto-player--ended"))}handlePlayerEvents(t){t.on("ready",(t=>{this.player=t.detail.plyr,this.onPlayerReady()}))}handleLazyLoadChange(){"youtube"!==this.provider||this.shouldLazyLoad||this.isAdmin||setTimeout((()=>{this.onReload("play")}),50)}shouldLazyLoadVideo(){var t,r,e;return"youtube"===this.provider&&!this.autoplay&&!(null===(r=null===(t=this.blockAttributes)||void 0===t?void 0:t.mutedPreview)||void 0===r?void 0:r.enabled)&&!!(null===(e=this.preset)||void 0===e?void 0:e.lazy_load_youtube)}componentWillLoad(){var t,r,e;const i=null===(t=this.el.children)||void 0===t?void 0:t[0];i&&i.classList&&i.classList.contains("presto-iframe-fallback-container")&&i.remove(),this.shouldLazyLoad=this.shouldLazyLoadVideo(),this.i18n=(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.i18n)||(null===(e=null===window||void 0===window?void 0:window.prestoPlayerAdmin)||void 0===e?void 0:e.i18n),this.originalConfig||(this.originalConfig=this.getConfig()),this.trackIntersection()}async componentDidLoad(){setTimeout((()=>{this.initialize(),this.loaded.emit(!0)}),0)}async initialize(){const t=await this.createPlayer();return this.handlePlayerEvents(t),this.syncVideoHeight(),((t,r)=>{if(!r)return;const e=document.createElement("style");t.shadowRoot.append(e),e.appendChild(document.createTextNode(r))})(this.el,this.css),t}async onReload(t){const r=await this.initialize();"play"==t&&r.on("ready",(()=>{this.play(),r.muted=!0,r.muted=!1,r.off("ready",this.play)}))}async syncVideoHeight(){if("ResizeObserver"in window==0){const t=await import("./p-97e2763b.js");window.ResizeObserver=t.ResizeObserver}new ResizeObserver((()=>{this.isSticky||(this.videoHeight=this.el.getBoundingClientRect().height)})).observe(this.el)}playVideoOnlyInViewport(){var t;!this.isAdmin&&(null===(t=this.preset)||void 0===t?void 0:t.play_video_viewport)&&this.player&&("visible"===document.visibilityState?this.observer.observe(this.el):(this.player.playing&&(this.previouslyPlaying=!0),this.pause(),this.observer.disconnect()))}trackIntersection(){this.observer=new IntersectionObserver((t=>{this.handleVisibilityIntersection(null==t?void 0:t[0])})),this.observer.observe(this.el)}handleVisibilityIntersection(t){t&&(this.handleStickyScroll(t),this.handleVisibilityPlayChange(t))}handleStickyScroll(t){var r,e;if(!(null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll))return;if(this.isAdmin||this.mutedPreview||!(null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.playing))return void(this.isSticky=!1);let i=t.boundingClientRect;if(this.isSticky=i.height<-i.top,"visible"===document.visibilityState&&this.isSticky&&this.player){const t=()=>{window.removeEventListener("scroll",t),this.player.paused&&(this.isSticky=!1)};this.player.once("pause",(()=>{window.addEventListener("scroll",t)}))}}handleVisibilityPlayChange(t){var r,e,i;if(!this.isAdmin&&(null===(r=this.preset)||void 0===r?void 0:r.play_video_viewport)&&(!this.player&&this.originalConfig.autoplay&&(this.previouslyPlaying=!0,this.autoplay=!!(null==t?void 0:t.isIntersecting)),this.player)){if(null==t?void 0:t.isIntersecting)return this.originalConfig.autoplay&&(this.autoplay=!0),this.previouslyPlaying&&this.play(),void(this.previouslyPlaying=!1);if("visible"!==document.visibilityState||!this.isSticky){if(null===(i=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled)return this.previouslyPlaying=!0,this.pause(),void this.player.once("playing",(()=>{this.previouslyPlaying=!0,this.pause()}));this.player.playing&&(this.previouslyPlaying=!0),this.pause()}}}renderMutedOverlay(){var t;if(this.player&&this.mutedPreview&&!this.isAdmin)return d("presto-muted-overlay",{mutedOverlay:null===(t=this.player.config.blockAttributes)||void 0===t?void 0:t.mutedOverlay,preset:this.preset,onPlayVideo:()=>{this.mutedPreview=!1,this.play()}})}renderVideo(){var t;switch(this.provider){case"vimeo":return d("presto-vimeo",{player:this.player,getRef:t=>this.playerEl=t,poster:this.poster,src:this.src});case"youtube":return d("presto-youtube",{onReload:t=>this.onReload(null==t?void 0:t.detail),player:this.player,getRef:t=>this.playerEl=t,lazyLoad:this.shouldLazyLoad,poster:this.poster,src:this.src});case"bunny":return d("presto-bunny",{thumbnail:null===(t=null==this?void 0:this.bunny)||void 0===t?void 0:t.thumbnail,getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks});default:return d("presto-video",{getRef:t=>this.playerEl=t,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}}renderCTA(){var t,r,e;if((null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&(null===(e=null===(r=this.preset)||void 0===r?void 0:r.cta)||void 0===e?void 0:e.enabled))return d("presto-cta-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,onPlayVideo:()=>{this.mutedPreview=!1,this.play()},onRewatchVideo:()=>{this.mutedPreview=!1},duration:this.duration})}renderEmailOverlay(){var t,r;if((null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.isPremium)&&!this.isAdmin&&!(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.logged_in))return d("presto-email-overlay",{direction:this.direction,player:this.player,preset:this.preset,videoId:this.video_id,i18n:this.i18n,onPlayVideo:()=>{this.mutedPreview=!1,this.play()},duration:this.duration})}renderActionBar(){var t,r,e;if(null===(r=null===(t=this.preset)||void 0===t?void 0:t.action_bar)||void 0===r?void 0:r.enabled)return d("presto-action-bar",{config:this.preset.action_bar,currentTime:null===(e=null==this?void 0:this.player)||void 0===e?void 0:e.currentTime,duration:this.duration,youtube:this.youtube})}stickyPositionClass(){var t,r;return this.isSticky?(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position)?`presto-sticky--${null===(r=this.preset)||void 0===r?void 0:r.sticky_scroll_position.replace(/\s+/g,"-")}`:"presto-sticky--bottom-right":""}renderDynamicOverlays(){var t,r,e,i,n;this.player&&((null===(t=null==this?void 0:this.overlaysComponent)||void 0===t?void 0:t.offsetParent)||(this.overlaysComponent=document.createElement("presto-dynamic-overlays"),this.overlaysComponent.addEventListener("reloadComponent",(()=>{this.overlaysComponent.remove(),this.overlaysComponent=document.createElement("presto-dynamic-overlays")}),{once:!0})),this.overlaysComponent.style.cssText="display: block !important; opacity: 1 !important; visibility: visible !important;",this.overlaysComponent.overlays=this.overlays,this.overlaysComponent.preset=this.preset,this.overlaysComponent.player=this.player,this.overlaysComponent.enabled=!(null===(i=null===(e=null===(r=this.player)||void 0===r?void 0:r.config)||void 0===e?void 0:e.mutedPreview)||void 0===i?void 0:i.enabled),(null===(n=null==this?void 0:this.overlaysComponent)||void 0===n?void 0:n.offsetParent)||this.player.elements.wrapper.append(this.overlaysComponent))}render(){var t,r,e,i,n;return d(h,{style:{height:this.isSticky?`${this.videoHeight}px`:"auto"}},d("div",{part:"wrapper",dir:this.direction,class:`presto-player__wrapper fitvidsignore\n presto-video-id-${this.video_id}\n ${this.isSticky?"presto-sticky":""}\n ${this.stickyPositionClass()}\n ${"rtl"===this.direction?"rtl":""}\n ${!!(null===(t=this.preset)||void 0===t?void 0:t.skin)&&`skin-${null===(r=this.preset)||void 0===r?void 0:r.skin}`}\n ${(null===(e=this.preset)||void 0===e?void 0:e.hide_youtube)?"hide-youtube-ui":""}\n ${(null===(i=this.preset)||void 0===i?void 0:i.caption_style)?`caption-style-${null===(n=this.preset)||void 0===n?void 0:n.caption_style}`:""}\n ${this.mutedPreview?"is-muted-overlay":""}\n ${this.playClass?this.playClass:""}`},d("div",null,d("slot",{name:"player-start"}),this.renderCTA(),this.renderEmailOverlay(),d("slot",{name:"player-before-video"}),this.renderVideo(),d("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),d("slot",{name:"player-end"}))))}get el(){return y(this)}static get watchers(){return{currentTime:["handleCurrentTimeChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],player:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"],overlays:["renderDynamicOverlays"],preset:["renderDynamicOverlays"]}}};Se.style='@charset "UTF-8";@keyframes plyr-progress{to{background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:0.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;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:var(--plyr-font-weight-regular, 400);line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;z-index:0}.plyr video,.plyr audio,.plyr iframe{display:block;height:100%;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:var(--plyr-badge-background, #4a5464);border-radius:var(--plyr-badge-border-radius, 2px);color:var(--plyr-badge-text-color, #fff);font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in 0.3s ease;bottom:0;display:none;font-size:var(--plyr-font-size-small, 13px);left:0;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform 0.4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width: 480px){.plyr__captions{font-size:var(--plyr-font-size-base, 15px);padding:calc(var(--plyr-control-spacing, 10px) * 2)}}@media (min-width: 768px){.plyr__captions{font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;box-decoration-break:clone;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:0.2em 0.5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:transparent;border:0;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:calc(var(--plyr-control-spacing, 10px) * 0.7);position:relative;transition:all 0.3s ease}.plyr__control svg{display:block;fill:currentColor;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}a.plyr__control::after,a.plyr__control::before{display:none}.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,.plyr__control.plyr__control--pressed .label--not-pressed{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 calc(var(--plyr-control-spacing, 10px) / 2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time{padding-left:0}.plyr__controls:empty{display:none}.plyr [data-plyr=captions],.plyr [data-plyr=pip],.plyr [data-plyr=airplay],.plyr [data-plyr=fullscreen]{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--pip-supported [data-plyr=pip],.plyr--airplay-supported [data-plyr=airplay],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform 0.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 0.2s ease;background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));border-radius:4px;bottom:100%;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-menu-color, #4a5464);font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container::after{border:var(--plyr-menu-arrow-size, 4px) solid transparent;border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));content:"";height:0;position:absolute;right:calc(((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7)) - (var(--plyr-menu-arrow-size, 4px) / 2));top:100%;width:0}.plyr__menu__container [role=menu]{padding:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control::after{border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4)}.plyr__menu__container .plyr__control--forward::after{border-left-color:var(--plyr-menu-arrow-color, #728197);right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.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:var(--plyr-font-weight-regular, 400);margin:calc(var(--plyr-control-spacing, 10px) * 0.7);margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4);position:relative;width:calc(100% - (calc(var(--plyr-control-spacing, 10px) * 0.7) * 2))}.plyr__menu__container .plyr__control--back::after{border-right-color:var(--plyr-menu-arrow-color, #728197);left:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back::before{background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);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 .plyr__control[role=menuitemradio]{padding-left:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container .plyr__control[role=menuitemradio]::before,.plyr__menu__container .plyr__control[role=menuitemradio]::after{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]::before{background:rgba(0, 0, 0, 0.1);content:"";display:block;flex-shrink:0;height:16px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before{background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus::before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover::before{background:rgba(35, 40, 47, 0.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) - 2) * -1);overflow:hidden;padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:transparent;border:0;border-radius:calc(var(--plyr-range-thumb-height, 13px) * 2);color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:calc((var(--plyr-range-thumb-active-shadow-width, 3px) * 2) + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;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:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);-webkit-appearance:none;margin-top:calc(((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px)) / 2) * -1)}.plyr--full-ui input[type=range]::-moz-range-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);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{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:var(--plyr-video-background, var(--plyr-video-background, black));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity 0.2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time::before{content:"⁄";margin-right:var(--plyr-control-spacing, 10px)}@media (max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-tooltip-color, #4a5464);font-size:var(--plyr-font-size-small, 13px);font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:calc(var(--plyr-control-spacing, 10px) / 2) calc(calc(var(--plyr-control-spacing, 10px) / 2) * 1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:hover .plyr__tooltip,.plyr .plyr__control.plyr__tab-focus .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(0.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:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7))}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7));transform:translateX(50%)}.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible{transform:translate(0, 0) scale(1)}.plyr__progress{left:calc(var(--plyr-range-thumb-height, 13px) * 0.5);margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:calc(var(--plyr-range-thumb-height, 13px) * -0.5);margin-right:calc(var(--plyr-range-thumb-height, 13px) * -0.5);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:calc((var(--plyr-range-track-height, 5px) / 2) * -1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:transparent}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;transition:width 0.2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, transparent 25%, transparent 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, transparent 75%, transparent);background-repeat:repeat-x;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:calc(var(--plyr-control-spacing, 10px) / 2);margin-right:calc(var(--plyr-control-spacing, 10px) / 2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:var(--plyr-audio-control-color, #4a5464);padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--audio .plyr__progress__buffer{color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:var(--plyr-video-background, var(--plyr-video-background, black));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:var(--plyr-video-background, var(--plyr-video-background, black));margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:var(--plyr-video-control-color, #fff);left:0;padding:calc(var(--plyr-control-spacing, 10px) / 2);padding-top:calc(var(--plyr-control-spacing, 10px) * 2);position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.plyr--video .plyr__controls{padding:var(--plyr-control-spacing, 10px);padding-top:calc(var(--plyr-control-spacing, 10px) * 3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:0.9;padding:calc(var(--plyr-control-spacing, 10px) * 1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:0.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:hover,.plyr__control--overlaid:focus{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--video .plyr__progress__buffer{color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 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__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:var(--plyr-font-size-xlarge, 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__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:var(--plyr-font-size-xlarge, 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__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:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.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:var(--plyr-font-size-xlarge, 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:#23282f;border-radius:2px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads::after:empty{display:none}.plyr__cues{background:currentColor;display:block;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height, 5px)/2 0 0;opacity:0.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:3px;bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translate(0, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0, 0) scale(1)}.plyr__preview-thumb::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:rgba(0, 0, 0, 0.55);border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity 0.3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.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}.plyr [hidden]{display:none !important}video,iframe{max-width:100%}.plyr--html5 .plyr__video-wrapper,.plyr--youtube .plyr__video-wrapper{height:100%}.plyr__video-wrapper{z-index:1}.presto-player__wrapper{position:relative;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper img{max-width:100%}.presto-player__wrapper .plyr.plyr--video.plyr--menu-open{overflow:hidden}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{top:50%;transform:translateY(-50%)}.presto-player__wrapper .plyr--fullscreen-fallback.plyr{border-radius:0 !important}.presto-player__wrapper .plyr--fullscreen-fallback.plyr iframe{border-radius:0 !important}.presto-player__wrapper .plyr__menu__container{overflow:auto}.presto-player__wrapper .plyr__menu__container:after{display:none}.presto-player__wrapper img{border:none}.presto-player__wrapper video{margin:auto}.presto-player__wrapper iframe{height:100%}.presto-player__wrapper .plyr--video .plyr__control:active,.presto-player__wrapper .plyr--video .plyr__control:focus{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .plyr__poster{background-size:cover;z-index:2}.presto-player__wrapper .presto-player__logo{margin:0;display:block;position:absolute;z-index:3;opacity:0.5;object-fit:contain;transition:bottom 0.4s ease-in-out;max-width:var(--presto-player-logo-width, 75px)}.presto-player__wrapper .presto-player__logo.is-bottom-right{left:auto;right:20px;top:auto;bottom:60px}.presto-player__wrapper .presto-player__logo.is-bottom-left{left:20px;right:auto;top:auto;bottom:60px}@media screen and (min-width: 380px){.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-left,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-left{bottom:20px}}.presto-player__wrapper .presto-player-progress__marker{width:16px;height:16px;padding:0;border:2px solid rgba(255, 255, 255, 0.5);position:absolute;border-radius:9999px;bottom:calc(50% - 8px);z-index:9;margin-left:-8px !important}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__poster{display:none}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__control.plyr__control--overlaid{display:none}.presto-player__wrapper .presto-player__wrapper .plyr__control--overlaid{z-index:4}.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{background:inherit;border:none;outline:0;position:absolute;top:50%;transform:translate(-50%, -50%)}.presto-player__wrapper .plyr__controls__item.plyr__progress__container{position:relative}.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{box-shadow:none}.presto-player__wrapper .plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75)))}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--video .plyr__controls{padding-bottom:calc(var(--plyr-control-spacing, 10px) + env(safe-area-inset-bottom))}.presto-player__wrapper .presto-player-toc{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";line-height:1.4;position:absolute;top:auto;right:0;left:0;bottom:0;max-height:calc(100%);max-width:calc(100%);background:rgba(255, 255, 255, 0.9);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));left:auto;padding:20px 15px;border-radius:4px;width:100%;z-index:9;box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);white-space:nowrap;z-index:3;display:flex;flex-direction:column;transition:bottom 0.25s ease}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc{right:20px;bottom:60px;width:300px;max-height:calc(100% - 80px);max-width:calc(100vw - 70px)}}.presto-player__wrapper .presto-player-toc__wrapper{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out, visibility 0.3s ease-in-out}.presto-player__wrapper .presto-player-toc__wrapper.is-showing{visibility:visible;opacity:1}.presto-player__wrapper .presto-player-toc__cover{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3}.presto-player__wrapper .presto-player-toc__list{flex:1;overflow:auto}.presto-player__wrapper .presto-player-toc__title{font-size:12px;font-weight:bold;margin-bottom:10px;margin-left:10px;margin-right:10px;display:none}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc__title{display:block}}.presto-player__wrapper .presto-player-toc__name{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.presto-player__wrapper .presto-player-toc__chapter{padding:12px;border-radius:3px;cursor:pointer;line-height:1;display:flex;align-items:center;transition:background-color 0.4s ease, color 0.4s ease;margin-bottom:2px;position:relative}.presto-player__wrapper .presto-player-toc__chapter:last-child{margin-bottom:0}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted,.presto-player__wrapper .presto-player-toc__chapter:hover{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted{padding-right:30px}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted:after{background:rgba(255, 255, 255, 0.5);content:"";display:block;flex-shrink:0;height:8px;width:8px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;border-radius:9999px;position:absolute;right:7px}.presto-player__wrapper .presto-player-toc__order{margin-right:12px;opacity:0.5}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper.rtl .presto-player-toc__order{order:2;margin-left:12px;margin-right:0}.presto-player__wrapper.rtl .presto-player-toc__name{direction:rtl}.presto-player__wrapper .presto-player-error{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.9);color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;text-align:center}.presto-player__wrapper .presto-player-error__title{font-size:18px;font-weight:bold;margin-bottom:8px}.presto-player__wrapper .presto-player-error__description{opacity:0.75}.presto-player__wrapper.hide-youtube-ui .plyr__video-embed iframe{top:-50%;height:200%}.presto-player__wrapper .plyr--vimeo.plyr--playing .plyr__video-embed__container{pointer-events:none}.presto-player__wrapper .plyr__control--overlaid{border-radius:6px;padding-left:26px;padding-right:26px;position:absolute !important;top:50% !important}.presto-player__wrapper.skin-stacked .plyr__controls{flex-wrap:wrap}.presto-player__wrapper.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.presto-player__wrapper.skin-stacked .plyr__controls{justify-content:flex-start}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.presto-player__wrapper.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.presto-player__wrapper.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.presto-player__wrapper.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:calc(50%)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}.presto-sticky-parent{z-index:99998}@media screen and (min-width: 960px){.presto-sticky{--presto-sticky-space:15px;position:fixed;z-index:3000;max-width:var(--presto-sticky-width, 380px);width:100vw}.presto-sticky .plyr__controls,.presto-sticky .presto-player-toc__wrapper,.presto-sticky presto-action-bar,.presto-sticky .presto-player__logo{display:none}.presto-sticky--top-left{top:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--top-center{top:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--top-right{top:var(--presto-sticky-space);right:var(--presto-sticky-space)}.presto-sticky--center-left{top:0;bottom:0;margin:auto 0;left:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--center-center{top:0;bottom:0;right:0;left:0;margin:auto;display:flex;align-items:center}.presto-sticky--center-right{top:0;bottom:0;margin:auto 0;right:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--bottom-left{bottom:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--bottom-center{bottom:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--bottom-right{bottom:var(--presto-sticky-space);right:var(--presto-sticky-space)}}.presto-player__overlay{position:absolute;top:50%;left:50%;z-index:3}.presto-player__muted-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.presto-player__muted-overlay .plyr__control--overlaid{display:block;opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay{cursor:pointer}.presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid{opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay .presto-player__logo{display:none}.presto-player__wrapper.is-muted-overlay .plyr__controls{display:none}.presto-player__wrapper.is-muted-overlay .plyr .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(0) !important}.presto-player__wrapper.rtl .plyr__captions{direction:rtl}.presto-player__wrapper .plyr__captions{z-index:1}.presto-player__wrapper.caption-style-full .plyr__captions{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));padding-top:0;padding-bottom:0}.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 13px) * -4))}.presto-player__wrapper.caption-style-full.skin-stacked .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 17px) * -4))}.presto-player__play-cover{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.presto-player__chapters{width:100%;position:absolute;top:0;height:100%}.presto-player__chapter-markers{margin:0 8px;height:100%;position:relative}.presto-player-progress__marker.plyr__controls__item.plyr__control:hover{border:0;background:#fff}.presto-iframe-fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.presto-iframe-fallback-container embed,.presto-iframe-fallback-container iframe,.presto-iframe-fallback-container object{position:absolute;top:0;left:0;width:100%;height:100%}@media (min-aspect-ratio: 16/9){.hide-youtube-ui presto-youtube .plyr:fullscreen .plyr__video-wrapper{width:calc(calc(1600 / 9) * 1vh)}}';export{Pe as P,Se as a,Ur as r}
|
dist/components/web-components/p-befb412c.entry.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import{r as s,h as t}from"./p-3cd9ce84.js";const i=class{constructor(t){s(this,t)}render(){return t("video",{class:"presto-player__player",part:"video",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster,playsinline:this.playsinline},t("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((s=>t("track",{kind:"captions",label:(null==s?void 0:s.label)?s.label:"Captions",src:null==s?void 0:s.src,srclang:(null==s?void 0:s.srcLang)?null==s?void 0:s.srcLang:"en"}))))}};i.style=":host{display:block}";export{i as presto_video}
|
|
dist/components/web-components/p-c5caf800.entry.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
export{a as presto_player}from"./p-0c9b972a.js";import"./p-3cd9ce84.js";
|
|
dist/components/web-components/p-cd166efe.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
import{l as n,d as r}from"./p-3cd9ce84.js";import{P as e}from"./p-ad3b0509.js";export default function(t){var o=t.config,a=t.selector,i=t.src,u=t.preload;return new Promise(function(){var t=n(regeneratorRuntime.mark((function n(t){var c,s,w;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(window.Hls){n.next=6;break}case 1:if(window.hasOwnProperty("Hls")){n.next=6;break}return n.next=4,new Promise((function(n){return setTimeout(n,50)}));case 4:n.next=1;break;case 6:if(!window.Hls.isSupported()){n.next=14;break}return s=!["metadata","none"].includes(u),null!==(c=wp)&&void 0!==c&&c.blocks&&(s=!0),(w=new window.Hls({autoStartLoad:s})).loadSource(i),w.on(window.Hls.Events.LEVEL_SWITCHED,(function(n,r){a.closest(".presto-player__wrapper").querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span").innerHTML=w.autoLevelEnabled?"AUTO (".concat(w.levels[r.level].height,"p)"):"AUTO"})),w.on(window.Hls.Events.MANIFEST_PARSED,(function(){var n=w.levels.map((function(n){return n.height}));n.unshift(0);var i=n.findIndex((function(n){var r;return n===parseInt(null===(r=prestoPlayer)||void 0===r?void 0:r.hls_start_level)}));w.startLevel=i?i-1:2,o.quality={default:0,options:n,forced:!0,onChange:function(n){0===n?prestoHLS.currentLevel=-1:prestoHLS.levels.forEach((function(r,e){r.height===n&&(console.log("Found quality match with "+n),prestoHLS.currentLevel=e)}))}},w.attachMedia(a),window.prestoHLS=w;var u=new e(a,r({},o));return u.hls=w,u.on("waiting",(function n(){w.startLoad(-1),u.off("waiting",n)})),u.on("languagechange",(function(){setTimeout((function(){return w.subtitleTrack=u.currentTrack}),50)})),t(u)})),n.abrupt("return");case 14:return n.abrupt("return",t(new e(a,r({},o))));case 15:case"end":return n.stop()}}),n)})));return function(n,r){return t.apply(this,arguments)}}())}
|
dist/components/web-components/web-components.esm.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
import{p as e,b as t}from"./p-3cd9ce84.js";var r,o;(r=import.meta.url,o={},""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)).then((e=>t([["p-9f452570",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-68b41006",[[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}]]],["p-
|
1 |
+
import{p as e,b as t}from"./p-3cd9ce84.js";var r,o;(r=import.meta.url,o={},""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)).then((e=>t([["p-9f452570",[[1,"presto-player-skeleton",{effect:[1]}]]],["p-68b41006",[[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}]]],["p-80162be3",[[0,"presto-video",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],tracks:[16],playsinline:[4],provider:[1]}]]],["p-c4624abd",[[1,"presto-action-bar-ui",{open:[4]}],[0,"presto-youtube-subscribe-button",{channel:[1],layout:[1],showCount:[4,"show-count"]}]]],["p-928731f7",[[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}],[1,"presto-player-button",{type:[513],size:[513],full:[516],disabled:[516],submit:[516],name:[1],value:[1],href:[1],target:[513],download:[1],hasFocus:[32],hasLabel:[32],hasPrefix:[32],hasSuffix:[32]}]]],["p-928a6be0",[[1,"presto-cta-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],showButton:[4,"show-button"],buttonText:[1,"button-text"],buttonType:[1,"button-type"],buttonLink:[16],allowRewatch:[4,"allow-rewatch"],allowSkip:[4,"allow-skip"],direction:[1],i18n:[16]}]]],["p-2d9ca1c5",[[1,"presto-email-overlay-ui",{headline:[1],bottomText:[1,"bottom-text"],buttonText:[1,"button-text"],allowSkip:[4,"allow-skip"],borderRadius:[2,"border-radius"],isLoading:[4,"is-loading"],errorMessage:[1,"error-message"],direction:[1],i18n:[16],email:[32]}],[1,"presto-player-spinner"]]],["p-6828d2d9",[[1,"presto-action-bar",{config:[16],currentTime:[2,"current-time"],duration:[2],direction:[1],youtube:[16],show:[32],youtubeRenderKey:[32]}],[0,"presto-cta-overlay",{player:[8],preset:[16],videoId:[2,"video-id"],i18n:[16],duration:[2],direction:[1],enabled:[32],show:[32],loading:[32],error:[32],skipped:[32],percentagePassed:[32],currentTime:[32],ended:[32]}],[0,"presto-email-overlay",{player:[8],preset:[16],videoId:[2,"video-id"],i18n:[16],duration:[2],direction:[1],enabled:[32],show:[32],loading:[32],error:[32],currentTime:[32]}],[0,"presto-bunny",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1025],player:[8],tracks:[16],playsinline:[4],provider:[1],thumbnail:[1],previewUrl:[1,"preview-url"]}],[1,"presto-dynamic-overlays",{overlays:[16],player:[8],preset:[16],enabled:[4],currentTime:[32],destroy:[32]}],[0,"presto-youtube",{src:[1],poster:[1025],lazyLoad:[1028,"lazy-load"],player:[8],getRef:[1040],reloadPlayer:[32],isWebView:[32]}],[0,"presto-muted-overlay",{mutedPreview:[4,"muted-preview"],mutedOverlay:[16],preset:[16]}],[0,"presto-vimeo",{src:[1],poster:[1],player:[8],getRef:[1040]}]]],["p-8c3f8656",[[1,"presto-player",{video_id:[2],iconUrl:[1,"icon-url"],src:[1],bunny:[16],branding:[16],config:[16],preset:[16],chapters:[16],overlays:[16],blockAttributes:[16],tracks:[16],analytics:[4],automations:[4],provider:[1],provider_video_id:[1],actionBar:[16],youtube:[16],type:[1],autoplay:[1540],preload:[1],poster:[1],playsinline:[4],isAdmin:[4,"is-admin"],direction:[1],css:[1],currentTime:[2,"current-time"],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32],play:[64],restart:[64],pause:[64],stop:[64],fullscreenToggle:[64],on:[64],off:[64]},[[8,"visibilitychange","playVideoOnlyInViewport"]]]]]],e)));
|
dist/player/global-18e6daa2.css
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
*
|
3 |
-
* Presto Player
|
4 |
-
*
|
5 |
-
* @author Presto Made, Inc
|
6 |
-
* @version 0.1.0
|
7 |
-
* @link undefined
|
8 |
-
* @license GPL
|
9 |
-
*
|
10 |
-
* Copyright (c) 2021 Presto Made, Inc
|
11 |
-
*
|
12 |
-
* This software is released under the GPL License
|
13 |
-
* https://opensource.org/licenses/GPL
|
14 |
-
*
|
15 |
-
* Compiled with the help of https://wpack.io
|
16 |
-
* A zero setup Webpack Bundler Script for WordPress
|
17 |
-
*/
|
18 |
-
.presto-block-video{border-radius:var(--presto-player-border-radius,0);overflow:hidden;-webkit-transform:translateZ(0);transform:translateZ(0)}.presto-block-video.presto-sticky-parent{overflow:auto;-webkit-transform:none;transform:none}.presto-sticky-parent{z-index:99998!important}.presto-player-fullscreen-open{z-index:9999999!important;overflow:visible!important;-webkit-transform:none!important;transform:none!important}
|
19 |
-
|
20 |
-
/*# sourceMappingURL=global-18e6daa2.css.map*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/player/global-18e6daa2.css.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///./src/player/global.scss"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oBACE,mDACA,gBACA,wDAEA,yCACE,cACA,sCAIJ,sBACE,wBAGF,+BACE,0BACA,2BACA,0D","file":"player/global-18e6daa2.css","sourcesContent":[".presto-block-video {\n border-radius: var(--presto-player-border-radius, 0px);\n overflow: hidden;\n transform: translateZ(0); // Safari bug\n\n &.presto-sticky-parent {\n overflow: auto;\n transform: none;\n }\n}\n\n.presto-sticky-parent {\n z-index: 99998 !important;\n}\n\n.presto-player-fullscreen-open {\n z-index: 9999999 !important;\n overflow: visible !important;\n transform: none !important; // Safari bug\n}\n"],"sourceRoot":""}
|
|
dist/player/global-cb63282d.js
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
*
|
3 |
-
* Presto Player
|
4 |
-
*
|
5 |
-
* @author Presto Made, Inc
|
6 |
-
* @version 0.1.0
|
7 |
-
* @link undefined
|
8 |
-
* @license GPL
|
9 |
-
*
|
10 |
-
* Copyright (c) 2021 Presto Made, Inc
|
11 |
-
*
|
12 |
-
* This software is released under the GPL License
|
13 |
-
* https://opensource.org/licenses/GPL
|
14 |
-
*
|
15 |
-
* Compiled with the help of https://wpack.io
|
16 |
-
* A zero setup Webpack Bundler Script for WordPress
|
17 |
-
*/
|
18 |
-
(window.wpackioprestoPlayerplayerJsonp=window.wpackioprestoPlayerplayerJsonp||[]).push([[0],[function(o,p,r){r(1),o.exports=r(2)},function(o,p,r){var a="prestoPlayerdist".replace(/[^a-zA-Z0-9_-]/g,"");r.p=window["__wpackIo".concat(a)]},function(o,p,r){"use strict";r.r(p)}],[[0,1]]]);
|
19 |
-
//# sourceMappingURL=global-cb63282d.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/player/global-cb63282d.js.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///./node_modules/@wpackio/entrypoint/lib/index.js"],"names":["path","replace","window","concat"],"mappings":";;;;;;;;;;;;;;;;;kJASgB,IAAIA,EAAK,mBAA6CC,QAAQ,kBAAkB,IAChG,IAAwBC,OAAO,YAAYC,OAAOH,K","file":"player/global-cb63282d.js","sourcesContent":["/* eslint-disable camelcase */ /* eslint-disable babel/camelcase */ /* eslint-disable no-underscore-dangle */ // eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n/* global __webpack_public_path__ */ // eslint-disable-next-line spaced-comment\n///<reference types=\"webpack-env\" />\n// We expect __webpack_public_path__ to be present, thanks to webpack\n// We are not using DOM in the typescript library, so let's just hack our way\n// through window\n// tslint:disable-next-line:no-any\n// We would override __webpack_public_path__ only if __WPACKIO__ webpack plugin is set\nif(__WPACKIO__){var path=(__WPACKIO__.appName+__WPACKIO__.outputPath).replace(/[^a-zA-Z0-9_-]/g,'');// eslint-disable-next-line no-global-assign\n__webpack_public_path__=window[\"__wpackIo\".concat(path)];}"],"sourceRoot":""}
|
|
dist/player/global.dependencies.wp.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
{
|
2 |
"dependencies": [],
|
3 |
-
"version": "
|
4 |
}
|
1 |
{
|
2 |
"dependencies": [],
|
3 |
+
"version": "4105fcaa72826451a0b93ff3e631e5db"
|
4 |
}
|
dist/player/manifest.json
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
{
|
2 |
-
"global.
|
3 |
-
"global.
|
4 |
-
"global.js": "player/global
|
5 |
-
"global.js.map": "player/global
|
6 |
-
"runtime.js": "player/runtime
|
7 |
-
"runtime.js.map": "player/runtime
|
|
|
|
|
8 |
"wpackioEp": {
|
9 |
"global": {
|
10 |
"assets": {
|
11 |
"js": [
|
12 |
-
"player/runtime
|
13 |
-
"player/global
|
|
|
14 |
],
|
15 |
"js.map": [
|
16 |
-
"player/runtime
|
17 |
-
"player/global
|
18 |
-
|
19 |
-
|
20 |
-
"
|
21 |
-
],
|
22 |
-
"css.map": [
|
23 |
-
"player/global-18e6daa2.css.map"
|
24 |
]
|
25 |
}
|
26 |
}
|
1 |
{
|
2 |
+
"global.js": "player/global.js",
|
3 |
+
"global.js.map": "global.60479f87dc6fc5df2700.hot-update.js.map",
|
4 |
+
"player/global.js.map": "player/global.js.map",
|
5 |
+
"player/vendors--presto-player--global.js.map": "player/vendors--presto-player--global.js.map",
|
6 |
+
"runtime.js": "player/runtime.js",
|
7 |
+
"runtime.js.map": "player/runtime.js.map",
|
8 |
+
"vendors--presto-player--global.js": "player/vendors--presto-player--global.js",
|
9 |
+
"vendors--presto-player--global.js.map": "vendors--presto-player--global.60479f87dc6fc5df2700.hot-update.js.map",
|
10 |
"wpackioEp": {
|
11 |
"global": {
|
12 |
"assets": {
|
13 |
"js": [
|
14 |
+
"player/runtime.js",
|
15 |
+
"player/vendors--presto-player--global.js",
|
16 |
+
"player/global.js"
|
17 |
],
|
18 |
"js.map": [
|
19 |
+
"player/runtime.js.map",
|
20 |
+
"player/vendors--presto-player--global.js.map",
|
21 |
+
"vendors--presto-player--global.60479f87dc6fc5df2700.hot-update.js.map",
|
22 |
+
"player/global.js.map",
|
23 |
+
"global.60479f87dc6fc5df2700.hot-update.js.map"
|
|
|
|
|
|
|
24 |
]
|
25 |
}
|
26 |
}
|
dist/player/runtime-aede2208.js
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
*
|
3 |
-
* Presto Player
|
4 |
-
*
|
5 |
-
* @author Presto Made, Inc
|
6 |
-
* @version 0.1.0
|
7 |
-
* @link undefined
|
8 |
-
* @license GPL
|
9 |
-
*
|
10 |
-
* Copyright (c) 2021 Presto Made, Inc
|
11 |
-
*
|
12 |
-
* This software is released under the GPL License
|
13 |
-
* https://opensource.org/licenses/GPL
|
14 |
-
*
|
15 |
-
* Compiled with the help of https://wpack.io
|
16 |
-
* A zero setup Webpack Bundler Script for WordPress
|
17 |
-
*/!function(e){function r(r){for(var n,l,a=r[0],p=r[1],i=r[2],c=0,s=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,i||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var p=t[a];0!==o[p]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="";var a=window.wpackioprestoPlayerplayerJsonp=window.wpackioprestoPlayerplayerJsonp||[],p=a.push.bind(a);a.push=r,a=a.slice();for(var i=0;i<a.length;i++)r(a[i]);var f=p;t()}([]);
|
18 |
-
//# sourceMappingURL=runtime-aede2208.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist/player/runtime-aede2208.js.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice"],"mappings":";;;;;;;;;;;;;;;;gBACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS,IAUV,OANAhB,EAAQd,GAAUW,KAAKoB,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAG/DK,EAAOC,GAAI,EAGJD,EAAOD,QAKfJ,EAAoBO,EAAInB,EAGxBY,EAAoBQ,EAAIN,EAGxBF,EAAoBS,EAAI,SAASL,EAASM,EAAMC,GAC3CX,EAAoBY,EAAER,EAASM,IAClC5B,OAAO+B,eAAeT,EAASM,EAAM,CAAEI,YAAY,EAAMC,IAAKJ,KAKhEX,EAAoBgB,EAAI,SAASZ,GACX,oBAAXa,QAA0BA,OAAOC,aAC1CpC,OAAO+B,eAAeT,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DrC,OAAO+B,eAAeT,EAAS,aAAc,CAAEe,OAAO,KAQvDnB,EAAoBoB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQnB,EAAoBmB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKzC,OAAO0C,OAAO,MAGvB,GAFAxB,EAAoBgB,EAAEO,GACtBzC,OAAO+B,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBS,EAAEc,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAAStB,GAChC,IAAIM,EAASN,GAAUA,EAAOiB,WAC7B,WAAwB,OAAOjB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO/C,OAAOC,UAAUC,eAAeC,KAAK2C,EAAQC,IAGzG7B,EAAoB8B,EAAI,GAExB,IAAIC,EAAaC,OAAuC,+BAAIA,OAAuC,gCAAK,GACpGC,EAAmBF,EAAW5C,KAAKuC,KAAKK,GAC5CA,EAAW5C,KAAOf,EAClB2D,EAAaA,EAAWG,QACxB,IAAI,IAAIvD,EAAI,EAAGA,EAAIoD,EAAWlD,OAAQF,IAAKP,EAAqB2D,EAAWpD,IAC3E,IAAIU,EAAsB4C,EAI1BxC,I","file":"player/runtime-aede2208.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"wpackioprestoPlayerplayerJsonp\"] = window[\"wpackioprestoPlayerplayerJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
|
|
inc/Services/Scripts.php
CHANGED
@@ -336,26 +336,7 @@ class Scripts
|
|
336 |
public function globalStyles()
|
337 |
{ ?>
|
338 |
<style>
|
339 |
-
|
340 |
-
border-radius: var(--presto-player-border-radius, 0px);
|
341 |
-
overflow: hidden;
|
342 |
-
transform: translateZ(0);
|
343 |
-
}
|
344 |
-
|
345 |
-
.presto-block-video .presto-sticky-parent {
|
346 |
-
overflow: auto;
|
347 |
-
transform: none;
|
348 |
-
}
|
349 |
-
|
350 |
-
.presto-sticky-parent {
|
351 |
-
z-index: 99998 !important;
|
352 |
-
}
|
353 |
-
|
354 |
-
.presto-player-fullscreen-open {
|
355 |
-
z-index: 9999999 !important;
|
356 |
-
overflow: visible !important;
|
357 |
-
transform: none !important;
|
358 |
-
}
|
359 |
</style>
|
360 |
<?php }
|
361 |
|
336 |
public function globalStyles()
|
337 |
{ ?>
|
338 |
<style>
|
339 |
+
<?php readfile(PRESTO_PLAYER_PLUGIN_DIR . 'src/player/global.css'); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
</style>
|
341 |
<?php }
|
342 |
|
inc/Support/Block.php
CHANGED
@@ -4,6 +4,7 @@ namespace PrestoPlayer\Support;
|
|
4 |
|
5 |
|
6 |
use PrestoPlayer\Plugin;
|
|
|
7 |
use PrestoPlayer\Models\Player;
|
8 |
use PrestoPlayer\Models\Preset;
|
9 |
use PrestoPlayer\Models\Setting;
|
@@ -206,7 +207,6 @@ class Block
|
|
206 |
|
207 |
// video id
|
208 |
$id = !empty($attributes['id']) ? $attributes['id'] : 0;
|
209 |
-
$attributes['title'] = !empty($id) ? get_the_title($id) : __('Untitled Video', 'presto-player');
|
210 |
|
211 |
$preset = $this->getPreset(!empty($attributes['preset']) ? $attributes['preset'] : 0);
|
212 |
$branding = $this->getBranding($preset);
|
@@ -216,6 +216,9 @@ class Block
|
|
216 |
$css = $this->getCSS($id);
|
217 |
$src = !empty($attributes['src']) ? $attributes['src'] : '';
|
218 |
|
|
|
|
|
|
|
219 |
|
220 |
// Default config
|
221 |
$default_config = apply_filters('presto_player/block/default_attributes', [
|
4 |
|
5 |
|
6 |
use PrestoPlayer\Plugin;
|
7 |
+
use PrestoPlayer\Models\Video;
|
8 |
use PrestoPlayer\Models\Player;
|
9 |
use PrestoPlayer\Models\Preset;
|
10 |
use PrestoPlayer\Models\Setting;
|
207 |
|
208 |
// video id
|
209 |
$id = !empty($attributes['id']) ? $attributes['id'] : 0;
|
|
|
210 |
|
211 |
$preset = $this->getPreset(!empty($attributes['preset']) ? $attributes['preset'] : 0);
|
212 |
$branding = $this->getBranding($preset);
|
216 |
$css = $this->getCSS($id);
|
217 |
$src = !empty($attributes['src']) ? $attributes['src'] : '';
|
218 |
|
219 |
+
// use title or source.
|
220 |
+
$video = $id ? (new Video($id)) : false;
|
221 |
+
$attributes['title'] = $video ? $video->title : $src;
|
222 |
|
223 |
// Default config
|
224 |
$default_config = apply_filters('presto_player/block/default_attributes', [
|
languages/presto-player.pot
CHANGED
@@ -7,7 +7,7 @@ msgstr ""
|
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"POT-Creation-Date: 2021-09-
|
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
12 |
"X-Generator: WP-CLI 2.5.0\n"
|
13 |
|
@@ -2744,10 +2744,6 @@ msgstr ""
|
|
2744 |
msgid "Show all %s"
|
2745 |
msgstr ""
|
2746 |
|
2747 |
-
#: Support/Block.php:209
|
2748 |
-
msgid "Untitled Video"
|
2749 |
-
msgstr ""
|
2750 |
-
|
2751 |
#: Support/Utility.php:38
|
2752 |
msgid "0 seconds"
|
2753 |
msgstr ""
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"POT-Creation-Date: 2021-09-13T15:25:24+00:00\n"
|
11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
12 |
"X-Generator: WP-CLI 2.5.0\n"
|
13 |
|
2744 |
msgid "Show all %s"
|
2745 |
msgstr ""
|
2746 |
|
|
|
|
|
|
|
|
|
2747 |
#: Support/Utility.php:38
|
2748 |
msgid "0 seconds"
|
2749 |
msgstr ""
|
presto-player.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Presto Player
|
5 |
* Plugin URI: http://prestoplayer.com
|
6 |
* Description: A beautiful, fast media player for WordPress.
|
7 |
-
* Version: 1.6.
|
8 |
* Author: Presto Made, Inc
|
9 |
* Text Domain: presto-player
|
10 |
* Tags: private, video, lms, hls
|
4 |
* Plugin Name: Presto Player
|
5 |
* Plugin URI: http://prestoplayer.com
|
6 |
* Description: A beautiful, fast media player for WordPress.
|
7 |
+
* Version: 1.6.5
|
8 |
* Author: Presto Made, Inc
|
9 |
* Text Domain: presto-player
|
10 |
* Tags: private, video, lms, hls
|
readme.txt
CHANGED
@@ -153,6 +153,15 @@ It is also important to point out that BunnyNet has a $1 per month minimum.
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
= 1.6.3 - September 2, 2021 =
|
157 |
* Fix issue with CTA and Email Collection sometimes getting delayed.
|
158 |
* Fix global styles not being outputted in Elementor.
|
153 |
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= 1.6.5 - September 13, 2021 =
|
157 |
+
* Fix memory leak sometimes causing longer videos to freeze or crash.
|
158 |
+
|
159 |
+
= 1.6.4 - September 8, 2021 =
|
160 |
+
* Add placeholder for video loading.
|
161 |
+
* Fix incorrect title in google analytics.
|
162 |
+
* Fix race condition where HLS/Bunny videos sometimes won't load if browser caching is enabled.
|
163 |
+
* Change default lazy loaded Youtube size to be 16/9 to prevent size jump.
|
164 |
+
|
165 |
= 1.6.3 - September 2, 2021 =
|
166 |
* Fix issue with CTA and Email Collection sometimes getting delayed.
|
167 |
* Fix global styles not being outputted in Elementor.
|
src/player/global.css
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@supports not (aspect-ratio: 16 / 9) {
|
2 |
+
presto-player:not(.hydrated) {
|
3 |
+
height: 0;
|
4 |
+
padding-bottom: 56%;
|
5 |
+
position: relative;
|
6 |
+
}
|
7 |
+
}
|
8 |
+
|
9 |
+
presto-player:not(.hydrated) {
|
10 |
+
position: relative;
|
11 |
+
background: rgba(0, 0, 0, 0.1);
|
12 |
+
width: 100%;
|
13 |
+
display: block;
|
14 |
+
aspect-ratio: 16 / 9;
|
15 |
+
}
|
16 |
+
|
17 |
+
presto-player:not(.hydrated) .presto-loader {
|
18 |
+
display: block;
|
19 |
+
}
|
20 |
+
|
21 |
+
.presto-block-video:not(.presto-sticky-parent) {
|
22 |
+
border-radius: var(--presto-player-border-radius, 0px);
|
23 |
+
overflow: hidden;
|
24 |
+
transform: translateZ(0);
|
25 |
+
}
|
26 |
+
|
27 |
+
.presto-block-video .presto-sticky-parent {
|
28 |
+
overflow: auto;
|
29 |
+
transform: none;
|
30 |
+
}
|
31 |
+
|
32 |
+
.presto-sticky-parent {
|
33 |
+
z-index: 99998 !important;
|
34 |
+
}
|
35 |
+
|
36 |
+
.presto-player-fullscreen-open {
|
37 |
+
z-index: 9999999 !important;
|
38 |
+
overflow: visible !important;
|
39 |
+
transform: none !important;
|
40 |
+
}
|
src/player/global.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
import "./global.scss";
|
|
src/player/global.scss
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
.presto-block-video {
|
2 |
-
border-radius: var(--presto-player-border-radius, 0px);
|
3 |
-
overflow: hidden;
|
4 |
-
transform: translateZ(0); // Safari bug
|
5 |
-
|
6 |
-
&.presto-sticky-parent {
|
7 |
-
overflow: auto;
|
8 |
-
transform: none;
|
9 |
-
}
|
10 |
-
}
|
11 |
-
|
12 |
-
.presto-sticky-parent {
|
13 |
-
z-index: 99998 !important;
|
14 |
-
}
|
15 |
-
|
16 |
-
.presto-player-fullscreen-open {
|
17 |
-
z-index: 9999999 !important;
|
18 |
-
overflow: visible !important;
|
19 |
-
transform: none !important; // Safari bug
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'project',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'course/player',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -16,7 +16,7 @@
|
|
16 |
'type' => 'project',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'level-2/dice' => array(
|
5 |
'type' => 'project',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '99b41958380a76d9676a699e22a2f02812a0d1c6',
|
9 |
'name' => 'course/player',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'project',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '99b41958380a76d9676a699e22a2f02812a0d1c6',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'level-2/dice' => array(
|