diff --git a/dist/dash-shaka-playback.external.js b/dist/dash-shaka-playback.external.js index 3f74fb4..e1b38d7 100644 --- a/dist/dash-shaka-playback.external.js +++ b/dist/dash-shaka-playback.external.js @@ -7,7 +7,7 @@ exports["DashShakaPlayback"] = factory(require("clappr"), require("shaka")); else root["DashShakaPlayback"] = factory(root["Clappr"], root["shaka"]); -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) { +})(window, function(__WEBPACK_EXTERNAL_MODULE_clappr__, __WEBPACK_EXTERNAL_MODULE_shaka_player__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -46,14 +46,34 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -69,12 +89,18 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "dist/"; /******/ +/******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ return __webpack_require__(__webpack_require__.s = "./src/clappr-dash-shaka-playback.js"); /******/ }) /************************************************************************/ -/******/ ([ -/* 0 */ +/******/ ({ + +/***/ "./src/clappr-dash-shaka-playback.js": +/*!*******************************************!*\ + !*** ./src/clappr-dash-shaka-playback.js ***! + \*******************************************/ +/*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88,9 +114,9 @@ var _get = function get(object, property, receiver) { if (object === null) objec var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _clappr = __webpack_require__(1); +var _clappr = __webpack_require__(/*! clappr */ "clappr"); -var _shakaPlayer = __webpack_require__(2); +var _shakaPlayer = __webpack_require__(/*! shaka-player */ "shaka-player"); var _shakaPlayer2 = _interopRequireDefault(_shakaPlayer); @@ -109,6 +135,16 @@ var DashShakaPlayback = function (_HTML5Video) { _inherits(DashShakaPlayback, _HTML5Video); _createClass(DashShakaPlayback, [{ + key: 'getDuration', + value: function getDuration() { + return this._duration; + } + }, { + key: 'getCurrentTime', + value: function getCurrentTime() { + return this.shakaPlayerInstance.getMediaElement().currentTime - this.seekRange.start; + } + }, { key: 'name', get: function get() { return 'dash_shaka_playback'; @@ -128,6 +164,11 @@ var DashShakaPlayback = function (_HTML5Video) { get: function get() { return this._levels; } + }, { + key: 'seekRange', + get: function get() { + return this.shakaPlayerInstance.seekRange(); + } }, { key: 'currentLevel', set: function set(id) { @@ -151,6 +192,28 @@ var DashShakaPlayback = function (_HTML5Video) { get: function get() { return this._currentLevelId || DEFAULT_LEVEL_AUTO; } + }, { + key: 'dvrEnabled', + get: function get() { + return this._duration >= this._minDvrSize && this.getPlaybackType() === 'live'; + } + }, { + key: '_duration', + get: function get() { + if (!this.shakaPlayerInstance) return 0; + + return this.seekRange.end - this.seekRange.start; + } + }, { + key: '_startTime', + get: function get() { + return this.seekRange.start; + } + }, { + key: 'presentationTimeline', + get: function get() { + return this.shakaPlayerInstance.getManifest().presentationTimeline; + } }], [{ key: 'canPlay', value: function canPlay(resource) { @@ -184,10 +247,42 @@ var DashShakaPlayback = function (_HTML5Video) { _this._levels = []; _this._pendingAdaptationEvent = false; _this._isShakaReadyState = false; + + _this._minDvrSize = typeof _this.options.shakaMinimumDvrSize === 'undefined' ? 60 : _this.options.shakaMinimumDvrSize; return _this; } _createClass(DashShakaPlayback, [{ + key: 'getProgramDateTime', + value: function getProgramDateTime() { + return new Date((this.presentationTimeline.getPresentationStartTime() + this.seekRange.start) * 1000); + } + }, { + key: '_updateDvr', + value: function _updateDvr(status) { + this.trigger(_clappr.Events.PLAYBACK_DVR, status); + this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, { 'dvr': status }); + } + }, { + key: 'seek', + value: function seek(time) { + if (time < 0) { + _clappr.Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.'); + time = this._duration; + } + // assume live if time within 3 seconds of end of stream + this.dvrEnabled && this._updateDvr(time < this._duration - 3); + time += this._startTime; + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'seek', this).call(this, time); + } + }, { + key: 'pause', + value: function pause() { + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'pause', this).call(this); + + if (this.dvrEnabled) this._updateDvr(true); + } + }, { key: 'play', value: function play() { if (!this._player) { @@ -202,6 +297,21 @@ var DashShakaPlayback = function (_HTML5Video) { this._stopped = false; this._src = this.el.src; _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'play', this).call(this); + this._startTimeUpdateTimer(); + } + }, { + key: '_startTimeUpdateTimer', + value: function _startTimeUpdateTimer() { + var _this3 = this; + + this._timeUpdateTimer = setInterval(function () { + _this3._onTimeUpdate(); + }, 100); + } + }, { + key: '_stopTimeUpdateTimer', + value: function _stopTimeUpdateTimer() { + clearInterval(this._timeUpdateTimer); } // skipping HTML5Video `_setupSrc` (on tag video) @@ -240,8 +350,9 @@ var DashShakaPlayback = function (_HTML5Video) { }, { key: 'stop', value: function stop() { - var _this3 = this; + var _this4 = this; + this._stopTimeUpdateTimer(); clearInterval(this.sendStatsId); this._stopped = true; @@ -249,9 +360,9 @@ var DashShakaPlayback = function (_HTML5Video) { this._sendStats(); this._player.unload().then(function () { - _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', _this3).call(_this3); - _this3._player = null; - _this3._isShakaReadyState = false; + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', _this4).call(_this4); + _this4._player = null; + _this4._isShakaReadyState = false; }).catch(function () { _clappr.Log.error('shaka could not be unloaded'); }); @@ -319,15 +430,16 @@ var DashShakaPlayback = function (_HTML5Video) { }, { key: 'destroy', value: function destroy() { - var _this4 = this; + var _this5 = this; + this._stopTimeUpdateTimer(); clearInterval(this.sendStatsId); if (this._player) { this._player.destroy().then(function () { - return _this4._destroy(); + return _this5._destroy(); }).catch(function () { - _this4._destroy(); + _this5._destroy(); _clappr.Log.error('shaka could not be destroyed'); }); } else { @@ -339,7 +451,7 @@ var DashShakaPlayback = function (_HTML5Video) { }, { key: '_setup', value: function _setup() { - var _this5 = this; + var _this6 = this; this._isShakaReadyState = false; this._ccIsSetup = false; @@ -349,9 +461,9 @@ var DashShakaPlayback = function (_HTML5Video) { var playerLoaded = this._player.load(this._options.src); playerLoaded.then(function () { - return _this5._loaded(); + return _this6._loaded(); }).catch(function (e) { - return _this5._setupError(e); + return _this6._setupError(e); }); } }, { @@ -363,6 +475,22 @@ var DashShakaPlayback = function (_HTML5Video) { player.addEventListener('buffering', this._onBuffering.bind(this)); return player; } + }, { + key: '_onTimeUpdate', + value: function _onTimeUpdate() { + if (!this.shakaPlayerInstance) return; + + var update = { + current: this.getCurrentTime(), + total: this.getDuration(), + firstFragDateTime: this.getProgramDateTime() + }; + var isSame = this._lastTimeUpdate && update.current === this._lastTimeUpdate.current && update.total === this._lastTimeUpdate.total; + if (isSame) return; + + this._lastTimeUpdate = update; + this.trigger(_clappr.Events.PLAYBACK_TIMEUPDATE, update, this.name); + } }, { key: '_onBuffering', value: function _onBuffering(e) { @@ -391,11 +519,11 @@ var DashShakaPlayback = function (_HTML5Video) { }, { key: '_startToSendStats', value: function _startToSendStats() { - var _this6 = this; + var _this7 = this; var intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS; this.sendStatsId = setInterval(function () { - return _this6._sendStats(); + return _this7._sendStats(); }, intervalMs); } }, { @@ -462,6 +590,14 @@ var DashShakaPlayback = function (_HTML5Video) { level: activeVideo.id }); } + }, { + key: '_updateSettings', + value: function _updateSettings() { + if (this.getPlaybackType() === 'vod') this.settings.left = ['playpause', 'position', 'duration'];else if (this.dvrEnabled) this.settings.left = ['playpause'];else this.settings.left = ['playstop']; + + this.settings.seekEnabled = this.isSeekEnabled(); + this.trigger(_clappr.Events.PLAYBACK_SETTINGSUPDATE); + } }, { key: '_destroy', value: function _destroy() { @@ -547,8 +683,10 @@ var DashShakaPlayback = function (_HTML5Video) { if (showingTrack) { this._player.selectTextTrack(showingTrack.track); + this._player.setTextTrackVisibility(true); this._enableShakaTextTrack(true); } else { + this._player.setTextTrackVisibility(false); this._enableShakaTextTrack(false); } @@ -566,18 +704,29 @@ exports.default = DashShakaPlayback; module.exports = exports['default']; /***/ }), -/* 1 */ + +/***/ "clappr": +/*!******************************************************************************************!*\ + !*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***! + \******************************************************************************************/ +/*! no static exports found */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_1__; +module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__; /***/ }), -/* 2 */ + +/***/ "shaka-player": +/*!************************!*\ + !*** external "shaka" ***! + \************************/ +/*! no static exports found */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_2__; +module.exports = __WEBPACK_EXTERNAL_MODULE_shaka_player__; /***/ }) -/******/ ]); + +/******/ }); }); //# sourceMappingURL=dash-shaka-playback.external.js.map \ No newline at end of file diff --git a/dist/dash-shaka-playback.external.js.map b/dist/dash-shaka-playback.external.js.map index 8a2f4da..c594460 100644 --- a/dist/dash-shaka-playback.external.js.map +++ b/dist/dash-shaka-playback.external.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap bfa452378eeff6ec96f1","webpack:///./src/clappr-dash-shaka-playback.js","webpack:///external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}","webpack:///external \"shaka\""],"names":["SEND_STATS_INTERVAL_MS","DEFAULT_LEVEL_AUTO","DashShakaPlayback","shaka","player","Player","version","_player","_levels","id","_currentLevelId","isAuto","trigger","Events","PLAYBACK_LEVEL_SWITCH_START","configure","abr","enabled","_pendingAdaptationEvent","selectTrack","videoTracks","filter","t","PLAYBACK_LEVEL_SWITCH_END","resource","mimeType","polyfill","installAll","browserSupported","isBrowserSupported","resourceParts","split","match","indexOf","SHAKA_READY","args","_isShakaReadyState","_setup","isReady","once","play","_stopped","_src","el","src","PLAYBACK_READY","name","event","Log","error","highDefinition","clearInterval","sendStatsId","_sendStats","unload","then","catch","isLive","track","type","selectTextTrack","selectVariantTrack","startsWith","_onAdaptation","Error","isEnable","textTracks","_shakaTTVisible","Array","from","kind","forEach","mode","_ccIsSetup","hasClosedCaptionsTracks","PLAYBACK_SUBTITLE_AVAILABLE","trackId","closedCaptionsTrackId","destroy","_destroy","_createPlayer","_options","shakaConfiguration","shakaOnBeforeLoad","playerLoaded","load","_loaded","e","_setupError","addEventListener","_onError","bind","_onBuffering","buffering","PLAYBACK_BUFFERING","PLAYBACK_BUFFERFULL","_onShakaReady","_startToSendStats","_fillLevels","_checkForClosedCaptions","length","map","videoTrack","label","height","reverse","PLAYBACK_LEVELS_AVAILABLE","levels","intervalMs","shakaSendStatsInterval","setInterval","PLAYBACK_STATS_ADD","getStats","err","shakaError","videoError","detail","category","code","severity","isCritical","util","Severity","CRITICAL","errorData","description","level","PlayerError","Levels","FATAL","WARN","raw","formattedError","createError","PLAYBACK_ERROR","activeVideo","active","debug","PLAYBACK_HIGHDEFINITIONUPDATE","PLAYBACK_BITRATE","bandwidth","width","getTextTracks","getVariantTracks","tracks","language","closedCaptionsTracks","showingTrack","find","warn","info","_enableShakaTextTrack","_ccTrackId","PLAYBACK_SUBTITLE_CHANGED","HTML5Video"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC7DA;;AACA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P;AAA2E,OAFtF,CAAP;AAGD;;AAED;;;;;;wBAG4B;AAC1B;AACD;;AAED;;;;sBAG0BkB,O,EAAS;AACjC,UAAI,CAAC,KAAKrE,OAAV,EAAmB;AACjB;AACD;;AAED,UAAIyI,SAAS,KAAKE,oBAAlB;AACA,UAAIC,qBAAJ;;AAEA;AACA,UAAIvE,YAAY,CAAC,CAAjB,EAAoB;AAClBuE,uBAAeH,OAAOI,IAAP,CAAY;AAAA,iBAAS1F,MAAMjD,EAAN,KAAamE,OAAtB;AAAA,SAAZ,CAAf;AACA,YAAI,CAACuE,YAAL,EAAmB;AACjBnG,sBAAIqG,IAAJ,gBAAsBzE,OAAtB;AACA;AACD;AACD,YAAI,KAAKT,eAAL,IAAwBgF,aAAazF,KAAb,CAAmB8E,MAAnB,KAA8B,IAA1D,EAAgE;AAC9DxF,sBAAIsG,IAAJ,gBAAsB1E,OAAtB;AACA;AACD;AACF;;AAED,UAAIuE,YAAJ,EAAkB;AAChB,aAAK5I,OAAL,CAAaqD,eAAb,CAA6BuF,aAAazF,KAA1C;AACA,aAAK6F,qBAAL,CAA2B,IAA3B;AACD,OAHD,MAGO;AACL,aAAKA,qBAAL,CAA2B,KAA3B;AACD;;AAED,WAAKC,UAAL,GAAkB5E,OAAlB;AACA,WAAKhE,OAAL,CAAaC,eAAO4I,yBAApB,EAA+C;AAC7ChJ,YAAImE;AADyC,OAA/C;AAGD;;;;EA5M6B8E,kB;;kBAqWjBxJ,iB;;;;;;;AC3Wf,+C;;;;;;ACAA,+C","file":"dash-shaka-playback.external.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"), require(\"shaka\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\", \"shaka\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DashShakaPlayback\"] = factory(require(\"clappr\"), require(\"shaka\"));\n\telse\n\t\troot[\"DashShakaPlayback\"] = factory(root[\"Clappr\"], root[\"shaka\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap bfa452378eeff6ec96f1","import {HTML5Video, Log, Events, PlayerError} from 'clappr'\nimport shaka from 'shaka-player'\n\nconst SEND_STATS_INTERVAL_MS = 30 * 1e3\nconst DEFAULT_LEVEL_AUTO = -1\n\nclass DashShakaPlayback extends HTML5Video {\n static get Events () {\n return {\n SHAKA_READY: 'shaka:ready'\n }\n }\n\n static canPlay (resource, mimeType = '') {\n shaka.polyfill.installAll()\n let browserSupported = shaka.Player.isBrowserSupported()\n let resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n return browserSupported && ((resourceParts[1] === 'mpd') || mimeType.indexOf('application/dash+xml') > -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type);\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._enableShakaTextTrack(true)\n } else {\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n\n\n\n// WEBPACK FOOTER //\n// ./src/clappr-dash-shaka-playback.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}\n// module id = 1\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"shaka\"\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://DashShakaPlayback/webpack/universalModuleDefinition","webpack://DashShakaPlayback/webpack/bootstrap","webpack://DashShakaPlayback/./src/clappr-dash-shaka-playback.js","webpack://DashShakaPlayback/external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}","webpack://DashShakaPlayback/external \"shaka\""],"names":["SEND_STATS_INTERVAL_MS","DEFAULT_LEVEL_AUTO","DashShakaPlayback","_duration","shakaPlayerInstance","getMediaElement","currentTime","seekRange","start","shaka","player","Player","version","_player","_levels","id","_currentLevelId","isAuto","trigger","Events","PLAYBACK_LEVEL_SWITCH_START","configure","abr","enabled","_pendingAdaptationEvent","selectTrack","videoTracks","filter","t","PLAYBACK_LEVEL_SWITCH_END","_minDvrSize","getPlaybackType","end","getManifest","presentationTimeline","resource","mimeType","polyfill","installAll","browserSupported","isBrowserSupported","resourceParts","split","match","indexOf","SHAKA_READY","args","_isShakaReadyState","options","shakaMinimumDvrSize","Date","getPresentationStartTime","status","PLAYBACK_DVR","PLAYBACK_STATS_ADD","time","Log","warn","dvrEnabled","_updateDvr","_startTime","_setup","isReady","once","play","_stopped","_src","el","src","_startTimeUpdateTimer","_timeUpdateTimer","setInterval","_onTimeUpdate","clearInterval","PLAYBACK_READY","name","event","error","highDefinition","_stopTimeUpdateTimer","sendStatsId","_sendStats","unload","then","catch","isLive","track","type","selectTextTrack","selectVariantTrack","startsWith","_onAdaptation","Error","isEnable","textTracks","_shakaTTVisible","Array","from","kind","forEach","mode","_ccIsSetup","hasClosedCaptionsTracks","PLAYBACK_SUBTITLE_AVAILABLE","trackId","closedCaptionsTrackId","destroy","_destroy","_createPlayer","_options","shakaConfiguration","shakaOnBeforeLoad","playerLoaded","load","_loaded","e","_setupError","addEventListener","_onError","bind","_onBuffering","update","current","getCurrentTime","total","getDuration","firstFragDateTime","getProgramDateTime","isSame","_lastTimeUpdate","PLAYBACK_TIMEUPDATE","buffering","PLAYBACK_BUFFERING","PLAYBACK_BUFFERFULL","_onShakaReady","_startToSendStats","_fillLevels","_checkForClosedCaptions","length","map","videoTrack","label","height","reverse","PLAYBACK_LEVELS_AVAILABLE","levels","intervalMs","shakaSendStatsInterval","getStats","err","shakaError","videoError","detail","category","code","severity","isCritical","util","Severity","CRITICAL","errorData","description","level","PlayerError","Levels","FATAL","WARN","raw","formattedError","createError","PLAYBACK_ERROR","activeVideo","active","debug","PLAYBACK_HIGHDEFINITIONUPDATE","PLAYBACK_BITRATE","bandwidth","width","settings","left","seekEnabled","isSeekEnabled","PLAYBACK_SETTINGSUPDATE","getTextTracks","getVariantTracks","tracks","language","closedCaptionsTracks","showingTrack","find","info","setTextTrackVisibility","_enableShakaTextTrack","_ccTrackId","PLAYBACK_SUBTITLE_CHANGED","HTML5Video"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAg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ED,WAAKC,UAAL,GAAkBzF,OAAlB;AACA,WAAKtF,OAAL,CAAaC,eAAO+K,yBAApB,EAA+C;AAC7CnL,YAAIyF;AADyC,OAA/C;AAGD;;;;EArR6B2F,kB;;kBA6cjBjM,iB;;;;;;;;;;;;ACndf,oD;;;;;;;;;;;ACAA,0D","file":"dash-shaka-playback.external.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"), require(\"shaka\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\", \"shaka\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DashShakaPlayback\"] = factory(require(\"clappr\"), require(\"shaka\"));\n\telse\n\t\troot[\"DashShakaPlayback\"] = factory(root[\"Clappr\"], root[\"shaka\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE_clappr__, __WEBPACK_EXTERNAL_MODULE_shaka_player__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\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 = \"dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/clappr-dash-shaka-playback.js\");\n","import {HTML5Video, Log, Events, PlayerError} from 'clappr'\nimport shaka from 'shaka-player'\n\nconst SEND_STATS_INTERVAL_MS = 30 * 1e3\nconst DEFAULT_LEVEL_AUTO = -1\n\nclass DashShakaPlayback extends HTML5Video {\n static get Events () {\n return {\n SHAKA_READY: 'shaka:ready'\n }\n }\n\n static canPlay (resource, mimeType = '') {\n shaka.polyfill.installAll()\n let browserSupported = shaka.Player.isBrowserSupported()\n let resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n return browserSupported && ((resourceParts[1] === 'mpd') || mimeType.indexOf('application/dash+xml') > -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n get seekRange() {\n return this.shakaPlayerInstance.seekRange()\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n get dvrEnabled() {\n return this._duration >= this._minDvrSize && this.getPlaybackType() === 'live'\n }\n\n getDuration() {\n return this._duration\n }\n\n get _duration() {\n if (!this.shakaPlayerInstance) return 0\n\n return this.seekRange.end - this.seekRange.start\n }\n\n getCurrentTime() {\n return this.shakaPlayerInstance.getMediaElement().currentTime - this.seekRange.start\n }\n\n get _startTime() {\n return this.seekRange.start\n }\n\n get presentationTimeline() {\n return this.shakaPlayerInstance.getManifest().presentationTimeline\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n\n this._minDvrSize = typeof (this.options.shakaMinimumDvrSize) === 'undefined' ? 60 : this.options.shakaMinimumDvrSize\n }\n\n getProgramDateTime() {\n return new Date((this.presentationTimeline.getPresentationStartTime() + this.seekRange.start) * 1000)\n }\n\n _updateDvr(status) {\n this.trigger(Events.PLAYBACK_DVR, status)\n this.trigger(Events.PLAYBACK_STATS_ADD, { 'dvr': status })\n }\n\n seek(time) {\n if (time < 0) {\n Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.')\n time = this._duration\n }\n // assume live if time within 3 seconds of end of stream\n this.dvrEnabled && this._updateDvr(time < this._duration-3)\n time += this._startTime\n super.seek(time)\n }\n\n pause() {\n super.pause()\n\n if (this.dvrEnabled)\n this._updateDvr(true)\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n this._startTimeUpdateTimer()\n }\n\n _startTimeUpdateTimer() {\n this._timeUpdateTimer = setInterval(() => {\n this._onTimeUpdate()\n }, 100)\n }\n\n _stopTimeUpdateTimer() {\n clearInterval(this._timeUpdateTimer)\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type)\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._player.setTextTrackVisibility(true)\n this._enableShakaTextTrack(true)\n } else {\n this._player.setTextTrackVisibility(false)\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onTimeUpdate() {\n if (!this.shakaPlayerInstance) return\n\n let update = {\n current: this.getCurrentTime(),\n total: this.getDuration(),\n firstFragDateTime: this.getProgramDateTime()\n }\n let isSame = this._lastTimeUpdate && (\n update.current === this._lastTimeUpdate.current &&\n update.total === this._lastTimeUpdate.total)\n if (isSame)\n return\n\n this._lastTimeUpdate = update\n this.trigger(Events.PLAYBACK_TIMEUPDATE, update, this.name)\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _updateSettings() {\n if (this.getPlaybackType() === 'vod')\n this.settings.left = ['playpause', 'position', 'duration']\n else if (this.dvrEnabled)\n this.settings.left = ['playpause']\n else\n this.settings.left = ['playstop']\n\n this.settings.seekEnabled = this.isSeekEnabled()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE)\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n","module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;","module.exports = __WEBPACK_EXTERNAL_MODULE_shaka_player__;"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/dash-shaka-playback.external.min.js b/dist/dash-shaka-playback.external.min.js index 208d93f..aea8a41 100644 --- a/dist/dash-shaka-playback.external.min.js +++ b/dist/dash-shaka-playback.external.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("clappr"),require("shaka")):"function"==typeof define&&define.amd?define(["clappr","shaka"],e):"object"==typeof exports?exports.DashShakaPlayback=e(require("clappr"),require("shaka")):t.DashShakaPlayback=e(t.Clappr,t.shaka)}("undefined"!=typeof self?self:this,function(t,e){return function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="dist/",e(e.s=0)}([function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e,r,i){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,r);if(void 0===n){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,r,i)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(i)},s=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"";c.default.polyfill.installAll();var r=c.default.Player.isBrowserSupported(),i=t.split("?")[0].match(/.*\.(.*)$/)||[];return r&&("mpd"===i[1]||e.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),s(e,[{key:"play",value:function(){if(this._player||this._setup(),!this.isReady)return void this.once(e.Events.SHAKA_READY,this.play);this._stopped=!1,this._src=this.el.src,o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"play",this).call(this)}},{key:"_setupSrc",value:function(){}},{key:"_ready",value:function(){}},{key:"_onShakaReady",value:function(){this._isShakaReadyState=!0,this.trigger(e.Events.SHAKA_READY),this.trigger(l.Events.PLAYBACK_READY,this.name)}},{key:"error",value:function(t){l.Log.error("an error was raised by the video tag",t,this.el.error)}},{key:"isHighDefinitionInUse",value:function(){return!!this.highDefinition}},{key:"stop",value:function(){var t=this;clearInterval(this.sendStatsId),this._stopped=!0,this._player?(this._sendStats(),this._player.unload().then(function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",t).call(t),t._player=null,t._isShakaReadyState=!1}).catch(function(){l.Log.error("shaka could not be unloaded")})):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",this).call(this)}},{key:"getPlaybackType",value:function(){return(this.isReady&&this._player.isLive()?"live":"vod")||""}},{key:"selectTrack",value:function(t){if("text"===t.type)this._player.selectTextTrack(t);else{if("variant"!==t.type)throw new Error("Unhandled track type:",t.type);this._player.selectVariantTrack(t),t.mimeType.startsWith("video/")&&this._onAdaptation()}}},{key:"_enableShakaTextTrack",value:function(t){this.el.textTracks&&(this._shakaTTVisible=t,Array.from(this.el.textTracks).filter(function(t){return"subtitles"===t.kind}).forEach(function(e){return e.mode=!0===t?"showing":"hidden"}))}},{key:"_checkForClosedCaptions",value:function(){if(!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(l.Events.PLAYBACK_SUBTITLE_AVAILABLE);var t=this.closedCaptionsTrackId;this.closedCaptionsTrackId=t}this._ccIsSetup=!0}}},{key:"destroy",value:function(){var t=this;clearInterval(this.sendStatsId),this._player?this._player.destroy().then(function(){return t._destroy()}).catch(function(){t._destroy(),l.Log.error("shaka could not be destroyed")}):this._destroy(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"_setup",value:function(){var t=this;this._isShakaReadyState=!1,this._ccIsSetup=!1,this._player=this._createPlayer(),this._options.shakaConfiguration&&this._player.configure(this._options.shakaConfiguration),this._options.shakaOnBeforeLoad&&this._options.shakaOnBeforeLoad(this._player),this._player.load(this._options.src).then(function(){return t._loaded()}).catch(function(e){return t._setupError(e)})}},{key:"_createPlayer",value:function(){var t=new c.default.Player(this.el);return t.addEventListener("error",this._onError.bind(this)),t.addEventListener("adaptation",this._onAdaptation.bind(this)),t.addEventListener("buffering",this._onBuffering.bind(this)),t}},{key:"_onBuffering",value:function(t){if(!this._stopped){var e=t.buffering?l.Events.PLAYBACK_BUFFERING:l.Events.PLAYBACK_BUFFERFULL;this.trigger(e)}}},{key:"_loaded",value:function(){this._onShakaReady(),this._startToSendStats(),this._fillLevels(),this._checkForClosedCaptions()}},{key:"_fillLevels",value:function(){0===this._levels.length&&(this._levels=this.videoTracks.map(function(t){return{id:t.id,label:t.height+"p"}}).reverse(),this.trigger(l.Events.PLAYBACK_LEVELS_AVAILABLE,this.levels))}},{key:"_startToSendStats",value:function(){var t=this,e=this._options.shakaSendStatsInterval||3e4;this.sendStatsId=setInterval(function(){return t._sendStats()},e)}},{key:"_sendStats",value:function(){this.trigger(l.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(t){this._onError(t)}},{key:"_onError",value:function(t){var r={shakaError:t,videoError:this.el.error},i=r.shakaError.detail||r.shakaError,n=i.category,a=i.code,s=i.severity;if(r.videoError||!a&&!n)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onError",this).call(this);var u=s===c.default.util.Error.Severity.CRITICAL,h={code:n+"_"+a,description:"Category: "+n+", code: "+a+", severity: "+s,level:u?l.PlayerError.Levels.FATAL:l.PlayerError.Levels.WARN,raw:t},p=this.createError(h);l.Log.error("Shaka error event:",p),this.trigger(l.Events.PLAYBACK_ERROR,p)}},{key:"_onAdaptation",value:function(){var t=this.videoTracks.filter(function(t){return!0===t.active})[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(l.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),l.Log.debug("an adaptation has happened:",t),this.highDefinition=t.height>=720,this.trigger(l.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(l.Events.PLAYBACK_BITRATE,{bandwidth:t.bandwidth,width:t.width,height:t.height,level:t.id})}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,l.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("audio/")})}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("video/")})}},{key:"closedCaptionsTracks",get:function(){var t=0,e=function(){return t++};return(this.textTracks||[]).filter(function(t){return"subtitle"===t.kind}).map(function(t){return{id:e(),name:t.label||t.language,track:t}})}},{key:"closedCaptionsTrackId",get:function(){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"closedCaptionsTrackId",this)},set:function(t){if(this._player){var e=this.closedCaptionsTracks,r=void 0;if(-1!==t){if(!(r=e.find(function(e){return e.id===t})))return void l.Log.warn('Track id "'+t+'" not found');if(this._shakaTTVisible&&!0===r.track.active)return void l.Log.info('Track id "'+t+'" already showing')}r?(this._player.selectTextTrack(r.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=t,this.trigger(l.Events.PLAYBACK_SUBTITLE_CHANGED,{id:t})}}}]),e}(l.HTML5Video);e.default=h,t.exports=e.default},function(e,r){e.exports=t},function(t,r){t.exports=e}])}); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("clappr"),require("shaka")):"function"==typeof define&&define.amd?define(["clappr","shaka"],e):"object"==typeof exports?exports.DashShakaPlayback=e(require("clappr"),require("shaka")):t.DashShakaPlayback=e(t.Clappr,t.shaka)}(window,function(t,e){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="dist/",r(r.s=0)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,n=function t(e,r,i){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,r);if(void 0===n){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,r,i)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(i):void 0},a=function(){function t(t,e){for(var r=0;r=this._minDvrSize&&"live"===this.getPlaybackType()}},{key:"_duration",get:function(){return this.shakaPlayerInstance?this.seekRange.end-this.seekRange.start:0}},{key:"_startTime",get:function(){return this.seekRange.start}},{key:"presentationTimeline",get:function(){return this.shakaPlayerInstance.getManifest().presentationTimeline}}],[{key:"canPlay",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u.default.polyfill.installAll();var r=u.default.Player.isBrowserSupported(),i=t.split("?")[0].match(/.*\.(.*)$/)||[];return r&&("mpd"===i[1]||e.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),a(e,[{key:"getProgramDateTime",value:function(){return new Date(1e3*(this.presentationTimeline.getPresentationStartTime()+this.seekRange.start))}},{key:"_updateDvr",value:function(t){this.trigger(s.Events.PLAYBACK_DVR,t),this.trigger(s.Events.PLAYBACK_STATS_ADD,{dvr:t})}},{key:"seek",value:function(t){t<0&&(s.Log.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),t=this._duration),this.dvrEnabled&&this._updateDvr(t=720,this.trigger(s.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(s.Events.PLAYBACK_BITRATE,{bandwidth:t.bandwidth,width:t.width,height:t.height,level:t.id})}},{key:"_updateSettings",value:function(){"vod"===this.getPlaybackType()?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(s.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,s.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("audio/")})}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("video/")})}},{key:"closedCaptionsTracks",get:function(){var t=0;return(this.textTracks||[]).filter(function(t){return"subtitle"===t.kind}).map(function(e){return{id:t++,name:e.label||e.language,track:e}})}},{key:"closedCaptionsTrackId",get:function(){return n(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"closedCaptionsTrackId",this)},set:function(t){if(this._player){var e=this.closedCaptionsTracks,r=void 0;if(-1!==t){if(!(r=e.find(function(e){return e.id===t})))return void s.Log.warn('Track id "'+t+'" not found');if(this._shakaTTVisible&&!0===r.track.active)return void s.Log.info('Track id "'+t+'" already showing')}r?(this._player.selectTextTrack(r.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=t,this.trigger(s.Events.PLAYBACK_SUBTITLE_CHANGED,{id:t})}}}]),e}();e.default=l,t.exports=e.default},function(e,r){e.exports=t},function(t,r){t.exports=e}])}); //# sourceMappingURL=dash-shaka-playback.external.min.js.map \ No newline at end of file diff --git a/dist/dash-shaka-playback.external.min.js.map b/dist/dash-shaka-playback.external.min.js.map index bf26968..daaa533 100644 --- a/dist/dash-shaka-playback.external.min.js.map +++ b/dist/dash-shaka-playback.external.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///dash-shaka-playback.external.min.js","webpack:///webpack/bootstrap 0df2aaf8b86a91dd527e","webpack:///./src/clappr-dash-shaka-playback.js","webpack:///external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}","webpack:///external \"shaka\""],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE_1__","__WEBPACK_EXTERNAL_MODULE_2__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","create","constructor","value","writable","setPrototypeOf","__proto__","_get","receiver","Function","desc","getOwnPropertyDescriptor","undefined","parent","getPrototypeOf","_createClass","defineProperties","target","props","length","descriptor","key","protoProps","staticProps","_clappr","_shakaPlayer","_shakaPlayer2","obj","default","DashShakaPlayback","_HTML5Video","_ref","_len","arguments","args","Array","_key","_this","apply","concat","_levels","_pendingAdaptationEvent","_isShakaReadyState","shaka","player","Player","version","_player","set","id","_this2","_currentLevelId","isAuto","trigger","Events","PLAYBACK_LEVEL_SWITCH_START","configure","abr","enabled","PLAYBACK_LEVEL_SWITCH_END","selectTrack","videoTracks","filter","t","resource","mimeType","polyfill","installAll","browserSupported","isBrowserSupported","resourceParts","split","match","indexOf","SHAKA_READY","_setup","isReady","once","play","_stopped","_src","el","src","PLAYBACK_READY","event","Log","error","highDefinition","_this3","clearInterval","sendStatsId","_sendStats","unload","then","catch","isLive","track","type","selectTextTrack","Error","selectVariantTrack","startsWith","_onAdaptation","isEnable","textTracks","_shakaTTVisible","from","kind","forEach","mode","_ccIsSetup","hasClosedCaptionsTracks","PLAYBACK_SUBTITLE_AVAILABLE","trackId","closedCaptionsTrackId","_this4","destroy","_destroy","_this5","_createPlayer","_options","shakaConfiguration","shakaOnBeforeLoad","load","_loaded","e","_setupError","addEventListener","_onError","bind","_onBuffering","buffering","PLAYBACK_BUFFERING","PLAYBACK_BUFFERFULL","_onShakaReady","_startToSendStats","_fillLevels","_checkForClosedCaptions","map","videoTrack","label","height","reverse","PLAYBACK_LEVELS_AVAILABLE","levels","_this6","intervalMs","shakaSendStatsInterval","setInterval","PLAYBACK_STATS_ADD","getStats","err","shakaError","videoError","_ref2","detail","category","code","severity","isCritical","util","Severity","CRITICAL","errorData","description","level","PlayerError","Levels","FATAL","WARN","raw","formattedError","createError","PLAYBACK_ERROR","activeVideo","active","debug","PLAYBACK_HIGHDEFINITIONUPDATE","PLAYBACK_BITRATE","bandwidth","width","getTextTracks","getVariantTracks","language","tracks","closedCaptionsTracks","showingTrack","find","warn","info","setTextTrackVisibility","_enableShakaTextTrack","_ccTrackId","PLAYBACK_SUBTITLE_CHANGED","HTML5Video"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,UAAAA,QAAA,UACA,kBAAAC,gBAAAC,IACAD,QAAA,kBAAAJ,GACA,gBAAAC,SACAA,QAAA,kBAAAD,EAAAG,QAAA,UAAAA,QAAA,UAEAJ,EAAA,kBAAAC,EAAAD,EAAA,OAAAA,EAAA,QACC,mBAAAO,WAAAC,KAAA,SAAAC,EAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAX,OAGA,IAAAC,GAAAW,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAd,WAUA,OANAS,GAAAE,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAa,GAAA,EAGAb,EAAAD,QAvBA,GAAAY,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAlB,EAAAmB,EAAAC,GACAV,EAAAW,EAAArB,EAAAmB,IACAG,OAAAC,eAAAvB,EAAAmB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAA1B,GACA,GAAAmB,GAAAnB,KAAA2B,WACA,WAA2B,MAAA3B,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAS,GAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAA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wH,EAAM4C,OAAS5C,EAAMuF,SAAUvF,MAAOA,QF8VrF3E,IAAK,wBACLtC,IAAK,WExVL,MAAAwB,GAAAsB,EAAAzC,UAAAkB,WAAA3B,OAAAmC,eAAAe,EAAAzC,WAAA,wBAAAzB,OFgWAqF,IAAK,SE1VmBiE,GACxB,GAAKtJ,KAAKoF,QAAV,CAIA,GAAIyI,GAAS7N,KAAK8N,qBACdC,QAGJ,KAAiB,IAAbzE,EAAgB,CAElB,KADAyE,EAAeF,EAAOG,KAAK,SAAA3F,GAAA,MAASA,GAAM/C,KAAOgE,KAG/C,WADA5B,OAAIuG,KAAJ,aAAsB3E,EAAtB,cAGF,IAAItJ,KAAK8I,kBAAiD,IAA9BiF,EAAa1F,MAAM+E,OAE7C,WADA1F,OAAIwG,KAAJ,aAAsB5E,EAAtB,qBAKAyE,GACF/N,KAAKoF,QAAQmD,gBAAgBwF,EAAa1F,OAC1CrI,KAAKoF,QAAQ+I,wBAAuB,GACpCnO,KAAKoO,uBAAsB,KAE3BpO,KAAKoF,QAAQ+I,wBAAuB,GACpCnO,KAAKoO,uBAAsB,IAG7BpO,KAAKqO,WAAa/E,EAClBtJ,KAAK0F,QAAQC,SAAO2I,2BAClBhJ,GAAIgE,SFiWDpF,GE7iBuBqK,aFgjBhC7O,GAAQuE,QEzMOC,EF0MfvE,EAAOD,QAAUA,EAAiB,SAI5B,SAAUC,EAAQD,GG3jBxBC,EAAAD,QAAAO,GHikBM,SAAUN,EAAQD,GIjkBxBC,EAAAD,QAAAQ","file":"dash-shaka-playback.external.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"), require(\"shaka\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\", \"shaka\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DashShakaPlayback\"] = factory(require(\"clappr\"), require(\"shaka\"));\n\telse\n\t\troot[\"DashShakaPlayback\"] = factory(root[\"Clappr\"], root[\"shaka\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"), require(\"shaka\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\", \"shaka\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DashShakaPlayback\"] = factory(require(\"clappr\"), require(\"shaka\"));\n\telse\n\t\troot[\"DashShakaPlayback\"] = factory(root[\"Clappr\"], root[\"shaka\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__, __WEBPACK_EXTERNAL_MODULE_2__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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 = \"dist/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _clappr = __webpack_require__(1);\n\nvar _shakaPlayer = __webpack_require__(2);\n\nvar _shakaPlayer2 = _interopRequireDefault(_shakaPlayer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar SEND_STATS_INTERVAL_MS = 30 * 1e3;\nvar DEFAULT_LEVEL_AUTO = -1;\n\nvar DashShakaPlayback = function (_HTML5Video) {\n _inherits(DashShakaPlayback, _HTML5Video);\n\n _createClass(DashShakaPlayback, [{\n key: 'name',\n get: function get() {\n return 'dash_shaka_playback';\n }\n }, {\n key: 'shakaVersion',\n get: function get() {\n return _shakaPlayer2.default.player.Player.version;\n }\n }, {\n key: 'shakaPlayerInstance',\n get: function get() {\n return this._player;\n }\n }, {\n key: 'levels',\n get: function get() {\n return this._levels;\n }\n }, {\n key: 'currentLevel',\n set: function set(id) {\n var _this2 = this;\n\n this._currentLevelId = id;\n var isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO;\n\n this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_START);\n if (!isAuto) {\n this._player.configure({ abr: { enabled: false } });\n this._pendingAdaptationEvent = true;\n this.selectTrack(this.videoTracks.filter(function (t) {\n return t.id === _this2._currentLevelId;\n })[0]);\n } else {\n this._player.configure({ abr: { enabled: true } });\n this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_END);\n }\n },\n get: function get() {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO;\n }\n }], [{\n key: 'canPlay',\n value: function canPlay(resource) {\n var mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n _shakaPlayer2.default.polyfill.installAll();\n var browserSupported = _shakaPlayer2.default.Player.isBrowserSupported();\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n return browserSupported && (resourceParts[1] === 'mpd' || mimeType.indexOf('application/dash+xml') > -1);\n }\n }, {\n key: 'Events',\n get: function get() {\n return {\n SHAKA_READY: 'shaka:ready'\n };\n }\n }]);\n\n function DashShakaPlayback() {\n var _ref;\n\n _classCallCheck(this, DashShakaPlayback);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = _possibleConstructorReturn(this, (_ref = DashShakaPlayback.__proto__ || Object.getPrototypeOf(DashShakaPlayback)).call.apply(_ref, [this].concat(args)));\n\n _this._levels = [];\n _this._pendingAdaptationEvent = false;\n _this._isShakaReadyState = false;\n return _this;\n }\n\n _createClass(DashShakaPlayback, [{\n key: 'play',\n value: function play() {\n if (!this._player) {\n this._setup();\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play);\n return;\n }\n\n this._stopped = false;\n this._src = this.el.src;\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'play', this).call(this);\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n\n }, {\n key: '_setupSrc',\n value: function _setupSrc() {}\n\n // skipping ready event on video tag in favor of ready on shaka\n\n }, {\n key: '_ready',\n value: function _ready() {\n // override with no-op\n }\n }, {\n key: '_onShakaReady',\n value: function _onShakaReady() {\n this._isShakaReadyState = true;\n this.trigger(DashShakaPlayback.Events.SHAKA_READY);\n this.trigger(_clappr.Events.PLAYBACK_READY, this.name);\n }\n }, {\n key: 'error',\n\n\n // skipping error handling on video tag in favor of error on shaka\n value: function error(event) {\n _clappr.Log.error('an error was raised by the video tag', event, this.el.error);\n }\n }, {\n key: 'isHighDefinitionInUse',\n value: function isHighDefinitionInUse() {\n return !!this.highDefinition;\n }\n }, {\n key: 'stop',\n value: function stop() {\n var _this3 = this;\n\n clearInterval(this.sendStatsId);\n this._stopped = true;\n\n if (this._player) {\n this._sendStats();\n\n this._player.unload().then(function () {\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', _this3).call(_this3);\n _this3._player = null;\n _this3._isShakaReadyState = false;\n }).catch(function () {\n _clappr.Log.error('shaka could not be unloaded');\n });\n } else {\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', this).call(this);\n }\n }\n }, {\n key: 'getPlaybackType',\n value: function getPlaybackType() {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || '';\n }\n }, {\n key: 'selectTrack',\n value: function selectTrack(track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track);\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track);\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation();\n }\n } else {\n throw new Error('Unhandled track type:', track.type);\n }\n }\n\n /**\n * @override\n */\n\n }, {\n key: '_enableShakaTextTrack',\n value: function _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return;\n }\n\n this._shakaTTVisible = isEnable;\n\n Array.from(this.el.textTracks).filter(function (track) {\n return track.kind === 'subtitles';\n }).forEach(function (track) {\n return track.mode = isEnable === true ? 'showing' : 'hidden';\n });\n }\n }, {\n key: '_checkForClosedCaptions',\n value: function _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return;\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_AVAILABLE);\n var trackId = this.closedCaptionsTrackId;\n this.closedCaptionsTrackId = trackId;\n }\n this._ccIsSetup = true;\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n var _this4 = this;\n\n clearInterval(this.sendStatsId);\n\n if (this._player) {\n this._player.destroy().then(function () {\n return _this4._destroy();\n }).catch(function () {\n _this4._destroy();\n _clappr.Log.error('shaka could not be destroyed');\n });\n } else {\n this._destroy();\n }\n\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'destroy', this).call(this);\n }\n }, {\n key: '_setup',\n value: function _setup() {\n var _this5 = this;\n\n this._isShakaReadyState = false;\n this._ccIsSetup = false;\n this._player = this._createPlayer();\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration);\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player);\n\n var playerLoaded = this._player.load(this._options.src);\n playerLoaded.then(function () {\n return _this5._loaded();\n }).catch(function (e) {\n return _this5._setupError(e);\n });\n }\n }, {\n key: '_createPlayer',\n value: function _createPlayer() {\n var player = new _shakaPlayer2.default.Player(this.el);\n player.addEventListener('error', this._onError.bind(this));\n player.addEventListener('adaptation', this._onAdaptation.bind(this));\n player.addEventListener('buffering', this._onBuffering.bind(this));\n return player;\n }\n }, {\n key: '_onBuffering',\n value: function _onBuffering(e) {\n if (this._stopped) return;\n var event = e.buffering ? _clappr.Events.PLAYBACK_BUFFERING : _clappr.Events.PLAYBACK_BUFFERFULL;\n this.trigger(event);\n }\n }, {\n key: '_loaded',\n value: function _loaded() {\n this._onShakaReady();\n this._startToSendStats();\n this._fillLevels();\n this._checkForClosedCaptions();\n }\n }, {\n key: '_fillLevels',\n value: function _fillLevels() {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map(function (videoTrack) {\n return { id: videoTrack.id, label: videoTrack.height + 'p' };\n }).reverse();\n this.trigger(_clappr.Events.PLAYBACK_LEVELS_AVAILABLE, this.levels);\n }\n }\n }, {\n key: '_startToSendStats',\n value: function _startToSendStats() {\n var _this6 = this;\n\n var intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS;\n this.sendStatsId = setInterval(function () {\n return _this6._sendStats();\n }, intervalMs);\n }\n }, {\n key: '_sendStats',\n value: function _sendStats() {\n this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, this._player.getStats());\n }\n }, {\n key: '_setupError',\n value: function _setupError(err) {\n this._onError(err);\n }\n }, {\n key: '_onError',\n value: function _onError(err) {\n var error = {\n shakaError: err,\n videoError: this.el.error\n };\n\n var _ref2 = error.shakaError.detail || error.shakaError,\n category = _ref2.category,\n code = _ref2.code,\n severity = _ref2.severity;\n\n if (error.videoError || !code && !category) return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), '_onError', this).call(this);\n\n var isCritical = severity === _shakaPlayer2.default.util.Error.Severity.CRITICAL;\n var errorData = {\n code: category + '_' + code,\n description: 'Category: ' + category + ', code: ' + code + ', severity: ' + severity,\n level: isCritical ? _clappr.PlayerError.Levels.FATAL : _clappr.PlayerError.Levels.WARN,\n raw: err\n };\n var formattedError = this.createError(errorData);\n _clappr.Log.error('Shaka error event:', formattedError);\n this.trigger(_clappr.Events.PLAYBACK_ERROR, formattedError);\n }\n }, {\n key: '_onAdaptation',\n value: function _onAdaptation() {\n var activeVideo = this.videoTracks.filter(function (t) {\n return t.active === true;\n })[0];\n\n this._fillLevels();\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats();\n\n if (this._pendingAdaptationEvent) {\n this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_END);\n this._pendingAdaptationEvent = false;\n }\n\n _clappr.Log.debug('an adaptation has happened:', activeVideo);\n this.highDefinition = activeVideo.height >= 720;\n this.trigger(_clappr.Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n this.trigger(_clappr.Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n });\n }\n }, {\n key: '_destroy',\n value: function _destroy() {\n this._isShakaReadyState = false;\n _clappr.Log.debug('shaka was destroyed');\n }\n }, {\n key: 'isReady',\n get: function get() {\n return this._isShakaReadyState;\n }\n }, {\n key: 'textTracks',\n get: function get() {\n return this.isReady && this._player.getTextTracks();\n }\n }, {\n key: 'audioTracks',\n get: function get() {\n return this.isReady && this._player.getVariantTracks().filter(function (t) {\n return t.mimeType.startsWith('audio/');\n });\n }\n }, {\n key: 'videoTracks',\n get: function get() {\n return this.isReady && this._player.getVariantTracks().filter(function (t) {\n return t.mimeType.startsWith('video/');\n });\n }\n }, {\n key: 'closedCaptionsTracks',\n get: function get() {\n var id = 0;\n var trackId = function trackId() {\n return id++;\n };\n var tracks = this.textTracks || [];\n\n return tracks.filter(function (track) {\n return track.kind === 'subtitle';\n }).map(function (track) {\n return { id: trackId(), name: track.label || track.language, track: track };\n });\n }\n\n /**\n * @override\n */\n\n }, {\n key: 'closedCaptionsTrackId',\n get: function get() {\n return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'closedCaptionsTrackId', this);\n }\n\n /**\n * @override\n */\n ,\n set: function set(trackId) {\n if (!this._player) {\n return;\n }\n\n var tracks = this.closedCaptionsTracks;\n var showingTrack = void 0;\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(function (track) {\n return track.id === trackId;\n });\n if (!showingTrack) {\n _clappr.Log.warn('Track id \"' + trackId + '\" not found');\n return;\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n _clappr.Log.info('Track id \"' + trackId + '\" already showing');\n return;\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track);\n this._player.setTextTrackVisibility(true);\n this._enableShakaTextTrack(true);\n } else {\n this._player.setTextTrackVisibility(false);\n this._enableShakaTextTrack(false);\n }\n\n this._ccTrackId = trackId;\n this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n });\n }\n }]);\n\n return DashShakaPlayback;\n}(_clappr.HTML5Video);\n\nexports.default = DashShakaPlayback;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// dash-shaka-playback.external.min.js"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0df2aaf8b86a91dd527e","import {HTML5Video, Log, Events, PlayerError} from 'clappr'\nimport shaka from 'shaka-player'\n\nconst SEND_STATS_INTERVAL_MS = 30 * 1e3\nconst DEFAULT_LEVEL_AUTO = -1\n\nclass DashShakaPlayback extends HTML5Video {\n static get Events () {\n return {\n SHAKA_READY: 'shaka:ready'\n }\n }\n\n static canPlay (resource, mimeType = '') {\n shaka.polyfill.installAll()\n let browserSupported = shaka.Player.isBrowserSupported()\n let resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n return browserSupported && ((resourceParts[1] === 'mpd') || mimeType.indexOf('application/dash+xml') > -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type);\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._player.setTextTrackVisibility(true)\n this._enableShakaTextTrack(true)\n } else {\n this._player.setTextTrackVisibility(false)\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n\n\n\n// WEBPACK FOOTER //\n// ./src/clappr-dash-shaka-playback.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}\n// module id = 1\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"shaka\"\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://DashShakaPlayback/webpack/universalModuleDefinition","webpack://DashShakaPlayback/webpack/bootstrap","webpack://DashShakaPlayback/./src/clappr-dash-shaka-playback.js","webpack://DashShakaPlayback/external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}","webpack://DashShakaPlayback/external \"shaka\""],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__2__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_clappr","_shakaPlayer","DashShakaPlayback","_ref","_classCallCheck","this","_len","arguments","length","args","Array","_key","_this","_possibleConstructorReturn","__proto__","getPrototypeOf","apply","concat","_levels","_pendingAdaptationEvent","_isShakaReadyState","_minDvrSize","options","shakaMinimumDvrSize","HTML5Video","_duration","shakaPlayerInstance","getMediaElement","currentTime","seekRange","start","shaka","player","Player","version","_player","id","_this2","_currentLevelId","isAuto","trigger","Events","PLAYBACK_LEVEL_SWITCH_START","configure","abr","enabled","PLAYBACK_LEVEL_SWITCH_END","selectTrack","videoTracks","filter","getPlaybackType","end","getManifest","presentationTimeline","resource","mimeType","undefined","polyfill","installAll","browserSupported","isBrowserSupported","resourceParts","split","match","indexOf","SHAKA_READY","Date","getPresentationStartTime","status","PLAYBACK_DVR","PLAYBACK_STATS_ADD","dvr","time","Log","warn","dvrEnabled","_updateDvr","_startTime","_get","_setup","isReady","_stopped","_src","el","src","_startTimeUpdateTimer","once","play","_this3","_timeUpdateTimer","setInterval","_onTimeUpdate","clearInterval","PLAYBACK_READY","event","error","highDefinition","_this4","_stopTimeUpdateTimer","sendStatsId","_sendStats","unload","then","catch","isLive","track","type","selectTextTrack","Error","selectVariantTrack","startsWith","_onAdaptation","isEnable","textTracks","_shakaTTVisible","from","kind","forEach","_ccIsSetup","hasClosedCaptionsTracks","PLAYBACK_SUBTITLE_AVAILABLE","trackId","closedCaptionsTrackId","_this5","destroy","_destroy","_this6","_createPlayer","_options","shakaConfiguration","shakaOnBeforeLoad","load","_loaded","e","_setupError","addEventListener","_onError","_onBuffering","update","current","getCurrentTime","total","getDuration","firstFragDateTime","getProgramDateTime","_lastTimeUpdate","PLAYBACK_TIMEUPDATE","buffering","PLAYBACK_BUFFERING","PLAYBACK_BUFFERFULL","_onShakaReady","_startToSendStats","_fillLevels","_checkForClosedCaptions","map","videoTrack","label","height","reverse","PLAYBACK_LEVELS_AVAILABLE","levels","_this7","intervalMs","shakaSendStatsInterval","getStats","err","shakaError","videoError","_ref2","detail","category","code","severity","errorData","description","level","util","Severity","CRITICAL","PlayerError","Levels","FATAL","WARN","raw","formattedError","createError","PLAYBACK_ERROR","activeVideo","active","debug","PLAYBACK_HIGHDEFINITIONUPDATE","PLAYBACK_BITRATE","bandwidth","width","settings","left","seekEnabled","isSeekEnabled","PLAYBACK_SETTINGSUPDATE","getTextTracks","getVariantTracks","language","tracks","closedCaptionsTracks","showingTrack","find","info","setTextTrackVisibility","_enableShakaTextTrack","_ccTrackId","PLAYBACK_SUBTITLE_CHANGED"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,UAAAA,QAAA,UACA,mBAAAC,eAAAC,IACAD,OAAA,mBAAAJ,GACA,iBAAAC,QACAA,QAAA,kBAAAD,EAAAG,QAAA,UAAAA,QAAA,UAEAJ,EAAA,kBAAAC,EAAAD,EAAA,OAAAA,EAAA,OARA,CASCO,OAAA,SAAAC,EAAAC,GACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAV,QAGA,IAAAC,EAAAO,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAZ,QAAA,IAUA,OANAa,EAAAH,GAAAI,KAAAb,EAAAD,QAAAC,IAAAD,QAAAS,GAGAR,EAAAW,GAAA,EAGAX,EAAAD,QA0DA,OArDAS,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAjB,EAAAkB,EAAAC,GACAV,EAAAW,EAAApB,EAAAkB,IACAG,OAAAC,eAAAtB,EAAAkB,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,EAAAgB,EAAA,SAAAzB,GACA,oBAAA0B,eAAAC,aACAN,OAAAC,eAAAtB,EAAA0B,OAA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GACxB,GAAKpH,KAAK8B,QAAV,CAIA,IAAIuK,EAASrM,KAAKsM,qBACdC,SAGJ,IAAiB,IAAbnF,EAAgB,CAElB,KADAmF,EAAeF,EAAOG,KAAK,SAAApG,GAAA,OAASA,EAAMrE,KAAOqF,KAG/C,YADAhD,MAAIC,KAAJ,aAAsB+C,EAAtB,eAGF,GAAIpH,KAAK6G,kBAAiD,IAA9B0F,EAAanG,MAAMmF,OAE7C,YADAnH,MAAIqI,KAAJ,aAAsBrF,EAAtB,qBAKAmF,GACFvM,KAAK8B,QAAQwE,gBAAgBiG,EAAanG,OAC1CpG,KAAK8B,QAAQ4K,wBAAuB,GACpC1M,KAAK2M,uBAAsB,KAE3B3M,KAAK8B,QAAQ4K,wBAAuB,GACpC1M,KAAK2M,uBAAsB,IAG7B3M,KAAK4M,WAAaxF,EAClBpH,KAAKmC,QAAQC,SAAOyK,0BAA2B,CAC7C9K,GAAIqF,wBA0LKvH,qCCndf5C,EAAAD,QAAAM,iBCAAL,EAAAD,QAAAO","file":"dash-shaka-playback.external.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"), require(\"shaka\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\", \"shaka\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DashShakaPlayback\"] = factory(require(\"clappr\"), require(\"shaka\"));\n\telse\n\t\troot[\"DashShakaPlayback\"] = factory(root[\"Clappr\"], root[\"shaka\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\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 = \"dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import {HTML5Video, Log, Events, PlayerError} from 'clappr'\nimport shaka from 'shaka-player'\n\nconst SEND_STATS_INTERVAL_MS = 30 * 1e3\nconst DEFAULT_LEVEL_AUTO = -1\n\nclass DashShakaPlayback extends HTML5Video {\n static get Events () {\n return {\n SHAKA_READY: 'shaka:ready'\n }\n }\n\n static canPlay (resource, mimeType = '') {\n shaka.polyfill.installAll()\n let browserSupported = shaka.Player.isBrowserSupported()\n let resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n return browserSupported && ((resourceParts[1] === 'mpd') || mimeType.indexOf('application/dash+xml') > -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n get seekRange() {\n return this.shakaPlayerInstance.seekRange()\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n get dvrEnabled() {\n return this._duration >= this._minDvrSize && this.getPlaybackType() === 'live'\n }\n\n getDuration() {\n return this._duration\n }\n\n get _duration() {\n if (!this.shakaPlayerInstance) return 0\n\n return this.seekRange.end - this.seekRange.start\n }\n\n getCurrentTime() {\n return this.shakaPlayerInstance.getMediaElement().currentTime - this.seekRange.start\n }\n\n get _startTime() {\n return this.seekRange.start\n }\n\n get presentationTimeline() {\n return this.shakaPlayerInstance.getManifest().presentationTimeline\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n\n this._minDvrSize = typeof (this.options.shakaMinimumDvrSize) === 'undefined' ? 60 : this.options.shakaMinimumDvrSize\n }\n\n getProgramDateTime() {\n return new Date((this.presentationTimeline.getPresentationStartTime() + this.seekRange.start) * 1000)\n }\n\n _updateDvr(status) {\n this.trigger(Events.PLAYBACK_DVR, status)\n this.trigger(Events.PLAYBACK_STATS_ADD, { 'dvr': status })\n }\n\n seek(time) {\n if (time < 0) {\n Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.')\n time = this._duration\n }\n // assume live if time within 3 seconds of end of stream\n this.dvrEnabled && this._updateDvr(time < this._duration-3)\n time += this._startTime\n super.seek(time)\n }\n\n pause() {\n super.pause()\n\n if (this.dvrEnabled)\n this._updateDvr(true)\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n this._startTimeUpdateTimer()\n }\n\n _startTimeUpdateTimer() {\n this._timeUpdateTimer = setInterval(() => {\n this._onTimeUpdate()\n }, 100)\n }\n\n _stopTimeUpdateTimer() {\n clearInterval(this._timeUpdateTimer)\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type)\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._player.setTextTrackVisibility(true)\n this._enableShakaTextTrack(true)\n } else {\n this._player.setTextTrackVisibility(false)\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onTimeUpdate() {\n if (!this.shakaPlayerInstance) return\n\n let update = {\n current: this.getCurrentTime(),\n total: this.getDuration(),\n firstFragDateTime: this.getProgramDateTime()\n }\n let isSame = this._lastTimeUpdate && (\n update.current === this._lastTimeUpdate.current &&\n update.total === this._lastTimeUpdate.total)\n if (isSame)\n return\n\n this._lastTimeUpdate = update\n this.trigger(Events.PLAYBACK_TIMEUPDATE, update, this.name)\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _updateSettings() {\n if (this.getPlaybackType() === 'vod')\n this.settings.left = ['playpause', 'position', 'duration']\n else if (this.dvrEnabled)\n this.settings.left = ['playpause']\n else\n this.settings.left = ['playstop']\n\n this.settings.seekEnabled = this.isSeekEnabled()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE)\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/dash-shaka-playback.js b/dist/dash-shaka-playback.js index d797bd1..4c779ef 100644 --- a/dist/dash-shaka-playback.js +++ b/dist/dash-shaka-playback.js @@ -7,7 +7,7 @@ exports["DashShakaPlayback"] = factory(require("clappr")); else root["DashShakaPlayback"] = factory(root["Clappr"]); -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__) { +})(window, function(__WEBPACK_EXTERNAL_MODULE_clappr__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -46,14 +46,34 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -69,550 +89,58 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "dist/"; /******/ +/******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ return __webpack_require__(__webpack_require__.s = "./src/clappr-dash-shaka-playback.js"); /******/ }) /************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _clappr = __webpack_require__(1); - -var _shakaPlayer = __webpack_require__(2); - -var _shakaPlayer2 = _interopRequireDefault(_shakaPlayer); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var SEND_STATS_INTERVAL_MS = 30 * 1e3; -var DEFAULT_LEVEL_AUTO = -1; - -var DashShakaPlayback = function (_HTML5Video) { - _inherits(DashShakaPlayback, _HTML5Video); - - _createClass(DashShakaPlayback, [{ - key: 'name', - get: function get() { - return 'dash_shaka_playback'; - } - }, { - key: 'shakaVersion', - get: function get() { - return _shakaPlayer2.default.player.Player.version; - } - }, { - key: 'shakaPlayerInstance', - get: function get() { - return this._player; - } - }, { - key: 'levels', - get: function get() { - return this._levels; - } - }, { - key: 'currentLevel', - set: function set(id) { - var _this2 = this; - - this._currentLevelId = id; - var isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO; - - this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_START); - if (!isAuto) { - this._player.configure({ abr: { enabled: false } }); - this._pendingAdaptationEvent = true; - this.selectTrack(this.videoTracks.filter(function (t) { - return t.id === _this2._currentLevelId; - })[0]); - } else { - this._player.configure({ abr: { enabled: true } }); - this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_END); - } - }, - get: function get() { - return this._currentLevelId || DEFAULT_LEVEL_AUTO; - } - }], [{ - key: 'canPlay', - value: function canPlay(resource) { - var mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; - - _shakaPlayer2.default.polyfill.installAll(); - var browserSupported = _shakaPlayer2.default.Player.isBrowserSupported(); - var resourceParts = resource.split('?')[0].match(/.*\.(.*)$/) || []; - return browserSupported && (resourceParts[1] === 'mpd' || mimeType.indexOf('application/dash+xml') > -1); - } - }, { - key: 'Events', - get: function get() { - return { - SHAKA_READY: 'shaka:ready' - }; - } - }]); - - function DashShakaPlayback() { - var _ref; - - _classCallCheck(this, DashShakaPlayback); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _this = _possibleConstructorReturn(this, (_ref = DashShakaPlayback.__proto__ || Object.getPrototypeOf(DashShakaPlayback)).call.apply(_ref, [this].concat(args))); - - _this._levels = []; - _this._pendingAdaptationEvent = false; - _this._isShakaReadyState = false; - return _this; - } - - _createClass(DashShakaPlayback, [{ - key: 'play', - value: function play() { - if (!this._player) { - this._setup(); - } - - if (!this.isReady) { - this.once(DashShakaPlayback.Events.SHAKA_READY, this.play); - return; - } - - this._stopped = false; - this._src = this.el.src; - _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'play', this).call(this); - } - - // skipping HTML5Video `_setupSrc` (on tag video) - - }, { - key: '_setupSrc', - value: function _setupSrc() {} - - // skipping ready event on video tag in favor of ready on shaka - - }, { - key: '_ready', - value: function _ready() { - // override with no-op - } - }, { - key: '_onShakaReady', - value: function _onShakaReady() { - this._isShakaReadyState = true; - this.trigger(DashShakaPlayback.Events.SHAKA_READY); - this.trigger(_clappr.Events.PLAYBACK_READY, this.name); - } - }, { - key: 'error', - - - // skipping error handling on video tag in favor of error on shaka - value: function error(event) { - _clappr.Log.error('an error was raised by the video tag', event, this.el.error); - } - }, { - key: 'isHighDefinitionInUse', - value: function isHighDefinitionInUse() { - return !!this.highDefinition; - } - }, { - key: 'stop', - value: function stop() { - var _this3 = this; - - clearInterval(this.sendStatsId); - this._stopped = true; +/******/ ({ - if (this._player) { - this._sendStats(); +/***/ "./node_modules/shaka-player/dist/shaka-player.compiled.js": +/*!*****************************************************************!*\ + !*** ./node_modules/shaka-player/dist/shaka-player.compiled.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { - this._player.unload().then(function () { - _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', _this3).call(_this3); - _this3._player = null; - _this3._isShakaReadyState = false; - }).catch(function () { - _clappr.Log.error('shaka could not be unloaded'); - }); - } else { - _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', this).call(this); - } - } - }, { - key: 'getPlaybackType', - value: function getPlaybackType() { - return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''; - } - }, { - key: 'selectTrack', - value: function selectTrack(track) { - if (track.type === 'text') { - this._player.selectTextTrack(track); - } else if (track.type === 'variant') { - this._player.selectVariantTrack(track); - if (track.mimeType.startsWith('video/')) { - // we trigger the adaptation event here - // because Shaka doesn't trigger its event on "manual" selection. - this._onAdaptation(); - } - } else { - throw new Error('Unhandled track type:', track.type); - } - } +/* WEBPACK VAR INJECTION */(function(global) {(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}(); +function fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return cg&&(g=Math.max(g+f,0));g=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Pa(this,b,d).ee}});var Sa=this;Sa.a=!0; +function z(b,c){var d=b.split("."),e=Sa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ng=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/* - /** - * @override - */ + Copyright 2016 Google Inc. - }, { - key: '_enableShakaTextTrack', - value: function _enableShakaTextTrack(isEnable) { - // Shaka player use only one TextTrack object with video element to handle all text tracks - // It must be enabled or disabled in addition to call selectTextTrack() - if (!this.el.textTracks) { - return; - } + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - this._shakaTTVisible = isEnable; - - Array.from(this.el.textTracks).filter(function (track) { - return track.kind === 'subtitles'; - }).forEach(function (track) { - return track.mode = isEnable === true ? 'showing' : 'hidden'; - }); - } - }, { - key: '_checkForClosedCaptions', - value: function _checkForClosedCaptions() { - if (this._ccIsSetup) { - return; - } - - if (this.hasClosedCaptionsTracks) { - this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_AVAILABLE); - var trackId = this.closedCaptionsTrackId; - this.closedCaptionsTrackId = trackId; - } - this._ccIsSetup = true; - } - }, { - key: 'destroy', - value: function destroy() { - var _this4 = this; - - clearInterval(this.sendStatsId); - - if (this._player) { - this._player.destroy().then(function () { - return _this4._destroy(); - }).catch(function () { - _this4._destroy(); - _clappr.Log.error('shaka could not be destroyed'); - }); - } else { - this._destroy(); - } - - _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'destroy', this).call(this); - } - }, { - key: '_setup', - value: function _setup() { - var _this5 = this; - - this._isShakaReadyState = false; - this._ccIsSetup = false; - this._player = this._createPlayer(); - this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration); - this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player); - - var playerLoaded = this._player.load(this._options.src); - playerLoaded.then(function () { - return _this5._loaded(); - }).catch(function (e) { - return _this5._setupError(e); - }); - } - }, { - key: '_createPlayer', - value: function _createPlayer() { - var player = new _shakaPlayer2.default.Player(this.el); - player.addEventListener('error', this._onError.bind(this)); - player.addEventListener('adaptation', this._onAdaptation.bind(this)); - player.addEventListener('buffering', this._onBuffering.bind(this)); - return player; - } - }, { - key: '_onBuffering', - value: function _onBuffering(e) { - if (this._stopped) return; - var event = e.buffering ? _clappr.Events.PLAYBACK_BUFFERING : _clappr.Events.PLAYBACK_BUFFERFULL; - this.trigger(event); - } - }, { - key: '_loaded', - value: function _loaded() { - this._onShakaReady(); - this._startToSendStats(); - this._fillLevels(); - this._checkForClosedCaptions(); - } - }, { - key: '_fillLevels', - value: function _fillLevels() { - if (this._levels.length === 0) { - this._levels = this.videoTracks.map(function (videoTrack) { - return { id: videoTrack.id, label: videoTrack.height + 'p' }; - }).reverse(); - this.trigger(_clappr.Events.PLAYBACK_LEVELS_AVAILABLE, this.levels); - } - } - }, { - key: '_startToSendStats', - value: function _startToSendStats() { - var _this6 = this; - - var intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS; - this.sendStatsId = setInterval(function () { - return _this6._sendStats(); - }, intervalMs); - } - }, { - key: '_sendStats', - value: function _sendStats() { - this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, this._player.getStats()); - } - }, { - key: '_setupError', - value: function _setupError(err) { - this._onError(err); - } - }, { - key: '_onError', - value: function _onError(err) { - var error = { - shakaError: err, - videoError: this.el.error - }; - - var _ref2 = error.shakaError.detail || error.shakaError, - category = _ref2.category, - code = _ref2.code, - severity = _ref2.severity; - - if (error.videoError || !code && !category) return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), '_onError', this).call(this); - - var isCritical = severity === _shakaPlayer2.default.util.Error.Severity.CRITICAL; - var errorData = { - code: category + '_' + code, - description: 'Category: ' + category + ', code: ' + code + ', severity: ' + severity, - level: isCritical ? _clappr.PlayerError.Levels.FATAL : _clappr.PlayerError.Levels.WARN, - raw: err - }; - var formattedError = this.createError(errorData); - _clappr.Log.error('Shaka error event:', formattedError); - this.trigger(_clappr.Events.PLAYBACK_ERROR, formattedError); - } - }, { - key: '_onAdaptation', - value: function _onAdaptation() { - var activeVideo = this.videoTracks.filter(function (t) { - return t.active === true; - })[0]; - - this._fillLevels(); - - // update stats that may have changed before we trigger event - // so that user can rely on stats data when handling event - this._sendStats(); - - if (this._pendingAdaptationEvent) { - this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_END); - this._pendingAdaptationEvent = false; - } - - _clappr.Log.debug('an adaptation has happened:', activeVideo); - this.highDefinition = activeVideo.height >= 720; - this.trigger(_clappr.Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition); - this.trigger(_clappr.Events.PLAYBACK_BITRATE, { - bandwidth: activeVideo.bandwidth, - width: activeVideo.width, - height: activeVideo.height, - level: activeVideo.id - }); - } - }, { - key: '_destroy', - value: function _destroy() { - this._isShakaReadyState = false; - _clappr.Log.debug('shaka was destroyed'); - } - }, { - key: 'isReady', - get: function get() { - return this._isShakaReadyState; - } - }, { - key: 'textTracks', - get: function get() { - return this.isReady && this._player.getTextTracks(); - } - }, { - key: 'audioTracks', - get: function get() { - return this.isReady && this._player.getVariantTracks().filter(function (t) { - return t.mimeType.startsWith('audio/'); - }); - } - }, { - key: 'videoTracks', - get: function get() { - return this.isReady && this._player.getVariantTracks().filter(function (t) { - return t.mimeType.startsWith('video/'); - }); - } - }, { - key: 'closedCaptionsTracks', - get: function get() { - var id = 0; - var trackId = function trackId() { - return id++; - }; - var tracks = this.textTracks || []; - - return tracks.filter(function (track) { - return track.kind === 'subtitle'; - }).map(function (track) { - return { id: trackId(), name: track.label || track.language, track: track }; - }); - } - - /** - * @override - */ - - }, { - key: 'closedCaptionsTrackId', - get: function get() { - return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'closedCaptionsTrackId', this); - } - - /** - * @override - */ - , - set: function set(trackId) { - if (!this._player) { - return; - } - - var tracks = this.closedCaptionsTracks; - var showingTrack = void 0; - - // Note: -1 is for hide all tracks - if (trackId !== -1) { - showingTrack = tracks.find(function (track) { - return track.id === trackId; - }); - if (!showingTrack) { - _clappr.Log.warn('Track id "' + trackId + '" not found'); - return; - } - if (this._shakaTTVisible && showingTrack.track.active === true) { - _clappr.Log.info('Track id "' + trackId + '" already showing'); - return; - } - } - - if (showingTrack) { - this._player.selectTextTrack(showingTrack.track); - this._enableShakaTextTrack(true); - } else { - this._enableShakaTextTrack(false); - } - - this._ccTrackId = trackId; - this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_CHANGED, { - id: trackId - }); - } - }]); - - return DashShakaPlayback; -}(_clappr.HTML5Video); - -exports.default = DashShakaPlayback; -module.exports = exports['default']; - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_1__; - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global) {(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}(); -function fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return cg&&(g=Math.max(g+f,0));g=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Pa(this,b,d).ee}});var Sa=this;Sa.a=!0; -function z(b,c){var d=b.split("."),e=Sa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ng=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/* - - Copyright 2016 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -1171,39 +699,664 @@ c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=mo(d,e[1]))b.re function ko(b){b=Mg(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59= this._minDvrSize && this.getPlaybackType() === 'live'; + } + }, { + key: '_duration', + get: function get() { + if (!this.shakaPlayerInstance) return 0; + + return this.seekRange.end - this.seekRange.start; + } + }, { + key: '_startTime', + get: function get() { + return this.seekRange.start; + } + }, { + key: 'presentationTimeline', + get: function get() { + return this.shakaPlayerInstance.getManifest().presentationTimeline; + } + }], [{ + key: 'canPlay', + value: function canPlay(resource) { + var mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; + + _shakaPlayer2.default.polyfill.installAll(); + var browserSupported = _shakaPlayer2.default.Player.isBrowserSupported(); + var resourceParts = resource.split('?')[0].match(/.*\.(.*)$/) || []; + return browserSupported && (resourceParts[1] === 'mpd' || mimeType.indexOf('application/dash+xml') > -1); + } + }, { + key: 'Events', + get: function get() { + return { + SHAKA_READY: 'shaka:ready' + }; + } + }]); + + function DashShakaPlayback() { + var _ref; + + _classCallCheck(this, DashShakaPlayback); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var _this = _possibleConstructorReturn(this, (_ref = DashShakaPlayback.__proto__ || Object.getPrototypeOf(DashShakaPlayback)).call.apply(_ref, [this].concat(args))); + + _this._levels = []; + _this._pendingAdaptationEvent = false; + _this._isShakaReadyState = false; + + _this._minDvrSize = typeof _this.options.shakaMinimumDvrSize === 'undefined' ? 60 : _this.options.shakaMinimumDvrSize; + return _this; + } + + _createClass(DashShakaPlayback, [{ + key: 'getProgramDateTime', + value: function getProgramDateTime() { + return new Date((this.presentationTimeline.getPresentationStartTime() + this.seekRange.start) * 1000); + } + }, { + key: '_updateDvr', + value: function _updateDvr(status) { + this.trigger(_clappr.Events.PLAYBACK_DVR, status); + this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, { 'dvr': status }); + } + }, { + key: 'seek', + value: function seek(time) { + if (time < 0) { + _clappr.Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.'); + time = this._duration; + } + // assume live if time within 3 seconds of end of stream + this.dvrEnabled && this._updateDvr(time < this._duration - 3); + time += this._startTime; + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'seek', this).call(this, time); + } + }, { + key: 'pause', + value: function pause() { + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'pause', this).call(this); + + if (this.dvrEnabled) this._updateDvr(true); + } + }, { + key: 'play', + value: function play() { + if (!this._player) { + this._setup(); + } + + if (!this.isReady) { + this.once(DashShakaPlayback.Events.SHAKA_READY, this.play); + return; + } + + this._stopped = false; + this._src = this.el.src; + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'play', this).call(this); + this._startTimeUpdateTimer(); + } + }, { + key: '_startTimeUpdateTimer', + value: function _startTimeUpdateTimer() { + var _this3 = this; + + this._timeUpdateTimer = setInterval(function () { + _this3._onTimeUpdate(); + }, 100); + } + }, { + key: '_stopTimeUpdateTimer', + value: function _stopTimeUpdateTimer() { + clearInterval(this._timeUpdateTimer); + } + + // skipping HTML5Video `_setupSrc` (on tag video) + + }, { + key: '_setupSrc', + value: function _setupSrc() {} + + // skipping ready event on video tag in favor of ready on shaka + + }, { + key: '_ready', + value: function _ready() { + // override with no-op + } + }, { + key: '_onShakaReady', + value: function _onShakaReady() { + this._isShakaReadyState = true; + this.trigger(DashShakaPlayback.Events.SHAKA_READY); + this.trigger(_clappr.Events.PLAYBACK_READY, this.name); + } + }, { + key: 'error', + + + // skipping error handling on video tag in favor of error on shaka + value: function error(event) { + _clappr.Log.error('an error was raised by the video tag', event, this.el.error); + } + }, { + key: 'isHighDefinitionInUse', + value: function isHighDefinitionInUse() { + return !!this.highDefinition; + } + }, { + key: 'stop', + value: function stop() { + var _this4 = this; + + this._stopTimeUpdateTimer(); + clearInterval(this.sendStatsId); + this._stopped = true; + + if (this._player) { + this._sendStats(); + + this._player.unload().then(function () { + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', _this4).call(_this4); + _this4._player = null; + _this4._isShakaReadyState = false; + }).catch(function () { + _clappr.Log.error('shaka could not be unloaded'); + }); + } else { + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', this).call(this); + } + } + }, { + key: 'getPlaybackType', + value: function getPlaybackType() { + return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''; + } + }, { + key: 'selectTrack', + value: function selectTrack(track) { + if (track.type === 'text') { + this._player.selectTextTrack(track); + } else if (track.type === 'variant') { + this._player.selectVariantTrack(track); + if (track.mimeType.startsWith('video/')) { + // we trigger the adaptation event here + // because Shaka doesn't trigger its event on "manual" selection. + this._onAdaptation(); + } + } else { + throw new Error('Unhandled track type:', track.type); + } + } + + /** + * @override + */ + + }, { + key: '_enableShakaTextTrack', + value: function _enableShakaTextTrack(isEnable) { + // Shaka player use only one TextTrack object with video element to handle all text tracks + // It must be enabled or disabled in addition to call selectTextTrack() + if (!this.el.textTracks) { + return; + } + + this._shakaTTVisible = isEnable; + + Array.from(this.el.textTracks).filter(function (track) { + return track.kind === 'subtitles'; + }).forEach(function (track) { + return track.mode = isEnable === true ? 'showing' : 'hidden'; + }); + } + }, { + key: '_checkForClosedCaptions', + value: function _checkForClosedCaptions() { + if (this._ccIsSetup) { + return; + } + + if (this.hasClosedCaptionsTracks) { + this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_AVAILABLE); + var trackId = this.closedCaptionsTrackId; + this.closedCaptionsTrackId = trackId; + } + this._ccIsSetup = true; + } + }, { + key: 'destroy', + value: function destroy() { + var _this5 = this; -//# sourceMappingURL=shaka-player.compiled.map -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) + this._stopTimeUpdateTimer(); + clearInterval(this.sendStatsId); + + if (this._player) { + this._player.destroy().then(function () { + return _this5._destroy(); + }).catch(function () { + _this5._destroy(); + _clappr.Log.error('shaka could not be destroyed'); + }); + } else { + this._destroy(); + } + + _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'destroy', this).call(this); + } + }, { + key: '_setup', + value: function _setup() { + var _this6 = this; + + this._isShakaReadyState = false; + this._ccIsSetup = false; + this._player = this._createPlayer(); + this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration); + this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player); + + var playerLoaded = this._player.load(this._options.src); + playerLoaded.then(function () { + return _this6._loaded(); + }).catch(function (e) { + return _this6._setupError(e); + }); + } + }, { + key: '_createPlayer', + value: function _createPlayer() { + var player = new _shakaPlayer2.default.Player(this.el); + player.addEventListener('error', this._onError.bind(this)); + player.addEventListener('adaptation', this._onAdaptation.bind(this)); + player.addEventListener('buffering', this._onBuffering.bind(this)); + return player; + } + }, { + key: '_onTimeUpdate', + value: function _onTimeUpdate() { + if (!this.shakaPlayerInstance) return; + + var update = { + current: this.getCurrentTime(), + total: this.getDuration(), + firstFragDateTime: this.getProgramDateTime() + }; + var isSame = this._lastTimeUpdate && update.current === this._lastTimeUpdate.current && update.total === this._lastTimeUpdate.total; + if (isSame) return; + + this._lastTimeUpdate = update; + this.trigger(_clappr.Events.PLAYBACK_TIMEUPDATE, update, this.name); + } + }, { + key: '_onBuffering', + value: function _onBuffering(e) { + if (this._stopped) return; + var event = e.buffering ? _clappr.Events.PLAYBACK_BUFFERING : _clappr.Events.PLAYBACK_BUFFERFULL; + this.trigger(event); + } + }, { + key: '_loaded', + value: function _loaded() { + this._onShakaReady(); + this._startToSendStats(); + this._fillLevels(); + this._checkForClosedCaptions(); + } + }, { + key: '_fillLevels', + value: function _fillLevels() { + if (this._levels.length === 0) { + this._levels = this.videoTracks.map(function (videoTrack) { + return { id: videoTrack.id, label: videoTrack.height + 'p' }; + }).reverse(); + this.trigger(_clappr.Events.PLAYBACK_LEVELS_AVAILABLE, this.levels); + } + } + }, { + key: '_startToSendStats', + value: function _startToSendStats() { + var _this7 = this; + + var intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS; + this.sendStatsId = setInterval(function () { + return _this7._sendStats(); + }, intervalMs); + } + }, { + key: '_sendStats', + value: function _sendStats() { + this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, this._player.getStats()); + } + }, { + key: '_setupError', + value: function _setupError(err) { + this._onError(err); + } + }, { + key: '_onError', + value: function _onError(err) { + var error = { + shakaError: err, + videoError: this.el.error + }; + + var _ref2 = error.shakaError.detail || error.shakaError, + category = _ref2.category, + code = _ref2.code, + severity = _ref2.severity; + + if (error.videoError || !code && !category) return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), '_onError', this).call(this); + + var isCritical = severity === _shakaPlayer2.default.util.Error.Severity.CRITICAL; + var errorData = { + code: category + '_' + code, + description: 'Category: ' + category + ', code: ' + code + ', severity: ' + severity, + level: isCritical ? _clappr.PlayerError.Levels.FATAL : _clappr.PlayerError.Levels.WARN, + raw: err + }; + var formattedError = this.createError(errorData); + _clappr.Log.error('Shaka error event:', formattedError); + this.trigger(_clappr.Events.PLAYBACK_ERROR, formattedError); + } + }, { + key: '_onAdaptation', + value: function _onAdaptation() { + var activeVideo = this.videoTracks.filter(function (t) { + return t.active === true; + })[0]; + + this._fillLevels(); + + // update stats that may have changed before we trigger event + // so that user can rely on stats data when handling event + this._sendStats(); + + if (this._pendingAdaptationEvent) { + this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_END); + this._pendingAdaptationEvent = false; + } + + _clappr.Log.debug('an adaptation has happened:', activeVideo); + this.highDefinition = activeVideo.height >= 720; + this.trigger(_clappr.Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition); + this.trigger(_clappr.Events.PLAYBACK_BITRATE, { + bandwidth: activeVideo.bandwidth, + width: activeVideo.width, + height: activeVideo.height, + level: activeVideo.id + }); + } + }, { + key: '_updateSettings', + value: function _updateSettings() { + if (this.getPlaybackType() === 'vod') this.settings.left = ['playpause', 'position', 'duration'];else if (this.dvrEnabled) this.settings.left = ['playpause'];else this.settings.left = ['playstop']; + + this.settings.seekEnabled = this.isSeekEnabled(); + this.trigger(_clappr.Events.PLAYBACK_SETTINGSUPDATE); + } + }, { + key: '_destroy', + value: function _destroy() { + this._isShakaReadyState = false; + _clappr.Log.debug('shaka was destroyed'); + } + }, { + key: 'isReady', + get: function get() { + return this._isShakaReadyState; + } + }, { + key: 'textTracks', + get: function get() { + return this.isReady && this._player.getTextTracks(); + } + }, { + key: 'audioTracks', + get: function get() { + return this.isReady && this._player.getVariantTracks().filter(function (t) { + return t.mimeType.startsWith('audio/'); + }); + } + }, { + key: 'videoTracks', + get: function get() { + return this.isReady && this._player.getVariantTracks().filter(function (t) { + return t.mimeType.startsWith('video/'); + }); + } + }, { + key: 'closedCaptionsTracks', + get: function get() { + var id = 0; + var trackId = function trackId() { + return id++; + }; + var tracks = this.textTracks || []; + + return tracks.filter(function (track) { + return track.kind === 'subtitle'; + }).map(function (track) { + return { id: trackId(), name: track.label || track.language, track: track }; + }); + } + + /** + * @override + */ + + }, { + key: 'closedCaptionsTrackId', + get: function get() { + return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'closedCaptionsTrackId', this); + } + + /** + * @override + */ + , + set: function set(trackId) { + if (!this._player) { + return; + } + + var tracks = this.closedCaptionsTracks; + var showingTrack = void 0; + + // Note: -1 is for hide all tracks + if (trackId !== -1) { + showingTrack = tracks.find(function (track) { + return track.id === trackId; + }); + if (!showingTrack) { + _clappr.Log.warn('Track id "' + trackId + '" not found'); + return; + } + if (this._shakaTTVisible && showingTrack.track.active === true) { + _clappr.Log.info('Track id "' + trackId + '" already showing'); + return; + } + } + + if (showingTrack) { + this._player.selectTextTrack(showingTrack.track); + this._player.setTextTrackVisibility(true); + this._enableShakaTextTrack(true); + } else { + this._player.setTextTrackVisibility(false); + this._enableShakaTextTrack(false); + } + + this._ccTrackId = trackId; + this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_CHANGED, { + id: trackId + }); + } + }]); + + return DashShakaPlayback; +}(_clappr.HTML5Video); + +exports.default = DashShakaPlayback; +module.exports = exports['default']; /***/ }), -/* 3 */ -/***/ (function(module, exports) { -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; +/***/ "clappr": +/*!******************************************************************************************!*\ + !*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { +module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__; /***/ }) -/******/ ]); + +/******/ }); }); //# sourceMappingURL=dash-shaka-playback.js.map \ No newline at end of file diff --git a/dist/dash-shaka-playback.js.map b/dist/dash-shaka-playback.js.map index 574340f..f5f8ae7 100644 --- a/dist/dash-shaka-playback.js.map +++ b/dist/dash-shaka-playback.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b7ddb9960cb883fb8607","webpack:///./src/clappr-dash-shaka-playback.js","webpack:///external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}","webpack:///./node_modules/shaka-player/dist/shaka-player.compiled.js","webpack:///(webpack)/buildin/global.js"],"names":["SEND_STATS_INTERVAL_MS","DEFAULT_LEVEL_AUTO","DashShakaPlayback","shaka","player","Player","version","_player","_levels","id","_currentLevelId","isAuto","trigger","Events","PLAYBACK_LEVEL_SWITCH_START","configure","abr","enabled","_pendingAdaptationEvent","selectTrack","videoTracks","filter","t","PLAYBACK_LEVEL_SWITCH_END","resource","mimeType","polyfill","installAll","browserSupported","isBrowserSupported","resourceParts","split","match","indexOf","SHAKA_READY","args","_isShakaReadyState","_setup","isReady","once","play","_stopped","_src","el","src","PLAYBACK_READY","name","event","Log","error","highDefinition","clearInterval","sendStatsId","_sendStats","unload","then","catch","isLive","track","type","selectTextTrack","selectVariantTrack","startsWith","_onAdaptation","Error","isEnable","textTracks","_shakaTTVisible","Array","from","kind","forEach","mode","_ccIsSetup","hasClosedCaptionsTracks","PLAYBACK_SUBTITLE_AVAILABLE","trackId","closedCaptionsTrackId","destroy","_destroy","_createPlayer","_options","shakaConfiguration","shakaOnBeforeLoad","playerLoaded","load","_loaded","e","_setupError","addEventListener","_onError","bind","_onBuffering","buffering","PLAYBACK_BUFFERING","PLAYBACK_BUFFERFULL","_onShakaReady","_startToSendStats","_fillLevels","_checkForClosedCaptions","length","map","videoTrack","label","height","reverse","PLAYBACK_LEVELS_AVAILABLE","levels","intervalMs","shakaSendStatsInterval","setInterval","PLAYBACK_STATS_ADD","getStats","err","shakaError","videoError","detail","category","code","severity","isCritical","util","Severity","CRITICAL","errorData","description","level","PlayerError","Levels","FATAL","WARN","raw","formattedError","createError","PLAYBACK_ERROR","activeVideo","active","debug","PLAYBACK_HIGHDEFINITIONUPDATE","PLAYBACK_BITRATE","bandwidth","width","getTextTracks","getVariantTracks","tracks","language","closedCaptionsTracks","showingTrack","find","warn","info","_enableShakaTextTrack","_ccTrackId","PLAYBACK_SUBTITLE_CHANGED","HTML5Video"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC7DA;;AACA;;;;;;;;;;;;AAEA,IAAMA,yBAAyB,KAAK,GAApC;AACA,IAAMC,qBAAqB,CAAC,CAA5B;;IAEMC,iB;;;;;wBAcQ;AACV,aAAO,qBAAP;AACD;;;wBAEm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AwE,sBAAsB,oCAAoC,WAAW,QAAQ,GAAG,YAAY,KAAK,mBAAmB,0CAA0C,4DAA4D;AACle,gBAAgB,EAAE,wBAAwB,mBAAmB,UAAU,gCAAgC,QAAQ,2BAA2B,QAAQ,2BAA2B,QAAQ,YAAY,4BAA4B,uBAAuB,gBAAgB,YAAY,6BAA6B,EAAE,0BAA0B,SAAS,oBAAoB,oBAAoB,iDAAiD,iCAAiC,EAAE,iDAAiD,sCAAsC,WAAW,YAAY,aAAa,SAAS,EAAE,6CAA6C,SAAS,EAAE,kDAAkD,SAAS,EAAE,iDAAiD,KAAK,aAAa,6BAA6B,GAAG,yCAAyC,GAAG,IAA2B,0DAA0D,iEAAiE,sBAAsB,EAAE,sCAAsC;;AAE5iC,8C;;;;;;;ACtlBA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C","file":"dash-shaka-playback.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"clappr\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"clappr\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"DashShakaPlayback\"] = factory(require(\"clappr\"));\n\telse\n\t\troot[\"DashShakaPlayback\"] = factory(root[\"Clappr\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 = \"dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b7ddb9960cb883fb8607","import {HTML5Video, Log, Events, PlayerError} from 'clappr'\nimport shaka from 'shaka-player'\n\nconst SEND_STATS_INTERVAL_MS = 30 * 1e3\nconst DEFAULT_LEVEL_AUTO = -1\n\nclass DashShakaPlayback extends HTML5Video {\n static get Events () {\n return {\n SHAKA_READY: 'shaka:ready'\n }\n }\n\n static canPlay (resource, mimeType = '') {\n shaka.polyfill.installAll()\n let browserSupported = shaka.Player.isBrowserSupported()\n let resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || []\n return browserSupported && ((resourceParts[1] === 'mpd') || mimeType.indexOf('application/dash+xml') > -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type);\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._enableShakaTextTrack(true)\n } else {\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n\n\n\n// WEBPACK FOOTER //\n// ./src/clappr-dash-shaka-playback.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}\n// module id = 1\n// module chunks = 0","(function(){var innerGlobal=typeof window!=\"undefined\"?window:global;var exportTo={};(function(window,global){var p,aa=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca=\"undefined\"!=typeof window&&window===this?this:\"undefined\"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return\"jscomp_symbol_\"+(c||\"\")+b++}}();\nfunction fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol(\"iterator\"));\"function\"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return cg&&(g=Math.max(g+f,0));g=g}});ka(\"Array.prototype.find\",function(b){return b?b:function(b,d){return Pa(this,b,d).ee}});var Sa=this;Sa.a=!0;\nfunction z(b,c){var d=b.split(\".\"),e=Sa;d[0]in e||!e.execScript||e.execScript(\"var \"+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ng=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*\n\n Copyright 2016 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\nfunction Ua(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Ua(2);this.c=new Ua(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\\/\\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(db(this,b.sa),this.Xa=b.Xa,this.oa=b.oa,hb(this,b.tb),this.fa=b.fa,ib(this,b.a.clone()),this.Oa=b.Oa):b&&(c=String(b).match(bb))?(db(this,c[1]||\"\",!0),this.Xa=jb(c[2]||\"\"),this.oa=jb(c[3]||\"\",!0),hb(this,c[4]),this.fa=jb(c[5]||\"\",!0),ib(this,c[6]||\"\",!0),this.Oa=jb(c[7]||\"\")):this.a=new kb(null)}p=cb.prototype;p.sa=\"\";p.Xa=\"\";p.oa=\"\";p.tb=null;p.fa=\"\";p.Oa=\"\";\np.toString=function(){var b=[],c=this.sa;c&&b.push(lb(c,mb,!0),\":\");if(c=this.oa){b.push(\"//\");var d=this.Xa;d&&b.push(lb(d,mb,!0),\"@\");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,\"%$1\"));c=this.tb;null!=c&&b.push(\":\",String(c))}if(c=this.fa)this.oa&&\"/\"!=c.charAt(0)&&b.push(\"/\"),b.push(lb(c,\"/\"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push(\"?\",c);(c=this.Oa)&&b.push(\"#\",lb(c,pb));return b.join(\"\")};\np.resolve=function(b){var c=this.clone();\"data\"===c.sa&&(c=new cb);var d=!!b.sa;d?db(c,b.sa):d=!!b.Xa;d?c.Xa=b.Xa:d=!!b.oa;d?c.oa=b.oa:d=null!=b.tb;var e=b.fa;if(d)hb(c,b.tb);else if(d=!!b.fa){if(\"/\"!=e.charAt(0))if(this.oa&&!this.fa)e=\"/\"+e;else{var f=c.fa.lastIndexOf(\"/\");-1!=f&&(e=c.fa.substr(0,f+1)+e)}if(\"..\"==e||\".\"==e)e=\"\";else if(-1!=e.indexOf(\"./\")||-1!=e.indexOf(\"/.\")){f=0==e.lastIndexOf(\"/\",0);e=e.split(\"/\");for(var g=[],h=0;hc)throw Error(\"Bad port number \"+c);b.tb=c}else b.tb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}\nfunction jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):\"\"}function lb(b,c,d){return\"string\"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),b):null}function rb(b){b=b.charCodeAt(0);return\"%\"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\\/\\?@]/g,ob=/[#\\?:]/g,nb=/[#\\?]/g,qb=/[#\\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ea=null;p.Xb=null;\np.add=function(b,c){if(!this.ea&&(this.ea={},this.Xb=0,this.a))for(var d=this.a.split(\"&\"),e=0;e=b.i)if(b.c)b.a=1,b.b=b.f;else return d[\"return\"](Promise.reject());e=b.a;b.a++;if(0==e)return d[\"return\"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function ub(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g=e.priority)Qb[b]={priority:d,uf:c}}K.registerScheme=Rb;K.unregisterScheme=function(b){delete Qb[b]};K.prototype.wf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.wf;\nK.prototype.bg=function(b){this.a[\"delete\"](b)};K.prototype.unregisterRequestFilter=K.prototype.bg;K.prototype.re=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.re;K.prototype.xf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.xf;K.prototype.cg=function(b){this.b[\"delete\"](b)};K.prototype.unregisterResponseFilter=K.prototype.cg;K.prototype.se=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.se;\nfunction Sb(b,c){return{uris:b,method:\"GET\",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;\nK.prototype.request=function(b,c){var d=this,e=new Tb;if(this.f){var f=Promise.reject(new D(2,7,7001));f[\"catch\"](function(){});return new Ub(f,function(){return Promise.resolve()},e)}c.method=c.method||\"GET\";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Ib(c.retryParameters):ub();c.uris=Ib(c.uris);f=Vb(this,b,c);var g=f.T(function(){return Wb(d,b,c,new tb(c.retryParameters,!1),0,null,e)}),h=g.T(function(c){return Xb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},\nfunction(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.T(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ue||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Ub(f.promise,f.Fd,e);Ob(this.g,f);return f};K.prototype.request=K.prototype.request;\nfunction Vb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={$c:f.$c},g=b.next())f.$c=g.value,e=e.T(function(b){return function(){return b.$c(c,d)}}(f));return e.T(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}\nfunction Wb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.sa,m=!1;l||(l=location.protocol,l=l.slice(0,-1),db(k,l),d.uris[f]=k.toString());var n=(l=Qb[l])?l.uf:null;if(!n)return Ab(new D(2,1,1E3,k));var q;return Db(zb(e)).T(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).T(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ue:m}},function(h){if(h&&7001==h.code)throw h;if(b.f)return Bb();if(h&&1==h.severity)return b.dispatchEvent(new I(\"retry\",\n{error:h instanceof D?h:null})),f=(f+1)%d.uris.length,Wb(b,c,d,e,f,h);throw h||g;})}function Xb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.T(f.value.bind(null,c,d.response));return e.T(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Tb(){this.a=0}K.NumBytesRemainingClass=Tb;function Ub(b,c,d){H.call(this,b,c);this.b=d}var Yb=Ub;Yb.prototype=ma(H.prototype);\nYb.prototype.constructor=Yb;if(sa)sa(Yb,H);else for(var Zb in H)if(\"prototype\"!=Zb)if(Object.defineProperties){var $b=Object.getOwnPropertyDescriptor(H,Zb);$b&&Object.defineProperty(Yb,Zb,$b)}else Yb[Zb]=H[Zb];Yb.$f=H.prototype;K.PendingRequest=Ub;Ub.all=Eb;Ub.notAbortable=Db;Ub.completed=Cb;Ub.aborted=Bb;Ub.failed=Ab;function ac(){this.b=new Hb}ac.prototype.a=function(){bc(this);this.b=null};function L(b,c,d,e){b.b&&(c=new cc(c,d,e),b.b.push(d,c))}function dc(b,c,d,e){function f(g){b.ma(c,d,f);e(g)}L(b,c,d,f)}ac.prototype.ma=function(b,c,d){if(this.b)for(var e=this.b.get(c)||[],f=0;f=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return uc(b,!1);if(0==c[1]&&0==c[3])return uc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return sc(b);throw new D(2,2,2003);}z(\"shaka.util.StringUtils.fromBytesAutoDetect\",xc);\nfunction yc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;dd&&(d+=Math.pow(2,32));d=\"0x\"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}\np.Nd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ja?this.F.push(b):Uc(this,b)};\nfunction Uc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];\"individualization-request\"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Sb([f],b.f.retryParameters);f.body=c.message;f.method=\"POST\";f.licenseRequestType=c.messageType;\"com.microsoft.playready\"!=b.a.keySystem&&\"com.chromecast.playready\"!=b.a.keySystem||ed(f);b.a.keySystem.startsWith(\"com.apple.fps\")&&fd(f);b.w.nb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();\nthis.a.keySystem.startsWith(\"com.apple.fps\")&&gd(b);return d.update(b.data).then(function(){var b=this;this.w.onEvent(new I(\"drmsessionupdate\"));e&&(e.ua&&e.ua.resolve(),(new B(function(){e.loaded=!0;dd(b)&&b.j.resolve()})).O(hd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))[\"catch\"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))}\nfunction ed(b){var c=uc(b.body,!0,!0);if(c.includes(\"PlayReadyKeyMessage\")){c=(new DOMParser).parseFromString(c,\"application/xml\");for(var d=c.getElementsByTagName(\"HttpHeader\"),e=0;e\"===c.substr(0,5)&&\"\"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Bc(c).buffer}\np.Ld=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if(\"string\"==typeof e){var f=e;e=b;b=f}if(\"com.microsoft.playready\"==this.a.keySystem&&16==e.byteLength&&!pc(\"Tizen\")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}\"com.microsoft.playready\"==this.a.keySystem&&\"status-pending\"==b&&(b=\"usable\");\"status-pending\"!=b&&(c.loaded=!0);\"expired\"==b&&(d=!0);f=Dc(new Uint8Array(e));\nthis.ka.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ua&&(this.b[\"delete\"](b),b.close()[\"catch\"](function(){}));dd(this)&&(this.j.resolve(),this.K.O(id))};function Hc(b){var c=b.ka,d=b.S;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return\"expired\"==b})&&b.g(new D(2,6,6014));b.w.gc(hc(d))}\nfunction jd(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.l){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes(\"persistent-license\"):!1,pc(\"Tizen 3\")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Aa(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs=\"avc1.42E01E\"'},{contentType:'video/webm; codecs=\"vp8\"'}],d=[{videoCapabilities:c,\npersistentState:\"required\",sessionTypes:[\"persistent-license\"]},{videoCapabilities:c}],e=new Map;c=\"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime\".split(\" \").map(function(c){return b(c)});return Promise.all(c).then(function(){return hc(e)})}\nfunction kd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!ad(b,ic(d.mimeType,d.codecs))||e&&e.encrypted&&!ad(b,ic(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}\nfunction ld(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;eb.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function qd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function rd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}\nfunction sd(b){if(!b)return[];for(var c=[],d=0;d>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Cd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}\nyd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};yd.prototype.h=function(){var b={data:Fc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Dd(b,c,d){this.startTime=b;this.direction=Ed;this.endTime=c;this.payload=d;this.region=new Fd;this.position=null;this.positionAlign=Gd;this.size=100;this.textAlign=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight=\"\";this.lineAlign=Kd;this.displayAlign=Ld;this.backgroundColor=this.color=\"\";this.backgroundImage=null;this.fontSize=\"\";this.fontWeight=Md;this.fontStyle=Nd;this.fontFamily=\"\";this.textDecoration=[];this.wrapLine=!0;this.id=\"\"}z(\"shaka.text.Cue\",Dd);\nvar Gd=\"auto\";Dd.positionAlign={LEFT:\"line-left\",RIGHT:\"line-right\",CENTER:\"center\",AUTO:Gd};var Hd=\"center\",Od={LEFT:\"left\",RIGHT:\"right\",CENTER:Hd,START:\"start\",END:\"end\"};Dd.textAlign=Od;var Ld=\"after\",Pd={BEFORE:\"before\",CENTER:\"center\",AFTER:Ld};Dd.displayAlign=Pd;var Ed=\"ltr\";Dd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ed,HORIZONTAL_RIGHT_TO_LEFT:\"rtl\"};var Id=\"horizontal-tb\";Dd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:\"vertical-lr\",VERTICAL_RIGHT_TO_LEFT:\"vertical-rl\"};\nvar Jd=0;Dd.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd=\"start\",Qd={CENTER:\"center\",START:Kd,END:\"end\"};Dd.lineAlign=Qd;var Md=400;Dd.fontWeight={NORMAL:Md,BOLD:700};var Nd=\"normal\",Rd={NORMAL:Nd,ITALIC:\"italic\",OBLIQUE:\"oblique\"};Dd.fontStyle=Rd;Dd.textDecoration={UNDERLINE:\"underline\",LINE_THROUGH:\"lineThrough\",OVERLINE:\"overline\"};\nfunction Fd(){this.id=\"\";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sd;this.scroll=Td}z(\"shaka.text.CueRegion\",Fd);var Sd=1;Fd.units={PX:0,PERCENTAGE:Sd,LINES:2};var Td=\"\";Fd.scrollMode={NONE:Td,UP:\"up\"};function Ud(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.j=\"\";this.i=new Map}var Vd={};z(\"shaka.text.TextEngine.registerParser\",function(b,c){Vd[b]=c});z(\"shaka.text.TextEngine.unregisterParser\",function(b){delete Vd[b]});function Wd(b){return Vd[b]||window.muxjs&&\"application/cea-608\"==b?!0:!1}Ud.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function Xd(b,c){\"application/cea-608\"!=c&&(b.g=new Vd[c])}\nUd.prototype.Gc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};\nfunction Yd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&cthis.a&&c>=this.b&&(this.b=b))}.bind(this))};Ud.prototype.me=function(b){this.c.append(b)};Ud.prototype.appendCues=Ud.prototype.me;\nUd.prototype.nc=function(b,c){this.j=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Ud.prototype.setSelectedClosedCaptionId=Ud.prototype.nc;\nfunction Zd(b,c,d,e,f){var g=d+\" \"+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTimed.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function fe(b,c){return\"text\"==c?b.a.b:pd(ee(b,c))}function ge(b,c,d){if(\"text\"==c)return b=b.a,null==b.b||b.bc&&(c+=.001);this.b[b].timestampOffset=c;this.qb(b)};p.Kf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.qb(b)};\np.Sf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.qb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),me(this,b))};function ie(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){\"QuotaExceededError\"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),me(b,c)}return d.p}\nfunction le(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)me(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function me(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),me(b,c)}};function ne(b,c){b=M(b);c=M(c);return b.split(\"-\")[0]==c.split(\"-\")[0]}function oe(b,c){b=M(b);c=M(c);var d=b.split(\"-\"),e=c.split(\"-\");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split(\"-\");b=c[0]||\"\";c=c[1]||\"\";b=b.toLowerCase();b=pe.get(b)||b;return(c=c.toUpperCase())?b+\"-\"+c:b}function qe(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):\"und\"}\nfunction re(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,oe(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split(\"-\");k=k.split(\"-\");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,oe(d,f))return f;return null}\nvar pe=new Map([[\"aar\",\"aa\"],[\"abk\",\"ab\"],[\"afr\",\"af\"],[\"aka\",\"ak\"],[\"alb\",\"sq\"],[\"amh\",\"am\"],[\"ara\",\"ar\"],[\"arg\",\"an\"],[\"arm\",\"hy\"],[\"asm\",\"as\"],[\"ava\",\"av\"],[\"ave\",\"ae\"],[\"aym\",\"ay\"],[\"aze\",\"az\"],[\"bak\",\"ba\"],[\"bam\",\"bm\"],[\"baq\",\"eu\"],[\"bel\",\"be\"],[\"ben\",\"bn\"],[\"bih\",\"bh\"],[\"bis\",\"bi\"],[\"bod\",\"bo\"],[\"bos\",\"bs\"],[\"bre\",\"br\"],[\"bul\",\"bg\"],[\"bur\",\"my\"],[\"cat\",\"ca\"],[\"ces\",\"cs\"],[\"cha\",\"ch\"],[\"che\",\"ce\"],[\"chi\",\"zh\"],[\"chu\",\"cu\"],[\"chv\",\"cv\"],[\"cor\",\"kw\"],[\"cos\",\"co\"],[\"cre\",\"cr\"],[\"cym\",\"cy\"],[\"cze\",\n\"cs\"],[\"dan\",\"da\"],[\"deu\",\"de\"],[\"div\",\"dv\"],[\"dut\",\"nl\"],[\"dzo\",\"dz\"],[\"ell\",\"el\"],[\"eng\",\"en\"],[\"epo\",\"eo\"],[\"est\",\"et\"],[\"eus\",\"eu\"],[\"ewe\",\"ee\"],[\"fao\",\"fo\"],[\"fas\",\"fa\"],[\"fij\",\"fj\"],[\"fin\",\"fi\"],[\"fra\",\"fr\"],[\"fre\",\"fr\"],[\"fry\",\"fy\"],[\"ful\",\"ff\"],[\"geo\",\"ka\"],[\"ger\",\"de\"],[\"gla\",\"gd\"],[\"gle\",\"ga\"],[\"glg\",\"gl\"],[\"glv\",\"gv\"],[\"gre\",\"el\"],[\"grn\",\"gn\"],[\"guj\",\"gu\"],[\"hat\",\"ht\"],[\"hau\",\"ha\"],[\"heb\",\"he\"],[\"her\",\"hz\"],[\"hin\",\"hi\"],[\"hmo\",\"ho\"],[\"hrv\",\"hr\"],[\"hun\",\"hu\"],[\"hye\",\"hy\"],[\"ibo\",\"ig\"],[\"ice\",\n\"is\"],[\"ido\",\"io\"],[\"iii\",\"ii\"],[\"iku\",\"iu\"],[\"ile\",\"ie\"],[\"ina\",\"ia\"],[\"ind\",\"id\"],[\"ipk\",\"ik\"],[\"isl\",\"is\"],[\"ita\",\"it\"],[\"jav\",\"jv\"],[\"jpn\",\"ja\"],[\"kal\",\"kl\"],[\"kan\",\"kn\"],[\"kas\",\"ks\"],[\"kat\",\"ka\"],[\"kau\",\"kr\"],[\"kaz\",\"kk\"],[\"khm\",\"km\"],[\"kik\",\"ki\"],[\"kin\",\"rw\"],[\"kir\",\"ky\"],[\"kom\",\"kv\"],[\"kon\",\"kg\"],[\"kor\",\"ko\"],[\"kua\",\"kj\"],[\"kur\",\"ku\"],[\"lao\",\"lo\"],[\"lat\",\"la\"],[\"lav\",\"lv\"],[\"lim\",\"li\"],[\"lin\",\"ln\"],[\"lit\",\"lt\"],[\"ltz\",\"lb\"],[\"lub\",\"lu\"],[\"lug\",\"lg\"],[\"mac\",\"mk\"],[\"mah\",\"mh\"],[\"mal\",\"ml\"],[\"mao\",\n\"mi\"],[\"mar\",\"mr\"],[\"may\",\"ms\"],[\"mkd\",\"mk\"],[\"mlg\",\"mg\"],[\"mlt\",\"mt\"],[\"mon\",\"mn\"],[\"mri\",\"mi\"],[\"msa\",\"ms\"],[\"mya\",\"my\"],[\"nau\",\"na\"],[\"nav\",\"nv\"],[\"nbl\",\"nr\"],[\"nde\",\"nd\"],[\"ndo\",\"ng\"],[\"nep\",\"ne\"],[\"nld\",\"nl\"],[\"nno\",\"nn\"],[\"nob\",\"nb\"],[\"nor\",\"no\"],[\"nya\",\"ny\"],[\"oci\",\"oc\"],[\"oji\",\"oj\"],[\"ori\",\"or\"],[\"orm\",\"om\"],[\"oss\",\"os\"],[\"pan\",\"pa\"],[\"per\",\"fa\"],[\"pli\",\"pi\"],[\"pol\",\"pl\"],[\"por\",\"pt\"],[\"pus\",\"ps\"],[\"que\",\"qu\"],[\"roh\",\"rm\"],[\"ron\",\"ro\"],[\"rum\",\"ro\"],[\"run\",\"rn\"],[\"rus\",\"ru\"],[\"sag\",\"sg\"],[\"san\",\n\"sa\"],[\"sin\",\"si\"],[\"slk\",\"sk\"],[\"slo\",\"sk\"],[\"slv\",\"sl\"],[\"sme\",\"se\"],[\"smo\",\"sm\"],[\"sna\",\"sn\"],[\"snd\",\"sd\"],[\"som\",\"so\"],[\"sot\",\"st\"],[\"spa\",\"es\"],[\"sqi\",\"sq\"],[\"srd\",\"sc\"],[\"srp\",\"sr\"],[\"ssw\",\"ss\"],[\"sun\",\"su\"],[\"swa\",\"sw\"],[\"swe\",\"sv\"],[\"tah\",\"ty\"],[\"tam\",\"ta\"],[\"tat\",\"tt\"],[\"tel\",\"te\"],[\"tgk\",\"tg\"],[\"tgl\",\"tl\"],[\"tha\",\"th\"],[\"tib\",\"bo\"],[\"tir\",\"ti\"],[\"ton\",\"to\"],[\"tsn\",\"tn\"],[\"tso\",\"ts\"],[\"tuk\",\"tk\"],[\"tur\",\"tr\"],[\"twi\",\"tw\"],[\"uig\",\"ug\"],[\"ukr\",\"uk\"],[\"urd\",\"ur\"],[\"uzb\",\"uz\"],[\"ven\",\"ve\"],[\"vie\",\n\"vi\"],[\"vol\",\"vo\"],[\"wel\",\"cy\"],[\"wln\",\"wa\"],[\"wol\",\"wo\"],[\"xho\",\"xh\"],[\"yid\",\"yi\"],[\"yor\",\"yo\"],[\"zha\",\"za\"],[\"zho\",\"zh\"],[\"zul\",\"zu\"]]);function se(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function te(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=se(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}\nfunction ue(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.N&&!kd(b,e))return!1;var f=e.audio;e=e.video;return f&&!be(f)||e&&!be(e)||f&&c&&!ve(f,c)||e&&d&&!ve(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Wd(ic(b.mimeType,b.codecs))})}function ve(b,c){return b.mimeType!=c.mimeType||b.codecs.split(\".\")[0]!=c.codecs.split(\".\")[0]?!1:!0}\nfunction we(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:\"variant\",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(\", \"),\naudioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||\nnull,b.label=c.label,b.audioRoles=c.roles);return b}function xe(b){return{id:b.id,active:!1,type:\"text\",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}\nfunction ye(b){b.__shaka_id||(b.__shaka_id=ze++);return b.__shaka_id}var ze=0;function Ae(b){return{id:ye(b),active:!1,type:\"\",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}\nfunction Be(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ce(b){return b.filter(function(b){return Be(b)})}\nfunction De(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}\nfunction Ee(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:\"\";e=e.filter(function(b){return b.language==g});if(c){var h=re(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Fe(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(td.uc,[]);return b.length?Fe(e,b[0]):e}\nfunction Fe(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Ge(b,c,d){for(var e=0;e=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};\nN.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Wa(d.b,f,e);Wa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};\nN.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;\nfunction Ie(b,c){b&&(c=c.filter(function(c){return se(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Je(b,c){this.a=b;this.b=c}Je.prototype.toString=function(){return\"v\"+this.a+\".\"+this.b};function Ke(b,c){var d=new Je(2,6),e=Le,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Me(b,c,d,e){$a([d,\"has been deprecated and will be removed in\",c,\". We are currently at version\",b,\". Additional information:\",e].join(\" \"))}function Ne(b,c,d,e){Za([d,\"has been deprecated and has been removed in\",c,\". We are now at version\",b,\". Additional information:\",e].join(\"\"))}var Le=null;var Oe=\"ended play playing pause pausing ratechange seeked seeking timeupdate volumechange\".split(\" \"),Pe=\"buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume\".split(\" \"),Qe=[\"loop\",\"playbackRate\"],Re=[\"pause\",\"play\"],Se=\"abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged\".split(\" \"),Te={getAssetUri:2,\ngetAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Ue={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ve=[[\"getConfiguration\",\"configure\"]],We=[[\"isTextTrackVisible\",\"setTextTrackVisibility\"]],\nXe=\"addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay\".split(\" \"),Ye=[\"attach\",\"detach\",\"load\",\"unload\"];\nfunction Ze(b){return JSON.stringify(b,function(b,d){if(\"function\"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&\"object\"==typeof g?\"detail\"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:\"TimeRanges\",length:d.length,start:[],end:[]},f=0;fd?\"-Infinity\":\"Infinity\":d;return c}})}function $e(b){return JSON.parse(b,function(b,d){return\"NaN\"==d?NaN:\"-Infinity\"==d?-Infinity:\"Infinity\"==d?Infinity:d&&\"object\"==typeof d&&\"TimeRanges\"==d.__type__?af(d):d&&\"object\"==typeof d&&\"Uint8Array\"==d.__type__?new Uint8Array(d.entries):d})}function af(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function bf(b,c,d,e,f,g){this.N=b;this.f=new B(c);this.S=d;this.j=!1;this.F=e;this.K=f;this.w=g;this.b=this.h=!1;this.C=\"\";this.i=null;this.m=this.Jd.bind(this);this.o=this.ef.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var cf=!1,df=null;p=bf.prototype;p.destroy=function(){ef(this);df&&ff(this);this.f&&(this.f.stop(),this.f=null);this.K=this.F=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.da=function(){return this.b};\np.Xc=function(){return this.C};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.oc();var b=new chrome.cast.SessionRequest(this.N);b=new chrome.cast.ApiConfig(b,this.Kd.bind(this),this.jf.bind(this),\"origin_scoped\");chrome.cast.initialize(b,function(){},function(){});cf&&this.f.O(.02);(b=df)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Kd(b):df=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};\np.cd=function(b){this.i=b;this.b&&gf({type:\"appData\",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!cf)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Vc.bind(this,b),this.Id.bind(this));return this.g};p.Zb=function(){this.b&&(ef(this),df&&(ff(this),df.stop(function(){},function(){}),df=null))};\np.get=function(b,c){if(\"video\"==b){if(Re.includes(c))return this.Ud.bind(this,b,c)}else if(\"player\"==b){if(Ue[c]&&!this.get(\"player\",\"isLive\")())return function(){};if(Xe.includes(c))return this.Ud.bind(this,b,c);if(Ye.includes(c))return this.zf.bind(this,b,c);if(Te[c])return this.Rd.bind(this,b,c)}return this.Rd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;gf({type:\"set\",targetName:b,property:c,value:d})};\np.Vc=function(b,c){df=c;c.addUpdateListener(this.m);c.addMessageListener(\"urn:x-cast:com.google.shaka.v2\",this.o);this.Jd();gf({type:\"init\",initState:b,appData:this.i});this.g.resolve()};p.Id=function(b){var c=8003;switch(b.code){case \"cancel\":c=8004;break;case \"timeout\":c=8005;break;case \"receiver_unavailable\":c=8006}this.g.reject(new D(2,8,c,b))};p.Rd=function(b,c){return this.a[b][c]};\np.Ud=function(b,c,d){for(var e=[],f=2;f LA_URL\"))?b.textContent:\"\"}\nfunction wf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=tf.get(f.Xd);if(g){var h=vd(g,f.init||b);if(g=Af.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}\nvar Af=(new Map).set(\"com.widevine.alpha\",function(b){return(b=P.td(b.node,\"urn:microsoft\",\"laurl\"))?b.getAttribute(\"licenseUrl\")||\"\":\"\"}).set(\"com.microsoft.playready\",function(b){b=P.td(b.node,\"urn:microsoft:playready\",\"pro\");if(!b)return\"\";b=Bc(b.textContent);b=yf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return\"\";b=uc(b.value,!0);return(b=P.Pd(b,\"WRMHEADER\"))?zf(b):\"\"});function vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Bf(d.value))&&c.push(d);return c}\nfunction Bf(b){var c=b.getAttribute(\"schemeIdUri\"),d=P.getAttributeNS(b,\"urn:mpeg:cenc:2013\",\"default_KID\"),e=P.ud(b,\"urn:mpeg:cenc:2013\",\"pssh\").map(P.ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,\"\").toLowerCase(),d.includes(\" \")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:\"cenc\",initData:Bc(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,Xd:c,keyId:d,init:0x)if(q+1=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0this.I.byteLength&&Kf();var c=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Va;\nR.prototype.J=function(b){this.a+b>this.I.byteLength&&Kf();this.a+=b};R.prototype.skip=R.prototype.J;R.prototype.Wd=function(b){this.ab||b>this.I.byteLength)&&Kf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.Wc=function(){for(var b=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.I.buffer,this.I.byteOffset+b,this.a-b);this.a+=1;return sc(b)};\nR.prototype.readTerminatedString=R.prototype.Wc;function Kf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z(\"shaka.util.Mp4Parser\",S);S.prototype.G=function(b,c){var d=Lf(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.G;S.prototype.ca=function(b,c){var d=Lf(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ca;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;\nS.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.pa()&&!this.a;)this.ic(0,d,c)};S.prototype.parse=S.prototype.parse;\nS.prototype.ic=function(b,c,d){var e=c.aa(),f=c.D(),g=c.D();switch(f){case 0:f=c.I.byteLength-e;break;case 1:f=c.ub()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.D(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.I.byteLength&&(g=c.I.byteLength);g-=c.aa();c=0>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Pf;function Qf(b,c,d,e){var f,g=(new S).ca(\"sidx\",function(b){f=Rf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}\nfunction Rf(b,c,d,e){var f=[];e.reader.J(4);var g=e.reader.D();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.D();var k=e.reader.D()}else h=e.reader.ub(),k=e.reader.ub();e.reader.J(2);var l=e.reader.Jb();b=b+e.size+k;for(k=0;k>>31;m&=2147483647;var q=e.reader.D();e.reader.J(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z(\"shaka.media.SegmentIndex\",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&bb||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;cg.startTime?0==d&&c.push(g):(.1b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.zc;function Sf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Tf(b){this.b=b;this.a=new R(b,0);Uf||(Uf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Uf;Tf.prototype.pa=function(){return this.a.pa()};\nfunction Vf(b){var c=Wf(b);if(7=d&&!(c&1<<8-d);d++);if(8b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Cf(h,l,b+f,k,c*g);return ud(m,[d])},0,null)}}}\nfunction ng(b,c){for(var d=[],e=0;eb.o||b.i.O(Math.max(3,b.o-c,Xa(b.v)))}\nfunction xg(b,c,d){c=c||{contentType:\"\",mimeType:\"\",codecs:\"\",emsgSchemeIdUris:[],frameRate:void 0,Sc:null};d=d||c.la;var e=P.rb,f=P.ve,g=P.P(b,\"BaseURL\").map(P.ac),h=b.getAttribute(\"contentType\")||c.contentType,k=b.getAttribute(\"mimeType\")||c.mimeType,l=b.getAttribute(\"codecs\")||c.codecs;f=P.H(b,\"frameRate\",f)||c.frameRate;var m=P.P(b,\"InbandEventStream\"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute(\"schemeIdUri\"),n.includes(q)||n.push(q);m=P.P(b,\n\"AudioChannelConfiguration\");m=Cg(m)||c.Sc;h||(h=Ag(k,l));return{la:ud(d,g),Lb:P.Yb(b,\"SegmentBase\")||c.Lb,Ga:P.Yb(b,\"SegmentList\")||c.Ga,Nb:P.Yb(b,\"SegmentTemplate\")||c.Nb,width:P.H(b,\"width\",e)||c.width,height:P.H(b,\"height\",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute(\"id\"),Sc:m}}\nfunction Cg(b){for(var c=0;c>=1;return b}}}return null}function Bg(b){var c=b.Lb?1:0;c+=b.Ga?1:0;c+=b.Nb?1:0;if(0==c)return\"text\"==b.contentType||\"application\"==b.contentType?!0:!1;1!=c&&(b.Lb&&(b.Ga=null),b.Nb=null);return!0}\nfunction Dg(b,c,d,e){c=ud(c,[d]);c=Sb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Ob(b.g,c);return c.promise.then(function(b){if(\"HEAD\"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=sc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}\nfunction wg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute(\"schemeIdUri\"),value:b.getAttribute(\"value\")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:\"urn:mpeg:dash:utc:http-head:2014\",value:e});return td.te(d,function(b){var d=b.scheme;b=b.value;switch(d){case \"urn:mpeg:dash:utc:http-head:2014\":case \"urn:mpeg:dash:utc:http-head:2012\":return Dg(this,c,b,\"HEAD\");case \"urn:mpeg:dash:utc:http-xsdate:2014\":case \"urn:mpeg:dash:utc:http-iso:2014\":case \"urn:mpeg:dash:utc:http-xsdate:2012\":case \"urn:mpeg:dash:utc:http-iso:2012\":return Dg(this,\nc,b,\"GET\");case \"urn:mpeg:dash:utc:direct:2014\":case \"urn:mpeg:dash:utc:direct:2012\":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case \"urn:mpeg:dash:utc:http-ntp:2014\":case \"urn:mpeg:dash:utc:ntp:2014\":case \"urn:mpeg:dash:utc:sntp:2014\":return $a(\"NTP UTCTiming scheme is not supported\"),Promise.reject();default:return $a(\"Unrecognized scheme in UTCTiming element\",d),Promise.reject()}}.bind(b))[\"catch\"](function(){$a(\"A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!\");\nreturn 0})}p.rf=function(b,c,d){var e=P.rb,f=d.getAttribute(\"schemeIdUri\")||\"\",g=d.getAttribute(\"value\")||\"\",h=P.H(d,\"timescale\",e)||1;P.P(d,\"Event\").forEach(function(d){var k=P.H(d,\"presentationTime\",e)||0,m=P.H(d,\"duration\",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute(\"id\")||\"\",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};\np.Cf=function(b,c,d){b=og(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Ob(this.g,b);return b.promise.then(function(b){return b.data})};function Ag(b,c){return Wd(ic(b,c))?\"text\":b.split(\"/\")[0]}U.Zc(\"mpd\",pg);U.Kb(\"application/dash+xml\",pg);function Eg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Fg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Fg.prototype.toString=function(){function b(b){return b.name+\"=\"+(isNaN(Number(b.value))?'\"'+b.value+'\"':b.value)}var c=\"#\"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0c.length||\"data\"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(\":\").split(\",\");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(\",\"));d=d.split(\";\");var e=null;1w.Pc&&(w.stream.presentationTimeOffset=-x,w.Mb.offset(x))}else for(b.b.ta(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset=\nh,A.Mb.offset(-h),Sf(A.Mb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}\nfunction dh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.l){case 1:return f=Jg,g=td,h=c.a,k=f.hb(c.a,\"EXT-X-MEDIA\"),l=k.filter(function(b){return\"SUBTITLES\"==fh(b,\"TYPE\")}.bind(b)),m=l.map(function(b){return gh(this,b)}.bind(b)),n=k.filter(function(b){return\"CLOSED-CAPTIONS\"==fh(b,\"TYPE\")}),hh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.hb(h,\"EXT-X-STREAM-INF\"),w=x.map(function(b){return ih(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=\ne.s,C=A.reduce(g.uc,[]),C=C.filter(function(b){return null!=b}),e[\"return\"]({startTime:0,variants:C,textStreams:q})}})})}\nfunction ih(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb,fb;return y(f,function(f){switch(f.l){case 1:g=wd;h=Jg;k=Hg(c,\"CODECS\",\"avc1.42E01E,mp4a.40.2\");l=jh(k.split(/\\s*,\\s*/));m=c.getAttribute(\"RESOLUTION\");q=n=null;x=Hg(c,\"FRAME-RATE\");w=Number(fh(c,\"BANDWIDTH\"));m&&(A=m.value.split(\"x\"),n=A[0],q=A[1]);C=h.hb(d.a,\"EXT-X-MEDIA\");C=C.filter(function(b){return\"CLOSED-CAPTIONS\"!=fh(b,\"TYPE\")});C=C.filter(function(b){var c=Hg(b,\"URI\")||\"\";return\"SUBTITLES\"==\n(Hg(b,\"TYPE\")||\"\")||\"\"!=c});E=Hg(c,\"AUDIO\");F=Hg(c,\"VIDEO\");E?C=h.Cc(C,\"AUDIO\",E):F&&(C=h.Cc(C,\"VIDEO\",F));if(V=kh(g.na,l)){if(Y=Hg(c,\"SUBTITLES\"))wa=h.Cc(C,\"SUBTITLES\",Y),wa.length&&(Ba=b.C.get(wa[0].id),Ba.stream.codecs=V);Kb(l,V)}ba=C.map(function(b){return lh(this,b,l)}.bind(b));na=[];xa=[];return u(f,Promise.all(ba),2);case 2:Va=f.s;Va=Va.filter(function(b){return null!=b});E?na=Va:F&&(xa=Va);vb=!1;na.length||xa.length?na.length?(eb=fh(c,\"URI\"),fb=na[0].pc,eb==fb?(Ca=g.wb,vb=!0):Ca=g.La):Ca=\ng.wb:1==l.length?(Ia=kh(g.La,l),Ca=m||x||Ia?g.La:g.wb):(Ca=g.La,l=[l.join(\",\")]);if(vb){f.A(3);break}return u(f,mh(b,c,l,Ca),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.wb?na=[ja]:xa=[ja];else if(null===ja)return f[\"return\"]([]);xa&&nh(xa);na&&nh(na);return f[\"return\"](oh(b,na,xa,w,n,q,x))}})})}function nh(b){b.forEach(function(b){var c=b.stream.codecs.split(\",\");c=c.filter(function(b){return\"mp4a.40.34\"!=b});b.stream.codecs=c.join(\",\")})}\nfunction oh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.pc:\"\")+\" - \"+(l?l.pc:\"\");var C=void 0;if(n&&x)if(w.length&&A.length?0>4,0!=e&&2!=e||c(),3==e&&(e=b.ha(),b.J(e)),1!=b.D()>>8)b.seek(d+188),e=b.ha(),71!=e&&(b.seek(d+192),e=b.ha()),71!=e&&(b.seek(d+204),e=b.ha()),71!=e&&c(),b.Wd(1);else return b.J(3),d=b.ha()>>6,0!=d&&1!=d||c(),0==b.ha()&&c(),d=b.ha(),e=b.Jb(),b=b.Jb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}\nfunction Dh(b,c,d){b=ic(b,c);if(!Wd(b))return 0;c=new Ud(null);Xd(c,b);return c.Gc(d)}function jh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=lc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function kh(b,c){for(var d=Eh[b],e=0;ef-.5)){c=!0;break a}}c=!1}return c};function Zh(b,c,d,e,f){var g=this;this.b=b;this.w=c;this.v=d;this.m=f;this.g=new ac;this.j=!1;this.o=b.readyState;this.f=!1;this.c=e;this.i=!1;L(this.g,b,\"waiting\",function(){return $h(g)});this.h=(new B(function(){$h(g)})).Ia(.25)}Zh.prototype.a=function(){this.g&&(this.g.a(),this.g=null);null!=this.h&&(this.h.stop(),this.h=null);this.c&&(this.c.a(),this.c=null);this.b=this.w=this.m=null};Zh.prototype.Uc=function(){this.i=!0;$h(this)};\nfunction $h(b){if(0!=b.b.readyState){if(b.b.seeking){if(!b.j)return}else b.j=!1;if(!b.b.paused){b.b.readyState!=b.o&&(b.f=!1,b.o=b.b.readyState);var c=b.v.smallGapLimit,d=b.b.currentTime,e=b.b.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=pc(\"Edge/\")||pc(\"Trident/\")||pc(\"Tizen\")||pc(\"CrKey\")?.5:.1;for(var g=0;gd&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.c){b=b.c;d=b.g;e=Wh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.c!=\nd||b.h!=e)b.f=f,b.c=d,b.h=e;d=f-b.f;d>=b.i&&e&&b.b(b.c,d)}}else if(0!=f||b.i){g=e.start(f);var h=b.w.wa();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.f||(b.f=!0,d=new I(\"largegap\",{currentTime:d,gapSize:h}),d.cancelable=!0,b.m(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.b.currentTime=g)}}}}};function ai(b){var c=this;this.f=b;this.b=new Set;this.c=(new B(function(){bi(c,!1)})).Ia(.25)}ai.prototype.a=function(){this.c.stop();for(var b=r(this.b),c=b.next();!c.done;c=b.next())c.value.a();this.b.clear()};function bi(b,c){for(var d=r(b.b),e=d.next();!e.done;e=d.next())e.value.h(b.f.currentTime,c)};function ci(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function di(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function ei(b){this.f=b;this.b=null;this.c=function(){}}ei.prototype.a=function(){this.b=this.f=null;this.c=function(){}};ei.prototype.h=function(b){var c=this.b,d=this.f.periods;b=di(d,b)||d[0];c!=b&&this.c(b);this.b=b};function fi(b,c){b.c=c};function gi(b){var c=this;this.b=b;this.g=!1;this.f=this.b.cc();this.c=new B(function(){c.b.Ed(.25*c.f)})}gi.prototype.a=function(){this.c&&(this.c.stop(),this.c=null);this.b=null};gi.prototype.set=function(b){this.f=b;hi(this)};function hi(b){b.c.stop();var c=b.g?0:b.f;0<=c?b.b.cc()!=c&&b.b.ed(c):(b.c.Ia(.25),0!=b.b.cc()&&b.b.ed(0))};function ii(b,c,d){this.b=b;this.g=c;this.h=d;this.c=new ac;this.f=new ji(b);0Math.abs(b.b.currentTime-c)?ni(b):(dc(b.c,b.b,\"seeking\",function(){ni(b)}),oi(b.f,0==b.b.currentTime?c:b.b.currentTime))}function ni(b){L(b.c,b.b,\"seeking\",function(){return b.g()})}function ji(b){var c=this;this.c=b;this.i=10;this.h=this.g=this.f=0;this.b=new B(function(){0>=c.f?c.b.stop():c.c.currentTime!=c.g?c.b.stop():(c.c.currentTime=c.h,c.f--)})}ji.prototype.a=function(){this.b&&(this.b.stop(),this.b=null);this.c=null};\nfunction oi(b,c){b.g=b.c.currentTime;b.h=c;b.f=b.i;b.c.currentTime=c;b.b.Ia(.1)};function pi(b){function c(){d.g=!0;null!=d.c&&(d.b.currentTime=d.c)}var d=this;this.b=b;this.g=!1;this.c=null;this.f=new ac;0==this.b.readyState?dc(this.f,this.b,\"loadedmetadata\",c):c()}pi.prototype.a=function(){this.f&&(this.f.a(),this.f=null);this.b=null};pi.prototype.o=function(b){this.c=this.g?this.c:b};pi.prototype.i=function(){return(this.g?this.b.currentTime:this.c)||0};pi.prototype.v=function(){};\nfunction qi(b,c,d,e,f,g){var h=this;this.c=b;this.b=c.presentationTimeline;this.C=c.minBufferTime||0;this.h=d;this.w=f;this.m=null;this.g=new Zh(b,c.presentationTimeline,d,ri(b,d),g);this.f=new ii(b,function(){a:{var b=h.g;b.j=!0;b.i=!1;b.f=!1;var c=mi(h.f);b=si(h,c);if(.001d-c&&(c=d-3);bb.b.Y()?b.b.ib():b.b.wa():0>c&&(c=b.b.wa()+c);return vi(b,ui(b,c))}qi.prototype.v=function(){this.g.Uc()};function vi(b,c){var d=b.b.Y();return c>=d?d-b.h.durationBackoff:c}function si(b,c){var d=qd.bind(null,b.c.buffered),e=Math.max(b.C,b.h.rebufferingGoal),f=b.h.safeSeekOffset,g=b.b.ib(),h=b.b.wa(),k=b.b.Y();3>h-g&&(g=h-3);var l=b.b.Cb(e),m=b.b.Cb(f);e=b.b.Cb(e+f);return c>=k?vi(b,c):c>h?h:c=l||d(c)?c:e}\nfunction ui(b,c){var d=b.b.ib();if(cd?d:c}function ri(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Vh(new Yh(b),c.stallThreshold);Xh(e,function(){b.currentTime+=d});return e};function wi(){this.c=function(){};this.b=new Set}wi.prototype.a=function(){this.c=function(){};this.b.clear()};function xi(b,c){b.c=c};function yi(b){var c=this;this.i=b;this.g=new Map;this.b=function(){};this.c=function(){};this.f=function(){};this.j=[{Za:null,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Ai,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Bi,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:zi,Ya:Ai,Sa:function(b,e){return c.c(b,e)}},{Za:zi,Ya:Bi,Sa:function(b,e){return c.c(b,e)}},{Za:Ai,Ya:Bi,Sa:function(b,e){return c.f(b,e)}},{Za:Bi,Ya:Ai,Sa:function(b,e){return c.f(b,e)}}]}\nyi.prototype.a=function(){this.i=null;this.g.clear();this.b=function(){};this.c=function(){};this.f=function(){}};yi.prototype.h=function(b,c){for(var d=r(this.i.b),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.g.get(e),g=be.endTime?Bi:zi;this.g.set(e,g);for(var h=r(this.j),k=h.next();!k.done;k=h.next())k=k.value,k.Za==f&&k.Ya==g&&k.Sa(e,c)}};function Ci(b,c,d,e){b.b=c;b.c=d;b.f=e}var Ai=1,zi=2,Bi=3;function Di(b,c){this.a=c;this.c=b;this.g=null;this.j=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.F=null;this.C=this.f=this.m=!1;this.w=0}Di.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Ei(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};\nDi.prototype.configure=function(b){this.g=b;this.F=new tb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};\nDi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.l){case 1:return e=b.a.Qa(),f=Fi(b,e),g=b.a.Hd(b.c.periods[f]),g.variant||g.text?u(d,Gi(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d[\"return\"](new D(2,5,5005));case 2:if(b.f)return d[\"return\"]();b.a&&b.a.bf&&b.a.bf();v(d)}})})};function Hi(b){return Ii(b,\"audio\")}function Ji(b){return Ii(b,\"video\")}\nfunction Ii(b,c){var d=b.b.get(c);return d?d.Fa||d.stream:null}function Ki(b,c){return t(function e(){var f,g,h,k,l,m,n,q;return y(e,function(e){switch(e.l){case 1:return f=wd,u(e,je(b.a.L,f.na),2);case 2:return b.w++,b.C=!1,g=b.w,h=b.a.L,k=new Map,l=new Set,k.set(f.na,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e[\"return\"]():u(e,Li(b,l),4);case 4:if(b.f)return e[\"return\"]();b.w!=g||b.b.has(f.na)||b.C||(m=b.a.Qa(),n=Fi(b,m),q=Mi(c,n,0),b.b.set(f.na,q),Ni(b,q,0));v(e)}})})}\nfunction Oi(b,c){var d=b.b.get(\"video\");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Fa&&(Pi(b,f,!1,0),d.Fa=e)}else if(e=d.Fa)d.Fa=null,Pi(b,e,!0,0)}}function Qi(b,c,d,e){c.video&&Pi(b,c.video,d,e);c.audio&&Pi(b,c.audio,d,e)}\nfunction Pi(b,c,d,e){var f=b.b.get(c.type);if(!f&&\"text\"==c.type&&b.g.ignoreTextStreamFailures)Ki(b,c);else if(f){var g=Ri(b,c);if(d&&g!=f.ya)b.b.forEach(function(c){Si(b,c)});else{f.Fa&&(c.trickModeVideo?(f.Fa=c,c=c.trickModeVideo):f.Fa=null);var h=b.h[g];h&&h.vb&&(h=b.i.get(c.id))&&h.vb&&f.stream!=c&&(\"text\"==c.type&&ce(b.a.L,ic(c.mimeType,c.codecs)),f.stream=c,f.ec=!0,Ti(b,f,g)&&f.Hb.abort(),d&&(f.Na?f.qc=!0:f.Ea?(f.Ja=!0,f.Wb=e,f.qc=!0):(Ei(f),Ui(b,f,!0,e))))}}}\nfunction Ti(b,c,d){if(!c.Hb)return!1;var e=b.a.Qa(),f=fe(b.a.L,c.type);b=(b=Vi(b,c,e,f,d))?b.a?b.a-b.b:null:null;if(null==b)return!1;(d=c.stream.initSegmentReference)&&(b+=(d.a?d.a-d.b:null)||0);return c.Hb.b.a>b}\nfunction Wi(b){function c(c){var f=b.a.L;\"text\"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&dc?b.a.L.ta(c):b.a.L.ta(Math.pow(2,32))}\nfunction Zi(b,c){if(!b.f&&!c.Ea&&null!=c.Ba&&!c.Na)if(c.Ba=null,c.Ja)Ui(b,c,c.qc,c.Wb);else{try{var d=$i(b,c);null!=d&&(Ni(b,c,d),c.Eb=!1)}catch(e){aj(b,e);return}d=Array.from(b.b.values());bj(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.L.endOfStream().then(function(){if(!this.f){var b=this.a.L.Y();b=b.c.presentationTimeline.Y())return c.endOfStream=!0,\"video\"==c.type&&(f=b.b.get(\"text\"))&&\"application/cea-608\"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.ya=h;if(h!=g)return null;\nif(k>=l)return.5;h=fe(b.a.L,c.type);h=Vi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=cj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.Vd=0;dj(b,c,e,g,h);return null}function cj(b,c,d){if(!c.lb||!c.xa)return Math.max(d,c.Vd);d=Ri(b,c.lb);return b.c.periods[d].startTime+c.xa.endTime}\nfunction Vi(b,c,d,e,f){if(c.xa&&c.stream==c.lb)return ej(b,c,f,c.xa.position+1);c.xa?(d=Ri(b,c.lb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.xa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=ej(b,c,f,Math.max(0,d-1)));return g||ej(b,c,f,d)}\nfunction ej(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Db();e=e.jb();return d.startTime+c.endTimee?null:c}\nfunction dj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=fj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ea=!0;c.ec=!1;k=gj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return hj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ea=!1,c.Yc=!1,c.Ja||this.a.Uc(),Ni(this,c,0),ij(this,h))}.bind(b))[\"catch\"](function(b){this.f||this.m||(c.Ea=!1,\"text\"==c.type&&this.g.ignoreTextStreamFailures?this.b[\"delete\"](\"text\"):\n7001==b.code?(c.Ea=!1,c.Ba=null,Ni(this,c,0)):3017==b.code?jj(this,c,b):(c.Eb=!0,b.severity=2,aj(this,b)))}.bind(b))}function jj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Yc})){var e=Math.round(100*b.j);if(20=d?Promise.resolve():b.a.L.remove(c.type,f,f+d).then(function(){}.bind(b))}\nfunction ij(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||\"text\"!=d[0].type)b.o=d.every(function(b){return\"text\"==b.type?!0:!b.Ja&&!b.Na&&b.xa});if(b.o){d=Ri(b,c);b.h[d]||Yi(b,d).then(function(){this.f||this.a.Gd()}.bind(b))[\"catch\"](td.Gb);for(d=0;d=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b[\"x-shaka-from-cache\"]};f=null;try{f=xc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function nj(b,c,d,e){var f=new nj.b;gc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new nj.a,h={pd:!1,ce:!1};b=nj.h(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?\"include\":void 0},h,e);b=new H(b,function(){h.pd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.ce=!0;g.abort()});k.O(c/1E3);b[\"finally\"](function(){k.stop()})}return b}z(\"shaka.net.HttpFetchPlugin\",nj);\nnj.h=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,wa;return y(h,function(h){switch(h.l){case 1:return k=nj.g,l=nj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get(\"Content-Length\"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.l){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Aa(h,3);break;case 2:return Da(h),h[\"return\"]();case 3:d.done||(q+=d.value.byteLength);\ne=Date.now();if(100c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f),\nf.A(3)}})})};U.Kb(\"application/x-offline-manifest\",kk);function lk(b){var c=ck(b);return c&&\"manifest\"==c.a?lk.a(b):c&&\"segment\"==c.a?lk.b(c.key(),c):Ab(new D(2,1,9004,b))}z(\"shaka.offline.OfflineScheme\",lk);lk.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{\"content-type\":\"application/x-offline-manifest\"}};return Cb(b)};lk.b=function(b,c){var d=new Cj;return Cb(void 0).T(function(){return d.init()}).T(function(){return Gj(d,c.ra(),c.$())}).T(function(b){return b.getSegments([c.key()])}).T(function(b){return{uri:c,data:b[0].data,headers:{}}})[\"finally\"](function(){return d.destroy()})};\nRb(\"offline\",lk);function mk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.l){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,nk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=ok(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f[\"return\"](g)}})})}\nfunction ok(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.l){case 1:return g=new Gc({nb:c,onError:function(){},gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Oc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f[\"return\"]([]);case 3:return ya(f,6),u(f,Vc(g),8);case 8:Aa(f,7);break;case 6:return Da(f),\nu(f,g.destroy(),9);case 9:return f[\"return\"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.l){case 1:return ya(c,2),u(c,Yc(g,b),4);case 4:h.push(b);Aa(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f[\"return\"](h)}})})}\nfunction nk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Mb(b.audioCapabilities,c.audioCapabilities,d)&&Mb(b.videoCapabilities,c.videoCapabilities,d)};function pk(b,c){var d=qk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.j=!0;this.m=Promise.resolve().then(function(){return rk(e)})}pk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return b.j=!1,b.b&&b.b.abort(),sk(b),u(d,b.m,2);case 2:b.a&&b.a.qa.Ua();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.qa.Ua();b.a=null;b.f=[];b.g=null;v(d)}})})};\nfunction tk(b,c){var d={pb:function(){},fc:function(){},Ua:function(){},onError:function(){},hc:function(){},rg:function(){}};b.f.push({create:c,qa:d});b.b&&b.b.abort();sk(b);return d}\nfunction rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:if(b.j){if(0==b.f.length||b.a&&!b.a.Ra)var e=!1;else{b.a&&(b.a.qa.Ua(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.qa.pb(),b.a={node:g.node,payload:g.payload,Ra:g.Ra,qa:e.qa}):e.qa.hc();e=!0}e?e=Promise.resolve():b.a?e=uk(b):(b.g.af(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})}\nfunction uk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return b.c=b.g.Ke(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ue(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.qa.fc(),b.a=null);Aa(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.qa.Ua();else b.a.qa.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function sk(b){b.h&&(b.h.resolve(),b.h=null)};function vk(b){this.a=null;for(var c=0;cb});return!0};vk.prototype.remove=vk.prototype.remove;\nvk.prototype.append=function(b){for(var c=xk,d=[],e=0;e=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}\"center\"==b.textAlign&&\"center\"!=c.align&&(c.align=\"middle\");\"vertical-lr\"==b.writingMode?c.vertical=\"lr\":\"vertical-rl\"==b.writingMode&&(c.vertical=\"rl\");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}\nfunction wk(b,c){var d=b.mode;b.mode=\"showing\"==d?\"showing\":\"hidden\";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function yk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+\".\"+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Ib(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Ib(m)),l=yk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z(\"shaka.util.ConfigUtils.mergeConfigObjects\",yk);function zk(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:ub(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:ub(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:\"\",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:ub(),\nfailureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};pc(\"Web0S\")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,\nswitchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:\"\",preferredTextLanguage:\"\",preferredVariantRole:\"\",preferredTextRole:\"\",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,\ntextDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Ak(b,h.preferredAudioLanguage)};return h}function Bk(b,c,d){var e={\".drm.servers\":\"\",\".drm.clearKeys\":\"\",\".drm.advanced\":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:\"\",audioRobustness:\"\",serverCertificate:new Uint8Array(0),individualizationServer:\"\"}};return yk(b,c,d||zk(),e,\"\")}\nfunction Ak(b,c){var d=b.filter(function(b){return\"variant\"==b.type}),e=[],f=re(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/\n2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,\"text\"==h.type&&d.push(h);return d};function Ck(){this.a=null;this.b=[]}function Dk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Ek(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}\nfunction Fk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Gk(){this.b=this.c=null;this.a=[]}function Hk(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:\"text\",fromAdaptation:d,bandwidth:null}))};function Ik(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN;this.a=new Ck;this.b=new Gk};function X(b,c){var d=this;J.call(this);this.g=Jk;this.a=null;this.$a=!1;this.i=new ac;this.rc=this.j=this.xb=this.b=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.F=this.h=this.N=null;this.Ad=1E9;this.Tb=new Set;this.eb=!0;this.ka=null;this.yd=!1;this.wd=0;this.ja=null;this.C=new Gh;this.c=Kk(this);this.Ub={width:Infinity,height:Infinity};this.v=null;this.Rb=new Ph(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount);this.Ka=this.c.preferredTextLanguage;\nthis.yb=this.c.preferredTextRole;c&&c(this);this.N=Lk(this);L(this.i,window,\"online\",function(){d.ad()});this.w={name:\"detach\"};this.S={name:\"attach\"};this.Ca={name:\"unload\"};this.yc={name:\"manifest-parser\"};this.xc={name:\"manifest\"};this.ab={name:\"media-source\"};this.sc={name:\"drm-engine\"};this.W={name:\"load\"};this.Ac={name:\"src-equals-drm-engine\"};this.cb={name:\"src-equals\"};var e=new Map;e.set(this.S,function(b,c){return Db(Mk(d,b,c))});e.set(this.w,function(b){b.u&&(d.i.ma(b.u,\"error\"),b.u=null);\nd.a=null;b=Promise.resolve();return Db(b)});e.set(this.Ca,function(b){return Db(Nk(d,b))});e.set(this.ab,function(b){b=Ok(d,b);return Db(b)});e.set(this.yc,function(b,c){var e=Pk(d,b,c);return Db(e)});e.set(this.xc,function(b){return Qk(d,b)});e.set(this.sc,function(){var b=Rk(d);return Db(b)});e.set(this.W,function(b,c){return Db(Sk(d,b,c))});e.set(this.Ac,function(b){b=Tk(d,b);return Db(b)});e.set(this.cb,function(b,c){return Uk(d,b,c)});this.fb=new pk(this.w,{Ke:function(b,c,e,k){var f=null;b==\nd.w&&(f=e==d.w?d.w:d.S);b==d.S&&(f=e==d.w||c.u!=k.u?d.w:e==d.S?d.S:e==d.ab||e==d.W?d.ab:e==d.cb?d.Ac:null);b==d.ab&&(f=e==d.W&&c.u==k.u?d.yc:d.Ca);b==d.yc&&(f=Vk(d.W,d.xc,d.Ca,e,c,k));b==d.xc&&(f=Vk(d.W,d.sc,d.Ca,e,c,k));b==d.sc&&(f=Vk(d.W,d.W,d.Ca,e,c,k));b==d.Ac&&(f=e==d.cb&&c.u==k.u?d.cb:d.Ca);if(b==d.W||b==d.cb)f=d.Ca;b==d.Ca&&(f=k.u&&c.u==k.u?d.S:d.w);return f},ue:function(b,c,h){d.dispatchEvent(new I(\"onstatechange\",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,\nfunction(c){switch(c.l){case 1:return u(c,Nk(d,b),2);case 2:return c[\"return\"](b.u?d.S:d.w)}})})},af:function(b){d.dispatchEvent(new I(\"onstateidle\",{state:b.name}))}});b&&this.zb(b,!0)}Ta(X,J);z(\"shaka.Player\",X);\nX.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:if(b.g==Wk)return d[\"return\"]();b.g=Wk;e=tk(b.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});return u(d,new Promise(function(b){e.pb=function(){};e.fc=function(){b()};e.Ua=function(){b()};e.onError=function(){b()};e.hc=function(){b()}}),2);case 2:return u(d,b.fb.destroy(),3);case 3:b.i&&(b.i.a(),b.i=null);b.rc=null;b.j=null;b.c=null;if(!b.N){d.A(0);break}return u(d,b.N.destroy(),5);\ncase 5:b.N=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version=\"v2.5.0\";var Xk=[\"2\",\"5\"];Le=new function(b){this.a=b;this.c=Me;this.b=Ne}(new Je(Number(Xk[0]),Number(Xk[1])));var Yk=[\"output-restricted\",\"internal-error\"],Zk={};X.registerSupportPlugin=function(b,c){Zk[b]=c};\nX.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?mc()?!0:nc(\"application/x-mpegurl\"):!1};\nX.probeSupport=function(){return jd().then(function(b){for(var c=U.vf(),d={},e=r('video/mp4; codecs=\"avc1.42E01E\",video/mp4; codecs=\"avc3.42E01E\",video/mp4; codecs=\"hev1.1.6.L93.90\",video/mp4; codecs=\"hvc1.1.6.L93.90\",video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"vp9\",video/mp4; codecs=\"vp09.00.10.08\",audio/mp4; codecs=\"mp4a.40.2\",audio/mp4; codecs=\"ac-3\",audio/mp4; codecs=\"ec-3\",audio/mp4; codecs=\"opus\",audio/mp4; codecs=\"flac\",video/webm; codecs=\"vp8\",video/webm; codecs=\"vp9\",video/webm; codecs=\"vp09.00.10.08\",audio/webm; codecs=\"vorbis\",audio/webm; codecs=\"opus\",video/mp2t; codecs=\"avc1.42E01E\",video/mp2t; codecs=\"avc3.42E01E\",video/mp2t; codecs=\"hvc1.1.6.L93.90\",video/mp2t; codecs=\"mp4a.40.2\",video/mp2t; codecs=\"ac-3\",video/mp2t; codecs=\"ec-3\",text/vtt,application/mp4; codecs=\"wvtt\",application/ttml+xml,application/mp4; codecs=\"stpp\"'.split(\",\")),f=\ne.next();!f.done;f=e.next()){f=f.value;d[f]=mc()?Wd(f)?!0:MediaSource.isTypeSupported(f)||zd(f):nc(f);var g=f.split(\";\")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in Zk)b[h]=Zk[h]();return b})};X.prototype.zb=function(b,c){c=void 0===c?!0:c;if(this.g==Wk)return Promise.reject($k());var d=qk();d.u=b;mc()||(c=!1);var e=c?this.ab:this.S,f=tk(this.fb,function(){return{node:e,payload:d,Ra:!1}});f.pb=function(){};return al(f)};X.prototype.attach=X.prototype.zb;\nX.prototype.detach=function(){var b=this;if(this.g==Wk)return Promise.reject($k());var c=tk(this.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});c.pb=function(){};return al(c)};X.prototype.detach=X.prototype.detach;X.prototype.ld=function(b){var c=this;b=void 0===b?!0:b;if(this.g==Wk)return Promise.reject($k());mc()||(b=!1);var d=qk(),e=tk(this.fb,function(e){var f=e.u&&b?c.ab:e.u?c.S:c.w;d.u=e.u;return{node:f,payload:d,Ra:!1}});e.pb=function(){};return al(e)};X.prototype.unload=X.prototype.ld;\nX.prototype.load=function(b,c,d){if(this.g==Wk)return Promise.reject($k());this.dispatchEvent(new I(\"loading\"));var e=qk();e.uri=b;e.hd=Date.now()/1E3;d&&\"string\"!=typeof d&&(Ke(\"Loading with a manifest parser factory\",\"Please register a manifest parser and for the mime-type.\"),e.va=function(){return new d});d&&\"string\"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=bl(e)?this.cb:this.W,g=tk(this.fb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ra:!0}});g.pb=function(){};\nreturn new Promise(function(b,c){g.hc=function(){return c(new D(2,7,7002))};g.fc=function(){return b()};g.Ua=function(){return c($k())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;\nfunction bl(b){if(b.va)return!1;if(!mc())return!0;var c=b.mimeType;b=b.uri||\"\";c||(c={mp4:\"video/mp4\",m4v:\"video/mp4\",m4a:\"audio/mp4\",webm:\"video/webm\",ts:\"video/mp2t\",m3u8:\"application/x-mpegurl\",mp3:\"audio/mpeg\",aac:\"audio/aac\",flac:\"audio/flac\"}[U.getExtension(b)]);return c?nc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes(\"Apple\"):!0:!1:!1}function Mk(b,c,d){null==c.u&&(c.u=d.u,L(b.i,c.u,\"error\",function(){var c=cl(b);c&&b.Ha(c)}));b.a=c.u;return Promise.resolve()}\nfunction Nk(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:b.g!=Wk&&(b.g=Jk);b.dispatchEvent(new I(\"unloading\"));c.currentTime=null;c.va=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ma(c.u,\"loadeddata\"),b.i.ma(c.u,\"playing\"),b.i.ma(c.u,\"pause\"),b.i.ma(c.u,\"ended\"),b.i.ma(c.u,\"ratechange\"));b.bb&&(b.bb.a(),b.bb=null);b.Qb&&(b.Qb.stop(),b.Qb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.j){e.A(4);break}return u(e,b.j.stop(),4);\ncase 4:if(!b.f){e.A(6);break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.a(),b.o=null);if(!b.F){e.A(8);break}return u(e,b.F.destroy(),9);case 9:b.F=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute(\"src\"),c.u.load());if(!b.h){e.A(10);break}return u(e,b.h.destroy(),11);case 11:b.h=null;case 10:b.C.a.clear(),b.xb=null,b.V=null,b.Tb.clear(),b.b=null,b.v=null,b.eb=!0,dl(b),v(e)}})})}\nfunction Ok(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.l){case 1:return f=window.muxjs?new nd:new od,g=b.c.textDisplayFactory,h=new g,k=new $d(c.u,f,h),u(e,k.o,2);case 2:b.F=k,v(e)}})})}\nfunction Pk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:c.va=d.va;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.N;b.xb=g;if(c.va){b.m=c.va();f.A(2);break}k=b;return u(f,U.create(g,h,b.c.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.c.manifest),v(f)}})})}\nfunction Qk(b,c){var d=c.uri,e=b.N;b.Pb=new wi;xi(b.Pb,function(c){el(b,\"timelineregionadded\",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Bc(c)},filterAllPeriods:function(c){return fl(b,c)},onTimelineRegionAdded:function(c){var d=b.Pb;a:{var e=r(d.b);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.b.add(c),d.c(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ha(c)}};\nreturn new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.l){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.b=e.s;b.dispatchEvent(new I(\"manifestparsed\"));if(0==b.b.periods.length)throw new D(2,4,4014);gl(b.b.periods);v(e)}})})}),function(){return b.m.stop()})}\nfunction Rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:return b.h=new Gc({nb:b.N,onError:function(d){b.Ha(d)},gc:function(d){hl(b,d)},onExpirationUpdated:function(d,e){il(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.h.configure(b.c.drm),u(d,Nc(b.h,ci(b.b.periods),b.b.offlineSessionIds),2);case 2:fl(b,b.b.periods),v(d)}})})}\nfunction Sk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.l){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.xb=h,b.v=new Ik,k=function(){return jl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.K.set(c)},L(b.i,g,\"playing\",k),L(b.i,g,\"pause\",k),L(b.i,g,\"ended\",k),L(b.i,g,\"ratechange\",l),m=b.c.abrFactory,b.j&&b.rc==m||(b.rc=m,b.j=new m,b.j.configure(b.c.abr)),kl(b,b.b.periods),b.Rb=new Ph(b.c.preferredAudioLanguage,b.c.preferredVariantRole,b.c.preferredAudioChannelCount),\nb.Ka=b.c.preferredTextLanguage,ll(b.b.presentationTimeline,b.c.playRangeStart,b.c.playRangeEnd),u(f,b.h.zb(g),2);case 2:return b.j.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.b.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ml(b,g,c,!0);b.f&&(Qi(b.f,c,d,f),nl(b))}),b.o=ol(b,c.startTime),b.bb=pl(b),b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}}),\nn=Math.max(b.b.minBufferTime,b.c.streaming.rebufferingGoal),ql(b,n),b.f=rl(b),b.f.configure(b.c.streaming),sl(b),b.g=tl,b.dispatchEvent(new I(\"streaming\")),u(f,b.f.start(),3);case 3:b.c.streaming.startAtSegmentBoundary&&(q=b.o.i(),x=ul(b,q),b.o.o(x)),b.b.periods.forEach(b.Bc.bind(b)),vl(b),nl(b),w=wl(b),w.variants.some(function(b){return b.primary}),xl(b,w.variants),dc(b.i,g,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd}),v(f)}})})}\nfunction Tk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.l){case 1:return f=wd,b.h=new Gc({nb:b.N,onError:function(c){b.Ha(c)},gc:function(c){hl(b,c)},onExpirationUpdated:function(c,e){il(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.h.configure(b.c.drm),g={id:0,language:\"und\",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,\npresentationTimeOffset:0,mimeType:\"video/mp4\",codecs:\"\",encrypted:!0,keyId:null,language:\"und\",label:null,type:f.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Nc(b.h,[g],[]),2);case 2:return u(e,b.h.zb(c.u),0)}})})}\nfunction Uk(b,c,d){function e(){return jl(b)}c.uri=d.uri;c.startTime=d.startTime;b.xb=c.uri;b.v=new Ik;b.o=new pi(c.u);null!=c.startTime&&b.o.o(c.startTime);b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}});ql(b,b.c.streaming.rebufferingGoal);L(b.i,c.u,\"playing\",e);L(b.i,c.u,\"pause\",e);L(b.i,c.u,\"ended\",e);dc(b.i,c.u,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd});b.a.audioTracks&&(L(b.i,b.a.audioTracks,\"addtrack\",function(){return vl(b)}),\nL(b.i,b.a.audioTracks,\"removetrack\",function(){return vl(b)}));if(b.a.textTracks){var f=b.a.textTracks;L(b.i,f,\"addtrack\",function(){return vl(b)});L(b.i,f,\"removetrack\",function(){return vl(b)})}c.u.src=c.uri;b.g=yl;b.dispatchEvent(new I(\"streaming\"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(cl(b)):(dc(b.i,b.a,\"loadeddata\",function(){g.resolve()}),dc(b.i,b.a,\"error\",function(){g.reject(cl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));\nreturn Promise.resolve()})}function gl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(\",\")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}\nfunction sl(b){function c(b){var c=\"\";b.video&&(c=lc(b.video.codecs)[0]);var d=\"\";b.audio&&(d=lc(b.audio.codecs)[0]);return c+\"-\"+d}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=De(d,b.c.preferredAudioChannelCount);var e=new Hb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h=b.a.duration-.1;break;case tl:a:{var e;(e=b.a.ended)||(e=b.F,e=e.g?\"ended\"==e.g.readyState:!0);if(e)c=!0;else{if(b.b.presentationTimeline.U()&&(e=b.b.presentationTimeline.jb(),pd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=rd(b.a.buffered,b.a.currentTime);e=b.V;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Th:Uh;e.a=f;c!=f&&dl(b)})).Ia(.25)}\nfunction rl(b){return new Di(b.b,{Qa:function(){return b.o.i()},L:b.F,nb:b.N,Hd:b.Ze.bind(b),Gd:b.pe.bind(b),onError:b.Ha.bind(b),onEvent:function(c){return b.dispatchEvent(c)},cf:b.df.bind(b),Uc:b.kf.bind(b)})}\nX.prototype.configure=function(b,c){if(2==arguments.length&&\"string\"==typeof b){for(var d=b,e={},f=e,g=0,h=0;;){g=d.indexOf(\".\",g);if(0>g)break;if(0==g||\"\\\\\"!=d[g-1])h=d.substring(h,g).replace(/\\\\\\./g,\".\"),f[h]={},f=f[h],h=g+1;g+=1}f[d.substring(h).replace(/\\\\\\./g,\".\")]=c;b=e}d=Bk(this.c,b,Kk(this));zl(this);return d};X.prototype.configure=X.prototype.configure;\nfunction zl(b){b.m&&b.m.configure(b.c.manifest);b.h&&b.h.configure(b.c.drm);if(b.f){b.f.configure(b.c.streaming);try{b.b.periods.forEach(b.Bc.bind(b))}catch(f){b.Ha(f)}var c=Hi(b.f),d=Ji(b.f),e=wl(b);c=Ge(c,d,e.variants);b.j&&c&&c.allowedByApplication&&c.allowedByKeySystem?xl(b,e.variants):Al(b,e)}b.j&&(b.j.configure(b.c.abr),b.c.abr.enabled&&!b.eb?b.j.enable():b.j.disable(),Bl(b))}X.prototype.getConfiguration=function(){var b=Kk(this);Bk(b,this.c,Kk(this));return b};\nX.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.Df=function(){for(var b in this.c)delete this.c[b];Bk(this.c,Kk(this),Kk(this));zl(this)};X.prototype.resetConfiguration=X.prototype.Df;X.prototype.Ee=function(){return this.g};X.prototype.getLoadMode=X.prototype.Ee;X.prototype.Ie=function(){return this.a};X.prototype.getMediaElement=X.prototype.Ie;X.prototype.Bb=function(){return this.N};X.prototype.getNetworkingEngine=X.prototype.Bb;X.prototype.$b=function(){return this.xb};\nX.prototype.getAssetUri=X.prototype.$b;X.prototype.He=function(){Ke(\"getManifestUri\",'Please use \"getAssetUri\" instead.');return this.$b()};X.prototype.getManifestUri=X.prototype.He;X.prototype.U=function(){return this.b?this.b.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.U;X.prototype.Ta=function(){return this.b?this.b.presentationTimeline.Ta():!1};X.prototype.isInProgress=X.prototype.Ta;\nX.prototype.We=function(){if(this.b){if(!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.We;X.prototype.Ff=function(){if(this.b){var b=this.b.presentationTimeline;return{start:b.ib(),end:b.wa()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};\nX.prototype.seekRange=X.prototype.Ff;X.prototype.keySystem=function(){return this.h?this.h.keySystem():\"\"};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.h?this.h.a:null};X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.bc=function(){return this.h?this.h.bc():Infinity};X.prototype.getExpiration=X.prototype.bc;X.prototype.Ic=function(){return this.V?this.V.a==Uh:!1};X.prototype.isBuffering=X.prototype.Ic;\nX.prototype.Le=function(){if(this.K){var b=this.K;b=b.g?0:b.f}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Le;X.prototype.ag=function(b){0==b?$a(\"A trick play rate of 0 is unsupported!\"):(this.g==yl&&this.K.set(b),this.g==tl&&(this.K.set(b),Oi(this.f,1=h.b.periods.length?h.b.presentationTimeline.Y():h.b.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Ad++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),\nfindSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||\"\",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Tb.add(E);m.textStreams.push(E);return u(l,Ki(h.f,E),2);case 2:return(F=Ii(h.f,\"text\"))&&Hh(h.C,m,F),h.Tb[\"delete\"](E),Al(h,m),vl(h),l[\"return\"](xe(E))}})})};\nX.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.dd=function(b,c){this.Ub.width=b;this.Ub.height=c};X.prototype.setMaxHardwareResolution=X.prototype.dd;X.prototype.ad=function(){if(this.g==tl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Eb&&(d.Eb=!1,Ni(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.ad;X.prototype.Fe=function(){return this.b};X.prototype.getManifest=X.prototype.Fe;\nX.prototype.Ge=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Ge;function ml(b,c,d,e){Ih(b.C,c).variant=d;b=b.v.b;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:\"variant\",fromAdaptation:e,bandwidth:d.bandwidth}))}function Kk(b){var c=zk();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.ad())};c.textDisplayFactory=function(){return new vk(b.a)};return c}\nfunction kl(b,c){for(var d=0;dd&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}\nfunction hl(b,c){if(b.f){var d=wl(b),e=!1,f=Object.keys(c),g=1==f.length&&\"00\"==f[0];f.length&&d.variants.forEach(function(b){He(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?\"00\":d.keyId],b.allowedByKeySystem=!!d&&!Yk.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Hi(b.f);var h=Ji(b.f);(f=Ge(f,h,d.variants))&&!f.allowedByKeySystem&&Al(b,d);e&&(vl(b),xl(b,d.variants))}}\nfunction il(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I(\"expirationupdated\"))}function ll(b,c,d){0=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=ym(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Am(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&\nk.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}\nfunction Am(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Db();var k=g.id;Bm(g,f,function(f){var l=og(f.c(),f.b,f.a,b.a.streaming.retryParameters);sj(c,k,\nl,Tl(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=og(f.c(),f.b,f.a,b.a.streaming.retryParameters),sj(c,k,f,.5*Ul(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}\nfunction Bm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function km(b){if(b.h.a)throw new D(2,9,7001);}function im(){if(!fm())throw new D(2,9,9E3);}function gm(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e[\"return\"](e.s);case 2:Ea(e),Kb(b.g,c),Fa(e,0)}})})}\nfunction vm(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.l){case 1:return d=new Cj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})};\nfunction um(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.l){case 1:if(!e.drmInfo)return g[\"return\"]();h=Ij(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:tm(e,!1),videoCapabilities:tm(e,!0)}});return u(g,mk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),\n0)}})})}function ym(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function om(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Cm(c.value)}\nfunction Cm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}Zk.offline=fm;z(\"shaka.polyfill.installAll\",function(){for(var b=0;b=c.a.length)return b;for(var d=[],e=0;ed.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;bg&&(g=Math.max(g+f,0));g=g}});ka(\"Array.prototype.find\",function(b){return b?b:function(b,d){return Pa(this,b,d).ee}});var Sa=this;Sa.a=!0;\nfunction z(b,c){var d=b.split(\".\"),e=Sa;d[0]in e||!e.execScript||e.execScript(\"var \"+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ng=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*\n\n Copyright 2016 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\nfunction Ua(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Ua(2);this.c=new Ua(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\\/\\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(db(this,b.sa),this.Xa=b.Xa,this.oa=b.oa,hb(this,b.tb),this.fa=b.fa,ib(this,b.a.clone()),this.Oa=b.Oa):b&&(c=String(b).match(bb))?(db(this,c[1]||\"\",!0),this.Xa=jb(c[2]||\"\"),this.oa=jb(c[3]||\"\",!0),hb(this,c[4]),this.fa=jb(c[5]||\"\",!0),ib(this,c[6]||\"\",!0),this.Oa=jb(c[7]||\"\")):this.a=new kb(null)}p=cb.prototype;p.sa=\"\";p.Xa=\"\";p.oa=\"\";p.tb=null;p.fa=\"\";p.Oa=\"\";\np.toString=function(){var b=[],c=this.sa;c&&b.push(lb(c,mb,!0),\":\");if(c=this.oa){b.push(\"//\");var d=this.Xa;d&&b.push(lb(d,mb,!0),\"@\");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,\"%$1\"));c=this.tb;null!=c&&b.push(\":\",String(c))}if(c=this.fa)this.oa&&\"/\"!=c.charAt(0)&&b.push(\"/\"),b.push(lb(c,\"/\"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push(\"?\",c);(c=this.Oa)&&b.push(\"#\",lb(c,pb));return b.join(\"\")};\np.resolve=function(b){var c=this.clone();\"data\"===c.sa&&(c=new cb);var d=!!b.sa;d?db(c,b.sa):d=!!b.Xa;d?c.Xa=b.Xa:d=!!b.oa;d?c.oa=b.oa:d=null!=b.tb;var e=b.fa;if(d)hb(c,b.tb);else if(d=!!b.fa){if(\"/\"!=e.charAt(0))if(this.oa&&!this.fa)e=\"/\"+e;else{var f=c.fa.lastIndexOf(\"/\");-1!=f&&(e=c.fa.substr(0,f+1)+e)}if(\"..\"==e||\".\"==e)e=\"\";else if(-1!=e.indexOf(\"./\")||-1!=e.indexOf(\"/.\")){f=0==e.lastIndexOf(\"/\",0);e=e.split(\"/\");for(var g=[],h=0;hc)throw Error(\"Bad port number \"+c);b.tb=c}else b.tb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}\nfunction jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):\"\"}function lb(b,c,d){return\"string\"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),b):null}function rb(b){b=b.charCodeAt(0);return\"%\"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\\/\\?@]/g,ob=/[#\\?:]/g,nb=/[#\\?]/g,qb=/[#\\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ea=null;p.Xb=null;\np.add=function(b,c){if(!this.ea&&(this.ea={},this.Xb=0,this.a))for(var d=this.a.split(\"&\"),e=0;e=b.i)if(b.c)b.a=1,b.b=b.f;else return d[\"return\"](Promise.reject());e=b.a;b.a++;if(0==e)return d[\"return\"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function ub(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g=e.priority)Qb[b]={priority:d,uf:c}}K.registerScheme=Rb;K.unregisterScheme=function(b){delete Qb[b]};K.prototype.wf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.wf;\nK.prototype.bg=function(b){this.a[\"delete\"](b)};K.prototype.unregisterRequestFilter=K.prototype.bg;K.prototype.re=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.re;K.prototype.xf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.xf;K.prototype.cg=function(b){this.b[\"delete\"](b)};K.prototype.unregisterResponseFilter=K.prototype.cg;K.prototype.se=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.se;\nfunction Sb(b,c){return{uris:b,method:\"GET\",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;\nK.prototype.request=function(b,c){var d=this,e=new Tb;if(this.f){var f=Promise.reject(new D(2,7,7001));f[\"catch\"](function(){});return new Ub(f,function(){return Promise.resolve()},e)}c.method=c.method||\"GET\";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Ib(c.retryParameters):ub();c.uris=Ib(c.uris);f=Vb(this,b,c);var g=f.T(function(){return Wb(d,b,c,new tb(c.retryParameters,!1),0,null,e)}),h=g.T(function(c){return Xb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},\nfunction(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.T(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ue||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Ub(f.promise,f.Fd,e);Ob(this.g,f);return f};K.prototype.request=K.prototype.request;\nfunction Vb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={$c:f.$c},g=b.next())f.$c=g.value,e=e.T(function(b){return function(){return b.$c(c,d)}}(f));return e.T(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}\nfunction Wb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.sa,m=!1;l||(l=location.protocol,l=l.slice(0,-1),db(k,l),d.uris[f]=k.toString());var n=(l=Qb[l])?l.uf:null;if(!n)return Ab(new D(2,1,1E3,k));var q;return Db(zb(e)).T(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).T(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ue:m}},function(h){if(h&&7001==h.code)throw h;if(b.f)return Bb();if(h&&1==h.severity)return b.dispatchEvent(new I(\"retry\",\n{error:h instanceof D?h:null})),f=(f+1)%d.uris.length,Wb(b,c,d,e,f,h);throw h||g;})}function Xb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.T(f.value.bind(null,c,d.response));return e.T(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Tb(){this.a=0}K.NumBytesRemainingClass=Tb;function Ub(b,c,d){H.call(this,b,c);this.b=d}var Yb=Ub;Yb.prototype=ma(H.prototype);\nYb.prototype.constructor=Yb;if(sa)sa(Yb,H);else for(var Zb in H)if(\"prototype\"!=Zb)if(Object.defineProperties){var $b=Object.getOwnPropertyDescriptor(H,Zb);$b&&Object.defineProperty(Yb,Zb,$b)}else Yb[Zb]=H[Zb];Yb.$f=H.prototype;K.PendingRequest=Ub;Ub.all=Eb;Ub.notAbortable=Db;Ub.completed=Cb;Ub.aborted=Bb;Ub.failed=Ab;function ac(){this.b=new Hb}ac.prototype.a=function(){bc(this);this.b=null};function L(b,c,d,e){b.b&&(c=new cc(c,d,e),b.b.push(d,c))}function dc(b,c,d,e){function f(g){b.ma(c,d,f);e(g)}L(b,c,d,f)}ac.prototype.ma=function(b,c,d){if(this.b)for(var e=this.b.get(c)||[],f=0;f=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return uc(b,!1);if(0==c[1]&&0==c[3])return uc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return sc(b);throw new D(2,2,2003);}z(\"shaka.util.StringUtils.fromBytesAutoDetect\",xc);\nfunction yc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;dd&&(d+=Math.pow(2,32));d=\"0x\"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}\np.Nd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ja?this.F.push(b):Uc(this,b)};\nfunction Uc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];\"individualization-request\"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Sb([f],b.f.retryParameters);f.body=c.message;f.method=\"POST\";f.licenseRequestType=c.messageType;\"com.microsoft.playready\"!=b.a.keySystem&&\"com.chromecast.playready\"!=b.a.keySystem||ed(f);b.a.keySystem.startsWith(\"com.apple.fps\")&&fd(f);b.w.nb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();\nthis.a.keySystem.startsWith(\"com.apple.fps\")&&gd(b);return d.update(b.data).then(function(){var b=this;this.w.onEvent(new I(\"drmsessionupdate\"));e&&(e.ua&&e.ua.resolve(),(new B(function(){e.loaded=!0;dd(b)&&b.j.resolve()})).O(hd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))[\"catch\"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))}\nfunction ed(b){var c=uc(b.body,!0,!0);if(c.includes(\"PlayReadyKeyMessage\")){c=(new DOMParser).parseFromString(c,\"application/xml\");for(var d=c.getElementsByTagName(\"HttpHeader\"),e=0;e\"===c.substr(0,5)&&\"\"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Bc(c).buffer}\np.Ld=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if(\"string\"==typeof e){var f=e;e=b;b=f}if(\"com.microsoft.playready\"==this.a.keySystem&&16==e.byteLength&&!pc(\"Tizen\")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}\"com.microsoft.playready\"==this.a.keySystem&&\"status-pending\"==b&&(b=\"usable\");\"status-pending\"!=b&&(c.loaded=!0);\"expired\"==b&&(d=!0);f=Dc(new Uint8Array(e));\nthis.ka.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ua&&(this.b[\"delete\"](b),b.close()[\"catch\"](function(){}));dd(this)&&(this.j.resolve(),this.K.O(id))};function Hc(b){var c=b.ka,d=b.S;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return\"expired\"==b})&&b.g(new D(2,6,6014));b.w.gc(hc(d))}\nfunction jd(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.l){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes(\"persistent-license\"):!1,pc(\"Tizen 3\")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Aa(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs=\"avc1.42E01E\"'},{contentType:'video/webm; codecs=\"vp8\"'}],d=[{videoCapabilities:c,\npersistentState:\"required\",sessionTypes:[\"persistent-license\"]},{videoCapabilities:c}],e=new Map;c=\"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime\".split(\" \").map(function(c){return b(c)});return Promise.all(c).then(function(){return hc(e)})}\nfunction kd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!ad(b,ic(d.mimeType,d.codecs))||e&&e.encrypted&&!ad(b,ic(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}\nfunction ld(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;eb.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function qd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function rd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}\nfunction sd(b){if(!b)return[];for(var c=[],d=0;d>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Cd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}\nyd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};yd.prototype.h=function(){var b={data:Fc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Dd(b,c,d){this.startTime=b;this.direction=Ed;this.endTime=c;this.payload=d;this.region=new Fd;this.position=null;this.positionAlign=Gd;this.size=100;this.textAlign=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight=\"\";this.lineAlign=Kd;this.displayAlign=Ld;this.backgroundColor=this.color=\"\";this.backgroundImage=null;this.fontSize=\"\";this.fontWeight=Md;this.fontStyle=Nd;this.fontFamily=\"\";this.textDecoration=[];this.wrapLine=!0;this.id=\"\"}z(\"shaka.text.Cue\",Dd);\nvar Gd=\"auto\";Dd.positionAlign={LEFT:\"line-left\",RIGHT:\"line-right\",CENTER:\"center\",AUTO:Gd};var Hd=\"center\",Od={LEFT:\"left\",RIGHT:\"right\",CENTER:Hd,START:\"start\",END:\"end\"};Dd.textAlign=Od;var Ld=\"after\",Pd={BEFORE:\"before\",CENTER:\"center\",AFTER:Ld};Dd.displayAlign=Pd;var Ed=\"ltr\";Dd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ed,HORIZONTAL_RIGHT_TO_LEFT:\"rtl\"};var Id=\"horizontal-tb\";Dd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:\"vertical-lr\",VERTICAL_RIGHT_TO_LEFT:\"vertical-rl\"};\nvar Jd=0;Dd.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd=\"start\",Qd={CENTER:\"center\",START:Kd,END:\"end\"};Dd.lineAlign=Qd;var Md=400;Dd.fontWeight={NORMAL:Md,BOLD:700};var Nd=\"normal\",Rd={NORMAL:Nd,ITALIC:\"italic\",OBLIQUE:\"oblique\"};Dd.fontStyle=Rd;Dd.textDecoration={UNDERLINE:\"underline\",LINE_THROUGH:\"lineThrough\",OVERLINE:\"overline\"};\nfunction Fd(){this.id=\"\";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sd;this.scroll=Td}z(\"shaka.text.CueRegion\",Fd);var Sd=1;Fd.units={PX:0,PERCENTAGE:Sd,LINES:2};var Td=\"\";Fd.scrollMode={NONE:Td,UP:\"up\"};function Ud(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.j=\"\";this.i=new Map}var Vd={};z(\"shaka.text.TextEngine.registerParser\",function(b,c){Vd[b]=c});z(\"shaka.text.TextEngine.unregisterParser\",function(b){delete Vd[b]});function Wd(b){return Vd[b]||window.muxjs&&\"application/cea-608\"==b?!0:!1}Ud.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function Xd(b,c){\"application/cea-608\"!=c&&(b.g=new Vd[c])}\nUd.prototype.Gc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};\nfunction Yd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&cthis.a&&c>=this.b&&(this.b=b))}.bind(this))};Ud.prototype.me=function(b){this.c.append(b)};Ud.prototype.appendCues=Ud.prototype.me;\nUd.prototype.nc=function(b,c){this.j=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Ud.prototype.setSelectedClosedCaptionId=Ud.prototype.nc;\nfunction Zd(b,c,d,e,f){var g=d+\" \"+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTimed.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function fe(b,c){return\"text\"==c?b.a.b:pd(ee(b,c))}function ge(b,c,d){if(\"text\"==c)return b=b.a,null==b.b||b.bc&&(c+=.001);this.b[b].timestampOffset=c;this.qb(b)};p.Kf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.qb(b)};\np.Sf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.qb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),me(this,b))};function ie(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){\"QuotaExceededError\"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),me(b,c)}return d.p}\nfunction le(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)me(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function me(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),me(b,c)}};function ne(b,c){b=M(b);c=M(c);return b.split(\"-\")[0]==c.split(\"-\")[0]}function oe(b,c){b=M(b);c=M(c);var d=b.split(\"-\"),e=c.split(\"-\");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split(\"-\");b=c[0]||\"\";c=c[1]||\"\";b=b.toLowerCase();b=pe.get(b)||b;return(c=c.toUpperCase())?b+\"-\"+c:b}function qe(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):\"und\"}\nfunction re(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,oe(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split(\"-\");k=k.split(\"-\");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,oe(d,f))return f;return null}\nvar pe=new Map([[\"aar\",\"aa\"],[\"abk\",\"ab\"],[\"afr\",\"af\"],[\"aka\",\"ak\"],[\"alb\",\"sq\"],[\"amh\",\"am\"],[\"ara\",\"ar\"],[\"arg\",\"an\"],[\"arm\",\"hy\"],[\"asm\",\"as\"],[\"ava\",\"av\"],[\"ave\",\"ae\"],[\"aym\",\"ay\"],[\"aze\",\"az\"],[\"bak\",\"ba\"],[\"bam\",\"bm\"],[\"baq\",\"eu\"],[\"bel\",\"be\"],[\"ben\",\"bn\"],[\"bih\",\"bh\"],[\"bis\",\"bi\"],[\"bod\",\"bo\"],[\"bos\",\"bs\"],[\"bre\",\"br\"],[\"bul\",\"bg\"],[\"bur\",\"my\"],[\"cat\",\"ca\"],[\"ces\",\"cs\"],[\"cha\",\"ch\"],[\"che\",\"ce\"],[\"chi\",\"zh\"],[\"chu\",\"cu\"],[\"chv\",\"cv\"],[\"cor\",\"kw\"],[\"cos\",\"co\"],[\"cre\",\"cr\"],[\"cym\",\"cy\"],[\"cze\",\n\"cs\"],[\"dan\",\"da\"],[\"deu\",\"de\"],[\"div\",\"dv\"],[\"dut\",\"nl\"],[\"dzo\",\"dz\"],[\"ell\",\"el\"],[\"eng\",\"en\"],[\"epo\",\"eo\"],[\"est\",\"et\"],[\"eus\",\"eu\"],[\"ewe\",\"ee\"],[\"fao\",\"fo\"],[\"fas\",\"fa\"],[\"fij\",\"fj\"],[\"fin\",\"fi\"],[\"fra\",\"fr\"],[\"fre\",\"fr\"],[\"fry\",\"fy\"],[\"ful\",\"ff\"],[\"geo\",\"ka\"],[\"ger\",\"de\"],[\"gla\",\"gd\"],[\"gle\",\"ga\"],[\"glg\",\"gl\"],[\"glv\",\"gv\"],[\"gre\",\"el\"],[\"grn\",\"gn\"],[\"guj\",\"gu\"],[\"hat\",\"ht\"],[\"hau\",\"ha\"],[\"heb\",\"he\"],[\"her\",\"hz\"],[\"hin\",\"hi\"],[\"hmo\",\"ho\"],[\"hrv\",\"hr\"],[\"hun\",\"hu\"],[\"hye\",\"hy\"],[\"ibo\",\"ig\"],[\"ice\",\n\"is\"],[\"ido\",\"io\"],[\"iii\",\"ii\"],[\"iku\",\"iu\"],[\"ile\",\"ie\"],[\"ina\",\"ia\"],[\"ind\",\"id\"],[\"ipk\",\"ik\"],[\"isl\",\"is\"],[\"ita\",\"it\"],[\"jav\",\"jv\"],[\"jpn\",\"ja\"],[\"kal\",\"kl\"],[\"kan\",\"kn\"],[\"kas\",\"ks\"],[\"kat\",\"ka\"],[\"kau\",\"kr\"],[\"kaz\",\"kk\"],[\"khm\",\"km\"],[\"kik\",\"ki\"],[\"kin\",\"rw\"],[\"kir\",\"ky\"],[\"kom\",\"kv\"],[\"kon\",\"kg\"],[\"kor\",\"ko\"],[\"kua\",\"kj\"],[\"kur\",\"ku\"],[\"lao\",\"lo\"],[\"lat\",\"la\"],[\"lav\",\"lv\"],[\"lim\",\"li\"],[\"lin\",\"ln\"],[\"lit\",\"lt\"],[\"ltz\",\"lb\"],[\"lub\",\"lu\"],[\"lug\",\"lg\"],[\"mac\",\"mk\"],[\"mah\",\"mh\"],[\"mal\",\"ml\"],[\"mao\",\n\"mi\"],[\"mar\",\"mr\"],[\"may\",\"ms\"],[\"mkd\",\"mk\"],[\"mlg\",\"mg\"],[\"mlt\",\"mt\"],[\"mon\",\"mn\"],[\"mri\",\"mi\"],[\"msa\",\"ms\"],[\"mya\",\"my\"],[\"nau\",\"na\"],[\"nav\",\"nv\"],[\"nbl\",\"nr\"],[\"nde\",\"nd\"],[\"ndo\",\"ng\"],[\"nep\",\"ne\"],[\"nld\",\"nl\"],[\"nno\",\"nn\"],[\"nob\",\"nb\"],[\"nor\",\"no\"],[\"nya\",\"ny\"],[\"oci\",\"oc\"],[\"oji\",\"oj\"],[\"ori\",\"or\"],[\"orm\",\"om\"],[\"oss\",\"os\"],[\"pan\",\"pa\"],[\"per\",\"fa\"],[\"pli\",\"pi\"],[\"pol\",\"pl\"],[\"por\",\"pt\"],[\"pus\",\"ps\"],[\"que\",\"qu\"],[\"roh\",\"rm\"],[\"ron\",\"ro\"],[\"rum\",\"ro\"],[\"run\",\"rn\"],[\"rus\",\"ru\"],[\"sag\",\"sg\"],[\"san\",\n\"sa\"],[\"sin\",\"si\"],[\"slk\",\"sk\"],[\"slo\",\"sk\"],[\"slv\",\"sl\"],[\"sme\",\"se\"],[\"smo\",\"sm\"],[\"sna\",\"sn\"],[\"snd\",\"sd\"],[\"som\",\"so\"],[\"sot\",\"st\"],[\"spa\",\"es\"],[\"sqi\",\"sq\"],[\"srd\",\"sc\"],[\"srp\",\"sr\"],[\"ssw\",\"ss\"],[\"sun\",\"su\"],[\"swa\",\"sw\"],[\"swe\",\"sv\"],[\"tah\",\"ty\"],[\"tam\",\"ta\"],[\"tat\",\"tt\"],[\"tel\",\"te\"],[\"tgk\",\"tg\"],[\"tgl\",\"tl\"],[\"tha\",\"th\"],[\"tib\",\"bo\"],[\"tir\",\"ti\"],[\"ton\",\"to\"],[\"tsn\",\"tn\"],[\"tso\",\"ts\"],[\"tuk\",\"tk\"],[\"tur\",\"tr\"],[\"twi\",\"tw\"],[\"uig\",\"ug\"],[\"ukr\",\"uk\"],[\"urd\",\"ur\"],[\"uzb\",\"uz\"],[\"ven\",\"ve\"],[\"vie\",\n\"vi\"],[\"vol\",\"vo\"],[\"wel\",\"cy\"],[\"wln\",\"wa\"],[\"wol\",\"wo\"],[\"xho\",\"xh\"],[\"yid\",\"yi\"],[\"yor\",\"yo\"],[\"zha\",\"za\"],[\"zho\",\"zh\"],[\"zul\",\"zu\"]]);function se(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function te(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=se(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}\nfunction ue(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.N&&!kd(b,e))return!1;var f=e.audio;e=e.video;return f&&!be(f)||e&&!be(e)||f&&c&&!ve(f,c)||e&&d&&!ve(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Wd(ic(b.mimeType,b.codecs))})}function ve(b,c){return b.mimeType!=c.mimeType||b.codecs.split(\".\")[0]!=c.codecs.split(\".\")[0]?!1:!0}\nfunction we(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:\"variant\",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(\", \"),\naudioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||\nnull,b.label=c.label,b.audioRoles=c.roles);return b}function xe(b){return{id:b.id,active:!1,type:\"text\",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}\nfunction ye(b){b.__shaka_id||(b.__shaka_id=ze++);return b.__shaka_id}var ze=0;function Ae(b){return{id:ye(b),active:!1,type:\"\",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}\nfunction Be(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ce(b){return b.filter(function(b){return Be(b)})}\nfunction De(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}\nfunction Ee(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:\"\";e=e.filter(function(b){return b.language==g});if(c){var h=re(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Fe(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(td.uc,[]);return b.length?Fe(e,b[0]):e}\nfunction Fe(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Ge(b,c,d){for(var e=0;e=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};\nN.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Wa(d.b,f,e);Wa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};\nN.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;\nfunction Ie(b,c){b&&(c=c.filter(function(c){return se(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Je(b,c){this.a=b;this.b=c}Je.prototype.toString=function(){return\"v\"+this.a+\".\"+this.b};function Ke(b,c){var d=new Je(2,6),e=Le,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Me(b,c,d,e){$a([d,\"has been deprecated and will be removed in\",c,\". We are currently at version\",b,\". Additional information:\",e].join(\" \"))}function Ne(b,c,d,e){Za([d,\"has been deprecated and has been removed in\",c,\". We are now at version\",b,\". Additional information:\",e].join(\"\"))}var Le=null;var Oe=\"ended play playing pause pausing ratechange seeked seeking timeupdate volumechange\".split(\" \"),Pe=\"buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume\".split(\" \"),Qe=[\"loop\",\"playbackRate\"],Re=[\"pause\",\"play\"],Se=\"abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged\".split(\" \"),Te={getAssetUri:2,\ngetAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Ue={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ve=[[\"getConfiguration\",\"configure\"]],We=[[\"isTextTrackVisible\",\"setTextTrackVisibility\"]],\nXe=\"addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay\".split(\" \"),Ye=[\"attach\",\"detach\",\"load\",\"unload\"];\nfunction Ze(b){return JSON.stringify(b,function(b,d){if(\"function\"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&\"object\"==typeof g?\"detail\"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:\"TimeRanges\",length:d.length,start:[],end:[]},f=0;fd?\"-Infinity\":\"Infinity\":d;return c}})}function $e(b){return JSON.parse(b,function(b,d){return\"NaN\"==d?NaN:\"-Infinity\"==d?-Infinity:\"Infinity\"==d?Infinity:d&&\"object\"==typeof d&&\"TimeRanges\"==d.__type__?af(d):d&&\"object\"==typeof d&&\"Uint8Array\"==d.__type__?new Uint8Array(d.entries):d})}function af(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function bf(b,c,d,e,f,g){this.N=b;this.f=new B(c);this.S=d;this.j=!1;this.F=e;this.K=f;this.w=g;this.b=this.h=!1;this.C=\"\";this.i=null;this.m=this.Jd.bind(this);this.o=this.ef.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var cf=!1,df=null;p=bf.prototype;p.destroy=function(){ef(this);df&&ff(this);this.f&&(this.f.stop(),this.f=null);this.K=this.F=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.da=function(){return this.b};\np.Xc=function(){return this.C};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.oc();var b=new chrome.cast.SessionRequest(this.N);b=new chrome.cast.ApiConfig(b,this.Kd.bind(this),this.jf.bind(this),\"origin_scoped\");chrome.cast.initialize(b,function(){},function(){});cf&&this.f.O(.02);(b=df)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Kd(b):df=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};\np.cd=function(b){this.i=b;this.b&&gf({type:\"appData\",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!cf)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Vc.bind(this,b),this.Id.bind(this));return this.g};p.Zb=function(){this.b&&(ef(this),df&&(ff(this),df.stop(function(){},function(){}),df=null))};\np.get=function(b,c){if(\"video\"==b){if(Re.includes(c))return this.Ud.bind(this,b,c)}else if(\"player\"==b){if(Ue[c]&&!this.get(\"player\",\"isLive\")())return function(){};if(Xe.includes(c))return this.Ud.bind(this,b,c);if(Ye.includes(c))return this.zf.bind(this,b,c);if(Te[c])return this.Rd.bind(this,b,c)}return this.Rd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;gf({type:\"set\",targetName:b,property:c,value:d})};\np.Vc=function(b,c){df=c;c.addUpdateListener(this.m);c.addMessageListener(\"urn:x-cast:com.google.shaka.v2\",this.o);this.Jd();gf({type:\"init\",initState:b,appData:this.i});this.g.resolve()};p.Id=function(b){var c=8003;switch(b.code){case \"cancel\":c=8004;break;case \"timeout\":c=8005;break;case \"receiver_unavailable\":c=8006}this.g.reject(new D(2,8,c,b))};p.Rd=function(b,c){return this.a[b][c]};\np.Ud=function(b,c,d){for(var e=[],f=2;f LA_URL\"))?b.textContent:\"\"}\nfunction wf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=tf.get(f.Xd);if(g){var h=vd(g,f.init||b);if(g=Af.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}\nvar Af=(new Map).set(\"com.widevine.alpha\",function(b){return(b=P.td(b.node,\"urn:microsoft\",\"laurl\"))?b.getAttribute(\"licenseUrl\")||\"\":\"\"}).set(\"com.microsoft.playready\",function(b){b=P.td(b.node,\"urn:microsoft:playready\",\"pro\");if(!b)return\"\";b=Bc(b.textContent);b=yf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return\"\";b=uc(b.value,!0);return(b=P.Pd(b,\"WRMHEADER\"))?zf(b):\"\"});function vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Bf(d.value))&&c.push(d);return c}\nfunction Bf(b){var c=b.getAttribute(\"schemeIdUri\"),d=P.getAttributeNS(b,\"urn:mpeg:cenc:2013\",\"default_KID\"),e=P.ud(b,\"urn:mpeg:cenc:2013\",\"pssh\").map(P.ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,\"\").toLowerCase(),d.includes(\" \")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:\"cenc\",initData:Bc(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,Xd:c,keyId:d,init:0x)if(q+1=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0this.I.byteLength&&Kf();var c=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Va;\nR.prototype.J=function(b){this.a+b>this.I.byteLength&&Kf();this.a+=b};R.prototype.skip=R.prototype.J;R.prototype.Wd=function(b){this.ab||b>this.I.byteLength)&&Kf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.Wc=function(){for(var b=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.I.buffer,this.I.byteOffset+b,this.a-b);this.a+=1;return sc(b)};\nR.prototype.readTerminatedString=R.prototype.Wc;function Kf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z(\"shaka.util.Mp4Parser\",S);S.prototype.G=function(b,c){var d=Lf(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.G;S.prototype.ca=function(b,c){var d=Lf(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ca;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;\nS.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.pa()&&!this.a;)this.ic(0,d,c)};S.prototype.parse=S.prototype.parse;\nS.prototype.ic=function(b,c,d){var e=c.aa(),f=c.D(),g=c.D();switch(f){case 0:f=c.I.byteLength-e;break;case 1:f=c.ub()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.D(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.I.byteLength&&(g=c.I.byteLength);g-=c.aa();c=0>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Pf;function Qf(b,c,d,e){var f,g=(new S).ca(\"sidx\",function(b){f=Rf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}\nfunction Rf(b,c,d,e){var f=[];e.reader.J(4);var g=e.reader.D();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.D();var k=e.reader.D()}else h=e.reader.ub(),k=e.reader.ub();e.reader.J(2);var l=e.reader.Jb();b=b+e.size+k;for(k=0;k>>31;m&=2147483647;var q=e.reader.D();e.reader.J(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z(\"shaka.media.SegmentIndex\",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&bb||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;cg.startTime?0==d&&c.push(g):(.1b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.zc;function Sf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Tf(b){this.b=b;this.a=new R(b,0);Uf||(Uf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Uf;Tf.prototype.pa=function(){return this.a.pa()};\nfunction Vf(b){var c=Wf(b);if(7=d&&!(c&1<<8-d);d++);if(8b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Cf(h,l,b+f,k,c*g);return ud(m,[d])},0,null)}}}\nfunction ng(b,c){for(var d=[],e=0;eb.o||b.i.O(Math.max(3,b.o-c,Xa(b.v)))}\nfunction xg(b,c,d){c=c||{contentType:\"\",mimeType:\"\",codecs:\"\",emsgSchemeIdUris:[],frameRate:void 0,Sc:null};d=d||c.la;var e=P.rb,f=P.ve,g=P.P(b,\"BaseURL\").map(P.ac),h=b.getAttribute(\"contentType\")||c.contentType,k=b.getAttribute(\"mimeType\")||c.mimeType,l=b.getAttribute(\"codecs\")||c.codecs;f=P.H(b,\"frameRate\",f)||c.frameRate;var m=P.P(b,\"InbandEventStream\"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute(\"schemeIdUri\"),n.includes(q)||n.push(q);m=P.P(b,\n\"AudioChannelConfiguration\");m=Cg(m)||c.Sc;h||(h=Ag(k,l));return{la:ud(d,g),Lb:P.Yb(b,\"SegmentBase\")||c.Lb,Ga:P.Yb(b,\"SegmentList\")||c.Ga,Nb:P.Yb(b,\"SegmentTemplate\")||c.Nb,width:P.H(b,\"width\",e)||c.width,height:P.H(b,\"height\",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute(\"id\"),Sc:m}}\nfunction Cg(b){for(var c=0;c>=1;return b}}}return null}function Bg(b){var c=b.Lb?1:0;c+=b.Ga?1:0;c+=b.Nb?1:0;if(0==c)return\"text\"==b.contentType||\"application\"==b.contentType?!0:!1;1!=c&&(b.Lb&&(b.Ga=null),b.Nb=null);return!0}\nfunction Dg(b,c,d,e){c=ud(c,[d]);c=Sb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Ob(b.g,c);return c.promise.then(function(b){if(\"HEAD\"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=sc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}\nfunction wg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute(\"schemeIdUri\"),value:b.getAttribute(\"value\")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:\"urn:mpeg:dash:utc:http-head:2014\",value:e});return td.te(d,function(b){var d=b.scheme;b=b.value;switch(d){case \"urn:mpeg:dash:utc:http-head:2014\":case \"urn:mpeg:dash:utc:http-head:2012\":return Dg(this,c,b,\"HEAD\");case \"urn:mpeg:dash:utc:http-xsdate:2014\":case \"urn:mpeg:dash:utc:http-iso:2014\":case \"urn:mpeg:dash:utc:http-xsdate:2012\":case \"urn:mpeg:dash:utc:http-iso:2012\":return Dg(this,\nc,b,\"GET\");case \"urn:mpeg:dash:utc:direct:2014\":case \"urn:mpeg:dash:utc:direct:2012\":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case \"urn:mpeg:dash:utc:http-ntp:2014\":case \"urn:mpeg:dash:utc:ntp:2014\":case \"urn:mpeg:dash:utc:sntp:2014\":return $a(\"NTP UTCTiming scheme is not supported\"),Promise.reject();default:return $a(\"Unrecognized scheme in UTCTiming element\",d),Promise.reject()}}.bind(b))[\"catch\"](function(){$a(\"A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!\");\nreturn 0})}p.rf=function(b,c,d){var e=P.rb,f=d.getAttribute(\"schemeIdUri\")||\"\",g=d.getAttribute(\"value\")||\"\",h=P.H(d,\"timescale\",e)||1;P.P(d,\"Event\").forEach(function(d){var k=P.H(d,\"presentationTime\",e)||0,m=P.H(d,\"duration\",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute(\"id\")||\"\",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};\np.Cf=function(b,c,d){b=og(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Ob(this.g,b);return b.promise.then(function(b){return b.data})};function Ag(b,c){return Wd(ic(b,c))?\"text\":b.split(\"/\")[0]}U.Zc(\"mpd\",pg);U.Kb(\"application/dash+xml\",pg);function Eg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Fg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Fg.prototype.toString=function(){function b(b){return b.name+\"=\"+(isNaN(Number(b.value))?'\"'+b.value+'\"':b.value)}var c=\"#\"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0c.length||\"data\"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(\":\").split(\",\");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(\",\"));d=d.split(\";\");var e=null;1w.Pc&&(w.stream.presentationTimeOffset=-x,w.Mb.offset(x))}else for(b.b.ta(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset=\nh,A.Mb.offset(-h),Sf(A.Mb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}\nfunction dh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.l){case 1:return f=Jg,g=td,h=c.a,k=f.hb(c.a,\"EXT-X-MEDIA\"),l=k.filter(function(b){return\"SUBTITLES\"==fh(b,\"TYPE\")}.bind(b)),m=l.map(function(b){return gh(this,b)}.bind(b)),n=k.filter(function(b){return\"CLOSED-CAPTIONS\"==fh(b,\"TYPE\")}),hh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.hb(h,\"EXT-X-STREAM-INF\"),w=x.map(function(b){return ih(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=\ne.s,C=A.reduce(g.uc,[]),C=C.filter(function(b){return null!=b}),e[\"return\"]({startTime:0,variants:C,textStreams:q})}})})}\nfunction ih(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb,fb;return y(f,function(f){switch(f.l){case 1:g=wd;h=Jg;k=Hg(c,\"CODECS\",\"avc1.42E01E,mp4a.40.2\");l=jh(k.split(/\\s*,\\s*/));m=c.getAttribute(\"RESOLUTION\");q=n=null;x=Hg(c,\"FRAME-RATE\");w=Number(fh(c,\"BANDWIDTH\"));m&&(A=m.value.split(\"x\"),n=A[0],q=A[1]);C=h.hb(d.a,\"EXT-X-MEDIA\");C=C.filter(function(b){return\"CLOSED-CAPTIONS\"!=fh(b,\"TYPE\")});C=C.filter(function(b){var c=Hg(b,\"URI\")||\"\";return\"SUBTITLES\"==\n(Hg(b,\"TYPE\")||\"\")||\"\"!=c});E=Hg(c,\"AUDIO\");F=Hg(c,\"VIDEO\");E?C=h.Cc(C,\"AUDIO\",E):F&&(C=h.Cc(C,\"VIDEO\",F));if(V=kh(g.na,l)){if(Y=Hg(c,\"SUBTITLES\"))wa=h.Cc(C,\"SUBTITLES\",Y),wa.length&&(Ba=b.C.get(wa[0].id),Ba.stream.codecs=V);Kb(l,V)}ba=C.map(function(b){return lh(this,b,l)}.bind(b));na=[];xa=[];return u(f,Promise.all(ba),2);case 2:Va=f.s;Va=Va.filter(function(b){return null!=b});E?na=Va:F&&(xa=Va);vb=!1;na.length||xa.length?na.length?(eb=fh(c,\"URI\"),fb=na[0].pc,eb==fb?(Ca=g.wb,vb=!0):Ca=g.La):Ca=\ng.wb:1==l.length?(Ia=kh(g.La,l),Ca=m||x||Ia?g.La:g.wb):(Ca=g.La,l=[l.join(\",\")]);if(vb){f.A(3);break}return u(f,mh(b,c,l,Ca),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.wb?na=[ja]:xa=[ja];else if(null===ja)return f[\"return\"]([]);xa&&nh(xa);na&&nh(na);return f[\"return\"](oh(b,na,xa,w,n,q,x))}})})}function nh(b){b.forEach(function(b){var c=b.stream.codecs.split(\",\");c=c.filter(function(b){return\"mp4a.40.34\"!=b});b.stream.codecs=c.join(\",\")})}\nfunction oh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.pc:\"\")+\" - \"+(l?l.pc:\"\");var C=void 0;if(n&&x)if(w.length&&A.length?0>4,0!=e&&2!=e||c(),3==e&&(e=b.ha(),b.J(e)),1!=b.D()>>8)b.seek(d+188),e=b.ha(),71!=e&&(b.seek(d+192),e=b.ha()),71!=e&&(b.seek(d+204),e=b.ha()),71!=e&&c(),b.Wd(1);else return b.J(3),d=b.ha()>>6,0!=d&&1!=d||c(),0==b.ha()&&c(),d=b.ha(),e=b.Jb(),b=b.Jb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}\nfunction Dh(b,c,d){b=ic(b,c);if(!Wd(b))return 0;c=new Ud(null);Xd(c,b);return c.Gc(d)}function jh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=lc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function kh(b,c){for(var d=Eh[b],e=0;ef-.5)){c=!0;break a}}c=!1}return c};function Zh(b,c,d,e,f){var g=this;this.b=b;this.w=c;this.v=d;this.m=f;this.g=new ac;this.j=!1;this.o=b.readyState;this.f=!1;this.c=e;this.i=!1;L(this.g,b,\"waiting\",function(){return $h(g)});this.h=(new B(function(){$h(g)})).Ia(.25)}Zh.prototype.a=function(){this.g&&(this.g.a(),this.g=null);null!=this.h&&(this.h.stop(),this.h=null);this.c&&(this.c.a(),this.c=null);this.b=this.w=this.m=null};Zh.prototype.Uc=function(){this.i=!0;$h(this)};\nfunction $h(b){if(0!=b.b.readyState){if(b.b.seeking){if(!b.j)return}else b.j=!1;if(!b.b.paused){b.b.readyState!=b.o&&(b.f=!1,b.o=b.b.readyState);var c=b.v.smallGapLimit,d=b.b.currentTime,e=b.b.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=pc(\"Edge/\")||pc(\"Trident/\")||pc(\"Tizen\")||pc(\"CrKey\")?.5:.1;for(var g=0;gd&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.c){b=b.c;d=b.g;e=Wh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.c!=\nd||b.h!=e)b.f=f,b.c=d,b.h=e;d=f-b.f;d>=b.i&&e&&b.b(b.c,d)}}else if(0!=f||b.i){g=e.start(f);var h=b.w.wa();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.f||(b.f=!0,d=new I(\"largegap\",{currentTime:d,gapSize:h}),d.cancelable=!0,b.m(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.b.currentTime=g)}}}}};function ai(b){var c=this;this.f=b;this.b=new Set;this.c=(new B(function(){bi(c,!1)})).Ia(.25)}ai.prototype.a=function(){this.c.stop();for(var b=r(this.b),c=b.next();!c.done;c=b.next())c.value.a();this.b.clear()};function bi(b,c){for(var d=r(b.b),e=d.next();!e.done;e=d.next())e.value.h(b.f.currentTime,c)};function ci(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function di(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function ei(b){this.f=b;this.b=null;this.c=function(){}}ei.prototype.a=function(){this.b=this.f=null;this.c=function(){}};ei.prototype.h=function(b){var c=this.b,d=this.f.periods;b=di(d,b)||d[0];c!=b&&this.c(b);this.b=b};function fi(b,c){b.c=c};function gi(b){var c=this;this.b=b;this.g=!1;this.f=this.b.cc();this.c=new B(function(){c.b.Ed(.25*c.f)})}gi.prototype.a=function(){this.c&&(this.c.stop(),this.c=null);this.b=null};gi.prototype.set=function(b){this.f=b;hi(this)};function hi(b){b.c.stop();var c=b.g?0:b.f;0<=c?b.b.cc()!=c&&b.b.ed(c):(b.c.Ia(.25),0!=b.b.cc()&&b.b.ed(0))};function ii(b,c,d){this.b=b;this.g=c;this.h=d;this.c=new ac;this.f=new ji(b);0Math.abs(b.b.currentTime-c)?ni(b):(dc(b.c,b.b,\"seeking\",function(){ni(b)}),oi(b.f,0==b.b.currentTime?c:b.b.currentTime))}function ni(b){L(b.c,b.b,\"seeking\",function(){return b.g()})}function ji(b){var c=this;this.c=b;this.i=10;this.h=this.g=this.f=0;this.b=new B(function(){0>=c.f?c.b.stop():c.c.currentTime!=c.g?c.b.stop():(c.c.currentTime=c.h,c.f--)})}ji.prototype.a=function(){this.b&&(this.b.stop(),this.b=null);this.c=null};\nfunction oi(b,c){b.g=b.c.currentTime;b.h=c;b.f=b.i;b.c.currentTime=c;b.b.Ia(.1)};function pi(b){function c(){d.g=!0;null!=d.c&&(d.b.currentTime=d.c)}var d=this;this.b=b;this.g=!1;this.c=null;this.f=new ac;0==this.b.readyState?dc(this.f,this.b,\"loadedmetadata\",c):c()}pi.prototype.a=function(){this.f&&(this.f.a(),this.f=null);this.b=null};pi.prototype.o=function(b){this.c=this.g?this.c:b};pi.prototype.i=function(){return(this.g?this.b.currentTime:this.c)||0};pi.prototype.v=function(){};\nfunction qi(b,c,d,e,f,g){var h=this;this.c=b;this.b=c.presentationTimeline;this.C=c.minBufferTime||0;this.h=d;this.w=f;this.m=null;this.g=new Zh(b,c.presentationTimeline,d,ri(b,d),g);this.f=new ii(b,function(){a:{var b=h.g;b.j=!0;b.i=!1;b.f=!1;var c=mi(h.f);b=si(h,c);if(.001d-c&&(c=d-3);bb.b.Y()?b.b.ib():b.b.wa():0>c&&(c=b.b.wa()+c);return vi(b,ui(b,c))}qi.prototype.v=function(){this.g.Uc()};function vi(b,c){var d=b.b.Y();return c>=d?d-b.h.durationBackoff:c}function si(b,c){var d=qd.bind(null,b.c.buffered),e=Math.max(b.C,b.h.rebufferingGoal),f=b.h.safeSeekOffset,g=b.b.ib(),h=b.b.wa(),k=b.b.Y();3>h-g&&(g=h-3);var l=b.b.Cb(e),m=b.b.Cb(f);e=b.b.Cb(e+f);return c>=k?vi(b,c):c>h?h:c=l||d(c)?c:e}\nfunction ui(b,c){var d=b.b.ib();if(cd?d:c}function ri(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Vh(new Yh(b),c.stallThreshold);Xh(e,function(){b.currentTime+=d});return e};function wi(){this.c=function(){};this.b=new Set}wi.prototype.a=function(){this.c=function(){};this.b.clear()};function xi(b,c){b.c=c};function yi(b){var c=this;this.i=b;this.g=new Map;this.b=function(){};this.c=function(){};this.f=function(){};this.j=[{Za:null,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Ai,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Bi,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:zi,Ya:Ai,Sa:function(b,e){return c.c(b,e)}},{Za:zi,Ya:Bi,Sa:function(b,e){return c.c(b,e)}},{Za:Ai,Ya:Bi,Sa:function(b,e){return c.f(b,e)}},{Za:Bi,Ya:Ai,Sa:function(b,e){return c.f(b,e)}}]}\nyi.prototype.a=function(){this.i=null;this.g.clear();this.b=function(){};this.c=function(){};this.f=function(){}};yi.prototype.h=function(b,c){for(var d=r(this.i.b),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.g.get(e),g=be.endTime?Bi:zi;this.g.set(e,g);for(var h=r(this.j),k=h.next();!k.done;k=h.next())k=k.value,k.Za==f&&k.Ya==g&&k.Sa(e,c)}};function Ci(b,c,d,e){b.b=c;b.c=d;b.f=e}var Ai=1,zi=2,Bi=3;function Di(b,c){this.a=c;this.c=b;this.g=null;this.j=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.F=null;this.C=this.f=this.m=!1;this.w=0}Di.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Ei(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};\nDi.prototype.configure=function(b){this.g=b;this.F=new tb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};\nDi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.l){case 1:return e=b.a.Qa(),f=Fi(b,e),g=b.a.Hd(b.c.periods[f]),g.variant||g.text?u(d,Gi(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d[\"return\"](new D(2,5,5005));case 2:if(b.f)return d[\"return\"]();b.a&&b.a.bf&&b.a.bf();v(d)}})})};function Hi(b){return Ii(b,\"audio\")}function Ji(b){return Ii(b,\"video\")}\nfunction Ii(b,c){var d=b.b.get(c);return d?d.Fa||d.stream:null}function Ki(b,c){return t(function e(){var f,g,h,k,l,m,n,q;return y(e,function(e){switch(e.l){case 1:return f=wd,u(e,je(b.a.L,f.na),2);case 2:return b.w++,b.C=!1,g=b.w,h=b.a.L,k=new Map,l=new Set,k.set(f.na,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e[\"return\"]():u(e,Li(b,l),4);case 4:if(b.f)return e[\"return\"]();b.w!=g||b.b.has(f.na)||b.C||(m=b.a.Qa(),n=Fi(b,m),q=Mi(c,n,0),b.b.set(f.na,q),Ni(b,q,0));v(e)}})})}\nfunction Oi(b,c){var d=b.b.get(\"video\");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Fa&&(Pi(b,f,!1,0),d.Fa=e)}else if(e=d.Fa)d.Fa=null,Pi(b,e,!0,0)}}function Qi(b,c,d,e){c.video&&Pi(b,c.video,d,e);c.audio&&Pi(b,c.audio,d,e)}\nfunction Pi(b,c,d,e){var f=b.b.get(c.type);if(!f&&\"text\"==c.type&&b.g.ignoreTextStreamFailures)Ki(b,c);else if(f){var g=Ri(b,c);if(d&&g!=f.ya)b.b.forEach(function(c){Si(b,c)});else{f.Fa&&(c.trickModeVideo?(f.Fa=c,c=c.trickModeVideo):f.Fa=null);var h=b.h[g];h&&h.vb&&(h=b.i.get(c.id))&&h.vb&&f.stream!=c&&(\"text\"==c.type&&ce(b.a.L,ic(c.mimeType,c.codecs)),f.stream=c,f.ec=!0,Ti(b,f,g)&&f.Hb.abort(),d&&(f.Na?f.qc=!0:f.Ea?(f.Ja=!0,f.Wb=e,f.qc=!0):(Ei(f),Ui(b,f,!0,e))))}}}\nfunction Ti(b,c,d){if(!c.Hb)return!1;var e=b.a.Qa(),f=fe(b.a.L,c.type);b=(b=Vi(b,c,e,f,d))?b.a?b.a-b.b:null:null;if(null==b)return!1;(d=c.stream.initSegmentReference)&&(b+=(d.a?d.a-d.b:null)||0);return c.Hb.b.a>b}\nfunction Wi(b){function c(c){var f=b.a.L;\"text\"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&dc?b.a.L.ta(c):b.a.L.ta(Math.pow(2,32))}\nfunction Zi(b,c){if(!b.f&&!c.Ea&&null!=c.Ba&&!c.Na)if(c.Ba=null,c.Ja)Ui(b,c,c.qc,c.Wb);else{try{var d=$i(b,c);null!=d&&(Ni(b,c,d),c.Eb=!1)}catch(e){aj(b,e);return}d=Array.from(b.b.values());bj(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.L.endOfStream().then(function(){if(!this.f){var b=this.a.L.Y();b=b.c.presentationTimeline.Y())return c.endOfStream=!0,\"video\"==c.type&&(f=b.b.get(\"text\"))&&\"application/cea-608\"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.ya=h;if(h!=g)return null;\nif(k>=l)return.5;h=fe(b.a.L,c.type);h=Vi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=cj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.Vd=0;dj(b,c,e,g,h);return null}function cj(b,c,d){if(!c.lb||!c.xa)return Math.max(d,c.Vd);d=Ri(b,c.lb);return b.c.periods[d].startTime+c.xa.endTime}\nfunction Vi(b,c,d,e,f){if(c.xa&&c.stream==c.lb)return ej(b,c,f,c.xa.position+1);c.xa?(d=Ri(b,c.lb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.xa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=ej(b,c,f,Math.max(0,d-1)));return g||ej(b,c,f,d)}\nfunction ej(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Db();e=e.jb();return d.startTime+c.endTimee?null:c}\nfunction dj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=fj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ea=!0;c.ec=!1;k=gj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return hj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ea=!1,c.Yc=!1,c.Ja||this.a.Uc(),Ni(this,c,0),ij(this,h))}.bind(b))[\"catch\"](function(b){this.f||this.m||(c.Ea=!1,\"text\"==c.type&&this.g.ignoreTextStreamFailures?this.b[\"delete\"](\"text\"):\n7001==b.code?(c.Ea=!1,c.Ba=null,Ni(this,c,0)):3017==b.code?jj(this,c,b):(c.Eb=!0,b.severity=2,aj(this,b)))}.bind(b))}function jj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Yc})){var e=Math.round(100*b.j);if(20=d?Promise.resolve():b.a.L.remove(c.type,f,f+d).then(function(){}.bind(b))}\nfunction ij(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||\"text\"!=d[0].type)b.o=d.every(function(b){return\"text\"==b.type?!0:!b.Ja&&!b.Na&&b.xa});if(b.o){d=Ri(b,c);b.h[d]||Yi(b,d).then(function(){this.f||this.a.Gd()}.bind(b))[\"catch\"](td.Gb);for(d=0;d=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b[\"x-shaka-from-cache\"]};f=null;try{f=xc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function nj(b,c,d,e){var f=new nj.b;gc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new nj.a,h={pd:!1,ce:!1};b=nj.h(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?\"include\":void 0},h,e);b=new H(b,function(){h.pd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.ce=!0;g.abort()});k.O(c/1E3);b[\"finally\"](function(){k.stop()})}return b}z(\"shaka.net.HttpFetchPlugin\",nj);\nnj.h=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,wa;return y(h,function(h){switch(h.l){case 1:return k=nj.g,l=nj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get(\"Content-Length\"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.l){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Aa(h,3);break;case 2:return Da(h),h[\"return\"]();case 3:d.done||(q+=d.value.byteLength);\ne=Date.now();if(100c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f),\nf.A(3)}})})};U.Kb(\"application/x-offline-manifest\",kk);function lk(b){var c=ck(b);return c&&\"manifest\"==c.a?lk.a(b):c&&\"segment\"==c.a?lk.b(c.key(),c):Ab(new D(2,1,9004,b))}z(\"shaka.offline.OfflineScheme\",lk);lk.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{\"content-type\":\"application/x-offline-manifest\"}};return Cb(b)};lk.b=function(b,c){var d=new Cj;return Cb(void 0).T(function(){return d.init()}).T(function(){return Gj(d,c.ra(),c.$())}).T(function(b){return b.getSegments([c.key()])}).T(function(b){return{uri:c,data:b[0].data,headers:{}}})[\"finally\"](function(){return d.destroy()})};\nRb(\"offline\",lk);function mk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.l){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,nk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=ok(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f[\"return\"](g)}})})}\nfunction ok(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.l){case 1:return g=new Gc({nb:c,onError:function(){},gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Oc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f[\"return\"]([]);case 3:return ya(f,6),u(f,Vc(g),8);case 8:Aa(f,7);break;case 6:return Da(f),\nu(f,g.destroy(),9);case 9:return f[\"return\"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.l){case 1:return ya(c,2),u(c,Yc(g,b),4);case 4:h.push(b);Aa(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f[\"return\"](h)}})})}\nfunction nk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Mb(b.audioCapabilities,c.audioCapabilities,d)&&Mb(b.videoCapabilities,c.videoCapabilities,d)};function pk(b,c){var d=qk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.j=!0;this.m=Promise.resolve().then(function(){return rk(e)})}pk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return b.j=!1,b.b&&b.b.abort(),sk(b),u(d,b.m,2);case 2:b.a&&b.a.qa.Ua();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.qa.Ua();b.a=null;b.f=[];b.g=null;v(d)}})})};\nfunction tk(b,c){var d={pb:function(){},fc:function(){},Ua:function(){},onError:function(){},hc:function(){},rg:function(){}};b.f.push({create:c,qa:d});b.b&&b.b.abort();sk(b);return d}\nfunction rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:if(b.j){if(0==b.f.length||b.a&&!b.a.Ra)var e=!1;else{b.a&&(b.a.qa.Ua(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.qa.pb(),b.a={node:g.node,payload:g.payload,Ra:g.Ra,qa:e.qa}):e.qa.hc();e=!0}e?e=Promise.resolve():b.a?e=uk(b):(b.g.af(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})}\nfunction uk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return b.c=b.g.Ke(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ue(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.qa.fc(),b.a=null);Aa(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.qa.Ua();else b.a.qa.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function sk(b){b.h&&(b.h.resolve(),b.h=null)};function vk(b){this.a=null;for(var c=0;cb});return!0};vk.prototype.remove=vk.prototype.remove;\nvk.prototype.append=function(b){for(var c=xk,d=[],e=0;e=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}\"center\"==b.textAlign&&\"center\"!=c.align&&(c.align=\"middle\");\"vertical-lr\"==b.writingMode?c.vertical=\"lr\":\"vertical-rl\"==b.writingMode&&(c.vertical=\"rl\");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}\nfunction wk(b,c){var d=b.mode;b.mode=\"showing\"==d?\"showing\":\"hidden\";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function yk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+\".\"+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Ib(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Ib(m)),l=yk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z(\"shaka.util.ConfigUtils.mergeConfigObjects\",yk);function zk(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:ub(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:ub(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:\"\",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:ub(),\nfailureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};pc(\"Web0S\")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,\nswitchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:\"\",preferredTextLanguage:\"\",preferredVariantRole:\"\",preferredTextRole:\"\",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,\ntextDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Ak(b,h.preferredAudioLanguage)};return h}function Bk(b,c,d){var e={\".drm.servers\":\"\",\".drm.clearKeys\":\"\",\".drm.advanced\":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:\"\",audioRobustness:\"\",serverCertificate:new Uint8Array(0),individualizationServer:\"\"}};return yk(b,c,d||zk(),e,\"\")}\nfunction Ak(b,c){var d=b.filter(function(b){return\"variant\"==b.type}),e=[],f=re(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/\n2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,\"text\"==h.type&&d.push(h);return d};function Ck(){this.a=null;this.b=[]}function Dk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Ek(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}\nfunction Fk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Gk(){this.b=this.c=null;this.a=[]}function Hk(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:\"text\",fromAdaptation:d,bandwidth:null}))};function Ik(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN;this.a=new Ck;this.b=new Gk};function X(b,c){var d=this;J.call(this);this.g=Jk;this.a=null;this.$a=!1;this.i=new ac;this.rc=this.j=this.xb=this.b=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.F=this.h=this.N=null;this.Ad=1E9;this.Tb=new Set;this.eb=!0;this.ka=null;this.yd=!1;this.wd=0;this.ja=null;this.C=new Gh;this.c=Kk(this);this.Ub={width:Infinity,height:Infinity};this.v=null;this.Rb=new Ph(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount);this.Ka=this.c.preferredTextLanguage;\nthis.yb=this.c.preferredTextRole;c&&c(this);this.N=Lk(this);L(this.i,window,\"online\",function(){d.ad()});this.w={name:\"detach\"};this.S={name:\"attach\"};this.Ca={name:\"unload\"};this.yc={name:\"manifest-parser\"};this.xc={name:\"manifest\"};this.ab={name:\"media-source\"};this.sc={name:\"drm-engine\"};this.W={name:\"load\"};this.Ac={name:\"src-equals-drm-engine\"};this.cb={name:\"src-equals\"};var e=new Map;e.set(this.S,function(b,c){return Db(Mk(d,b,c))});e.set(this.w,function(b){b.u&&(d.i.ma(b.u,\"error\"),b.u=null);\nd.a=null;b=Promise.resolve();return Db(b)});e.set(this.Ca,function(b){return Db(Nk(d,b))});e.set(this.ab,function(b){b=Ok(d,b);return Db(b)});e.set(this.yc,function(b,c){var e=Pk(d,b,c);return Db(e)});e.set(this.xc,function(b){return Qk(d,b)});e.set(this.sc,function(){var b=Rk(d);return Db(b)});e.set(this.W,function(b,c){return Db(Sk(d,b,c))});e.set(this.Ac,function(b){b=Tk(d,b);return Db(b)});e.set(this.cb,function(b,c){return Uk(d,b,c)});this.fb=new pk(this.w,{Ke:function(b,c,e,k){var f=null;b==\nd.w&&(f=e==d.w?d.w:d.S);b==d.S&&(f=e==d.w||c.u!=k.u?d.w:e==d.S?d.S:e==d.ab||e==d.W?d.ab:e==d.cb?d.Ac:null);b==d.ab&&(f=e==d.W&&c.u==k.u?d.yc:d.Ca);b==d.yc&&(f=Vk(d.W,d.xc,d.Ca,e,c,k));b==d.xc&&(f=Vk(d.W,d.sc,d.Ca,e,c,k));b==d.sc&&(f=Vk(d.W,d.W,d.Ca,e,c,k));b==d.Ac&&(f=e==d.cb&&c.u==k.u?d.cb:d.Ca);if(b==d.W||b==d.cb)f=d.Ca;b==d.Ca&&(f=k.u&&c.u==k.u?d.S:d.w);return f},ue:function(b,c,h){d.dispatchEvent(new I(\"onstatechange\",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,\nfunction(c){switch(c.l){case 1:return u(c,Nk(d,b),2);case 2:return c[\"return\"](b.u?d.S:d.w)}})})},af:function(b){d.dispatchEvent(new I(\"onstateidle\",{state:b.name}))}});b&&this.zb(b,!0)}Ta(X,J);z(\"shaka.Player\",X);\nX.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:if(b.g==Wk)return d[\"return\"]();b.g=Wk;e=tk(b.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});return u(d,new Promise(function(b){e.pb=function(){};e.fc=function(){b()};e.Ua=function(){b()};e.onError=function(){b()};e.hc=function(){b()}}),2);case 2:return u(d,b.fb.destroy(),3);case 3:b.i&&(b.i.a(),b.i=null);b.rc=null;b.j=null;b.c=null;if(!b.N){d.A(0);break}return u(d,b.N.destroy(),5);\ncase 5:b.N=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version=\"v2.5.0\";var Xk=[\"2\",\"5\"];Le=new function(b){this.a=b;this.c=Me;this.b=Ne}(new Je(Number(Xk[0]),Number(Xk[1])));var Yk=[\"output-restricted\",\"internal-error\"],Zk={};X.registerSupportPlugin=function(b,c){Zk[b]=c};\nX.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?mc()?!0:nc(\"application/x-mpegurl\"):!1};\nX.probeSupport=function(){return jd().then(function(b){for(var c=U.vf(),d={},e=r('video/mp4; codecs=\"avc1.42E01E\",video/mp4; codecs=\"avc3.42E01E\",video/mp4; codecs=\"hev1.1.6.L93.90\",video/mp4; codecs=\"hvc1.1.6.L93.90\",video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"vp9\",video/mp4; codecs=\"vp09.00.10.08\",audio/mp4; codecs=\"mp4a.40.2\",audio/mp4; codecs=\"ac-3\",audio/mp4; codecs=\"ec-3\",audio/mp4; codecs=\"opus\",audio/mp4; codecs=\"flac\",video/webm; codecs=\"vp8\",video/webm; codecs=\"vp9\",video/webm; codecs=\"vp09.00.10.08\",audio/webm; codecs=\"vorbis\",audio/webm; codecs=\"opus\",video/mp2t; codecs=\"avc1.42E01E\",video/mp2t; codecs=\"avc3.42E01E\",video/mp2t; codecs=\"hvc1.1.6.L93.90\",video/mp2t; codecs=\"mp4a.40.2\",video/mp2t; codecs=\"ac-3\",video/mp2t; codecs=\"ec-3\",text/vtt,application/mp4; codecs=\"wvtt\",application/ttml+xml,application/mp4; codecs=\"stpp\"'.split(\",\")),f=\ne.next();!f.done;f=e.next()){f=f.value;d[f]=mc()?Wd(f)?!0:MediaSource.isTypeSupported(f)||zd(f):nc(f);var g=f.split(\";\")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in Zk)b[h]=Zk[h]();return b})};X.prototype.zb=function(b,c){c=void 0===c?!0:c;if(this.g==Wk)return Promise.reject($k());var d=qk();d.u=b;mc()||(c=!1);var e=c?this.ab:this.S,f=tk(this.fb,function(){return{node:e,payload:d,Ra:!1}});f.pb=function(){};return al(f)};X.prototype.attach=X.prototype.zb;\nX.prototype.detach=function(){var b=this;if(this.g==Wk)return Promise.reject($k());var c=tk(this.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});c.pb=function(){};return al(c)};X.prototype.detach=X.prototype.detach;X.prototype.ld=function(b){var c=this;b=void 0===b?!0:b;if(this.g==Wk)return Promise.reject($k());mc()||(b=!1);var d=qk(),e=tk(this.fb,function(e){var f=e.u&&b?c.ab:e.u?c.S:c.w;d.u=e.u;return{node:f,payload:d,Ra:!1}});e.pb=function(){};return al(e)};X.prototype.unload=X.prototype.ld;\nX.prototype.load=function(b,c,d){if(this.g==Wk)return Promise.reject($k());this.dispatchEvent(new I(\"loading\"));var e=qk();e.uri=b;e.hd=Date.now()/1E3;d&&\"string\"!=typeof d&&(Ke(\"Loading with a manifest parser factory\",\"Please register a manifest parser and for the mime-type.\"),e.va=function(){return new d});d&&\"string\"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=bl(e)?this.cb:this.W,g=tk(this.fb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ra:!0}});g.pb=function(){};\nreturn new Promise(function(b,c){g.hc=function(){return c(new D(2,7,7002))};g.fc=function(){return b()};g.Ua=function(){return c($k())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;\nfunction bl(b){if(b.va)return!1;if(!mc())return!0;var c=b.mimeType;b=b.uri||\"\";c||(c={mp4:\"video/mp4\",m4v:\"video/mp4\",m4a:\"audio/mp4\",webm:\"video/webm\",ts:\"video/mp2t\",m3u8:\"application/x-mpegurl\",mp3:\"audio/mpeg\",aac:\"audio/aac\",flac:\"audio/flac\"}[U.getExtension(b)]);return c?nc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes(\"Apple\"):!0:!1:!1}function Mk(b,c,d){null==c.u&&(c.u=d.u,L(b.i,c.u,\"error\",function(){var c=cl(b);c&&b.Ha(c)}));b.a=c.u;return Promise.resolve()}\nfunction Nk(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:b.g!=Wk&&(b.g=Jk);b.dispatchEvent(new I(\"unloading\"));c.currentTime=null;c.va=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ma(c.u,\"loadeddata\"),b.i.ma(c.u,\"playing\"),b.i.ma(c.u,\"pause\"),b.i.ma(c.u,\"ended\"),b.i.ma(c.u,\"ratechange\"));b.bb&&(b.bb.a(),b.bb=null);b.Qb&&(b.Qb.stop(),b.Qb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.j){e.A(4);break}return u(e,b.j.stop(),4);\ncase 4:if(!b.f){e.A(6);break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.a(),b.o=null);if(!b.F){e.A(8);break}return u(e,b.F.destroy(),9);case 9:b.F=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute(\"src\"),c.u.load());if(!b.h){e.A(10);break}return u(e,b.h.destroy(),11);case 11:b.h=null;case 10:b.C.a.clear(),b.xb=null,b.V=null,b.Tb.clear(),b.b=null,b.v=null,b.eb=!0,dl(b),v(e)}})})}\nfunction Ok(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.l){case 1:return f=window.muxjs?new nd:new od,g=b.c.textDisplayFactory,h=new g,k=new $d(c.u,f,h),u(e,k.o,2);case 2:b.F=k,v(e)}})})}\nfunction Pk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:c.va=d.va;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.N;b.xb=g;if(c.va){b.m=c.va();f.A(2);break}k=b;return u(f,U.create(g,h,b.c.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.c.manifest),v(f)}})})}\nfunction Qk(b,c){var d=c.uri,e=b.N;b.Pb=new wi;xi(b.Pb,function(c){el(b,\"timelineregionadded\",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Bc(c)},filterAllPeriods:function(c){return fl(b,c)},onTimelineRegionAdded:function(c){var d=b.Pb;a:{var e=r(d.b);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.b.add(c),d.c(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ha(c)}};\nreturn new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.l){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.b=e.s;b.dispatchEvent(new I(\"manifestparsed\"));if(0==b.b.periods.length)throw new D(2,4,4014);gl(b.b.periods);v(e)}})})}),function(){return b.m.stop()})}\nfunction Rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:return b.h=new Gc({nb:b.N,onError:function(d){b.Ha(d)},gc:function(d){hl(b,d)},onExpirationUpdated:function(d,e){il(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.h.configure(b.c.drm),u(d,Nc(b.h,ci(b.b.periods),b.b.offlineSessionIds),2);case 2:fl(b,b.b.periods),v(d)}})})}\nfunction Sk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.l){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.xb=h,b.v=new Ik,k=function(){return jl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.K.set(c)},L(b.i,g,\"playing\",k),L(b.i,g,\"pause\",k),L(b.i,g,\"ended\",k),L(b.i,g,\"ratechange\",l),m=b.c.abrFactory,b.j&&b.rc==m||(b.rc=m,b.j=new m,b.j.configure(b.c.abr)),kl(b,b.b.periods),b.Rb=new Ph(b.c.preferredAudioLanguage,b.c.preferredVariantRole,b.c.preferredAudioChannelCount),\nb.Ka=b.c.preferredTextLanguage,ll(b.b.presentationTimeline,b.c.playRangeStart,b.c.playRangeEnd),u(f,b.h.zb(g),2);case 2:return b.j.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.b.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ml(b,g,c,!0);b.f&&(Qi(b.f,c,d,f),nl(b))}),b.o=ol(b,c.startTime),b.bb=pl(b),b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}}),\nn=Math.max(b.b.minBufferTime,b.c.streaming.rebufferingGoal),ql(b,n),b.f=rl(b),b.f.configure(b.c.streaming),sl(b),b.g=tl,b.dispatchEvent(new I(\"streaming\")),u(f,b.f.start(),3);case 3:b.c.streaming.startAtSegmentBoundary&&(q=b.o.i(),x=ul(b,q),b.o.o(x)),b.b.periods.forEach(b.Bc.bind(b)),vl(b),nl(b),w=wl(b),w.variants.some(function(b){return b.primary}),xl(b,w.variants),dc(b.i,g,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd}),v(f)}})})}\nfunction Tk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.l){case 1:return f=wd,b.h=new Gc({nb:b.N,onError:function(c){b.Ha(c)},gc:function(c){hl(b,c)},onExpirationUpdated:function(c,e){il(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.h.configure(b.c.drm),g={id:0,language:\"und\",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,\npresentationTimeOffset:0,mimeType:\"video/mp4\",codecs:\"\",encrypted:!0,keyId:null,language:\"und\",label:null,type:f.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Nc(b.h,[g],[]),2);case 2:return u(e,b.h.zb(c.u),0)}})})}\nfunction Uk(b,c,d){function e(){return jl(b)}c.uri=d.uri;c.startTime=d.startTime;b.xb=c.uri;b.v=new Ik;b.o=new pi(c.u);null!=c.startTime&&b.o.o(c.startTime);b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}});ql(b,b.c.streaming.rebufferingGoal);L(b.i,c.u,\"playing\",e);L(b.i,c.u,\"pause\",e);L(b.i,c.u,\"ended\",e);dc(b.i,c.u,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd});b.a.audioTracks&&(L(b.i,b.a.audioTracks,\"addtrack\",function(){return vl(b)}),\nL(b.i,b.a.audioTracks,\"removetrack\",function(){return vl(b)}));if(b.a.textTracks){var f=b.a.textTracks;L(b.i,f,\"addtrack\",function(){return vl(b)});L(b.i,f,\"removetrack\",function(){return vl(b)})}c.u.src=c.uri;b.g=yl;b.dispatchEvent(new I(\"streaming\"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(cl(b)):(dc(b.i,b.a,\"loadeddata\",function(){g.resolve()}),dc(b.i,b.a,\"error\",function(){g.reject(cl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));\nreturn Promise.resolve()})}function gl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(\",\")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}\nfunction sl(b){function c(b){var c=\"\";b.video&&(c=lc(b.video.codecs)[0]);var d=\"\";b.audio&&(d=lc(b.audio.codecs)[0]);return c+\"-\"+d}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=De(d,b.c.preferredAudioChannelCount);var e=new Hb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h=b.a.duration-.1;break;case tl:a:{var e;(e=b.a.ended)||(e=b.F,e=e.g?\"ended\"==e.g.readyState:!0);if(e)c=!0;else{if(b.b.presentationTimeline.U()&&(e=b.b.presentationTimeline.jb(),pd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=rd(b.a.buffered,b.a.currentTime);e=b.V;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Th:Uh;e.a=f;c!=f&&dl(b)})).Ia(.25)}\nfunction rl(b){return new Di(b.b,{Qa:function(){return b.o.i()},L:b.F,nb:b.N,Hd:b.Ze.bind(b),Gd:b.pe.bind(b),onError:b.Ha.bind(b),onEvent:function(c){return b.dispatchEvent(c)},cf:b.df.bind(b),Uc:b.kf.bind(b)})}\nX.prototype.configure=function(b,c){if(2==arguments.length&&\"string\"==typeof b){for(var d=b,e={},f=e,g=0,h=0;;){g=d.indexOf(\".\",g);if(0>g)break;if(0==g||\"\\\\\"!=d[g-1])h=d.substring(h,g).replace(/\\\\\\./g,\".\"),f[h]={},f=f[h],h=g+1;g+=1}f[d.substring(h).replace(/\\\\\\./g,\".\")]=c;b=e}d=Bk(this.c,b,Kk(this));zl(this);return d};X.prototype.configure=X.prototype.configure;\nfunction zl(b){b.m&&b.m.configure(b.c.manifest);b.h&&b.h.configure(b.c.drm);if(b.f){b.f.configure(b.c.streaming);try{b.b.periods.forEach(b.Bc.bind(b))}catch(f){b.Ha(f)}var c=Hi(b.f),d=Ji(b.f),e=wl(b);c=Ge(c,d,e.variants);b.j&&c&&c.allowedByApplication&&c.allowedByKeySystem?xl(b,e.variants):Al(b,e)}b.j&&(b.j.configure(b.c.abr),b.c.abr.enabled&&!b.eb?b.j.enable():b.j.disable(),Bl(b))}X.prototype.getConfiguration=function(){var b=Kk(this);Bk(b,this.c,Kk(this));return b};\nX.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.Df=function(){for(var b in this.c)delete this.c[b];Bk(this.c,Kk(this),Kk(this));zl(this)};X.prototype.resetConfiguration=X.prototype.Df;X.prototype.Ee=function(){return this.g};X.prototype.getLoadMode=X.prototype.Ee;X.prototype.Ie=function(){return this.a};X.prototype.getMediaElement=X.prototype.Ie;X.prototype.Bb=function(){return this.N};X.prototype.getNetworkingEngine=X.prototype.Bb;X.prototype.$b=function(){return this.xb};\nX.prototype.getAssetUri=X.prototype.$b;X.prototype.He=function(){Ke(\"getManifestUri\",'Please use \"getAssetUri\" instead.');return this.$b()};X.prototype.getManifestUri=X.prototype.He;X.prototype.U=function(){return this.b?this.b.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.U;X.prototype.Ta=function(){return this.b?this.b.presentationTimeline.Ta():!1};X.prototype.isInProgress=X.prototype.Ta;\nX.prototype.We=function(){if(this.b){if(!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.We;X.prototype.Ff=function(){if(this.b){var b=this.b.presentationTimeline;return{start:b.ib(),end:b.wa()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};\nX.prototype.seekRange=X.prototype.Ff;X.prototype.keySystem=function(){return this.h?this.h.keySystem():\"\"};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.h?this.h.a:null};X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.bc=function(){return this.h?this.h.bc():Infinity};X.prototype.getExpiration=X.prototype.bc;X.prototype.Ic=function(){return this.V?this.V.a==Uh:!1};X.prototype.isBuffering=X.prototype.Ic;\nX.prototype.Le=function(){if(this.K){var b=this.K;b=b.g?0:b.f}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Le;X.prototype.ag=function(b){0==b?$a(\"A trick play rate of 0 is unsupported!\"):(this.g==yl&&this.K.set(b),this.g==tl&&(this.K.set(b),Oi(this.f,1=h.b.periods.length?h.b.presentationTimeline.Y():h.b.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Ad++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),\nfindSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||\"\",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Tb.add(E);m.textStreams.push(E);return u(l,Ki(h.f,E),2);case 2:return(F=Ii(h.f,\"text\"))&&Hh(h.C,m,F),h.Tb[\"delete\"](E),Al(h,m),vl(h),l[\"return\"](xe(E))}})})};\nX.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.dd=function(b,c){this.Ub.width=b;this.Ub.height=c};X.prototype.setMaxHardwareResolution=X.prototype.dd;X.prototype.ad=function(){if(this.g==tl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Eb&&(d.Eb=!1,Ni(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.ad;X.prototype.Fe=function(){return this.b};X.prototype.getManifest=X.prototype.Fe;\nX.prototype.Ge=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Ge;function ml(b,c,d,e){Ih(b.C,c).variant=d;b=b.v.b;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:\"variant\",fromAdaptation:e,bandwidth:d.bandwidth}))}function Kk(b){var c=zk();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.ad())};c.textDisplayFactory=function(){return new vk(b.a)};return c}\nfunction kl(b,c){for(var d=0;dd&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}\nfunction hl(b,c){if(b.f){var d=wl(b),e=!1,f=Object.keys(c),g=1==f.length&&\"00\"==f[0];f.length&&d.variants.forEach(function(b){He(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?\"00\":d.keyId],b.allowedByKeySystem=!!d&&!Yk.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Hi(b.f);var h=Ji(b.f);(f=Ge(f,h,d.variants))&&!f.allowedByKeySystem&&Al(b,d);e&&(vl(b),xl(b,d.variants))}}\nfunction il(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I(\"expirationupdated\"))}function ll(b,c,d){0=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=ym(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Am(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&\nk.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}\nfunction Am(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Db();var k=g.id;Bm(g,f,function(f){var l=og(f.c(),f.b,f.a,b.a.streaming.retryParameters);sj(c,k,\nl,Tl(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=og(f.c(),f.b,f.a,b.a.streaming.retryParameters),sj(c,k,f,.5*Ul(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}\nfunction Bm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function km(b){if(b.h.a)throw new D(2,9,7001);}function im(){if(!fm())throw new D(2,9,9E3);}function gm(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e[\"return\"](e.s);case 2:Ea(e),Kb(b.g,c),Fa(e,0)}})})}\nfunction vm(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.l){case 1:return d=new Cj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})};\nfunction um(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.l){case 1:if(!e.drmInfo)return g[\"return\"]();h=Ij(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:tm(e,!1),videoCapabilities:tm(e,!0)}});return u(g,mk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),\n0)}})})}function ym(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function om(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Cm(c.value)}\nfunction Cm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}Zk.offline=fm;z(\"shaka.polyfill.installAll\",function(){for(var b=0;b=c.a.length)return b;for(var d=[],e=0;ed.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n get seekRange() {\n return this.shakaPlayerInstance.seekRange()\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n get dvrEnabled() {\n return this._duration >= this._minDvrSize && this.getPlaybackType() === 'live'\n }\n\n getDuration() {\n return this._duration\n }\n\n get _duration() {\n if (!this.shakaPlayerInstance) return 0\n\n return this.seekRange.end - this.seekRange.start\n }\n\n getCurrentTime() {\n return this.shakaPlayerInstance.getMediaElement().currentTime - this.seekRange.start\n }\n\n get _startTime() {\n return this.seekRange.start\n }\n\n get presentationTimeline() {\n return this.shakaPlayerInstance.getManifest().presentationTimeline\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n\n this._minDvrSize = typeof (this.options.shakaMinimumDvrSize) === 'undefined' ? 60 : this.options.shakaMinimumDvrSize\n }\n\n getProgramDateTime() {\n return new Date((this.presentationTimeline.getPresentationStartTime() + this.seekRange.start) * 1000)\n }\n\n _updateDvr(status) {\n this.trigger(Events.PLAYBACK_DVR, status)\n this.trigger(Events.PLAYBACK_STATS_ADD, { 'dvr': status })\n }\n\n seek(time) {\n if (time < 0) {\n Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.')\n time = this._duration\n }\n // assume live if time within 3 seconds of end of stream\n this.dvrEnabled && this._updateDvr(time < this._duration-3)\n time += this._startTime\n super.seek(time)\n }\n\n pause() {\n super.pause()\n\n if (this.dvrEnabled)\n this._updateDvr(true)\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n this._startTimeUpdateTimer()\n }\n\n _startTimeUpdateTimer() {\n this._timeUpdateTimer = setInterval(() => {\n this._onTimeUpdate()\n }, 100)\n }\n\n _stopTimeUpdateTimer() {\n clearInterval(this._timeUpdateTimer)\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type)\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._player.setTextTrackVisibility(true)\n this._enableShakaTextTrack(true)\n } else {\n this._player.setTextTrackVisibility(false)\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onTimeUpdate() {\n if (!this.shakaPlayerInstance) return\n\n let update = {\n current: this.getCurrentTime(),\n total: this.getDuration(),\n firstFragDateTime: this.getProgramDateTime()\n }\n let isSame = this._lastTimeUpdate && (\n update.current === this._lastTimeUpdate.current &&\n update.total === this._lastTimeUpdate.total)\n if (isSame)\n return\n\n this._lastTimeUpdate = update\n this.trigger(Events.PLAYBACK_TIMEUPDATE, update, this.name)\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _updateSettings() {\n if (this.getPlaybackType() === 'vod')\n this.settings.left = ['playpause', 'position', 'duration']\n else if (this.dvrEnabled)\n this.settings.left = ['playpause']\n else\n this.settings.left = ['playstop']\n\n this.settings.seekEnabled = this.isSeekEnabled()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE)\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n","module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/dash-shaka-playback.min.js b/dist/dash-shaka-playback.min.js index 6483b0d..dac7153 100644 --- a/dist/dash-shaka-playback.min.js +++ b/dist/dash-shaka-playback.min.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("clappr")):"function"==typeof define&&define.amd?define(["clappr"],e):"object"==typeof exports?exports.DashShakaPlayback=e(require("clappr")):t.DashShakaPlayback=e(t.Clappr)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="dist/",e(e.s=0)}([function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},s=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";l.default.polyfill.installAll();var n=l.default.Player.isBrowserSupported(),r=t.split("?")[0].match(/.*\.(.*)$/)||[];return n&&("mpd"===r[1]||e.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),s(e,[{key:"play",value:function(){if(this._player||this._setup(),!this.isReady)return void this.once(e.Events.SHAKA_READY,this.play);this._stopped=!1,this._src=this.el.src,o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"play",this).call(this)}},{key:"_setupSrc",value:function(){}},{key:"_ready",value:function(){}},{key:"_onShakaReady",value:function(){this._isShakaReadyState=!0,this.trigger(e.Events.SHAKA_READY),this.trigger(u.Events.PLAYBACK_READY,this.name)}},{key:"error",value:function(t){u.Log.error("an error was raised by the video tag",t,this.el.error)}},{key:"isHighDefinitionInUse",value:function(){return!!this.highDefinition}},{key:"stop",value:function(){var t=this;clearInterval(this.sendStatsId),this._stopped=!0,this._player?(this._sendStats(),this._player.unload().then(function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",t).call(t),t._player=null,t._isShakaReadyState=!1}).catch(function(){u.Log.error("shaka could not be unloaded")})):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",this).call(this)}},{key:"getPlaybackType",value:function(){return(this.isReady&&this._player.isLive()?"live":"vod")||""}},{key:"selectTrack",value:function(t){if("text"===t.type)this._player.selectTextTrack(t);else{if("variant"!==t.type)throw new Error("Unhandled track type:",t.type);this._player.selectVariantTrack(t),t.mimeType.startsWith("video/")&&this._onAdaptation()}}},{key:"_enableShakaTextTrack",value:function(t){this.el.textTracks&&(this._shakaTTVisible=t,Array.from(this.el.textTracks).filter(function(t){return"subtitles"===t.kind}).forEach(function(e){return e.mode=!0===t?"showing":"hidden"}))}},{key:"_checkForClosedCaptions",value:function(){if(!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(u.Events.PLAYBACK_SUBTITLE_AVAILABLE);var t=this.closedCaptionsTrackId;this.closedCaptionsTrackId=t}this._ccIsSetup=!0}}},{key:"destroy",value:function(){var t=this;clearInterval(this.sendStatsId),this._player?this._player.destroy().then(function(){return t._destroy()}).catch(function(){t._destroy(),u.Log.error("shaka could not be destroyed")}):this._destroy(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"_setup",value:function(){var t=this;this._isShakaReadyState=!1,this._ccIsSetup=!1,this._player=this._createPlayer(),this._options.shakaConfiguration&&this._player.configure(this._options.shakaConfiguration),this._options.shakaOnBeforeLoad&&this._options.shakaOnBeforeLoad(this._player),this._player.load(this._options.src).then(function(){return t._loaded()}).catch(function(e){return t._setupError(e)})}},{key:"_createPlayer",value:function(){var t=new l.default.Player(this.el);return t.addEventListener("error",this._onError.bind(this)),t.addEventListener("adaptation",this._onAdaptation.bind(this)),t.addEventListener("buffering",this._onBuffering.bind(this)),t}},{key:"_onBuffering",value:function(t){if(!this._stopped){var e=t.buffering?u.Events.PLAYBACK_BUFFERING:u.Events.PLAYBACK_BUFFERFULL;this.trigger(e)}}},{key:"_loaded",value:function(){this._onShakaReady(),this._startToSendStats(),this._fillLevels(),this._checkForClosedCaptions()}},{key:"_fillLevels",value:function(){0===this._levels.length&&(this._levels=this.videoTracks.map(function(t){return{id:t.id,label:t.height+"p"}}).reverse(),this.trigger(u.Events.PLAYBACK_LEVELS_AVAILABLE,this.levels))}},{key:"_startToSendStats",value:function(){var t=this,e=this._options.shakaSendStatsInterval||3e4;this.sendStatsId=setInterval(function(){return t._sendStats()},e)}},{key:"_sendStats",value:function(){this.trigger(u.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(t){this._onError(t)}},{key:"_onError",value:function(t){var n={shakaError:t,videoError:this.el.error},r=n.shakaError.detail||n.shakaError,i=r.category,a=r.code,s=r.severity;if(n.videoError||!a&&!i)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onError",this).call(this);var c=s===l.default.util.Error.Severity.CRITICAL,f={code:i+"_"+a,description:"Category: "+i+", code: "+a+", severity: "+s,level:c?u.PlayerError.Levels.FATAL:u.PlayerError.Levels.WARN,raw:t},h=this.createError(f);u.Log.error("Shaka error event:",h),this.trigger(u.Events.PLAYBACK_ERROR,h)}},{key:"_onAdaptation",value:function(){var t=this.videoTracks.filter(function(t){return!0===t.active})[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(u.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),u.Log.debug("an adaptation has happened:",t),this.highDefinition=t.height>=720,this.trigger(u.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(u.Events.PLAYBACK_BITRATE,{bandwidth:t.bandwidth,width:t.width,height:t.height,level:t.id})}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,u.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("audio/")})}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("video/")})}},{key:"closedCaptionsTracks",get:function(){var t=0,e=function(){return t++};return(this.textTracks||[]).filter(function(t){return"subtitle"===t.kind}).map(function(t){return{id:e(),name:t.label||t.language,track:t}})}},{key:"closedCaptionsTrackId",get:function(){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"closedCaptionsTrackId",this)},set:function(t){if(this._player){var e=this.closedCaptionsTracks,n=void 0;if(-1!==t){if(!(n=e.find(function(e){return e.id===t})))return void u.Log.warn('Track id "'+t+'" not found');if(this._shakaTTVisible&&!0===n.track.active)return void u.Log.info('Track id "'+t+'" already showing')}n?(this._player.selectTextTrack(n.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=t,this.trigger(u.Events.PLAYBACK_SUBTITLE_CHANGED,{id:t})}}}]),e}(u.HTML5Video);e.default=f,t.exports=e.default},function(e,n){e.exports=t},function(t,e,n){(function(t){!function(){var n="undefined"!=typeof window?window:t,r={};(function(t,e){function n(){n=function(){},uf.Symbol||(uf.Symbol=cf)}function r(){n();var t=uf.Symbol.iterator;t||(t=uf.Symbol.iterator=uf.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&sf(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return i(this)}}),r=function(){}}function i(t){var e=0;return a(function(){return ee)throw Error("Bad port number "+e);t.tb=e}else t.tb=null}function H(t,e,n){e instanceof X?t.a=e:(n||(e=G(e,Tf)),t.a=new X(e))}function q(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function G(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,z),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function z(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(15&t).toString(16)}function X(t){this.a=t||null}function Y(t){this.b=t,this.a=null}function W(t){this.b=t,this.a=null}function $(t,e){var n=Q();this.i=null==t.maxAttempts?n.maxAttempts:t.maxAttempts,this.f=null==t.baseDelay?n.baseDelay:t.baseDelay,this.h=null==t.fuzzFactor?n.fuzzFactor:t.fuzzFactor,this.g=null==t.backoffFactor?n.backoffFactor:t.backoffFactor,this.a=0,this.b=this.f,(this.c=void 0!==e&&e)&&(this.a=1)}function J(t){return c(function e(){var n,r;return A(e,function(e){switch(e.l){case 1:if(t.a>=t.i){if(!t.c)return e.return(Promise.reject());t.a=1,t.b=t.f}return n=t.a,(t.a++,0==n)?e.return():(r=t.b*(1+(2*Math.random()-1)*t.h),d(e,new Promise(function(t){new W(t).O(r/1e3)}),2));case 2:t.b*=t.g,p(e)}})})}function Q(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}}function Z(t,e,n,r){for(var i=[],a=3;a=r.priority)&&(xf[t]={priority:n,uf:e})}function wt(t,e){return{uris:t,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:e,licenseRequestType:null}}function Tt(t,e,n){var r=it(void 0),i={};t=o(t.a);for(var a=t.next();!a.done;i={$c:i.$c},a=t.next())i.$c=a.value,r=r.T(function(t){return function(){return t.$c(e,n)}}(i));return r.T(void 0,function(t){if(t&&7001==t.code)throw t;throw new Z(2,1,1006,t)})}function Et(t,e,n,r,i,a,o){var s=new K(n.uris[i]),u=s.sa,c=!1;u||(u=location.protocol,u=u.slice(0,-1),F(s,u),n.uris[i]=s.toString());var l=(u=xf[u])?u.uf:null;if(!l)return nt(new Z(2,1,1e3,s));var f;return at(J(r)).T(function(){return t.f?rt():(f=Date.now(),l(n.uris[i],n,e,function(n,r,i){t.c&&1==e&&(t.c(n,r),c=!0,o.a=i)}))}).T(function(t){return void 0==t.timeMs&&(t.timeMs=Date.now()-f),{response:t,Ue:c}},function(o){if(o&&7001==o.code)throw o;if(t.f)return rt();if(o&&1==o.severity)return t.dispatchEvent(new ut("retry",{error:o instanceof Z?o:null})),i=(i+1)%n.uris.length,Et(t,e,n,r,i,o);throw o||a})}function St(t,e,n){var r=it(void 0);t=o(t.b);for(var i=t.next();!i.done;i=t.next())r=r.T(i.value.bind(null,e,n.response));return r.T(function(){return n},function(t){if(t&&7001==t.code)throw t;var e=2;throw t instanceof Z&&(e=t.severity),new Z(e,1,1007,t)})}function xt(){this.a=0}function kt(t,e,n){et.call(this,t,e),this.b=n}function At(){this.b=new ct}function It(t,e,n,r){t.b&&(e=new Mt(e,n,r),t.b.push(n,e))}function _t(t,e,n,r){function i(a){t.ma(e,n,i),r(a)}It(t,e,n,i)}function Pt(t){if(t.b){for(var e=t.b.getAll(),n=0;n=t[e]}.bind(null,e);if(0==e[0]&&0==e[2])return Ht(t,!1);if(0==e[1]&&0==e[3])return Ht(t,!0);if(n(0)&&n(1)&&n(2)&&n(3))return Vt(t);throw new Z(2,2,2003)}function Gt(t){t=encodeURIComponent(t),t=unescape(t);for(var e=new Uint8Array(t.length),n=0;nn&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}t.g(new Z(2,6,6006,e.message,e,n))}})}function ye(t,e){var n=e.target,r=t.b.get(n),i=t.a.licenseServerUri,a=t.f.advanced[t.a.keySystem];"individualization-request"==e.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),i=wt([i],t.f.retryParameters),i.body=e.message,i.method="POST",i.licenseRequestType=e.messageType,"com.microsoft.playready"!=t.a.keySystem&&"com.chromecast.playready"!=t.a.keySystem||ge(i),t.a.keySystem.startsWith("com.apple.fps")&&be(i),t.w.nb.request(2,i).promise.then(function(t){return this.c?Promise.reject():(this.a.keySystem.startsWith("com.apple.fps")&&we(t),n.update(t.data).then(function(){var t=this;this.w.onEvent(new ut("drmsessionupdate")),r&&(r.ua&&r.ua.resolve(),new W(function(){r.loaded=!0,Ae(t)&&t.j.resolve()}).O(Nf))}.bind(this)))}.bind(t),function(t){this.c||(t=new Z(2,6,6007,t),this.g(t),r&&r.ua&&r.ua.reject(t))}.bind(t)).catch(function(t){this.c||(t=new Z(2,6,6008,t.message),this.g(t),r&&r.ua&&r.ua.reject(t))}.bind(t))}function ge(t){var e=Ht(t.body,!0,!0);if(e.includes("PlayReadyKeyMessage")){e=(new DOMParser).parseFromString(e,"application/xml");for(var n=e.getElementsByTagName("HttpHeader"),r=0;r"===e.substr(0,5)&&""===e.substr(-6)&&(e=e.slice(5,-6));try{e=JSON.parse(e).ckc}catch(t){}t.data=Wt(e).buffer}function Te(t){var e=t.ka,n=t.S;n.clear(),e.forEach(function(t,e){return n.set(e,t)}),e=Array.from(n.values()),e.length&&e.every(function(t){return"expired"==t})&&t.g(new Z(2,6,6014)),t.w.gc(Dt(n))}function Ee(){function t(t){return c(function e(){var i,a,o;return A(e,function(e){switch(e.l){case 1:return m(e,2),d(e,navigator.requestMediaKeySystemAccess(t,n),4);case 4:return i=e.s,o=!!(a=i.getConfiguration().sessionTypes)&&a.includes("persistent-license"),Kt("Tizen 3")&&(o=!1),r.set(t,{persistentState:o}),d(e,i.createMediaKeys(),5);case 5:y(e,0);break;case 2:g(e),r.set(t,null),p(e)}})})}var e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],n=[{videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:e}],r=new Map;return e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(e){return t(e)}),Promise.all(e).then(function(){return Dt(r)})}function Se(t,e){var n=e.audio,r=e.video;if(n&&n.encrypted&&!le(t,Lt(n.mimeType,n.codecs))||r&&r.encrypted&&!le(t,Lt(r.mimeType,r.codecs)))return!1;var i=t.keySystem();return 0==e.drmInfos.length||e.drmInfos.some(function(t){return t.keySystem==i})}function xe(t,e){if(!t.length)return e;if(!e.length)return t;for(var n=[],r=0;rt.end(0)-t.start(0)?null:t.length?t.end(t.length-1):null}function De(t,e,n){return n=void 0===n?0:n,!(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0)||e>t.end(t.length-1))&&e+n>=t.start(0)}function Le(t,e){if(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))return 0;for(var n=0,r=t.length-1;0<=r&&t.end(r)>e;--r)n+=t.end(r)-Math.max(t.start(r),e);return n}function Oe(t){if(!t)return[];for(var e=[],n=0;n>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function Ve(t,e){t.f=!0,t.b=new tt,t.g=[],t.c=[];var n=new Uint8Array(e);return t.a.push(n),t.a.flush(),t.f&&t.b.reject(new Z(2,3,3018)),t.b}function He(t,e,n){this.startTime=t,this.direction=Vf,this.endTime=e,this.payload=n,this.region=new qe,this.position=null,this.positionAlign=Uf,this.size=100,this.textAlign=jf,this.writingMode=Hf,this.lineInterpretation=qf,this.line=null,this.lineHeight="",this.lineAlign=Gf,this.displayAlign=Kf,this.backgroundColor=this.color="",this.backgroundImage=null,this.fontSize="",this.fontWeight=Xf,this.fontStyle=Yf,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id=""}function qe(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=$f,this.scroll=Jf}function Ge(t){this.g=null,this.c=t,this.f=this.m=0,this.h=1/0,this.b=this.a=null,this.j="",this.i=new Map}function ze(e){return!!(Qf[e]||t.muxjs&&"application/cea-608"==e)}function Xe(t,e){"application/cea-608"!=e&&(t.g=new Qf[e])}function Ye(t,e,n,r){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==n||null==r)this.g.parseInit(new Uint8Array(e));else{var t={periodStart:this.m,segmentStart:n,segmentEnd:r};t=this.g.parseMedia(new Uint8Array(e),t).filter(function(t){return t.startTime>=this.f&&t.startTime=t.f&&c.startTimen.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function tn(t,e){return"text"==e?t.a.b:Re(nn(t,e))}function en(t,e,n){return"text"==e?(t=t.a,null==t.b||t.b=e&&t<=n}var i=t.video;return!(i&&i.width&&i.height&&!(r(i.width,e.minWidth,Math.min(e.maxWidth,n.width))&&r(i.height,e.minHeight,Math.min(e.maxHeight,n.height))&&r(i.width*i.height,e.minPixels,e.maxPixels))||!r(t.bandwidth,e.minBandwidth,e.maxBandwidth))}function vn(t,e,n){var r=!1;return t.forEach(function(t){var i=t.allowedByApplication;t.allowedByApplication=mn(t,e,n),i!=t.allowedByApplication&&(r=!0)}),r}function yn(t,e,n,r){r.variants=r.variants.filter(function(r){if(t&&t.N&&!Se(t,r))return!1;var i=r.audio;return r=r.video,!(i&&!Je(i)||r&&!Je(r)||i&&e&&!gn(i,e)||r&&n&&!gn(r,n))}),r.textStreams=r.textStreams.filter(function(t){return ze(Lt(t.mimeType,t.codecs))})}function gn(t,e){return t.mimeType==e.mimeType&&t.codecs.split(".")[0]==e.codecs.split(".")[0]}function bn(t){var e=t.audio,n=t.video,r=e?e.codecs:null,i=n?n.codecs:null,a=[];i&&a.push(i),r&&a.push(r);var o=[];n&&o.push(n.mimeType),e&&o.push(e.mimeType),o=o[0]||null;var s=[];e&&s.push(e.kind),n&&s.push(n.kind),s=s[0]||null;var u=new Set;return e&&e.roles.forEach(function(t){return u.add(t)}),n&&n.roles.forEach(function(t){return u.add(t)}),t={id:t.id,active:!1,type:"variant",bandwidth:t.bandwidth,language:t.language,label:null,kind:s,width:null,height:null,frameRate:null,mimeType:o,codecs:a.join(", "),audioCodec:r,videoCodec:i,primary:t.primary,roles:Array.from(u),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},n&&(t.videoId=n.id,t.originalVideoId=n.originalId,t.width=n.width||null,t.height=n.height||null,t.frameRate=n.frameRate||null,t.videoBandwidth=n.bandwidth||null),e&&(t.audioId=e.id,t.originalAudioId=e.originalId,t.channelsCount=e.channelsCount,t.audioBandwidth=e.bandwidth||null,t.label=e.label,t.audioRoles=e.roles),t}function wn(t){return{id:t.id,active:!1,type:"text",bandwidth:0,language:t.language,label:t.label,kind:t.kind||null,width:null,height:null,frameRate:null,mimeType:t.mimeType,codecs:t.codecs||null,audioCodec:null,videoCodec:null,primary:t.primary,roles:t.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:t.originalId}}function Tn(t){return t.__shaka_id||(t.__shaka_id=eh++),t.__shaka_id}function En(t){return{id:Tn(t),active:!1,type:"",bandwidth:0,language:hn(t.language),label:t.label,kind:t.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}function Sn(t){return t.allowedByApplication&&t.allowedByKeySystem}function xn(t){return t.filter(function(t){return Sn(t)})}function kn(t,e){var n=t.filter(function(t){return t.audio&&t.audio.channelsCount}),r=new Map;n=o(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var a=i.audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return n=Array.from(r.keys()),0==n.length?t:(i=n.filter(function(t){return t<=e}),i.length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n)))}function An(t,e,n){var r=t,i=t.filter(function(t){return t.primary});i.length&&(r=i);var a=r.length?r[0].language:"";if(r=r.filter(function(t){return t.language==a}),e){var o=pn(hn(e),t.map(function(t){return t.language}));o&&(r=t.filter(function(t){return hn(t.language)==o}))}if(n){if(t=In(r,n),t.length)return t}else if(t=r.filter(function(t){return 0==t.roles.length}),t.length)return t;return t=r.map(function(t){return t.roles}).reduce(Df.uc,[]),t.length?In(r,t[0]):r}function In(t,e){return t.filter(function(t){return t.roles.includes(e)})}function _n(t,e,n){for(var r=0;re?"-Infinity":"Infinity":e;return r}})}function Un(t){return JSON.parse(t,function(t,e){return"NaN"==e?NaN:"-Infinity"==e?-1/0:"Infinity"==e?1/0:e&&"object"==typeof e&&"TimeRanges"==e.__type__?jn(e):e&&"object"==typeof e&&"Uint8Array"==e.__type__?new Uint8Array(e.entries):e})}function jn(t){return{length:t.length,start:function(e){return t.start[e]},end:function(e){return t.end[e]}}}function Bn(t,e,n,r,i,a){this.N=t,this.f=new W(e),this.S=n,this.j=!1,this.F=r,this.K=i,this.w=a,this.b=this.h=!1,this.C="",this.i=null,this.m=this.Jd.bind(this),this.o=this.ef.bind(this),this.a={video:{},player:{}},this.v=0,this.c={},this.g=null}function Kn(t){var e=mh;e.removeUpdateListener(t.m),e.removeMessageListener("urn:x-cast:com.google.shaka.v2",t.o)}function Fn(t){for(var e in t.c){var n=t.c[e];delete t.c[e],n.reject(new Z(1,7,7e3))}}function Vn(t){t=On(t),mh.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},B)}function Hn(t,e,n){lt.call(this),this.c=t,this.b=e,this.i=this.g=this.f=this.j=this.h=null,this.a=new Bn(n,this.Of.bind(this),this.Pf.bind(this),this.Qf.bind(this),this.Rf.bind(this),this.xd.bind(this)),qn(this)}function qn(t){t.a.init(),t.i=new At,rh.forEach(function(t){It(this.i,this.c,t,this.hg.bind(this))}.bind(t)),sh.forEach(function(t){It(this.i,this.b,t,this.tf.bind(this))}.bind(t)),t.h={};for(var e in t.c)Object.defineProperty(t.h,e,{configurable:!1,enumerable:!0,get:t.gg.bind(t,e),set:t.ig.bind(t,e)});t.j={};for(var n in t.b)Object.defineProperty(t.j,n,{configurable:!1,enumerable:!0,get:t.Qd.bind(t,n)});t.f=new lt,t.f.Sb=t.h,t.g=new lt,t.g.Sb=t.j}function Gn(t,e,n,r){var i=this;lt.call(this),this.a=t,this.b=e,this.c=new At,this.w={video:t,player:e},this.C=n||function(){},this.F=r||function(t){return t},this.o=!1,this.h=!0,this.g=0,this.m=!1,this.j=!0,this.i=this.f=null,this.v=new W(function(){Wn(i)}),zn(this)}function zn(t){var e=cast.receiver.CastReceiverManager.getInstance();e.onSenderConnected=t.Md.bind(t),e.onSenderDisconnected=t.Md.bind(t),e.onSystemVolumeChanged=t.we.bind(t),t.i=e.getCastMessageBus("urn:x-cast:com.google.cast.media"),t.i.onMessage=t.$e.bind(t),t.f=e.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),t.f.onMessage=t.lf.bind(t),e.start(),rh.forEach(function(t){It(this.c,this.a,t,this.Sd.bind(this,"video"))}.bind(t)),sh.forEach(function(t){It(this.c,this.b,t,this.Sd.bind(this,"player"))}.bind(t)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?t.b.dd(3840,2160):t.b.dd(1920,1080),It(t.c,t.a,"loadeddata",function(){this.m=!0}.bind(t)),It(t.c,t.b,"loading",function(){this.h=!1,Xn(this)}.bind(t)),It(t.c,t.a,"playing",function(){this.h=!1,Xn(this)}.bind(t)),It(t.c,t.a,"pause",function(){Xn(this)}.bind(t)),It(t.c,t.b,"unloading",function(){this.h=!0,Xn(this)}.bind(t)),It(t.c,t.a,"ended",function(){var t=this;new W(function(){t.a&&t.a.ended&&(t.h=!0,Xn(t))}).O(5)}.bind(t))}function Xn(t){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new ut("caststatuschanged")),$n(this)||Zn(this,0))}.bind(t))}function Yn(t,e,n){for(var r in e.player)t.b[r](e.player[r]);t.C(n),n=Promise.resolve();var i=t.a.autoplay;e.manifest&&(t.a.autoplay=!1,n=t.b.load(e.manifest,e.startTime)),n.then(function(){if(t.b){for(var n in e.video)t.a[n]=e.video[n];for(var r in e.playerAfterLoad)t.b[r](e.playerAfterLoad[r]);t.a.autoplay=i,e.manifest&&(t.a.play(),Zn(t,0))}},function(e){t.b.dispatchEvent(new ut("error",{detail:e}))})}function Wn(t){t.v.O(.5);var e={video:{},player:{}};if(ih.forEach(function(t){e.video[t]=this.a[t]}.bind(t)),t.b.U())for(var n in ch)0==t.g%ch[n]&&(e.player[n]=t.b[n]());for(var r in uh)0==t.g%uh[r]&&(e.player[r]=t.b[r]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(e.video.volume=n.level,e.video.muted=n.muted),t.m&&(t.g+=1),Qn(t,{type:"update",update:e},t.f),$n(t)}function $n(t){return!(!t.j||!t.a.duration&&!t.b.U())&&(Jn(t),t.j=!1,!0)}function Jn(t){Zn(t,0,{contentId:t.b.$b(),streamType:t.b.U()?"LIVE":"BUFFERED",duration:t.a.duration,contentType:""})}function Qn(t,e,n,r){t.o&&(t=On(e),r?n.getCastChannel(r).send(t):n.broadcast(t))}function Zn(t,e,n){var r=t.a.playbackRate,i=vh;i=t.h?i.IDLE:t.b.Ic()?i.fe:t.a.paused?i.he:i.ie,r={mediaSessionId:0,playbackRate:r,playerState:i,currentTime:t.a.currentTime,supportedMediaCommands:15,volume:{level:t.a.volume,muted:t.a.muted}},n&&(r.media=n),Qn(t,{requestId:e,type:"MEDIA_STATUS",status:[r]},t.i)}function tr(t,e,n){var r=ar(t),i=null;t=[];var a=[],s=new Set(r.map(function(t){return t.keyId}));if(s.delete(null),1 LA_URL"))?t.textContent:""}function ir(t,e,n){var r=[];n=o(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var a=gh.get(i.Xd);if(a){var s=je(a,i.init||t);(a=bh.get(a))&&(s.licenseServerUri=a(i)),r.push(s)}else for(i=e(i.node)||[],i=o(i),s=i.next();!s.done;s=i.next())r.push(s.value)}return r}function ar(t){var e=[];t=o(t);for(var n=t.next();!n.done;n=t.next())(n=or(n.value))&&e.push(n);return e}function or(t){var e=t.getAttribute("schemeIdUri"),n=yh.getAttributeNS(t,"urn:mpeg:cenc:2013","default_KID"),r=yh.ud(t,"urn:mpeg:cenc:2013","pssh").map(yh.ac);if(!e)return null;if(e=e.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new Z(2,4,4009);var i=[];try{i=r.map(function(t){return{initDataType:"cenc",initData:Wt(t),keyId:null}})}catch(t){throw new Z(2,4,4007)}return{node:t,Xd:e,keyId:n,init:0(h=h||0))if(f+1=h)break;h=Math.ceil((h-d)/p)-1}else{if(1/0==u)break;if(d/i>=u)break;h=Math.ceil((u*i-d)/p)-1}0>24&255,t>>16&255,t>>8&255,255&t)}function Sr(t,e,n,r){var i,a=(new yr).ca("sidx",function(t){i=xr(e,r,n,t)});if(t&&a.parse(t),i)return i;throw new Z(2,3,3004)}function xr(t,e,n,r){var i=[];r.reader.J(4);var a=r.reader.D();if(0==a)throw new Z(2,3,3005);if(0==r.version)var o=r.reader.D(),s=r.reader.D();else o=r.reader.ub(),s=r.reader.ub();r.reader.J(2);var u=r.reader.Jb();for(t=t+r.size+s,s=0;s>>31;c&=2147483647;var f=r.reader.D();if(r.reader.J(4),1==l)throw new Z(2,3,3006);i.push(new pr(i.length,o/a-e,(o+f)/a-e,function(){return n},t,t+c-1)),o+=f,t+=c}return r.parser.stop(),i}function kr(t){this.a=t}function Ar(t,e){for(;t.a.length&&t.a[t.a.length-1].startTime>=e;)t.a.pop();for(;t.a.length&&0>=t.a[0].endTime;)t.a.shift();if(0!=t.a.length){var n=t.a[t.a.length-1];t.a[t.a.length-1]=new pr(n.position,n.startTime,e,n.c,n.b,n.a)}}function Ir(t){this.b=t,this.a=new mr(t,0),Th||(Th=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function _r(t){var e=Pr(t);if(7=e&&!(n&1<<8-e);e++);if(8t||n&&t>=n?null:Math.floor(t/r)},getSegmentReference:function(t){var e=t*r,l=e+r;return n&&(l=Math.min(l,n)),0>l||n&&e>=n?null:new pr(t,e,l,function(){var n=sr(o,u,t+i,s,e*a);return Ue(c,[n])},0,null)}}}function zr(t,e){for(var n=[],r=0;rt.o||t.i.O(Math.max(3,t.o-e,L(t.v)))}function ai(t,e,n){e=e||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Sc:null},n=n||e.la;var r=yh.rb,i=yh.ve,a=yh.P(t,"BaseURL").map(yh.ac),s=t.getAttribute("contentType")||e.contentType,u=t.getAttribute("mimeType")||e.mimeType,c=t.getAttribute("codecs")||e.codecs;i=yh.H(t,"frameRate",i)||e.frameRate;var l=yh.P(t,"InbandEventStream"),f=e.emsgSchemeIdUris.slice();l=o(l);for(var h=l.next();!h.done;h=l.next())h=h.value.getAttribute("schemeIdUri"),f.includes(h)||f.push(h);return l=yh.P(t,"AudioChannelConfiguration"),l=oi(l)||e.Sc,s||(s=li(u,c)),{la:Ue(n,a),Lb:yh.Yb(t,"SegmentBase")||e.Lb,Ga:yh.Yb(t,"SegmentList")||e.Ga,Nb:yh.Yb(t,"SegmentTemplate")||e.Nb,width:yh.H(t,"width",r)||e.width,height:yh.H(t,"height",r)||e.height,contentType:s,mimeType:u,codecs:c,frameRate:i,emsgSchemeIdUris:f,id:t.getAttribute("id"),Sc:l}}function oi(t){for(var e=0;e>=1;return t}}}return null}function si(t){var e=t.Lb?1:0;return e+=t.Ga?1:0,0==(e+=t.Nb?1:0)?"text"==t.contentType||"application"==t.contentType:(1!=e&&(t.Lb&&(t.Ga=null),t.Nb=null),!0)}function ui(t,e,n,r){return e=Ue(e,[n]),e=wt(e,t.b.retryParameters),e.method=r,e=t.a.networkingEngine.request(4,e),yt(t.g,e),e.promise.then(function(t){if("HEAD"==r){if(!t.headers||!t.headers.date)return 0;t=t.headers.date}else t=Vt(t.data);return t=Date.parse(t),isNaN(t)?0:t-Date.now()})}function ci(t,e,n){n=n.map(function(t){return{scheme:t.getAttribute("schemeIdUri"),value:t.getAttribute("value")}});var r=t.b.dash.clockSyncUri;return!n.length&&r&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),Df.te(n,function(t){var n=t.scheme;switch(t=t.value,n){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return ui(this,e,t,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return ui(this,e,t,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return n=Date.parse(t),isNaN(n)?0:n-Date.now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return j("NTP UTCTiming scheme is not supported"),Promise.reject();default:return j("Unrecognized scheme in UTCTiming element",n),Promise.reject()}}.bind(t)).catch(function(){return j("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0})}function li(t,e){return ze(Lt(t,e))?"text":t.split("/")[0]}function fi(t,e,n,r){this.b=t,this.type=e,this.a=n,this.segments=r||null}function hi(t,e,n,r){this.id=t,this.name=e,this.a=n,this.value=void 0===r?null:r}function di(t,e){this.name=t,this.value=e}function pi(t,e,n){return(t=t.getAttribute(e))?t.value:n||null}function mi(t,e){this.b=e,this.a=t}function vi(t){this.b=t,this.a=0}function yi(t){gi(t,/[ \t]+/gm)}function gi(t,e){e.lastIndex=t.a;var n=e.exec(t.b);return n=null==n?null:{position:n.index,length:n[0].length,Ef:n},t.a==t.b.length||null==n||n.position!=t.a?null:(t.a+=n.length,n.Ef)}function bi(t){return t.a==t.b.length?null:(t=gi(t,/[^ \t\n]*/gm))?t[0]:null}function wi(){this.a=0}function Ti(t,e,n){e=Vt(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var r=e.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(r[0]))throw new Z(2,4,4015);e=0;for(var i=1;im.Pc&&(m.stream.presentationTimeOffset=-h,m.Mb.offset(h))}else for(t.b.ta(u),t.b.offset(-a),y=o(t.a.values()),g=y.next();!g.done;g=y.next())v=g.value,v.stream.presentationTimeOffset=a,v.Mb.offset(-a),Ar(v.Mb,u);t.m={presentationTimeline:t.b,periods:[i],offlineSessionIds:[],minBufferTime:0},p(n)}})})}function _i(t,e){return c(function n(){var r,i,a,o,s,u,c,l,f,h,p,m;return A(n,function(n){switch(n.l){case 1:return r=Sh,i=Df,a=e.a,o=r.hb(e.a,"EXT-X-MEDIA"),s=o.filter(function(t){return"SUBTITLES"==Qi(t,"TYPE")}.bind(t)),u=s.map(function(t){return Ri(this,t)}.bind(t)),c=o.filter(function(t){return"CLOSED-CAPTIONS"==Qi(t,"TYPE")}),Di(t,c),d(n,Promise.all(u),2);case 2:return l=n.s,f=r.hb(a,"EXT-X-STREAM-INF"),h=f.map(function(t){return Pi(this,t,e)}.bind(t)),d(n,Promise.all(h),3);case 3:return p=n.s,m=p.reduce(i.uc,[]),m=m.filter(function(t){return null!=t}),n.return({startTime:0,variants:m,textStreams:l})}})})}function Pi(t,e,n){return c(function r(){var i,a,o,s,u,c,l,f,h,p,m,v,y,g,b,w,T,E,S,x,k,I,_,P,M,C,N;return A(r,function(r){switch(r.l){case 1:return i=Lf,a=Sh,o=pi(e,"CODECS","avc1.42E01E,mp4a.40.2"),s=Yi(o.split(/\s*,\s*/)),u=e.getAttribute("RESOLUTION"),l=c=null,f=pi(e,"FRAME-RATE"),h=Number(Qi(e,"BANDWIDTH")),u&&(p=u.value.split("x"),c=p[0],l=p[1]),m=a.hb(n.a,"EXT-X-MEDIA"),m=m.filter(function(t){return"CLOSED-CAPTIONS"!=Qi(t,"TYPE")}),m=m.filter(function(t){var e=pi(t,"URI")||"";return"SUBTITLES"==(pi(t,"TYPE")||"")||""!=e}),v=pi(e,"AUDIO"),y=pi(e,"VIDEO"),v?m=a.Cc(m,"AUDIO",v):y&&(m=a.Cc(m,"VIDEO",y)),(g=Wi(i.na,s))&&((b=pi(e,"SUBTITLES"))&&(w=a.Cc(m,"SUBTITLES",b),w.length&&(T=t.C.get(w[0].id),T.stream.codecs=g)),dt(s,g)),E=m.map(function(t){return Li(this,t,s)}.bind(t)),S=[],x=[],d(r,Promise.all(E),2);case 2:if(I=r.s,I=I.filter(function(t){return null!=t}),v?S=I:y&&(x=I),P=!1,S.length||x.length?S.length?(C=Qi(e,"URI"),N=S[0].pc,C==N?(_=i.wb,P=!0):_=i.La):_=i.wb:1==s.length?(M=Wi(i.La,s),_=u||f||M?i.La:i.wb):(_=i.La,s=[s.join(",")]),P){r.A(3);break}return d(r,Oi(t,e,s,_),4);case 4:k=r.s;case 3:if(k)k.stream.type==i.wb?S=[k]:x=[k];else if(null===k)return r.return([]);return x&&Mi(x),S&&Mi(S),r.return(Ci(t,S,x,h,c,l,f))}})})}function Mi(t){t.forEach(function(t){var e=t.stream.codecs.split(",");e=e.filter(function(t){return"mp4a.40.34"!=t}),t.stream.codecs=e.join(",")})}function Ci(t,e,n,r,i,a,s){n.forEach(function(t){(t=t.stream)&&(t.width=Number(i)||void 0,t.height=Number(a)||void 0,t.frameRate=Number(s)||void 0)}.bind(t)),e.length||(e=[null]),n.length||(n=[null]);var u=[];e=o(e);for(var c=e.next();!c.done;c=e.next()){c=c.value;for(var l=o(n),f=l.next();!f.done;f=l.next()){var h=f.value;f=c?c.stream:null;var d=h?h.stream:null,p=c?c.drmInfos:null,m=h?h.drmInfos:null;h=(h?h.pc:"")+" - "+(c?c.pc:"");var v=void 0;if(f&&d){if(!(p.length&&m.length?0>4,0!=r&&2!=r||e(),3==r&&(r=t.ha(),t.J(r)),1==t.D()>>8)return t.J(3),n=t.ha()>>6,0!=n&&1!=n||e(),0==t.ha()&&e(),n=t.ha(),r=t.Jb(),t=t.Jb(),(1073741824*((14&n)>>1)+((65534&r)<<14|(65534&t)>>1))/9e4;t.seek(n+188),r=t.ha(),71!=r&&(t.seek(n+192),r=t.ha()),71!=r&&(t.seek(n+204),r=t.ha()),71!=r&&e(),t.Wd(1)}}function Xi(t,e,n){return t=Lt(t,e),ze(t)?(e=new Ge(null),Xe(e,t),e.Gc(n)):0}function Yi(t){var e=new Set,n=[];t=o(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;var i=Ut(r)[0];e.has(i)||(n.push(r),e.add(i))}return n}function Wi(t,e){for(var n=Ah[t],r=0;ri-.5)){e=!0;break t}}e=!1}return e}function Ta(t,e,n,r,i){var a=this;this.b=t,this.w=e,this.v=n,this.m=i,this.g=new At,this.j=!1,this.o=t.readyState,this.f=!1,this.c=r,this.i=!1,It(this.g,t,"waiting",function(){return Ea(a)}),this.h=new W(function(){Ea(a)}).Ia(.25)}function Ea(t){if(0!=t.b.readyState){if(t.b.seeking){if(!t.j)return}else t.j=!1;if(!t.b.paused){t.b.readyState!=t.o&&(t.f=!1,t.o=t.b.readyState);var e=t.v.smallGapLimit,n=t.b.currentTime,r=t.b.buffered;t:{if(r&&r.length&&!(1==r.length&&1e-6>r.end(0)-r.start(0)))for(var i=Kt("Edge/")||Kt("Trident/")||Kt("Tizen")||Kt("CrKey")?.5:.1,a=0;an&&(0==a||r.end(a-1)-n<=i)){i=a;break t}i=null}if(null==i)t.c&&(t=t.c,n=t.g,r=wa(n),n=n.a.currentTime,i=Date.now()/1e3,t.c==n&&t.h==r||(t.f=i,t.c=n,t.h=r),(n=i-t.f)>=t.i&&r&&t.b(t.c,n));else if(0!=i||t.i){a=r.start(i);var o=t.w.wa();if(!(a>=o)){o=a-n,e=o<=e;var s=!1;.001>o||(e||t.f||(t.f=!0,n=new ut("largegap",{currentTime:n,gapSize:o}),n.cancelable=!0,t.m(n),t.v.jumpLargeGaps&&!n.defaultPrevented&&(s=!0)),!e&&!s)||(0!=i&&r.end(i-1),t.b.currentTime=a)}}}}}function Sa(t){var e=this;this.f=t,this.b=new Set,this.c=new W(function(){xa(e,!1)}).Ia(.25)}function xa(t,e){for(var n=o(t.b),r=n.next();!r.done;r=n.next())r.value.h(t.f.currentTime,e)}function ka(t){var e=[];t=o(t);for(var n=t.next();!n.done;n=t.next()){n=o(n.value.variants);for(var r=n.next();!r.done;r=n.next())e.push(r.value)}return e}function Aa(t,e){for(var n=null,r=o(t),i=r.next();!i.done;i=r.next())i=i.value,e>=i.startTime&&(n=i);return n}function Ia(t){this.f=t,this.b=null,this.c=function(){}}function _a(t,e){t.c=e}function Pa(t){var e=this;this.b=t,this.g=!1,this.f=this.b.cc(),this.c=new W(function(){e.b.Ed(.25*e.f)})}function Ma(t){t.c.stop();var e=t.g?0:t.f;0<=e?t.b.cc()!=e&&t.b.ed(e):(t.c.Ia(.25),0!=t.b.cc()&&t.b.ed(0))}function Ca(t,e,n){this.b=t,this.g=e,this.h=n,this.c=new At,this.f=new Oa(t),0Math.abs(t.b.currentTime-e)?La(t):(_t(t.c,t.b,"seeking",function(){La(t)}),Ua(t.f,0==t.b.currentTime?e:t.b.currentTime))}function La(t){It(t.c,t.b,"seeking",function(){return t.g()})}function Oa(t){var e=this;this.c=t,this.i=10,this.h=this.g=this.f=0,this.b=new W(function(){0>=e.f?e.b.stop():e.c.currentTime!=e.g?e.b.stop():(e.c.currentTime=e.h,e.f--)})}function Ua(t,e){t.g=t.c.currentTime,t.h=e,t.f=t.i,t.c.currentTime=e,t.b.Ia(.1)}function ja(t){function e(){n.g=!0,null!=n.c&&(n.b.currentTime=n.c)}var n=this;this.b=t,this.g=!1,this.c=null,this.f=new At,0==this.b.readyState?_t(this.f,this.b,"loadedmetadata",e):e()}function Ba(t,e,n,r,i,a){var o=this;this.c=t,this.b=e.presentationTimeline,this.C=e.minBufferTime||0,this.h=n,this.w=i,this.m=null,this.g=new Ta(t,e.presentationTimeline,n,qa(t,n),a),this.f=new Ca(t,function(){var t=o.g;t.j=!0,t.i=!1,t.f=!1;var e=Na(o.f);return t=Va(o,e),.001n-e&&(e=n-3),tt.b.Y()?t.b.ib():t.b.wa():0>e&&(e=t.b.wa()+e),Fa(t,Ha(t,e))}function Fa(t,e){var n=t.b.Y();return e>=n?n-t.h.durationBackoff:e}function Va(t,e){var n=De.bind(null,t.c.buffered),r=Math.max(t.C,t.h.rebufferingGoal),i=t.h.safeSeekOffset,a=t.b.ib(),o=t.b.wa(),s=t.b.Y();3>o-a&&(a=o-3);var u=t.b.Cb(r),c=t.b.Cb(i);return r=t.b.Cb(r+i),e>=s?Fa(t,e):e>o?o:e=u||n(e)?e:r}function Ha(t,e){var n=t.b.ib();return en?n:e)}function qa(t,e){if(!e.stallEnabled)return null;var n=e.stallSkip,r=new ya(new ba(t),e.stallThreshold);return ga(r,function(){t.currentTime+=n}),r}function Ga(){this.c=function(){},this.b=new Set}function za(t,e){t.c=e}function Xa(t){var e=this;this.i=t,this.g=new Map,this.b=function(){},this.c=function(){},this.f=function(){},this.j=[{Za:null,Ya:Dh,Sa:function(t,n){return e.b(t,n)}},{Za:Rh,Ya:Dh,Sa:function(t,n){return e.b(t,n)}},{Za:Lh,Ya:Dh,Sa:function(t,n){return e.b(t,n)}},{Za:Dh,Ya:Rh,Sa:function(t,n){return e.c(t,n)}},{Za:Dh,Ya:Lh,Sa:function(t,n){return e.c(t,n)}},{Za:Rh,Ya:Lh,Sa:function(t,n){return e.f(t,n)}},{Za:Lh,Ya:Rh,Sa:function(t,n){return e.f(t,n)}}]}function Ya(t,e,n,r){t.b=e,t.c=n,t.f=r}function Wa(t,e){this.a=e,this.c=t,this.g=null,this.j=1,this.v=Promise.resolve(),this.h=[],this.i=new Map,this.b=new Map,this.o=!1,this.F=null,this.C=this.f=this.m=!1,this.w=0}function $a(t){return Qa(t,"audio")}function Ja(t){return Qa(t,"video")}function Qa(t,e){var n=t.b.get(e);return n?n.Fa||n.stream:null}function Za(t,e){return c(function n(){var r,i,a,o,s,u,c,l;return A(n,function(n){switch(n.l){case 1:return r=Lf,d(n,an(t.a.L,r.na),2);case 2:return t.w++,t.C=!1,i=t.w,a=t.a.L,o=new Map,s=new Set,o.set(r.na,e),s.add(e),d(n,a.init(o,!1),3);case 3:return t.f?n.return():d(n,co(t,s),4);case 4:if(t.f)return n.return();t.w!=i||t.b.has(r.na)||t.C||(u=t.a.Qa(),c=ko(t,u),l=so(e,c,0),t.b.set(r.na,l),Po(t,l,0)),p(n)}})})}function to(t,e){var n=t.b.get("video");if(n){var r=n.stream;if(r)if(e){var i=r.trickModeVideo;i&&!n.Fa&&(no(t,i,!1,0),n.Fa=r)}else(r=n.Fa)&&(n.Fa=null,no(t,r,!0,0))}}function eo(t,e,n,r){e.video&&no(t,e.video,n,r),e.audio&&no(t,e.audio,n,r)}function no(t,e,n,r){var i=t.b.get(e.type);if(!i&&"text"==e.type&&t.g.ignoreTextStreamFailures)Za(t,e);else if(i){var a=Ao(t,e);if(n&&a!=i.ya)t.b.forEach(function(e){ao(t,e)});else{i.Fa&&(e.trickModeVideo?(i.Fa=e,e=e.trickModeVideo):i.Fa=null);var o=t.h[a];o&&o.vb&&(o=t.i.get(e.id))&&o.vb&&i.stream!=e&&("text"==e.type&&Qe(t.a.L,Lt(e.mimeType,e.codecs)),i.stream=e,i.ec=!0,ro(t,i,a)&&i.Hb.abort(),n&&(i.Na?i.qc=!0:i.Ea?(i.Ja=!0,i.Wb=r,i.qc=!0):(Mo(i),_o(t,i,!0,r))))}}}function ro(t,e,n){return!!e.Hb&&(null!=(t=(t=mo(t,e,t.a.Qa(),tn(t.a.L,e.type),n))&&t.a?t.a-t.b:null)&&((n=e.stream.initSegmentReference)&&(t+=(n.a?n.a-n.b:null)||0),e.Hb.b.a>t))}function io(t){function e(e){var i=t.a.L;return"text"==e?(e=i.a,e=null!=e.a&&null!=e.b&&(n>=e.a&&ne?t.a.L.ta(e):t.a.L.ta(Math.pow(2,32))}function fo(t,e){if(!t.f&&!e.Ea&&null!=e.Ba&&!e.Na)if(e.Ba=null,e.Ja)_o(t,e,e.qc,e.Wb);else{try{var n=ho(t,e);null!=n&&(Po(t,e,n),e.Eb=!1)}catch(e){return void Co(t,e)}n=Array.from(t.b.values()),So(t,e),t.o&&n.every(function(t){return t.endOfStream})&&t.a.L.endOfStream().then(function(){if(!this.f){var t=this.a.L.Y();t=t.c.presentationTimeline.Y())return e.endOfStream=!0,"video"==e.type&&(i=t.b.get("text"))&&"application/cea-608"==i.stream.mimeType&&(i.endOfStream=!0),null;if(e.endOfStream=!1,e.ya=o,o!=a)return null;if(s>=u)return.5;if(o=tn(t.a.L,e.type),!(o=mo(t,e,r,o,a)))return 1;var c=1/0;return Array.from(t.b.values()).forEach(function(e){n(e)||(e=po(t,e,r),c=Math.min(c,e))}),i>=c+t.c.presentationTimeline.a?1:(e.Vd=0,yo(t,e,r,a,o),null)}function po(t,e,n){return e.lb&&e.xa?(n=Ao(t,e.lb),t.c.periods[n].startTime+e.xa.endTime):Math.max(n,e.Vd)}function mo(t,e,n,r,i){if(e.xa&&e.stream==e.lb)return vo(t,e,i,e.xa.position+1);if(e.xa?(n=Ao(t,e.lb),n=e.stream.findSegmentPosition(Math.max(0,t.c.periods[n].startTime+e.xa.endTime-t.c.periods[i].startTime))):n=e.stream.findSegmentPosition(Math.max(0,(r||n)-t.c.periods[i].startTime)),null==n)return null;var a=null;return null==r&&(a=vo(t,e,i,Math.max(0,n-1))),a||vo(t,e,i,n)}function vo(t,e,n,r){return n=t.c.periods[n],(e=e.stream.getSegmentReference(r))?(r=t.c.presentationTimeline,t=r.Db(),r=r.jb(),n.startTime+e.endTimer?null:e):null}function yo(t,e,n,r,i){var a=t.c.periods[r],o=e.stream,s=t.c.presentationTimeline.Y(),u=t.c.periods[r+1];r=bo(t,e,r,Math.max(0,a.startTime-.1),u?u.startTime+.01:s),e.Ea=!0,e.ec=!1,s=Io(t,e,i),Promise.all([r,s]).then(function(t){if(!this.f&&!this.m)return wo(this,e,n,a,o,i,t[1])}.bind(t)).then(function(){this.f||this.m||(e.Ea=!1,e.Yc=!1,e.Ja||this.a.Uc(),Po(this,e,0),Eo(this,o))}.bind(t)).catch(function(t){this.f||this.m||(e.Ea=!1,"text"==e.type&&this.g.ignoreTextStreamFailures?this.b.delete("text"):7001==t.code?(e.Ea=!1,e.Ba=null,Po(this,e,0)):3017==t.code?go(this,e,t):(e.Eb=!0,t.severity=2,Co(this,t)))}.bind(t))}function go(t,e,n){if(!Array.from(t.b.values()).some(function(t){return t!=e&&t.Yc})){var r=Math.round(100*t.j);if(20=n?Promise.resolve():t.a.L.remove(e.type,i,i+n).then(function(){}.bind(t)))}function Eo(t,e){if(!t.o){var n=Array.from(t.b.values());if(1==n.length&&"text"==n[0].type||(t.o=n.every(function(t){return"text"==t.type||!t.Ja&&!t.Na&&t.xa})),t.o){for(n=Ao(t,e),t.h[n]||uo(t,n).then(function(){this.f||this.a.Gd()}.bind(t)).catch(Df.Gb),n=0;n=n&&202!=n)return i&&(r=i),{uri:r,data:e,headers:t,fromCache:!!t["x-shaka-from-cache"]};i=null;try{i=qt(e)}catch(t){}throw new Z(401==n||403==n?2:1,1,1001,r,n,i,t,a)}function Ro(t,e,n,r){var i=new Ro.b;Rt(e.headers).forEach(function(t,e){i.append(e,t)});var a=new Ro.a,o={pd:!1,ce:!1};if(t=Ro.h(t,n,{body:e.body||void 0,headers:i,method:e.method,signal:a.signal,credentials:e.allowCrossSiteCredentials?"include":void 0},o,r),t=new et(t,function(){return o.pd=!0,a.abort(),Promise.resolve()}),e=e.retryParameters.timeout){var s=new W(function(){o.ce=!0,a.abort()});s.O(e/1e3),t.finally(function(){s.stop()})}return t}function Do(t,e,n,r){var i=new Do.f,a=Date.now(),s=0;return new et(new Promise(function(u,c){i.open(e.method,t,!0),i.responseType="arraybuffer",i.timeout=e.retryParameters.timeout,i.withCredentials=e.allowCrossSiteCredentials,i.onabort=function(){c(new Z(1,1,7001,t,n))},i.onload=function(e){e=e.target;var r=e.getAllResponseHeaders().trim().split("\r\n"),i={};r=o(r);for(var a=r.next();!a.done;a=r.next())a=a.value.split(": "),i[a[0].toLowerCase()]=a.slice(1).join(": ");try{var s=No(i,e.response,e.status,t,e.responseURL,n);u(s)}catch(t){c(t)}},i.onerror=function(e){c(new Z(1,1,1002,t,e,n))},i.ontimeout=function(){c(new Z(1,1,1003,t,n))},i.onprogress=function(t){var e=Date.now();(100=t.endTime)return null;var e=new VTTCue(t.startTime,t.endTime,t.payload);e.lineAlign=t.lineAlign,e.positionAlign=t.positionAlign,e.size=t.size;try{e.align=t.textAlign}catch(t){}return"center"==t.textAlign&&"center"!=e.align&&(e.align="middle"),"vertical-lr"==t.writingMode?e.vertical="lr":"vertical-rl"==t.writingMode&&(e.vertical="rl"),1==t.lineInterpretation&&(e.snapToLines=!1),null!=t.line&&(e.line=t.line),null!=t.position&&(e.position=t.position),e}function Bs(t,e){var n=t.mode;t.mode="showing"==n?"showing":"hidden";for(var r=t.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&e(a)&&t.removeCue(a)}t.mode=n}function Ks(t,e,n,r,i){var a,o=i in r,s=!0;for(a in e){var u=i+"."+a,c=o?r[i]:n[a];o||a in n?void 0===e[a]?void 0===c||o?delete t[a]:t[a]=ft(c):c.constructor==Object&&e[a]&&e[a].constructor==Object?(t[a]||(t[a]=ft(c)),u=Ks(t[a],e[a],c,r,u),s=s&&u):typeof e[a]!=typeof c||null==e[a]||e[a].constructor!=c.constructor?s=!1:t[a]=e[a]:s=!1}return s}function Fs(){var t=5e5,e=1/0;navigator.connection&&navigator.connection.type&&(t=1e6*navigator.connection.downlink,navigator.connection.saveData&&(e=360));var n={retryParameters:Q(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},r={retryParameters:Q(),availabilityWindowOverride:NaN,dash:{customScheme:function(t){if(t)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},i={retryParameters:Q(),failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};Kt("Web0S")&&(i.stallEnabled=!1);var a={trackSelectionCallback:function(t){return t},progressCallback:function(){},usePersistentLicense:!0},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Mn,abr:{enabled:!0,defaultBandwidthEstimate:t,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return a.trackSelectionCallback=function(t){return Hs(t,o.preferredAudioLanguage)},o}function Vs(t,e,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Ks(t,e,n||Fs(),r,"")}function Hs(t,e){var n=t.filter(function(t){return"variant"==t.type}),r=[],i=pn(e,n.map(function(t){return t.language}));i&&(r=n.filter(function(t){return hn(t.language)==i})),0==r.length&&(r=n.filter(function(t){return t.primary})),0==r.length&&(n.map(function(t){return t.language}),r=n);var a=r.filter(function(t){return t.height&&480>=t.height});if(a.length&&(a.sort(function(t,e){return e.height-t.height}),r=a.filter(function(t){return t.height==a[0].height})),n=[],r.length){var s=Math.floor(r.length/2);r.sort(function(t,e){return t.bandwidth-e.bandwidth}),n.push(r[s])}for(r=o(t),s=r.next();!s.done;s=r.next())s=s.value,"text"==s.type&&n.push(s);return n}function qs(){this.a=null,this.b=[]}function Gs(t,e){if(null==t.a)t.a={timestamp:Date.now()/1e3,state:e,duration:0};else{var n=Date.now()/1e3;t.a.duration=n-t.a.timestamp,t.a.state!=e&&(t.b.push(t.a),t.a={timestamp:n,state:e,duration:0})}}function zs(t,e){var n=0;t.a&&t.a.state==e&&(n+=t.a.duration);for(var r=o(t.b),i=r.next();!i.done;i=r.next())i=i.value,n+=i.state==e?i.duration:0;return n}function Xs(t){function e(t){return{timestamp:t.timestamp,state:t.state,duration:t.duration}}for(var n=[],r=o(t.b),i=r.next();!i.done;i=r.next())n.push(e(i.value));return t.a&&n.push(e(t.a)),n}function Ys(){this.b=this.c=null,this.a=[]}function Ws(t,e,n){t.b!=e&&(t.b=e,t.a.push({timestamp:Date.now()/1e3,id:e.id,type:"text",fromAdaptation:n,bandwidth:null}))}function $s(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN,this.a=new qs,this.b=new Ys}function Js(e,n){var r=this;lt.call(this),this.g=Fh,this.a=null,this.$a=!1,this.i=new At,this.rc=this.j=this.xb=this.b=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.F=this.h=this.N=null,this.Ad=1e9,this.Tb=new Set,this.eb=!0,this.ka=null,this.yd=!1,this.wd=0,this.ja=null,this.C=new ia,this.c=yu(this),this.Ub={width:1/0,height:1/0},this.v=null,this.Rb=new da(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.Ka=this.c.preferredTextLanguage,this.yb=this.c.preferredTextRole,n&&n(this),this.N=lu(this),It(this.i,t,"online",function(){r.ad()}),this.w={name:"detach"},this.S={name:"attach"},this.Ca={name:"unload"},this.yc={name:"manifest-parser"},this.xc={name:"manifest"},this.ab={name:"media-source"},this.sc={name:"drm-engine"},this.W={name:"load"},this.Ac={name:"src-equals-drm-engine"},this.cb={name:"src-equals"};var i=new Map;i.set(this.S,function(t,e){return at(Zs(r,t,e))}),i.set(this.w,function(t){return t.u&&(r.i.ma(t.u,"error"),t.u=null),r.a=null,t=Promise.resolve(),at(t)}),i.set(this.Ca,function(t){return at(tu(r,t))}),i.set(this.ab,function(t){return t=eu(r,t),at(t)}),i.set(this.yc,function(t,e){return at(nu(r,t,e))}),i.set(this.xc,function(t){return ru(r,t)}),i.set(this.sc,function(){return at(iu(r))}),i.set(this.W,function(t,e){return at(au(r,t,e))}),i.set(this.Ac,function(t){return t=ou(r,t),at(t)}),i.set(this.cb,function(t,e){return su(r,t,e)}),this.fb=new Ns(this.w,{Ke:function(t,e,n,i){var a=null;return t==r.w&&(a=n==r.w?r.w:r.S),t==r.S&&(a=n==r.w||e.u!=i.u?r.w:n==r.S?r.S:n==r.ab||n==r.W?r.ab:n==r.cb?r.Ac:null),t==r.ab&&(a=n==r.W&&e.u==i.u?r.yc:r.Ca),t==r.yc&&(a=Yu(r.W,r.xc,r.Ca,n,e,i)),t==r.xc&&(a=Yu(r.W,r.sc,r.Ca,n,e,i)),t==r.sc&&(a=Yu(r.W,r.W,r.Ca,n,e,i)),t==r.Ac&&(a=n==r.cb&&e.u==i.u?r.cb:r.Ca),t!=r.W&&t!=r.cb||(a=r.Ca),t==r.Ca&&(a=i.u&&e.u==i.u?r.S:r.w),a},ue:function(t,e,n){return r.dispatchEvent(new ut("onstatechange",{state:t.name})),i.get(t)(e,n)},handleError:function(t){return c(function e(){return A(e,function(e){switch(e.l){case 1:return d(e,tu(r,t),2);case 2:return e.return(t.u?r.S:r.w)}})})},af:function(t){r.dispatchEvent(new ut("onstateidle",{state:t.name}))}}),e&&this.zb(e,!0)}function Qs(t){if(t.va)return!1;if(!jt())return!0;var e=t.mimeType;return t=t.uri||"",e||(e={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[Eh.getExtension(t)]),!!e&&(!!Bt(e)&&(!Eh.isSupported(t,e)||!!navigator.vendor&&navigator.vendor.includes("Apple")))}function Zs(t,e,n){return null==e.u&&(e.u=n.u,It(t.i,e.u,"error",function(){var e=Du(t);e&&t.Ha(e)})),t.a=e.u,Promise.resolve()}function tu(t,e){return c(function n(){return A(n,function(n){switch(n.l){case 1:if(t.g!=Kh&&(t.g=Fh),t.dispatchEvent(new ut("unloading")),e.currentTime=null,e.va=null,e.mimeType=null,e.startTime=null,e.uri=null,e.u&&(t.i.ma(e.u,"loadeddata"),t.i.ma(e.u,"playing"),t.i.ma(e.u,"pause"),t.i.ma(e.u,"ended"),t.i.ma(e.u,"ratechange")),t.bb&&(t.bb.a(),t.bb=null),t.Qb&&(t.Qb.stop(),t.Qb=null),!t.m){n.A(2);break}return d(n,t.m.stop(),3);case 3:t.m=null;case 2:if(!t.j){n.A(4);break}return d(n,t.j.stop(),4);case 4:if(!t.f){n.A(6);break}return d(n,t.f.destroy(),7);case 7:t.f=null;case 6:if(t.o&&(t.o.a(),t.o=null),!t.F){n.A(8);break}return d(n,t.F.destroy(),9);case 9:t.F=null;case 8:if(e.u&&e.u.src&&(e.u.removeAttribute("src"),e.u.load()),!t.h){n.A(10);break}return d(n,t.h.destroy(),11);case 11:t.h=null;case 10:t.C.a.clear(),t.xb=null,t.V=null,t.Tb.clear(),t.b=null,t.v=null,t.eb=!0,Su(t),p(n)}})})}function eu(e,n){return c(function r(){var i,a,o,s;return A(r,function(r){switch(r.l){case 1:return i=t.muxjs?new Ce:new Ne,a=e.c.textDisplayFactory,o=new a,s=new $e(n.u,i,o),d(r,s.o,2);case 2:e.F=s,p(r)}})})}function nu(t,e,n){return c(function r(){var i,a,o;return A(r,function(r){switch(r.l){case 1:if(e.va=n.va,e.mimeType=n.mimeType,e.uri=n.uri,i=e.uri,a=t.N,t.xb=i,e.va){t.m=e.va(),r.A(2);break}return o=t,d(r,Eh.create(i,a,t.c.manifest.retryParameters,e.mimeType),3);case 3:o.m=r.s;case 2:t.m.configure(t.c.manifest),p(r)}})})}function ru(t,e){var n=e.uri,r=t.N;t.Pb=new Ga,za(t.Pb,function(e){Ru(t,"timelineregionadded",e)});var i={networkingEngine:r,filterNewPeriod:function(e){return t.Bc(e)},filterAllPeriods:function(e){return bu(t,e)},onTimelineRegionAdded:function(e){var n=t.Pb;t:{for(var r=o(n.b),i=r.next();!i.done;i=r.next())if(i=i.value,i.schemeIdUri==e.schemeIdUri&&i.startTime==e.startTime&&i.endTime==e.endTime){r=i;break t}r=null}null==r&&(n.b.add(e),n.c(e))},onEvent:function(e){return t.dispatchEvent(e)},onError:function(e){return t.Ha(e)}};return new et(Promise.resolve().then(function(){return c(function e(){var r;return A(e,function(e){switch(e.l){case 1:return r=t,d(e,t.m.start(n,i),2);case 2:if(r.b=e.s,t.dispatchEvent(new ut("manifestparsed")),0==t.b.periods.length)throw new Z(2,4,4014);uu(t.b.periods),p(e)}})})}),function(){return t.m.stop()})}function iu(t){return c(function e(){return A(e,function(e){switch(e.l){case 1:return t.h=new te({nb:t.N,onError:function(e){t.Ha(e)},gc:function(e){Lu(t,e)},onExpirationUpdated:function(e,n){Ou(t,e,n)},onEvent:function(e){t.dispatchEvent(e)}}),t.h.configure(t.c.drm),d(e,re(t.h,ka(t.b.periods),t.b.offlineSessionIds),2);case 2:bu(t,t.b.periods),p(e)}})})}function au(t,e,n){return c(function r(){var i,a,s,u,c,l,f,h,m;return A(r,function(r){switch(r.l){case 1:return e.startTime=n.startTime,i=e.u,a=e.uri,t.xb=a,t.v=new $s,s=function(){return xu(t)},u=function(){var e=t.a.playbackRate;0!=e&&t.K.set(e)},It(t.i,i,"playing",s),It(t.i,i,"pause",s),It(t.i,i,"ended",s),It(t.i,i,"ratechange",u),c=t.c.abrFactory,t.j&&t.rc==c||(t.rc=c,t.j=new c,t.j.configure(t.c.abr)),gu(t,t.b.periods),t.Rb=new da(t.c.preferredAudioLanguage,t.c.preferredVariantRole,t.c.preferredAudioChannelCount),t.Ka=t.c.preferredTextLanguage,Uu(t.b.presentationTimeline,t.c.playRangeStart,t.c.playRangeEnd),d(r,t.h.zb(i),2);case 2:return t.j.init(function(e,n,r){n=void 0!==n&&n,r=void 0===r?0:r;t:{for(var i=o(t.b.periods),a=i.next();!a.done;a=i.next())if(a=a.value,a.variants.includes(e)){i=a;break t}i=null}vu(t,i,e,!0),t.f&&(eo(t.f,e,n,r),Iu(t))}),t.o=fu(t,e.startTime),t.bb=hu(t),t.K=new Pa({cc:function(){return e.u.playbackRate},ed:function(t){e.u.playbackRate=t},Ed:function(t){e.u.currentTime+=t}}),l=Math.max(t.b.minBufferTime,t.c.streaming.rebufferingGoal),du(t,l),t.f=pu(t),t.f.configure(t.c.streaming),cu(t),t.g=Vh,t.dispatchEvent(new ut("streaming")),d(r,t.f.start(),3);case 3:t.c.streaming.startAtSegmentBoundary&&(f=t.o.i(),h=Eu(t,f),t.o.o(h)),t.b.periods.forEach(t.Bc.bind(t)),_u(t),Iu(t),m=qu(t),m.variants.some(function(t){return t.primary}),ku(t,m.variants),_t(t.i,i,"loadeddata",function(){t.v.c=Date.now()/1e3-n.hd}),p(r)}})})}function ou(t,e){return c(function n(){var r,i;return A(n,function(n){switch(n.l){case 1:return r=Lf,t.h=new te({nb:t.N,onError:function(e){t.Ha(e)},gc:function(e){Lu(t,e)},onExpirationUpdated:function(e,n){Ou(t,e,n)},onEvent:function(e){t.dispatchEvent(e)}}),t.h.configure(t.c.drm),i={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:r.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},d(n,re(t.h,[i],[]),2);case 2:return d(n,t.h.zb(e.u),0)}})})}function su(t,e,n){function r(){return xu(t)}if(e.uri=n.uri,e.startTime=n.startTime,t.xb=e.uri,t.v=new $s,t.o=new ja(e.u),null!=e.startTime&&t.o.o(e.startTime),t.K=new Pa({cc:function(){return e.u.playbackRate},ed:function(t){e.u.playbackRate=t},Ed:function(t){e.u.currentTime+=t}}),du(t,t.c.streaming.rebufferingGoal),It(t.i,e.u,"playing",r),It(t.i,e.u,"pause",r),It(t.i,e.u,"ended",r),_t(t.i,e.u,"loadeddata",function(){t.v.c=Date.now()/1e3-n.hd}),t.a.audioTracks&&(It(t.i,t.a.audioTracks,"addtrack",function(){return _u(t)}),It(t.i,t.a.audioTracks,"removetrack",function(){return _u(t)})),t.a.textTracks){var i=t.a.textTracks;It(t.i,i,"addtrack",function(){return _u(t)}),It(t.i,i,"removetrack",function(){return _u(t)})}e.u.src=e.uri,t.g=Hh,t.dispatchEvent(new ut("streaming"));var a=new tt;return t.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?a.resolve():t.a.error?a.reject(Du(t)):(_t(t.i,t.a,"loadeddata",function(){a.resolve()}),_t(t.i,t.a,"error",function(){a.reject(Du(t))})),new et(a,function(){return a.reject(new Z(2,7,7001)),Promise.resolve()})}function uu(t){function e(t){return t.video&&t.audio||t.video&&t.video.codecs.includes(",")}t.some(function(t){return t.variants.some(e)})&&t.forEach(function(t){t.variants=t.variants.filter(e)})}function cu(t){function e(t){var e="";t.video&&(e=Ut(t.video.codecs)[0]);var n="";return t.audio&&(n=Ut(t.audio.codecs)[0]),e+"-"+n}var n=t.b.periods.reduce(function(t,e){return t.concat(e.variants)},[]);n=kn(n,t.c.preferredAudioChannelCount);var r=new ct;n.forEach(function(t){var n=e(t);r.push(n,t)});var i=null,a=1/0;r.forEach(function(t,e){var n=0,r=0;e.forEach(function(t){n+=t.bandwidth||0,++r});var o=n/r;o=t.a.duration-.1;break;case Vh:t:{var n;if((n=t.a.ended)||(n=t.F,n=!n.g||"ended"==n.g.readyState),n)e=!0;else{if(t.b.presentationTimeline.U()&&(n=t.b.presentationTimeline.jb(),Re(t.a.buffered)>=n)){e=!0;break t}e=!1}}break;default:e=!1}var r=Le(t.a.buffered,t.a.currentTime);n=t.V;var i=e,a=n.b.get(n.a);e=n.a,r=i||r>=a?Nh:Ch,n.a=r,e!=r&&Su(t)}).Ia(.25)}function pu(t){return new Wa(t.b,{Qa:function(){return t.o.i()},L:t.F,nb:t.N,Hd:t.Ze.bind(t),Gd:t.pe.bind(t),onError:t.Ha.bind(t),onEvent:function(e){return t.dispatchEvent(e)},cf:t.df.bind(t),Uc:t.kf.bind(t)})}function mu(t){if(t.m&&t.m.configure(t.c.manifest),t.h&&t.h.configure(t.c.drm),t.f){t.f.configure(t.c.streaming);try{t.b.periods.forEach(t.Bc.bind(t))}catch(e){t.Ha(e)}var e=$a(t.f),n=Ja(t.f),r=qu(t);e=_n(e,n,r.variants),t.j&&e&&e.allowedByApplication&&e.allowedByKeySystem?ku(t,r.variants):Au(t,r)}t.j&&(t.j.configure(t.c.abr),t.c.abr.enabled&&!t.eb?t.j.enable():t.j.disable(),Nu(t))}function vu(t,e,n,r){oa(t.C,e).variant=n,t=t.v.b,t.c!=n&&(t.c=n,t.a.push({timestamp:Date.now()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function yu(t){var e=Fs();return e.streaming.failureCallback=function(e){var n=[1001,1002,1003];t.U()&&n.includes(e.code)&&(e.severity=1,t.ad())},e.textDisplayFactory=function(){return new Us(t.a)},e}function gu(t,e){for(var n=0;nn&&(n+=Math.pow(2,32)),n=n.toString(16)),new Z(2,3,3016,e,n,t.a.error.message)}function Lu(t,e){if(t.f){var n=qu(t),r=!1,i=Object.keys(e),a=1==i.length&&"00"==i[0];i.length&&n.variants.forEach(function(t){Pn(t).forEach(function(n){var i=t.allowedByKeySystem;n.keyId&&(n=e[a?"00":n.keyId],t.allowedByKeySystem=!!n&&!jh.includes(n)),i!=t.allowedByKeySystem&&(r=!0)})}),i=$a(t.f);(i=_n(i,Ja(t.f),n.variants))&&!i.allowedByKeySystem&&Au(t,n),r&&(_u(t),ku(t,n.variants))}}function Ou(t,e,n){t.m&&t.m.onExpirationUpdated&&t.m.onExpirationUpdated(e,n),t.dispatchEvent(new ut("expirationupdated"))}function Uu(t,e,n){0=a&&(a=t.bandwidth),r.a[e.id]=i,r.a[n.id]=a}}),t.textStreams.forEach(function(t){r.a[t.id]=52})});var s=Oc(i),u=new Map;s=o(s);for(var c=s.next();!c.done;c=s.next()){c=c.value;var l=Pc(t,e,n,r,i,c);u.set(c.id,l)}return a.variants.forEach(function(t){t.audio&&u.get(t.audio.id).variantIds.push(t.id),t.video&&u.get(t.video.id).variantIds.push(t.id)}),{startTime:a.startTime,streams:Array.from(u.values())}}function Pc(t,e,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Db();var s=a.id;return Mc(a,i,function(i){var u=Wr(i.c(),i.b,i.a,t.a.streaming.retryParameters);jo(e,s,u,ec(r,a.id,i),function(e){return n.addSegments([{data:e}]).then(function(e){t.c.push(e[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:e[0]})})})}),(i=a.initSegmentReference)&&(i=Wr(i.c(),i.b,i.a,t.a.streaming.retryParameters),jo(e,s,i,.5*nc(r,a.id),function(e){return n.addSegments([{data:e}]).then(function(e){t.c.push(e[0]),o.initSegmentKey=e[0]})})),o}function Mc(t,e,n){e=t.findSegmentPosition(e);for(var r=null==e?null:t.getSegmentReference(e);r;)n(r),r=t.getSegmentReference(++e)}function Cc(t){if(t.h.a)throw new Z(2,9,7001)}function Nc(){if(!mc())throw new Z(2,9,9e3)}function Rc(t,e){return c(function n(){return A(n,function(n){switch(n.l){case 1:return t.g.push(e),v(n,2),d(n,e,4);case 4:return n.return(n.s);case 2:b(n),dt(t.g,e),w(n,0)}})})}function Dc(t){var e=[];return t.periods.forEach(function(t){t.streams.forEach(function(t){null!=t.initSegmentKey&&e.push(t.initSegmentKey),t.segments.forEach(function(t){e.push(t.dataKey)})})}),e}function Lc(t,e,n,r){return c(function i(){var a,o,s;return A(i,function(i){switch(i.l){case 1:return r.drmInfo?(a=Zo(n),o=r.sessionIds.map(function(t){return{sessionId:t,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:wc(r,!1),videoCapabilities:wc(r,!0)}}),d(i,Ps(e,t,o),2)):i.return();case 2:return s=i.s,d(i,a.remove(s),3);case 3:return d(i,a.add(o.filter(function(t){return-1==s.indexOf(t.sessionId)})),0)}})})}function Oc(t){var e=new Set;t=o(t.periods);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var r=o(n.textStreams),i=r.next();!i.done;i=r.next())e.add(i.value);for(n=o(n.variants),r=n.next();!r.done;r=n.next())r=r.value,r.audio&&e.add(r.audio),r.video&&e.add(r.video)}return e}function Uc(t){if(0==t.periods.length)throw new Z(2,4,4014);t=o(t.periods);for(var e=t.next();!e.done;e=t.next())jc(e.value)}function jc(t){t.variants.map(function(t){return t.video});var e=new Set(t.variants.map(function(t){return t.audio}));t=t.textStreams;for(var n=o(e),r=n.next();!r.done;r=n.next()){r=o(e);for(var i=r.next();!i.done;i=r.next());}for(e=o(t),n=e.next();!n.done;n=e.next())for(n=o(t),r=n.next();!r.done;r=n.next());}function Bc(t,e){e=e||0;for(var n={priority:e,ne:t},r=0;r=e.a.length)return t;for(var n=[],r=0;rn.length)return null;var i=null,a=t;for(t=null;a&&!(t=a.getAttribute(e))&&(a=a.parentNode)instanceof Element;);if(e=t)for(t=0;ti&&(i=Math.max(i+r,0));i=i}}),s("Array.prototype.find",function(t){return t||function(t,e){return _(this,t,e).ee}});var vf=this;vf.a=!0,O.prototype.getBandwidthEstimate=function(t){return 128e3>this.a?t:Math.min(L(this.b),L(this.c))},t.console&&t.console.log.bind&&(j=console.warn.bind(console),U=console.error.bind(console));var yf=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;of=K.prototype,of.sa="",of.Xa="",of.oa="",of.tb=null,of.fa="",of.Oa="",of.toString=function(){var t=[],e=this.sa;if(e&&t.push(G(e,gf,!0),":"),e=this.oa){t.push("//");var n=this.Xa;n&&t.push(G(n,gf,!0),"@"),t.push(encodeURIComponent(e).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e=this.tb,null!=e&&t.push(":",String(e))}return(e=this.fa)&&(this.oa&&"/"!=e.charAt(0)&&t.push("/"),t.push(G(e,"/"==e.charAt(0)?wf:bf,!0))),(e=this.a.toString())&&t.push("?",e),(e=this.Oa)&&t.push("#",G(e,Ef)),t.join("")},of.resolve=function(t){var e=this.clone();"data"===e.sa&&(e=new K);var n=!!t.sa;n?F(e,t.sa):n=!!t.Xa,n?e.Xa=t.Xa:n=!!t.oa,n?e.oa=t.oa:n=null!=t.tb;var r=t.fa;if(n)V(e,t.tb);else if(n=!!t.fa){if("/"!=r.charAt(0))if(this.oa&&!this.fa)r="/"+r;else{var i=e.fa.lastIndexOf("/");-1!=i&&(r=e.fa.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;or||n&&1e3>r)&&e&&!e.ua&&(this.b.delete(t),t.close().catch(function(){})),Ae(this)&&(this.j.resolve(),this.K.O(Rf))};var Cf=1,Nf=5,Rf=.5;Ce.prototype.init=function(t){var e=muxjs.mp4.probe;t=new Uint8Array(t),this.g=e.videoTrackIds(t),this.f=e.timescale(t),this.a.init()},Ce.prototype.b=function(t,e){var n=new Uint8Array(t);(n=this.a.parse(n,this.g,this.f))&&n.captions&&e(n.captions),this.a.clearParsedCaptions()},Ce.prototype.c=function(){this.a.resetCaptionStream()},Ne.prototype.init=function(){},Ne.prototype.b=function(){},Ne.prototype.c=function(){};var Df={te:function(t,e){return t.reduce(function(t,e,n){return e.catch(t.bind(null,n))}.bind(null,e),Promise.reject())},uc:function(t,e){return t.concat(e)},Gb:function(){},Da:function(t){return null!=t}},Lf={La:"video",wb:"audio",na:"text",jg:"application"},Of=1/15;Be.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},Be.prototype.i=function(t){this.c=t.captions;var e=new Uint8Array(t.data.byteLength+t.initSegment.byteLength);e.set(t.initSegment,0),e.set(t.data,t.initSegment.byteLength),this.g.push(e)},Be.prototype.h=function(){var t={data:Zt.apply(null,this.g),captions:this.c};this.b.resolve(t),this.f=!1},C("shaka.text.Cue",He);var Uf="auto";He.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Uf};var jf="center",Bf={LEFT:"left",RIGHT:"right",CENTER:jf,START:"start",END:"end"};He.textAlign=Bf;var Kf="after",Ff={BEFORE:"before",CENTER:"center",AFTER:Kf};He.displayAlign=Ff;var Vf="ltr";He.direction={HORIZONTAL_LEFT_TO_RIGHT:Vf,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Hf="horizontal-tb";He.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Hf,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var qf=0;He.lineInterpretation={LINE_NUMBER:qf,PERCENTAGE:1};var Gf="start",zf={CENTER:"center",START:Gf,END:"end"};He.lineAlign=zf;var Xf=400;He.fontWeight={NORMAL:Xf,BOLD:700};var Yf="normal",Wf={NORMAL:Yf,ITALIC:"italic",OBLIQUE:"oblique"};He.fontStyle=Wf,He.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},C("shaka.text.CueRegion",qe);var $f=1;qe.units={PX:0,PERCENTAGE:$f,LINES:2};var Jf="";qe.scrollMode={NONE:Jf,UP:"up"};var Qf={};C("shaka.text.TextEngine.registerParser",function(t,e){Qf[t]=e}),C("shaka.text.TextEngine.unregisterParser",function(t){delete Qf[t]}),Ge.prototype.destroy=function(){return this.c=this.g=null,this.i.clear(),Promise.resolve()},Ge.prototype.Gc=function(t){var e={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(t),e)[0].startTime}catch(t){throw new Z(2,2,2009,t)}},Ge.prototype.remove=function(t,e){return Promise.resolve().then(function(){!this.c||!this.c.remove(t,e)||null==this.a||e<=this.a||t>=this.b||(t<=this.a&&e>=this.b?this.a=this.b=null:t<=this.a&&ethis.a&&e>=this.b&&(this.b=t))}.bind(this))},Ge.prototype.me=function(t){this.c.append(t)},Ge.prototype.appendCues=Ge.prototype.me,Ge.prototype.nc=function(t,e){this.j=t;var n=this.i.get(t);if(n)for(var r=o(n.keys()),i=r.next();!i.done;i=r.next())(i=n.get(i.value))&&(i=i.filter(function(t){return t.endTime<=e}),this.c.append(i))},Ge.prototype.setSelectedClosedCaptionId=Ge.prototype.nc;var Zf=t.URL.createObjectURL;of=$e.prototype,of.destroy=function(){var t=this;this.v=!0;var e,n=[];for(e in this.c){var r=this.c[e],i=r[0];for(this.c[e]=r.slice(0,1),i&&n.push(i.p.catch(Df.Gb)),i=1;ie&&(e+=.001),this.b[t].timestampOffset=e,this.qb(t)},of.Kf=function(t,e,n){this.b[t].appendWindowStart=0,this.b[t].appendWindowEnd=n,this.b[t].appendWindowStart=e,this.qb(t)},of.Sf=function(t){this.c[t][0].p.reject(new Z(2,3,3014,this.f.error?this.f.error.code:0))},of.qb=function(t){var e=this.c[t][0];e&&(e.p.resolve(),cn(this,t))};var th=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),eh=0;C("shaka.abr.SimpleAbrManager",Mn),Mn.prototype.stop=function(){this.h=null,this.f=!1,this.c=[],this.g=null},Mn.prototype.stop=Mn.prototype.stop,Mn.prototype.init=function(t){this.h=t},Mn.prototype.init=Mn.prototype.init,Mn.prototype.chooseVariant=function(){var t=Cn(this.a.restrictions,this.c),e=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!t.length&&(t=Cn(null,this.c),t=[t[0]]);for(var n=t[0]||null,r=0;r=i.bandwidth/this.a.bandwidthDowngradeTarget&&e<=a&&(n=i)}return this.g=Date.now(),n},Mn.prototype.chooseVariant=Mn.prototype.chooseVariant,Mn.prototype.enable=function(){this.f=!0},Mn.prototype.enable=Mn.prototype.enable,Mn.prototype.disable=function(){this.f=!1},Mn.prototype.disable=Mn.prototype.disable,Mn.prototype.segmentDownloaded=function(t,e){var n=this.b;if(!(16e3>e)){var r=8e3*e/t,i=t/1e3;n.a+=e,D(n.b,i,r),D(n.c,i,r)}if(null!=this.g&&this.f)t:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break t}else{if(!(128e3<=this.b.a))break t;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},Mn.prototype.segmentDownloaded=Mn.prototype.segmentDownloaded,Mn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Mn.prototype.getBandwidthEstimate=Mn.prototype.getBandwidthEstimate,Mn.prototype.setVariants=function(t){this.c=t},Mn.prototype.setVariants=Mn.prototype.setVariants,Mn.prototype.configure=function(t){this.a=t},Mn.prototype.configure=Mn.prototype.configure,Nn.prototype.toString=function(){return"v"+this.a+"."+this.b};var nh=null,rh="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ih="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ah=["loop","playbackRate"],oh=["pause","play"],sh="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),uh={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},ch={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},lh=[["getConfiguration","configure"]],fh=[["isTextTrackVisible","setTextTrackVisibility"]],hh="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),dh=["attach","detach","load","unload"],ph=!1,mh=null;of=Bn.prototype,of.destroy=function(){return Fn(this),mh&&Kn(this),this.f&&(this.f.stop(),this.f=null),this.K=this.F=null,this.b=this.h=!1,this.o=this.m=this.g=this.c=this.a=this.i=null,Promise.resolve()},of.da=function(){return this.b},of.Xc=function(){return this.C},of.init=function(){if(t.chrome&&chrome.cast&&chrome.cast.isAvailable){delete t.__onGCastApiAvailable,this.h=!0,this.f.oc();var e=new chrome.cast.SessionRequest(this.N);e=new chrome.cast.ApiConfig(e,this.Kd.bind(this),this.jf.bind(this),"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),ph&&this.f.O(.02),(e=mh)&&e.status!=chrome.cast.SessionStatus.STOPPED?this.Kd(e):mh=null}else t.__onGCastApiAvailable=function(t){t&&this.init()}.bind(this)},of.cd=function(t){this.i=t,this.b&&Vn({type:"appData",appData:this.i})},of.cast=function(t){return this.h?ph?this.b?Promise.reject(new Z(1,8,8002)):(this.g=new tt,chrome.cast.requestSession(this.Vc.bind(this,t),this.Id.bind(this)),this.g):Promise.reject(new Z(1,8,8001)):Promise.reject(new Z(1,8,8e3))},of.Zb=function(){this.b&&(Fn(this),mh&&(Kn(this),mh.stop(function(){},function(){}),mh=null))},of.get=function(t,e){if("video"==t){if(oh.includes(e))return this.Ud.bind(this,t,e)}else if("player"==t){if(ch[e]&&!this.get("player","isLive")())return function(){};if(hh.includes(e))return this.Ud.bind(this,t,e);if(dh.includes(e))return this.zf.bind(this,t,e);if(uh[e])return this.Rd.bind(this,t,e)}return this.Rd(t,e)},of.set=function(t,e,n){this.a[t][e]=n,Vn({type:"set",targetName:t,property:e,value:n})},of.Vc=function(t,e){mh=e,e.addUpdateListener(this.m),e.addMessageListener("urn:x-cast:com.google.shaka.v2",this.o),this.Jd(),Vn({type:"init",initState:t,appData:this.i}),this.g.resolve()},of.Id=function(t){var e=8003;switch(t.code){case"cancel":e=8004;break;case"timeout":e=8005;break;case"receiver_unavailable":e=8006}this.g.reject(new Z(2,8,e,t))},of.Rd=function(t,e){return this.a[t][e]},of.Ud=function(t,e,n){for(var r=[],i=2;ithis.I.byteLength&&vr();var e=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,t);return this.a+=t,new Uint8Array(e)},mr.prototype.readBytes=mr.prototype.Va,mr.prototype.J=function(t){this.a+t>this.I.byteLength&&vr(),this.a+=t},mr.prototype.skip=mr.prototype.J,mr.prototype.Wd=function(t){this.at||t>this.I.byteLength)&&vr(),this.a=t},mr.prototype.seek=mr.prototype.seek,mr.prototype.Wc=function(){for(var t=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;return t=new Uint8Array(this.I.buffer,this.I.byteOffset+t,this.a-t),this.a+=1,Vt(t)},mr.prototype.readTerminatedString=mr.prototype.Wc,C("shaka.util.Mp4Parser",yr),yr.prototype.G=function(t,e){var n=Tr(t);return this.c[n]=0,this.b[n]=e,this},yr.prototype.box=yr.prototype.G,yr.prototype.ca=function(t,e){var n=Tr(t);return this.c[n]=1,this.b[n]=e,this},yr.prototype.fullBox=yr.prototype.ca,yr.prototype.stop=function(){this.a=!0},yr.prototype.stop=yr.prototype.stop,yr.prototype.parse=function(t,e){var n=new Uint8Array(t);for(n=new mr(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.pa()&&!this.a;)this.ic(0,n,e)},yr.prototype.parse=yr.prototype.parse,yr.prototype.ic=function(t,e,n){var r=e.aa(),i=e.D(),a=e.D();switch(i){case 0:i=e.I.byteLength-r;break;case 1:i=e.ub()}var o=this.b[a];if(o){var s=null,u=null;1==this.c[a]&&(u=e.D(),s=u>>>24,u&=16777215),a=r+i,n&&a>e.I.byteLength&&(a=e.I.byteLength),a-=e.aa(),e=0=n.startTime&&tt||t>=this.a.length?null:this.a[t])},kr.prototype.get=kr.prototype.get,kr.prototype.offset=function(t){for(var e=0;ea.startTime?0==n&&e.push(a):(.1t)return void this.a.splice(0,e);this.a=[]},kr.prototype.evict=kr.prototype.zc;var Th;Ir.prototype.pa=function(){return this.a.pa()},Nr.prototype.parse=function(t,e,n,r){var i;if(e=new Ir(new DataView(e)),440786851!=_r(e).id)throw new Z(2,3,3008);var a=_r(e);if(408125543!=a.id)throw new Z(2,3,3009);for(e=a.a.byteOffset,a=new Ir(a.a),i=null;a.pa();){var o=_r(a);if(357149030==o.id){i=o;break}}if(!i)throw new Z(2,3,3010);for(a=new Ir(i.a),i=1e6,o=null;a.pa();){var s=_r(a);if(2807729==s.id)i=Cr(s);else if(17545==s.id)if(o=s,4==o.a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new Z(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new Z(2,3,3011);if(a=i/1e9,i=o*a,t=_r(new Ir(new DataView(t))),475249515!=t.id)throw new Z(2,3,3007);return Rr(t,e,a,i,n,r)};var Eh={sb:{},Ib:{},Zc:function(t,e){Eh.Ib[t]=e}};C("shaka.media.ManifestParser.registerParserByExtension",Eh.Zc),Eh.Kb=function(t,e){Eh.sb[t]=e},C("shaka.media.ManifestParser.registerParserByMime",Eh.Kb),Eh.vf=function(){var t={};if(jt()){for(var e in Eh.sb)t[e]=!0;for(var n in Eh.Ib)t[n]=!0}e={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"},n=o(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var r=n.next();!r.done;r=n.next())r=r.value,t[r]=jt()?!!Eh.sb[r]:Bt(r);for(var i in e)t[i]=jt()?!!Eh.Ib[i]:Bt(e[i]);return t},Eh.create=function(t,e,n,r){return c(function i(){var a,o;return A(i,function(i){switch(i.l){case 1:return m(i,2),d(i,Eh.Ce(t,e,n,r),4);case 4:return a=i.s,i.return(new a);case 2:throw o=g(i),o.severity=2,o}})})},Eh.Ce=function(t,e,n,r){return c(function i(){var a,o,s,u,c;return A(i,function(i){switch(i.l){case 1:if(a=Eh,r&&(o=a.sb[r.toLowerCase()]))return i.return(o);if((s=a.getExtension(t))&&(u=a.Ib[s]))return i.return(u);if(r){i.A(2);break}return d(i,a.Je(t,e,n),3);case 3:if((r=i.s)&&(c=Eh.sb[r]))return i.return(c);case 2:throw new Z(2,4,4e3,t)}})})},Eh.Je=function(t,e,n){return c(function r(){var i,a,o;return A(r,function(r){switch(r.l){case 1:return i=wt([t],n),i.method="HEAD",d(r,e.request(0,i).promise,2);case 2:return a=r.s,o=a.headers["content-type"],r.return(o?o.toLowerCase():"")}})})},Eh.getExtension=function(t){return t=new K(t).fa.split("/").pop().split("."),1==t.length?"":t.pop().toLowerCase()},Eh.isSupported=function(t,e){return!!jt()&&(e in Eh.sb||Eh.getExtension(t)in Eh.Ib)},C("shaka.media.PresentationTimeline",Yr),Yr.prototype.Y=function(){return this.g},Yr.prototype.getDuration=Yr.prototype.Y,Yr.prototype.ta=function(t){this.g=t},Yr.prototype.setDuration=Yr.prototype.ta,Yr.prototype.Oe=function(){return this.f},Yr.prototype.getPresentationStartTime=Yr.prototype.Oe,Yr.prototype.Zd=function(t){this.j=t},Yr.prototype.setClockOffset=Yr.prototype.Zd,Yr.prototype.Ob=function(t){this.m=t},Yr.prototype.setStatic=Yr.prototype.Ob,Yr.prototype.fd=function(t){this.h=t},Yr.prototype.setSegmentAvailabilityDuration=Yr.prototype.fd,Yr.prototype.Lf=function(t){this.lc=t},Yr.prototype.setDelay=Yr.prototype.Lf,Yr.prototype.Ae=function(){return this.lc},Yr.prototype.getDelay=Yr.prototype.Ae,Yr.prototype.ob=function(t,e){if(0!=t.length){var n=t[t.length-1].endTime+e;this.Rc(t[0].startTime+e),this.a=t.reduce(function(t,e){return Math.max(t,e.endTime-e.startTime)},this.a),this.b=Math.max(this.b,n),null!=this.f&&this.o&&(this.f=(Date.now()+this.j)/1e3-this.b-this.a)}},Yr.prototype.notifySegments=Yr.prototype.ob,Yr.prototype.Rc=function(t){this.c=null==this.c?t:Math.min(this.c,t)},Yr.prototype.notifyMinSegmentStartTime=Yr.prototype.Rc,Yr.prototype.Qc=function(t){this.a=Math.max(this.a,t)},Yr.prototype.notifyMaxSegmentDuration=Yr.prototype.Qc,Yr.prototype.offset=function(t){null!=this.c&&(this.c+=t),null!=this.b&&(this.b+=t)},Yr.prototype.offset=Yr.prototype.offset,Yr.prototype.U=function(){return 1/0==this.g&&!this.m},Yr.prototype.isLive=Yr.prototype.U,Yr.prototype.Ta=function(){return 1/0!=this.g&&!this.m},Yr.prototype.isInProgress=Yr.prototype.Ta,Yr.prototype.Db=function(){if(1/0==this.h)return this.i;var t=this.jb()-this.h;return Math.max(this.i,t)},Yr.prototype.getSegmentAvailabilityStart=Yr.prototype.Db,Yr.prototype.$d=function(t){this.i=t},Yr.prototype.setUserSeekStart=Yr.prototype.$d,Yr.prototype.jb=function(){return this.U()||this.Ta()?Math.min(Math.max(0,(Date.now()+this.j)/1e3-this.a-this.f),this.g):this.g},Yr.prototype.getSegmentAvailabilityEnd=Yr.prototype.jb,Yr.prototype.Cb=function(t){var e=Math.max(this.c,this.i);if(1/0==this.h)return e;var n=this.jb()-this.h;return t=Math.min(n+t,this.wa()),Math.max(e,t)},Yr.prototype.getSafeSeekRangeStart=Yr.prototype.Cb,Yr.prototype.ib=function(){return this.Cb(0)},Yr.prototype.getSeekRangeStart=Yr.prototype.ib,Yr.prototype.wa=function(){var t=this.U()||this.Ta()?this.lc:0;return Math.max(0,this.jb()-t)},Yr.prototype.getSeekRangeEnd=Yr.prototype.wa,Yr.prototype.de=function(){return null!=this.f&&null==this.b},Yr.prototype.usingPresentationStartTime=Yr.prototype.de,C("shaka.dash.DashParser",$r),of=$r.prototype,of.configure=function(t){this.b=t},of.start=function(t,e){var n=this;return c(function r(){var i;return A(r,function(r){switch(r.l){case 1:return n.f=[t],n.a=e,d(r,Jr(n),2);case 2:if(i=r.s,n.a&&ii(n,i),!n.a)throw new Z(2,7,7001);return r.return(n.c)}})})},of.stop=function(){return this.b=this.a=null,this.f=[],this.c=null,this.j=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},of.update=function(){Jr(this).catch(function(t){this.a&&this.a.onError(t)}.bind(this))},of.onExpirationUpdated=function(){},of.pf=function(t,e){t.ba=ai(e,t.ga,null);var n=!1,r=yh.P(e,"Role"),i=r.map(function(t){return t.getAttribute("value")}).filter(Df.Da),a=void 0,s="text"==t.ba.contentType;s&&(a="subtitle");for(var u=0;un.length||"data"!=n[0])throw new Z(2,1,1004,e);if(n=n.slice(1).join(":").split(","),2>n.length)throw new Z(2,1,1004,e);var r=n[0];n=t.decodeURIComponent(n.slice(1).join(",")),r=r.split(";");var i=null;if(1r.endTime?Lh:Dh;this.g.set(r,a);for(var s=o(this.j),u=s.next();!u.done;u=s.next())u=u.value,u.Za==i&&u.Ya==a&&u.Sa(r,e)}};var Rh=1,Dh=2,Lh=3;Wa.prototype.destroy=function(){for(var t=o(this.b.values()),e=t.next();!e.done;e=t.next())Mo(e.value);return this.b.clear(),this.i.clear(),this.g=this.h=this.v=this.c=this.a=null,this.f=!0,Promise.resolve()},Wa.prototype.configure=function(t){this.g=t,this.F=new $({maxAttempts:Math.max(t.retryParameters.maxAttempts,2),baseDelay:t.retryParameters.baseDelay,backoffFactor:t.retryParameters.backoffFactor,fuzzFactor:t.retryParameters.fuzzFactor,timeout:0},!0)},Wa.prototype.start=function(){var t=this;return c(function e(){var n,r,i;return A(e,function(e){switch(e.l){case 1:return n=t.a.Qa(),r=ko(t,n),i=t.a.Hd(t.c.periods[r]),i.variant||i.text?d(e,oo(t,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,n),2):e.return(new Z(2,5,5005));case 2:if(t.f)return e.return();t.a&&t.a.bf&&t.a.bf(),p(e)}})})},Wa.prototype.K=function(t,e,n,r){var i=r.reader.Wc(),a=r.reader.Wc(),o=r.reader.D(),s=r.reader.D(),u=r.reader.D(),c=r.reader.D();r=r.reader.Va(r.reader.I.byteLength-r.reader.aa()),t=t.startTime+e.startTime+s/o,n.includes(i)&&("urn:mpeg:dash:event:2012"==i?this.a.cf():this.a.onEvent(new ut("emsg",{detail:{startTime:t,endTime:t+u/o,schemeIdUri:i,value:a,timescale:o,presentationTimeDelta:s,eventDuration:u,id:c,messageData:r}})))},C("shaka.net.HttpFetchPlugin",Ro),Ro.h=function(t,e,n,r,i){return c(function a(){var o,s,u,l,f,h,v,b,w,T,E,S,x,k;return A(a,function(a){switch(a.l){case 1:return o=Ro.g,s=Ro.c,h=f=0,v=Date.now(),m(a,2),d(a,o(t,n),4);case 4:return u=a.s,b=u.clone().body.getReader(),T=(w=u.headers.get("Content-Length"))?parseInt(w,10):0,E=function(t){function e(){return c(function n(){var r,a;return A(n,function(n){switch(n.l){case 1:return m(n,2),d(n,b.read(),4);case 4:r=n.s,y(n,3);break;case 2:return g(n),n.return();case 3:r.done||(f+=r.value.byteLength),a=Date.now(),(100e,!c||!l){r.A(3);break}return d(r,o.updateManifestExpiration(i.key(),e),3);case 3:return b(r),d(r,a.destroy(),10);case 10:w(r,0);break;case 2:g(r),r.A(3)}})})},Eh.Kb("application/x-offline-manifest",Is),C("shaka.offline.OfflineScheme",_s),_s.a=function(t){return t={uri:t,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},it(t)},_s.b=function(t,e){var n=new Yo;return it(void 0).T(function(){return n.init()}).T(function(){return Jo(n,e.ra(),e.$())}).T(function(t){return t.getSegments([e.key()])}).T(function(t){return{uri:e,data:t[0].data,headers:{}}}).finally(function(){return n.destroy()})},bt("offline",_s),Ns.prototype.destroy=function(){var t=this;return c(function e(){var n;return A(e,function(e){switch(e.l){case 1:return t.j=!1,t.b&&t.b.abort(),Os(t),d(e,t.m,2);case 2:t.a&&t.a.qa.Ua();for(var r=o(t.f),i=r.next();!i.done;i=r.next())n=i.value,n.qa.Ua();t.a=null,t.f=[],t.g=null,p(e)}})})},C("shaka.text.SimpleTextDisplayer",Us),Us.prototype.remove=function(t,e){return!!this.a&&(Bs(this.a,function(n){return n.startTimet}),!0)},Us.prototype.remove=Us.prototype.remove,Us.prototype.append=function(t){for(var e=js,n=[],r=0;r(a=n.indexOf(".",a)));)0!=a&&"\\"==n[a-1]||(o=n.substring(o,a).replace(/\\\./g,"."),i[o]={},i=i[o],o=a+1),a+=1;i[n.substring(o).replace(/\\\./g,".")]=e,t=r}return n=Vs(this.c,t,yu(this)),mu(this),n},Js.prototype.configure=Js.prototype.configure,Js.prototype.getConfiguration=function(){var t=yu(this);return Vs(t,this.c,yu(this)),t},Js.prototype.getConfiguration=Js.prototype.getConfiguration,Js.prototype.Df=function(){for(var t in this.c)delete this.c[t];Vs(this.c,yu(this),yu(this)),mu(this)},Js.prototype.resetConfiguration=Js.prototype.Df,Js.prototype.Ee=function(){return this.g},Js.prototype.getLoadMode=Js.prototype.Ee,Js.prototype.Ie=function(){return this.a},Js.prototype.getMediaElement=Js.prototype.Ie,Js.prototype.Bb=function(){return this.N},Js.prototype.getNetworkingEngine=Js.prototype.Bb,Js.prototype.$b=function(){return this.xb},Js.prototype.getAssetUri=Js.prototype.$b,Js.prototype.He=function(){return Rn("getManifestUri",'Please use "getAssetUri" instead.'),this.$b()},Js.prototype.getManifestUri=Js.prototype.He,Js.prototype.U=function(){return this.b?this.b.presentationTimeline.U():!(!this.a||!this.a.src)&&1/0==this.a.duration},Js.prototype.isLive=Js.prototype.U,Js.prototype.Ta=function(){return!!this.b&&this.b.presentationTimeline.Ta()},Js.prototype.isInProgress=Js.prototype.Ta,Js.prototype.We=function(){if(this.b){if(!this.b.periods.length)return!1;var t=this.b.periods[0].variants;return!!t.length&&!t[0].video}return!(!this.a||!this.a.src)&&(this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight)},Js.prototype.isAudioOnly=Js.prototype.We,Js.prototype.Ff=function(){if(this.b){var t=this.b.presentationTimeline;return{start:t.ib(),end:t.wa()}}return this.a&&this.a.src&&(t=this.a.seekable,t.length)?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}},Js.prototype.seekRange=Js.prototype.Ff,Js.prototype.keySystem=function(){return this.h?this.h.keySystem():""},Js.prototype.keySystem=Js.prototype.keySystem,Js.prototype.drmInfo=function(){return this.h?this.h.a:null},Js.prototype.drmInfo=Js.prototype.drmInfo,Js.prototype.bc=function(){return this.h?this.h.bc():1/0},Js.prototype.getExpiration=Js.prototype.bc,Js.prototype.Ic=function(){return!!this.V&&this.V.a==Ch},Js.prototype.isBuffering=Js.prototype.Ic,Js.prototype.Le=function(){if(this.K){var t=this.K;t=t.g?0:t.f}else t=0;return t},Js.prototype.getPlaybackRate=Js.prototype.Le,Js.prototype.ag=function(t){0==t?j("A trick play rate of 0 is unsupported!"):(this.g==Hh&&this.K.set(t),this.g==Vh&&(this.K.set(t),to(this.f,1=o.b.periods.length?o.b.presentationTimeline.Y():o.b.periods[f].startTime,p=h-u.startTime,1/0==p)throw new Z(1,4,4033);return m=new pr(1,0,p,function(){return[t]},0,null),v={id:o.Ad++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(t){return 1==t?m:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:e,label:a||null,type:c.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},o.Tb.add(v),u.textStreams.push(v),d(s,Za(o.f,v),2);case 2:return(y=Qa(o.f,"text"))&&aa(o.C,u,y),o.Tb.delete(v),Au(o,u),_u(o),s.return(wn(v))}})})},Js.prototype.addTextTrack=Js.prototype.addTextTrack,Js.prototype.dd=function(t,e){this.Ub.width=t,this.Ub.height=e},Js.prototype.setMaxHardwareResolution=Js.prototype.dd,Js.prototype.ad=function(){if(this.g==Vh){var t=this.f;if(t.f)t=!1;else if(t.m)t=!1;else{for(var e=o(t.b.values()),n=e.next();!n.done;n=e.next())n=n.value,n.Eb&&(n.Eb=!1,Po(t,n,.1));t=!0}}else t=!1;return t},Js.prototype.retryStreaming=Js.prototype.ad,Js.prototype.Fe=function(){return this.b},Js.prototype.getManifest=Js.prototype.Fe,Js.prototype.Ge=function(){return this.m?this.m.constructor:null},Js.prototype.getManifestParserFactory=Js.prototype.Ge,of=Js.prototype,of.Bc=function(t){var e=this.f?$a(this.f):null,n=this.f?Ja(this.f):null;if(yn(this.h,e,n,t),e=t.variants,!e.some(Sn))throw new Z(2,4,4011);if(ju(this,t.variants),vn(e,this.c.restrictions,this.Ub)&&this.f&&qu(this)==t&&_u(this),t=this.h?this.h.a:null)for(e=o(e),n=e.next();!n.done;n=e.next()){n=o(n.value.drmInfos);for(var r=n.next();!r.done;r=n.next())if(r=r.value,r.keySystem==t.keySystem){r=o(r.initData||[]);for(var i=r.next();!i.done;i=r.next())i=i.value,ce(this.h,i.initDataType,i.initData)}}},of.Ze=function(t){try{this.eb=!0,this.j.disable(),Nu(this);var e=ku(this,t.variants),n=An(t.textStreams,this.Ka,this.yb)[0]||null;if(this.ka&&(t.variants.includes(this.ka)&&(e=this.ka),this.ka=null),this.ja&&(t.textStreams.includes(this.ja)&&(n=this.ja),this.ja=null),e&&vu(this,t,e,!0),n){var r=n;aa(this.C,t,r),Ws(this.v.b,r,!0)}var i=this.f,a=i.b.get("video");if(a)var o=i.c.periods[a.ya];else{var s=i.b.get("audio");o=s?i.c.periods[s.ya]:null}var u=e?e.audio:null;if(!o&&n){var c;if(c=u){t=n;var l=hn(this.c.preferredTextLanguage),f=hn(u.language),h=hn(t.language);c=ln(h,l)&&!ln(f,h)}c&&(this.$a=!0),this.$a&&this.F.h.setTextVisibility(!0),Cu(this)}return this.c.streaming.alwaysStreamText||this.Lc()?{variant:e,text:n}:{variant:e,text:null}}catch(t){return this.Ha(t),{variant:null,text:null}}},of.pe=function(){this.eb=!1,this.c.abr.enabled&&(this.j.enable(),Nu(this)),this.ka&&(eo(this.f,this.ka,this.yd,this.wd),Pu(this),this.ka=null),this.ja&&(no(this.f,this.ja,!0,0),Mu(this),this.ja=null)},of.df=function(){this.m&&this.m.update&&this.m.update()},of.kf=function(){this.o&&this.o.v()},of.Ha=function(t){if(this.g!=Kh){var e=new ut("error",{detail:t});this.dispatchEvent(e),e.defaultPrevented&&(t.handled=!0)}};var Kh=0,Fh=1,Vh=2,Hh=3;Js.LoadMode={DESTROYED:Kh,NOT_LOADED:Fh,MEDIA_SOURCE:Vh,SRC_EQUALS:Hh},rc.prototype.destroy=function(){var t=this;return this.a?this.b:(this.a=!0,this.c().then(function(){t.b.resolve()},function(){t.b.resolve()}))},lc.prototype.add=function(t){hc(this,t)||this.a.push(t)},C("shaka.offline.Storage",pc),pc.support=mc,pc.prototype.destroy=function(){return this.h.destroy()},pc.prototype.destroy=pc.prototype.destroy,pc.prototype.configure=function(t){var e=!1;return null!=t.trackSelectionCallback&&(e=!0,t.offline=t.offline||{},t.offline.trackSelectionCallback=t.trackSelectionCallback,delete t.trackSelectionCallback),null!=t.progressCallback&&(e=!0,t.offline=t.offline||{},t.offline.progressCallback=t.progressCallback,delete t.progressCallback),null!=t.usePersistentLicense&&(e=!0,t.offline=t.offline||{},t.offline.usePersistentLicense=t.usePersistentLicense,delete t.usePersistentLicense),e&&Rn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Vs(this.a,t)},pc.prototype.configure=pc.prototype.configure,pc.prototype.getConfiguration=function(){var t=Fs();return Vs(t,this.a,Fs()),t},pc.prototype.getConfiguration=pc.prototype.getConfiguration,pc.prototype.Bb=function(){return this.b},pc.prototype.getNetworkingEngine=pc.prototype.Bb,pc.prototype.store=function(t,e,n){var r=this;return Rc(this,vc(this,t,e||{},function(){return c(function e(){var i,a;return A(e,function(e){switch(e.l){case 1:return n&&"string"!=typeof n?(Rn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,e.return(new i)):d(e,Eh.create(t,r.b,r.a.manifest.retryParameters,n),2);case 2:return a=e.s,e.return(a)}})})}))},pc.prototype.store=pc.prototype.store,pc.prototype.Qe=function(){return this.f},pc.prototype.getStoreInProgress=pc.prototype.Qe,pc.prototype.remove=function(t){return Rc(this,bc(this,t))},pc.prototype.remove=pc.prototype.remove,pc.prototype.Af=function(){return Rc(this,Sc(this))},pc.prototype.removeEmeSessions=pc.prototype.Af,pc.prototype.list=function(){return Rc(this,xc())},pc.prototype.list=pc.prototype.list,pc.deleteAll=function(){return c(function t(){var e;return A(t,function(t){switch(t.l){case 1:return e=new Yo,v(t,2),d(t,e.erase(),2);case 2:return b(t),d(t,e.destroy(),5);case 5:w(t,0)}})})},Bh.offline=mc,C("shaka.polyfill.installAll",function(){for(var t=0;t=this._minDvrSize&&"live"===this.getPlaybackType()}},{key:"_duration",get:function(){return this.shakaPlayerInstance?this.seekRange.end-this.seekRange.start:0}},{key:"_startTime",get:function(){return this.seekRange.start}},{key:"presentationTimeline",get:function(){return this.shakaPlayerInstance.getManifest().presentationTimeline}}],[{key:"canPlay",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u.default.polyfill.installAll();var n=u.default.Player.isBrowserSupported(),r=t.split("?")[0].match(/.*\.(.*)$/)||[];return n&&("mpd"===r[1]||e.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),a(e,[{key:"getProgramDateTime",value:function(){return new Date(1e3*(this.presentationTimeline.getPresentationStartTime()+this.seekRange.start))}},{key:"_updateDvr",value:function(t){this.trigger(o.Events.PLAYBACK_DVR,t),this.trigger(o.Events.PLAYBACK_STATS_ADD,{dvr:t})}},{key:"seek",value:function(t){t<0&&(o.Log.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),t=this._duration),this.dvrEnabled&&this._updateDvr(t=720,this.trigger(o.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(o.Events.PLAYBACK_BITRATE,{bandwidth:t.bandwidth,width:t.width,height:t.height,level:t.id})}},{key:"_updateSettings",value:function(){"vod"===this.getPlaybackType()?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(o.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,o.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("audio/")})}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter(function(t){return t.mimeType.startsWith("video/")})}},{key:"closedCaptionsTracks",get:function(){var t=0;return(this.textTracks||[]).filter(function(t){return"subtitle"===t.kind}).map(function(e){return{id:t++,name:e.label||e.language,track:e}})}},{key:"closedCaptionsTrackId",get:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"closedCaptionsTrackId",this)},set:function(t){if(this._player){var e=this.closedCaptionsTracks,n=void 0;if(-1!==t){if(!(n=e.find(function(e){return e.id===t})))return void o.Log.warn('Track id "'+t+'" not found');if(this._shakaTTVisible&&!0===n.track.active)return void o.Log.info('Track id "'+t+'" already showing')}n?(this._player.selectTextTrack(n.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=t,this.trigger(o.Events.PLAYBACK_SUBTITLE_CHANGED,{id:t})}}}]),e}();e.default=c,t.exports=e.default},function(e,n){e.exports=t},function(t,e,n){(function(t){!function(){var n="undefined"!=typeof window?window:t,r={};for(var i in function(t,e){var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},i=void 0!==t&&t===this?this:void 0!==e&&null!=e?e:this;function a(){a=function(){},i.Symbol||(i.Symbol=s)}var o,s=(o=0,function(t){return"jscomp_symbol_"+(t||"")+o++});function u(){a();var t=i.Symbol.iterator;t||(t=i.Symbol.iterator=i.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&r(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return c(this)}}),u=function(){}}function c(t){var e=0;return l(function(){return ei&&(i=Math.max(i+r,0));i=i}}),h("Array.prototype.find",function(t){return t||function(t,e){return U(this,t,e).ee}});var j=this;function B(t,e){var n,r=t.split("."),i=j;r[0]in i||!i.execScript||i.execScript("var "+r[0]);for(;r.length&&(n=r.shift());)r.length||void 0===e?i=i[n]?i[n]:i[n]={}:i[n]=e}function F(t,e){function n(){}n.prototype=e.prototype,t.$f=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.ng=function(t,n,r){return e.prototype[n].apply(t,Array.prototype.slice.call(arguments,2))}}function K(t){this.c=Math.exp(Math.log(.5)/t),this.b=this.a=0}function V(t,e,n){var r=Math.pow(t.c,e);n=n*(1-r)+r*t.a,isNaN(n)||(t.a=n,t.b+=e)}function H(t){return t.a/(1-Math.pow(t.c,t.b))}function q(){this.b=new K(2),this.c=new K(5),this.a=0}function z(){}function G(){}function Y(){}j.a=!0,q.prototype.getBandwidthEstimate=function(t){return 128e3>this.a?t:Math.min(H(this.b),H(this.c))},t.console&&t.console.log.bind&&(G=console.warn.bind(console),z=console.error.bind(console));var X=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function W(t){var e;t instanceof W?($(this,t.sa),this.Xa=t.Xa,this.oa=t.oa,J(this,t.tb),this.fa=t.fa,Q(this,t.a.clone()),this.Oa=t.Oa):t&&(e=String(t).match(X))?($(this,e[1]||"",!0),this.Xa=Z(e[2]||""),this.oa=Z(e[3]||"",!0),J(this,e[4]),this.fa=Z(e[5]||"",!0),Q(this,e[6]||"",!0),this.Oa=Z(e[7]||"")):this.a=new st(null)}function $(t,e,n){t.sa=n?Z(e,!0):e,t.sa&&(t.sa=t.sa.replace(/:$/,""))}function J(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.tb=e}else t.tb=null}function Q(t,e,n){e instanceof st?t.a=e:(n||(e=tt(e,at)),t.a=new st(e))}function Z(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function tt(t,e,n){return"string"==typeof t?(t=encodeURI(t).replace(e,et),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function et(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}(n=W.prototype).sa="",n.Xa="",n.oa="",n.tb=null,n.fa="",n.Oa="",n.toString=function(){var t=[],e=this.sa;if(e&&t.push(tt(e,nt,!0),":"),e=this.oa){t.push("//");var n=this.Xa;n&&t.push(tt(n,nt,!0),"@"),t.push(encodeURIComponent(e).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.tb)&&t.push(":",String(e))}return(e=this.fa)&&(this.oa&&"/"!=e.charAt(0)&&t.push("/"),t.push(tt(e,"/"==e.charAt(0)?it:rt,!0))),(e=this.a.toString())&&t.push("?",e),(e=this.Oa)&&t.push("#",tt(e,ot)),t.join("")},n.resolve=function(t){var e=this.clone();"data"===e.sa&&(e=new W);var n=!!t.sa;n?$(e,t.sa):n=!!t.Xa,n?e.Xa=t.Xa:n=!!t.oa,n?e.oa=t.oa:n=null!=t.tb;var r=t.fa;if(n)J(e,t.tb);else if(n=!!t.fa){if("/"!=r.charAt(0))if(this.oa&&!this.fa)r="/"+r;else{var i=e.fa.lastIndexOf("/");-1!=i&&(r=e.fa.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o=t.i){if(!t.c)return e.return(Promise.reject());t.a=1,t.b=t.f}return n=t.a,t.a++,0==n?e.return():(r=t.b*(1+(2*Math.random()-1)*t.h),E(e,new Promise(function(t){new ct(t).O(r/1e3)}),2));case 2:t.b*=t.g,S(e)}})})}function ht(t,e,n,r){for(var i=[],a=3;a=r.priority)&&(Nt[t]={priority:n,uf:e})}function Dt(t,e){return{uris:t,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:e,licenseRequestType:null}}function Lt(){this.a=0}function Ut(t,e,n){pt.call(this,t,e),this.b=n}Mt.registerScheme=Rt,Mt.unregisterScheme=function(t){delete Nt[t]},Mt.prototype.wf=function(t){this.a.add(t)},Mt.prototype.registerRequestFilter=Mt.prototype.wf,Mt.prototype.bg=function(t){this.a.delete(t)},Mt.prototype.unregisterRequestFilter=Mt.prototype.bg,Mt.prototype.re=function(){this.a.clear()},Mt.prototype.clearAllRequestFilters=Mt.prototype.re,Mt.prototype.xf=function(t){this.b.add(t)},Mt.prototype.registerResponseFilter=Mt.prototype.xf,Mt.prototype.cg=function(t){this.b.delete(t)},Mt.prototype.unregisterResponseFilter=Mt.prototype.cg,Mt.prototype.se=function(){this.b.clear()},Mt.prototype.clearAllResponseFilters=Mt.prototype.se,Mt.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},Mt.prototype.destroy=Mt.prototype.destroy,Mt.prototype.request=function(t,e){var n=this,r=new Lt;if(this.f){var i=Promise.reject(new ht(2,7,7001));return i.catch(function(){}),new Ut(i,function(){return Promise.resolve()},r)}e.method=e.method||"GET",e.headers=e.headers||{},e.retryParameters=e.retryParameters?xt(e.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},e.uris=xt(e.uris);var a=(i=function(t,e,n){for(var r=yt(void 0),i={},a=(t=f(t.a)).next();!a.done;i={$c:i.$c},a=t.next())i.$c=a.value,r=r.T(function(t){return function(){return t.$c(e,n)}}(i));return r.T(void 0,function(t){if(t&&7001==t.code)throw t;throw new ht(2,1,1006,t)})}(this,t,e)).T(function(){return function t(e,n,r,i,a,o,s){var u=new W(r.uris[a]),c=u.sa,l=!1;c||(c=location.protocol,c=c.slice(0,-1),$(u,c),r.uris[a]=u.toString());var f=(c=Nt[c])?c.uf:null;if(!f)return mt(new ht(2,1,1e3,u));var h;return gt(ft(i)).T(function(){return e.f?vt():(h=Date.now(),f(r.uris[a],r,n,function(t,r,i){e.c&&1==n&&(e.c(t,r),l=!0,s.a=i)}))}).T(function(t){return null==t.timeMs&&(t.timeMs=Date.now()-h),{response:t,Ue:l}},function(s){if(s&&7001==s.code)throw s;if(e.f)return vt();if(s&&1==s.severity)return e.dispatchEvent(new Tt("retry",{error:s instanceof ht?s:null})),a=(a+1)%r.uris.length,t(e,n,r,i,a,s);throw s||o})}(n,t,e,new lt(e.retryParameters,!1),0,null,r)}),o=a.T(function(e){return function(t,e,n){for(var r=yt(void 0),i=(t=f(t.b)).next();!i.done;i=t.next())r=r.T(i.value.bind(null,e,n.response));return r.T(function(){return n},function(t){if(t&&7001==t.code)throw t;var e=2;throw t instanceof ht&&(e=t.severity),new ht(e,1,1007,t)})}(n,t,e)}),s=Date.now(),u=0;i.promise.then(function(){u=Date.now()-s},function(){});var c=0;return a.promise.then(function(){c=Date.now()},function(){}),i=new Ut((i=o.T(function(e){var r=Date.now()-c,i=e.response;return i.timeMs+=u,i.timeMs+=r,e.Ue||!n.c||i.fromCache||1!=t||n.c(i.timeMs,i.data.byteLength),i},function(t){throw t&&(t.severity=2),t})).promise,i.Fd,r),Pt(this.g,i),i},Mt.prototype.request=Mt.prototype.request,Mt.NumBytesRemainingClass=Lt;var Ot=Ut;if(Ot.prototype=m(pt.prototype),Ot.prototype.constructor=Ot,g)g(Ot,pt);else for(var jt in pt)if("prototype"!=jt)if(Object.defineProperties){var Bt=Object.getOwnPropertyDescriptor(pt,jt);Bt&&Object.defineProperty(Ot,jt,Bt)}else Ot[jt]=pt[jt];function Ft(){this.b=new Et}function Kt(t,e,n,r){t.b&&(e=new qt(e,n,r),t.b.push(n,e))}function Vt(t,e,n,r){Kt(t,e,n,function i(a){t.ma(e,n,i),r(a)})}function Ht(t){if(t.b){for(var e=t.b.getAll(),n=0;n=t[e]}.bind(null,e);if(0==e[0]&&0==e[2])return re(t,!1);if(0==e[1]&&0==e[3])return re(t,!0);if(n(0)&&n(1)&&n(2)&&n(3))return ne(t);throw new ht(2,2,2003)}function ae(t){t=encodeURIComponent(t),t=unescape(t);for(var e=new Uint8Array(t.length),n=0;nn&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}t.g(new ht(2,6,6006,e.message,e,n))}})}function ke(t,e){var n=e.target,r=t.b.get(n),i=t.a.licenseServerUri,a=t.f.advanced[t.a.keySystem];"individualization-request"==e.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(i=Dt([i],t.f.retryParameters)).body=e.message,i.method="POST",i.licenseRequestType=e.messageType,"com.microsoft.playready"!=t.a.keySystem&&"com.chromecast.playready"!=t.a.keySystem||function(t){var e=re(t.body,!0,!0);if(e.includes("PlayReadyKeyMessage")){for(var n=(e=(new DOMParser).parseFromString(e,"application/xml")).getElementsByTagName("HttpHeader"),r=0;r"===(e=e.trim()).substr(0,5)&&""===e.substr(-6)&&(e=e.slice(5,-6));try{e=JSON.parse(e).ckc}catch(t){}t.data=ce(e).buffer}(t),n.update(t.data).then(function(){var t=this;this.w.onEvent(new Tt("drmsessionupdate")),r&&(r.ua&&r.ua.resolve(),new ct(function(){r.loaded=!0,Pe(t)&&t.j.resolve()}).O(Ne))}.bind(this)))}.bind(t),function(t){this.c||(t=new ht(2,6,6007,t),this.g(t),r&&r.ua&&r.ua.reject(t))}.bind(t)).catch(function(t){this.c||(t=new ht(2,6,6008,t.message),this.g(t),r&&r.ua&&r.ua.reject(t))}.bind(t))}function Ae(){var t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],e=[{videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:t}],n=new Map;return t="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(t){return function(t){return d(function r(){var i,a,o;return D(r,function(r){switch(r.l){case 1:return x(r,2),E(r,navigator.requestMediaKeySystemAccess(t,e),4);case 4:return i=r.s,o=!!(a=i.getConfiguration().sessionTypes)&&a.includes("persistent-license"),Zt("Tizen 3")&&(o=!1),n.set(t,{persistentState:o}),E(r,i.createMediaKeys(),5);case 5:A(r,0);break;case 2:I(r),n.set(t,null),S(r)}})})}(t)}),Promise.all(t).then(function(){return Yt(n)})}function Ie(t,e){var n=e.audio,r=e.video;if(n&&n.encrypted&&!we(t,Xt(n.mimeType,n.codecs))||r&&r.encrypted&&!we(t,Xt(r.mimeType,r.codecs)))return!1;var i=t.keySystem();return 0==e.drmInfos.length||e.drmInfos.some(function(t){return t.keySystem==i})}function _e(t,e){if(!t.length)return e;if(!e.length)return t;for(var n=[],r=0;rr||n&&1e3>r)&&e&&!e.ua&&(this.b.delete(t),t.close().catch(function(){})),Pe(this)&&(this.j.resolve(),this.K.O(Re))};var Ce=1,Ne=5,Re=.5;function De(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Le(){}function Ue(t){return!t||1==t.length&&1e-6>t.end(0)-t.start(0)?null:t.length?t.end(t.length-1):null}function Oe(t,e,n){return n=void 0===n?0:n,!(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0)||e>t.end(t.length-1))&&e+n>=t.start(0)}function je(t,e){if(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))return 0;for(var n=0,r=t.length-1;0<=r&&t.end(r)>e;--r)n+=t.end(r)-Math.max(t.start(r),e);return n}function Be(t){if(!t)return[];for(var e=[],n=0;n>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function Xe(t,e,n){this.startTime=t,this.direction=tn,this.endTime=e,this.payload=n,this.region=new cn,this.position=null,this.positionAlign=We,this.size=100,this.textAlign=$e,this.writingMode=en,this.lineInterpretation=nn,this.line=null,this.lineHeight="",this.lineAlign=rn,this.displayAlign=Qe,this.backgroundColor=this.color="",this.backgroundImage=null,this.fontSize="",this.fontWeight=on,this.fontStyle=sn,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id=""}ze.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},ze.prototype.i=function(t){this.c=t.captions;var e=new Uint8Array(t.data.byteLength+t.initSegment.byteLength);e.set(t.initSegment,0),e.set(t.data,t.initSegment.byteLength),this.g.push(e)},ze.prototype.h=function(){var t={data:de.apply(null,this.g),captions:this.c};this.b.resolve(t),this.f=!1},B("shaka.text.Cue",Xe);var We="auto";Xe.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:We};var $e="center",Je={LEFT:"left",RIGHT:"right",CENTER:$e,START:"start",END:"end"};Xe.textAlign=Je;var Qe="after",Ze={BEFORE:"before",CENTER:"center",AFTER:Qe};Xe.displayAlign=Ze;var tn="ltr";Xe.direction={HORIZONTAL_LEFT_TO_RIGHT:tn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var en="horizontal-tb";Xe.writingMode={HORIZONTAL_TOP_TO_BOTTOM:en,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nn=0;Xe.lineInterpretation={LINE_NUMBER:nn,PERCENTAGE:1};var rn="start",an={CENTER:"center",START:rn,END:"end"};Xe.lineAlign=an;var on=400;Xe.fontWeight={NORMAL:on,BOLD:700};var sn="normal",un={NORMAL:sn,ITALIC:"italic",OBLIQUE:"oblique"};function cn(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=ln,this.scroll=fn}Xe.fontStyle=un,Xe.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},B("shaka.text.CueRegion",cn);var ln=1;cn.units={PX:0,PERCENTAGE:ln,LINES:2};var fn="";function hn(t){this.g=null,this.c=t,this.f=this.m=0,this.h=1/0,this.b=this.a=null,this.j="",this.i=new Map}cn.scrollMode={NONE:fn,UP:"up"};var dn={};function pn(e){return!!(dn[e]||t.muxjs&&"application/cea-608"==e)}function mn(t,e){"application/cea-608"!=e&&(t.g=new dn[e])}function vn(t,e,n,r,i){for(var a=n+" "+r,o=new Map,s=(e=f(e)).next();!s.done;s=e.next()){var u=s.value;s=u.stream,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),u.startTime+=i,u.endTime+=i,u.startTime>=t.f&&u.startTime=this.b||(t<=this.a&&e>=this.b?this.a=this.b=null:t<=this.a&&ethis.a&&e>=this.b&&(this.b=t))}.bind(this))},hn.prototype.me=function(t){this.c.append(t)},hn.prototype.appendCues=hn.prototype.me,hn.prototype.nc=function(t,e){this.j=t;var n=this.i.get(t);if(n)for(var r=f(n.keys()),i=r.next();!i.done;i=r.next())(i=n.get(i.value))&&(i=i.filter(function(t){return t.endTime<=e}),this.c.append(i))},hn.prototype.setSelectedClosedCaptionId=hn.prototype.nc;var gn=t.URL.createObjectURL;function bn(t){var e=Xt(t.mimeType,t.codecs),n=function(t){var e=[t.mimeType];return $t.forEach(function(n,r){var i=t[r];i&&e.push(n+'="'+i+'"')}),e.join(";")}(t);return pn(e)||MediaSource.isTypeSupported(n)||Ge(e,t.type)}function wn(t,e){t.a||(t.a=new hn(t.h)),mn(t.a,e)}function Tn(t,e){if("text"==e)var n=t.a.a;else n=!(n=Sn(t,e))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function En(t,e){return"text"==e?t.a.b:Ue(Sn(t,e))}function Sn(t,e){try{return t.b[e].buffered}catch(t){return null}}function xn(e,n,r,i,a,o){return"text"==n?function(t,e,n,r){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==n||null==r)this.g.parseInit(new Uint8Array(e));else{var t={periodStart:this.m,segmentStart:n,segmentEnd:r};t=this.g.parseMedia(new Uint8Array(e),t).filter(function(t){return t.startTime>=this.f&&t.startTimee&&(e+=.001),this.b[t].timestampOffset=e,this.qb(t)},n.Kf=function(t,e,n){this.b[t].appendWindowStart=0,this.b[t].appendWindowEnd=n,this.b[t].appendWindowStart=e,this.qb(t)},n.Sf=function(t){this.c[t][0].p.reject(new ht(2,3,3014,this.f.error?this.f.error.code:0))},n.qb=function(t){var e=this.c[t][0];e&&(e.p.resolve(),_n(this,t))};var Dn=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ln(t,e,n){function r(t,e,n){return t>=e&&t<=n}var i=t.video;return!(i&&i.width&&i.height&&!(r(i.width,e.minWidth,Math.min(e.maxWidth,n.width))&&r(i.height,e.minHeight,Math.min(e.maxHeight,n.height))&&r(i.width*i.height,e.minPixels,e.maxPixels))||!r(t.bandwidth,e.minBandwidth,e.maxBandwidth))}function Un(t,e,n){var r=!1;return t.forEach(function(t){var i=t.allowedByApplication;t.allowedByApplication=Ln(t,e,n),i!=t.allowedByApplication&&(r=!0)}),r}function On(t,e,n,r){r.variants=r.variants.filter(function(r){if(t&&t.N&&!Ie(t,r))return!1;var i=r.audio;return r=r.video,!(i&&!bn(i)||r&&!bn(r)||i&&e&&!jn(i,e)||r&&n&&!jn(r,n))}),r.textStreams=r.textStreams.filter(function(t){return pn(Xt(t.mimeType,t.codecs))})}function jn(t,e){return t.mimeType==e.mimeType&&t.codecs.split(".")[0]==e.codecs.split(".")[0]}function Bn(t){var e=t.audio,n=t.video,r=e?e.codecs:null,i=n?n.codecs:null,a=[];i&&a.push(i),r&&a.push(r);var o=[];n&&o.push(n.mimeType),e&&o.push(e.mimeType),o=o[0]||null;var s=[];e&&s.push(e.kind),n&&s.push(n.kind),s=s[0]||null;var u=new Set;return e&&e.roles.forEach(function(t){return u.add(t)}),n&&n.roles.forEach(function(t){return u.add(t)}),t={id:t.id,active:!1,type:"variant",bandwidth:t.bandwidth,language:t.language,label:null,kind:s,width:null,height:null,frameRate:null,mimeType:o,codecs:a.join(", "),audioCodec:r,videoCodec:i,primary:t.primary,roles:Array.from(u),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},n&&(t.videoId=n.id,t.originalVideoId=n.originalId,t.width=n.width||null,t.height=n.height||null,t.frameRate=n.frameRate||null,t.videoBandwidth=n.bandwidth||null),e&&(t.audioId=e.id,t.originalAudioId=e.originalId,t.channelsCount=e.channelsCount,t.audioBandwidth=e.bandwidth||null,t.label=e.label,t.audioRoles=e.roles),t}function Fn(t){return{id:t.id,active:!1,type:"text",bandwidth:0,language:t.language,label:t.label,kind:t.kind||null,width:null,height:null,frameRate:null,mimeType:t.mimeType,codecs:t.codecs||null,audioCodec:null,videoCodec:null,primary:t.primary,roles:t.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:t.originalId}}function Kn(t){return t.__shaka_id||(t.__shaka_id=Vn++),t.__shaka_id}var Vn=0;function Hn(t){return{id:Kn(t),active:!1,type:"",bandwidth:0,language:Cn(t.language),label:t.label,kind:t.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}function qn(t){return t.allowedByApplication&&t.allowedByKeySystem}function zn(t,e){for(var n=t.filter(function(t){return t.audio&&t.audio.channelsCount}),r=new Map,i=(n=f(n)).next();!i.done;i=n.next()){var a=(i=i.value).audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return 0==(n=Array.from(r.keys())).length?t:(i=n.filter(function(t){return t<=e})).length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n))}function Gn(t,e,n){var r=t,i=t.filter(function(t){return t.primary});i.length&&(r=i);var a=r.length?r[0].language:"";if(r=r.filter(function(t){return t.language==a}),e){var o=Rn(Cn(e),t.map(function(t){return t.language}));o&&(r=t.filter(function(t){return Cn(t.language)==o}))}if(n){if((t=Yn(r,n)).length)return t}else if((t=r.filter(function(t){return 0==t.roles.length})).length)return t;return(t=r.map(function(t){return t.roles}).reduce(Fe.uc,[])).length?Yn(r,t[0]):r}function Yn(t,e){return t.filter(function(t){return t.roles.includes(e)})}function Xn(t,e,n){for(var r=0;r=i.bandwidth/this.a.bandwidthDowngradeTarget&&e<=a&&(n=i)}return this.g=Date.now(),n},Wn.prototype.chooseVariant=Wn.prototype.chooseVariant,Wn.prototype.enable=function(){this.f=!0},Wn.prototype.enable=Wn.prototype.enable,Wn.prototype.disable=function(){this.f=!1},Wn.prototype.disable=Wn.prototype.disable,Wn.prototype.segmentDownloaded=function(t,e){var n=this.b;if(!(16e3>e)){var r=8e3*e/t,i=t/1e3;n.a+=e,V(n.b,i,r),V(n.c,i,r)}if(null!=this.g&&this.f)t:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break t}else{if(!(128e3<=this.b.a))break t;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},Wn.prototype.segmentDownloaded=Wn.prototype.segmentDownloaded,Wn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Wn.prototype.getBandwidthEstimate=Wn.prototype.getBandwidthEstimate,Wn.prototype.setVariants=function(t){this.c=t},Wn.prototype.setVariants=Wn.prototype.setVariants,Wn.prototype.configure=function(t){this.a=t},Wn.prototype.configure=Wn.prototype.configure,Jn.prototype.toString=function(){return"v"+this.a+"."+this.b};var er=null,nr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),rr="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ir=["loop","playbackRate"],ar=["pause","play"],or="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),sr={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},ur={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},cr=[["getConfiguration","configure"]],lr=[["isTextTrackVisible","setTextTrackVisibility"]],fr="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),hr=["attach","detach","load","unload"];function dr(t){return JSON.stringify(t,function(t,e){if("function"!=typeof e){if(e instanceof Event||e instanceof Tt){var n,r={};for(n in e){var i=e[n];i&&"object"==typeof i?"detail"==n&&(r[n]=i):n in Event||(r[n]=i)}return r}if(e instanceof TimeRanges)for(r={__type__:"TimeRanges",length:e.length,start:[],end:[]},n=0;ne?"-Infinity":"Infinity":e;return r}})}function pr(t){return JSON.parse(t,function(t,e){return"NaN"==e?NaN:"-Infinity"==e?-1/0:"Infinity"==e?1/0:e&&"object"==typeof e&&"TimeRanges"==e.__type__?function(t){return{length:t.length,start:function(e){return t.start[e]},end:function(e){return t.end[e]}}}(e):e&&"object"==typeof e&&"Uint8Array"==e.__type__?new Uint8Array(e.entries):e})}function mr(t,e,n,r,i,a){this.N=t,this.f=new ct(e),this.S=n,this.j=!1,this.F=r,this.K=i,this.w=a,this.b=this.h=!1,this.C="",this.i=null,this.m=this.Jd.bind(this),this.o=this.ef.bind(this),this.a={video:{},player:{}},this.v=0,this.c={},this.g=null}var vr=!1,yr=null;function gr(t){var e=yr;e.removeUpdateListener(t.m),e.removeMessageListener("urn:x-cast:com.google.shaka.v2",t.o)}function br(t){for(var e in t.c){var n=t.c[e];delete t.c[e],n.reject(new ht(1,7,7e3))}}function wr(t){t=dr(t),yr.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Y)}function Tr(t,e,n){St.call(this),this.c=t,this.b=e,this.i=this.g=this.f=this.j=this.h=null,this.a=new mr(n,this.Of.bind(this),this.Pf.bind(this),this.Qf.bind(this),this.Rf.bind(this),this.xd.bind(this)),function(t){for(var e in t.a.init(),t.i=new Ft,nr.forEach(function(t){Kt(this.i,this.c,t,this.hg.bind(this))}.bind(t)),or.forEach(function(t){Kt(this.i,this.b,t,this.tf.bind(this))}.bind(t)),t.h={},t.c)Object.defineProperty(t.h,e,{configurable:!1,enumerable:!0,get:t.gg.bind(t,e),set:t.ig.bind(t,e)});for(var n in t.j={},t.b)Object.defineProperty(t.j,n,{configurable:!1,enumerable:!0,get:t.Qd.bind(t,n)});t.f=new St,t.f.Sb=t.h,t.g=new St,t.g.Sb=t.j}(this)}function Er(t,e,n,r){var i=this;St.call(this),this.a=t,this.b=e,this.c=new Ft,this.w={video:t,player:e},this.C=n||function(){},this.F=r||function(t){return t},this.o=!1,this.h=!0,this.g=0,this.m=!1,this.j=!0,this.i=this.f=null,this.v=new ct(function(){xr(i)}),function(t){var e=cast.receiver.CastReceiverManager.getInstance();e.onSenderConnected=t.Md.bind(t),e.onSenderDisconnected=t.Md.bind(t),e.onSystemVolumeChanged=t.we.bind(t),t.i=e.getCastMessageBus("urn:x-cast:com.google.cast.media"),t.i.onMessage=t.$e.bind(t),t.f=e.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),t.f.onMessage=t.lf.bind(t),e.start(),nr.forEach(function(t){Kt(this.c,this.a,t,this.Sd.bind(this,"video"))}.bind(t)),or.forEach(function(t){Kt(this.c,this.b,t,this.Sd.bind(this,"player"))}.bind(t)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?t.b.dd(3840,2160):t.b.dd(1920,1080),Kt(t.c,t.a,"loadeddata",function(){this.m=!0}.bind(t)),Kt(t.c,t.b,"loading",function(){this.h=!1,Sr(this)}.bind(t)),Kt(t.c,t.a,"playing",function(){this.h=!1,Sr(this)}.bind(t)),Kt(t.c,t.a,"pause",function(){Sr(this)}.bind(t)),Kt(t.c,t.b,"unloading",function(){this.h=!0,Sr(this)}.bind(t)),Kt(t.c,t.a,"ended",function(){var t=this;new ct(function(){t.a&&t.a.ended&&(t.h=!0,Sr(t))}).O(5)}.bind(t))}(this)}function Sr(t){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new Tt("caststatuschanged")),kr(this)||_r(this,0))}.bind(t))}function xr(t){t.v.O(.5);var e={video:{},player:{}};if(rr.forEach(function(t){e.video[t]=this.a[t]}.bind(t)),t.b.U())for(var n in ur)0==t.g%ur[n]&&(e.player[n]=t.b[n]());for(var r in sr)0==t.g%sr[r]&&(e.player[r]=t.b[r]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(e.video.volume=n.level,e.video.muted=n.muted),t.m&&(t.g+=1),Ir(t,{type:"update",update:e},t.f),kr(t)}function kr(t){return!(!t.j||!t.a.duration&&!t.b.U())&&(Ar(t),t.j=!1,!0)}function Ar(t){var e={contentId:t.b.$b(),streamType:t.b.U()?"LIVE":"BUFFERED",duration:t.a.duration,contentType:""};_r(t,0,e)}function Ir(t,e,n,r){t.o&&(t=dr(e),r?n.getCastChannel(r).send(t):n.broadcast(t))}function _r(t,e,n){var r=t.a.playbackRate,i=Pr;r={mediaSessionId:0,playbackRate:r,playerState:i=t.h?i.IDLE:t.b.Ic()?i.fe:t.a.paused?i.he:i.ie,currentTime:t.a.currentTime,supportedMediaCommands:15,volume:{level:t.a.volume,muted:t.a.muted}},n&&(r.media=n),Ir(t,{requestId:e,type:"MEDIA_STATUS",status:[r]},t.i)}(n=mr.prototype).destroy=function(){return br(this),yr&&gr(this),this.f&&(this.f.stop(),this.f=null),this.K=this.F=null,this.b=this.h=!1,this.o=this.m=this.g=this.c=this.a=this.i=null,Promise.resolve()},n.da=function(){return this.b},n.Xc=function(){return this.C},n.init=function(){if(t.chrome&&chrome.cast&&chrome.cast.isAvailable){delete t.__onGCastApiAvailable,this.h=!0,this.f.oc();var e=new chrome.cast.SessionRequest(this.N);e=new chrome.cast.ApiConfig(e,this.Kd.bind(this),this.jf.bind(this),"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),vr&&this.f.O(.02),(e=yr)&&e.status!=chrome.cast.SessionStatus.STOPPED?this.Kd(e):yr=null}else t.__onGCastApiAvailable=function(t){t&&this.init()}.bind(this)},n.cd=function(t){this.i=t,this.b&&wr({type:"appData",appData:this.i})},n.cast=function(t){return this.h?vr?this.b?Promise.reject(new ht(1,8,8002)):(this.g=new dt,chrome.cast.requestSession(this.Vc.bind(this,t),this.Id.bind(this)),this.g):Promise.reject(new ht(1,8,8001)):Promise.reject(new ht(1,8,8e3))},n.Zb=function(){this.b&&(br(this),yr&&(gr(this),yr.stop(function(){},function(){}),yr=null))},n.get=function(t,e){if("video"==t){if(ar.includes(e))return this.Ud.bind(this,t,e)}else if("player"==t){if(ur[e]&&!this.get("player","isLive")())return function(){};if(fr.includes(e))return this.Ud.bind(this,t,e);if(hr.includes(e))return this.zf.bind(this,t,e);if(sr[e])return this.Rd.bind(this,t,e)}return this.Rd(t,e)},n.set=function(t,e,n){this.a[t][e]=n,wr({type:"set",targetName:t,property:e,value:n})},n.Vc=function(t,e){yr=e,e.addUpdateListener(this.m),e.addMessageListener("urn:x-cast:com.google.shaka.v2",this.o),this.Jd(),wr({type:"init",initState:t,appData:this.i}),this.g.resolve()},n.Id=function(t){var e=8003;switch(t.code){case"cancel":e=8004;break;case"timeout":e=8005;break;case"receiver_unavailable":e=8006}this.g.reject(new ht(2,8,e,t))},n.Rd=function(t,e){return this.a[t][e]},n.Ud=function(t,e,n){for(var r=[],i=2;i LA_URL"))?t.textContent:""}(t):""):""});function Dr(t){var e=t.getAttribute("schemeIdUri"),n=Mr.getAttributeNS(t,"urn:mpeg:cenc:2013","default_KID"),r=Mr.ud(t,"urn:mpeg:cenc:2013","pssh").map(Mr.ac);if(!e)return null;if(e=e.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new ht(2,4,4009);var i=[];try{i=r.map(function(t){return{initDataType:"cenc",initData:ce(t),keyId:null}})}catch(t){throw new ht(2,4,4007)}return{node:t,Xd:e,keyId:n,init:0(h=h||0))if(f+1=h)break;h=Math.ceil((h-d)/p)-1}else{if(1/0==u)break;if(d/i>=u)break;h=Math.ceil((u*i-d)/p)-1}0>24&255,t>>16&255,t>>8&255,255&t)}function Qr(t,e,n,r){var i,a=(new Gr).ca("sidx",function(t){i=function(t,e,n,r){var i=[];r.reader.J(4);var a=r.reader.D();if(0==a)throw new ht(2,3,3005);if(0==r.version)var o=r.reader.D(),s=r.reader.D();else o=r.reader.ub(),s=r.reader.ub();r.reader.J(2);var u=r.reader.Jb();for(t=t+r.size+s,s=0;s>>31;c&=2147483647;var f=r.reader.D();if(r.reader.J(4),1==l)throw new ht(2,3,3006);i.push(new Kr(i.length,o/a-e,(o+f)/a-e,function(){return n},t,t+c-1)),o+=f,t+=c}return r.parser.stop(),i}(e,r,n,t)});if(t&&a.parse(t),i)return i;throw new ht(2,3,3004)}function Zr(t){this.a=t}function ti(t,e){for(;t.a.length&&t.a[t.a.length-1].startTime>=e;)t.a.pop();for(;t.a.length&&0>=t.a[0].endTime;)t.a.shift();if(0!=t.a.length){var n=t.a[t.a.length-1];t.a[t.a.length-1]=new Kr(n.position,n.startTime,e,n.c,n.b,n.a)}}function ei(t){this.b=t,this.a=new Vr(t,0),Hr||(Hr=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function ni(t){var e=ri(t);if(7=e&&!(n&1<<8-e);e++);if(8t||n&&t>=n?null:Math.floor(t/r)},getSegmentReference:function(t){var e=t*r,l=e+r;return n&&(l=Math.min(l,n)),0>l||n&&e>=n?null:new Kr(t,e,l,function(){var n=Lr(o,u,t+i,s,e*a);return Ke(c,[n])},0,null)}}}(t,a)):(o=e=null,t.ga.id&&t.B.id&&(e=n[o=t.ga.id+","+t.B.id]),s=function(t,e){for(var n=[],r=0;rthis.I.byteLength&&zr();var e=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,t);return this.a+=t,new Uint8Array(e)},Vr.prototype.readBytes=Vr.prototype.Va,Vr.prototype.J=function(t){this.a+t>this.I.byteLength&&zr(),this.a+=t},Vr.prototype.skip=Vr.prototype.J,Vr.prototype.Wd=function(t){this.at||t>this.I.byteLength)&&zr(),this.a=t},Vr.prototype.seek=Vr.prototype.seek,Vr.prototype.Wc=function(){for(var t=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;return t=new Uint8Array(this.I.buffer,this.I.byteOffset+t,this.a-t),this.a+=1,ne(t)},Vr.prototype.readTerminatedString=Vr.prototype.Wc,B("shaka.util.Mp4Parser",Gr),Gr.prototype.G=function(t,e){var n=$r(t);return this.c[n]=0,this.b[n]=e,this},Gr.prototype.box=Gr.prototype.G,Gr.prototype.ca=function(t,e){var n=$r(t);return this.c[n]=1,this.b[n]=e,this},Gr.prototype.fullBox=Gr.prototype.ca,Gr.prototype.stop=function(){this.a=!0},Gr.prototype.stop=Gr.prototype.stop,Gr.prototype.parse=function(t,e){var n=new Uint8Array(t);for(n=new Vr(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.pa()&&!this.a;)this.ic(0,n,e)},Gr.prototype.parse=Gr.prototype.parse,Gr.prototype.ic=function(t,e,n){var r=e.aa(),i=e.D(),a=e.D();switch(i){case 0:i=e.I.byteLength-r;break;case 1:i=e.ub()}var o=this.b[a];if(o){var s=null,u=null;1==this.c[a]&&(s=(u=e.D())>>>24,u&=16777215),a=r+i,n&&a>e.I.byteLength&&(a=e.I.byteLength),a-=e.aa(),e=0=n.startTime&&t(t-=this.a[0].position)||t>=this.a.length?null:this.a[t]},Zr.prototype.get=Zr.prototype.get,Zr.prototype.offset=function(t){for(var e=0;ea.startTime?0==n&&e.push(a):(.1t)return void this.a.splice(0,e);this.a=[]},Zr.prototype.evict=Zr.prototype.zc,ei.prototype.pa=function(){return this.a.pa()},oi.prototype.parse=function(t,e,n,r){var i;if(440786851!=ni(e=new ei(new DataView(e))).id)throw new ht(2,3,3008);var a=ni(e);if(408125543!=a.id)throw new ht(2,3,3009);for(e=a.a.byteOffset,a=new ei(a.a),i=null;a.pa();){var o=ni(a);if(357149030==o.id){i=o;break}}if(!i)throw new ht(2,3,3010);for(a=new ei(i.a),i=1e6,o=null;a.pa();){var s=ni(a);if(2807729==s.id)i=ai(s);else if(17545==s.id)if(4==(o=s).a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new ht(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new ht(2,3,3011);if(i=o*(a=i/1e9),475249515!=(t=ni(new ei(new DataView(t)))).id)throw new ht(2,3,3007);return function(t,e,n,r,i,a){function o(){return i}var s=[];t=new ei(t.a);for(var u=null,c=null;t.pa();){var l=ni(t);if(187==l.id){var f=si(l);f&&(l=n*f.eg,f=e+f.yf,null!=u&&s.push(new Kr(s.length,u-a,l-a,o,c,f-1)),u=l,c=f)}}return null!=u&&s.push(new Kr(s.length,u-a,r-a,o,c,null)),s}(t,e,a,i,n,r)};var mi={sb:{},Ib:{},Zc:function(t,e){mi.Ib[t]=e}};function vi(t,e,n){this.f=t,this.lc=e,this.h=this.g=1/0,this.a=1,this.b=this.c=null,this.j=0,this.m=!0,this.i=0,this.o=void 0===n||n}function yi(t,e,n,r){return t=Dt(t,r),0==e&&null==n||(t.headers.Range=n?"bytes="+e+"-"+n:"bytes="+e+"-"),t}function gi(){var t=this;this.a=this.b=null,this.f=[],this.c=null,this.j=[],this.h=1,this.m={},this.o=0,this.v=new K(5),this.i=new ct(function(){!function(t){d(function e(){var n,r;return D(e,function(e){switch(e.l){case 1:return n=0,x(e,2),E(e,bi(t),4);case 4:n=e.s,A(e,3);break;case 2:r=I(e),t.a&&(r.severity=1,t.a.onError(r));case 3:if(!t.a)return e.return();Si(t,n),S(e)}})})}(t)}),this.g=new _t}function bi(t){var e=Date.now(),n=t.a.networkingEngine.request(0,Dt(t.f,t.b.retryParameters));return Pt(t.g,n),n.promise.then(function(e){if(t.a)return e.uri&&!t.f.includes(e.uri)&&t.f.unshift(e.uri),function(t,e,n){if(!(e=Mr.Od(e,"MPD")))throw new ht(2,4,4001,n);return e=Br(e,t.b.retryParameters,t.b.dash.xlinkFailGracefully,n,t.a.networkingEngine),Pt(t.g,e),e.promise.then(function(e){return function(t,e,n){return d(function r(){var i,a,o,s,u,c,l,f,h,d,p,m,v,y,g,b,w,T,x,k,A,I;return D(r,function(r){switch(r.l){case 1:s=Fe,c=[n],0<(l=(u=Mr).P(e,"Location").map(u.ac).filter(s.Da)).length&&(f=Ke(c,l),c=t.f=f),h=u.P(e,"BaseURL").map(u.ac),d=Ke(c,h),t.b.dash.ignoreMinBufferTime||(p=u.H(e,"minBufferTime",u.za)),t.o=u.H(e,"minimumUpdatePeriod",u.za,-1),m=u.H(e,"availabilityStartTime",u.qf),v=u.H(e,"timeShiftBufferDepth",u.za),y=u.H(e,"suggestedPresentationDelay",u.za),g=u.H(e,"maxSegmentDuration",u.za),b=e.getAttribute("type")||"static",t.c?w=t.c.presentationTimeline:(T=Math.max(t.b.dash.defaultPresentationDelay,1.5*p),w=new vi(m,null!=y?y:T,t.b.dash.autoCorrectDrift));for(var _={gb:"static"!=b,presentationTimeline:w,ga:null,R:null,ba:null,B:null,bandwidth:0,Cd:!1},P=d,M=Mr.H(e,"mediaPresentationDuration",Mr.za),C=[],N=0,R=Mr.P(e,"Period"),D=0;Dt.o||t.i.O(Math.max(3,t.o-e,H(t.v)))}function xi(t,e,n){e=e||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Sc:null},n=n||e.la;var r=Mr.rb,i=Mr.ve,a=Mr.P(t,"BaseURL").map(Mr.ac),o=t.getAttribute("contentType")||e.contentType,s=t.getAttribute("mimeType")||e.mimeType,u=t.getAttribute("codecs")||e.codecs;i=Mr.H(t,"frameRate",i)||e.frameRate;for(var c=Mr.P(t,"InbandEventStream"),l=e.emsgSchemeIdUris.slice(),h=(c=f(c)).next();!h.done;h=c.next())h=h.value.getAttribute("schemeIdUri"),l.includes(h)||l.push(h);return c=function(t){for(var e=0;e>=1;return t}}}return null}(c=Mr.P(t,"AudioChannelConfiguration"))||e.Sc,o||(o=Ai(s,u)),{la:Ke(n,a),Lb:Mr.Yb(t,"SegmentBase")||e.Lb,Ga:Mr.Yb(t,"SegmentList")||e.Ga,Nb:Mr.Yb(t,"SegmentTemplate")||e.Nb,width:Mr.H(t,"width",r)||e.width,height:Mr.H(t,"height",r)||e.height,contentType:o,mimeType:s,codecs:u,frameRate:i,emsgSchemeIdUris:l,id:t.getAttribute("id"),Sc:c}}function ki(t,e,n,r){return(e=Dt(e=Ke(e,[n]),t.b.retryParameters)).method=r,e=t.a.networkingEngine.request(4,e),Pt(t.g,e),e.promise.then(function(t){if("HEAD"==r){if(!t.headers||!t.headers.date)return 0;t=t.headers.date}else t=ne(t.data);return t=Date.parse(t),isNaN(t)?0:t-Date.now()})}function Ai(t,e){return pn(Xt(t,e))?"text":t.split("/")[0]}function Ii(t,e,n,r){this.b=t,this.type=e,this.a=n,this.segments=r||null}function _i(t,e,n,r){this.id=t,this.name=e,this.a=n,this.value=void 0===r?null:r}function Pi(t,e){this.name=t,this.value=e}function Mi(t,e,n){return(t=t.getAttribute(e))?t.value:n||null}function Ci(t,e){this.b=e,this.a=t}B("shaka.media.ManifestParser.registerParserByExtension",mi.Zc),mi.Kb=function(t,e){mi.sb[t]=e},B("shaka.media.ManifestParser.registerParserByMime",mi.Kb),mi.vf=function(){var t={};if(Jt()){for(var e in mi.sb)t[e]=!0;for(var n in mi.Ib)t[n]=!0}e={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var r=(n=f(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!r.done;r=n.next())t[r=r.value]=Jt()?!!mi.sb[r]:Qt(r);for(var i in e)t[i]=Jt()?!!mi.Ib[i]:Qt(e[i]);return t},mi.create=function(t,e,n,r){return d(function i(){var a,o;return D(i,function(i){switch(i.l){case 1:return x(i,2),E(i,mi.Ce(t,e,n,r),4);case 4:return a=i.s,i.return(new a);case 2:throw(o=I(i)).severity=2,o}})})},mi.Ce=function(t,e,n,r){return d(function i(){var a,o,s,u,c;return D(i,function(i){switch(i.l){case 1:if(a=mi,r&&(o=a.sb[r.toLowerCase()]))return i.return(o);if((s=a.getExtension(t))&&(u=a.Ib[s]))return i.return(u);if(r){i.A(2);break}return E(i,a.Je(t,e,n),3);case 3:if((r=i.s)&&(c=mi.sb[r]))return i.return(c);case 2:throw new ht(2,4,4e3,t)}})})},mi.Je=function(t,e,n){return d(function r(){var i,a,o;return D(r,function(r){switch(r.l){case 1:return(i=Dt([t],n)).method="HEAD",E(r,e.request(0,i).promise,2);case 2:return a=r.s,o=a.headers["content-type"],r.return(o?o.toLowerCase():"")}})})},mi.getExtension=function(t){return 1==(t=new W(t).fa.split("/").pop().split(".")).length?"":t.pop().toLowerCase()},mi.isSupported=function(t,e){return!!Jt()&&(e in mi.sb||mi.getExtension(t)in mi.Ib)},B("shaka.media.PresentationTimeline",vi),vi.prototype.Y=function(){return this.g},vi.prototype.getDuration=vi.prototype.Y,vi.prototype.ta=function(t){this.g=t},vi.prototype.setDuration=vi.prototype.ta,vi.prototype.Oe=function(){return this.f},vi.prototype.getPresentationStartTime=vi.prototype.Oe,vi.prototype.Zd=function(t){this.j=t},vi.prototype.setClockOffset=vi.prototype.Zd,vi.prototype.Ob=function(t){this.m=t},vi.prototype.setStatic=vi.prototype.Ob,vi.prototype.fd=function(t){this.h=t},vi.prototype.setSegmentAvailabilityDuration=vi.prototype.fd,vi.prototype.Lf=function(t){this.lc=t},vi.prototype.setDelay=vi.prototype.Lf,vi.prototype.Ae=function(){return this.lc},vi.prototype.getDelay=vi.prototype.Ae,vi.prototype.ob=function(t,e){if(0!=t.length){var n=t[t.length-1].endTime+e;this.Rc(t[0].startTime+e),this.a=t.reduce(function(t,e){return Math.max(t,e.endTime-e.startTime)},this.a),this.b=Math.max(this.b,n),null!=this.f&&this.o&&(this.f=(Date.now()+this.j)/1e3-this.b-this.a)}},vi.prototype.notifySegments=vi.prototype.ob,vi.prototype.Rc=function(t){this.c=null==this.c?t:Math.min(this.c,t)},vi.prototype.notifyMinSegmentStartTime=vi.prototype.Rc,vi.prototype.Qc=function(t){this.a=Math.max(this.a,t)},vi.prototype.notifyMaxSegmentDuration=vi.prototype.Qc,vi.prototype.offset=function(t){null!=this.c&&(this.c+=t),null!=this.b&&(this.b+=t)},vi.prototype.offset=vi.prototype.offset,vi.prototype.U=function(){return 1/0==this.g&&!this.m},vi.prototype.isLive=vi.prototype.U,vi.prototype.Ta=function(){return 1/0!=this.g&&!this.m},vi.prototype.isInProgress=vi.prototype.Ta,vi.prototype.Db=function(){if(1/0==this.h)return this.i;var t=this.jb()-this.h;return Math.max(this.i,t)},vi.prototype.getSegmentAvailabilityStart=vi.prototype.Db,vi.prototype.$d=function(t){this.i=t},vi.prototype.setUserSeekStart=vi.prototype.$d,vi.prototype.jb=function(){return this.U()||this.Ta()?Math.min(Math.max(0,(Date.now()+this.j)/1e3-this.a-this.f),this.g):this.g},vi.prototype.getSegmentAvailabilityEnd=vi.prototype.jb,vi.prototype.Cb=function(t){var e=Math.max(this.c,this.i);if(1/0==this.h)return e;var n=this.jb()-this.h;return t=Math.min(n+t,this.wa()),Math.max(e,t)},vi.prototype.getSafeSeekRangeStart=vi.prototype.Cb,vi.prototype.ib=function(){return this.Cb(0)},vi.prototype.getSeekRangeStart=vi.prototype.ib,vi.prototype.wa=function(){var t=this.U()||this.Ta()?this.lc:0;return Math.max(0,this.jb()-t)},vi.prototype.getSeekRangeEnd=vi.prototype.wa,vi.prototype.de=function(){return null!=this.f&&null==this.b},vi.prototype.usingPresentationStartTime=vi.prototype.de,B("shaka.dash.DashParser",gi),(n=gi.prototype).configure=function(t){this.b=t},n.start=function(t,e){var n=this;return d(function r(){var i;return D(r,function(r){switch(r.l){case 1:return n.f=[t],n.a=e,E(r,bi(n),2);case 2:if(i=r.s,n.a&&Si(n,i),!n.a)throw new ht(2,7,7001);return r.return(n.c)}})})},n.stop=function(){return this.b=this.a=null,this.f=[],this.c=null,this.j=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},n.update=function(){bi(this).catch(function(t){this.a&&this.a.onError(t)}.bind(this))},n.onExpirationUpdated=function(){},n.pf=function(t,e){t.ba=xi(e,t.ga,null);var n=!1,r=Mr.P(e,"Role"),i=r.map(function(t){return t.getAttribute("value")}).filter(Fe.Da),a=void 0,o="text"==t.ba.contentType;o&&(a="subtitle");for(var s=0;s>4)&&2!=r||e(),3==r&&(r=t.ha(),t.J(r)),1==t.D()>>8)return t.J(3),0!=(n=t.ha()>>6)&&1!=n||e(),0==t.ha()&&e(),n=t.ha(),r=t.Jb(),t=t.Jb(),(1073741824*((14&n)>>1)+((65534&r)<<14|(65534&t)>>1))/9e4;t.seek(n+188),71!=(r=t.ha())&&(t.seek(n+192),r=t.ha()),71!=r&&(t.seek(n+204),r=t.ha()),71!=r&&e(),t.Wd(1)}}(p.data));case 4:if("application/mp4"!=i&&!i.startsWith("text/")){o.A(6);break}return E(o,ta(t,r),7);case 7:return m=o.s,o.return(function(t,e,n){return pn(t=Xt(t,e))?(mn(e=new hn(null),t),e.Gc(n)):0}(i,a,m.data));case 6:throw new ht(2,4,4030)}})})}(t,e,f,l,i,a),2);case 2:h=o.s,c.split("/").pop();for(var g=0;gn.length||"data"!=n[0])throw new ht(2,1,1004,e);if(2>(n=n.slice(1).join(":").split(",")).length)throw new ht(2,1,1004,e);var r=n[0];n=t.decodeURIComponent(n.slice(1).join(","));var i=null;if(1<(r=r.split(";")).length&&(i=r[1]),"base64"==i)e=ce(n).buffer;else{if(i)throw new ht(2,1,1005,e);e=ae(n)}return{data:e,contentType:r[0]}},Rt("data",Hi),B("shaka.hls.HlsParser",qi),(n=qi.prototype).configure=function(t){this.c=t},n.start=function(t,e){var n=this;return d(function r(){var i,a;return D(r,function(r){switch(r.l){case 1:return n.g=e,E(r,ia(n,t),2);case 2:return i=r.s,n.v=i.uri,E(r,function(t,e){return d(function n(){var r,i,a,o,s,u,c,l,h,p,m;return D(n,function(n){switch(n.l){case 1:if(0!=(r=ji(t.o,e,t.v)).type)throw new ht(2,4,4022);return E(n,function(t,e){return d(function n(){var r,i,a,o,s,u,c,l,h,p,m,v;return D(n,function(n){switch(n.l){case 1:return r=Ni,i=Fe,a=e.a,o=r.hb(e.a,"EXT-X-MEDIA"),s=o.filter(function(t){return"SUBTITLES"==na(t,"TYPE")}.bind(t)),u=s.map(function(t){return function(t,e){return d(function n(){var r;return D(n,function(n){switch(n.l){case 1:return na(e,"TYPE"),E(n,Xi(t,e,[]),2);case 2:return r=n.s,n.return(r.stream)}})})}(this,t)}.bind(t)),c=o.filter(function(t){return"CLOSED-CAPTIONS"==na(t,"TYPE")}),function(t,e){for(var n=f(e),r=n.next();!r.done;r=n.next()){na(r=r.value,"TYPE");var i=Mi(r,"LANGUAGE")||"und";i=Cn(i);var a=na(r,"GROUP-ID");r=na(r,"INSTREAM-ID"),t.j.get(a)||t.j.set(a,new Map),t.j.get(a).set(r,i)}}(t,c),E(n,Promise.all(u),2);case 2:return l=n.s,h=r.hb(a,"EXT-X-STREAM-INF"),p=h.map(function(t){return function(t,e,n){return d(function r(){var i,a,o,s,u,c,l,h,p,m,v,y,g,b,w,T,S,x,k,A,I,_,P,M,C,N;return D(r,function(r){switch(r.l){case 1:return i=He,a=Ni,o=Mi(e,"CODECS","avc1.42E01E,mp4a.40.2"),s=function(t){for(var e=new Set,n=[],r=(t=f(t)).next();!r.done;r=t.next()){var i=Wt(r=r.value)[0];e.has(i)||(n.push(r),e.add(i))}return n}(o.split(/\s*,\s*/)),u=e.getAttribute("RESOLUTION"),l=c=null,h=Mi(e,"FRAME-RATE"),p=Number(na(e,"BANDWIDTH")),u&&(m=u.value.split("x"),c=m[0],l=m[1]),v=(v=(v=a.hb(n.a,"EXT-X-MEDIA")).filter(function(t){return"CLOSED-CAPTIONS"!=na(t,"TYPE")})).filter(function(t){var e=Mi(t,"URI")||"";return"SUBTITLES"==(Mi(t,"TYPE")||"")||""!=e}),y=Mi(e,"AUDIO"),g=Mi(e,"VIDEO"),y?v=a.Cc(v,"AUDIO",y):g&&(v=a.Cc(v,"VIDEO",g)),(b=ea(i.na,s))&&((w=Mi(e,"SUBTITLES"))&&((T=a.Cc(v,"SUBTITLES",w)).length&&(t.C.get(T[0].id).stream.codecs=b)),At(s,b)),S=v.map(function(t){return Xi(this,t,s)}.bind(t)),x=[],k=[],E(r,Promise.all(S),2);case 2:if(I=(I=r.s).filter(function(t){return null!=t}),y?x=I:g&&(k=I),P=!1,x.length||k.length?x.length?(C=na(e,"URI"),N=x[0].pc,C==N?(_=i.wb,P=!0):_=i.La):_=i.wb:1==s.length?(M=ea(i.La,s),_=u||h||M?i.La:i.wb):(_=i.La,s=[s.join(",")]),P){r.A(3);break}return E(r,function(t,e,n,r){return d(function i(){var a,o,s,u,c;return D(i,function(i){switch(i.l){case 1:return a=He,o=na(e,"URI"),t.a.has(o)?i.return(t.a.get(o)):(s=Mi(e,"CLOSED-CAPTIONS"),u=null,r==a.La&&s&&"NONE"!=s&&(u=t.j.get(s)),E(i,Wi(t,o,n,r,"und",!1,null,null,u),2));case 2:return null==(c=i.s)?i.return(null):t.a.has(o)?i.return(t.a.get(o)):(t.a.set(o,c),i.return(c))}})})}(t,e,s,_),4);case 4:A=r.s;case 3:if(A)A.stream.type==i.wb?x=[A]:k=[A];else if(null===A)return r.return([]);return k&&Gi(k),x&&Gi(x),r.return(function(t,e,n,r,i,a,o){n.forEach(function(t){(t=t.stream)&&(t.width=Number(i)||void 0,t.height=Number(a)||void 0,t.frameRate=Number(o)||void 0)}.bind(t)),e.length||(e=[null]),n.length||(n=[null]);for(var s=[],u=(e=f(e)).next();!u.done;u=e.next()){u=u.value;for(var c=f(n),l=c.next();!l.done;l=c.next()){var h=l.value;l=u?u.stream:null;var d=h?h.stream:null,p=u?u.drmInfos:null,m=h?h.drmInfos:null;h=(h?h.pc:"")+" - "+(u?u.pc:"");var v=void 0;if(l&&d){if(p.length&&m.length&&!(0<_e(p,m).length))continue;v=_e(p,m)}else l?v=p:d&&(v=m);t.S.has(h)||(l=Yi(t,l,d,r,v),s.push(l),t.S.add(h))}}return s}(t,x,k,p,c,l,h))}})})}(this,t,e)}.bind(t)),E(n,Promise.all(p),3);case 3:return m=n.s,v=(v=m.reduce(i.uc,[])).filter(function(t){return null!=t}),n.return({startTime:0,variants:v,textStreams:l})}})})}(t,r),2);case 2:if(i=n.s,!t.g)throw new ht(2,7,7001);if(t.V&&0==i.variants.length)throw new ht(2,4,4034);t.g.filterAllPeriods([i]),a=1/0,o=0,s=1/0;for(var v=f(t.a.values()),y=v.next();!y.done;y=v.next())u=y.value,a=Math.min(a,u.Pc),o=Math.max(o,u.Pc),"text"!=u.stream.type&&(s=Math.min(s,u.duration));if(t.f!=fa.Ma?(t.b=new vi(0,3*t.w),t.b.Ob(!1)):(t.b=new vi(null,0),t.b.Ob(!0)),Qi(t),t.f!=fa.Ma){for(t.N=t.F,c=fa,t.f==c.nd&&(l=t.b.lc,isNaN(t.c.availabilityWindowOverride)||(l=t.c.availabilityWindowOverride),t.b.fd(l)),h=0;95443.7176888889<=o;)h+=95443.7176888889,o-=95443.7176888889;if(h)for(v=f(t.a.values()),y=v.next();!y.done;y=v.next())95443.7176888889>(p=y.value).Pc&&(p.stream.presentationTimeOffset=-h,p.Mb.offset(h))}else for(t.b.ta(s),t.b.offset(-a),v=f(t.a.values()),y=v.next();!y.done;y=v.next())(m=y.value).stream.presentationTimeOffset=a,m.Mb.offset(-a),ti(m.Mb,s);t.m={presentationTimeline:t.b,periods:[i],offlineSessionIds:[],minBufferTime:0},S(n)}})})}(n,i.data),3);case 3:return 0<(a=n.N)&&n.h.O(a),r.return(n.m)}})})},n.stop=function(){this.h&&(this.h.stop(),this.h=null);var t=[];return this.i&&(t.push(this.i.destroy()),this.i=null),this.c=this.g=null,this.C.clear(),this.S.clear(),this.a.clear(),this.m=null,Promise.all(t)},n.update=function(){if(this.f!=fa.Ma){for(var t=[],e=f(this.a.values()),n=e.next();!n.done;n=e.next())t.push(zi(this,n.value));return Promise.all(t)}},n.onExpirationUpdated=function(){};var aa={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},oa={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function sa(t,e){t.f=e,t.b&&t.b.Ob(t.f==fa.Ma),t.f!=fa.Ma||t.h.stop()}function ua(t,e,n){if(!t.i)throw new ht(2,7,7001);return e=t.g.networkingEngine.request(n,e),Pt(t.i,e),e.promise}var ca={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(t){var e=na(t,"METHOD");return Qn("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227"),["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(e)?(e=na(t,"URI"),e=Hi.parse(e),e=Ve("com.widevine.alpha",[{initDataType:"cenc",initData:e=new Uint8Array(e.data)}]),(t=Mi(t,"KEYID"))&&(e.keyIds=[t.substr(2).toLowerCase()]),e):null}},la="VOD",fa={Ma:la,ge:"EVENT",nd:"LIVE"};function ha(){this.a=new Map}function da(t,e,n){pa(t,e).text=n}function pa(t,e){return t.a.has(e)||t.a.set(e,new ma),t.a.get(e)}function ma(){this.text=this.variant=null}function va(t,e){this.a=t,this.b=new Set([t]);for(var n=f(e=e||[]),r=n.next();!r.done;r=n.next())this.add(r.value)}function ya(t,e){var n;if(!(n=!!t.audio!=!!e.audio||!!t.video!=!!e.video||t.language!=e.language)&&(n=t.audio&&e.audio)){n=t.audio;var r=e.audio;n=!(n.channelsCount==r.channelsCount&&ga(n,r)&&ba(n.roles,r.roles))}return!n&&(n=t.video&&e.video)&&(n=!(ga(n=t.video,r=e.video)&&ba(n.roles,r.roles))),!n}function ga(t,e){if(t.mimeType!=e.mimeType)return!1;var n=t.codecs.split(",").map(function(t){return Wt(t)[0]}),r=e.codecs.split(",").map(function(t){return Wt(t)[0]});if(n.length!=r.length)return!1;n.sort(),r.sort();for(var i=0;ii-.5)){e=!0;break t}}e=!1}return e}function _a(t,e,n,r,i){var a=this;this.b=t,this.w=e,this.v=n,this.m=i,this.g=new Ft,this.j=!1,this.o=t.readyState,this.f=!1,this.c=r,this.i=!1,Kt(this.g,t,"waiting",function(){return Pa(a)}),this.h=new ct(function(){Pa(a)}).Ia(.25)}function Pa(t){if(0!=t.b.readyState){if(t.b.seeking){if(!t.j)return}else t.j=!1;if(!t.b.paused){t.b.readyState!=t.o&&(t.f=!1,t.o=t.b.readyState);var e=t.v.smallGapLimit,n=t.b.currentTime,r=t.b.buffered;t:{if(r&&r.length&&!(1==r.length&&1e-6>r.end(0)-r.start(0)))for(var i=Zt("Edge/")||Zt("Trident/")||Zt("Tizen")||Zt("CrKey")?.5:.1,a=0;an&&(0==a||r.end(a-1)-n<=i)){i=a;break t}i=null}if(null==i)t.c&&(r=Ia(n=(t=t.c).g),n=n.a.currentTime,i=Date.now()/1e3,t.c==n&&t.h==r||(t.f=i,t.c=n,t.h=r),(n=i-t.f)>=t.i&&r&&t.b(t.c,n));else if(0!=i||t.i){a=r.start(i);var o=t.w.wa();if(!(a>=o)){e=(o=a-n)<=e;var s=!1;.001>o||(e||t.f||(t.f=!0,(n=new Tt("largegap",{currentTime:n,gapSize:o})).cancelable=!0,t.m(n),t.v.jumpLargeGaps&&!n.defaultPrevented&&(s=!0)),!e&&!s)||(0!=i&&r.end(i-1),t.b.currentTime=a)}}}}}function Ma(t){var e=this;this.f=t,this.b=new Set,this.c=new ct(function(){Ca(e,!1)}).Ia(.25)}function Ca(t,e){for(var n=f(t.b),r=n.next();!r.done;r=n.next())r.value.h(t.f.currentTime,e)}function Na(t){for(var e=[],n=(t=f(t)).next();!n.done;n=t.next())for(var r=(n=f(n.value.variants)).next();!r.done;r=n.next())e.push(r.value);return e}function Ra(t,e){for(var n=null,r=f(t),i=r.next();!i.done;i=r.next())e>=(i=i.value).startTime&&(n=i);return n}function Da(t){this.f=t,this.b=null,this.c=function(){}}function La(t){var e=this;this.b=t,this.g=!1,this.f=this.b.cc(),this.c=new ct(function(){e.b.Ed(.25*e.f)})}function Ua(t){t.c.stop();var e=t.g?0:t.f;0<=e?t.b.cc()!=e&&t.b.ed(e):(t.c.Ia(.25),0!=t.b.cc()&&t.b.ed(0))}function Oa(t,e,n){this.b=t,this.g=e,this.h=n,this.c=new Ft,this.f=new Va(t),0Math.abs(t.b.currentTime-e)?Ka(t):(Vt(t.c,t.b,"seeking",function(){Ka(t)}),Ha(t.f,0==t.b.currentTime?e:t.b.currentTime))}function Ka(t){Kt(t.c,t.b,"seeking",function(){return t.g()})}function Va(t){var e=this;this.c=t,this.i=10,this.h=this.g=this.f=0,this.b=new ct(function(){0>=e.f?e.b.stop():e.c.currentTime!=e.g?e.b.stop():(e.c.currentTime=e.h,e.f--)})}function Ha(t,e){t.g=t.c.currentTime,t.h=e,t.f=t.i,t.c.currentTime=e,t.b.Ia(.1)}function qa(t){function e(){n.g=!0,null!=n.c&&(n.b.currentTime=n.c)}var n=this;this.b=t,this.g=!1,this.c=null,this.f=new Ft,0==this.b.readyState?Vt(this.f,this.b,"loadedmetadata",e):e()}function za(t,e,n,r,i,a){var o=this;this.c=t,this.b=e.presentationTimeline,this.C=e.minBufferTime||0,this.h=n,this.w=i,this.m=null,this.g=new _a(t,e.presentationTimeline,n,function(t,e){if(!e.stallEnabled)return null;var n=e.stallSkip,r=new ka(new Aa(t),e.stallThreshold);return function(t,e){t.b=e}(r,function(){t.currentTime+=n}),r}(t,n),a),this.f=new Oa(t,function(){var t=o.g;t.j=!0,t.i=!1,t.f=!1;var e=ja(o.f);return t=Ya(o,e),.001t.b.Y()?t.b.ib():t.b.wa():0>e&&(e=t.b.wa()+e),Ga(t,Xa(t,e))}(this,r)),this.j=new ct(function(){if(0!=o.c.readyState&&!o.c.paused){var t=o.c.currentTime,e=o.b.ib(),n=o.b.wa();3>n-e&&(e=n-3),t=n?n-t.h.durationBackoff:e}function Ya(t,e){var n=Oe.bind(null,t.c.buffered),r=Math.max(t.C,t.h.rebufferingGoal),i=t.h.safeSeekOffset,a=t.b.ib(),o=t.b.wa(),s=t.b.Y();3>o-a&&(a=o-3);var u=t.b.Cb(r),c=t.b.Cb(i);return r=t.b.Cb(r+i),e>=s?Ga(t,e):e>o?o:e=u||n(e)?e:r}function Xa(t,e){var n=t.b.ib();return e(n=t.b.wa())?n:e}function Wa(){this.c=function(){},this.b=new Set}function $a(t){var e=this;this.i=t,this.g=new Map,this.b=function(){},this.c=function(){},this.f=function(){},this.j=[{Za:null,Ya:Qa,Sa:function(t,n){return e.b(t,n)}},{Za:Ja,Ya:Qa,Sa:function(t,n){return e.b(t,n)}},{Za:Za,Ya:Qa,Sa:function(t,n){return e.b(t,n)}},{Za:Qa,Ya:Ja,Sa:function(t,n){return e.c(t,n)}},{Za:Qa,Ya:Za,Sa:function(t,n){return e.c(t,n)}},{Za:Ja,Ya:Za,Sa:function(t,n){return e.f(t,n)}},{Za:Za,Ya:Ja,Sa:function(t,n){return e.f(t,n)}}]}ka.prototype.a=function(){this.g=null,this.b=function(){}},_a.prototype.a=function(){this.g&&(this.g.a(),this.g=null),null!=this.h&&(this.h.stop(),this.h=null),this.c&&(this.c.a(),this.c=null),this.b=this.w=this.m=null},_a.prototype.Uc=function(){this.i=!0,Pa(this)},Ma.prototype.a=function(){this.c.stop();for(var t=f(this.b),e=t.next();!e.done;e=t.next())e.value.a();this.b.clear()},Da.prototype.a=function(){this.b=this.f=null,this.c=function(){}},Da.prototype.h=function(t){var e=this.b,n=this.f.periods;e!=(t=Ra(n,t)||n[0])&&this.c(t),this.b=t},La.prototype.a=function(){this.c&&(this.c.stop(),this.c=null),this.b=null},La.prototype.set=function(t){this.f=t,Ua(this)},Oa.prototype.a=function(){this.c&&(this.c.a(),this.c=null),null!=this.f&&(this.f.a(),this.f=null),this.g=function(){},this.b=null},Va.prototype.a=function(){this.b&&(this.b.stop(),this.b=null),this.c=null},qa.prototype.a=function(){this.f&&(this.f.a(),this.f=null),this.b=null},qa.prototype.o=function(t){this.c=this.g?this.c:t},qa.prototype.i=function(){return(this.g?this.b.currentTime:this.c)||0},qa.prototype.v=function(){},za.prototype.a=function(){this.f&&(this.f.a(),this.f=null),this.g&&(this.g.a(),this.g=null),this.j&&(this.j.stop(),this.j=null),this.c=this.f=this.b=this.h=null,this.w=function(){}},za.prototype.o=function(t){var e=this.f;0r.endTime?Za:Qa;this.g.set(r,a);for(var o=f(this.j),s=o.next();!s.done;s=o.next())(s=s.value).Za==i&&s.Ya==a&&s.Sa(r,e)}};var Ja=1,Qa=2,Za=3;function to(t,e){this.a=e,this.c=t,this.g=null,this.j=1,this.v=Promise.resolve(),this.h=[],this.i=new Map,this.b=new Map,this.o=!1,this.F=null,this.C=this.f=this.m=!1,this.w=0}function eo(t){return ro(t,"audio")}function no(t){return ro(t,"video")}function ro(t,e){var n=t.b.get(e);return n?n.Fa||n.stream:null}function io(t,e){return d(function n(){var r,i,a,o,s,u,c,l;return D(n,function(n){switch(n.l){case 1:return r=He,E(n,kn(t.a.L,r.na),2);case 2:return t.w++,t.C=!1,i=t.w,a=t.a.L,o=new Map,s=new Set,o.set(r.na,e),s.add(e),E(n,a.init(o,!1),3);case 3:return t.f?n.return():E(n,ho(t,s),4);case 4:if(t.f)return n.return();t.w!=i||t.b.has(r.na)||t.C||(u=t.a.Qa(),c=bo(t,u),l=lo(e,c,0),t.b.set(r.na,l),So(t,l,0)),S(n)}})})}function ao(t,e){var n=t.b.get("video");if(n){var r=n.stream;if(r)if(e){var i=r.trickModeVideo;i&&!n.Fa&&(so(t,i,!1,0),n.Fa=r)}else(r=n.Fa)&&(n.Fa=null,so(t,r,!0,0))}}function oo(t,e,n,r){e.video&&so(t,e.video,n,r),e.audio&&so(t,e.audio,n,r)}function so(t,e,n,r){var i=t.b.get(e.type);if(!i&&"text"==e.type&&t.g.ignoreTextStreamFailures)io(t,e);else if(i){var a=wo(t,e);if(n&&a!=i.ya)t.b.forEach(function(e){uo(t,e)});else{i.Fa&&(e.trickModeVideo?(i.Fa=e,e=e.trickModeVideo):i.Fa=null);var o=t.h[a];o&&o.vb&&(o=t.i.get(e.id))&&o.vb&&i.stream!=e&&("text"==e.type&&wn(t.a.L,Xt(e.mimeType,e.codecs)),i.stream=e,i.ec=!0,function(t,e,n){if(!e.Hb)return!1;var r=t.a.Qa(),i=En(t.a.L,e.type);return null!=(t=(t=vo(t,e,r,i,n))&&t.a?t.a-t.b:null)&&((n=e.stream.initSegmentReference)&&(t+=(n.a?n.a-n.b:null)||0),e.Hb.b.a>t)}(t,i,a)&&i.Hb.abort(),n&&(i.Na?i.qc=!0:i.Ea?(i.Ja=!0,i.Wb=r,i.qc=!0):(xo(i),Eo(t,i,!0,r))))}}}function uo(t,e){e.Na||e.Ja||(e.Ea?(e.Ja=!0,e.Wb=0):null==Tn(t.a.L,e.type)?null==e.Ba&&So(t,e,0):(xo(e),Eo(t,e,!1,0)))}function co(t,e,n,r,i){return d(function a(){var o,s,u,c,l,f,h;return D(a,function(a){switch(a.l){case 1:return o=t.a.Qa(),s=bo(t,o),u=He,c=new Map,l=new Set,e&&(c.set(u.wb,e),l.add(e)),n&&(c.set(u.La,n),l.add(n)),r&&(c.set(u.na,r),l.add(r)),f=t.a.L,h=t.g.forceTransmuxTS,E(a,f.init(c,h),2);case 2:return t.f?a.return():(function(t){var e=t.c.presentationTimeline.Y();1/0>e?t.a.L.ta(e):t.a.L.ta(Math.pow(2,32))}(t),E(a,ho(t,l),3));case 3:if(t.f)return a.return();c.forEach(function(e,n){if(!t.b.has(n)){var r=lo(e,s,i);t.b.set(n,r),So(t,r,0)}}),S(a)}})})}function lo(t,e,n){return{stream:t,type:t.type,lb:null,xa:null,Fa:null,ec:!0,ya:e,endOfStream:!1,Ea:!1,Ba:null,Ja:!1,Wb:0,qc:!1,Na:!1,Yc:!1,Eb:!1,Vd:n||0,Hb:null}}function fo(t,e){var n=t.h[e];if(n)return n.promise;n={promise:new dt,vb:!1},t.h[e]=n;for(var r=new Set,i=f(t.c.periods[e].variants),a=i.next();!a.done;a=i.next())(a=a.value).video&&r.add(a.video),a.video&&a.video.trickModeVideo&&r.add(a.video.trickModeVideo),a.audio&&r.add(a.audio);for(a=(i=f(t.c.periods[e].textStreams)).next();!a.done;a=i.next())r.add(a.value);return t.v=t.v.then(function(){if(!this.f)return ho(this,r)}.bind(t)).then(function(){this.f||(this.h[e].promise.resolve(),this.h[e].vb=!0)}.bind(t)).catch(function(t){this.f||(this.h[e].promise.catch(function(){}),this.h[e].promise.reject(),delete this.h[e],this.a.onError(t))}.bind(t)),n.promise}function ho(t,e){return d(function n(){var r,i,a,o,s,u,c;return D(n,function(n){switch(n.l){case 1:r=[];for(var l=f(e),h=l.next();!h.done;h=l.next())i=h.value,(a=t.i.get(i.id))?r.push(a.promise):(t.i.set(i.id,{promise:new dt,vb:!1}),r.push(i.createSegmentIndex()));return x(n,2),E(n,Promise.all(r),4);case 4:if(t.f)return n.return();A(n,3);break;case 2:if(o=I(n),t.f)return n.return();for(h=(n=f(e)).next();!h.done;h=n.next())s=h.value,t.i.get(s.id).promise.catch(function(){}),t.i.get(s.id).promise.reject(),t.i.delete(s.id);throw o;case 3:for(h=(l=f(e)).next();!h.done;h=l.next())u=h.value,(c=t.i.get(u.id)).vb||(c.promise.resolve(),c.vb=!0);S(n)}})})}function po(t,e){if(!t.f&&!e.Ea&&null!=e.Ba&&!e.Na)if(e.Ba=null,e.Ja)Eo(t,e,e.qc,e.Wb);else{try{var n=function(t,e){function n(t){return"text"==t.type&&"application/cea-608"==t.stream.mimeType}if(n(e))return t.a.L.nc(e.stream.originalId||""),null;var r=t.a.Qa(),i=mo(t,e,r),a=wo(t,e.stream),o=bo(t,i),s=function(t,e,n){return"text"==e?null==(t=t.a).b||t.b=t.c.presentationTimeline.Y())return e.endOfStream=!0,"video"==e.type&&(i=t.b.get("text"))&&"application/cea-608"==i.stream.mimeType&&(i.endOfStream=!0),null;if(e.endOfStream=!1,e.ya=o,o!=a)return null;if(s>=u)return.5;if(o=En(t.a.L,e.type),!(o=vo(t,e,r,o,a)))return 1;var c=1/0;return Array.from(t.b.values()).forEach(function(e){n(e)||(e=mo(t,e,r),c=Math.min(c,e))}),i>=c+t.c.presentationTimeline.a?1:(e.Vd=0,function(t,e,n,r,i){var a=t.c.periods[r],o=e.stream,s=t.c.presentationTimeline.Y(),u=t.c.periods[r+1];r=function(t,e,n,r,i){return e.ec?(n=function(t,e,n,r,i){return"text"==e?(t.a.m=n,(t=t.a).f=r,t.h=i,Promise.resolve()):Promise.all([An(t,e,t.ke.bind(t,e)),An(t,e,t.Nf.bind(t,e,n)),An(t,e,t.Kf.bind(t,e,r,i))])}(t.a.L,e.type,t.c.periods[n].startTime-e.stream.presentationTimeOffset,r,i),e.stream.initSegmentReference?(t=To(t,e,e.stream.initSegmentReference).then(function(t){if(!this.f)return xn(this.a.L,e.type,t,null,null,e.stream.closedCaptions&&0=(n=n-i-r)?Promise.resolve():t.a.L.remove(e.type,i,i+n).then(function(){}.bind(t))}(t,e,n).then(function(){if(!this.f)return xn(this.a.L,e.type,o,a.startTime+r.startTime,a.endTime+r.startTime,s)}.bind(t)).then(function(){if(!this.f)return e.lb=i,e.xa=a,Promise.resolve()}.bind(t))}(this,e,n,a,o,i,t[1])}.bind(t)).then(function(){this.f||this.m||(e.Ea=!1,e.Yc=!1,e.Ja||this.a.Uc(),So(this,e,0),function(t,e){if(!t.o){var n=Array.from(t.b.values());if(1==n.length&&"text"==n[0].type||(t.o=n.every(function(t){return"text"==t.type||!t.Ja&&!t.Na&&t.xa})),t.o){for(n=wo(t,e),t.h[n]||fo(t,n).then(function(){this.f||this.a.Gd()}.bind(t)).catch(Fe.Gb),n=0;nr?null:e):null}function go(t){return!t.Ea&&null==t.Ba&&!t.Ja&&!t.Na}function bo(t,e){var n=Ra(t.c.periods,e+qe);return n?t.c.periods.indexOf(n):0}function wo(t,e){for(var n=t.c.periods,r=0;r=n&&202!=n)return i&&(r=i),{uri:r,data:e,headers:t,fromCache:!!t["x-shaka-from-cache"]};i=null;try{i=ie(e)}catch(t){}throw new ht(401==n||403==n?2:1,1,1001,r,n,i,t,a)}function Io(t,e,n,r){var i=new Io.b;Gt(e.headers).forEach(function(t,e){i.append(e,t)});var a=new Io.a,o={pd:!1,ce:!1};if(t=new pt(t=Io.h(t,n,{body:e.body||void 0,headers:i,method:e.method,signal:a.signal,credentials:e.allowCrossSiteCredentials?"include":void 0},o,r),function(){return o.pd=!0,a.abort(),Promise.resolve()}),e=e.retryParameters.timeout){var s=new ct(function(){o.ce=!0,a.abort()});s.O(e/1e3),t.finally(function(){s.stop()})}return t}function _o(t,e,n,r){var i=new _o.f,a=Date.now(),o=0;return new pt(new Promise(function(s,u){for(var c in i.open(e.method,t,!0),i.responseType="arraybuffer",i.timeout=e.retryParameters.timeout,i.withCredentials=e.allowCrossSiteCredentials,i.onabort=function(){u(new ht(1,1,7001,t,n))},i.onload=function(e){for(var r=(e=e.target).getAllResponseHeaders().trim().split("\r\n"),i={},a=(r=f(r)).next();!a.done;a=r.next())i[(a=a.value.split(": "))[0].toLowerCase()]=a.slice(1).join(": ");try{var o=Ao(i,e.response,e.status,t,e.responseURL,n);s(o)}catch(t){u(t)}},i.onerror=function(e){u(new ht(1,1,1002,t,e,n))},i.ontimeout=function(){u(new ht(1,1,1003,t,n))},i.onprogress=function(t){var e=Date.now();(100=t.endTime)return null;var e=new VTTCue(t.startTime,t.endTime,t.payload);e.lineAlign=t.lineAlign,e.positionAlign=t.positionAlign,e.size=t.size;try{e.align=t.textAlign}catch(t){}return"center"==t.textAlign&&"center"!=e.align&&(e.align="middle"),"vertical-lr"==t.writingMode?e.vertical="lr":"vertical-rl"==t.writingMode&&(e.vertical="rl"),1==t.lineInterpretation&&(e.snapToLines=!1),null!=t.line&&(e.line=t.line),null!=t.position&&(e.position=t.position),e}function bs(t,e){var n=t.mode;t.mode="showing"==n?"showing":"hidden";for(var r=t.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&e(a)&&t.removeCue(a)}t.mode=n}function ws(t,e,n,r,i){var a,o=i in r,s=!0;for(a in e){var u=i+"."+a,c=o?r[i]:n[a];o||a in n?void 0===e[a]?void 0===c||o?delete t[a]:t[a]=xt(c):c.constructor==Object&&e[a]&&e[a].constructor==Object?(t[a]||(t[a]=xt(c)),u=ws(t[a],e[a],c,r,u),s=s&&u):typeof e[a]!=typeof c||null==e[a]||e[a].constructor!=c.constructor?s=!1:t[a]=e[a]:s=!1}return s}function Ts(){var t=5e5,e=1/0;navigator.connection&&navigator.connection.type&&(t=1e6*navigator.connection.downlink,navigator.connection.saveData&&(e=360));var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,dash:{customScheme:function(t){if(t)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};Zt("Web0S")&&(i.stallEnabled=!1);var a={trackSelectionCallback:function(t){return t},progressCallback:function(){},usePersistentLicense:!0},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Wn,abr:{enabled:!0,defaultBandwidthEstimate:t,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return a.trackSelectionCallback=function(t){return function(t,e){var n=t.filter(function(t){return"variant"==t.type}),r=[],i=Rn(e,n.map(function(t){return t.language}));i&&(r=n.filter(function(t){return Cn(t.language)==i})),0==r.length&&(r=n.filter(function(t){return t.primary})),0==r.length&&(n.map(function(t){return t.language}),r=n);var a=r.filter(function(t){return t.height&&480>=t.height});if(a.length&&(a.sort(function(t,e){return e.height-t.height}),r=a.filter(function(t){return t.height==a[0].height})),n=[],r.length){var o=Math.floor(r.length/2);r.sort(function(t,e){return t.bandwidth-e.bandwidth}),n.push(r[o])}for(r=f(t),o=r.next();!o.done;o=r.next())"text"==(o=o.value).type&&n.push(o);return n}(t,o.preferredAudioLanguage)},o}function Es(t,e,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return ws(t,e,n||Ts(),r,"")}function Ss(){this.a=null,this.b=[]}function xs(t,e){if(null==t.a)t.a={timestamp:Date.now()/1e3,state:e,duration:0};else{var n=Date.now()/1e3;t.a.duration=n-t.a.timestamp,t.a.state!=e&&(t.b.push(t.a),t.a={timestamp:n,state:e,duration:0})}}function ks(t,e){var n=0;t.a&&t.a.state==e&&(n+=t.a.duration);for(var r=f(t.b),i=r.next();!i.done;i=r.next())n+=(i=i.value).state==e?i.duration:0;return n}function As(){this.b=this.c=null,this.a=[]}function Is(t,e,n){t.b!=e&&(t.b=e,t.a.push({timestamp:Date.now()/1e3,id:e.id,type:"text",fromAdaptation:n,bandwidth:null}))}function _s(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN,this.a=new Ss,this.b=new As}function Ps(e,n){var r=this;St.call(this),this.g=fu,this.a=null,this.$a=!1,this.i=new Ft,this.rc=this.j=this.xb=this.b=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.F=this.h=this.N=null,this.Ad=1e9,this.Tb=new Set,this.eb=!0,this.ka=null,this.yd=!1,this.wd=0,this.ja=null,this.C=new ha,this.c=Os(this),this.Ub={width:1/0,height:1/0},this.v=null,this.Rb=new Ta(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.Ka=this.c.preferredTextLanguage,this.yb=this.c.preferredTextRole,n&&n(this),this.N=function(t){return new Mt(function(e,n){t.j&&t.j.segmentDownloaded(e,n)})}(this),Kt(this.i,t,"online",function(){r.ad()}),this.w={name:"detach"},this.S={name:"attach"},this.Ca={name:"unload"},this.yc={name:"manifest-parser"},this.xc={name:"manifest"},this.ab={name:"media-source"},this.sc={name:"drm-engine"},this.W={name:"load"},this.Ac={name:"src-equals-drm-engine"},this.cb={name:"src-equals"};var i=new Map;i.set(this.S,function(t,e){return gt(function(t,e,n){return null==e.u&&(e.u=n.u,Kt(t.i,e.u,"error",function(){var e=Qs(t);e&&t.Ha(e)})),t.a=e.u,Promise.resolve()}(r,t,e))}),i.set(this.w,function(t){return t.u&&(r.i.ma(t.u,"error"),t.u=null),r.a=null,gt(t=Promise.resolve())}),i.set(this.Ca,function(t){return gt(Rs(r,t))}),i.set(this.ab,function(e){return gt(e=function(e,n){return d(function r(){var i,a,o,s;return D(r,function(r){switch(r.l){case 1:return i=t.muxjs?new De:new Le,a=e.c.textDisplayFactory,o=new a,s=new yn(n.u,i,o),E(r,s.o,2);case 2:e.F=s,S(r)}})})}(r,e))}),i.set(this.yc,function(t,e){return gt(function(t,e,n){return d(function r(){var i,a,o;return D(r,function(r){switch(r.l){case 1:if(e.va=n.va,e.mimeType=n.mimeType,e.uri=n.uri,i=e.uri,a=t.N,t.xb=i,e.va){t.m=e.va(),r.A(2);break}return o=t,E(r,mi.create(i,a,t.c.manifest.retryParameters,e.mimeType),3);case 3:o.m=r.s;case 2:t.m.configure(t.c.manifest),S(r)}})})}(r,t,e))}),i.set(this.xc,function(t){return function(t,e){var n=e.uri,r=t.N;t.Pb=new Wa,function(t,e){t.c=e}(t.Pb,function(e){Js(t,"timelineregionadded",e)});var i={networkingEngine:r,filterNewPeriod:function(e){return t.Bc(e)},filterAllPeriods:function(e){return js(t,e)},onTimelineRegionAdded:function(e){var n=t.Pb;t:{for(var r=f(n.b),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==e.schemeIdUri&&i.startTime==e.startTime&&i.endTime==e.endTime){r=i;break t}r=null}null==r&&(n.b.add(e),n.c(e))},onEvent:function(e){return t.dispatchEvent(e)},onError:function(e){return t.Ha(e)}};return new pt(Promise.resolve().then(function(){return d(function e(){var r;return D(e,function(e){switch(e.l){case 1:return r=t,E(e,t.m.start(n,i),2);case 2:if(r.b=e.s,t.dispatchEvent(new Tt("manifestparsed")),0==t.b.periods.length)throw new ht(2,4,4014);!function(t){function e(t){return t.video&&t.audio||t.video&&t.video.codecs.includes(",")}t.some(function(t){return t.variants.some(e)})&&t.forEach(function(t){t.variants=t.variants.filter(e)})}(t.b.periods),S(e)}})})}),function(){return t.m.stop()})}(r,t)}),i.set(this.sc,function(){return gt(function(t){return d(function e(){return D(e,function(e){switch(e.l){case 1:return t.h=new pe({nb:t.N,onError:function(e){t.Ha(e)},gc:function(e){Zs(t,e)},onExpirationUpdated:function(e,n){tu(t,e,n)},onEvent:function(e){t.dispatchEvent(e)}}),t.h.configure(t.c.drm),E(e,me(t.h,Na(t.b.periods),t.b.offlineSessionIds),2);case 2:js(t,t.b.periods),S(e)}})})}(r))}),i.set(this.W,function(t,e){return gt(function(t,e,n){return d(function r(){var i,a,o,s,u,c,l,h,d;return D(r,function(r){switch(r.l){case 1:return e.startTime=n.startTime,i=e.u,a=e.uri,t.xb=a,t.v=new _s,o=function(){return Vs(t)},s=function(){var e=t.a.playbackRate;0!=e&&t.K.set(e)},Kt(t.i,i,"playing",o),Kt(t.i,i,"pause",o),Kt(t.i,i,"ended",o),Kt(t.i,i,"ratechange",s),u=t.c.abrFactory,t.j&&t.rc==u||(t.rc=u,t.j=new u,t.j.configure(t.c.abr)),function(t,e){for(var n=0;n=e.a&&n=HTMLMediaElement.HAVE_CURRENT_DATA?a.resolve():t.a.error?a.reject(Qs(t)):(Vt(t.i,t.a,"loadeddata",function(){a.resolve()}),Vt(t.i,t.a,"error",function(){a.reject(Qs(t))})),new pt(a,function(){return a.reject(new ht(2,7,7001)),Promise.resolve()})}(r,t,e)}),this.fb=new ps(this.w,{Ke:function(t,e,n,i){var a=null;return t==r.w&&(a=n==r.w?r.w:r.S),t==r.S&&(a=n==r.w||e.u!=i.u?r.w:n==r.S?r.S:n==r.ab||n==r.W?r.ab:n==r.cb?r.Ac:null),t==r.ab&&(a=n==r.W&&e.u==i.u?r.yc:r.Ca),t==r.yc&&(a=uu(r.W,r.xc,r.Ca,n,e,i)),t==r.xc&&(a=uu(r.W,r.sc,r.Ca,n,e,i)),t==r.sc&&(a=uu(r.W,r.W,r.Ca,n,e,i)),t==r.Ac&&(a=n==r.cb&&e.u==i.u?r.cb:r.Ca),t!=r.W&&t!=r.cb||(a=r.Ca),t==r.Ca&&(a=i.u&&e.u==i.u?r.S:r.w),a},ue:function(t,e,n){return r.dispatchEvent(new Tt("onstatechange",{state:t.name})),i.get(t)(e,n)},handleError:function(t){return d(function e(){return D(e,function(e){switch(e.l){case 1:return E(e,Rs(r,t),2);case 2:return e.return(t.u?r.S:r.w)}})})},af:function(t){r.dispatchEvent(new Tt("onstateidle",{state:t.name}))}}),e&&this.zb(e,!0)}(n=Ho.prototype).destroy=function(){return this.a.destroy()},n.hasFixedKeySpace=function(){return!0},n.addSegments=function(){return qo("segment")},n.removeSegments=function(t,e){return zo(this,"segment",t,e)},n.getSegments=function(t){return Go(this,"segment",t).then(function(t){return t.map(Jo)})},n.addManifests=function(){return qo("manifest")},n.updateManifestExpiration=function(t,e){var n=Uo(this.a,"manifest"),r=n.store(),i=new dt;return r.get(t).onsuccess=function(n){(n=n.target.result)?(n.expiration=e,r.put(n),i.resolve()):i.reject(new ht(2,9,9012,"Could not find values for "+t))},n.promise().then(function(){return i})},n.removeManifests=function(t,e){return zo(this,"manifest",t,e)},n.getManifests=function(t){return Go(this,"manifest",t).then(function(t){return t.map(Yo)})},n.getAllManifests=function(){var t=this;return d(function e(){var n,r;return D(e,function(e){switch(e.l){case 1:return n=Lo(t.a,"manifest"),r=new Map,E(e,Ro(n,function(t,e){r.set(t,Yo(e))}),2);case 2:return E(e,n.promise(),3);case 3:return e.return(r)}})})},(n=Zo.prototype).destroy=function(){return this.a.destroy()},n.hasFixedKeySpace=function(){return this.f},n.addSegments=function(t){return ts(this,this.c,t)},n.removeSegments=function(t,e){return es(this,this.c,t,e)},n.getSegments=function(t){return ns(this,this.c,t)},n.addManifests=function(t){return ts(this,this.b,t)},n.updateManifestExpiration=function(t,e){var n=Uo(this.a,this.b),r=n.store();return r.get(t).onsuccess=function(n){(n=n.target.result)&&(n.expiration=e,r.put(n,t))},n.promise()},n.removeManifests=function(t,e){return es(this,this.b,t,e)},n.getManifests=function(t){return ns(this,this.b,t)},n.getAllManifests=function(){var t=this;return d(function e(){var n,r;return D(e,function(e){switch(e.l){case 1:return n=Lo(t.a,t.b),r=new Map,E(e,Ro(n,function(t,e){r.set(t,e)}),2);case 2:return E(e,n.promise(),3);case 3:return e.return(r)}})})},(n=rs.prototype).init=function(){var e=this,n=new dt,r=t.indexedDB.open("shaka_offline_db",4);return r.onsuccess=function(t){t=t.target.result,e.f=t;var r=t.objectStoreNames;r=r.contains("manifest")&&r.contains("segment")?new Ho(t):null,e.a=r,r=(r=t.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?new Zo(t,"segment-v2","manifest-v2",!0):null,e.b=r,r=(r=t.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?new Zo(t,"segment-v3","manifest-v3",!1):null,e.c=r,t=t.objectStoreNames.contains("session-ids")?new jo(t):null,e.g=t,n.resolve()},r.onupgradeneeded=function(t){t=t.target.result;for(var e=f(["segment-v3","manifest-v3","session-ids"]),n=e.next();!n.done;n=e.next())n=n.value,t.objectStoreNames.contains(n)||t.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(t){n.reject(new ht(2,9,9001,r.error)),t.preventDefault()},n},n.destroy=function(){var t=this;return d(function e(){return D(e,function(e){switch(e.l){case 1:if(!t.a){e.A(2);break}return E(e,t.a.destroy(),2);case 2:if(!t.b){e.A(4);break}return E(e,t.b.destroy(),4);case 4:if(!t.c){e.A(6);break}return E(e,t.c.destroy(),6);case 6:if(!t.g){e.A(8);break}return E(e,t.g.destroy(),8);case 8:t.f&&t.f.close(),S(e)}})})},n.getCells=function(){var t=new Map;return this.a&&t.set("v1",this.a),this.b&&t.set("v2",this.b),this.c&&t.set("v3",this.c),t},n.getEmeSessionCell=function(){return this.g},n.erase=function(){var e=this;return d(function n(){return D(n,function(n){switch(n.l){case 1:if(!e.a){n.A(2);break}return E(n,e.a.destroy(),2);case 2:if(!e.b){n.A(4);break}return E(n,e.b.destroy(),4);case 4:if(!e.c){n.A(6);break}return E(n,e.c.destroy(),6);case 6:return e.f&&e.f.close(),E(n,function(){var e=new dt,n=t.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){e.resolve()},n.onerror=function(t){e.reject(new ht(2,9,9001,n.error)),t.preventDefault()},e}(),8);case 8:return e.f=null,e.a=null,e.b=null,e.c=null,E(n,e.init(),0)}})})},Ko("idb",function(){return t.indexedDB?new rs:null}),is.prototype.ra=function(){return this.g},is.prototype.$=function(){return this.f},is.prototype.key=function(){return this.c},is.prototype.toString=function(){return this.b},(n=ls.prototype).configure=function(){},n.start=function(t){var e=this;return d(function n(){var r,i,a,o,s;return D(n,function(n){switch(n.l){case 1:return r=as(t),e.a=r,null==r||"manifest"!=r.a?n.return(Promise.reject(new ht(2,1,9004,r))):(i=new Bo,k(n,2),E(n,i.init(),4));case 4:return E(n,Fo(i,r.ra(),r.$()),5);case 5:return E(n,n.s.getManifests([r.key()]),6);case 6:return a=n.s,o=a[0],s=new os(r.ra(),r.$()),n.return(function(t,e){var n=new vi(null,0);n.ta(e.duration);var r=e.periods.map(function(e){return ss(t,e,n)}),i=e.drmInfo?[e.drmInfo]:[];return e.drmInfo&&r.forEach(function(t){t.variants.forEach(function(t){t.drmInfos=i})}),{presentationTimeline:n,minBufferTime:2,offlineSessionIds:e.sessionIds,periods:r}}(s,o));case 2:return _(n),E(n,i.destroy(),7);case 7:P(n,0)}})})},n.stop=function(){return Promise.resolve()},n.update=function(){},n.onExpirationUpdated=function(t,e){var n=this;return d(function r(){var i,a,o,s,u,c,l;return D(r,function(r){switch(r.l){case 1:return i=n.a,a=new Bo,x(r,2,3),E(r,a.init(),5);case 5:return E(r,Fo(a,i.ra(),i.$()),6);case 6:return E(r,(o=r.s).getManifests([i.key()]),7);case 7:if(s=r.s,u=s[0],c=u.sessionIds.includes(t),l=null==u.expiration||u.expiration>e,!c||!l){r.A(3);break}return E(r,o.updateManifestExpiration(i.key(),e),3);case 3:return _(r),E(r,a.destroy(),10);case 10:P(r,0);break;case 2:I(r),r.A(3)}})})},mi.Kb("application/x-offline-manifest",ls),B("shaka.offline.OfflineScheme",fs),fs.a=function(t){return yt(t={uri:t,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},fs.b=function(t,e){var n=new Bo;return yt(void 0).T(function(){return n.init()}).T(function(){return Fo(n,e.ra(),e.$())}).T(function(t){return t.getSegments([e.key()])}).T(function(t){return{uri:e,data:t[0].data,headers:{}}}).finally(function(){return n.destroy()})},Rt("offline",fs),ps.prototype.destroy=function(){var t=this;return d(function e(){return D(e,function(e){switch(e.l){case 1:return t.j=!1,t.b&&t.b.abort(),vs(t),E(e,t.m,2);case 2:t.a&&t.a.qa.Ua();for(var n=f(t.f),r=n.next();!r.done;r=n.next())r.value.qa.Ua();t.a=null,t.f=[],t.g=null,S(e)}})})},B("shaka.text.SimpleTextDisplayer",ys),ys.prototype.remove=function(t,e){return!!this.a&&(bs(this.a,function(n){return n.startTimet}),!0)},ys.prototype.remove=ys.prototype.remove,ys.prototype.append=function(t){for(var e=gs,n=[],r=0;r=t.a.duration-.1;break;case hu:t:{var n;if((n=t.a.ended)||(n=!(n=t.F).g||"ended"==n.g.readyState),n)e=!0;else{if(t.b.presentationTimeline.U()&&(n=t.b.presentationTimeline.jb(),Ue(t.a.buffered)>=n)){e=!0;break t}e=!1}}break;default:e=!1}var r=je(t.a.buffered,t.a.currentTime),i=e,a=(n=t.V).b.get(n.a);e=n.a,r=i||r>=a?xa:Sa,n.a=r,e!=r&&Ks(t)}).Ia(.25)}function Ls(t){if(t.m&&t.m.configure(t.c.manifest),t.h&&t.h.configure(t.c.drm),t.f){t.f.configure(t.c.streaming);try{t.b.periods.forEach(t.Bc.bind(t))}catch(e){t.Ha(e)}var e=eo(t.f),n=no(t.f),r=au(t);e=Xn(e,n,r.variants),t.j&&e&&e.allowedByApplication&&e.allowedByKeySystem?Hs(t,r.variants):qs(t,r)}t.j&&(t.j.configure(t.c.abr),t.c.abr.enabled&&!t.eb?t.j.enable():t.j.disable(),$s(t))}function Us(t,e,n,r){pa(t.C,e).variant=n,(t=t.v.b).c!=n&&(t.c=n,t.a.push({timestamp:Date.now()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function Os(t){var e=Ts();return e.streaming.failureCallback=function(e){t.U()&&[1001,1002,1003].includes(e.code)&&(e.severity=1,t.ad())},e.textDisplayFactory=function(){return new ys(t.a)},e}function js(t,e){var n=t.f?eo(t.f):null,r=t.f?no(t.f):null;if(e.forEach(On.bind(null,t.h,n,r)),0==(n=function(t,e){var n=0;return t.forEach(function(t){n+=e(t)?1:0}),n}(e,function(t){return t.variants.some(qn)})))throw new ht(2,4,4032);if(nn&&(n+=Math.pow(2,32)),n=n.toString(16)),new ht(2,3,3016,e,n,t.a.error.message)}function Zs(t,e){if(t.f){var n=au(t),r=!1,i=Object.keys(e),a=1==i.length&&"00"==i[0];i.length&&n.variants.forEach(function(t){(function(t){var e=[];return t.audio&&e.push(t.audio),t.video&&e.push(t.video),e})(t).forEach(function(n){var i=t.allowedByKeySystem;n.keyId&&(n=e[a?"00":n.keyId],t.allowedByKeySystem=!!n&&!Cs.includes(n)),i!=t.allowedByKeySystem&&(r=!0)})}),(i=Xn(i=eo(t.f),no(t.f),n.variants))&&!i.allowedByKeySystem&&qs(t,n),r&&(Gs(t),Hs(t,n.variants))}}function tu(t,e,n){t.m&&t.m.onExpirationUpdated&&t.m.onExpirationUpdated(e,n),t.dispatchEvent(new Tt("expirationupdated"))}function eu(t,e){var n=t.h?Yt(t.h.S):{},r=Object.keys(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,o=[],s=[],u=f(e),c=u.next();!c.done;c=u.next()){var l=[];(c=c.value).audio&&l.push(c.audio),c.video&&l.push(c.video);for(var h=(l=f(l)).next();!h.done;h=l.next())if((h=h.value).keyId){var d=n[r?"00":h.keyId];d?Cs.includes(d)&&(s.includes(d)||s.push(d)):o.includes(h.keyId)||o.push(h.keyId)}c.allowedByApplication?c.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new ht(2,4,4012,{hasAppRestrictions:a,missingKeys:o,restrictedKeyStatuses:s})}function nu(t,e){d(function n(){return D(n,function(n){switch(n.l){case 1:return E(n,Promise.resolve(),2);case 2:t.g!=lu&&t.dispatchEvent(e),S(n)}})})}function ru(t){for(var e=new Set,n=(t=f(t)).next();!n.done;n=t.next())(n=n.value).language?e.add(Cn(n.language)):e.add("und");return e}function iu(t){for(var e=new Map,n=(t=f(t)).next();!n.done;n=t.next()){var r=n.value;n="und";var i=[];for(r.language&&(n=Cn(r.language)),(i="variant"==r.type?r.audioRoles:r.roles)&&i.length||(i=[""]),e.has(n)||e.set(n,new Set),i=(r=f(i)).next();!i.done;i=r.next())i=i.value,e.get(n).add(i)}var a=[];return e.forEach(function(t,e){for(var n=f(t),r=n.next();!r.done;r=n.next())a.push({language:e,role:r.value})}),a}function au(t){for(var e=t.o.i(),n=null,r=(t=f(t.b.periods)).next();!r.done;r=t.next())(r=r.value).startTime<=e&&(n=r);return n}function ou(t){var e=au(t);return pa(t.C,e).variant}function su(){return new ht(2,7,7e3)}function uu(t,e,n,r,i,a){return r==t&&i.u==a.u&&i.uri==a.uri&&i.mimeType==a.mimeType&&i.va==a.va?e:n}function cu(t){return new Promise(function(e,n){t.Ua=function(){return n(su())},t.fc=function(){return e()},t.onError=function(t){return n(t)},t.hc=function(){return n(su())}})}Ps.registerSupportPlugin=function(t,e){Ns[t]=e},Ps.isBrowserSupported=function(){return!!(t.Promise&&t.Uint8Array&&Array.prototype.forEach&&t.MediaKeys&&t.navigator&&t.navigator.requestMediaKeySystemAccess&&t.MediaKeySystemAccess&&t.MediaKeySystemAccess.prototype.getConfiguration)&&(!!Jt()||Qt("application/x-mpegurl"))},Ps.probeSupport=function(){return Ae().then(function(t){for(var e=mi.vf(),n={},r=f('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=r.next();!i.done;i=r.next()){n[i=i.value]=Jt()?!!pn(i)||(MediaSource.isTypeSupported(i)||Ge(i)):Qt(i);var a=i.split(";")[0];n[a]=n[a]||n[i]}for(var o in t={manifest:e,media:n,drm:t},Ns)t[o]=Ns[o]();return t})},Ps.prototype.zb=function(t,e){if(e=void 0===e||e,this.g==lu)return Promise.reject(su());var n={va:null,u:null,mimeType:null,startTime:null,hd:null,uri:null};n.u=t,Jt()||(e=!1);var r=e?this.ab:this.S,i=ms(this.fb,function(){return{node:r,payload:n,Ra:!1}});return i.pb=function(){},cu(i)},Ps.prototype.attach=Ps.prototype.zb,Ps.prototype.detach=function(){var t=this;if(this.g==lu)return Promise.reject(su());var e=ms(this.fb,function(){return{node:t.w,payload:{va:null,u:null,mimeType:null,startTime:null,hd:null,uri:null},Ra:!1}});return e.pb=function(){},cu(e)},Ps.prototype.detach=Ps.prototype.detach,Ps.prototype.ld=function(t){var e=this;if(t=void 0===t||t,this.g==lu)return Promise.reject(su());Jt()||(t=!1);var n={va:null,u:null,mimeType:null,startTime:null,hd:null,uri:null},r=ms(this.fb,function(r){var i=r.u&&t?e.ab:r.u?e.S:e.w;return n.u=r.u,{node:i,payload:n,Ra:!1}});return r.pb=function(){},cu(r)},Ps.prototype.unload=Ps.prototype.ld,Ps.prototype.load=function(t,e,n){if(this.g==lu)return Promise.reject(su());this.dispatchEvent(new Tt("loading"));var r={va:null,u:null,mimeType:null,startTime:null,hd:null,uri:null};r.uri=t,r.hd=Date.now()/1e3,n&&"string"!=typeof n&&(Qn("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),r.va=function(){return new n}),n&&"string"==typeof n&&(r.mimeType=n),void 0!==e&&(r.startTime=e);var i=function(t){if(t.va)return!1;if(!Jt())return!0;var e=t.mimeType;return t=t.uri||"",e||(e={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[mi.getExtension(t)]),!!e&&!!Qt(e)&&(!mi.isSupported(t,e)||!!navigator.vendor&&navigator.vendor.includes("Apple"))}(r)?this.cb:this.W,a=ms(this.fb,function(t){return null==t.u?null:(r.u=t.u,{node:i,payload:r,Ra:!0})});return a.pb=function(){},new Promise(function(t,e){a.hc=function(){return e(new ht(2,7,7002))},a.fc=function(){return t()},a.Ua=function(){return e(su())},a.onError=function(t){return e(t)}})},Ps.prototype.load=Ps.prototype.load,Ps.prototype.configure=function(t,e){if(2==arguments.length&&"string"==typeof t){for(var n=t,r={},i=r,a=0,o=0;!(0>(a=n.indexOf(".",a)));)0!=a&&"\\"==n[a-1]||(i[o=n.substring(o,a).replace(/\\\./g,".")]={},i=i[o],o=a+1),a+=1;i[n.substring(o).replace(/\\\./g,".")]=e,t=r}return n=Es(this.c,t,Os(this)),Ls(this),n},Ps.prototype.configure=Ps.prototype.configure,Ps.prototype.getConfiguration=function(){var t=Os(this);return Es(t,this.c,Os(this)),t},Ps.prototype.getConfiguration=Ps.prototype.getConfiguration,Ps.prototype.Df=function(){for(var t in this.c)delete this.c[t];Es(this.c,Os(this),Os(this)),Ls(this)},Ps.prototype.resetConfiguration=Ps.prototype.Df,Ps.prototype.Ee=function(){return this.g},Ps.prototype.getLoadMode=Ps.prototype.Ee,Ps.prototype.Ie=function(){return this.a},Ps.prototype.getMediaElement=Ps.prototype.Ie,Ps.prototype.Bb=function(){return this.N},Ps.prototype.getNetworkingEngine=Ps.prototype.Bb,Ps.prototype.$b=function(){return this.xb},Ps.prototype.getAssetUri=Ps.prototype.$b,Ps.prototype.He=function(){return Qn("getManifestUri",'Please use "getAssetUri" instead.'),this.$b()},Ps.prototype.getManifestUri=Ps.prototype.He,Ps.prototype.U=function(){return this.b?this.b.presentationTimeline.U():!(!this.a||!this.a.src)&&1/0==this.a.duration},Ps.prototype.isLive=Ps.prototype.U,Ps.prototype.Ta=function(){return!!this.b&&this.b.presentationTimeline.Ta()},Ps.prototype.isInProgress=Ps.prototype.Ta,Ps.prototype.We=function(){if(this.b){if(!this.b.periods.length)return!1;var t=this.b.periods[0].variants;return!!t.length&&!t[0].video}return!(!this.a||!this.a.src)&&(this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight)},Ps.prototype.isAudioOnly=Ps.prototype.We,Ps.prototype.Ff=function(){if(this.b){var t=this.b.presentationTimeline;return{start:t.ib(),end:t.wa()}}return this.a&&this.a.src&&(t=this.a.seekable).length?{start:t.start(0),end:t.end(t.length-1)}:{start:0,end:0}},Ps.prototype.seekRange=Ps.prototype.Ff,Ps.prototype.keySystem=function(){return this.h?this.h.keySystem():""},Ps.prototype.keySystem=Ps.prototype.keySystem,Ps.prototype.drmInfo=function(){return this.h?this.h.a:null},Ps.prototype.drmInfo=Ps.prototype.drmInfo,Ps.prototype.bc=function(){return this.h?this.h.bc():1/0},Ps.prototype.getExpiration=Ps.prototype.bc,Ps.prototype.Ic=function(){return!!this.V&&this.V.a==Sa},Ps.prototype.isBuffering=Ps.prototype.Ic,Ps.prototype.Le=function(){if(this.K){var t=this.K;t=t.g?0:t.f}else t=0;return t},Ps.prototype.getPlaybackRate=Ps.prototype.Le,Ps.prototype.ag=function(t){0==t?G("A trick play rate of 0 is unsupported!"):(this.g==du&&this.K.set(t),this.g==hu&&(this.K.set(t),ao(this.f,1=o.b.periods.length?o.b.presentationTimeline.Y():o.b.periods[f].startTime,1/0==(d=h-u.startTime))throw new ht(1,4,4033);return p=new Kr(1,0,d,function(){return[t]},0,null),m={id:o.Ad++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(t){return 1==t?p:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:e,label:a||null,type:c.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},o.Tb.add(m),u.textStreams.push(m),E(s,io(o.f,m),2);case 2:return(v=ro(o.f,"text"))&&da(o.C,u,v),o.Tb.delete(m),qs(o,u),Gs(o),s.return(Fn(m))}})})},Ps.prototype.addTextTrack=Ps.prototype.addTextTrack,Ps.prototype.dd=function(t,e){this.Ub.width=t,this.Ub.height=e},Ps.prototype.setMaxHardwareResolution=Ps.prototype.dd,Ps.prototype.ad=function(){if(this.g==hu){var t=this.f;if(t.f)t=!1;else if(t.m)t=!1;else{for(var e=f(t.b.values()),n=e.next();!n.done;n=e.next())(n=n.value).Eb&&(n.Eb=!1,So(t,n,.1));t=!0}}else t=!1;return t},Ps.prototype.retryStreaming=Ps.prototype.ad,Ps.prototype.Fe=function(){return this.b},Ps.prototype.getManifest=Ps.prototype.Fe,Ps.prototype.Ge=function(){return this.m?this.m.constructor:null},Ps.prototype.getManifestParserFactory=Ps.prototype.Ge,(n=Ps.prototype).Bc=function(t){var e=this.f?eo(this.f):null,n=this.f?no(this.f):null;if(On(this.h,e,n,t),!(e=t.variants).some(qn))throw new ht(2,4,4011);if(eu(this,t.variants),Un(e,this.c.restrictions,this.Ub)&&this.f&&au(this)==t&&Gs(this),t=this.h?this.h.a:null)for(n=(e=f(e)).next();!n.done;n=e.next())for(var r=(n=f(n.value.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==t.keySystem)for(var i=(r=f(r.initData||[])).next();!i.done;i=r.next())i=i.value,be(this.h,i.initDataType,i.initData)},n.Ze=function(t){try{this.eb=!0,this.j.disable(),$s(this);var e=Hs(this,t.variants),n=Gn(t.textStreams,this.Ka,this.yb)[0]||null;if(this.ka&&(t.variants.includes(this.ka)&&(e=this.ka),this.ka=null),this.ja&&(t.textStreams.includes(this.ja)&&(n=this.ja),this.ja=null),e&&Us(this,t,e,!0),n){var r=n;da(this.C,t,r),Is(this.v.b,r,!0)}var i=this.f,a=i.b.get("video");if(a)var o=i.c.periods[a.ya];else{var s=i.b.get("audio");o=s?i.c.periods[s.ya]:null}var u=e?e.audio:null;if(!o&&n){var c;if(c=u){t=n;var l=Cn(this.c.preferredTextLanguage),f=Cn(u.language),h=Cn(t.language);c=Pn(h,l)&&!Pn(f,h)}c&&(this.$a=!0),this.$a&&this.F.h.setTextVisibility(!0),Ws(this)}return this.c.streaming.alwaysStreamText||this.Lc()?{variant:e,text:n}:{variant:e,text:null}}catch(t){return this.Ha(t),{variant:null,text:null}}},n.pe=function(){this.eb=!1,this.c.abr.enabled&&(this.j.enable(),$s(this)),this.ka&&(oo(this.f,this.ka,this.yd,this.wd),Ys(this),this.ka=null),this.ja&&(so(this.f,this.ja,!0,0),Xs(this),this.ja=null)},n.df=function(){this.m&&this.m.update&&this.m.update()},n.kf=function(){this.o&&this.o.v()},n.Ha=function(t){if(this.g!=lu){var e=new Tt("error",{detail:t});this.dispatchEvent(e),e.defaultPrevented&&(t.handled=!0)}};var lu=0,fu=1,hu=2,du=3;function pu(t,e){var n=ss(new os(t.ra(),t.$()),e.periods[0],new vi(null,0)),r=e.appMetadata||{};return n=mu(n),{offlineUri:t.toString(),originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration,tracks:n,appMetadata:r}}function mu(t){for(var e=[],n=function(t){return t.filter(function(t){return qn(t)})}(t.variants),r=(n=f(n)).next();!r.done;r=n.next())e.push(Bn(r.value));for(n=(t=f(t.textStreams)).next();!n.done;n=t.next())e.push(Fn(n.value));return e}function vu(){this.a={}}function yu(t,e){var n=t.a[e];return null==n&&(n=0),n}function gu(t){this.a=!1,this.b=new dt,this.c=t}function bu(t){var e=new Tu;t.periods.forEach(function(t,n){var r=Su(t.variants);if(0==n)for(var i=(r=f(r.a)).next();!i.done;i=r.next())e.add(i.value);else!function(t,e){t.a=t.a.filter(function(t){return Eu(e,t)})}(e,r)});for(var n=(t=f(t.periods)).next();!n.done;n=t.next())(n=n.value).variants=n.variants.filter(function(t){return Eu(e,new wu(t))})}function wu(t){var e=t.audio;t=t.video,this.b=e?e.mimeType:null,this.a=e?e.codecs.split(".")[0]:null,this.f=t?t.mimeType:null,this.c=t?t.codecs.split(".")[0]:null}function Tu(){this.a=[]}function Eu(t,e){return t.a.some(function(t){return e.b==t.b&&e.a==t.a&&e.f==t.f&&e.c==t.c})}function Su(t){for(var e=new Tu,n=(t=f(t)).next();!n.done;n=t.next())e.add(new wu(n.value));return e}function xu(t){var e=this;if(t&&t.constructor!=Ps)throw new ht(2,9,9008);this.b=this.a=null,t?(this.a=t.c,this.b=t.Bb()):(this.a=Ts(),this.b=new Mt),this.f=!1,this.c=[],this.g=[];var n=!t;this.h=new gu(function(){return d(function t(){var r;return D(t,function(t){switch(t.l){case 1:return r=function(){},E(t,Promise.all(e.g.map(function(t){return t.then(r,r)})),2);case 2:if(!n){t.A(3);break}return E(t,e.b.destroy(),3);case 3:e.a=null,e.b=null,S(t)}})})})}function ku(){if(Jt())t:{for(var t=f(Vo.values()),e=t.next();!e.done;e=t.next())if(e=(e=e.value)()){e.destroy(),t=!0;break t}t=!1}else t=!1;return t}function Au(t,e){for(var n=[],r=f(t.periods),i=r.next();!i.done;i=r.next())for(var a=(i=f(i.value.streams)).next();!a.done;a=i.next())a=a.value,e&&"video"==a.contentType?n.push({contentType:Xt(a.mimeType,a.codecs),robustness:t.drmInfo.videoRobustness}):e||"audio"!=a.contentType||n.push({contentType:Xt(a.mimeType,a.codecs),robustness:t.drmInfo.audioRobustness});return n}function Iu(t,e,n){return d(function r(){return D(r,function(r){switch(r.l){case 1:return E(r,function(t,e,n,r){return d(function i(){var a,o,s;return D(i,function(i){switch(i.l){case 1:return r.drmInfo?(a=function(t){var e=Array.from(t.a.keys());if(!e.length)throw new ht(2,9,9e3,"No supported storage mechanisms found");return t.a.get(e[0]).getEmeSessionCell()}(n),o=r.sessionIds.map(function(t){return{sessionId:t,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Au(r,!1),videoCapabilities:Au(r,!0)}}),E(i,hs(e,t,o),2)):i.return();case 2:return s=i.s,E(i,a.remove(s),3);case 3:return E(i,a.add(o.filter(function(t){return-1==s.indexOf(t.sessionId)})),0)}})})}(t.b,t.a.drm,n,e),0)}})})}function _u(t,e,n,r){function i(){s+=1,t.a.offline.progressCallback(u,s/o)}var a=function(t){var e=[];return t.periods.forEach(function(t){t.streams.forEach(function(t){null!=t.initSegmentKey&&e.push(t.initSegmentKey),t.segments.forEach(function(t){e.push(t.dataKey)})})}),e}(r),o=a.length+1,s=0,u=pu(n,r);return Promise.all([e.removeSegments(a,i),e.removeManifests([n.key()],i)])}function Pu(t,e,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Db();var s=a.id;return function(t,e,n){for(var r=null==(e=t.findSegmentPosition(e))?null:t.getSegmentReference(e);r;)n(r),r=t.getSegmentReference(++e)}(a,i,function(i){var u=yi(i.c(),i.b,i.a,t.a.streaming.retryParameters);Co(e,s,u,function(t,e,n){return n=n.endTime-n.startTime,yu(t,e)*n}(r,a.id,i),function(e){return n.addSegments([{data:e}]).then(function(e){t.c.push(e[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:e[0]})})})}),(i=a.initSegmentReference)&&(i=yi(i.c(),i.b,i.a,t.a.streaming.retryParameters),Co(e,s,i,.5*yu(r,a.id),function(e){return n.addSegments([{data:e}]).then(function(e){t.c.push(e[0]),o.initSegmentKey=e[0]})})),o}function Mu(t){if(t.h.a)throw new ht(2,9,7001)}function Cu(){if(!ku())throw new ht(2,9,9e3)}function Nu(t,e){return d(function n(){return D(n,function(n){switch(n.l){case 1:return t.g.push(e),k(n,2),E(n,e,4);case 4:return n.return(n.s);case 2:_(n),At(t.g,e),P(n,0)}})})}function Ru(t){for(var e=new Set,n=(t=f(t.periods)).next();!n.done;n=t.next()){for(var r=f((n=n.value).textStreams),i=r.next();!i.done;i=r.next())e.add(i.value);for(r=(n=f(n.variants)).next();!r.done;r=n.next())(r=r.value).audio&&e.add(r.audio),r.video&&e.add(r.video)}return e}function Du(t){t.variants.map(function(t){return t.video});var e=new Set(t.variants.map(function(t){return t.audio}));t=t.textStreams;for(var n=f(e),r=n.next();!r.done;r=n.next())for(var i=(r=f(e)).next();!i.done;i=r.next());for(n=(e=f(t)).next();!n.done;n=e.next())for(r=(n=f(t)).next();!r.done;r=n.next());}Ps.LoadMode={DESTROYED:lu,NOT_LOADED:fu,MEDIA_SOURCE:hu,SRC_EQUALS:du},gu.prototype.destroy=function(){var t=this;return this.a?this.b:(this.a=!0,this.c().then(function(){t.b.resolve()},function(){t.b.resolve()}))},Tu.prototype.add=function(t){Eu(this,t)||this.a.push(t)},B("shaka.offline.Storage",xu),xu.support=ku,xu.prototype.destroy=function(){return this.h.destroy()},xu.prototype.destroy=xu.prototype.destroy,xu.prototype.configure=function(t){var e=!1;return null!=t.trackSelectionCallback&&(e=!0,t.offline=t.offline||{},t.offline.trackSelectionCallback=t.trackSelectionCallback,delete t.trackSelectionCallback),null!=t.progressCallback&&(e=!0,t.offline=t.offline||{},t.offline.progressCallback=t.progressCallback,delete t.progressCallback),null!=t.usePersistentLicense&&(e=!0,t.offline=t.offline||{},t.offline.usePersistentLicense=t.usePersistentLicense,delete t.usePersistentLicense),e&&Qn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Es(this.a,t)},xu.prototype.configure=xu.prototype.configure,xu.prototype.getConfiguration=function(){var t=Ts();return Es(t,this.a,Ts()),t},xu.prototype.getConfiguration=xu.prototype.getConfiguration,xu.prototype.Bb=function(){return this.b},xu.prototype.getNetworkingEngine=xu.prototype.Bb,xu.prototype.store=function(t,e,n){var r=this;return Nu(this,function(t,e,n,r){return d(function i(){var a,o,s,u,c,l,h,p,m;return D(i,function(i){switch(i.l){case 1:return Cu(),t.f?i.return(Promise.reject(new ht(2,9,9006))):(t.f=!0,E(i,function(t,e,n){return d(function r(){var i,a,o,s,u,c;return D(r,function(r){switch(r.l){case 1:return i=null,a=t.b,o={networkingEngine:a,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(t){i=t}},E(r,n(),2);case 2:return(s=r.s).configure(t.a.manifest),Mu(t),k(r,3),E(r,s.start(e,o),5);case 5:return u=r.s,Mu(t),c=Ru(u),E(r,Promise.all(Array.from(c).map(function(t){return t.createSegmentIndex()})),6);case 6:if(Mu(t),i)throw i;return r.return(u);case 3:return _(r),E(r,s.stop(),7);case 7:P(r,0)}})})}(t,e,r),2));case 2:if(a=i.s,Mu(t),!(!a.presentationTimeline.U()&&!a.presentationTimeline.Ta()))throw new ht(2,9,9005,e);return o=null,s=new Bo,c=u=null,x(i,3,4),E(i,function(t,e,n){return d(function r(){var i,a,o;return D(r,function(r){switch(r.l){case 1:return i=new pe({nb:t.b,onError:n,gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a=Na(e.periods),o=t.a,i.configure(o.drm),E(r,function(t,e,n){return t.o=[],t.C=n,ve(t,e)}(i,a,o.offline.usePersistentLicense),2);case 2:return E(r,ye(i),3);case 3:return E(r,ge(i),4);case 4:return r.return(i)}})})}(t,a,function(t){c=c||t}),6);case 6:if(o=i.s,Mu(t),c)throw c;return function(t,e,n){(function(t,e){for(var n={width:1/0,height:1/0},r=f(t.periods),i=r.next();!i.done;i=r.next())(i=i.value).variants=i.variants.filter(function(t){return Ln(t,e,n)})})(e,t.a.restrictions),function(t){for(var e=(t=f(t.periods)).next();!e.done;e=t.next())(e=e.value).variants=e.variants.filter(function(t){var e=!0;return t.audio&&(e=e&&bn(t.audio)),t.video&&(e=e&&bn(t.video)),e})}(e),function(t,e){for(var n=f(t.periods),r=n.next();!r.done;r=n.next())(r=r.value).variants=r.variants.filter(function(t){return Ie(e,t)})}(e,n),bu(e),function(t,e){var n=new Tu;t.periods.forEach(function(t,r){0=a&&(a=t.bandwidth),r.a[e.id]=i,r.a[n.id]=a}}),t.textStreams.forEach(function(t){r.a[t.id]=52})});for(var o=Ru(i),s=new Map,u=(o=f(o)).next();!u.done;u=o.next()){u=u.value;var c=Pu(t,e,n,r,i,u);s.set(u.id,c)}return a.variants.forEach(function(t){t.audio&&s.get(t.audio.id).variantIds.push(t.id),t.video&&s.get(t.video.id).variantIds.push(t.id)}),{startTime:a.startTime,streams:Array.from(s.values())}}(t,e,n,s,i,r)}),c=r.a,l=Te(r);if(c&&t.a.offline.usePersistentLicense){if(!l.length)throw new ht(2,9,9007,a);c.initData=[]}return{originalManifestUri:a,duration:i.presentationTimeline.Y(),size:0,expiration:r.bc(),periods:u,sessionIds:t.a.offline.usePersistentLicense?l:[],drmInfo:c,appMetadata:o}}(t,u,e,n,r,i,a),E(o,function(t){return d(function e(){return D(e,function(e){switch(e.l){case 1:return E(e,Promise.all(t.b.values()),2);case 2:return e.return(t.a.a)}})})}(u),4);case 4:return l.size=o.s,o.return(c);case 2:return _(o),E(o,u.destroy(),5);case 5:P(o,0)}})})}(t,u.$,o,a,e,n),9);case 9:if(l=i.s,Mu(t),c)throw c;return E(i,u.$.addManifests([l]),10);case 10:return h=i.s,Mu(t),p=new is("manifest",u.path.ra,u.path.$,h[0]),i.return(pu(p,l));case 4:return _(i),t.f=!1,t.c=[],E(i,s.destroy(),11);case 11:if(!o){i.A(12);break}return E(i,o.destroy(),12);case 12:P(i,0);break;case 3:if(m=I(i),!u){i.A(14);break}return E(i,u.$.removeSegments(t.c,function(){}),14);case 14:throw c||m}})})}(this,t,e||{},function(){return d(function e(){var i,a;return D(e,function(e){switch(e.l){case 1:return n&&"string"!=typeof n?(Qn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,e.return(new i)):E(e,mi.create(t,r.b,r.a.manifest.retryParameters,n),2);case 2:return a=e.s,e.return(a)}})})}))},xu.prototype.store=xu.prototype.store,xu.prototype.Qe=function(){return this.f},xu.prototype.getStoreInProgress=xu.prototype.Qe,xu.prototype.remove=function(t){return Nu(this,function(t,e){return d(function n(){var r,i,a,o,s,u;return D(n,function(n){switch(n.l){case 1:return Cu(),null==(r=as(e))||"manifest"!=r.a?n.return(Promise.reject(new ht(2,9,9004,e))):(i=r,a=new Bo,k(n,2),E(n,a.init(),4));case 4:return E(n,Fo(a,i.ra(),i.$()),5);case 5:return o=n.s,E(n,o.getManifests([i.key()]),6);case 6:return s=n.s,u=s[0],E(n,Promise.all([Iu(t,u,a),_u(t,o,i,u)]),2);case 2:return _(n),E(n,a.destroy(),8);case 8:P(n,0)}})})}(this,t))},xu.prototype.remove=xu.prototype.remove,xu.prototype.Af=function(){return Nu(this,(t=this,d(function e(){var n,r,i,a,o,s,u,c,l;return D(e,function(e){switch(e.l){case 1:return Cu(),n=t.b,r=t.a.drm,i=new Bo,a=!1,k(e,2),E(e,i.init(),4);case 4:for(o=[],function(t,e){t.a.forEach(function(t){e(t.getEmeSessionCell())})}(i,function(t){return o.push(t)}),s=Promise.resolve(),u={},c=f(o),l=c.next();!l.done;u={mc:u.mc},l=c.next())u.mc=l.value,s=s.then(function(t){return function(){return d(function e(){var i,o;return D(e,function(e){switch(e.l){case 1:return E(e,t.mc.getAll(),2);case 2:return i=e.s,E(e,hs(r,n,i),3);case 3:return o=e.s,E(e,t.mc.remove(o),4);case 4:o.length!=i.length&&(a=!0),S(e)}})})}}(u));return E(e,s,2);case 2:return _(e),E(e,i.destroy(),6);case 6:P(e,3);break;case 3:return e.return(!a)}})})));var t},xu.prototype.removeEmeSessions=xu.prototype.Af,xu.prototype.list=function(){return Nu(this,d(function t(){var e,n,r;return D(t,function(t){switch(t.l){case 1:return Cu(),e=[],n=new Bo,k(t,2),E(t,n.init(),4);case 4:return r=Promise.resolve(),function(t,e){t.a.forEach(function(t,n){t.getCells().forEach(function(t,r){e({ra:n,$:r},t)})})}(n,function(t,n){r=r.then(function(){return d(function r(){return D(r,function(r){switch(r.l){case 1:return E(r,n.getAllManifests(),2);case 2:r.s.forEach(function(n,r){var i=pu(new is("manifest",t.ra,t.$,r),n);e.push(i)}),S(r)}})})})}),E(t,r,2);case 2:return _(t),E(t,n.destroy(),6);case 6:P(t,3);break;case 3:return t.return(e)}})}))},xu.prototype.list=xu.prototype.list,xu.deleteAll=function(){return d(function t(){var e;return D(t,function(t){switch(t.l){case 1:return e=new Bo,k(t,2),E(t,e.erase(),2);case 2:return _(t),E(t,e.destroy(),5);case 5:P(t,0)}})})},Ns.offline=ku,B("shaka.polyfill.installAll",function(){for(var t=0;t=e.a.length)return t;for(var n=[],r=0;rn.length)return null;var i=null,a=t;for(t=null;a&&!(t=a.getAttribute(e))&&(a=a.parentNode)instanceof Element;);if(e=t)for(t=0;t 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n _shakaPlayer2.default.polyfill.installAll();\n var browserSupported = _shakaPlayer2.default.Player.isBrowserSupported();\n var resourceParts = resource.split('?')[0].match(/.*\\.(.*)$/) || [];\n return browserSupported && (resourceParts[1] === 'mpd' || mimeType.indexOf('application/dash+xml') > -1);\n }\n }, {\n key: 'Events',\n get: function get() {\n return {\n SHAKA_READY: 'shaka:ready'\n };\n }\n }]);\n\n function DashShakaPlayback() {\n var _ref;\n\n _classCallCheck(this, DashShakaPlayback);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var _this = _possibleConstructorReturn(this, (_ref = DashShakaPlayback.__proto__ || Object.getPrototypeOf(DashShakaPlayback)).call.apply(_ref, [this].concat(args)));\n\n _this._levels = [];\n _this._pendingAdaptationEvent = false;\n _this._isShakaReadyState = false;\n return _this;\n }\n\n _createClass(DashShakaPlayback, [{\n key: 'play',\n value: function play() {\n if (!this._player) {\n this._setup();\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play);\n return;\n }\n\n this._stopped = false;\n this._src = this.el.src;\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'play', this).call(this);\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n\n }, {\n key: '_setupSrc',\n value: function _setupSrc() {}\n\n // skipping ready event on video tag in favor of ready on shaka\n\n }, {\n key: '_ready',\n value: function _ready() {\n // override with no-op\n }\n }, {\n key: '_onShakaReady',\n value: function _onShakaReady() {\n this._isShakaReadyState = true;\n this.trigger(DashShakaPlayback.Events.SHAKA_READY);\n this.trigger(_clappr.Events.PLAYBACK_READY, this.name);\n }\n }, {\n key: 'error',\n\n\n // skipping error handling on video tag in favor of error on shaka\n value: function error(event) {\n _clappr.Log.error('an error was raised by the video tag', event, this.el.error);\n }\n }, {\n key: 'isHighDefinitionInUse',\n value: function isHighDefinitionInUse() {\n return !!this.highDefinition;\n }\n }, {\n key: 'stop',\n value: function stop() {\n var _this3 = this;\n\n clearInterval(this.sendStatsId);\n this._stopped = true;\n\n if (this._player) {\n this._sendStats();\n\n this._player.unload().then(function () {\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', _this3).call(_this3);\n _this3._player = null;\n _this3._isShakaReadyState = false;\n }).catch(function () {\n _clappr.Log.error('shaka could not be unloaded');\n });\n } else {\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'stop', this).call(this);\n }\n }\n }, {\n key: 'getPlaybackType',\n value: function getPlaybackType() {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || '';\n }\n }, {\n key: 'selectTrack',\n value: function selectTrack(track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track);\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track);\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation();\n }\n } else {\n throw new Error('Unhandled track type:', track.type);\n }\n }\n\n /**\n * @override\n */\n\n }, {\n key: '_enableShakaTextTrack',\n value: function _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return;\n }\n\n this._shakaTTVisible = isEnable;\n\n Array.from(this.el.textTracks).filter(function (track) {\n return track.kind === 'subtitles';\n }).forEach(function (track) {\n return track.mode = isEnable === true ? 'showing' : 'hidden';\n });\n }\n }, {\n key: '_checkForClosedCaptions',\n value: function _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return;\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_AVAILABLE);\n var trackId = this.closedCaptionsTrackId;\n this.closedCaptionsTrackId = trackId;\n }\n this._ccIsSetup = true;\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n var _this4 = this;\n\n clearInterval(this.sendStatsId);\n\n if (this._player) {\n this._player.destroy().then(function () {\n return _this4._destroy();\n }).catch(function () {\n _this4._destroy();\n _clappr.Log.error('shaka could not be destroyed');\n });\n } else {\n this._destroy();\n }\n\n _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'destroy', this).call(this);\n }\n }, {\n key: '_setup',\n value: function _setup() {\n var _this5 = this;\n\n this._isShakaReadyState = false;\n this._ccIsSetup = false;\n this._player = this._createPlayer();\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration);\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player);\n\n var playerLoaded = this._player.load(this._options.src);\n playerLoaded.then(function () {\n return _this5._loaded();\n }).catch(function (e) {\n return _this5._setupError(e);\n });\n }\n }, {\n key: '_createPlayer',\n value: function _createPlayer() {\n var player = new _shakaPlayer2.default.Player(this.el);\n player.addEventListener('error', this._onError.bind(this));\n player.addEventListener('adaptation', this._onAdaptation.bind(this));\n player.addEventListener('buffering', this._onBuffering.bind(this));\n return player;\n }\n }, {\n key: '_onBuffering',\n value: function _onBuffering(e) {\n if (this._stopped) return;\n var event = e.buffering ? _clappr.Events.PLAYBACK_BUFFERING : _clappr.Events.PLAYBACK_BUFFERFULL;\n this.trigger(event);\n }\n }, {\n key: '_loaded',\n value: function _loaded() {\n this._onShakaReady();\n this._startToSendStats();\n this._fillLevels();\n this._checkForClosedCaptions();\n }\n }, {\n key: '_fillLevels',\n value: function _fillLevels() {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map(function (videoTrack) {\n return { id: videoTrack.id, label: videoTrack.height + 'p' };\n }).reverse();\n this.trigger(_clappr.Events.PLAYBACK_LEVELS_AVAILABLE, this.levels);\n }\n }\n }, {\n key: '_startToSendStats',\n value: function _startToSendStats() {\n var _this6 = this;\n\n var intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS;\n this.sendStatsId = setInterval(function () {\n return _this6._sendStats();\n }, intervalMs);\n }\n }, {\n key: '_sendStats',\n value: function _sendStats() {\n this.trigger(_clappr.Events.PLAYBACK_STATS_ADD, this._player.getStats());\n }\n }, {\n key: '_setupError',\n value: function _setupError(err) {\n this._onError(err);\n }\n }, {\n key: '_onError',\n value: function _onError(err) {\n var error = {\n shakaError: err,\n videoError: this.el.error\n };\n\n var _ref2 = error.shakaError.detail || error.shakaError,\n category = _ref2.category,\n code = _ref2.code,\n severity = _ref2.severity;\n\n if (error.videoError || !code && !category) return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), '_onError', this).call(this);\n\n var isCritical = severity === _shakaPlayer2.default.util.Error.Severity.CRITICAL;\n var errorData = {\n code: category + '_' + code,\n description: 'Category: ' + category + ', code: ' + code + ', severity: ' + severity,\n level: isCritical ? _clappr.PlayerError.Levels.FATAL : _clappr.PlayerError.Levels.WARN,\n raw: err\n };\n var formattedError = this.createError(errorData);\n _clappr.Log.error('Shaka error event:', formattedError);\n this.trigger(_clappr.Events.PLAYBACK_ERROR, formattedError);\n }\n }, {\n key: '_onAdaptation',\n value: function _onAdaptation() {\n var activeVideo = this.videoTracks.filter(function (t) {\n return t.active === true;\n })[0];\n\n this._fillLevels();\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats();\n\n if (this._pendingAdaptationEvent) {\n this.trigger(_clappr.Events.PLAYBACK_LEVEL_SWITCH_END);\n this._pendingAdaptationEvent = false;\n }\n\n _clappr.Log.debug('an adaptation has happened:', activeVideo);\n this.highDefinition = activeVideo.height >= 720;\n this.trigger(_clappr.Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition);\n this.trigger(_clappr.Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n });\n }\n }, {\n key: '_destroy',\n value: function _destroy() {\n this._isShakaReadyState = false;\n _clappr.Log.debug('shaka was destroyed');\n }\n }, {\n key: 'isReady',\n get: function get() {\n return this._isShakaReadyState;\n }\n }, {\n key: 'textTracks',\n get: function get() {\n return this.isReady && this._player.getTextTracks();\n }\n }, {\n key: 'audioTracks',\n get: function get() {\n return this.isReady && this._player.getVariantTracks().filter(function (t) {\n return t.mimeType.startsWith('audio/');\n });\n }\n }, {\n key: 'videoTracks',\n get: function get() {\n return this.isReady && this._player.getVariantTracks().filter(function (t) {\n return t.mimeType.startsWith('video/');\n });\n }\n }, {\n key: 'closedCaptionsTracks',\n get: function get() {\n var id = 0;\n var trackId = function trackId() {\n return id++;\n };\n var tracks = this.textTracks || [];\n\n return tracks.filter(function (track) {\n return track.kind === 'subtitle';\n }).map(function (track) {\n return { id: trackId(), name: track.label || track.language, track: track };\n });\n }\n\n /**\n * @override\n */\n\n }, {\n key: 'closedCaptionsTrackId',\n get: function get() {\n return _get(DashShakaPlayback.prototype.__proto__ || Object.getPrototypeOf(DashShakaPlayback.prototype), 'closedCaptionsTrackId', this);\n }\n\n /**\n * @override\n */\n ,\n set: function set(trackId) {\n if (!this._player) {\n return;\n }\n\n var tracks = this.closedCaptionsTracks;\n var showingTrack = void 0;\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(function (track) {\n return track.id === trackId;\n });\n if (!showingTrack) {\n _clappr.Log.warn('Track id \"' + trackId + '\" not found');\n return;\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n _clappr.Log.info('Track id \"' + trackId + '\" already showing');\n return;\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track);\n this._player.setTextTrackVisibility(true);\n this._enableShakaTextTrack(true);\n } else {\n this._player.setTextTrackVisibility(false);\n this._enableShakaTextTrack(false);\n }\n\n this._ccTrackId = trackId;\n this.trigger(_clappr.Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n });\n }\n }]);\n\n return DashShakaPlayback;\n}(_clappr.HTML5Video);\n\nexports.default = DashShakaPlayback;\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {(function(){var innerGlobal=typeof window!=\"undefined\"?window:global;var exportTo={};(function(window,global){var p,aa=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca=\"undefined\"!=typeof window&&window===this?this:\"undefined\"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return\"jscomp_symbol_\"+(c||\"\")+b++}}();\nfunction fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol(\"iterator\"));\"function\"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return cg&&(g=Math.max(g+f,0));g=g}});ka(\"Array.prototype.find\",function(b){return b?b:function(b,d){return Pa(this,b,d).ee}});var Sa=this;Sa.a=!0;\nfunction z(b,c){var d=b.split(\".\"),e=Sa;d[0]in e||!e.execScript||e.execScript(\"var \"+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ng=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*\n\n Copyright 2016 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\nfunction Ua(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Ua(2);this.c=new Ua(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\\/\\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(db(this,b.sa),this.Xa=b.Xa,this.oa=b.oa,hb(this,b.tb),this.fa=b.fa,ib(this,b.a.clone()),this.Oa=b.Oa):b&&(c=String(b).match(bb))?(db(this,c[1]||\"\",!0),this.Xa=jb(c[2]||\"\"),this.oa=jb(c[3]||\"\",!0),hb(this,c[4]),this.fa=jb(c[5]||\"\",!0),ib(this,c[6]||\"\",!0),this.Oa=jb(c[7]||\"\")):this.a=new kb(null)}p=cb.prototype;p.sa=\"\";p.Xa=\"\";p.oa=\"\";p.tb=null;p.fa=\"\";p.Oa=\"\";\np.toString=function(){var b=[],c=this.sa;c&&b.push(lb(c,mb,!0),\":\");if(c=this.oa){b.push(\"//\");var d=this.Xa;d&&b.push(lb(d,mb,!0),\"@\");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,\"%$1\"));c=this.tb;null!=c&&b.push(\":\",String(c))}if(c=this.fa)this.oa&&\"/\"!=c.charAt(0)&&b.push(\"/\"),b.push(lb(c,\"/\"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push(\"?\",c);(c=this.Oa)&&b.push(\"#\",lb(c,pb));return b.join(\"\")};\np.resolve=function(b){var c=this.clone();\"data\"===c.sa&&(c=new cb);var d=!!b.sa;d?db(c,b.sa):d=!!b.Xa;d?c.Xa=b.Xa:d=!!b.oa;d?c.oa=b.oa:d=null!=b.tb;var e=b.fa;if(d)hb(c,b.tb);else if(d=!!b.fa){if(\"/\"!=e.charAt(0))if(this.oa&&!this.fa)e=\"/\"+e;else{var f=c.fa.lastIndexOf(\"/\");-1!=f&&(e=c.fa.substr(0,f+1)+e)}if(\"..\"==e||\".\"==e)e=\"\";else if(-1!=e.indexOf(\"./\")||-1!=e.indexOf(\"/.\")){f=0==e.lastIndexOf(\"/\",0);e=e.split(\"/\");for(var g=[],h=0;hc)throw Error(\"Bad port number \"+c);b.tb=c}else b.tb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}\nfunction jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):\"\"}function lb(b,c,d){return\"string\"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),b):null}function rb(b){b=b.charCodeAt(0);return\"%\"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\\/\\?@]/g,ob=/[#\\?:]/g,nb=/[#\\?]/g,qb=/[#\\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ea=null;p.Xb=null;\np.add=function(b,c){if(!this.ea&&(this.ea={},this.Xb=0,this.a))for(var d=this.a.split(\"&\"),e=0;e=b.i)if(b.c)b.a=1,b.b=b.f;else return d[\"return\"](Promise.reject());e=b.a;b.a++;if(0==e)return d[\"return\"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function ub(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g=e.priority)Qb[b]={priority:d,uf:c}}K.registerScheme=Rb;K.unregisterScheme=function(b){delete Qb[b]};K.prototype.wf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.wf;\nK.prototype.bg=function(b){this.a[\"delete\"](b)};K.prototype.unregisterRequestFilter=K.prototype.bg;K.prototype.re=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.re;K.prototype.xf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.xf;K.prototype.cg=function(b){this.b[\"delete\"](b)};K.prototype.unregisterResponseFilter=K.prototype.cg;K.prototype.se=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.se;\nfunction Sb(b,c){return{uris:b,method:\"GET\",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;\nK.prototype.request=function(b,c){var d=this,e=new Tb;if(this.f){var f=Promise.reject(new D(2,7,7001));f[\"catch\"](function(){});return new Ub(f,function(){return Promise.resolve()},e)}c.method=c.method||\"GET\";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Ib(c.retryParameters):ub();c.uris=Ib(c.uris);f=Vb(this,b,c);var g=f.T(function(){return Wb(d,b,c,new tb(c.retryParameters,!1),0,null,e)}),h=g.T(function(c){return Xb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},\nfunction(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.T(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ue||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Ub(f.promise,f.Fd,e);Ob(this.g,f);return f};K.prototype.request=K.prototype.request;\nfunction Vb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={$c:f.$c},g=b.next())f.$c=g.value,e=e.T(function(b){return function(){return b.$c(c,d)}}(f));return e.T(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}\nfunction Wb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.sa,m=!1;l||(l=location.protocol,l=l.slice(0,-1),db(k,l),d.uris[f]=k.toString());var n=(l=Qb[l])?l.uf:null;if(!n)return Ab(new D(2,1,1E3,k));var q;return Db(zb(e)).T(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).T(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ue:m}},function(h){if(h&&7001==h.code)throw h;if(b.f)return Bb();if(h&&1==h.severity)return b.dispatchEvent(new I(\"retry\",\n{error:h instanceof D?h:null})),f=(f+1)%d.uris.length,Wb(b,c,d,e,f,h);throw h||g;})}function Xb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.T(f.value.bind(null,c,d.response));return e.T(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Tb(){this.a=0}K.NumBytesRemainingClass=Tb;function Ub(b,c,d){H.call(this,b,c);this.b=d}var Yb=Ub;Yb.prototype=ma(H.prototype);\nYb.prototype.constructor=Yb;if(sa)sa(Yb,H);else for(var Zb in H)if(\"prototype\"!=Zb)if(Object.defineProperties){var $b=Object.getOwnPropertyDescriptor(H,Zb);$b&&Object.defineProperty(Yb,Zb,$b)}else Yb[Zb]=H[Zb];Yb.$f=H.prototype;K.PendingRequest=Ub;Ub.all=Eb;Ub.notAbortable=Db;Ub.completed=Cb;Ub.aborted=Bb;Ub.failed=Ab;function ac(){this.b=new Hb}ac.prototype.a=function(){bc(this);this.b=null};function L(b,c,d,e){b.b&&(c=new cc(c,d,e),b.b.push(d,c))}function dc(b,c,d,e){function f(g){b.ma(c,d,f);e(g)}L(b,c,d,f)}ac.prototype.ma=function(b,c,d){if(this.b)for(var e=this.b.get(c)||[],f=0;f=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return uc(b,!1);if(0==c[1]&&0==c[3])return uc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return sc(b);throw new D(2,2,2003);}z(\"shaka.util.StringUtils.fromBytesAutoDetect\",xc);\nfunction yc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;dd&&(d+=Math.pow(2,32));d=\"0x\"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}\np.Nd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ja?this.F.push(b):Uc(this,b)};\nfunction Uc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];\"individualization-request\"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Sb([f],b.f.retryParameters);f.body=c.message;f.method=\"POST\";f.licenseRequestType=c.messageType;\"com.microsoft.playready\"!=b.a.keySystem&&\"com.chromecast.playready\"!=b.a.keySystem||ed(f);b.a.keySystem.startsWith(\"com.apple.fps\")&&fd(f);b.w.nb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();\nthis.a.keySystem.startsWith(\"com.apple.fps\")&&gd(b);return d.update(b.data).then(function(){var b=this;this.w.onEvent(new I(\"drmsessionupdate\"));e&&(e.ua&&e.ua.resolve(),(new B(function(){e.loaded=!0;dd(b)&&b.j.resolve()})).O(hd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))[\"catch\"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))}\nfunction ed(b){var c=uc(b.body,!0,!0);if(c.includes(\"PlayReadyKeyMessage\")){c=(new DOMParser).parseFromString(c,\"application/xml\");for(var d=c.getElementsByTagName(\"HttpHeader\"),e=0;e\"===c.substr(0,5)&&\"\"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Bc(c).buffer}\np.Ld=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if(\"string\"==typeof e){var f=e;e=b;b=f}if(\"com.microsoft.playready\"==this.a.keySystem&&16==e.byteLength&&!pc(\"Tizen\")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}\"com.microsoft.playready\"==this.a.keySystem&&\"status-pending\"==b&&(b=\"usable\");\"status-pending\"!=b&&(c.loaded=!0);\"expired\"==b&&(d=!0);f=Dc(new Uint8Array(e));\nthis.ka.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ua&&(this.b[\"delete\"](b),b.close()[\"catch\"](function(){}));dd(this)&&(this.j.resolve(),this.K.O(id))};function Hc(b){var c=b.ka,d=b.S;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return\"expired\"==b})&&b.g(new D(2,6,6014));b.w.gc(hc(d))}\nfunction jd(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.l){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes(\"persistent-license\"):!1,pc(\"Tizen 3\")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Aa(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs=\"avc1.42E01E\"'},{contentType:'video/webm; codecs=\"vp8\"'}],d=[{videoCapabilities:c,\npersistentState:\"required\",sessionTypes:[\"persistent-license\"]},{videoCapabilities:c}],e=new Map;c=\"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime\".split(\" \").map(function(c){return b(c)});return Promise.all(c).then(function(){return hc(e)})}\nfunction kd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!ad(b,ic(d.mimeType,d.codecs))||e&&e.encrypted&&!ad(b,ic(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}\nfunction ld(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;eb.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function qd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function rd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}\nfunction sd(b){if(!b)return[];for(var c=[],d=0;d>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Cd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}\nyd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};yd.prototype.h=function(){var b={data:Fc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Dd(b,c,d){this.startTime=b;this.direction=Ed;this.endTime=c;this.payload=d;this.region=new Fd;this.position=null;this.positionAlign=Gd;this.size=100;this.textAlign=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight=\"\";this.lineAlign=Kd;this.displayAlign=Ld;this.backgroundColor=this.color=\"\";this.backgroundImage=null;this.fontSize=\"\";this.fontWeight=Md;this.fontStyle=Nd;this.fontFamily=\"\";this.textDecoration=[];this.wrapLine=!0;this.id=\"\"}z(\"shaka.text.Cue\",Dd);\nvar Gd=\"auto\";Dd.positionAlign={LEFT:\"line-left\",RIGHT:\"line-right\",CENTER:\"center\",AUTO:Gd};var Hd=\"center\",Od={LEFT:\"left\",RIGHT:\"right\",CENTER:Hd,START:\"start\",END:\"end\"};Dd.textAlign=Od;var Ld=\"after\",Pd={BEFORE:\"before\",CENTER:\"center\",AFTER:Ld};Dd.displayAlign=Pd;var Ed=\"ltr\";Dd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ed,HORIZONTAL_RIGHT_TO_LEFT:\"rtl\"};var Id=\"horizontal-tb\";Dd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:\"vertical-lr\",VERTICAL_RIGHT_TO_LEFT:\"vertical-rl\"};\nvar Jd=0;Dd.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd=\"start\",Qd={CENTER:\"center\",START:Kd,END:\"end\"};Dd.lineAlign=Qd;var Md=400;Dd.fontWeight={NORMAL:Md,BOLD:700};var Nd=\"normal\",Rd={NORMAL:Nd,ITALIC:\"italic\",OBLIQUE:\"oblique\"};Dd.fontStyle=Rd;Dd.textDecoration={UNDERLINE:\"underline\",LINE_THROUGH:\"lineThrough\",OVERLINE:\"overline\"};\nfunction Fd(){this.id=\"\";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sd;this.scroll=Td}z(\"shaka.text.CueRegion\",Fd);var Sd=1;Fd.units={PX:0,PERCENTAGE:Sd,LINES:2};var Td=\"\";Fd.scrollMode={NONE:Td,UP:\"up\"};function Ud(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.j=\"\";this.i=new Map}var Vd={};z(\"shaka.text.TextEngine.registerParser\",function(b,c){Vd[b]=c});z(\"shaka.text.TextEngine.unregisterParser\",function(b){delete Vd[b]});function Wd(b){return Vd[b]||window.muxjs&&\"application/cea-608\"==b?!0:!1}Ud.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function Xd(b,c){\"application/cea-608\"!=c&&(b.g=new Vd[c])}\nUd.prototype.Gc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};\nfunction Yd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&cthis.a&&c>=this.b&&(this.b=b))}.bind(this))};Ud.prototype.me=function(b){this.c.append(b)};Ud.prototype.appendCues=Ud.prototype.me;\nUd.prototype.nc=function(b,c){this.j=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Ud.prototype.setSelectedClosedCaptionId=Ud.prototype.nc;\nfunction Zd(b,c,d,e,f){var g=d+\" \"+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTimed.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function fe(b,c){return\"text\"==c?b.a.b:pd(ee(b,c))}function ge(b,c,d){if(\"text\"==c)return b=b.a,null==b.b||b.bc&&(c+=.001);this.b[b].timestampOffset=c;this.qb(b)};p.Kf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.qb(b)};\np.Sf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.qb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),me(this,b))};function ie(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){\"QuotaExceededError\"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),me(b,c)}return d.p}\nfunction le(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)me(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function me(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),me(b,c)}};function ne(b,c){b=M(b);c=M(c);return b.split(\"-\")[0]==c.split(\"-\")[0]}function oe(b,c){b=M(b);c=M(c);var d=b.split(\"-\"),e=c.split(\"-\");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split(\"-\");b=c[0]||\"\";c=c[1]||\"\";b=b.toLowerCase();b=pe.get(b)||b;return(c=c.toUpperCase())?b+\"-\"+c:b}function qe(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):\"und\"}\nfunction re(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,oe(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split(\"-\");k=k.split(\"-\");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,oe(d,f))return f;return null}\nvar pe=new Map([[\"aar\",\"aa\"],[\"abk\",\"ab\"],[\"afr\",\"af\"],[\"aka\",\"ak\"],[\"alb\",\"sq\"],[\"amh\",\"am\"],[\"ara\",\"ar\"],[\"arg\",\"an\"],[\"arm\",\"hy\"],[\"asm\",\"as\"],[\"ava\",\"av\"],[\"ave\",\"ae\"],[\"aym\",\"ay\"],[\"aze\",\"az\"],[\"bak\",\"ba\"],[\"bam\",\"bm\"],[\"baq\",\"eu\"],[\"bel\",\"be\"],[\"ben\",\"bn\"],[\"bih\",\"bh\"],[\"bis\",\"bi\"],[\"bod\",\"bo\"],[\"bos\",\"bs\"],[\"bre\",\"br\"],[\"bul\",\"bg\"],[\"bur\",\"my\"],[\"cat\",\"ca\"],[\"ces\",\"cs\"],[\"cha\",\"ch\"],[\"che\",\"ce\"],[\"chi\",\"zh\"],[\"chu\",\"cu\"],[\"chv\",\"cv\"],[\"cor\",\"kw\"],[\"cos\",\"co\"],[\"cre\",\"cr\"],[\"cym\",\"cy\"],[\"cze\",\n\"cs\"],[\"dan\",\"da\"],[\"deu\",\"de\"],[\"div\",\"dv\"],[\"dut\",\"nl\"],[\"dzo\",\"dz\"],[\"ell\",\"el\"],[\"eng\",\"en\"],[\"epo\",\"eo\"],[\"est\",\"et\"],[\"eus\",\"eu\"],[\"ewe\",\"ee\"],[\"fao\",\"fo\"],[\"fas\",\"fa\"],[\"fij\",\"fj\"],[\"fin\",\"fi\"],[\"fra\",\"fr\"],[\"fre\",\"fr\"],[\"fry\",\"fy\"],[\"ful\",\"ff\"],[\"geo\",\"ka\"],[\"ger\",\"de\"],[\"gla\",\"gd\"],[\"gle\",\"ga\"],[\"glg\",\"gl\"],[\"glv\",\"gv\"],[\"gre\",\"el\"],[\"grn\",\"gn\"],[\"guj\",\"gu\"],[\"hat\",\"ht\"],[\"hau\",\"ha\"],[\"heb\",\"he\"],[\"her\",\"hz\"],[\"hin\",\"hi\"],[\"hmo\",\"ho\"],[\"hrv\",\"hr\"],[\"hun\",\"hu\"],[\"hye\",\"hy\"],[\"ibo\",\"ig\"],[\"ice\",\n\"is\"],[\"ido\",\"io\"],[\"iii\",\"ii\"],[\"iku\",\"iu\"],[\"ile\",\"ie\"],[\"ina\",\"ia\"],[\"ind\",\"id\"],[\"ipk\",\"ik\"],[\"isl\",\"is\"],[\"ita\",\"it\"],[\"jav\",\"jv\"],[\"jpn\",\"ja\"],[\"kal\",\"kl\"],[\"kan\",\"kn\"],[\"kas\",\"ks\"],[\"kat\",\"ka\"],[\"kau\",\"kr\"],[\"kaz\",\"kk\"],[\"khm\",\"km\"],[\"kik\",\"ki\"],[\"kin\",\"rw\"],[\"kir\",\"ky\"],[\"kom\",\"kv\"],[\"kon\",\"kg\"],[\"kor\",\"ko\"],[\"kua\",\"kj\"],[\"kur\",\"ku\"],[\"lao\",\"lo\"],[\"lat\",\"la\"],[\"lav\",\"lv\"],[\"lim\",\"li\"],[\"lin\",\"ln\"],[\"lit\",\"lt\"],[\"ltz\",\"lb\"],[\"lub\",\"lu\"],[\"lug\",\"lg\"],[\"mac\",\"mk\"],[\"mah\",\"mh\"],[\"mal\",\"ml\"],[\"mao\",\n\"mi\"],[\"mar\",\"mr\"],[\"may\",\"ms\"],[\"mkd\",\"mk\"],[\"mlg\",\"mg\"],[\"mlt\",\"mt\"],[\"mon\",\"mn\"],[\"mri\",\"mi\"],[\"msa\",\"ms\"],[\"mya\",\"my\"],[\"nau\",\"na\"],[\"nav\",\"nv\"],[\"nbl\",\"nr\"],[\"nde\",\"nd\"],[\"ndo\",\"ng\"],[\"nep\",\"ne\"],[\"nld\",\"nl\"],[\"nno\",\"nn\"],[\"nob\",\"nb\"],[\"nor\",\"no\"],[\"nya\",\"ny\"],[\"oci\",\"oc\"],[\"oji\",\"oj\"],[\"ori\",\"or\"],[\"orm\",\"om\"],[\"oss\",\"os\"],[\"pan\",\"pa\"],[\"per\",\"fa\"],[\"pli\",\"pi\"],[\"pol\",\"pl\"],[\"por\",\"pt\"],[\"pus\",\"ps\"],[\"que\",\"qu\"],[\"roh\",\"rm\"],[\"ron\",\"ro\"],[\"rum\",\"ro\"],[\"run\",\"rn\"],[\"rus\",\"ru\"],[\"sag\",\"sg\"],[\"san\",\n\"sa\"],[\"sin\",\"si\"],[\"slk\",\"sk\"],[\"slo\",\"sk\"],[\"slv\",\"sl\"],[\"sme\",\"se\"],[\"smo\",\"sm\"],[\"sna\",\"sn\"],[\"snd\",\"sd\"],[\"som\",\"so\"],[\"sot\",\"st\"],[\"spa\",\"es\"],[\"sqi\",\"sq\"],[\"srd\",\"sc\"],[\"srp\",\"sr\"],[\"ssw\",\"ss\"],[\"sun\",\"su\"],[\"swa\",\"sw\"],[\"swe\",\"sv\"],[\"tah\",\"ty\"],[\"tam\",\"ta\"],[\"tat\",\"tt\"],[\"tel\",\"te\"],[\"tgk\",\"tg\"],[\"tgl\",\"tl\"],[\"tha\",\"th\"],[\"tib\",\"bo\"],[\"tir\",\"ti\"],[\"ton\",\"to\"],[\"tsn\",\"tn\"],[\"tso\",\"ts\"],[\"tuk\",\"tk\"],[\"tur\",\"tr\"],[\"twi\",\"tw\"],[\"uig\",\"ug\"],[\"ukr\",\"uk\"],[\"urd\",\"ur\"],[\"uzb\",\"uz\"],[\"ven\",\"ve\"],[\"vie\",\n\"vi\"],[\"vol\",\"vo\"],[\"wel\",\"cy\"],[\"wln\",\"wa\"],[\"wol\",\"wo\"],[\"xho\",\"xh\"],[\"yid\",\"yi\"],[\"yor\",\"yo\"],[\"zha\",\"za\"],[\"zho\",\"zh\"],[\"zul\",\"zu\"]]);function se(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function te(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=se(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}\nfunction ue(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.N&&!kd(b,e))return!1;var f=e.audio;e=e.video;return f&&!be(f)||e&&!be(e)||f&&c&&!ve(f,c)||e&&d&&!ve(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Wd(ic(b.mimeType,b.codecs))})}function ve(b,c){return b.mimeType!=c.mimeType||b.codecs.split(\".\")[0]!=c.codecs.split(\".\")[0]?!1:!0}\nfunction we(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:\"variant\",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(\", \"),\naudioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||\nnull,b.label=c.label,b.audioRoles=c.roles);return b}function xe(b){return{id:b.id,active:!1,type:\"text\",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}\nfunction ye(b){b.__shaka_id||(b.__shaka_id=ze++);return b.__shaka_id}var ze=0;function Ae(b){return{id:ye(b),active:!1,type:\"\",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}\nfunction Be(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ce(b){return b.filter(function(b){return Be(b)})}\nfunction De(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}\nfunction Ee(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:\"\";e=e.filter(function(b){return b.language==g});if(c){var h=re(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Fe(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(td.uc,[]);return b.length?Fe(e,b[0]):e}\nfunction Fe(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Ge(b,c,d){for(var e=0;e=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};\nN.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Wa(d.b,f,e);Wa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};\nN.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;\nfunction Ie(b,c){b&&(c=c.filter(function(c){return se(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Je(b,c){this.a=b;this.b=c}Je.prototype.toString=function(){return\"v\"+this.a+\".\"+this.b};function Ke(b,c){var d=new Je(2,6),e=Le,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Me(b,c,d,e){$a([d,\"has been deprecated and will be removed in\",c,\". We are currently at version\",b,\". Additional information:\",e].join(\" \"))}function Ne(b,c,d,e){Za([d,\"has been deprecated and has been removed in\",c,\". We are now at version\",b,\". Additional information:\",e].join(\"\"))}var Le=null;var Oe=\"ended play playing pause pausing ratechange seeked seeking timeupdate volumechange\".split(\" \"),Pe=\"buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume\".split(\" \"),Qe=[\"loop\",\"playbackRate\"],Re=[\"pause\",\"play\"],Se=\"abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged\".split(\" \"),Te={getAssetUri:2,\ngetAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Ue={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ve=[[\"getConfiguration\",\"configure\"]],We=[[\"isTextTrackVisible\",\"setTextTrackVisibility\"]],\nXe=\"addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay\".split(\" \"),Ye=[\"attach\",\"detach\",\"load\",\"unload\"];\nfunction Ze(b){return JSON.stringify(b,function(b,d){if(\"function\"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&\"object\"==typeof g?\"detail\"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:\"TimeRanges\",length:d.length,start:[],end:[]},f=0;fd?\"-Infinity\":\"Infinity\":d;return c}})}function $e(b){return JSON.parse(b,function(b,d){return\"NaN\"==d?NaN:\"-Infinity\"==d?-Infinity:\"Infinity\"==d?Infinity:d&&\"object\"==typeof d&&\"TimeRanges\"==d.__type__?af(d):d&&\"object\"==typeof d&&\"Uint8Array\"==d.__type__?new Uint8Array(d.entries):d})}function af(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function bf(b,c,d,e,f,g){this.N=b;this.f=new B(c);this.S=d;this.j=!1;this.F=e;this.K=f;this.w=g;this.b=this.h=!1;this.C=\"\";this.i=null;this.m=this.Jd.bind(this);this.o=this.ef.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var cf=!1,df=null;p=bf.prototype;p.destroy=function(){ef(this);df&&ff(this);this.f&&(this.f.stop(),this.f=null);this.K=this.F=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.da=function(){return this.b};\np.Xc=function(){return this.C};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.oc();var b=new chrome.cast.SessionRequest(this.N);b=new chrome.cast.ApiConfig(b,this.Kd.bind(this),this.jf.bind(this),\"origin_scoped\");chrome.cast.initialize(b,function(){},function(){});cf&&this.f.O(.02);(b=df)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Kd(b):df=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};\np.cd=function(b){this.i=b;this.b&&gf({type:\"appData\",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!cf)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Vc.bind(this,b),this.Id.bind(this));return this.g};p.Zb=function(){this.b&&(ef(this),df&&(ff(this),df.stop(function(){},function(){}),df=null))};\np.get=function(b,c){if(\"video\"==b){if(Re.includes(c))return this.Ud.bind(this,b,c)}else if(\"player\"==b){if(Ue[c]&&!this.get(\"player\",\"isLive\")())return function(){};if(Xe.includes(c))return this.Ud.bind(this,b,c);if(Ye.includes(c))return this.zf.bind(this,b,c);if(Te[c])return this.Rd.bind(this,b,c)}return this.Rd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;gf({type:\"set\",targetName:b,property:c,value:d})};\np.Vc=function(b,c){df=c;c.addUpdateListener(this.m);c.addMessageListener(\"urn:x-cast:com.google.shaka.v2\",this.o);this.Jd();gf({type:\"init\",initState:b,appData:this.i});this.g.resolve()};p.Id=function(b){var c=8003;switch(b.code){case \"cancel\":c=8004;break;case \"timeout\":c=8005;break;case \"receiver_unavailable\":c=8006}this.g.reject(new D(2,8,c,b))};p.Rd=function(b,c){return this.a[b][c]};\np.Ud=function(b,c,d){for(var e=[],f=2;f LA_URL\"))?b.textContent:\"\"}\nfunction wf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=tf.get(f.Xd);if(g){var h=vd(g,f.init||b);if(g=Af.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}\nvar Af=(new Map).set(\"com.widevine.alpha\",function(b){return(b=P.td(b.node,\"urn:microsoft\",\"laurl\"))?b.getAttribute(\"licenseUrl\")||\"\":\"\"}).set(\"com.microsoft.playready\",function(b){b=P.td(b.node,\"urn:microsoft:playready\",\"pro\");if(!b)return\"\";b=Bc(b.textContent);b=yf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return\"\";b=uc(b.value,!0);return(b=P.Pd(b,\"WRMHEADER\"))?zf(b):\"\"});function vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Bf(d.value))&&c.push(d);return c}\nfunction Bf(b){var c=b.getAttribute(\"schemeIdUri\"),d=P.getAttributeNS(b,\"urn:mpeg:cenc:2013\",\"default_KID\"),e=P.ud(b,\"urn:mpeg:cenc:2013\",\"pssh\").map(P.ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,\"\").toLowerCase(),d.includes(\" \")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:\"cenc\",initData:Bc(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,Xd:c,keyId:d,init:0x)if(q+1=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0this.I.byteLength&&Kf();var c=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Va;\nR.prototype.J=function(b){this.a+b>this.I.byteLength&&Kf();this.a+=b};R.prototype.skip=R.prototype.J;R.prototype.Wd=function(b){this.ab||b>this.I.byteLength)&&Kf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.Wc=function(){for(var b=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.I.buffer,this.I.byteOffset+b,this.a-b);this.a+=1;return sc(b)};\nR.prototype.readTerminatedString=R.prototype.Wc;function Kf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z(\"shaka.util.Mp4Parser\",S);S.prototype.G=function(b,c){var d=Lf(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.G;S.prototype.ca=function(b,c){var d=Lf(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ca;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;\nS.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.pa()&&!this.a;)this.ic(0,d,c)};S.prototype.parse=S.prototype.parse;\nS.prototype.ic=function(b,c,d){var e=c.aa(),f=c.D(),g=c.D();switch(f){case 0:f=c.I.byteLength-e;break;case 1:f=c.ub()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.D(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.I.byteLength&&(g=c.I.byteLength);g-=c.aa();c=0>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Pf;function Qf(b,c,d,e){var f,g=(new S).ca(\"sidx\",function(b){f=Rf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}\nfunction Rf(b,c,d,e){var f=[];e.reader.J(4);var g=e.reader.D();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.D();var k=e.reader.D()}else h=e.reader.ub(),k=e.reader.ub();e.reader.J(2);var l=e.reader.Jb();b=b+e.size+k;for(k=0;k>>31;m&=2147483647;var q=e.reader.D();e.reader.J(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z(\"shaka.media.SegmentIndex\",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&bb||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;cg.startTime?0==d&&c.push(g):(.1b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.zc;function Sf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Tf(b){this.b=b;this.a=new R(b,0);Uf||(Uf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Uf;Tf.prototype.pa=function(){return this.a.pa()};\nfunction Vf(b){var c=Wf(b);if(7=d&&!(c&1<<8-d);d++);if(8b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Cf(h,l,b+f,k,c*g);return ud(m,[d])},0,null)}}}\nfunction ng(b,c){for(var d=[],e=0;eb.o||b.i.O(Math.max(3,b.o-c,Xa(b.v)))}\nfunction xg(b,c,d){c=c||{contentType:\"\",mimeType:\"\",codecs:\"\",emsgSchemeIdUris:[],frameRate:void 0,Sc:null};d=d||c.la;var e=P.rb,f=P.ve,g=P.P(b,\"BaseURL\").map(P.ac),h=b.getAttribute(\"contentType\")||c.contentType,k=b.getAttribute(\"mimeType\")||c.mimeType,l=b.getAttribute(\"codecs\")||c.codecs;f=P.H(b,\"frameRate\",f)||c.frameRate;var m=P.P(b,\"InbandEventStream\"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute(\"schemeIdUri\"),n.includes(q)||n.push(q);m=P.P(b,\n\"AudioChannelConfiguration\");m=Cg(m)||c.Sc;h||(h=Ag(k,l));return{la:ud(d,g),Lb:P.Yb(b,\"SegmentBase\")||c.Lb,Ga:P.Yb(b,\"SegmentList\")||c.Ga,Nb:P.Yb(b,\"SegmentTemplate\")||c.Nb,width:P.H(b,\"width\",e)||c.width,height:P.H(b,\"height\",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute(\"id\"),Sc:m}}\nfunction Cg(b){for(var c=0;c>=1;return b}}}return null}function Bg(b){var c=b.Lb?1:0;c+=b.Ga?1:0;c+=b.Nb?1:0;if(0==c)return\"text\"==b.contentType||\"application\"==b.contentType?!0:!1;1!=c&&(b.Lb&&(b.Ga=null),b.Nb=null);return!0}\nfunction Dg(b,c,d,e){c=ud(c,[d]);c=Sb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Ob(b.g,c);return c.promise.then(function(b){if(\"HEAD\"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=sc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}\nfunction wg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute(\"schemeIdUri\"),value:b.getAttribute(\"value\")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:\"urn:mpeg:dash:utc:http-head:2014\",value:e});return td.te(d,function(b){var d=b.scheme;b=b.value;switch(d){case \"urn:mpeg:dash:utc:http-head:2014\":case \"urn:mpeg:dash:utc:http-head:2012\":return Dg(this,c,b,\"HEAD\");case \"urn:mpeg:dash:utc:http-xsdate:2014\":case \"urn:mpeg:dash:utc:http-iso:2014\":case \"urn:mpeg:dash:utc:http-xsdate:2012\":case \"urn:mpeg:dash:utc:http-iso:2012\":return Dg(this,\nc,b,\"GET\");case \"urn:mpeg:dash:utc:direct:2014\":case \"urn:mpeg:dash:utc:direct:2012\":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case \"urn:mpeg:dash:utc:http-ntp:2014\":case \"urn:mpeg:dash:utc:ntp:2014\":case \"urn:mpeg:dash:utc:sntp:2014\":return $a(\"NTP UTCTiming scheme is not supported\"),Promise.reject();default:return $a(\"Unrecognized scheme in UTCTiming element\",d),Promise.reject()}}.bind(b))[\"catch\"](function(){$a(\"A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!\");\nreturn 0})}p.rf=function(b,c,d){var e=P.rb,f=d.getAttribute(\"schemeIdUri\")||\"\",g=d.getAttribute(\"value\")||\"\",h=P.H(d,\"timescale\",e)||1;P.P(d,\"Event\").forEach(function(d){var k=P.H(d,\"presentationTime\",e)||0,m=P.H(d,\"duration\",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute(\"id\")||\"\",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};\np.Cf=function(b,c,d){b=og(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Ob(this.g,b);return b.promise.then(function(b){return b.data})};function Ag(b,c){return Wd(ic(b,c))?\"text\":b.split(\"/\")[0]}U.Zc(\"mpd\",pg);U.Kb(\"application/dash+xml\",pg);function Eg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Fg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Fg.prototype.toString=function(){function b(b){return b.name+\"=\"+(isNaN(Number(b.value))?'\"'+b.value+'\"':b.value)}var c=\"#\"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0c.length||\"data\"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(\":\").split(\",\");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(\",\"));d=d.split(\";\");var e=null;1w.Pc&&(w.stream.presentationTimeOffset=-x,w.Mb.offset(x))}else for(b.b.ta(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset=\nh,A.Mb.offset(-h),Sf(A.Mb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}\nfunction dh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.l){case 1:return f=Jg,g=td,h=c.a,k=f.hb(c.a,\"EXT-X-MEDIA\"),l=k.filter(function(b){return\"SUBTITLES\"==fh(b,\"TYPE\")}.bind(b)),m=l.map(function(b){return gh(this,b)}.bind(b)),n=k.filter(function(b){return\"CLOSED-CAPTIONS\"==fh(b,\"TYPE\")}),hh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.hb(h,\"EXT-X-STREAM-INF\"),w=x.map(function(b){return ih(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=\ne.s,C=A.reduce(g.uc,[]),C=C.filter(function(b){return null!=b}),e[\"return\"]({startTime:0,variants:C,textStreams:q})}})})}\nfunction ih(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb,fb;return y(f,function(f){switch(f.l){case 1:g=wd;h=Jg;k=Hg(c,\"CODECS\",\"avc1.42E01E,mp4a.40.2\");l=jh(k.split(/\\s*,\\s*/));m=c.getAttribute(\"RESOLUTION\");q=n=null;x=Hg(c,\"FRAME-RATE\");w=Number(fh(c,\"BANDWIDTH\"));m&&(A=m.value.split(\"x\"),n=A[0],q=A[1]);C=h.hb(d.a,\"EXT-X-MEDIA\");C=C.filter(function(b){return\"CLOSED-CAPTIONS\"!=fh(b,\"TYPE\")});C=C.filter(function(b){var c=Hg(b,\"URI\")||\"\";return\"SUBTITLES\"==\n(Hg(b,\"TYPE\")||\"\")||\"\"!=c});E=Hg(c,\"AUDIO\");F=Hg(c,\"VIDEO\");E?C=h.Cc(C,\"AUDIO\",E):F&&(C=h.Cc(C,\"VIDEO\",F));if(V=kh(g.na,l)){if(Y=Hg(c,\"SUBTITLES\"))wa=h.Cc(C,\"SUBTITLES\",Y),wa.length&&(Ba=b.C.get(wa[0].id),Ba.stream.codecs=V);Kb(l,V)}ba=C.map(function(b){return lh(this,b,l)}.bind(b));na=[];xa=[];return u(f,Promise.all(ba),2);case 2:Va=f.s;Va=Va.filter(function(b){return null!=b});E?na=Va:F&&(xa=Va);vb=!1;na.length||xa.length?na.length?(eb=fh(c,\"URI\"),fb=na[0].pc,eb==fb?(Ca=g.wb,vb=!0):Ca=g.La):Ca=\ng.wb:1==l.length?(Ia=kh(g.La,l),Ca=m||x||Ia?g.La:g.wb):(Ca=g.La,l=[l.join(\",\")]);if(vb){f.A(3);break}return u(f,mh(b,c,l,Ca),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.wb?na=[ja]:xa=[ja];else if(null===ja)return f[\"return\"]([]);xa&&nh(xa);na&&nh(na);return f[\"return\"](oh(b,na,xa,w,n,q,x))}})})}function nh(b){b.forEach(function(b){var c=b.stream.codecs.split(\",\");c=c.filter(function(b){return\"mp4a.40.34\"!=b});b.stream.codecs=c.join(\",\")})}\nfunction oh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.pc:\"\")+\" - \"+(l?l.pc:\"\");var C=void 0;if(n&&x)if(w.length&&A.length?0>4,0!=e&&2!=e||c(),3==e&&(e=b.ha(),b.J(e)),1!=b.D()>>8)b.seek(d+188),e=b.ha(),71!=e&&(b.seek(d+192),e=b.ha()),71!=e&&(b.seek(d+204),e=b.ha()),71!=e&&c(),b.Wd(1);else return b.J(3),d=b.ha()>>6,0!=d&&1!=d||c(),0==b.ha()&&c(),d=b.ha(),e=b.Jb(),b=b.Jb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}\nfunction Dh(b,c,d){b=ic(b,c);if(!Wd(b))return 0;c=new Ud(null);Xd(c,b);return c.Gc(d)}function jh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=lc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function kh(b,c){for(var d=Eh[b],e=0;ef-.5)){c=!0;break a}}c=!1}return c};function Zh(b,c,d,e,f){var g=this;this.b=b;this.w=c;this.v=d;this.m=f;this.g=new ac;this.j=!1;this.o=b.readyState;this.f=!1;this.c=e;this.i=!1;L(this.g,b,\"waiting\",function(){return $h(g)});this.h=(new B(function(){$h(g)})).Ia(.25)}Zh.prototype.a=function(){this.g&&(this.g.a(),this.g=null);null!=this.h&&(this.h.stop(),this.h=null);this.c&&(this.c.a(),this.c=null);this.b=this.w=this.m=null};Zh.prototype.Uc=function(){this.i=!0;$h(this)};\nfunction $h(b){if(0!=b.b.readyState){if(b.b.seeking){if(!b.j)return}else b.j=!1;if(!b.b.paused){b.b.readyState!=b.o&&(b.f=!1,b.o=b.b.readyState);var c=b.v.smallGapLimit,d=b.b.currentTime,e=b.b.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=pc(\"Edge/\")||pc(\"Trident/\")||pc(\"Tizen\")||pc(\"CrKey\")?.5:.1;for(var g=0;gd&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.c){b=b.c;d=b.g;e=Wh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.c!=\nd||b.h!=e)b.f=f,b.c=d,b.h=e;d=f-b.f;d>=b.i&&e&&b.b(b.c,d)}}else if(0!=f||b.i){g=e.start(f);var h=b.w.wa();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.f||(b.f=!0,d=new I(\"largegap\",{currentTime:d,gapSize:h}),d.cancelable=!0,b.m(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.b.currentTime=g)}}}}};function ai(b){var c=this;this.f=b;this.b=new Set;this.c=(new B(function(){bi(c,!1)})).Ia(.25)}ai.prototype.a=function(){this.c.stop();for(var b=r(this.b),c=b.next();!c.done;c=b.next())c.value.a();this.b.clear()};function bi(b,c){for(var d=r(b.b),e=d.next();!e.done;e=d.next())e.value.h(b.f.currentTime,c)};function ci(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function di(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function ei(b){this.f=b;this.b=null;this.c=function(){}}ei.prototype.a=function(){this.b=this.f=null;this.c=function(){}};ei.prototype.h=function(b){var c=this.b,d=this.f.periods;b=di(d,b)||d[0];c!=b&&this.c(b);this.b=b};function fi(b,c){b.c=c};function gi(b){var c=this;this.b=b;this.g=!1;this.f=this.b.cc();this.c=new B(function(){c.b.Ed(.25*c.f)})}gi.prototype.a=function(){this.c&&(this.c.stop(),this.c=null);this.b=null};gi.prototype.set=function(b){this.f=b;hi(this)};function hi(b){b.c.stop();var c=b.g?0:b.f;0<=c?b.b.cc()!=c&&b.b.ed(c):(b.c.Ia(.25),0!=b.b.cc()&&b.b.ed(0))};function ii(b,c,d){this.b=b;this.g=c;this.h=d;this.c=new ac;this.f=new ji(b);0Math.abs(b.b.currentTime-c)?ni(b):(dc(b.c,b.b,\"seeking\",function(){ni(b)}),oi(b.f,0==b.b.currentTime?c:b.b.currentTime))}function ni(b){L(b.c,b.b,\"seeking\",function(){return b.g()})}function ji(b){var c=this;this.c=b;this.i=10;this.h=this.g=this.f=0;this.b=new B(function(){0>=c.f?c.b.stop():c.c.currentTime!=c.g?c.b.stop():(c.c.currentTime=c.h,c.f--)})}ji.prototype.a=function(){this.b&&(this.b.stop(),this.b=null);this.c=null};\nfunction oi(b,c){b.g=b.c.currentTime;b.h=c;b.f=b.i;b.c.currentTime=c;b.b.Ia(.1)};function pi(b){function c(){d.g=!0;null!=d.c&&(d.b.currentTime=d.c)}var d=this;this.b=b;this.g=!1;this.c=null;this.f=new ac;0==this.b.readyState?dc(this.f,this.b,\"loadedmetadata\",c):c()}pi.prototype.a=function(){this.f&&(this.f.a(),this.f=null);this.b=null};pi.prototype.o=function(b){this.c=this.g?this.c:b};pi.prototype.i=function(){return(this.g?this.b.currentTime:this.c)||0};pi.prototype.v=function(){};\nfunction qi(b,c,d,e,f,g){var h=this;this.c=b;this.b=c.presentationTimeline;this.C=c.minBufferTime||0;this.h=d;this.w=f;this.m=null;this.g=new Zh(b,c.presentationTimeline,d,ri(b,d),g);this.f=new ii(b,function(){a:{var b=h.g;b.j=!0;b.i=!1;b.f=!1;var c=mi(h.f);b=si(h,c);if(.001d-c&&(c=d-3);bb.b.Y()?b.b.ib():b.b.wa():0>c&&(c=b.b.wa()+c);return vi(b,ui(b,c))}qi.prototype.v=function(){this.g.Uc()};function vi(b,c){var d=b.b.Y();return c>=d?d-b.h.durationBackoff:c}function si(b,c){var d=qd.bind(null,b.c.buffered),e=Math.max(b.C,b.h.rebufferingGoal),f=b.h.safeSeekOffset,g=b.b.ib(),h=b.b.wa(),k=b.b.Y();3>h-g&&(g=h-3);var l=b.b.Cb(e),m=b.b.Cb(f);e=b.b.Cb(e+f);return c>=k?vi(b,c):c>h?h:c=l||d(c)?c:e}\nfunction ui(b,c){var d=b.b.ib();if(cd?d:c}function ri(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Vh(new Yh(b),c.stallThreshold);Xh(e,function(){b.currentTime+=d});return e};function wi(){this.c=function(){};this.b=new Set}wi.prototype.a=function(){this.c=function(){};this.b.clear()};function xi(b,c){b.c=c};function yi(b){var c=this;this.i=b;this.g=new Map;this.b=function(){};this.c=function(){};this.f=function(){};this.j=[{Za:null,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Ai,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Bi,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:zi,Ya:Ai,Sa:function(b,e){return c.c(b,e)}},{Za:zi,Ya:Bi,Sa:function(b,e){return c.c(b,e)}},{Za:Ai,Ya:Bi,Sa:function(b,e){return c.f(b,e)}},{Za:Bi,Ya:Ai,Sa:function(b,e){return c.f(b,e)}}]}\nyi.prototype.a=function(){this.i=null;this.g.clear();this.b=function(){};this.c=function(){};this.f=function(){}};yi.prototype.h=function(b,c){for(var d=r(this.i.b),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.g.get(e),g=be.endTime?Bi:zi;this.g.set(e,g);for(var h=r(this.j),k=h.next();!k.done;k=h.next())k=k.value,k.Za==f&&k.Ya==g&&k.Sa(e,c)}};function Ci(b,c,d,e){b.b=c;b.c=d;b.f=e}var Ai=1,zi=2,Bi=3;function Di(b,c){this.a=c;this.c=b;this.g=null;this.j=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.F=null;this.C=this.f=this.m=!1;this.w=0}Di.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Ei(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};\nDi.prototype.configure=function(b){this.g=b;this.F=new tb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};\nDi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.l){case 1:return e=b.a.Qa(),f=Fi(b,e),g=b.a.Hd(b.c.periods[f]),g.variant||g.text?u(d,Gi(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d[\"return\"](new D(2,5,5005));case 2:if(b.f)return d[\"return\"]();b.a&&b.a.bf&&b.a.bf();v(d)}})})};function Hi(b){return Ii(b,\"audio\")}function Ji(b){return Ii(b,\"video\")}\nfunction Ii(b,c){var d=b.b.get(c);return d?d.Fa||d.stream:null}function Ki(b,c){return t(function e(){var f,g,h,k,l,m,n,q;return y(e,function(e){switch(e.l){case 1:return f=wd,u(e,je(b.a.L,f.na),2);case 2:return b.w++,b.C=!1,g=b.w,h=b.a.L,k=new Map,l=new Set,k.set(f.na,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e[\"return\"]():u(e,Li(b,l),4);case 4:if(b.f)return e[\"return\"]();b.w!=g||b.b.has(f.na)||b.C||(m=b.a.Qa(),n=Fi(b,m),q=Mi(c,n,0),b.b.set(f.na,q),Ni(b,q,0));v(e)}})})}\nfunction Oi(b,c){var d=b.b.get(\"video\");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Fa&&(Pi(b,f,!1,0),d.Fa=e)}else if(e=d.Fa)d.Fa=null,Pi(b,e,!0,0)}}function Qi(b,c,d,e){c.video&&Pi(b,c.video,d,e);c.audio&&Pi(b,c.audio,d,e)}\nfunction Pi(b,c,d,e){var f=b.b.get(c.type);if(!f&&\"text\"==c.type&&b.g.ignoreTextStreamFailures)Ki(b,c);else if(f){var g=Ri(b,c);if(d&&g!=f.ya)b.b.forEach(function(c){Si(b,c)});else{f.Fa&&(c.trickModeVideo?(f.Fa=c,c=c.trickModeVideo):f.Fa=null);var h=b.h[g];h&&h.vb&&(h=b.i.get(c.id))&&h.vb&&f.stream!=c&&(\"text\"==c.type&&ce(b.a.L,ic(c.mimeType,c.codecs)),f.stream=c,f.ec=!0,Ti(b,f,g)&&f.Hb.abort(),d&&(f.Na?f.qc=!0:f.Ea?(f.Ja=!0,f.Wb=e,f.qc=!0):(Ei(f),Ui(b,f,!0,e))))}}}\nfunction Ti(b,c,d){if(!c.Hb)return!1;var e=b.a.Qa(),f=fe(b.a.L,c.type);b=(b=Vi(b,c,e,f,d))?b.a?b.a-b.b:null:null;if(null==b)return!1;(d=c.stream.initSegmentReference)&&(b+=(d.a?d.a-d.b:null)||0);return c.Hb.b.a>b}\nfunction Wi(b){function c(c){var f=b.a.L;\"text\"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&dc?b.a.L.ta(c):b.a.L.ta(Math.pow(2,32))}\nfunction Zi(b,c){if(!b.f&&!c.Ea&&null!=c.Ba&&!c.Na)if(c.Ba=null,c.Ja)Ui(b,c,c.qc,c.Wb);else{try{var d=$i(b,c);null!=d&&(Ni(b,c,d),c.Eb=!1)}catch(e){aj(b,e);return}d=Array.from(b.b.values());bj(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.L.endOfStream().then(function(){if(!this.f){var b=this.a.L.Y();b=b.c.presentationTimeline.Y())return c.endOfStream=!0,\"video\"==c.type&&(f=b.b.get(\"text\"))&&\"application/cea-608\"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.ya=h;if(h!=g)return null;\nif(k>=l)return.5;h=fe(b.a.L,c.type);h=Vi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=cj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.Vd=0;dj(b,c,e,g,h);return null}function cj(b,c,d){if(!c.lb||!c.xa)return Math.max(d,c.Vd);d=Ri(b,c.lb);return b.c.periods[d].startTime+c.xa.endTime}\nfunction Vi(b,c,d,e,f){if(c.xa&&c.stream==c.lb)return ej(b,c,f,c.xa.position+1);c.xa?(d=Ri(b,c.lb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.xa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=ej(b,c,f,Math.max(0,d-1)));return g||ej(b,c,f,d)}\nfunction ej(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Db();e=e.jb();return d.startTime+c.endTimee?null:c}\nfunction dj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=fj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ea=!0;c.ec=!1;k=gj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return hj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ea=!1,c.Yc=!1,c.Ja||this.a.Uc(),Ni(this,c,0),ij(this,h))}.bind(b))[\"catch\"](function(b){this.f||this.m||(c.Ea=!1,\"text\"==c.type&&this.g.ignoreTextStreamFailures?this.b[\"delete\"](\"text\"):\n7001==b.code?(c.Ea=!1,c.Ba=null,Ni(this,c,0)):3017==b.code?jj(this,c,b):(c.Eb=!0,b.severity=2,aj(this,b)))}.bind(b))}function jj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Yc})){var e=Math.round(100*b.j);if(20=d?Promise.resolve():b.a.L.remove(c.type,f,f+d).then(function(){}.bind(b))}\nfunction ij(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||\"text\"!=d[0].type)b.o=d.every(function(b){return\"text\"==b.type?!0:!b.Ja&&!b.Na&&b.xa});if(b.o){d=Ri(b,c);b.h[d]||Yi(b,d).then(function(){this.f||this.a.Gd()}.bind(b))[\"catch\"](td.Gb);for(d=0;d=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b[\"x-shaka-from-cache\"]};f=null;try{f=xc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function nj(b,c,d,e){var f=new nj.b;gc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new nj.a,h={pd:!1,ce:!1};b=nj.h(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?\"include\":void 0},h,e);b=new H(b,function(){h.pd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.ce=!0;g.abort()});k.O(c/1E3);b[\"finally\"](function(){k.stop()})}return b}z(\"shaka.net.HttpFetchPlugin\",nj);\nnj.h=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,wa;return y(h,function(h){switch(h.l){case 1:return k=nj.g,l=nj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get(\"Content-Length\"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.l){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Aa(h,3);break;case 2:return Da(h),h[\"return\"]();case 3:d.done||(q+=d.value.byteLength);\ne=Date.now();if(100c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f),\nf.A(3)}})})};U.Kb(\"application/x-offline-manifest\",kk);function lk(b){var c=ck(b);return c&&\"manifest\"==c.a?lk.a(b):c&&\"segment\"==c.a?lk.b(c.key(),c):Ab(new D(2,1,9004,b))}z(\"shaka.offline.OfflineScheme\",lk);lk.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{\"content-type\":\"application/x-offline-manifest\"}};return Cb(b)};lk.b=function(b,c){var d=new Cj;return Cb(void 0).T(function(){return d.init()}).T(function(){return Gj(d,c.ra(),c.$())}).T(function(b){return b.getSegments([c.key()])}).T(function(b){return{uri:c,data:b[0].data,headers:{}}})[\"finally\"](function(){return d.destroy()})};\nRb(\"offline\",lk);function mk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.l){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,nk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=ok(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f[\"return\"](g)}})})}\nfunction ok(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.l){case 1:return g=new Gc({nb:c,onError:function(){},gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Oc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f[\"return\"]([]);case 3:return ya(f,6),u(f,Vc(g),8);case 8:Aa(f,7);break;case 6:return Da(f),\nu(f,g.destroy(),9);case 9:return f[\"return\"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.l){case 1:return ya(c,2),u(c,Yc(g,b),4);case 4:h.push(b);Aa(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f[\"return\"](h)}})})}\nfunction nk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Mb(b.audioCapabilities,c.audioCapabilities,d)&&Mb(b.videoCapabilities,c.videoCapabilities,d)};function pk(b,c){var d=qk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.j=!0;this.m=Promise.resolve().then(function(){return rk(e)})}pk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return b.j=!1,b.b&&b.b.abort(),sk(b),u(d,b.m,2);case 2:b.a&&b.a.qa.Ua();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.qa.Ua();b.a=null;b.f=[];b.g=null;v(d)}})})};\nfunction tk(b,c){var d={pb:function(){},fc:function(){},Ua:function(){},onError:function(){},hc:function(){},rg:function(){}};b.f.push({create:c,qa:d});b.b&&b.b.abort();sk(b);return d}\nfunction rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:if(b.j){if(0==b.f.length||b.a&&!b.a.Ra)var e=!1;else{b.a&&(b.a.qa.Ua(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.qa.pb(),b.a={node:g.node,payload:g.payload,Ra:g.Ra,qa:e.qa}):e.qa.hc();e=!0}e?e=Promise.resolve():b.a?e=uk(b):(b.g.af(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})}\nfunction uk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return b.c=b.g.Ke(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ue(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.qa.fc(),b.a=null);Aa(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.qa.Ua();else b.a.qa.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function sk(b){b.h&&(b.h.resolve(),b.h=null)};function vk(b){this.a=null;for(var c=0;cb});return!0};vk.prototype.remove=vk.prototype.remove;\nvk.prototype.append=function(b){for(var c=xk,d=[],e=0;e=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}\"center\"==b.textAlign&&\"center\"!=c.align&&(c.align=\"middle\");\"vertical-lr\"==b.writingMode?c.vertical=\"lr\":\"vertical-rl\"==b.writingMode&&(c.vertical=\"rl\");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}\nfunction wk(b,c){var d=b.mode;b.mode=\"showing\"==d?\"showing\":\"hidden\";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function yk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+\".\"+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Ib(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Ib(m)),l=yk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z(\"shaka.util.ConfigUtils.mergeConfigObjects\",yk);function zk(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:ub(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:ub(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:\"\",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:ub(),\nfailureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};pc(\"Web0S\")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,\nswitchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:\"\",preferredTextLanguage:\"\",preferredVariantRole:\"\",preferredTextRole:\"\",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,\ntextDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Ak(b,h.preferredAudioLanguage)};return h}function Bk(b,c,d){var e={\".drm.servers\":\"\",\".drm.clearKeys\":\"\",\".drm.advanced\":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:\"\",audioRobustness:\"\",serverCertificate:new Uint8Array(0),individualizationServer:\"\"}};return yk(b,c,d||zk(),e,\"\")}\nfunction Ak(b,c){var d=b.filter(function(b){return\"variant\"==b.type}),e=[],f=re(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/\n2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,\"text\"==h.type&&d.push(h);return d};function Ck(){this.a=null;this.b=[]}function Dk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Ek(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}\nfunction Fk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Gk(){this.b=this.c=null;this.a=[]}function Hk(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:\"text\",fromAdaptation:d,bandwidth:null}))};function Ik(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN;this.a=new Ck;this.b=new Gk};function X(b,c){var d=this;J.call(this);this.g=Jk;this.a=null;this.$a=!1;this.i=new ac;this.rc=this.j=this.xb=this.b=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.F=this.h=this.N=null;this.Ad=1E9;this.Tb=new Set;this.eb=!0;this.ka=null;this.yd=!1;this.wd=0;this.ja=null;this.C=new Gh;this.c=Kk(this);this.Ub={width:Infinity,height:Infinity};this.v=null;this.Rb=new Ph(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount);this.Ka=this.c.preferredTextLanguage;\nthis.yb=this.c.preferredTextRole;c&&c(this);this.N=Lk(this);L(this.i,window,\"online\",function(){d.ad()});this.w={name:\"detach\"};this.S={name:\"attach\"};this.Ca={name:\"unload\"};this.yc={name:\"manifest-parser\"};this.xc={name:\"manifest\"};this.ab={name:\"media-source\"};this.sc={name:\"drm-engine\"};this.W={name:\"load\"};this.Ac={name:\"src-equals-drm-engine\"};this.cb={name:\"src-equals\"};var e=new Map;e.set(this.S,function(b,c){return Db(Mk(d,b,c))});e.set(this.w,function(b){b.u&&(d.i.ma(b.u,\"error\"),b.u=null);\nd.a=null;b=Promise.resolve();return Db(b)});e.set(this.Ca,function(b){return Db(Nk(d,b))});e.set(this.ab,function(b){b=Ok(d,b);return Db(b)});e.set(this.yc,function(b,c){var e=Pk(d,b,c);return Db(e)});e.set(this.xc,function(b){return Qk(d,b)});e.set(this.sc,function(){var b=Rk(d);return Db(b)});e.set(this.W,function(b,c){return Db(Sk(d,b,c))});e.set(this.Ac,function(b){b=Tk(d,b);return Db(b)});e.set(this.cb,function(b,c){return Uk(d,b,c)});this.fb=new pk(this.w,{Ke:function(b,c,e,k){var f=null;b==\nd.w&&(f=e==d.w?d.w:d.S);b==d.S&&(f=e==d.w||c.u!=k.u?d.w:e==d.S?d.S:e==d.ab||e==d.W?d.ab:e==d.cb?d.Ac:null);b==d.ab&&(f=e==d.W&&c.u==k.u?d.yc:d.Ca);b==d.yc&&(f=Vk(d.W,d.xc,d.Ca,e,c,k));b==d.xc&&(f=Vk(d.W,d.sc,d.Ca,e,c,k));b==d.sc&&(f=Vk(d.W,d.W,d.Ca,e,c,k));b==d.Ac&&(f=e==d.cb&&c.u==k.u?d.cb:d.Ca);if(b==d.W||b==d.cb)f=d.Ca;b==d.Ca&&(f=k.u&&c.u==k.u?d.S:d.w);return f},ue:function(b,c,h){d.dispatchEvent(new I(\"onstatechange\",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,\nfunction(c){switch(c.l){case 1:return u(c,Nk(d,b),2);case 2:return c[\"return\"](b.u?d.S:d.w)}})})},af:function(b){d.dispatchEvent(new I(\"onstateidle\",{state:b.name}))}});b&&this.zb(b,!0)}Ta(X,J);z(\"shaka.Player\",X);\nX.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:if(b.g==Wk)return d[\"return\"]();b.g=Wk;e=tk(b.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});return u(d,new Promise(function(b){e.pb=function(){};e.fc=function(){b()};e.Ua=function(){b()};e.onError=function(){b()};e.hc=function(){b()}}),2);case 2:return u(d,b.fb.destroy(),3);case 3:b.i&&(b.i.a(),b.i=null);b.rc=null;b.j=null;b.c=null;if(!b.N){d.A(0);break}return u(d,b.N.destroy(),5);\ncase 5:b.N=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version=\"v2.5.0\";var Xk=[\"2\",\"5\"];Le=new function(b){this.a=b;this.c=Me;this.b=Ne}(new Je(Number(Xk[0]),Number(Xk[1])));var Yk=[\"output-restricted\",\"internal-error\"],Zk={};X.registerSupportPlugin=function(b,c){Zk[b]=c};\nX.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?mc()?!0:nc(\"application/x-mpegurl\"):!1};\nX.probeSupport=function(){return jd().then(function(b){for(var c=U.vf(),d={},e=r('video/mp4; codecs=\"avc1.42E01E\",video/mp4; codecs=\"avc3.42E01E\",video/mp4; codecs=\"hev1.1.6.L93.90\",video/mp4; codecs=\"hvc1.1.6.L93.90\",video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"vp9\",video/mp4; codecs=\"vp09.00.10.08\",audio/mp4; codecs=\"mp4a.40.2\",audio/mp4; codecs=\"ac-3\",audio/mp4; codecs=\"ec-3\",audio/mp4; codecs=\"opus\",audio/mp4; codecs=\"flac\",video/webm; codecs=\"vp8\",video/webm; codecs=\"vp9\",video/webm; codecs=\"vp09.00.10.08\",audio/webm; codecs=\"vorbis\",audio/webm; codecs=\"opus\",video/mp2t; codecs=\"avc1.42E01E\",video/mp2t; codecs=\"avc3.42E01E\",video/mp2t; codecs=\"hvc1.1.6.L93.90\",video/mp2t; codecs=\"mp4a.40.2\",video/mp2t; codecs=\"ac-3\",video/mp2t; codecs=\"ec-3\",text/vtt,application/mp4; codecs=\"wvtt\",application/ttml+xml,application/mp4; codecs=\"stpp\"'.split(\",\")),f=\ne.next();!f.done;f=e.next()){f=f.value;d[f]=mc()?Wd(f)?!0:MediaSource.isTypeSupported(f)||zd(f):nc(f);var g=f.split(\";\")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in Zk)b[h]=Zk[h]();return b})};X.prototype.zb=function(b,c){c=void 0===c?!0:c;if(this.g==Wk)return Promise.reject($k());var d=qk();d.u=b;mc()||(c=!1);var e=c?this.ab:this.S,f=tk(this.fb,function(){return{node:e,payload:d,Ra:!1}});f.pb=function(){};return al(f)};X.prototype.attach=X.prototype.zb;\nX.prototype.detach=function(){var b=this;if(this.g==Wk)return Promise.reject($k());var c=tk(this.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});c.pb=function(){};return al(c)};X.prototype.detach=X.prototype.detach;X.prototype.ld=function(b){var c=this;b=void 0===b?!0:b;if(this.g==Wk)return Promise.reject($k());mc()||(b=!1);var d=qk(),e=tk(this.fb,function(e){var f=e.u&&b?c.ab:e.u?c.S:c.w;d.u=e.u;return{node:f,payload:d,Ra:!1}});e.pb=function(){};return al(e)};X.prototype.unload=X.prototype.ld;\nX.prototype.load=function(b,c,d){if(this.g==Wk)return Promise.reject($k());this.dispatchEvent(new I(\"loading\"));var e=qk();e.uri=b;e.hd=Date.now()/1E3;d&&\"string\"!=typeof d&&(Ke(\"Loading with a manifest parser factory\",\"Please register a manifest parser and for the mime-type.\"),e.va=function(){return new d});d&&\"string\"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=bl(e)?this.cb:this.W,g=tk(this.fb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ra:!0}});g.pb=function(){};\nreturn new Promise(function(b,c){g.hc=function(){return c(new D(2,7,7002))};g.fc=function(){return b()};g.Ua=function(){return c($k())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;\nfunction bl(b){if(b.va)return!1;if(!mc())return!0;var c=b.mimeType;b=b.uri||\"\";c||(c={mp4:\"video/mp4\",m4v:\"video/mp4\",m4a:\"audio/mp4\",webm:\"video/webm\",ts:\"video/mp2t\",m3u8:\"application/x-mpegurl\",mp3:\"audio/mpeg\",aac:\"audio/aac\",flac:\"audio/flac\"}[U.getExtension(b)]);return c?nc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes(\"Apple\"):!0:!1:!1}function Mk(b,c,d){null==c.u&&(c.u=d.u,L(b.i,c.u,\"error\",function(){var c=cl(b);c&&b.Ha(c)}));b.a=c.u;return Promise.resolve()}\nfunction Nk(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:b.g!=Wk&&(b.g=Jk);b.dispatchEvent(new I(\"unloading\"));c.currentTime=null;c.va=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ma(c.u,\"loadeddata\"),b.i.ma(c.u,\"playing\"),b.i.ma(c.u,\"pause\"),b.i.ma(c.u,\"ended\"),b.i.ma(c.u,\"ratechange\"));b.bb&&(b.bb.a(),b.bb=null);b.Qb&&(b.Qb.stop(),b.Qb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.j){e.A(4);break}return u(e,b.j.stop(),4);\ncase 4:if(!b.f){e.A(6);break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.a(),b.o=null);if(!b.F){e.A(8);break}return u(e,b.F.destroy(),9);case 9:b.F=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute(\"src\"),c.u.load());if(!b.h){e.A(10);break}return u(e,b.h.destroy(),11);case 11:b.h=null;case 10:b.C.a.clear(),b.xb=null,b.V=null,b.Tb.clear(),b.b=null,b.v=null,b.eb=!0,dl(b),v(e)}})})}\nfunction Ok(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.l){case 1:return f=window.muxjs?new nd:new od,g=b.c.textDisplayFactory,h=new g,k=new $d(c.u,f,h),u(e,k.o,2);case 2:b.F=k,v(e)}})})}\nfunction Pk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:c.va=d.va;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.N;b.xb=g;if(c.va){b.m=c.va();f.A(2);break}k=b;return u(f,U.create(g,h,b.c.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.c.manifest),v(f)}})})}\nfunction Qk(b,c){var d=c.uri,e=b.N;b.Pb=new wi;xi(b.Pb,function(c){el(b,\"timelineregionadded\",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Bc(c)},filterAllPeriods:function(c){return fl(b,c)},onTimelineRegionAdded:function(c){var d=b.Pb;a:{var e=r(d.b);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.b.add(c),d.c(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ha(c)}};\nreturn new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.l){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.b=e.s;b.dispatchEvent(new I(\"manifestparsed\"));if(0==b.b.periods.length)throw new D(2,4,4014);gl(b.b.periods);v(e)}})})}),function(){return b.m.stop()})}\nfunction Rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:return b.h=new Gc({nb:b.N,onError:function(d){b.Ha(d)},gc:function(d){hl(b,d)},onExpirationUpdated:function(d,e){il(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.h.configure(b.c.drm),u(d,Nc(b.h,ci(b.b.periods),b.b.offlineSessionIds),2);case 2:fl(b,b.b.periods),v(d)}})})}\nfunction Sk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.l){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.xb=h,b.v=new Ik,k=function(){return jl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.K.set(c)},L(b.i,g,\"playing\",k),L(b.i,g,\"pause\",k),L(b.i,g,\"ended\",k),L(b.i,g,\"ratechange\",l),m=b.c.abrFactory,b.j&&b.rc==m||(b.rc=m,b.j=new m,b.j.configure(b.c.abr)),kl(b,b.b.periods),b.Rb=new Ph(b.c.preferredAudioLanguage,b.c.preferredVariantRole,b.c.preferredAudioChannelCount),\nb.Ka=b.c.preferredTextLanguage,ll(b.b.presentationTimeline,b.c.playRangeStart,b.c.playRangeEnd),u(f,b.h.zb(g),2);case 2:return b.j.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.b.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ml(b,g,c,!0);b.f&&(Qi(b.f,c,d,f),nl(b))}),b.o=ol(b,c.startTime),b.bb=pl(b),b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}}),\nn=Math.max(b.b.minBufferTime,b.c.streaming.rebufferingGoal),ql(b,n),b.f=rl(b),b.f.configure(b.c.streaming),sl(b),b.g=tl,b.dispatchEvent(new I(\"streaming\")),u(f,b.f.start(),3);case 3:b.c.streaming.startAtSegmentBoundary&&(q=b.o.i(),x=ul(b,q),b.o.o(x)),b.b.periods.forEach(b.Bc.bind(b)),vl(b),nl(b),w=wl(b),w.variants.some(function(b){return b.primary}),xl(b,w.variants),dc(b.i,g,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd}),v(f)}})})}\nfunction Tk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.l){case 1:return f=wd,b.h=new Gc({nb:b.N,onError:function(c){b.Ha(c)},gc:function(c){hl(b,c)},onExpirationUpdated:function(c,e){il(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.h.configure(b.c.drm),g={id:0,language:\"und\",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,\npresentationTimeOffset:0,mimeType:\"video/mp4\",codecs:\"\",encrypted:!0,keyId:null,language:\"und\",label:null,type:f.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Nc(b.h,[g],[]),2);case 2:return u(e,b.h.zb(c.u),0)}})})}\nfunction Uk(b,c,d){function e(){return jl(b)}c.uri=d.uri;c.startTime=d.startTime;b.xb=c.uri;b.v=new Ik;b.o=new pi(c.u);null!=c.startTime&&b.o.o(c.startTime);b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}});ql(b,b.c.streaming.rebufferingGoal);L(b.i,c.u,\"playing\",e);L(b.i,c.u,\"pause\",e);L(b.i,c.u,\"ended\",e);dc(b.i,c.u,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd});b.a.audioTracks&&(L(b.i,b.a.audioTracks,\"addtrack\",function(){return vl(b)}),\nL(b.i,b.a.audioTracks,\"removetrack\",function(){return vl(b)}));if(b.a.textTracks){var f=b.a.textTracks;L(b.i,f,\"addtrack\",function(){return vl(b)});L(b.i,f,\"removetrack\",function(){return vl(b)})}c.u.src=c.uri;b.g=yl;b.dispatchEvent(new I(\"streaming\"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(cl(b)):(dc(b.i,b.a,\"loadeddata\",function(){g.resolve()}),dc(b.i,b.a,\"error\",function(){g.reject(cl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));\nreturn Promise.resolve()})}function gl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(\",\")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}\nfunction sl(b){function c(b){var c=\"\";b.video&&(c=lc(b.video.codecs)[0]);var d=\"\";b.audio&&(d=lc(b.audio.codecs)[0]);return c+\"-\"+d}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=De(d,b.c.preferredAudioChannelCount);var e=new Hb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h=b.a.duration-.1;break;case tl:a:{var e;(e=b.a.ended)||(e=b.F,e=e.g?\"ended\"==e.g.readyState:!0);if(e)c=!0;else{if(b.b.presentationTimeline.U()&&(e=b.b.presentationTimeline.jb(),pd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=rd(b.a.buffered,b.a.currentTime);e=b.V;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Th:Uh;e.a=f;c!=f&&dl(b)})).Ia(.25)}\nfunction rl(b){return new Di(b.b,{Qa:function(){return b.o.i()},L:b.F,nb:b.N,Hd:b.Ze.bind(b),Gd:b.pe.bind(b),onError:b.Ha.bind(b),onEvent:function(c){return b.dispatchEvent(c)},cf:b.df.bind(b),Uc:b.kf.bind(b)})}\nX.prototype.configure=function(b,c){if(2==arguments.length&&\"string\"==typeof b){for(var d=b,e={},f=e,g=0,h=0;;){g=d.indexOf(\".\",g);if(0>g)break;if(0==g||\"\\\\\"!=d[g-1])h=d.substring(h,g).replace(/\\\\\\./g,\".\"),f[h]={},f=f[h],h=g+1;g+=1}f[d.substring(h).replace(/\\\\\\./g,\".\")]=c;b=e}d=Bk(this.c,b,Kk(this));zl(this);return d};X.prototype.configure=X.prototype.configure;\nfunction zl(b){b.m&&b.m.configure(b.c.manifest);b.h&&b.h.configure(b.c.drm);if(b.f){b.f.configure(b.c.streaming);try{b.b.periods.forEach(b.Bc.bind(b))}catch(f){b.Ha(f)}var c=Hi(b.f),d=Ji(b.f),e=wl(b);c=Ge(c,d,e.variants);b.j&&c&&c.allowedByApplication&&c.allowedByKeySystem?xl(b,e.variants):Al(b,e)}b.j&&(b.j.configure(b.c.abr),b.c.abr.enabled&&!b.eb?b.j.enable():b.j.disable(),Bl(b))}X.prototype.getConfiguration=function(){var b=Kk(this);Bk(b,this.c,Kk(this));return b};\nX.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.Df=function(){for(var b in this.c)delete this.c[b];Bk(this.c,Kk(this),Kk(this));zl(this)};X.prototype.resetConfiguration=X.prototype.Df;X.prototype.Ee=function(){return this.g};X.prototype.getLoadMode=X.prototype.Ee;X.prototype.Ie=function(){return this.a};X.prototype.getMediaElement=X.prototype.Ie;X.prototype.Bb=function(){return this.N};X.prototype.getNetworkingEngine=X.prototype.Bb;X.prototype.$b=function(){return this.xb};\nX.prototype.getAssetUri=X.prototype.$b;X.prototype.He=function(){Ke(\"getManifestUri\",'Please use \"getAssetUri\" instead.');return this.$b()};X.prototype.getManifestUri=X.prototype.He;X.prototype.U=function(){return this.b?this.b.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.U;X.prototype.Ta=function(){return this.b?this.b.presentationTimeline.Ta():!1};X.prototype.isInProgress=X.prototype.Ta;\nX.prototype.We=function(){if(this.b){if(!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.We;X.prototype.Ff=function(){if(this.b){var b=this.b.presentationTimeline;return{start:b.ib(),end:b.wa()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};\nX.prototype.seekRange=X.prototype.Ff;X.prototype.keySystem=function(){return this.h?this.h.keySystem():\"\"};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.h?this.h.a:null};X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.bc=function(){return this.h?this.h.bc():Infinity};X.prototype.getExpiration=X.prototype.bc;X.prototype.Ic=function(){return this.V?this.V.a==Uh:!1};X.prototype.isBuffering=X.prototype.Ic;\nX.prototype.Le=function(){if(this.K){var b=this.K;b=b.g?0:b.f}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Le;X.prototype.ag=function(b){0==b?$a(\"A trick play rate of 0 is unsupported!\"):(this.g==yl&&this.K.set(b),this.g==tl&&(this.K.set(b),Oi(this.f,1=h.b.periods.length?h.b.presentationTimeline.Y():h.b.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Ad++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),\nfindSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||\"\",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Tb.add(E);m.textStreams.push(E);return u(l,Ki(h.f,E),2);case 2:return(F=Ii(h.f,\"text\"))&&Hh(h.C,m,F),h.Tb[\"delete\"](E),Al(h,m),vl(h),l[\"return\"](xe(E))}})})};\nX.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.dd=function(b,c){this.Ub.width=b;this.Ub.height=c};X.prototype.setMaxHardwareResolution=X.prototype.dd;X.prototype.ad=function(){if(this.g==tl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Eb&&(d.Eb=!1,Ni(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.ad;X.prototype.Fe=function(){return this.b};X.prototype.getManifest=X.prototype.Fe;\nX.prototype.Ge=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Ge;function ml(b,c,d,e){Ih(b.C,c).variant=d;b=b.v.b;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:\"variant\",fromAdaptation:e,bandwidth:d.bandwidth}))}function Kk(b){var c=zk();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.ad())};c.textDisplayFactory=function(){return new vk(b.a)};return c}\nfunction kl(b,c){for(var d=0;dd&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}\nfunction hl(b,c){if(b.f){var d=wl(b),e=!1,f=Object.keys(c),g=1==f.length&&\"00\"==f[0];f.length&&d.variants.forEach(function(b){He(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?\"00\":d.keyId],b.allowedByKeySystem=!!d&&!Yk.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Hi(b.f);var h=Ji(b.f);(f=Ge(f,h,d.variants))&&!f.allowedByKeySystem&&Al(b,d);e&&(vl(b),xl(b,d.variants))}}\nfunction il(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I(\"expirationupdated\"))}function ll(b,c,d){0=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=ym(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Am(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&\nk.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}\nfunction Am(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Db();var k=g.id;Bm(g,f,function(f){var l=og(f.c(),f.b,f.a,b.a.streaming.retryParameters);sj(c,k,\nl,Tl(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=og(f.c(),f.b,f.a,b.a.streaming.retryParameters),sj(c,k,f,.5*Ul(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}\nfunction Bm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function km(b){if(b.h.a)throw new D(2,9,7001);}function im(){if(!fm())throw new D(2,9,9E3);}function gm(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e[\"return\"](e.s);case 2:Ea(e),Kb(b.g,c),Fa(e,0)}})})}\nfunction vm(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.l){case 1:return d=new Cj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})};\nfunction um(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.l){case 1:if(!e.drmInfo)return g[\"return\"]();h=Ij(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:tm(e,!1),videoCapabilities:tm(e,!0)}});return u(g,mk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),\n0)}})})}function ym(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function om(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Cm(c.value)}\nfunction Cm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}Zk.offline=fm;z(\"shaka.polyfill.installAll\",function(){for(var b=0;b=c.a.length)return b;for(var d=[],e=0;ed.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type);\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._player.setTextTrackVisibility(true)\n this._enableShakaTextTrack(true)\n } else {\n this._player.setTextTrackVisibility(false)\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n\n\n\n// WEBPACK FOOTER //\n// ./src/clappr-dash-shaka-playback.js","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"amd\":\"clappr\",\"commonjs\":\"clappr\",\"commonjs2\":\"clappr\",\"root\":\"Clappr\"}\n// module id = 1\n// module chunks = 0","(function(){var innerGlobal=typeof window!=\"undefined\"?window:global;var exportTo={};(function(window,global){var p,aa=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca=\"undefined\"!=typeof window&&window===this?this:\"undefined\"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return\"jscomp_symbol_\"+(c||\"\")+b++}}();\nfunction fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol(\"iterator\"));\"function\"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return cg&&(g=Math.max(g+f,0));g=g}});ka(\"Array.prototype.find\",function(b){return b?b:function(b,d){return Pa(this,b,d).ee}});var Sa=this;Sa.a=!0;\nfunction z(b,c){var d=b.split(\".\"),e=Sa;d[0]in e||!e.execScript||e.execScript(\"var \"+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ng=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*\n\n Copyright 2016 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\nfunction Ua(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Ua(2);this.c=new Ua(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\\/\\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(db(this,b.sa),this.Xa=b.Xa,this.oa=b.oa,hb(this,b.tb),this.fa=b.fa,ib(this,b.a.clone()),this.Oa=b.Oa):b&&(c=String(b).match(bb))?(db(this,c[1]||\"\",!0),this.Xa=jb(c[2]||\"\"),this.oa=jb(c[3]||\"\",!0),hb(this,c[4]),this.fa=jb(c[5]||\"\",!0),ib(this,c[6]||\"\",!0),this.Oa=jb(c[7]||\"\")):this.a=new kb(null)}p=cb.prototype;p.sa=\"\";p.Xa=\"\";p.oa=\"\";p.tb=null;p.fa=\"\";p.Oa=\"\";\np.toString=function(){var b=[],c=this.sa;c&&b.push(lb(c,mb,!0),\":\");if(c=this.oa){b.push(\"//\");var d=this.Xa;d&&b.push(lb(d,mb,!0),\"@\");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,\"%$1\"));c=this.tb;null!=c&&b.push(\":\",String(c))}if(c=this.fa)this.oa&&\"/\"!=c.charAt(0)&&b.push(\"/\"),b.push(lb(c,\"/\"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push(\"?\",c);(c=this.Oa)&&b.push(\"#\",lb(c,pb));return b.join(\"\")};\np.resolve=function(b){var c=this.clone();\"data\"===c.sa&&(c=new cb);var d=!!b.sa;d?db(c,b.sa):d=!!b.Xa;d?c.Xa=b.Xa:d=!!b.oa;d?c.oa=b.oa:d=null!=b.tb;var e=b.fa;if(d)hb(c,b.tb);else if(d=!!b.fa){if(\"/\"!=e.charAt(0))if(this.oa&&!this.fa)e=\"/\"+e;else{var f=c.fa.lastIndexOf(\"/\");-1!=f&&(e=c.fa.substr(0,f+1)+e)}if(\"..\"==e||\".\"==e)e=\"\";else if(-1!=e.indexOf(\"./\")||-1!=e.indexOf(\"/.\")){f=0==e.lastIndexOf(\"/\",0);e=e.split(\"/\");for(var g=[],h=0;hc)throw Error(\"Bad port number \"+c);b.tb=c}else b.tb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}\nfunction jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):\"\"}function lb(b,c,d){return\"string\"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),b):null}function rb(b){b=b.charCodeAt(0);return\"%\"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\\/\\?@]/g,ob=/[#\\?:]/g,nb=/[#\\?]/g,qb=/[#\\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ea=null;p.Xb=null;\np.add=function(b,c){if(!this.ea&&(this.ea={},this.Xb=0,this.a))for(var d=this.a.split(\"&\"),e=0;e=b.i)if(b.c)b.a=1,b.b=b.f;else return d[\"return\"](Promise.reject());e=b.a;b.a++;if(0==e)return d[\"return\"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function ub(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g=e.priority)Qb[b]={priority:d,uf:c}}K.registerScheme=Rb;K.unregisterScheme=function(b){delete Qb[b]};K.prototype.wf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.wf;\nK.prototype.bg=function(b){this.a[\"delete\"](b)};K.prototype.unregisterRequestFilter=K.prototype.bg;K.prototype.re=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.re;K.prototype.xf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.xf;K.prototype.cg=function(b){this.b[\"delete\"](b)};K.prototype.unregisterResponseFilter=K.prototype.cg;K.prototype.se=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.se;\nfunction Sb(b,c){return{uris:b,method:\"GET\",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;\nK.prototype.request=function(b,c){var d=this,e=new Tb;if(this.f){var f=Promise.reject(new D(2,7,7001));f[\"catch\"](function(){});return new Ub(f,function(){return Promise.resolve()},e)}c.method=c.method||\"GET\";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Ib(c.retryParameters):ub();c.uris=Ib(c.uris);f=Vb(this,b,c);var g=f.T(function(){return Wb(d,b,c,new tb(c.retryParameters,!1),0,null,e)}),h=g.T(function(c){return Xb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},\nfunction(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.T(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ue||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Ub(f.promise,f.Fd,e);Ob(this.g,f);return f};K.prototype.request=K.prototype.request;\nfunction Vb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={$c:f.$c},g=b.next())f.$c=g.value,e=e.T(function(b){return function(){return b.$c(c,d)}}(f));return e.T(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}\nfunction Wb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.sa,m=!1;l||(l=location.protocol,l=l.slice(0,-1),db(k,l),d.uris[f]=k.toString());var n=(l=Qb[l])?l.uf:null;if(!n)return Ab(new D(2,1,1E3,k));var q;return Db(zb(e)).T(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).T(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ue:m}},function(h){if(h&&7001==h.code)throw h;if(b.f)return Bb();if(h&&1==h.severity)return b.dispatchEvent(new I(\"retry\",\n{error:h instanceof D?h:null})),f=(f+1)%d.uris.length,Wb(b,c,d,e,f,h);throw h||g;})}function Xb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.T(f.value.bind(null,c,d.response));return e.T(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Tb(){this.a=0}K.NumBytesRemainingClass=Tb;function Ub(b,c,d){H.call(this,b,c);this.b=d}var Yb=Ub;Yb.prototype=ma(H.prototype);\nYb.prototype.constructor=Yb;if(sa)sa(Yb,H);else for(var Zb in H)if(\"prototype\"!=Zb)if(Object.defineProperties){var $b=Object.getOwnPropertyDescriptor(H,Zb);$b&&Object.defineProperty(Yb,Zb,$b)}else Yb[Zb]=H[Zb];Yb.$f=H.prototype;K.PendingRequest=Ub;Ub.all=Eb;Ub.notAbortable=Db;Ub.completed=Cb;Ub.aborted=Bb;Ub.failed=Ab;function ac(){this.b=new Hb}ac.prototype.a=function(){bc(this);this.b=null};function L(b,c,d,e){b.b&&(c=new cc(c,d,e),b.b.push(d,c))}function dc(b,c,d,e){function f(g){b.ma(c,d,f);e(g)}L(b,c,d,f)}ac.prototype.ma=function(b,c,d){if(this.b)for(var e=this.b.get(c)||[],f=0;f=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return uc(b,!1);if(0==c[1]&&0==c[3])return uc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return sc(b);throw new D(2,2,2003);}z(\"shaka.util.StringUtils.fromBytesAutoDetect\",xc);\nfunction yc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;dd&&(d+=Math.pow(2,32));d=\"0x\"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}\np.Nd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ja?this.F.push(b):Uc(this,b)};\nfunction Uc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];\"individualization-request\"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Sb([f],b.f.retryParameters);f.body=c.message;f.method=\"POST\";f.licenseRequestType=c.messageType;\"com.microsoft.playready\"!=b.a.keySystem&&\"com.chromecast.playready\"!=b.a.keySystem||ed(f);b.a.keySystem.startsWith(\"com.apple.fps\")&&fd(f);b.w.nb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();\nthis.a.keySystem.startsWith(\"com.apple.fps\")&&gd(b);return d.update(b.data).then(function(){var b=this;this.w.onEvent(new I(\"drmsessionupdate\"));e&&(e.ua&&e.ua.resolve(),(new B(function(){e.loaded=!0;dd(b)&&b.j.resolve()})).O(hd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))[\"catch\"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))}\nfunction ed(b){var c=uc(b.body,!0,!0);if(c.includes(\"PlayReadyKeyMessage\")){c=(new DOMParser).parseFromString(c,\"application/xml\");for(var d=c.getElementsByTagName(\"HttpHeader\"),e=0;e\"===c.substr(0,5)&&\"\"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Bc(c).buffer}\np.Ld=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if(\"string\"==typeof e){var f=e;e=b;b=f}if(\"com.microsoft.playready\"==this.a.keySystem&&16==e.byteLength&&!pc(\"Tizen\")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}\"com.microsoft.playready\"==this.a.keySystem&&\"status-pending\"==b&&(b=\"usable\");\"status-pending\"!=b&&(c.loaded=!0);\"expired\"==b&&(d=!0);f=Dc(new Uint8Array(e));\nthis.ka.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ua&&(this.b[\"delete\"](b),b.close()[\"catch\"](function(){}));dd(this)&&(this.j.resolve(),this.K.O(id))};function Hc(b){var c=b.ka,d=b.S;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return\"expired\"==b})&&b.g(new D(2,6,6014));b.w.gc(hc(d))}\nfunction jd(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.l){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes(\"persistent-license\"):!1,pc(\"Tizen 3\")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Aa(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs=\"avc1.42E01E\"'},{contentType:'video/webm; codecs=\"vp8\"'}],d=[{videoCapabilities:c,\npersistentState:\"required\",sessionTypes:[\"persistent-license\"]},{videoCapabilities:c}],e=new Map;c=\"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime\".split(\" \").map(function(c){return b(c)});return Promise.all(c).then(function(){return hc(e)})}\nfunction kd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!ad(b,ic(d.mimeType,d.codecs))||e&&e.encrypted&&!ad(b,ic(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}\nfunction ld(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;eb.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function qd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function rd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}\nfunction sd(b){if(!b)return[];for(var c=[],d=0;d>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Cd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}\nyd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};yd.prototype.h=function(){var b={data:Fc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Dd(b,c,d){this.startTime=b;this.direction=Ed;this.endTime=c;this.payload=d;this.region=new Fd;this.position=null;this.positionAlign=Gd;this.size=100;this.textAlign=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight=\"\";this.lineAlign=Kd;this.displayAlign=Ld;this.backgroundColor=this.color=\"\";this.backgroundImage=null;this.fontSize=\"\";this.fontWeight=Md;this.fontStyle=Nd;this.fontFamily=\"\";this.textDecoration=[];this.wrapLine=!0;this.id=\"\"}z(\"shaka.text.Cue\",Dd);\nvar Gd=\"auto\";Dd.positionAlign={LEFT:\"line-left\",RIGHT:\"line-right\",CENTER:\"center\",AUTO:Gd};var Hd=\"center\",Od={LEFT:\"left\",RIGHT:\"right\",CENTER:Hd,START:\"start\",END:\"end\"};Dd.textAlign=Od;var Ld=\"after\",Pd={BEFORE:\"before\",CENTER:\"center\",AFTER:Ld};Dd.displayAlign=Pd;var Ed=\"ltr\";Dd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ed,HORIZONTAL_RIGHT_TO_LEFT:\"rtl\"};var Id=\"horizontal-tb\";Dd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:\"vertical-lr\",VERTICAL_RIGHT_TO_LEFT:\"vertical-rl\"};\nvar Jd=0;Dd.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd=\"start\",Qd={CENTER:\"center\",START:Kd,END:\"end\"};Dd.lineAlign=Qd;var Md=400;Dd.fontWeight={NORMAL:Md,BOLD:700};var Nd=\"normal\",Rd={NORMAL:Nd,ITALIC:\"italic\",OBLIQUE:\"oblique\"};Dd.fontStyle=Rd;Dd.textDecoration={UNDERLINE:\"underline\",LINE_THROUGH:\"lineThrough\",OVERLINE:\"overline\"};\nfunction Fd(){this.id=\"\";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sd;this.scroll=Td}z(\"shaka.text.CueRegion\",Fd);var Sd=1;Fd.units={PX:0,PERCENTAGE:Sd,LINES:2};var Td=\"\";Fd.scrollMode={NONE:Td,UP:\"up\"};function Ud(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.j=\"\";this.i=new Map}var Vd={};z(\"shaka.text.TextEngine.registerParser\",function(b,c){Vd[b]=c});z(\"shaka.text.TextEngine.unregisterParser\",function(b){delete Vd[b]});function Wd(b){return Vd[b]||window.muxjs&&\"application/cea-608\"==b?!0:!1}Ud.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function Xd(b,c){\"application/cea-608\"!=c&&(b.g=new Vd[c])}\nUd.prototype.Gc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};\nfunction Yd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&cthis.a&&c>=this.b&&(this.b=b))}.bind(this))};Ud.prototype.me=function(b){this.c.append(b)};Ud.prototype.appendCues=Ud.prototype.me;\nUd.prototype.nc=function(b,c){this.j=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Ud.prototype.setSelectedClosedCaptionId=Ud.prototype.nc;\nfunction Zd(b,c,d,e,f){var g=d+\" \"+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTimed.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function fe(b,c){return\"text\"==c?b.a.b:pd(ee(b,c))}function ge(b,c,d){if(\"text\"==c)return b=b.a,null==b.b||b.bc&&(c+=.001);this.b[b].timestampOffset=c;this.qb(b)};p.Kf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.qb(b)};\np.Sf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.qb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),me(this,b))};function ie(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){\"QuotaExceededError\"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),me(b,c)}return d.p}\nfunction le(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)me(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function me(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),me(b,c)}};function ne(b,c){b=M(b);c=M(c);return b.split(\"-\")[0]==c.split(\"-\")[0]}function oe(b,c){b=M(b);c=M(c);var d=b.split(\"-\"),e=c.split(\"-\");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split(\"-\");b=c[0]||\"\";c=c[1]||\"\";b=b.toLowerCase();b=pe.get(b)||b;return(c=c.toUpperCase())?b+\"-\"+c:b}function qe(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):\"und\"}\nfunction re(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,oe(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split(\"-\");k=k.split(\"-\");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,oe(d,f))return f;return null}\nvar pe=new Map([[\"aar\",\"aa\"],[\"abk\",\"ab\"],[\"afr\",\"af\"],[\"aka\",\"ak\"],[\"alb\",\"sq\"],[\"amh\",\"am\"],[\"ara\",\"ar\"],[\"arg\",\"an\"],[\"arm\",\"hy\"],[\"asm\",\"as\"],[\"ava\",\"av\"],[\"ave\",\"ae\"],[\"aym\",\"ay\"],[\"aze\",\"az\"],[\"bak\",\"ba\"],[\"bam\",\"bm\"],[\"baq\",\"eu\"],[\"bel\",\"be\"],[\"ben\",\"bn\"],[\"bih\",\"bh\"],[\"bis\",\"bi\"],[\"bod\",\"bo\"],[\"bos\",\"bs\"],[\"bre\",\"br\"],[\"bul\",\"bg\"],[\"bur\",\"my\"],[\"cat\",\"ca\"],[\"ces\",\"cs\"],[\"cha\",\"ch\"],[\"che\",\"ce\"],[\"chi\",\"zh\"],[\"chu\",\"cu\"],[\"chv\",\"cv\"],[\"cor\",\"kw\"],[\"cos\",\"co\"],[\"cre\",\"cr\"],[\"cym\",\"cy\"],[\"cze\",\n\"cs\"],[\"dan\",\"da\"],[\"deu\",\"de\"],[\"div\",\"dv\"],[\"dut\",\"nl\"],[\"dzo\",\"dz\"],[\"ell\",\"el\"],[\"eng\",\"en\"],[\"epo\",\"eo\"],[\"est\",\"et\"],[\"eus\",\"eu\"],[\"ewe\",\"ee\"],[\"fao\",\"fo\"],[\"fas\",\"fa\"],[\"fij\",\"fj\"],[\"fin\",\"fi\"],[\"fra\",\"fr\"],[\"fre\",\"fr\"],[\"fry\",\"fy\"],[\"ful\",\"ff\"],[\"geo\",\"ka\"],[\"ger\",\"de\"],[\"gla\",\"gd\"],[\"gle\",\"ga\"],[\"glg\",\"gl\"],[\"glv\",\"gv\"],[\"gre\",\"el\"],[\"grn\",\"gn\"],[\"guj\",\"gu\"],[\"hat\",\"ht\"],[\"hau\",\"ha\"],[\"heb\",\"he\"],[\"her\",\"hz\"],[\"hin\",\"hi\"],[\"hmo\",\"ho\"],[\"hrv\",\"hr\"],[\"hun\",\"hu\"],[\"hye\",\"hy\"],[\"ibo\",\"ig\"],[\"ice\",\n\"is\"],[\"ido\",\"io\"],[\"iii\",\"ii\"],[\"iku\",\"iu\"],[\"ile\",\"ie\"],[\"ina\",\"ia\"],[\"ind\",\"id\"],[\"ipk\",\"ik\"],[\"isl\",\"is\"],[\"ita\",\"it\"],[\"jav\",\"jv\"],[\"jpn\",\"ja\"],[\"kal\",\"kl\"],[\"kan\",\"kn\"],[\"kas\",\"ks\"],[\"kat\",\"ka\"],[\"kau\",\"kr\"],[\"kaz\",\"kk\"],[\"khm\",\"km\"],[\"kik\",\"ki\"],[\"kin\",\"rw\"],[\"kir\",\"ky\"],[\"kom\",\"kv\"],[\"kon\",\"kg\"],[\"kor\",\"ko\"],[\"kua\",\"kj\"],[\"kur\",\"ku\"],[\"lao\",\"lo\"],[\"lat\",\"la\"],[\"lav\",\"lv\"],[\"lim\",\"li\"],[\"lin\",\"ln\"],[\"lit\",\"lt\"],[\"ltz\",\"lb\"],[\"lub\",\"lu\"],[\"lug\",\"lg\"],[\"mac\",\"mk\"],[\"mah\",\"mh\"],[\"mal\",\"ml\"],[\"mao\",\n\"mi\"],[\"mar\",\"mr\"],[\"may\",\"ms\"],[\"mkd\",\"mk\"],[\"mlg\",\"mg\"],[\"mlt\",\"mt\"],[\"mon\",\"mn\"],[\"mri\",\"mi\"],[\"msa\",\"ms\"],[\"mya\",\"my\"],[\"nau\",\"na\"],[\"nav\",\"nv\"],[\"nbl\",\"nr\"],[\"nde\",\"nd\"],[\"ndo\",\"ng\"],[\"nep\",\"ne\"],[\"nld\",\"nl\"],[\"nno\",\"nn\"],[\"nob\",\"nb\"],[\"nor\",\"no\"],[\"nya\",\"ny\"],[\"oci\",\"oc\"],[\"oji\",\"oj\"],[\"ori\",\"or\"],[\"orm\",\"om\"],[\"oss\",\"os\"],[\"pan\",\"pa\"],[\"per\",\"fa\"],[\"pli\",\"pi\"],[\"pol\",\"pl\"],[\"por\",\"pt\"],[\"pus\",\"ps\"],[\"que\",\"qu\"],[\"roh\",\"rm\"],[\"ron\",\"ro\"],[\"rum\",\"ro\"],[\"run\",\"rn\"],[\"rus\",\"ru\"],[\"sag\",\"sg\"],[\"san\",\n\"sa\"],[\"sin\",\"si\"],[\"slk\",\"sk\"],[\"slo\",\"sk\"],[\"slv\",\"sl\"],[\"sme\",\"se\"],[\"smo\",\"sm\"],[\"sna\",\"sn\"],[\"snd\",\"sd\"],[\"som\",\"so\"],[\"sot\",\"st\"],[\"spa\",\"es\"],[\"sqi\",\"sq\"],[\"srd\",\"sc\"],[\"srp\",\"sr\"],[\"ssw\",\"ss\"],[\"sun\",\"su\"],[\"swa\",\"sw\"],[\"swe\",\"sv\"],[\"tah\",\"ty\"],[\"tam\",\"ta\"],[\"tat\",\"tt\"],[\"tel\",\"te\"],[\"tgk\",\"tg\"],[\"tgl\",\"tl\"],[\"tha\",\"th\"],[\"tib\",\"bo\"],[\"tir\",\"ti\"],[\"ton\",\"to\"],[\"tsn\",\"tn\"],[\"tso\",\"ts\"],[\"tuk\",\"tk\"],[\"tur\",\"tr\"],[\"twi\",\"tw\"],[\"uig\",\"ug\"],[\"ukr\",\"uk\"],[\"urd\",\"ur\"],[\"uzb\",\"uz\"],[\"ven\",\"ve\"],[\"vie\",\n\"vi\"],[\"vol\",\"vo\"],[\"wel\",\"cy\"],[\"wln\",\"wa\"],[\"wol\",\"wo\"],[\"xho\",\"xh\"],[\"yid\",\"yi\"],[\"yor\",\"yo\"],[\"zha\",\"za\"],[\"zho\",\"zh\"],[\"zul\",\"zu\"]]);function se(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function te(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=se(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}\nfunction ue(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.N&&!kd(b,e))return!1;var f=e.audio;e=e.video;return f&&!be(f)||e&&!be(e)||f&&c&&!ve(f,c)||e&&d&&!ve(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Wd(ic(b.mimeType,b.codecs))})}function ve(b,c){return b.mimeType!=c.mimeType||b.codecs.split(\".\")[0]!=c.codecs.split(\".\")[0]?!1:!0}\nfunction we(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:\"variant\",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(\", \"),\naudioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||\nnull,b.label=c.label,b.audioRoles=c.roles);return b}function xe(b){return{id:b.id,active:!1,type:\"text\",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}\nfunction ye(b){b.__shaka_id||(b.__shaka_id=ze++);return b.__shaka_id}var ze=0;function Ae(b){return{id:ye(b),active:!1,type:\"\",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}\nfunction Be(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ce(b){return b.filter(function(b){return Be(b)})}\nfunction De(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}\nfunction Ee(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:\"\";e=e.filter(function(b){return b.language==g});if(c){var h=re(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Fe(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(td.uc,[]);return b.length?Fe(e,b[0]):e}\nfunction Fe(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Ge(b,c,d){for(var e=0;e=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};\nN.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Wa(d.b,f,e);Wa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};\nN.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;\nfunction Ie(b,c){b&&(c=c.filter(function(c){return se(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Je(b,c){this.a=b;this.b=c}Je.prototype.toString=function(){return\"v\"+this.a+\".\"+this.b};function Ke(b,c){var d=new Je(2,6),e=Le,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Me(b,c,d,e){$a([d,\"has been deprecated and will be removed in\",c,\". We are currently at version\",b,\". Additional information:\",e].join(\" \"))}function Ne(b,c,d,e){Za([d,\"has been deprecated and has been removed in\",c,\". We are now at version\",b,\". Additional information:\",e].join(\"\"))}var Le=null;var Oe=\"ended play playing pause pausing ratechange seeked seeking timeupdate volumechange\".split(\" \"),Pe=\"buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume\".split(\" \"),Qe=[\"loop\",\"playbackRate\"],Re=[\"pause\",\"play\"],Se=\"abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged\".split(\" \"),Te={getAssetUri:2,\ngetAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Ue={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ve=[[\"getConfiguration\",\"configure\"]],We=[[\"isTextTrackVisible\",\"setTextTrackVisibility\"]],\nXe=\"addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay\".split(\" \"),Ye=[\"attach\",\"detach\",\"load\",\"unload\"];\nfunction Ze(b){return JSON.stringify(b,function(b,d){if(\"function\"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&\"object\"==typeof g?\"detail\"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:\"TimeRanges\",length:d.length,start:[],end:[]},f=0;fd?\"-Infinity\":\"Infinity\":d;return c}})}function $e(b){return JSON.parse(b,function(b,d){return\"NaN\"==d?NaN:\"-Infinity\"==d?-Infinity:\"Infinity\"==d?Infinity:d&&\"object\"==typeof d&&\"TimeRanges\"==d.__type__?af(d):d&&\"object\"==typeof d&&\"Uint8Array\"==d.__type__?new Uint8Array(d.entries):d})}function af(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function bf(b,c,d,e,f,g){this.N=b;this.f=new B(c);this.S=d;this.j=!1;this.F=e;this.K=f;this.w=g;this.b=this.h=!1;this.C=\"\";this.i=null;this.m=this.Jd.bind(this);this.o=this.ef.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var cf=!1,df=null;p=bf.prototype;p.destroy=function(){ef(this);df&&ff(this);this.f&&(this.f.stop(),this.f=null);this.K=this.F=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.da=function(){return this.b};\np.Xc=function(){return this.C};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.oc();var b=new chrome.cast.SessionRequest(this.N);b=new chrome.cast.ApiConfig(b,this.Kd.bind(this),this.jf.bind(this),\"origin_scoped\");chrome.cast.initialize(b,function(){},function(){});cf&&this.f.O(.02);(b=df)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Kd(b):df=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};\np.cd=function(b){this.i=b;this.b&&gf({type:\"appData\",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!cf)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Vc.bind(this,b),this.Id.bind(this));return this.g};p.Zb=function(){this.b&&(ef(this),df&&(ff(this),df.stop(function(){},function(){}),df=null))};\np.get=function(b,c){if(\"video\"==b){if(Re.includes(c))return this.Ud.bind(this,b,c)}else if(\"player\"==b){if(Ue[c]&&!this.get(\"player\",\"isLive\")())return function(){};if(Xe.includes(c))return this.Ud.bind(this,b,c);if(Ye.includes(c))return this.zf.bind(this,b,c);if(Te[c])return this.Rd.bind(this,b,c)}return this.Rd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;gf({type:\"set\",targetName:b,property:c,value:d})};\np.Vc=function(b,c){df=c;c.addUpdateListener(this.m);c.addMessageListener(\"urn:x-cast:com.google.shaka.v2\",this.o);this.Jd();gf({type:\"init\",initState:b,appData:this.i});this.g.resolve()};p.Id=function(b){var c=8003;switch(b.code){case \"cancel\":c=8004;break;case \"timeout\":c=8005;break;case \"receiver_unavailable\":c=8006}this.g.reject(new D(2,8,c,b))};p.Rd=function(b,c){return this.a[b][c]};\np.Ud=function(b,c,d){for(var e=[],f=2;f LA_URL\"))?b.textContent:\"\"}\nfunction wf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=tf.get(f.Xd);if(g){var h=vd(g,f.init||b);if(g=Af.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}\nvar Af=(new Map).set(\"com.widevine.alpha\",function(b){return(b=P.td(b.node,\"urn:microsoft\",\"laurl\"))?b.getAttribute(\"licenseUrl\")||\"\":\"\"}).set(\"com.microsoft.playready\",function(b){b=P.td(b.node,\"urn:microsoft:playready\",\"pro\");if(!b)return\"\";b=Bc(b.textContent);b=yf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return\"\";b=uc(b.value,!0);return(b=P.Pd(b,\"WRMHEADER\"))?zf(b):\"\"});function vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Bf(d.value))&&c.push(d);return c}\nfunction Bf(b){var c=b.getAttribute(\"schemeIdUri\"),d=P.getAttributeNS(b,\"urn:mpeg:cenc:2013\",\"default_KID\"),e=P.ud(b,\"urn:mpeg:cenc:2013\",\"pssh\").map(P.ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,\"\").toLowerCase(),d.includes(\" \")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:\"cenc\",initData:Bc(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,Xd:c,keyId:d,init:0x)if(q+1=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0this.I.byteLength&&Kf();var c=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Va;\nR.prototype.J=function(b){this.a+b>this.I.byteLength&&Kf();this.a+=b};R.prototype.skip=R.prototype.J;R.prototype.Wd=function(b){this.ab||b>this.I.byteLength)&&Kf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.Wc=function(){for(var b=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.I.buffer,this.I.byteOffset+b,this.a-b);this.a+=1;return sc(b)};\nR.prototype.readTerminatedString=R.prototype.Wc;function Kf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z(\"shaka.util.Mp4Parser\",S);S.prototype.G=function(b,c){var d=Lf(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.G;S.prototype.ca=function(b,c){var d=Lf(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ca;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;\nS.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.pa()&&!this.a;)this.ic(0,d,c)};S.prototype.parse=S.prototype.parse;\nS.prototype.ic=function(b,c,d){var e=c.aa(),f=c.D(),g=c.D();switch(f){case 0:f=c.I.byteLength-e;break;case 1:f=c.ub()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.D(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.I.byteLength&&(g=c.I.byteLength);g-=c.aa();c=0>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Pf;function Qf(b,c,d,e){var f,g=(new S).ca(\"sidx\",function(b){f=Rf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}\nfunction Rf(b,c,d,e){var f=[];e.reader.J(4);var g=e.reader.D();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.D();var k=e.reader.D()}else h=e.reader.ub(),k=e.reader.ub();e.reader.J(2);var l=e.reader.Jb();b=b+e.size+k;for(k=0;k>>31;m&=2147483647;var q=e.reader.D();e.reader.J(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z(\"shaka.media.SegmentIndex\",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&bb||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;cg.startTime?0==d&&c.push(g):(.1b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.zc;function Sf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Tf(b){this.b=b;this.a=new R(b,0);Uf||(Uf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Uf;Tf.prototype.pa=function(){return this.a.pa()};\nfunction Vf(b){var c=Wf(b);if(7=d&&!(c&1<<8-d);d++);if(8b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Cf(h,l,b+f,k,c*g);return ud(m,[d])},0,null)}}}\nfunction ng(b,c){for(var d=[],e=0;eb.o||b.i.O(Math.max(3,b.o-c,Xa(b.v)))}\nfunction xg(b,c,d){c=c||{contentType:\"\",mimeType:\"\",codecs:\"\",emsgSchemeIdUris:[],frameRate:void 0,Sc:null};d=d||c.la;var e=P.rb,f=P.ve,g=P.P(b,\"BaseURL\").map(P.ac),h=b.getAttribute(\"contentType\")||c.contentType,k=b.getAttribute(\"mimeType\")||c.mimeType,l=b.getAttribute(\"codecs\")||c.codecs;f=P.H(b,\"frameRate\",f)||c.frameRate;var m=P.P(b,\"InbandEventStream\"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute(\"schemeIdUri\"),n.includes(q)||n.push(q);m=P.P(b,\n\"AudioChannelConfiguration\");m=Cg(m)||c.Sc;h||(h=Ag(k,l));return{la:ud(d,g),Lb:P.Yb(b,\"SegmentBase\")||c.Lb,Ga:P.Yb(b,\"SegmentList\")||c.Ga,Nb:P.Yb(b,\"SegmentTemplate\")||c.Nb,width:P.H(b,\"width\",e)||c.width,height:P.H(b,\"height\",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute(\"id\"),Sc:m}}\nfunction Cg(b){for(var c=0;c>=1;return b}}}return null}function Bg(b){var c=b.Lb?1:0;c+=b.Ga?1:0;c+=b.Nb?1:0;if(0==c)return\"text\"==b.contentType||\"application\"==b.contentType?!0:!1;1!=c&&(b.Lb&&(b.Ga=null),b.Nb=null);return!0}\nfunction Dg(b,c,d,e){c=ud(c,[d]);c=Sb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Ob(b.g,c);return c.promise.then(function(b){if(\"HEAD\"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=sc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}\nfunction wg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute(\"schemeIdUri\"),value:b.getAttribute(\"value\")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:\"urn:mpeg:dash:utc:http-head:2014\",value:e});return td.te(d,function(b){var d=b.scheme;b=b.value;switch(d){case \"urn:mpeg:dash:utc:http-head:2014\":case \"urn:mpeg:dash:utc:http-head:2012\":return Dg(this,c,b,\"HEAD\");case \"urn:mpeg:dash:utc:http-xsdate:2014\":case \"urn:mpeg:dash:utc:http-iso:2014\":case \"urn:mpeg:dash:utc:http-xsdate:2012\":case \"urn:mpeg:dash:utc:http-iso:2012\":return Dg(this,\nc,b,\"GET\");case \"urn:mpeg:dash:utc:direct:2014\":case \"urn:mpeg:dash:utc:direct:2012\":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case \"urn:mpeg:dash:utc:http-ntp:2014\":case \"urn:mpeg:dash:utc:ntp:2014\":case \"urn:mpeg:dash:utc:sntp:2014\":return $a(\"NTP UTCTiming scheme is not supported\"),Promise.reject();default:return $a(\"Unrecognized scheme in UTCTiming element\",d),Promise.reject()}}.bind(b))[\"catch\"](function(){$a(\"A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!\");\nreturn 0})}p.rf=function(b,c,d){var e=P.rb,f=d.getAttribute(\"schemeIdUri\")||\"\",g=d.getAttribute(\"value\")||\"\",h=P.H(d,\"timescale\",e)||1;P.P(d,\"Event\").forEach(function(d){var k=P.H(d,\"presentationTime\",e)||0,m=P.H(d,\"duration\",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute(\"id\")||\"\",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};\np.Cf=function(b,c,d){b=og(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Ob(this.g,b);return b.promise.then(function(b){return b.data})};function Ag(b,c){return Wd(ic(b,c))?\"text\":b.split(\"/\")[0]}U.Zc(\"mpd\",pg);U.Kb(\"application/dash+xml\",pg);function Eg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Fg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Fg.prototype.toString=function(){function b(b){return b.name+\"=\"+(isNaN(Number(b.value))?'\"'+b.value+'\"':b.value)}var c=\"#\"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0c.length||\"data\"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(\":\").split(\",\");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(\",\"));d=d.split(\";\");var e=null;1w.Pc&&(w.stream.presentationTimeOffset=-x,w.Mb.offset(x))}else for(b.b.ta(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset=\nh,A.Mb.offset(-h),Sf(A.Mb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}\nfunction dh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.l){case 1:return f=Jg,g=td,h=c.a,k=f.hb(c.a,\"EXT-X-MEDIA\"),l=k.filter(function(b){return\"SUBTITLES\"==fh(b,\"TYPE\")}.bind(b)),m=l.map(function(b){return gh(this,b)}.bind(b)),n=k.filter(function(b){return\"CLOSED-CAPTIONS\"==fh(b,\"TYPE\")}),hh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.hb(h,\"EXT-X-STREAM-INF\"),w=x.map(function(b){return ih(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=\ne.s,C=A.reduce(g.uc,[]),C=C.filter(function(b){return null!=b}),e[\"return\"]({startTime:0,variants:C,textStreams:q})}})})}\nfunction ih(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb,fb;return y(f,function(f){switch(f.l){case 1:g=wd;h=Jg;k=Hg(c,\"CODECS\",\"avc1.42E01E,mp4a.40.2\");l=jh(k.split(/\\s*,\\s*/));m=c.getAttribute(\"RESOLUTION\");q=n=null;x=Hg(c,\"FRAME-RATE\");w=Number(fh(c,\"BANDWIDTH\"));m&&(A=m.value.split(\"x\"),n=A[0],q=A[1]);C=h.hb(d.a,\"EXT-X-MEDIA\");C=C.filter(function(b){return\"CLOSED-CAPTIONS\"!=fh(b,\"TYPE\")});C=C.filter(function(b){var c=Hg(b,\"URI\")||\"\";return\"SUBTITLES\"==\n(Hg(b,\"TYPE\")||\"\")||\"\"!=c});E=Hg(c,\"AUDIO\");F=Hg(c,\"VIDEO\");E?C=h.Cc(C,\"AUDIO\",E):F&&(C=h.Cc(C,\"VIDEO\",F));if(V=kh(g.na,l)){if(Y=Hg(c,\"SUBTITLES\"))wa=h.Cc(C,\"SUBTITLES\",Y),wa.length&&(Ba=b.C.get(wa[0].id),Ba.stream.codecs=V);Kb(l,V)}ba=C.map(function(b){return lh(this,b,l)}.bind(b));na=[];xa=[];return u(f,Promise.all(ba),2);case 2:Va=f.s;Va=Va.filter(function(b){return null!=b});E?na=Va:F&&(xa=Va);vb=!1;na.length||xa.length?na.length?(eb=fh(c,\"URI\"),fb=na[0].pc,eb==fb?(Ca=g.wb,vb=!0):Ca=g.La):Ca=\ng.wb:1==l.length?(Ia=kh(g.La,l),Ca=m||x||Ia?g.La:g.wb):(Ca=g.La,l=[l.join(\",\")]);if(vb){f.A(3);break}return u(f,mh(b,c,l,Ca),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.wb?na=[ja]:xa=[ja];else if(null===ja)return f[\"return\"]([]);xa&&nh(xa);na&&nh(na);return f[\"return\"](oh(b,na,xa,w,n,q,x))}})})}function nh(b){b.forEach(function(b){var c=b.stream.codecs.split(\",\");c=c.filter(function(b){return\"mp4a.40.34\"!=b});b.stream.codecs=c.join(\",\")})}\nfunction oh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.pc:\"\")+\" - \"+(l?l.pc:\"\");var C=void 0;if(n&&x)if(w.length&&A.length?0>4,0!=e&&2!=e||c(),3==e&&(e=b.ha(),b.J(e)),1!=b.D()>>8)b.seek(d+188),e=b.ha(),71!=e&&(b.seek(d+192),e=b.ha()),71!=e&&(b.seek(d+204),e=b.ha()),71!=e&&c(),b.Wd(1);else return b.J(3),d=b.ha()>>6,0!=d&&1!=d||c(),0==b.ha()&&c(),d=b.ha(),e=b.Jb(),b=b.Jb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}\nfunction Dh(b,c,d){b=ic(b,c);if(!Wd(b))return 0;c=new Ud(null);Xd(c,b);return c.Gc(d)}function jh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=lc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function kh(b,c){for(var d=Eh[b],e=0;ef-.5)){c=!0;break a}}c=!1}return c};function Zh(b,c,d,e,f){var g=this;this.b=b;this.w=c;this.v=d;this.m=f;this.g=new ac;this.j=!1;this.o=b.readyState;this.f=!1;this.c=e;this.i=!1;L(this.g,b,\"waiting\",function(){return $h(g)});this.h=(new B(function(){$h(g)})).Ia(.25)}Zh.prototype.a=function(){this.g&&(this.g.a(),this.g=null);null!=this.h&&(this.h.stop(),this.h=null);this.c&&(this.c.a(),this.c=null);this.b=this.w=this.m=null};Zh.prototype.Uc=function(){this.i=!0;$h(this)};\nfunction $h(b){if(0!=b.b.readyState){if(b.b.seeking){if(!b.j)return}else b.j=!1;if(!b.b.paused){b.b.readyState!=b.o&&(b.f=!1,b.o=b.b.readyState);var c=b.v.smallGapLimit,d=b.b.currentTime,e=b.b.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=pc(\"Edge/\")||pc(\"Trident/\")||pc(\"Tizen\")||pc(\"CrKey\")?.5:.1;for(var g=0;gd&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.c){b=b.c;d=b.g;e=Wh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.c!=\nd||b.h!=e)b.f=f,b.c=d,b.h=e;d=f-b.f;d>=b.i&&e&&b.b(b.c,d)}}else if(0!=f||b.i){g=e.start(f);var h=b.w.wa();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.f||(b.f=!0,d=new I(\"largegap\",{currentTime:d,gapSize:h}),d.cancelable=!0,b.m(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.b.currentTime=g)}}}}};function ai(b){var c=this;this.f=b;this.b=new Set;this.c=(new B(function(){bi(c,!1)})).Ia(.25)}ai.prototype.a=function(){this.c.stop();for(var b=r(this.b),c=b.next();!c.done;c=b.next())c.value.a();this.b.clear()};function bi(b,c){for(var d=r(b.b),e=d.next();!e.done;e=d.next())e.value.h(b.f.currentTime,c)};function ci(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function di(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function ei(b){this.f=b;this.b=null;this.c=function(){}}ei.prototype.a=function(){this.b=this.f=null;this.c=function(){}};ei.prototype.h=function(b){var c=this.b,d=this.f.periods;b=di(d,b)||d[0];c!=b&&this.c(b);this.b=b};function fi(b,c){b.c=c};function gi(b){var c=this;this.b=b;this.g=!1;this.f=this.b.cc();this.c=new B(function(){c.b.Ed(.25*c.f)})}gi.prototype.a=function(){this.c&&(this.c.stop(),this.c=null);this.b=null};gi.prototype.set=function(b){this.f=b;hi(this)};function hi(b){b.c.stop();var c=b.g?0:b.f;0<=c?b.b.cc()!=c&&b.b.ed(c):(b.c.Ia(.25),0!=b.b.cc()&&b.b.ed(0))};function ii(b,c,d){this.b=b;this.g=c;this.h=d;this.c=new ac;this.f=new ji(b);0Math.abs(b.b.currentTime-c)?ni(b):(dc(b.c,b.b,\"seeking\",function(){ni(b)}),oi(b.f,0==b.b.currentTime?c:b.b.currentTime))}function ni(b){L(b.c,b.b,\"seeking\",function(){return b.g()})}function ji(b){var c=this;this.c=b;this.i=10;this.h=this.g=this.f=0;this.b=new B(function(){0>=c.f?c.b.stop():c.c.currentTime!=c.g?c.b.stop():(c.c.currentTime=c.h,c.f--)})}ji.prototype.a=function(){this.b&&(this.b.stop(),this.b=null);this.c=null};\nfunction oi(b,c){b.g=b.c.currentTime;b.h=c;b.f=b.i;b.c.currentTime=c;b.b.Ia(.1)};function pi(b){function c(){d.g=!0;null!=d.c&&(d.b.currentTime=d.c)}var d=this;this.b=b;this.g=!1;this.c=null;this.f=new ac;0==this.b.readyState?dc(this.f,this.b,\"loadedmetadata\",c):c()}pi.prototype.a=function(){this.f&&(this.f.a(),this.f=null);this.b=null};pi.prototype.o=function(b){this.c=this.g?this.c:b};pi.prototype.i=function(){return(this.g?this.b.currentTime:this.c)||0};pi.prototype.v=function(){};\nfunction qi(b,c,d,e,f,g){var h=this;this.c=b;this.b=c.presentationTimeline;this.C=c.minBufferTime||0;this.h=d;this.w=f;this.m=null;this.g=new Zh(b,c.presentationTimeline,d,ri(b,d),g);this.f=new ii(b,function(){a:{var b=h.g;b.j=!0;b.i=!1;b.f=!1;var c=mi(h.f);b=si(h,c);if(.001d-c&&(c=d-3);bb.b.Y()?b.b.ib():b.b.wa():0>c&&(c=b.b.wa()+c);return vi(b,ui(b,c))}qi.prototype.v=function(){this.g.Uc()};function vi(b,c){var d=b.b.Y();return c>=d?d-b.h.durationBackoff:c}function si(b,c){var d=qd.bind(null,b.c.buffered),e=Math.max(b.C,b.h.rebufferingGoal),f=b.h.safeSeekOffset,g=b.b.ib(),h=b.b.wa(),k=b.b.Y();3>h-g&&(g=h-3);var l=b.b.Cb(e),m=b.b.Cb(f);e=b.b.Cb(e+f);return c>=k?vi(b,c):c>h?h:c=l||d(c)?c:e}\nfunction ui(b,c){var d=b.b.ib();if(cd?d:c}function ri(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Vh(new Yh(b),c.stallThreshold);Xh(e,function(){b.currentTime+=d});return e};function wi(){this.c=function(){};this.b=new Set}wi.prototype.a=function(){this.c=function(){};this.b.clear()};function xi(b,c){b.c=c};function yi(b){var c=this;this.i=b;this.g=new Map;this.b=function(){};this.c=function(){};this.f=function(){};this.j=[{Za:null,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Ai,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Bi,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:zi,Ya:Ai,Sa:function(b,e){return c.c(b,e)}},{Za:zi,Ya:Bi,Sa:function(b,e){return c.c(b,e)}},{Za:Ai,Ya:Bi,Sa:function(b,e){return c.f(b,e)}},{Za:Bi,Ya:Ai,Sa:function(b,e){return c.f(b,e)}}]}\nyi.prototype.a=function(){this.i=null;this.g.clear();this.b=function(){};this.c=function(){};this.f=function(){}};yi.prototype.h=function(b,c){for(var d=r(this.i.b),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.g.get(e),g=be.endTime?Bi:zi;this.g.set(e,g);for(var h=r(this.j),k=h.next();!k.done;k=h.next())k=k.value,k.Za==f&&k.Ya==g&&k.Sa(e,c)}};function Ci(b,c,d,e){b.b=c;b.c=d;b.f=e}var Ai=1,zi=2,Bi=3;function Di(b,c){this.a=c;this.c=b;this.g=null;this.j=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.F=null;this.C=this.f=this.m=!1;this.w=0}Di.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Ei(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};\nDi.prototype.configure=function(b){this.g=b;this.F=new tb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};\nDi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.l){case 1:return e=b.a.Qa(),f=Fi(b,e),g=b.a.Hd(b.c.periods[f]),g.variant||g.text?u(d,Gi(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d[\"return\"](new D(2,5,5005));case 2:if(b.f)return d[\"return\"]();b.a&&b.a.bf&&b.a.bf();v(d)}})})};function Hi(b){return Ii(b,\"audio\")}function Ji(b){return Ii(b,\"video\")}\nfunction Ii(b,c){var d=b.b.get(c);return d?d.Fa||d.stream:null}function Ki(b,c){return t(function e(){var f,g,h,k,l,m,n,q;return y(e,function(e){switch(e.l){case 1:return f=wd,u(e,je(b.a.L,f.na),2);case 2:return b.w++,b.C=!1,g=b.w,h=b.a.L,k=new Map,l=new Set,k.set(f.na,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e[\"return\"]():u(e,Li(b,l),4);case 4:if(b.f)return e[\"return\"]();b.w!=g||b.b.has(f.na)||b.C||(m=b.a.Qa(),n=Fi(b,m),q=Mi(c,n,0),b.b.set(f.na,q),Ni(b,q,0));v(e)}})})}\nfunction Oi(b,c){var d=b.b.get(\"video\");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Fa&&(Pi(b,f,!1,0),d.Fa=e)}else if(e=d.Fa)d.Fa=null,Pi(b,e,!0,0)}}function Qi(b,c,d,e){c.video&&Pi(b,c.video,d,e);c.audio&&Pi(b,c.audio,d,e)}\nfunction Pi(b,c,d,e){var f=b.b.get(c.type);if(!f&&\"text\"==c.type&&b.g.ignoreTextStreamFailures)Ki(b,c);else if(f){var g=Ri(b,c);if(d&&g!=f.ya)b.b.forEach(function(c){Si(b,c)});else{f.Fa&&(c.trickModeVideo?(f.Fa=c,c=c.trickModeVideo):f.Fa=null);var h=b.h[g];h&&h.vb&&(h=b.i.get(c.id))&&h.vb&&f.stream!=c&&(\"text\"==c.type&&ce(b.a.L,ic(c.mimeType,c.codecs)),f.stream=c,f.ec=!0,Ti(b,f,g)&&f.Hb.abort(),d&&(f.Na?f.qc=!0:f.Ea?(f.Ja=!0,f.Wb=e,f.qc=!0):(Ei(f),Ui(b,f,!0,e))))}}}\nfunction Ti(b,c,d){if(!c.Hb)return!1;var e=b.a.Qa(),f=fe(b.a.L,c.type);b=(b=Vi(b,c,e,f,d))?b.a?b.a-b.b:null:null;if(null==b)return!1;(d=c.stream.initSegmentReference)&&(b+=(d.a?d.a-d.b:null)||0);return c.Hb.b.a>b}\nfunction Wi(b){function c(c){var f=b.a.L;\"text\"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&dc?b.a.L.ta(c):b.a.L.ta(Math.pow(2,32))}\nfunction Zi(b,c){if(!b.f&&!c.Ea&&null!=c.Ba&&!c.Na)if(c.Ba=null,c.Ja)Ui(b,c,c.qc,c.Wb);else{try{var d=$i(b,c);null!=d&&(Ni(b,c,d),c.Eb=!1)}catch(e){aj(b,e);return}d=Array.from(b.b.values());bj(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.L.endOfStream().then(function(){if(!this.f){var b=this.a.L.Y();b=b.c.presentationTimeline.Y())return c.endOfStream=!0,\"video\"==c.type&&(f=b.b.get(\"text\"))&&\"application/cea-608\"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.ya=h;if(h!=g)return null;\nif(k>=l)return.5;h=fe(b.a.L,c.type);h=Vi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=cj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.Vd=0;dj(b,c,e,g,h);return null}function cj(b,c,d){if(!c.lb||!c.xa)return Math.max(d,c.Vd);d=Ri(b,c.lb);return b.c.periods[d].startTime+c.xa.endTime}\nfunction Vi(b,c,d,e,f){if(c.xa&&c.stream==c.lb)return ej(b,c,f,c.xa.position+1);c.xa?(d=Ri(b,c.lb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.xa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=ej(b,c,f,Math.max(0,d-1)));return g||ej(b,c,f,d)}\nfunction ej(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Db();e=e.jb();return d.startTime+c.endTimee?null:c}\nfunction dj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=fj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ea=!0;c.ec=!1;k=gj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return hj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ea=!1,c.Yc=!1,c.Ja||this.a.Uc(),Ni(this,c,0),ij(this,h))}.bind(b))[\"catch\"](function(b){this.f||this.m||(c.Ea=!1,\"text\"==c.type&&this.g.ignoreTextStreamFailures?this.b[\"delete\"](\"text\"):\n7001==b.code?(c.Ea=!1,c.Ba=null,Ni(this,c,0)):3017==b.code?jj(this,c,b):(c.Eb=!0,b.severity=2,aj(this,b)))}.bind(b))}function jj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Yc})){var e=Math.round(100*b.j);if(20=d?Promise.resolve():b.a.L.remove(c.type,f,f+d).then(function(){}.bind(b))}\nfunction ij(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||\"text\"!=d[0].type)b.o=d.every(function(b){return\"text\"==b.type?!0:!b.Ja&&!b.Na&&b.xa});if(b.o){d=Ri(b,c);b.h[d]||Yi(b,d).then(function(){this.f||this.a.Gd()}.bind(b))[\"catch\"](td.Gb);for(d=0;d=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b[\"x-shaka-from-cache\"]};f=null;try{f=xc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function nj(b,c,d,e){var f=new nj.b;gc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new nj.a,h={pd:!1,ce:!1};b=nj.h(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?\"include\":void 0},h,e);b=new H(b,function(){h.pd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.ce=!0;g.abort()});k.O(c/1E3);b[\"finally\"](function(){k.stop()})}return b}z(\"shaka.net.HttpFetchPlugin\",nj);\nnj.h=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,wa;return y(h,function(h){switch(h.l){case 1:return k=nj.g,l=nj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get(\"Content-Length\"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.l){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Aa(h,3);break;case 2:return Da(h),h[\"return\"]();case 3:d.done||(q+=d.value.byteLength);\ne=Date.now();if(100c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f),\nf.A(3)}})})};U.Kb(\"application/x-offline-manifest\",kk);function lk(b){var c=ck(b);return c&&\"manifest\"==c.a?lk.a(b):c&&\"segment\"==c.a?lk.b(c.key(),c):Ab(new D(2,1,9004,b))}z(\"shaka.offline.OfflineScheme\",lk);lk.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{\"content-type\":\"application/x-offline-manifest\"}};return Cb(b)};lk.b=function(b,c){var d=new Cj;return Cb(void 0).T(function(){return d.init()}).T(function(){return Gj(d,c.ra(),c.$())}).T(function(b){return b.getSegments([c.key()])}).T(function(b){return{uri:c,data:b[0].data,headers:{}}})[\"finally\"](function(){return d.destroy()})};\nRb(\"offline\",lk);function mk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.l){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,nk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=ok(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f[\"return\"](g)}})})}\nfunction ok(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.l){case 1:return g=new Gc({nb:c,onError:function(){},gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Oc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f[\"return\"]([]);case 3:return ya(f,6),u(f,Vc(g),8);case 8:Aa(f,7);break;case 6:return Da(f),\nu(f,g.destroy(),9);case 9:return f[\"return\"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.l){case 1:return ya(c,2),u(c,Yc(g,b),4);case 4:h.push(b);Aa(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f[\"return\"](h)}})})}\nfunction nk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Mb(b.audioCapabilities,c.audioCapabilities,d)&&Mb(b.videoCapabilities,c.videoCapabilities,d)};function pk(b,c){var d=qk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.j=!0;this.m=Promise.resolve().then(function(){return rk(e)})}pk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return b.j=!1,b.b&&b.b.abort(),sk(b),u(d,b.m,2);case 2:b.a&&b.a.qa.Ua();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.qa.Ua();b.a=null;b.f=[];b.g=null;v(d)}})})};\nfunction tk(b,c){var d={pb:function(){},fc:function(){},Ua:function(){},onError:function(){},hc:function(){},rg:function(){}};b.f.push({create:c,qa:d});b.b&&b.b.abort();sk(b);return d}\nfunction rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:if(b.j){if(0==b.f.length||b.a&&!b.a.Ra)var e=!1;else{b.a&&(b.a.qa.Ua(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.qa.pb(),b.a={node:g.node,payload:g.payload,Ra:g.Ra,qa:e.qa}):e.qa.hc();e=!0}e?e=Promise.resolve():b.a?e=uk(b):(b.g.af(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})}\nfunction uk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return b.c=b.g.Ke(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ue(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.qa.fc(),b.a=null);Aa(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.qa.Ua();else b.a.qa.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function sk(b){b.h&&(b.h.resolve(),b.h=null)};function vk(b){this.a=null;for(var c=0;cb});return!0};vk.prototype.remove=vk.prototype.remove;\nvk.prototype.append=function(b){for(var c=xk,d=[],e=0;e=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}\"center\"==b.textAlign&&\"center\"!=c.align&&(c.align=\"middle\");\"vertical-lr\"==b.writingMode?c.vertical=\"lr\":\"vertical-rl\"==b.writingMode&&(c.vertical=\"rl\");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}\nfunction wk(b,c){var d=b.mode;b.mode=\"showing\"==d?\"showing\":\"hidden\";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function yk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+\".\"+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Ib(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Ib(m)),l=yk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z(\"shaka.util.ConfigUtils.mergeConfigObjects\",yk);function zk(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:ub(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:ub(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:\"\",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:ub(),\nfailureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};pc(\"Web0S\")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,\nswitchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:\"\",preferredTextLanguage:\"\",preferredVariantRole:\"\",preferredTextRole:\"\",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,\ntextDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Ak(b,h.preferredAudioLanguage)};return h}function Bk(b,c,d){var e={\".drm.servers\":\"\",\".drm.clearKeys\":\"\",\".drm.advanced\":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:\"\",audioRobustness:\"\",serverCertificate:new Uint8Array(0),individualizationServer:\"\"}};return yk(b,c,d||zk(),e,\"\")}\nfunction Ak(b,c){var d=b.filter(function(b){return\"variant\"==b.type}),e=[],f=re(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/\n2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,\"text\"==h.type&&d.push(h);return d};function Ck(){this.a=null;this.b=[]}function Dk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Ek(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}\nfunction Fk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Gk(){this.b=this.c=null;this.a=[]}function Hk(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:\"text\",fromAdaptation:d,bandwidth:null}))};function Ik(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN;this.a=new Ck;this.b=new Gk};function X(b,c){var d=this;J.call(this);this.g=Jk;this.a=null;this.$a=!1;this.i=new ac;this.rc=this.j=this.xb=this.b=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.F=this.h=this.N=null;this.Ad=1E9;this.Tb=new Set;this.eb=!0;this.ka=null;this.yd=!1;this.wd=0;this.ja=null;this.C=new Gh;this.c=Kk(this);this.Ub={width:Infinity,height:Infinity};this.v=null;this.Rb=new Ph(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount);this.Ka=this.c.preferredTextLanguage;\nthis.yb=this.c.preferredTextRole;c&&c(this);this.N=Lk(this);L(this.i,window,\"online\",function(){d.ad()});this.w={name:\"detach\"};this.S={name:\"attach\"};this.Ca={name:\"unload\"};this.yc={name:\"manifest-parser\"};this.xc={name:\"manifest\"};this.ab={name:\"media-source\"};this.sc={name:\"drm-engine\"};this.W={name:\"load\"};this.Ac={name:\"src-equals-drm-engine\"};this.cb={name:\"src-equals\"};var e=new Map;e.set(this.S,function(b,c){return Db(Mk(d,b,c))});e.set(this.w,function(b){b.u&&(d.i.ma(b.u,\"error\"),b.u=null);\nd.a=null;b=Promise.resolve();return Db(b)});e.set(this.Ca,function(b){return Db(Nk(d,b))});e.set(this.ab,function(b){b=Ok(d,b);return Db(b)});e.set(this.yc,function(b,c){var e=Pk(d,b,c);return Db(e)});e.set(this.xc,function(b){return Qk(d,b)});e.set(this.sc,function(){var b=Rk(d);return Db(b)});e.set(this.W,function(b,c){return Db(Sk(d,b,c))});e.set(this.Ac,function(b){b=Tk(d,b);return Db(b)});e.set(this.cb,function(b,c){return Uk(d,b,c)});this.fb=new pk(this.w,{Ke:function(b,c,e,k){var f=null;b==\nd.w&&(f=e==d.w?d.w:d.S);b==d.S&&(f=e==d.w||c.u!=k.u?d.w:e==d.S?d.S:e==d.ab||e==d.W?d.ab:e==d.cb?d.Ac:null);b==d.ab&&(f=e==d.W&&c.u==k.u?d.yc:d.Ca);b==d.yc&&(f=Vk(d.W,d.xc,d.Ca,e,c,k));b==d.xc&&(f=Vk(d.W,d.sc,d.Ca,e,c,k));b==d.sc&&(f=Vk(d.W,d.W,d.Ca,e,c,k));b==d.Ac&&(f=e==d.cb&&c.u==k.u?d.cb:d.Ca);if(b==d.W||b==d.cb)f=d.Ca;b==d.Ca&&(f=k.u&&c.u==k.u?d.S:d.w);return f},ue:function(b,c,h){d.dispatchEvent(new I(\"onstatechange\",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,\nfunction(c){switch(c.l){case 1:return u(c,Nk(d,b),2);case 2:return c[\"return\"](b.u?d.S:d.w)}})})},af:function(b){d.dispatchEvent(new I(\"onstateidle\",{state:b.name}))}});b&&this.zb(b,!0)}Ta(X,J);z(\"shaka.Player\",X);\nX.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:if(b.g==Wk)return d[\"return\"]();b.g=Wk;e=tk(b.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});return u(d,new Promise(function(b){e.pb=function(){};e.fc=function(){b()};e.Ua=function(){b()};e.onError=function(){b()};e.hc=function(){b()}}),2);case 2:return u(d,b.fb.destroy(),3);case 3:b.i&&(b.i.a(),b.i=null);b.rc=null;b.j=null;b.c=null;if(!b.N){d.A(0);break}return u(d,b.N.destroy(),5);\ncase 5:b.N=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version=\"v2.5.0\";var Xk=[\"2\",\"5\"];Le=new function(b){this.a=b;this.c=Me;this.b=Ne}(new Je(Number(Xk[0]),Number(Xk[1])));var Yk=[\"output-restricted\",\"internal-error\"],Zk={};X.registerSupportPlugin=function(b,c){Zk[b]=c};\nX.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?mc()?!0:nc(\"application/x-mpegurl\"):!1};\nX.probeSupport=function(){return jd().then(function(b){for(var c=U.vf(),d={},e=r('video/mp4; codecs=\"avc1.42E01E\",video/mp4; codecs=\"avc3.42E01E\",video/mp4; codecs=\"hev1.1.6.L93.90\",video/mp4; codecs=\"hvc1.1.6.L93.90\",video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"vp9\",video/mp4; codecs=\"vp09.00.10.08\",audio/mp4; codecs=\"mp4a.40.2\",audio/mp4; codecs=\"ac-3\",audio/mp4; codecs=\"ec-3\",audio/mp4; codecs=\"opus\",audio/mp4; codecs=\"flac\",video/webm; codecs=\"vp8\",video/webm; codecs=\"vp9\",video/webm; codecs=\"vp09.00.10.08\",audio/webm; codecs=\"vorbis\",audio/webm; codecs=\"opus\",video/mp2t; codecs=\"avc1.42E01E\",video/mp2t; codecs=\"avc3.42E01E\",video/mp2t; codecs=\"hvc1.1.6.L93.90\",video/mp2t; codecs=\"mp4a.40.2\",video/mp2t; codecs=\"ac-3\",video/mp2t; codecs=\"ec-3\",text/vtt,application/mp4; codecs=\"wvtt\",application/ttml+xml,application/mp4; codecs=\"stpp\"'.split(\",\")),f=\ne.next();!f.done;f=e.next()){f=f.value;d[f]=mc()?Wd(f)?!0:MediaSource.isTypeSupported(f)||zd(f):nc(f);var g=f.split(\";\")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in Zk)b[h]=Zk[h]();return b})};X.prototype.zb=function(b,c){c=void 0===c?!0:c;if(this.g==Wk)return Promise.reject($k());var d=qk();d.u=b;mc()||(c=!1);var e=c?this.ab:this.S,f=tk(this.fb,function(){return{node:e,payload:d,Ra:!1}});f.pb=function(){};return al(f)};X.prototype.attach=X.prototype.zb;\nX.prototype.detach=function(){var b=this;if(this.g==Wk)return Promise.reject($k());var c=tk(this.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});c.pb=function(){};return al(c)};X.prototype.detach=X.prototype.detach;X.prototype.ld=function(b){var c=this;b=void 0===b?!0:b;if(this.g==Wk)return Promise.reject($k());mc()||(b=!1);var d=qk(),e=tk(this.fb,function(e){var f=e.u&&b?c.ab:e.u?c.S:c.w;d.u=e.u;return{node:f,payload:d,Ra:!1}});e.pb=function(){};return al(e)};X.prototype.unload=X.prototype.ld;\nX.prototype.load=function(b,c,d){if(this.g==Wk)return Promise.reject($k());this.dispatchEvent(new I(\"loading\"));var e=qk();e.uri=b;e.hd=Date.now()/1E3;d&&\"string\"!=typeof d&&(Ke(\"Loading with a manifest parser factory\",\"Please register a manifest parser and for the mime-type.\"),e.va=function(){return new d});d&&\"string\"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=bl(e)?this.cb:this.W,g=tk(this.fb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ra:!0}});g.pb=function(){};\nreturn new Promise(function(b,c){g.hc=function(){return c(new D(2,7,7002))};g.fc=function(){return b()};g.Ua=function(){return c($k())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;\nfunction bl(b){if(b.va)return!1;if(!mc())return!0;var c=b.mimeType;b=b.uri||\"\";c||(c={mp4:\"video/mp4\",m4v:\"video/mp4\",m4a:\"audio/mp4\",webm:\"video/webm\",ts:\"video/mp2t\",m3u8:\"application/x-mpegurl\",mp3:\"audio/mpeg\",aac:\"audio/aac\",flac:\"audio/flac\"}[U.getExtension(b)]);return c?nc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes(\"Apple\"):!0:!1:!1}function Mk(b,c,d){null==c.u&&(c.u=d.u,L(b.i,c.u,\"error\",function(){var c=cl(b);c&&b.Ha(c)}));b.a=c.u;return Promise.resolve()}\nfunction Nk(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:b.g!=Wk&&(b.g=Jk);b.dispatchEvent(new I(\"unloading\"));c.currentTime=null;c.va=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ma(c.u,\"loadeddata\"),b.i.ma(c.u,\"playing\"),b.i.ma(c.u,\"pause\"),b.i.ma(c.u,\"ended\"),b.i.ma(c.u,\"ratechange\"));b.bb&&(b.bb.a(),b.bb=null);b.Qb&&(b.Qb.stop(),b.Qb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.j){e.A(4);break}return u(e,b.j.stop(),4);\ncase 4:if(!b.f){e.A(6);break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.a(),b.o=null);if(!b.F){e.A(8);break}return u(e,b.F.destroy(),9);case 9:b.F=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute(\"src\"),c.u.load());if(!b.h){e.A(10);break}return u(e,b.h.destroy(),11);case 11:b.h=null;case 10:b.C.a.clear(),b.xb=null,b.V=null,b.Tb.clear(),b.b=null,b.v=null,b.eb=!0,dl(b),v(e)}})})}\nfunction Ok(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.l){case 1:return f=window.muxjs?new nd:new od,g=b.c.textDisplayFactory,h=new g,k=new $d(c.u,f,h),u(e,k.o,2);case 2:b.F=k,v(e)}})})}\nfunction Pk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:c.va=d.va;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.N;b.xb=g;if(c.va){b.m=c.va();f.A(2);break}k=b;return u(f,U.create(g,h,b.c.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.c.manifest),v(f)}})})}\nfunction Qk(b,c){var d=c.uri,e=b.N;b.Pb=new wi;xi(b.Pb,function(c){el(b,\"timelineregionadded\",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Bc(c)},filterAllPeriods:function(c){return fl(b,c)},onTimelineRegionAdded:function(c){var d=b.Pb;a:{var e=r(d.b);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.b.add(c),d.c(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ha(c)}};\nreturn new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.l){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.b=e.s;b.dispatchEvent(new I(\"manifestparsed\"));if(0==b.b.periods.length)throw new D(2,4,4014);gl(b.b.periods);v(e)}})})}),function(){return b.m.stop()})}\nfunction Rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:return b.h=new Gc({nb:b.N,onError:function(d){b.Ha(d)},gc:function(d){hl(b,d)},onExpirationUpdated:function(d,e){il(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.h.configure(b.c.drm),u(d,Nc(b.h,ci(b.b.periods),b.b.offlineSessionIds),2);case 2:fl(b,b.b.periods),v(d)}})})}\nfunction Sk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.l){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.xb=h,b.v=new Ik,k=function(){return jl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.K.set(c)},L(b.i,g,\"playing\",k),L(b.i,g,\"pause\",k),L(b.i,g,\"ended\",k),L(b.i,g,\"ratechange\",l),m=b.c.abrFactory,b.j&&b.rc==m||(b.rc=m,b.j=new m,b.j.configure(b.c.abr)),kl(b,b.b.periods),b.Rb=new Ph(b.c.preferredAudioLanguage,b.c.preferredVariantRole,b.c.preferredAudioChannelCount),\nb.Ka=b.c.preferredTextLanguage,ll(b.b.presentationTimeline,b.c.playRangeStart,b.c.playRangeEnd),u(f,b.h.zb(g),2);case 2:return b.j.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.b.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ml(b,g,c,!0);b.f&&(Qi(b.f,c,d,f),nl(b))}),b.o=ol(b,c.startTime),b.bb=pl(b),b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}}),\nn=Math.max(b.b.minBufferTime,b.c.streaming.rebufferingGoal),ql(b,n),b.f=rl(b),b.f.configure(b.c.streaming),sl(b),b.g=tl,b.dispatchEvent(new I(\"streaming\")),u(f,b.f.start(),3);case 3:b.c.streaming.startAtSegmentBoundary&&(q=b.o.i(),x=ul(b,q),b.o.o(x)),b.b.periods.forEach(b.Bc.bind(b)),vl(b),nl(b),w=wl(b),w.variants.some(function(b){return b.primary}),xl(b,w.variants),dc(b.i,g,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd}),v(f)}})})}\nfunction Tk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.l){case 1:return f=wd,b.h=new Gc({nb:b.N,onError:function(c){b.Ha(c)},gc:function(c){hl(b,c)},onExpirationUpdated:function(c,e){il(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.h.configure(b.c.drm),g={id:0,language:\"und\",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,\npresentationTimeOffset:0,mimeType:\"video/mp4\",codecs:\"\",encrypted:!0,keyId:null,language:\"und\",label:null,type:f.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Nc(b.h,[g],[]),2);case 2:return u(e,b.h.zb(c.u),0)}})})}\nfunction Uk(b,c,d){function e(){return jl(b)}c.uri=d.uri;c.startTime=d.startTime;b.xb=c.uri;b.v=new Ik;b.o=new pi(c.u);null!=c.startTime&&b.o.o(c.startTime);b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}});ql(b,b.c.streaming.rebufferingGoal);L(b.i,c.u,\"playing\",e);L(b.i,c.u,\"pause\",e);L(b.i,c.u,\"ended\",e);dc(b.i,c.u,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd});b.a.audioTracks&&(L(b.i,b.a.audioTracks,\"addtrack\",function(){return vl(b)}),\nL(b.i,b.a.audioTracks,\"removetrack\",function(){return vl(b)}));if(b.a.textTracks){var f=b.a.textTracks;L(b.i,f,\"addtrack\",function(){return vl(b)});L(b.i,f,\"removetrack\",function(){return vl(b)})}c.u.src=c.uri;b.g=yl;b.dispatchEvent(new I(\"streaming\"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(cl(b)):(dc(b.i,b.a,\"loadeddata\",function(){g.resolve()}),dc(b.i,b.a,\"error\",function(){g.reject(cl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));\nreturn Promise.resolve()})}function gl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(\",\")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}\nfunction sl(b){function c(b){var c=\"\";b.video&&(c=lc(b.video.codecs)[0]);var d=\"\";b.audio&&(d=lc(b.audio.codecs)[0]);return c+\"-\"+d}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=De(d,b.c.preferredAudioChannelCount);var e=new Hb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h=b.a.duration-.1;break;case tl:a:{var e;(e=b.a.ended)||(e=b.F,e=e.g?\"ended\"==e.g.readyState:!0);if(e)c=!0;else{if(b.b.presentationTimeline.U()&&(e=b.b.presentationTimeline.jb(),pd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=rd(b.a.buffered,b.a.currentTime);e=b.V;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Th:Uh;e.a=f;c!=f&&dl(b)})).Ia(.25)}\nfunction rl(b){return new Di(b.b,{Qa:function(){return b.o.i()},L:b.F,nb:b.N,Hd:b.Ze.bind(b),Gd:b.pe.bind(b),onError:b.Ha.bind(b),onEvent:function(c){return b.dispatchEvent(c)},cf:b.df.bind(b),Uc:b.kf.bind(b)})}\nX.prototype.configure=function(b,c){if(2==arguments.length&&\"string\"==typeof b){for(var d=b,e={},f=e,g=0,h=0;;){g=d.indexOf(\".\",g);if(0>g)break;if(0==g||\"\\\\\"!=d[g-1])h=d.substring(h,g).replace(/\\\\\\./g,\".\"),f[h]={},f=f[h],h=g+1;g+=1}f[d.substring(h).replace(/\\\\\\./g,\".\")]=c;b=e}d=Bk(this.c,b,Kk(this));zl(this);return d};X.prototype.configure=X.prototype.configure;\nfunction zl(b){b.m&&b.m.configure(b.c.manifest);b.h&&b.h.configure(b.c.drm);if(b.f){b.f.configure(b.c.streaming);try{b.b.periods.forEach(b.Bc.bind(b))}catch(f){b.Ha(f)}var c=Hi(b.f),d=Ji(b.f),e=wl(b);c=Ge(c,d,e.variants);b.j&&c&&c.allowedByApplication&&c.allowedByKeySystem?xl(b,e.variants):Al(b,e)}b.j&&(b.j.configure(b.c.abr),b.c.abr.enabled&&!b.eb?b.j.enable():b.j.disable(),Bl(b))}X.prototype.getConfiguration=function(){var b=Kk(this);Bk(b,this.c,Kk(this));return b};\nX.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.Df=function(){for(var b in this.c)delete this.c[b];Bk(this.c,Kk(this),Kk(this));zl(this)};X.prototype.resetConfiguration=X.prototype.Df;X.prototype.Ee=function(){return this.g};X.prototype.getLoadMode=X.prototype.Ee;X.prototype.Ie=function(){return this.a};X.prototype.getMediaElement=X.prototype.Ie;X.prototype.Bb=function(){return this.N};X.prototype.getNetworkingEngine=X.prototype.Bb;X.prototype.$b=function(){return this.xb};\nX.prototype.getAssetUri=X.prototype.$b;X.prototype.He=function(){Ke(\"getManifestUri\",'Please use \"getAssetUri\" instead.');return this.$b()};X.prototype.getManifestUri=X.prototype.He;X.prototype.U=function(){return this.b?this.b.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.U;X.prototype.Ta=function(){return this.b?this.b.presentationTimeline.Ta():!1};X.prototype.isInProgress=X.prototype.Ta;\nX.prototype.We=function(){if(this.b){if(!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.We;X.prototype.Ff=function(){if(this.b){var b=this.b.presentationTimeline;return{start:b.ib(),end:b.wa()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};\nX.prototype.seekRange=X.prototype.Ff;X.prototype.keySystem=function(){return this.h?this.h.keySystem():\"\"};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.h?this.h.a:null};X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.bc=function(){return this.h?this.h.bc():Infinity};X.prototype.getExpiration=X.prototype.bc;X.prototype.Ic=function(){return this.V?this.V.a==Uh:!1};X.prototype.isBuffering=X.prototype.Ic;\nX.prototype.Le=function(){if(this.K){var b=this.K;b=b.g?0:b.f}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Le;X.prototype.ag=function(b){0==b?$a(\"A trick play rate of 0 is unsupported!\"):(this.g==yl&&this.K.set(b),this.g==tl&&(this.K.set(b),Oi(this.f,1=h.b.periods.length?h.b.presentationTimeline.Y():h.b.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Ad++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),\nfindSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||\"\",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Tb.add(E);m.textStreams.push(E);return u(l,Ki(h.f,E),2);case 2:return(F=Ii(h.f,\"text\"))&&Hh(h.C,m,F),h.Tb[\"delete\"](E),Al(h,m),vl(h),l[\"return\"](xe(E))}})})};\nX.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.dd=function(b,c){this.Ub.width=b;this.Ub.height=c};X.prototype.setMaxHardwareResolution=X.prototype.dd;X.prototype.ad=function(){if(this.g==tl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Eb&&(d.Eb=!1,Ni(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.ad;X.prototype.Fe=function(){return this.b};X.prototype.getManifest=X.prototype.Fe;\nX.prototype.Ge=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Ge;function ml(b,c,d,e){Ih(b.C,c).variant=d;b=b.v.b;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:\"variant\",fromAdaptation:e,bandwidth:d.bandwidth}))}function Kk(b){var c=zk();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.ad())};c.textDisplayFactory=function(){return new vk(b.a)};return c}\nfunction kl(b,c){for(var d=0;dd&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}\nfunction hl(b,c){if(b.f){var d=wl(b),e=!1,f=Object.keys(c),g=1==f.length&&\"00\"==f[0];f.length&&d.variants.forEach(function(b){He(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?\"00\":d.keyId],b.allowedByKeySystem=!!d&&!Yk.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Hi(b.f);var h=Ji(b.f);(f=Ge(f,h,d.variants))&&!f.allowedByKeySystem&&Al(b,d);e&&(vl(b),xl(b,d.variants))}}\nfunction il(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I(\"expirationupdated\"))}function ll(b,c,d){0=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=ym(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Am(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&\nk.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}\nfunction Am(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Db();var k=g.id;Bm(g,f,function(f){var l=og(f.c(),f.b,f.a,b.a.streaming.retryParameters);sj(c,k,\nl,Tl(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=og(f.c(),f.b,f.a,b.a.streaming.retryParameters),sj(c,k,f,.5*Ul(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}\nfunction Bm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function km(b){if(b.h.a)throw new D(2,9,7001);}function im(){if(!fm())throw new D(2,9,9E3);}function gm(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e[\"return\"](e.s);case 2:Ea(e),Kb(b.g,c),Fa(e,0)}})})}\nfunction vm(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.l){case 1:return d=new Cj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})};\nfunction um(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.l){case 1:if(!e.drmInfo)return g[\"return\"]();h=Ij(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:tm(e,!1),videoCapabilities:tm(e,!0)}});return u(g,mk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),\n0)}})})}function ym(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function om(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Cm(c.value)}\nfunction Cm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}Zk.offline=fm;z(\"shaka.polyfill.installAll\",function(){for(var b=0;b=c.a.length)return b;for(var d=[],e=0;ed.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b -1)\n }\n\n get name () {\n return 'dash_shaka_playback'\n }\n\n get shakaVersion () {\n return shaka.player.Player.version\n }\n\n get shakaPlayerInstance () {\n return this._player\n }\n\n get levels () {\n return this._levels\n }\n\n get seekRange() {\n return this.shakaPlayerInstance.seekRange()\n }\n\n set currentLevel (id) {\n this._currentLevelId = id\n let isAuto = this._currentLevelId === DEFAULT_LEVEL_AUTO\n\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_START)\n if (!isAuto) {\n this._player.configure({abr: {enabled: false}})\n this._pendingAdaptationEvent = true\n this.selectTrack(this.videoTracks.filter((t) => t.id === this._currentLevelId)[0])\n }\n else {\n this._player.configure({abr: {enabled: true}})\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n }\n }\n\n get currentLevel () {\n return this._currentLevelId || DEFAULT_LEVEL_AUTO\n }\n\n get dvrEnabled() {\n return this._duration >= this._minDvrSize && this.getPlaybackType() === 'live'\n }\n\n getDuration() {\n return this._duration\n }\n\n get _duration() {\n if (!this.shakaPlayerInstance) return 0\n\n return this.seekRange.end - this.seekRange.start\n }\n\n getCurrentTime() {\n return this.shakaPlayerInstance.getMediaElement().currentTime - this.seekRange.start\n }\n\n get _startTime() {\n return this.seekRange.start\n }\n\n get presentationTimeline() {\n return this.shakaPlayerInstance.getManifest().presentationTimeline\n }\n\n constructor (...args) {\n super(...args)\n this._levels = []\n this._pendingAdaptationEvent = false\n this._isShakaReadyState = false\n\n this._minDvrSize = typeof (this.options.shakaMinimumDvrSize) === 'undefined' ? 60 : this.options.shakaMinimumDvrSize\n }\n\n getProgramDateTime() {\n return new Date((this.presentationTimeline.getPresentationStartTime() + this.seekRange.start) * 1000)\n }\n\n _updateDvr(status) {\n this.trigger(Events.PLAYBACK_DVR, status)\n this.trigger(Events.PLAYBACK_STATS_ADD, { 'dvr': status })\n }\n\n seek(time) {\n if (time < 0) {\n Log.warn('Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point.')\n time = this._duration\n }\n // assume live if time within 3 seconds of end of stream\n this.dvrEnabled && this._updateDvr(time < this._duration-3)\n time += this._startTime\n super.seek(time)\n }\n\n pause() {\n super.pause()\n\n if (this.dvrEnabled)\n this._updateDvr(true)\n }\n\n play () {\n if (!this._player) {\n this._setup()\n }\n\n if (!this.isReady) {\n this.once(DashShakaPlayback.Events.SHAKA_READY, this.play)\n return\n }\n\n this._stopped = false\n this._src = this.el.src\n super.play()\n this._startTimeUpdateTimer()\n }\n\n _startTimeUpdateTimer() {\n this._timeUpdateTimer = setInterval(() => {\n this._onTimeUpdate()\n }, 100)\n }\n\n _stopTimeUpdateTimer() {\n clearInterval(this._timeUpdateTimer)\n }\n\n // skipping HTML5Video `_setupSrc` (on tag video)\n _setupSrc () {}\n\n // skipping ready event on video tag in favor of ready on shaka\n _ready () {\n // override with no-op\n }\n\n _onShakaReady() {\n this._isShakaReadyState = true\n this.trigger(DashShakaPlayback.Events.SHAKA_READY)\n this.trigger(Events.PLAYBACK_READY, this.name)\n }\n\n get isReady () {\n return this._isShakaReadyState\n }\n\n // skipping error handling on video tag in favor of error on shaka\n error (event) {\n Log.error('an error was raised by the video tag', event, this.el.error)\n }\n\n isHighDefinitionInUse () {\n return !!this.highDefinition\n }\n\n stop () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n this._stopped = true\n\n if (this._player) {\n this._sendStats()\n\n this._player.unload().then(() => {\n super.stop()\n this._player = null\n this._isShakaReadyState = false\n }).catch(() => {\n Log.error('shaka could not be unloaded')\n })\n } else {\n super.stop()\n }\n }\n\n get textTracks () {\n return this.isReady && this._player.getTextTracks()\n }\n\n get audioTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('audio/'))\n }\n\n get videoTracks () {\n return this.isReady && this._player.getVariantTracks().filter((t) => t.mimeType.startsWith('video/'))\n }\n\n getPlaybackType () {\n return (this.isReady && this._player.isLive() ? 'live' : 'vod') || ''\n }\n\n selectTrack (track) {\n if (track.type === 'text') {\n this._player.selectTextTrack(track)\n } else if (track.type === 'variant') {\n this._player.selectVariantTrack(track)\n if (track.mimeType.startsWith('video/')) {\n // we trigger the adaptation event here\n // because Shaka doesn't trigger its event on \"manual\" selection.\n this._onAdaptation()\n }\n } else {\n throw new Error('Unhandled track type:', track.type)\n }\n }\n\n /**\n * @override\n */\n get closedCaptionsTracks() {\n let id = 0\n let trackId = () => { return id++ }\n let tracks = this.textTracks || []\n\n return tracks\n .filter(track => track.kind === 'subtitle')\n .map(track => { return {id: trackId(), name: track.label || track.language, track: track} })\n }\n\n /**\n * @override\n */\n get closedCaptionsTrackId() {\n return super.closedCaptionsTrackId\n }\n\n /**\n * @override\n */\n set closedCaptionsTrackId(trackId) {\n if (!this._player) {\n return\n }\n\n let tracks = this.closedCaptionsTracks\n let showingTrack\n\n // Note: -1 is for hide all tracks\n if (trackId !== -1) {\n showingTrack = tracks.find(track => track.id === trackId)\n if (!showingTrack) {\n Log.warn(`Track id \"${trackId}\" not found`)\n return\n }\n if (this._shakaTTVisible && showingTrack.track.active === true) {\n Log.info(`Track id \"${trackId}\" already showing`)\n return\n }\n }\n\n if (showingTrack) {\n this._player.selectTextTrack(showingTrack.track)\n this._player.setTextTrackVisibility(true)\n this._enableShakaTextTrack(true)\n } else {\n this._player.setTextTrackVisibility(false)\n this._enableShakaTextTrack(false)\n }\n\n this._ccTrackId = trackId\n this.trigger(Events.PLAYBACK_SUBTITLE_CHANGED, {\n id: trackId\n })\n }\n\n _enableShakaTextTrack(isEnable) {\n // Shaka player use only one TextTrack object with video element to handle all text tracks\n // It must be enabled or disabled in addition to call selectTextTrack()\n if (!this.el.textTracks) {\n return\n }\n\n this._shakaTTVisible = isEnable\n\n Array.from(this.el.textTracks)\n .filter(track => track.kind === 'subtitles')\n .forEach(track => track.mode = isEnable === true ? 'showing' : 'hidden')\n }\n\n _checkForClosedCaptions() {\n if (this._ccIsSetup) {\n return\n }\n\n if (this.hasClosedCaptionsTracks) {\n this.trigger(Events.PLAYBACK_SUBTITLE_AVAILABLE)\n const trackId = this.closedCaptionsTrackId\n this.closedCaptionsTrackId = trackId\n }\n this._ccIsSetup = true\n }\n\n destroy () {\n this._stopTimeUpdateTimer()\n clearInterval(this.sendStatsId)\n\n if (this._player) {\n this._player.destroy()\n .then(() => this._destroy())\n .catch(() => {\n this._destroy()\n Log.error('shaka could not be destroyed')\n })\n } else {\n this._destroy()\n }\n\n super.destroy()\n }\n\n _setup () {\n this._isShakaReadyState = false\n this._ccIsSetup = false\n this._player = this._createPlayer()\n this._options.shakaConfiguration && this._player.configure(this._options.shakaConfiguration)\n this._options.shakaOnBeforeLoad && this._options.shakaOnBeforeLoad(this._player)\n\n let playerLoaded = this._player.load(this._options.src)\n playerLoaded.then(() => this._loaded())\n .catch((e) => this._setupError(e))\n }\n\n _createPlayer () {\n let player = new shaka.Player(this.el)\n player.addEventListener('error', this._onError.bind(this))\n player.addEventListener('adaptation', this._onAdaptation.bind(this))\n player.addEventListener('buffering', this._onBuffering.bind(this))\n return player\n }\n\n _onTimeUpdate() {\n if (!this.shakaPlayerInstance) return\n\n let update = {\n current: this.getCurrentTime(),\n total: this.getDuration(),\n firstFragDateTime: this.getProgramDateTime()\n }\n let isSame = this._lastTimeUpdate && (\n update.current === this._lastTimeUpdate.current &&\n update.total === this._lastTimeUpdate.total)\n if (isSame)\n return\n\n this._lastTimeUpdate = update\n this.trigger(Events.PLAYBACK_TIMEUPDATE, update, this.name)\n }\n\n _onBuffering (e) {\n if (this._stopped) return\n let event = e.buffering ? Events.PLAYBACK_BUFFERING : Events.PLAYBACK_BUFFERFULL\n this.trigger(event)\n }\n\n _loaded () {\n this._onShakaReady()\n this._startToSendStats()\n this._fillLevels()\n this._checkForClosedCaptions()\n }\n\n _fillLevels () {\n if (this._levels.length === 0) {\n this._levels = this.videoTracks.map((videoTrack) => { return {id: videoTrack.id, label: `${videoTrack.height}p`} }).reverse()\n this.trigger(Events.PLAYBACK_LEVELS_AVAILABLE, this.levels)\n }\n }\n\n _startToSendStats () {\n const intervalMs = this._options.shakaSendStatsInterval || SEND_STATS_INTERVAL_MS\n this.sendStatsId = setInterval(() => this._sendStats(), intervalMs)\n }\n\n _sendStats () {\n this.trigger(Events.PLAYBACK_STATS_ADD, this._player.getStats())\n }\n\n _setupError (err) {\n this._onError(err)\n }\n\n _onError (err) {\n const error = {\n shakaError: err,\n videoError: this.el.error\n }\n\n let { category, code, severity } = error.shakaError.detail || error.shakaError\n\n if (error.videoError || !code && !category) return super._onError()\n\n const isCritical = severity === shaka.util.Error.Severity.CRITICAL\n const errorData = {\n code: `${category}_${code}`,\n description: `Category: ${category}, code: ${code}, severity: ${severity}`,\n level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,\n raw: err\n }\n const formattedError = this.createError(errorData)\n Log.error('Shaka error event:', formattedError)\n this.trigger(Events.PLAYBACK_ERROR, formattedError)\n }\n\n\n _onAdaptation () {\n let activeVideo = this.videoTracks.filter((t) => t.active === true)[0]\n\n this._fillLevels()\n\n // update stats that may have changed before we trigger event\n // so that user can rely on stats data when handling event\n this._sendStats()\n\n if (this._pendingAdaptationEvent) {\n this.trigger(Events.PLAYBACK_LEVEL_SWITCH_END)\n this._pendingAdaptationEvent = false\n }\n\n Log.debug('an adaptation has happened:', activeVideo)\n this.highDefinition = (activeVideo.height >= 720)\n this.trigger(Events.PLAYBACK_HIGHDEFINITIONUPDATE, this.highDefinition)\n this.trigger(Events.PLAYBACK_BITRATE, {\n bandwidth: activeVideo.bandwidth,\n width: activeVideo.width,\n height: activeVideo.height,\n level: activeVideo.id\n })\n }\n\n _updateSettings() {\n if (this.getPlaybackType() === 'vod')\n this.settings.left = ['playpause', 'position', 'duration']\n else if (this.dvrEnabled)\n this.settings.left = ['playpause']\n else\n this.settings.left = ['playstop']\n\n this.settings.seekEnabled = this.isSeekEnabled()\n this.trigger(Events.PLAYBACK_SETTINGSUPDATE)\n }\n\n _destroy () {\n this._isShakaReadyState = false\n Log.debug('shaka was destroyed')\n }\n}\n\nexport default DashShakaPlayback\n","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","(function(){var innerGlobal=typeof window!=\"undefined\"?window:global;var exportTo={};(function(window,global){var p,aa=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca=\"undefined\"!=typeof window&&window===this?this:\"undefined\"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return\"jscomp_symbol_\"+(c||\"\")+b++}}();\nfunction fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol(\"iterator\"));\"function\"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return cg&&(g=Math.max(g+f,0));g=g}});ka(\"Array.prototype.find\",function(b){return b?b:function(b,d){return Pa(this,b,d).ee}});var Sa=this;Sa.a=!0;\nfunction z(b,c){var d=b.split(\".\"),e=Sa;d[0]in e||!e.execScript||e.execScript(\"var \"+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ng=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*\n\n Copyright 2016 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\nfunction Ua(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Ua(2);this.c=new Ua(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\\/\\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(db(this,b.sa),this.Xa=b.Xa,this.oa=b.oa,hb(this,b.tb),this.fa=b.fa,ib(this,b.a.clone()),this.Oa=b.Oa):b&&(c=String(b).match(bb))?(db(this,c[1]||\"\",!0),this.Xa=jb(c[2]||\"\"),this.oa=jb(c[3]||\"\",!0),hb(this,c[4]),this.fa=jb(c[5]||\"\",!0),ib(this,c[6]||\"\",!0),this.Oa=jb(c[7]||\"\")):this.a=new kb(null)}p=cb.prototype;p.sa=\"\";p.Xa=\"\";p.oa=\"\";p.tb=null;p.fa=\"\";p.Oa=\"\";\np.toString=function(){var b=[],c=this.sa;c&&b.push(lb(c,mb,!0),\":\");if(c=this.oa){b.push(\"//\");var d=this.Xa;d&&b.push(lb(d,mb,!0),\"@\");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,\"%$1\"));c=this.tb;null!=c&&b.push(\":\",String(c))}if(c=this.fa)this.oa&&\"/\"!=c.charAt(0)&&b.push(\"/\"),b.push(lb(c,\"/\"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push(\"?\",c);(c=this.Oa)&&b.push(\"#\",lb(c,pb));return b.join(\"\")};\np.resolve=function(b){var c=this.clone();\"data\"===c.sa&&(c=new cb);var d=!!b.sa;d?db(c,b.sa):d=!!b.Xa;d?c.Xa=b.Xa:d=!!b.oa;d?c.oa=b.oa:d=null!=b.tb;var e=b.fa;if(d)hb(c,b.tb);else if(d=!!b.fa){if(\"/\"!=e.charAt(0))if(this.oa&&!this.fa)e=\"/\"+e;else{var f=c.fa.lastIndexOf(\"/\");-1!=f&&(e=c.fa.substr(0,f+1)+e)}if(\"..\"==e||\".\"==e)e=\"\";else if(-1!=e.indexOf(\"./\")||-1!=e.indexOf(\"/.\")){f=0==e.lastIndexOf(\"/\",0);e=e.split(\"/\");for(var g=[],h=0;hc)throw Error(\"Bad port number \"+c);b.tb=c}else b.tb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}\nfunction jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):\"\"}function lb(b,c,d){return\"string\"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,\"%$1\")),b):null}function rb(b){b=b.charCodeAt(0);return\"%\"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\\/\\?@]/g,ob=/[#\\?:]/g,nb=/[#\\?]/g,qb=/[#\\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ea=null;p.Xb=null;\np.add=function(b,c){if(!this.ea&&(this.ea={},this.Xb=0,this.a))for(var d=this.a.split(\"&\"),e=0;e=b.i)if(b.c)b.a=1,b.b=b.f;else return d[\"return\"](Promise.reject());e=b.a;b.a++;if(0==e)return d[\"return\"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function ub(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g=e.priority)Qb[b]={priority:d,uf:c}}K.registerScheme=Rb;K.unregisterScheme=function(b){delete Qb[b]};K.prototype.wf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.wf;\nK.prototype.bg=function(b){this.a[\"delete\"](b)};K.prototype.unregisterRequestFilter=K.prototype.bg;K.prototype.re=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.re;K.prototype.xf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.xf;K.prototype.cg=function(b){this.b[\"delete\"](b)};K.prototype.unregisterResponseFilter=K.prototype.cg;K.prototype.se=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.se;\nfunction Sb(b,c){return{uris:b,method:\"GET\",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;\nK.prototype.request=function(b,c){var d=this,e=new Tb;if(this.f){var f=Promise.reject(new D(2,7,7001));f[\"catch\"](function(){});return new Ub(f,function(){return Promise.resolve()},e)}c.method=c.method||\"GET\";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Ib(c.retryParameters):ub();c.uris=Ib(c.uris);f=Vb(this,b,c);var g=f.T(function(){return Wb(d,b,c,new tb(c.retryParameters,!1),0,null,e)}),h=g.T(function(c){return Xb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},\nfunction(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.T(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ue||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Ub(f.promise,f.Fd,e);Ob(this.g,f);return f};K.prototype.request=K.prototype.request;\nfunction Vb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={$c:f.$c},g=b.next())f.$c=g.value,e=e.T(function(b){return function(){return b.$c(c,d)}}(f));return e.T(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}\nfunction Wb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.sa,m=!1;l||(l=location.protocol,l=l.slice(0,-1),db(k,l),d.uris[f]=k.toString());var n=(l=Qb[l])?l.uf:null;if(!n)return Ab(new D(2,1,1E3,k));var q;return Db(zb(e)).T(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).T(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ue:m}},function(h){if(h&&7001==h.code)throw h;if(b.f)return Bb();if(h&&1==h.severity)return b.dispatchEvent(new I(\"retry\",\n{error:h instanceof D?h:null})),f=(f+1)%d.uris.length,Wb(b,c,d,e,f,h);throw h||g;})}function Xb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.T(f.value.bind(null,c,d.response));return e.T(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Tb(){this.a=0}K.NumBytesRemainingClass=Tb;function Ub(b,c,d){H.call(this,b,c);this.b=d}var Yb=Ub;Yb.prototype=ma(H.prototype);\nYb.prototype.constructor=Yb;if(sa)sa(Yb,H);else for(var Zb in H)if(\"prototype\"!=Zb)if(Object.defineProperties){var $b=Object.getOwnPropertyDescriptor(H,Zb);$b&&Object.defineProperty(Yb,Zb,$b)}else Yb[Zb]=H[Zb];Yb.$f=H.prototype;K.PendingRequest=Ub;Ub.all=Eb;Ub.notAbortable=Db;Ub.completed=Cb;Ub.aborted=Bb;Ub.failed=Ab;function ac(){this.b=new Hb}ac.prototype.a=function(){bc(this);this.b=null};function L(b,c,d,e){b.b&&(c=new cc(c,d,e),b.b.push(d,c))}function dc(b,c,d,e){function f(g){b.ma(c,d,f);e(g)}L(b,c,d,f)}ac.prototype.ma=function(b,c,d){if(this.b)for(var e=this.b.get(c)||[],f=0;f=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return uc(b,!1);if(0==c[1]&&0==c[3])return uc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return sc(b);throw new D(2,2,2003);}z(\"shaka.util.StringUtils.fromBytesAutoDetect\",xc);\nfunction yc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;dd&&(d+=Math.pow(2,32));d=\"0x\"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}\np.Nd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ja?this.F.push(b):Uc(this,b)};\nfunction Uc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];\"individualization-request\"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Sb([f],b.f.retryParameters);f.body=c.message;f.method=\"POST\";f.licenseRequestType=c.messageType;\"com.microsoft.playready\"!=b.a.keySystem&&\"com.chromecast.playready\"!=b.a.keySystem||ed(f);b.a.keySystem.startsWith(\"com.apple.fps\")&&fd(f);b.w.nb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();\nthis.a.keySystem.startsWith(\"com.apple.fps\")&&gd(b);return d.update(b.data).then(function(){var b=this;this.w.onEvent(new I(\"drmsessionupdate\"));e&&(e.ua&&e.ua.resolve(),(new B(function(){e.loaded=!0;dd(b)&&b.j.resolve()})).O(hd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))[\"catch\"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))}\nfunction ed(b){var c=uc(b.body,!0,!0);if(c.includes(\"PlayReadyKeyMessage\")){c=(new DOMParser).parseFromString(c,\"application/xml\");for(var d=c.getElementsByTagName(\"HttpHeader\"),e=0;e\"===c.substr(0,5)&&\"\"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Bc(c).buffer}\np.Ld=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if(\"string\"==typeof e){var f=e;e=b;b=f}if(\"com.microsoft.playready\"==this.a.keySystem&&16==e.byteLength&&!pc(\"Tizen\")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}\"com.microsoft.playready\"==this.a.keySystem&&\"status-pending\"==b&&(b=\"usable\");\"status-pending\"!=b&&(c.loaded=!0);\"expired\"==b&&(d=!0);f=Dc(new Uint8Array(e));\nthis.ka.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ua&&(this.b[\"delete\"](b),b.close()[\"catch\"](function(){}));dd(this)&&(this.j.resolve(),this.K.O(id))};function Hc(b){var c=b.ka,d=b.S;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return\"expired\"==b})&&b.g(new D(2,6,6014));b.w.gc(hc(d))}\nfunction jd(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.l){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes(\"persistent-license\"):!1,pc(\"Tizen 3\")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Aa(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs=\"avc1.42E01E\"'},{contentType:'video/webm; codecs=\"vp8\"'}],d=[{videoCapabilities:c,\npersistentState:\"required\",sessionTypes:[\"persistent-license\"]},{videoCapabilities:c}],e=new Map;c=\"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime\".split(\" \").map(function(c){return b(c)});return Promise.all(c).then(function(){return hc(e)})}\nfunction kd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!ad(b,ic(d.mimeType,d.codecs))||e&&e.encrypted&&!ad(b,ic(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}\nfunction ld(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;eb.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function qd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function rd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}\nfunction sd(b){if(!b)return[];for(var c=[],d=0;d>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Cd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}\nyd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};yd.prototype.h=function(){var b={data:Fc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Dd(b,c,d){this.startTime=b;this.direction=Ed;this.endTime=c;this.payload=d;this.region=new Fd;this.position=null;this.positionAlign=Gd;this.size=100;this.textAlign=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight=\"\";this.lineAlign=Kd;this.displayAlign=Ld;this.backgroundColor=this.color=\"\";this.backgroundImage=null;this.fontSize=\"\";this.fontWeight=Md;this.fontStyle=Nd;this.fontFamily=\"\";this.textDecoration=[];this.wrapLine=!0;this.id=\"\"}z(\"shaka.text.Cue\",Dd);\nvar Gd=\"auto\";Dd.positionAlign={LEFT:\"line-left\",RIGHT:\"line-right\",CENTER:\"center\",AUTO:Gd};var Hd=\"center\",Od={LEFT:\"left\",RIGHT:\"right\",CENTER:Hd,START:\"start\",END:\"end\"};Dd.textAlign=Od;var Ld=\"after\",Pd={BEFORE:\"before\",CENTER:\"center\",AFTER:Ld};Dd.displayAlign=Pd;var Ed=\"ltr\";Dd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ed,HORIZONTAL_RIGHT_TO_LEFT:\"rtl\"};var Id=\"horizontal-tb\";Dd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:\"vertical-lr\",VERTICAL_RIGHT_TO_LEFT:\"vertical-rl\"};\nvar Jd=0;Dd.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd=\"start\",Qd={CENTER:\"center\",START:Kd,END:\"end\"};Dd.lineAlign=Qd;var Md=400;Dd.fontWeight={NORMAL:Md,BOLD:700};var Nd=\"normal\",Rd={NORMAL:Nd,ITALIC:\"italic\",OBLIQUE:\"oblique\"};Dd.fontStyle=Rd;Dd.textDecoration={UNDERLINE:\"underline\",LINE_THROUGH:\"lineThrough\",OVERLINE:\"overline\"};\nfunction Fd(){this.id=\"\";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sd;this.scroll=Td}z(\"shaka.text.CueRegion\",Fd);var Sd=1;Fd.units={PX:0,PERCENTAGE:Sd,LINES:2};var Td=\"\";Fd.scrollMode={NONE:Td,UP:\"up\"};function Ud(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.j=\"\";this.i=new Map}var Vd={};z(\"shaka.text.TextEngine.registerParser\",function(b,c){Vd[b]=c});z(\"shaka.text.TextEngine.unregisterParser\",function(b){delete Vd[b]});function Wd(b){return Vd[b]||window.muxjs&&\"application/cea-608\"==b?!0:!1}Ud.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function Xd(b,c){\"application/cea-608\"!=c&&(b.g=new Vd[c])}\nUd.prototype.Gc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};\nfunction Yd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&cthis.a&&c>=this.b&&(this.b=b))}.bind(this))};Ud.prototype.me=function(b){this.c.append(b)};Ud.prototype.appendCues=Ud.prototype.me;\nUd.prototype.nc=function(b,c){this.j=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Ud.prototype.setSelectedClosedCaptionId=Ud.prototype.nc;\nfunction Zd(b,c,d,e,f){var g=d+\" \"+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTimed.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function fe(b,c){return\"text\"==c?b.a.b:pd(ee(b,c))}function ge(b,c,d){if(\"text\"==c)return b=b.a,null==b.b||b.bc&&(c+=.001);this.b[b].timestampOffset=c;this.qb(b)};p.Kf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.qb(b)};\np.Sf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.qb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),me(this,b))};function ie(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){\"QuotaExceededError\"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),me(b,c)}return d.p}\nfunction le(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)me(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function me(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),me(b,c)}};function ne(b,c){b=M(b);c=M(c);return b.split(\"-\")[0]==c.split(\"-\")[0]}function oe(b,c){b=M(b);c=M(c);var d=b.split(\"-\"),e=c.split(\"-\");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split(\"-\");b=c[0]||\"\";c=c[1]||\"\";b=b.toLowerCase();b=pe.get(b)||b;return(c=c.toUpperCase())?b+\"-\"+c:b}function qe(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):\"und\"}\nfunction re(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,oe(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split(\"-\");k=k.split(\"-\");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,oe(d,f))return f;return null}\nvar pe=new Map([[\"aar\",\"aa\"],[\"abk\",\"ab\"],[\"afr\",\"af\"],[\"aka\",\"ak\"],[\"alb\",\"sq\"],[\"amh\",\"am\"],[\"ara\",\"ar\"],[\"arg\",\"an\"],[\"arm\",\"hy\"],[\"asm\",\"as\"],[\"ava\",\"av\"],[\"ave\",\"ae\"],[\"aym\",\"ay\"],[\"aze\",\"az\"],[\"bak\",\"ba\"],[\"bam\",\"bm\"],[\"baq\",\"eu\"],[\"bel\",\"be\"],[\"ben\",\"bn\"],[\"bih\",\"bh\"],[\"bis\",\"bi\"],[\"bod\",\"bo\"],[\"bos\",\"bs\"],[\"bre\",\"br\"],[\"bul\",\"bg\"],[\"bur\",\"my\"],[\"cat\",\"ca\"],[\"ces\",\"cs\"],[\"cha\",\"ch\"],[\"che\",\"ce\"],[\"chi\",\"zh\"],[\"chu\",\"cu\"],[\"chv\",\"cv\"],[\"cor\",\"kw\"],[\"cos\",\"co\"],[\"cre\",\"cr\"],[\"cym\",\"cy\"],[\"cze\",\n\"cs\"],[\"dan\",\"da\"],[\"deu\",\"de\"],[\"div\",\"dv\"],[\"dut\",\"nl\"],[\"dzo\",\"dz\"],[\"ell\",\"el\"],[\"eng\",\"en\"],[\"epo\",\"eo\"],[\"est\",\"et\"],[\"eus\",\"eu\"],[\"ewe\",\"ee\"],[\"fao\",\"fo\"],[\"fas\",\"fa\"],[\"fij\",\"fj\"],[\"fin\",\"fi\"],[\"fra\",\"fr\"],[\"fre\",\"fr\"],[\"fry\",\"fy\"],[\"ful\",\"ff\"],[\"geo\",\"ka\"],[\"ger\",\"de\"],[\"gla\",\"gd\"],[\"gle\",\"ga\"],[\"glg\",\"gl\"],[\"glv\",\"gv\"],[\"gre\",\"el\"],[\"grn\",\"gn\"],[\"guj\",\"gu\"],[\"hat\",\"ht\"],[\"hau\",\"ha\"],[\"heb\",\"he\"],[\"her\",\"hz\"],[\"hin\",\"hi\"],[\"hmo\",\"ho\"],[\"hrv\",\"hr\"],[\"hun\",\"hu\"],[\"hye\",\"hy\"],[\"ibo\",\"ig\"],[\"ice\",\n\"is\"],[\"ido\",\"io\"],[\"iii\",\"ii\"],[\"iku\",\"iu\"],[\"ile\",\"ie\"],[\"ina\",\"ia\"],[\"ind\",\"id\"],[\"ipk\",\"ik\"],[\"isl\",\"is\"],[\"ita\",\"it\"],[\"jav\",\"jv\"],[\"jpn\",\"ja\"],[\"kal\",\"kl\"],[\"kan\",\"kn\"],[\"kas\",\"ks\"],[\"kat\",\"ka\"],[\"kau\",\"kr\"],[\"kaz\",\"kk\"],[\"khm\",\"km\"],[\"kik\",\"ki\"],[\"kin\",\"rw\"],[\"kir\",\"ky\"],[\"kom\",\"kv\"],[\"kon\",\"kg\"],[\"kor\",\"ko\"],[\"kua\",\"kj\"],[\"kur\",\"ku\"],[\"lao\",\"lo\"],[\"lat\",\"la\"],[\"lav\",\"lv\"],[\"lim\",\"li\"],[\"lin\",\"ln\"],[\"lit\",\"lt\"],[\"ltz\",\"lb\"],[\"lub\",\"lu\"],[\"lug\",\"lg\"],[\"mac\",\"mk\"],[\"mah\",\"mh\"],[\"mal\",\"ml\"],[\"mao\",\n\"mi\"],[\"mar\",\"mr\"],[\"may\",\"ms\"],[\"mkd\",\"mk\"],[\"mlg\",\"mg\"],[\"mlt\",\"mt\"],[\"mon\",\"mn\"],[\"mri\",\"mi\"],[\"msa\",\"ms\"],[\"mya\",\"my\"],[\"nau\",\"na\"],[\"nav\",\"nv\"],[\"nbl\",\"nr\"],[\"nde\",\"nd\"],[\"ndo\",\"ng\"],[\"nep\",\"ne\"],[\"nld\",\"nl\"],[\"nno\",\"nn\"],[\"nob\",\"nb\"],[\"nor\",\"no\"],[\"nya\",\"ny\"],[\"oci\",\"oc\"],[\"oji\",\"oj\"],[\"ori\",\"or\"],[\"orm\",\"om\"],[\"oss\",\"os\"],[\"pan\",\"pa\"],[\"per\",\"fa\"],[\"pli\",\"pi\"],[\"pol\",\"pl\"],[\"por\",\"pt\"],[\"pus\",\"ps\"],[\"que\",\"qu\"],[\"roh\",\"rm\"],[\"ron\",\"ro\"],[\"rum\",\"ro\"],[\"run\",\"rn\"],[\"rus\",\"ru\"],[\"sag\",\"sg\"],[\"san\",\n\"sa\"],[\"sin\",\"si\"],[\"slk\",\"sk\"],[\"slo\",\"sk\"],[\"slv\",\"sl\"],[\"sme\",\"se\"],[\"smo\",\"sm\"],[\"sna\",\"sn\"],[\"snd\",\"sd\"],[\"som\",\"so\"],[\"sot\",\"st\"],[\"spa\",\"es\"],[\"sqi\",\"sq\"],[\"srd\",\"sc\"],[\"srp\",\"sr\"],[\"ssw\",\"ss\"],[\"sun\",\"su\"],[\"swa\",\"sw\"],[\"swe\",\"sv\"],[\"tah\",\"ty\"],[\"tam\",\"ta\"],[\"tat\",\"tt\"],[\"tel\",\"te\"],[\"tgk\",\"tg\"],[\"tgl\",\"tl\"],[\"tha\",\"th\"],[\"tib\",\"bo\"],[\"tir\",\"ti\"],[\"ton\",\"to\"],[\"tsn\",\"tn\"],[\"tso\",\"ts\"],[\"tuk\",\"tk\"],[\"tur\",\"tr\"],[\"twi\",\"tw\"],[\"uig\",\"ug\"],[\"ukr\",\"uk\"],[\"urd\",\"ur\"],[\"uzb\",\"uz\"],[\"ven\",\"ve\"],[\"vie\",\n\"vi\"],[\"vol\",\"vo\"],[\"wel\",\"cy\"],[\"wln\",\"wa\"],[\"wol\",\"wo\"],[\"xho\",\"xh\"],[\"yid\",\"yi\"],[\"yor\",\"yo\"],[\"zha\",\"za\"],[\"zho\",\"zh\"],[\"zul\",\"zu\"]]);function se(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function te(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=se(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}\nfunction ue(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.N&&!kd(b,e))return!1;var f=e.audio;e=e.video;return f&&!be(f)||e&&!be(e)||f&&c&&!ve(f,c)||e&&d&&!ve(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Wd(ic(b.mimeType,b.codecs))})}function ve(b,c){return b.mimeType!=c.mimeType||b.codecs.split(\".\")[0]!=c.codecs.split(\".\")[0]?!1:!0}\nfunction we(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:\"variant\",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(\", \"),\naudioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||\nnull,b.label=c.label,b.audioRoles=c.roles);return b}function xe(b){return{id:b.id,active:!1,type:\"text\",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}\nfunction ye(b){b.__shaka_id||(b.__shaka_id=ze++);return b.__shaka_id}var ze=0;function Ae(b){return{id:ye(b),active:!1,type:\"\",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}\nfunction Be(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ce(b){return b.filter(function(b){return Be(b)})}\nfunction De(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}\nfunction Ee(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:\"\";e=e.filter(function(b){return b.language==g});if(c){var h=re(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Fe(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(td.uc,[]);return b.length?Fe(e,b[0]):e}\nfunction Fe(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Ge(b,c,d){for(var e=0;e=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};\nN.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Wa(d.b,f,e);Wa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};\nN.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;\nfunction Ie(b,c){b&&(c=c.filter(function(c){return se(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Je(b,c){this.a=b;this.b=c}Je.prototype.toString=function(){return\"v\"+this.a+\".\"+this.b};function Ke(b,c){var d=new Je(2,6),e=Le,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Me(b,c,d,e){$a([d,\"has been deprecated and will be removed in\",c,\". We are currently at version\",b,\". Additional information:\",e].join(\" \"))}function Ne(b,c,d,e){Za([d,\"has been deprecated and has been removed in\",c,\". We are now at version\",b,\". Additional information:\",e].join(\"\"))}var Le=null;var Oe=\"ended play playing pause pausing ratechange seeked seeking timeupdate volumechange\".split(\" \"),Pe=\"buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume\".split(\" \"),Qe=[\"loop\",\"playbackRate\"],Re=[\"pause\",\"play\"],Se=\"abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged\".split(\" \"),Te={getAssetUri:2,\ngetAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Ue={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ve=[[\"getConfiguration\",\"configure\"]],We=[[\"isTextTrackVisible\",\"setTextTrackVisibility\"]],\nXe=\"addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay\".split(\" \"),Ye=[\"attach\",\"detach\",\"load\",\"unload\"];\nfunction Ze(b){return JSON.stringify(b,function(b,d){if(\"function\"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&\"object\"==typeof g?\"detail\"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:\"TimeRanges\",length:d.length,start:[],end:[]},f=0;fd?\"-Infinity\":\"Infinity\":d;return c}})}function $e(b){return JSON.parse(b,function(b,d){return\"NaN\"==d?NaN:\"-Infinity\"==d?-Infinity:\"Infinity\"==d?Infinity:d&&\"object\"==typeof d&&\"TimeRanges\"==d.__type__?af(d):d&&\"object\"==typeof d&&\"Uint8Array\"==d.__type__?new Uint8Array(d.entries):d})}function af(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function bf(b,c,d,e,f,g){this.N=b;this.f=new B(c);this.S=d;this.j=!1;this.F=e;this.K=f;this.w=g;this.b=this.h=!1;this.C=\"\";this.i=null;this.m=this.Jd.bind(this);this.o=this.ef.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var cf=!1,df=null;p=bf.prototype;p.destroy=function(){ef(this);df&&ff(this);this.f&&(this.f.stop(),this.f=null);this.K=this.F=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.da=function(){return this.b};\np.Xc=function(){return this.C};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.oc();var b=new chrome.cast.SessionRequest(this.N);b=new chrome.cast.ApiConfig(b,this.Kd.bind(this),this.jf.bind(this),\"origin_scoped\");chrome.cast.initialize(b,function(){},function(){});cf&&this.f.O(.02);(b=df)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Kd(b):df=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};\np.cd=function(b){this.i=b;this.b&&gf({type:\"appData\",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!cf)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Vc.bind(this,b),this.Id.bind(this));return this.g};p.Zb=function(){this.b&&(ef(this),df&&(ff(this),df.stop(function(){},function(){}),df=null))};\np.get=function(b,c){if(\"video\"==b){if(Re.includes(c))return this.Ud.bind(this,b,c)}else if(\"player\"==b){if(Ue[c]&&!this.get(\"player\",\"isLive\")())return function(){};if(Xe.includes(c))return this.Ud.bind(this,b,c);if(Ye.includes(c))return this.zf.bind(this,b,c);if(Te[c])return this.Rd.bind(this,b,c)}return this.Rd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;gf({type:\"set\",targetName:b,property:c,value:d})};\np.Vc=function(b,c){df=c;c.addUpdateListener(this.m);c.addMessageListener(\"urn:x-cast:com.google.shaka.v2\",this.o);this.Jd();gf({type:\"init\",initState:b,appData:this.i});this.g.resolve()};p.Id=function(b){var c=8003;switch(b.code){case \"cancel\":c=8004;break;case \"timeout\":c=8005;break;case \"receiver_unavailable\":c=8006}this.g.reject(new D(2,8,c,b))};p.Rd=function(b,c){return this.a[b][c]};\np.Ud=function(b,c,d){for(var e=[],f=2;f LA_URL\"))?b.textContent:\"\"}\nfunction wf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=tf.get(f.Xd);if(g){var h=vd(g,f.init||b);if(g=Af.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}\nvar Af=(new Map).set(\"com.widevine.alpha\",function(b){return(b=P.td(b.node,\"urn:microsoft\",\"laurl\"))?b.getAttribute(\"licenseUrl\")||\"\":\"\"}).set(\"com.microsoft.playready\",function(b){b=P.td(b.node,\"urn:microsoft:playready\",\"pro\");if(!b)return\"\";b=Bc(b.textContent);b=yf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return\"\";b=uc(b.value,!0);return(b=P.Pd(b,\"WRMHEADER\"))?zf(b):\"\"});function vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Bf(d.value))&&c.push(d);return c}\nfunction Bf(b){var c=b.getAttribute(\"schemeIdUri\"),d=P.getAttributeNS(b,\"urn:mpeg:cenc:2013\",\"default_KID\"),e=P.ud(b,\"urn:mpeg:cenc:2013\",\"pssh\").map(P.ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,\"\").toLowerCase(),d.includes(\" \")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:\"cenc\",initData:Bc(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,Xd:c,keyId:d,init:0x)if(q+1=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0this.I.byteLength&&Kf();var c=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Va;\nR.prototype.J=function(b){this.a+b>this.I.byteLength&&Kf();this.a+=b};R.prototype.skip=R.prototype.J;R.prototype.Wd=function(b){this.ab||b>this.I.byteLength)&&Kf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.Wc=function(){for(var b=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.I.buffer,this.I.byteOffset+b,this.a-b);this.a+=1;return sc(b)};\nR.prototype.readTerminatedString=R.prototype.Wc;function Kf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z(\"shaka.util.Mp4Parser\",S);S.prototype.G=function(b,c){var d=Lf(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.G;S.prototype.ca=function(b,c){var d=Lf(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ca;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;\nS.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.pa()&&!this.a;)this.ic(0,d,c)};S.prototype.parse=S.prototype.parse;\nS.prototype.ic=function(b,c,d){var e=c.aa(),f=c.D(),g=c.D();switch(f){case 0:f=c.I.byteLength-e;break;case 1:f=c.ub()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.D(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.I.byteLength&&(g=c.I.byteLength);g-=c.aa();c=0>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Pf;function Qf(b,c,d,e){var f,g=(new S).ca(\"sidx\",function(b){f=Rf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}\nfunction Rf(b,c,d,e){var f=[];e.reader.J(4);var g=e.reader.D();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.D();var k=e.reader.D()}else h=e.reader.ub(),k=e.reader.ub();e.reader.J(2);var l=e.reader.Jb();b=b+e.size+k;for(k=0;k>>31;m&=2147483647;var q=e.reader.D();e.reader.J(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z(\"shaka.media.SegmentIndex\",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&bb||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;cg.startTime?0==d&&c.push(g):(.1b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.zc;function Sf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Tf(b){this.b=b;this.a=new R(b,0);Uf||(Uf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Uf;Tf.prototype.pa=function(){return this.a.pa()};\nfunction Vf(b){var c=Wf(b);if(7=d&&!(c&1<<8-d);d++);if(8b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Cf(h,l,b+f,k,c*g);return ud(m,[d])},0,null)}}}\nfunction ng(b,c){for(var d=[],e=0;eb.o||b.i.O(Math.max(3,b.o-c,Xa(b.v)))}\nfunction xg(b,c,d){c=c||{contentType:\"\",mimeType:\"\",codecs:\"\",emsgSchemeIdUris:[],frameRate:void 0,Sc:null};d=d||c.la;var e=P.rb,f=P.ve,g=P.P(b,\"BaseURL\").map(P.ac),h=b.getAttribute(\"contentType\")||c.contentType,k=b.getAttribute(\"mimeType\")||c.mimeType,l=b.getAttribute(\"codecs\")||c.codecs;f=P.H(b,\"frameRate\",f)||c.frameRate;var m=P.P(b,\"InbandEventStream\"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute(\"schemeIdUri\"),n.includes(q)||n.push(q);m=P.P(b,\n\"AudioChannelConfiguration\");m=Cg(m)||c.Sc;h||(h=Ag(k,l));return{la:ud(d,g),Lb:P.Yb(b,\"SegmentBase\")||c.Lb,Ga:P.Yb(b,\"SegmentList\")||c.Ga,Nb:P.Yb(b,\"SegmentTemplate\")||c.Nb,width:P.H(b,\"width\",e)||c.width,height:P.H(b,\"height\",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute(\"id\"),Sc:m}}\nfunction Cg(b){for(var c=0;c>=1;return b}}}return null}function Bg(b){var c=b.Lb?1:0;c+=b.Ga?1:0;c+=b.Nb?1:0;if(0==c)return\"text\"==b.contentType||\"application\"==b.contentType?!0:!1;1!=c&&(b.Lb&&(b.Ga=null),b.Nb=null);return!0}\nfunction Dg(b,c,d,e){c=ud(c,[d]);c=Sb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Ob(b.g,c);return c.promise.then(function(b){if(\"HEAD\"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=sc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}\nfunction wg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute(\"schemeIdUri\"),value:b.getAttribute(\"value\")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:\"urn:mpeg:dash:utc:http-head:2014\",value:e});return td.te(d,function(b){var d=b.scheme;b=b.value;switch(d){case \"urn:mpeg:dash:utc:http-head:2014\":case \"urn:mpeg:dash:utc:http-head:2012\":return Dg(this,c,b,\"HEAD\");case \"urn:mpeg:dash:utc:http-xsdate:2014\":case \"urn:mpeg:dash:utc:http-iso:2014\":case \"urn:mpeg:dash:utc:http-xsdate:2012\":case \"urn:mpeg:dash:utc:http-iso:2012\":return Dg(this,\nc,b,\"GET\");case \"urn:mpeg:dash:utc:direct:2014\":case \"urn:mpeg:dash:utc:direct:2012\":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case \"urn:mpeg:dash:utc:http-ntp:2014\":case \"urn:mpeg:dash:utc:ntp:2014\":case \"urn:mpeg:dash:utc:sntp:2014\":return $a(\"NTP UTCTiming scheme is not supported\"),Promise.reject();default:return $a(\"Unrecognized scheme in UTCTiming element\",d),Promise.reject()}}.bind(b))[\"catch\"](function(){$a(\"A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!\");\nreturn 0})}p.rf=function(b,c,d){var e=P.rb,f=d.getAttribute(\"schemeIdUri\")||\"\",g=d.getAttribute(\"value\")||\"\",h=P.H(d,\"timescale\",e)||1;P.P(d,\"Event\").forEach(function(d){var k=P.H(d,\"presentationTime\",e)||0,m=P.H(d,\"duration\",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute(\"id\")||\"\",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};\np.Cf=function(b,c,d){b=og(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Ob(this.g,b);return b.promise.then(function(b){return b.data})};function Ag(b,c){return Wd(ic(b,c))?\"text\":b.split(\"/\")[0]}U.Zc(\"mpd\",pg);U.Kb(\"application/dash+xml\",pg);function Eg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Fg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Fg.prototype.toString=function(){function b(b){return b.name+\"=\"+(isNaN(Number(b.value))?'\"'+b.value+'\"':b.value)}var c=\"#\"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0c.length||\"data\"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(\":\").split(\",\");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(\",\"));d=d.split(\";\");var e=null;1w.Pc&&(w.stream.presentationTimeOffset=-x,w.Mb.offset(x))}else for(b.b.ta(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset=\nh,A.Mb.offset(-h),Sf(A.Mb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}\nfunction dh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.l){case 1:return f=Jg,g=td,h=c.a,k=f.hb(c.a,\"EXT-X-MEDIA\"),l=k.filter(function(b){return\"SUBTITLES\"==fh(b,\"TYPE\")}.bind(b)),m=l.map(function(b){return gh(this,b)}.bind(b)),n=k.filter(function(b){return\"CLOSED-CAPTIONS\"==fh(b,\"TYPE\")}),hh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.hb(h,\"EXT-X-STREAM-INF\"),w=x.map(function(b){return ih(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=\ne.s,C=A.reduce(g.uc,[]),C=C.filter(function(b){return null!=b}),e[\"return\"]({startTime:0,variants:C,textStreams:q})}})})}\nfunction ih(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb,fb;return y(f,function(f){switch(f.l){case 1:g=wd;h=Jg;k=Hg(c,\"CODECS\",\"avc1.42E01E,mp4a.40.2\");l=jh(k.split(/\\s*,\\s*/));m=c.getAttribute(\"RESOLUTION\");q=n=null;x=Hg(c,\"FRAME-RATE\");w=Number(fh(c,\"BANDWIDTH\"));m&&(A=m.value.split(\"x\"),n=A[0],q=A[1]);C=h.hb(d.a,\"EXT-X-MEDIA\");C=C.filter(function(b){return\"CLOSED-CAPTIONS\"!=fh(b,\"TYPE\")});C=C.filter(function(b){var c=Hg(b,\"URI\")||\"\";return\"SUBTITLES\"==\n(Hg(b,\"TYPE\")||\"\")||\"\"!=c});E=Hg(c,\"AUDIO\");F=Hg(c,\"VIDEO\");E?C=h.Cc(C,\"AUDIO\",E):F&&(C=h.Cc(C,\"VIDEO\",F));if(V=kh(g.na,l)){if(Y=Hg(c,\"SUBTITLES\"))wa=h.Cc(C,\"SUBTITLES\",Y),wa.length&&(Ba=b.C.get(wa[0].id),Ba.stream.codecs=V);Kb(l,V)}ba=C.map(function(b){return lh(this,b,l)}.bind(b));na=[];xa=[];return u(f,Promise.all(ba),2);case 2:Va=f.s;Va=Va.filter(function(b){return null!=b});E?na=Va:F&&(xa=Va);vb=!1;na.length||xa.length?na.length?(eb=fh(c,\"URI\"),fb=na[0].pc,eb==fb?(Ca=g.wb,vb=!0):Ca=g.La):Ca=\ng.wb:1==l.length?(Ia=kh(g.La,l),Ca=m||x||Ia?g.La:g.wb):(Ca=g.La,l=[l.join(\",\")]);if(vb){f.A(3);break}return u(f,mh(b,c,l,Ca),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.wb?na=[ja]:xa=[ja];else if(null===ja)return f[\"return\"]([]);xa&&nh(xa);na&&nh(na);return f[\"return\"](oh(b,na,xa,w,n,q,x))}})})}function nh(b){b.forEach(function(b){var c=b.stream.codecs.split(\",\");c=c.filter(function(b){return\"mp4a.40.34\"!=b});b.stream.codecs=c.join(\",\")})}\nfunction oh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.pc:\"\")+\" - \"+(l?l.pc:\"\");var C=void 0;if(n&&x)if(w.length&&A.length?0>4,0!=e&&2!=e||c(),3==e&&(e=b.ha(),b.J(e)),1!=b.D()>>8)b.seek(d+188),e=b.ha(),71!=e&&(b.seek(d+192),e=b.ha()),71!=e&&(b.seek(d+204),e=b.ha()),71!=e&&c(),b.Wd(1);else return b.J(3),d=b.ha()>>6,0!=d&&1!=d||c(),0==b.ha()&&c(),d=b.ha(),e=b.Jb(),b=b.Jb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}\nfunction Dh(b,c,d){b=ic(b,c);if(!Wd(b))return 0;c=new Ud(null);Xd(c,b);return c.Gc(d)}function jh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=lc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function kh(b,c){for(var d=Eh[b],e=0;ef-.5)){c=!0;break a}}c=!1}return c};function Zh(b,c,d,e,f){var g=this;this.b=b;this.w=c;this.v=d;this.m=f;this.g=new ac;this.j=!1;this.o=b.readyState;this.f=!1;this.c=e;this.i=!1;L(this.g,b,\"waiting\",function(){return $h(g)});this.h=(new B(function(){$h(g)})).Ia(.25)}Zh.prototype.a=function(){this.g&&(this.g.a(),this.g=null);null!=this.h&&(this.h.stop(),this.h=null);this.c&&(this.c.a(),this.c=null);this.b=this.w=this.m=null};Zh.prototype.Uc=function(){this.i=!0;$h(this)};\nfunction $h(b){if(0!=b.b.readyState){if(b.b.seeking){if(!b.j)return}else b.j=!1;if(!b.b.paused){b.b.readyState!=b.o&&(b.f=!1,b.o=b.b.readyState);var c=b.v.smallGapLimit,d=b.b.currentTime,e=b.b.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=pc(\"Edge/\")||pc(\"Trident/\")||pc(\"Tizen\")||pc(\"CrKey\")?.5:.1;for(var g=0;gd&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.c){b=b.c;d=b.g;e=Wh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.c!=\nd||b.h!=e)b.f=f,b.c=d,b.h=e;d=f-b.f;d>=b.i&&e&&b.b(b.c,d)}}else if(0!=f||b.i){g=e.start(f);var h=b.w.wa();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.f||(b.f=!0,d=new I(\"largegap\",{currentTime:d,gapSize:h}),d.cancelable=!0,b.m(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.b.currentTime=g)}}}}};function ai(b){var c=this;this.f=b;this.b=new Set;this.c=(new B(function(){bi(c,!1)})).Ia(.25)}ai.prototype.a=function(){this.c.stop();for(var b=r(this.b),c=b.next();!c.done;c=b.next())c.value.a();this.b.clear()};function bi(b,c){for(var d=r(b.b),e=d.next();!e.done;e=d.next())e.value.h(b.f.currentTime,c)};function ci(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function di(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function ei(b){this.f=b;this.b=null;this.c=function(){}}ei.prototype.a=function(){this.b=this.f=null;this.c=function(){}};ei.prototype.h=function(b){var c=this.b,d=this.f.periods;b=di(d,b)||d[0];c!=b&&this.c(b);this.b=b};function fi(b,c){b.c=c};function gi(b){var c=this;this.b=b;this.g=!1;this.f=this.b.cc();this.c=new B(function(){c.b.Ed(.25*c.f)})}gi.prototype.a=function(){this.c&&(this.c.stop(),this.c=null);this.b=null};gi.prototype.set=function(b){this.f=b;hi(this)};function hi(b){b.c.stop();var c=b.g?0:b.f;0<=c?b.b.cc()!=c&&b.b.ed(c):(b.c.Ia(.25),0!=b.b.cc()&&b.b.ed(0))};function ii(b,c,d){this.b=b;this.g=c;this.h=d;this.c=new ac;this.f=new ji(b);0Math.abs(b.b.currentTime-c)?ni(b):(dc(b.c,b.b,\"seeking\",function(){ni(b)}),oi(b.f,0==b.b.currentTime?c:b.b.currentTime))}function ni(b){L(b.c,b.b,\"seeking\",function(){return b.g()})}function ji(b){var c=this;this.c=b;this.i=10;this.h=this.g=this.f=0;this.b=new B(function(){0>=c.f?c.b.stop():c.c.currentTime!=c.g?c.b.stop():(c.c.currentTime=c.h,c.f--)})}ji.prototype.a=function(){this.b&&(this.b.stop(),this.b=null);this.c=null};\nfunction oi(b,c){b.g=b.c.currentTime;b.h=c;b.f=b.i;b.c.currentTime=c;b.b.Ia(.1)};function pi(b){function c(){d.g=!0;null!=d.c&&(d.b.currentTime=d.c)}var d=this;this.b=b;this.g=!1;this.c=null;this.f=new ac;0==this.b.readyState?dc(this.f,this.b,\"loadedmetadata\",c):c()}pi.prototype.a=function(){this.f&&(this.f.a(),this.f=null);this.b=null};pi.prototype.o=function(b){this.c=this.g?this.c:b};pi.prototype.i=function(){return(this.g?this.b.currentTime:this.c)||0};pi.prototype.v=function(){};\nfunction qi(b,c,d,e,f,g){var h=this;this.c=b;this.b=c.presentationTimeline;this.C=c.minBufferTime||0;this.h=d;this.w=f;this.m=null;this.g=new Zh(b,c.presentationTimeline,d,ri(b,d),g);this.f=new ii(b,function(){a:{var b=h.g;b.j=!0;b.i=!1;b.f=!1;var c=mi(h.f);b=si(h,c);if(.001d-c&&(c=d-3);bb.b.Y()?b.b.ib():b.b.wa():0>c&&(c=b.b.wa()+c);return vi(b,ui(b,c))}qi.prototype.v=function(){this.g.Uc()};function vi(b,c){var d=b.b.Y();return c>=d?d-b.h.durationBackoff:c}function si(b,c){var d=qd.bind(null,b.c.buffered),e=Math.max(b.C,b.h.rebufferingGoal),f=b.h.safeSeekOffset,g=b.b.ib(),h=b.b.wa(),k=b.b.Y();3>h-g&&(g=h-3);var l=b.b.Cb(e),m=b.b.Cb(f);e=b.b.Cb(e+f);return c>=k?vi(b,c):c>h?h:c=l||d(c)?c:e}\nfunction ui(b,c){var d=b.b.ib();if(cd?d:c}function ri(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Vh(new Yh(b),c.stallThreshold);Xh(e,function(){b.currentTime+=d});return e};function wi(){this.c=function(){};this.b=new Set}wi.prototype.a=function(){this.c=function(){};this.b.clear()};function xi(b,c){b.c=c};function yi(b){var c=this;this.i=b;this.g=new Map;this.b=function(){};this.c=function(){};this.f=function(){};this.j=[{Za:null,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Ai,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Bi,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:zi,Ya:Ai,Sa:function(b,e){return c.c(b,e)}},{Za:zi,Ya:Bi,Sa:function(b,e){return c.c(b,e)}},{Za:Ai,Ya:Bi,Sa:function(b,e){return c.f(b,e)}},{Za:Bi,Ya:Ai,Sa:function(b,e){return c.f(b,e)}}]}\nyi.prototype.a=function(){this.i=null;this.g.clear();this.b=function(){};this.c=function(){};this.f=function(){}};yi.prototype.h=function(b,c){for(var d=r(this.i.b),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.g.get(e),g=be.endTime?Bi:zi;this.g.set(e,g);for(var h=r(this.j),k=h.next();!k.done;k=h.next())k=k.value,k.Za==f&&k.Ya==g&&k.Sa(e,c)}};function Ci(b,c,d,e){b.b=c;b.c=d;b.f=e}var Ai=1,zi=2,Bi=3;function Di(b,c){this.a=c;this.c=b;this.g=null;this.j=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.F=null;this.C=this.f=this.m=!1;this.w=0}Di.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Ei(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};\nDi.prototype.configure=function(b){this.g=b;this.F=new tb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};\nDi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.l){case 1:return e=b.a.Qa(),f=Fi(b,e),g=b.a.Hd(b.c.periods[f]),g.variant||g.text?u(d,Gi(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d[\"return\"](new D(2,5,5005));case 2:if(b.f)return d[\"return\"]();b.a&&b.a.bf&&b.a.bf();v(d)}})})};function Hi(b){return Ii(b,\"audio\")}function Ji(b){return Ii(b,\"video\")}\nfunction Ii(b,c){var d=b.b.get(c);return d?d.Fa||d.stream:null}function Ki(b,c){return t(function e(){var f,g,h,k,l,m,n,q;return y(e,function(e){switch(e.l){case 1:return f=wd,u(e,je(b.a.L,f.na),2);case 2:return b.w++,b.C=!1,g=b.w,h=b.a.L,k=new Map,l=new Set,k.set(f.na,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e[\"return\"]():u(e,Li(b,l),4);case 4:if(b.f)return e[\"return\"]();b.w!=g||b.b.has(f.na)||b.C||(m=b.a.Qa(),n=Fi(b,m),q=Mi(c,n,0),b.b.set(f.na,q),Ni(b,q,0));v(e)}})})}\nfunction Oi(b,c){var d=b.b.get(\"video\");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Fa&&(Pi(b,f,!1,0),d.Fa=e)}else if(e=d.Fa)d.Fa=null,Pi(b,e,!0,0)}}function Qi(b,c,d,e){c.video&&Pi(b,c.video,d,e);c.audio&&Pi(b,c.audio,d,e)}\nfunction Pi(b,c,d,e){var f=b.b.get(c.type);if(!f&&\"text\"==c.type&&b.g.ignoreTextStreamFailures)Ki(b,c);else if(f){var g=Ri(b,c);if(d&&g!=f.ya)b.b.forEach(function(c){Si(b,c)});else{f.Fa&&(c.trickModeVideo?(f.Fa=c,c=c.trickModeVideo):f.Fa=null);var h=b.h[g];h&&h.vb&&(h=b.i.get(c.id))&&h.vb&&f.stream!=c&&(\"text\"==c.type&&ce(b.a.L,ic(c.mimeType,c.codecs)),f.stream=c,f.ec=!0,Ti(b,f,g)&&f.Hb.abort(),d&&(f.Na?f.qc=!0:f.Ea?(f.Ja=!0,f.Wb=e,f.qc=!0):(Ei(f),Ui(b,f,!0,e))))}}}\nfunction Ti(b,c,d){if(!c.Hb)return!1;var e=b.a.Qa(),f=fe(b.a.L,c.type);b=(b=Vi(b,c,e,f,d))?b.a?b.a-b.b:null:null;if(null==b)return!1;(d=c.stream.initSegmentReference)&&(b+=(d.a?d.a-d.b:null)||0);return c.Hb.b.a>b}\nfunction Wi(b){function c(c){var f=b.a.L;\"text\"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&dc?b.a.L.ta(c):b.a.L.ta(Math.pow(2,32))}\nfunction Zi(b,c){if(!b.f&&!c.Ea&&null!=c.Ba&&!c.Na)if(c.Ba=null,c.Ja)Ui(b,c,c.qc,c.Wb);else{try{var d=$i(b,c);null!=d&&(Ni(b,c,d),c.Eb=!1)}catch(e){aj(b,e);return}d=Array.from(b.b.values());bj(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.L.endOfStream().then(function(){if(!this.f){var b=this.a.L.Y();b=b.c.presentationTimeline.Y())return c.endOfStream=!0,\"video\"==c.type&&(f=b.b.get(\"text\"))&&\"application/cea-608\"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.ya=h;if(h!=g)return null;\nif(k>=l)return.5;h=fe(b.a.L,c.type);h=Vi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=cj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.Vd=0;dj(b,c,e,g,h);return null}function cj(b,c,d){if(!c.lb||!c.xa)return Math.max(d,c.Vd);d=Ri(b,c.lb);return b.c.periods[d].startTime+c.xa.endTime}\nfunction Vi(b,c,d,e,f){if(c.xa&&c.stream==c.lb)return ej(b,c,f,c.xa.position+1);c.xa?(d=Ri(b,c.lb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.xa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=ej(b,c,f,Math.max(0,d-1)));return g||ej(b,c,f,d)}\nfunction ej(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Db();e=e.jb();return d.startTime+c.endTimee?null:c}\nfunction dj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=fj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ea=!0;c.ec=!1;k=gj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return hj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ea=!1,c.Yc=!1,c.Ja||this.a.Uc(),Ni(this,c,0),ij(this,h))}.bind(b))[\"catch\"](function(b){this.f||this.m||(c.Ea=!1,\"text\"==c.type&&this.g.ignoreTextStreamFailures?this.b[\"delete\"](\"text\"):\n7001==b.code?(c.Ea=!1,c.Ba=null,Ni(this,c,0)):3017==b.code?jj(this,c,b):(c.Eb=!0,b.severity=2,aj(this,b)))}.bind(b))}function jj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Yc})){var e=Math.round(100*b.j);if(20=d?Promise.resolve():b.a.L.remove(c.type,f,f+d).then(function(){}.bind(b))}\nfunction ij(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||\"text\"!=d[0].type)b.o=d.every(function(b){return\"text\"==b.type?!0:!b.Ja&&!b.Na&&b.xa});if(b.o){d=Ri(b,c);b.h[d]||Yi(b,d).then(function(){this.f||this.a.Gd()}.bind(b))[\"catch\"](td.Gb);for(d=0;d=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b[\"x-shaka-from-cache\"]};f=null;try{f=xc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function nj(b,c,d,e){var f=new nj.b;gc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new nj.a,h={pd:!1,ce:!1};b=nj.h(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?\"include\":void 0},h,e);b=new H(b,function(){h.pd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.ce=!0;g.abort()});k.O(c/1E3);b[\"finally\"](function(){k.stop()})}return b}z(\"shaka.net.HttpFetchPlugin\",nj);\nnj.h=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,wa;return y(h,function(h){switch(h.l){case 1:return k=nj.g,l=nj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get(\"Content-Length\"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.l){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Aa(h,3);break;case 2:return Da(h),h[\"return\"]();case 3:d.done||(q+=d.value.byteLength);\ne=Date.now();if(100c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f),\nf.A(3)}})})};U.Kb(\"application/x-offline-manifest\",kk);function lk(b){var c=ck(b);return c&&\"manifest\"==c.a?lk.a(b):c&&\"segment\"==c.a?lk.b(c.key(),c):Ab(new D(2,1,9004,b))}z(\"shaka.offline.OfflineScheme\",lk);lk.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{\"content-type\":\"application/x-offline-manifest\"}};return Cb(b)};lk.b=function(b,c){var d=new Cj;return Cb(void 0).T(function(){return d.init()}).T(function(){return Gj(d,c.ra(),c.$())}).T(function(b){return b.getSegments([c.key()])}).T(function(b){return{uri:c,data:b[0].data,headers:{}}})[\"finally\"](function(){return d.destroy()})};\nRb(\"offline\",lk);function mk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.l){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,nk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=ok(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f[\"return\"](g)}})})}\nfunction ok(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.l){case 1:return g=new Gc({nb:c,onError:function(){},gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Oc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f[\"return\"]([]);case 3:return ya(f,6),u(f,Vc(g),8);case 8:Aa(f,7);break;case 6:return Da(f),\nu(f,g.destroy(),9);case 9:return f[\"return\"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.l){case 1:return ya(c,2),u(c,Yc(g,b),4);case 4:h.push(b);Aa(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f[\"return\"](h)}})})}\nfunction nk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Mb(b.audioCapabilities,c.audioCapabilities,d)&&Mb(b.videoCapabilities,c.videoCapabilities,d)};function pk(b,c){var d=qk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.j=!0;this.m=Promise.resolve().then(function(){return rk(e)})}pk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return b.j=!1,b.b&&b.b.abort(),sk(b),u(d,b.m,2);case 2:b.a&&b.a.qa.Ua();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.qa.Ua();b.a=null;b.f=[];b.g=null;v(d)}})})};\nfunction tk(b,c){var d={pb:function(){},fc:function(){},Ua:function(){},onError:function(){},hc:function(){},rg:function(){}};b.f.push({create:c,qa:d});b.b&&b.b.abort();sk(b);return d}\nfunction rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:if(b.j){if(0==b.f.length||b.a&&!b.a.Ra)var e=!1;else{b.a&&(b.a.qa.Ua(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.qa.pb(),b.a={node:g.node,payload:g.payload,Ra:g.Ra,qa:e.qa}):e.qa.hc();e=!0}e?e=Promise.resolve():b.a?e=uk(b):(b.g.af(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})}\nfunction uk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return b.c=b.g.Ke(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ue(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.qa.fc(),b.a=null);Aa(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.qa.Ua();else b.a.qa.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function sk(b){b.h&&(b.h.resolve(),b.h=null)};function vk(b){this.a=null;for(var c=0;cb});return!0};vk.prototype.remove=vk.prototype.remove;\nvk.prototype.append=function(b){for(var c=xk,d=[],e=0;e=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}\"center\"==b.textAlign&&\"center\"!=c.align&&(c.align=\"middle\");\"vertical-lr\"==b.writingMode?c.vertical=\"lr\":\"vertical-rl\"==b.writingMode&&(c.vertical=\"rl\");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}\nfunction wk(b,c){var d=b.mode;b.mode=\"showing\"==d?\"showing\":\"hidden\";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function yk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+\".\"+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Ib(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Ib(m)),l=yk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z(\"shaka.util.ConfigUtils.mergeConfigObjects\",yk);function zk(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:ub(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:ub(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:\"\",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:ub(),\nfailureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};pc(\"Web0S\")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,\nswitchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:\"\",preferredTextLanguage:\"\",preferredVariantRole:\"\",preferredTextRole:\"\",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,\ntextDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Ak(b,h.preferredAudioLanguage)};return h}function Bk(b,c,d){var e={\".drm.servers\":\"\",\".drm.clearKeys\":\"\",\".drm.advanced\":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:\"\",audioRobustness:\"\",serverCertificate:new Uint8Array(0),individualizationServer:\"\"}};return yk(b,c,d||zk(),e,\"\")}\nfunction Ak(b,c){var d=b.filter(function(b){return\"variant\"==b.type}),e=[],f=re(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/\n2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,\"text\"==h.type&&d.push(h);return d};function Ck(){this.a=null;this.b=[]}function Dk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Ek(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}\nfunction Fk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Gk(){this.b=this.c=null;this.a=[]}function Hk(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:\"text\",fromAdaptation:d,bandwidth:null}))};function Ik(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN;this.a=new Ck;this.b=new Gk};function X(b,c){var d=this;J.call(this);this.g=Jk;this.a=null;this.$a=!1;this.i=new ac;this.rc=this.j=this.xb=this.b=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.F=this.h=this.N=null;this.Ad=1E9;this.Tb=new Set;this.eb=!0;this.ka=null;this.yd=!1;this.wd=0;this.ja=null;this.C=new Gh;this.c=Kk(this);this.Ub={width:Infinity,height:Infinity};this.v=null;this.Rb=new Ph(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount);this.Ka=this.c.preferredTextLanguage;\nthis.yb=this.c.preferredTextRole;c&&c(this);this.N=Lk(this);L(this.i,window,\"online\",function(){d.ad()});this.w={name:\"detach\"};this.S={name:\"attach\"};this.Ca={name:\"unload\"};this.yc={name:\"manifest-parser\"};this.xc={name:\"manifest\"};this.ab={name:\"media-source\"};this.sc={name:\"drm-engine\"};this.W={name:\"load\"};this.Ac={name:\"src-equals-drm-engine\"};this.cb={name:\"src-equals\"};var e=new Map;e.set(this.S,function(b,c){return Db(Mk(d,b,c))});e.set(this.w,function(b){b.u&&(d.i.ma(b.u,\"error\"),b.u=null);\nd.a=null;b=Promise.resolve();return Db(b)});e.set(this.Ca,function(b){return Db(Nk(d,b))});e.set(this.ab,function(b){b=Ok(d,b);return Db(b)});e.set(this.yc,function(b,c){var e=Pk(d,b,c);return Db(e)});e.set(this.xc,function(b){return Qk(d,b)});e.set(this.sc,function(){var b=Rk(d);return Db(b)});e.set(this.W,function(b,c){return Db(Sk(d,b,c))});e.set(this.Ac,function(b){b=Tk(d,b);return Db(b)});e.set(this.cb,function(b,c){return Uk(d,b,c)});this.fb=new pk(this.w,{Ke:function(b,c,e,k){var f=null;b==\nd.w&&(f=e==d.w?d.w:d.S);b==d.S&&(f=e==d.w||c.u!=k.u?d.w:e==d.S?d.S:e==d.ab||e==d.W?d.ab:e==d.cb?d.Ac:null);b==d.ab&&(f=e==d.W&&c.u==k.u?d.yc:d.Ca);b==d.yc&&(f=Vk(d.W,d.xc,d.Ca,e,c,k));b==d.xc&&(f=Vk(d.W,d.sc,d.Ca,e,c,k));b==d.sc&&(f=Vk(d.W,d.W,d.Ca,e,c,k));b==d.Ac&&(f=e==d.cb&&c.u==k.u?d.cb:d.Ca);if(b==d.W||b==d.cb)f=d.Ca;b==d.Ca&&(f=k.u&&c.u==k.u?d.S:d.w);return f},ue:function(b,c,h){d.dispatchEvent(new I(\"onstatechange\",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,\nfunction(c){switch(c.l){case 1:return u(c,Nk(d,b),2);case 2:return c[\"return\"](b.u?d.S:d.w)}})})},af:function(b){d.dispatchEvent(new I(\"onstateidle\",{state:b.name}))}});b&&this.zb(b,!0)}Ta(X,J);z(\"shaka.Player\",X);\nX.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:if(b.g==Wk)return d[\"return\"]();b.g=Wk;e=tk(b.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});return u(d,new Promise(function(b){e.pb=function(){};e.fc=function(){b()};e.Ua=function(){b()};e.onError=function(){b()};e.hc=function(){b()}}),2);case 2:return u(d,b.fb.destroy(),3);case 3:b.i&&(b.i.a(),b.i=null);b.rc=null;b.j=null;b.c=null;if(!b.N){d.A(0);break}return u(d,b.N.destroy(),5);\ncase 5:b.N=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version=\"v2.5.0\";var Xk=[\"2\",\"5\"];Le=new function(b){this.a=b;this.c=Me;this.b=Ne}(new Je(Number(Xk[0]),Number(Xk[1])));var Yk=[\"output-restricted\",\"internal-error\"],Zk={};X.registerSupportPlugin=function(b,c){Zk[b]=c};\nX.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?mc()?!0:nc(\"application/x-mpegurl\"):!1};\nX.probeSupport=function(){return jd().then(function(b){for(var c=U.vf(),d={},e=r('video/mp4; codecs=\"avc1.42E01E\",video/mp4; codecs=\"avc3.42E01E\",video/mp4; codecs=\"hev1.1.6.L93.90\",video/mp4; codecs=\"hvc1.1.6.L93.90\",video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\",video/mp4; codecs=\"vp9\",video/mp4; codecs=\"vp09.00.10.08\",audio/mp4; codecs=\"mp4a.40.2\",audio/mp4; codecs=\"ac-3\",audio/mp4; codecs=\"ec-3\",audio/mp4; codecs=\"opus\",audio/mp4; codecs=\"flac\",video/webm; codecs=\"vp8\",video/webm; codecs=\"vp9\",video/webm; codecs=\"vp09.00.10.08\",audio/webm; codecs=\"vorbis\",audio/webm; codecs=\"opus\",video/mp2t; codecs=\"avc1.42E01E\",video/mp2t; codecs=\"avc3.42E01E\",video/mp2t; codecs=\"hvc1.1.6.L93.90\",video/mp2t; codecs=\"mp4a.40.2\",video/mp2t; codecs=\"ac-3\",video/mp2t; codecs=\"ec-3\",text/vtt,application/mp4; codecs=\"wvtt\",application/ttml+xml,application/mp4; codecs=\"stpp\"'.split(\",\")),f=\ne.next();!f.done;f=e.next()){f=f.value;d[f]=mc()?Wd(f)?!0:MediaSource.isTypeSupported(f)||zd(f):nc(f);var g=f.split(\";\")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in Zk)b[h]=Zk[h]();return b})};X.prototype.zb=function(b,c){c=void 0===c?!0:c;if(this.g==Wk)return Promise.reject($k());var d=qk();d.u=b;mc()||(c=!1);var e=c?this.ab:this.S,f=tk(this.fb,function(){return{node:e,payload:d,Ra:!1}});f.pb=function(){};return al(f)};X.prototype.attach=X.prototype.zb;\nX.prototype.detach=function(){var b=this;if(this.g==Wk)return Promise.reject($k());var c=tk(this.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});c.pb=function(){};return al(c)};X.prototype.detach=X.prototype.detach;X.prototype.ld=function(b){var c=this;b=void 0===b?!0:b;if(this.g==Wk)return Promise.reject($k());mc()||(b=!1);var d=qk(),e=tk(this.fb,function(e){var f=e.u&&b?c.ab:e.u?c.S:c.w;d.u=e.u;return{node:f,payload:d,Ra:!1}});e.pb=function(){};return al(e)};X.prototype.unload=X.prototype.ld;\nX.prototype.load=function(b,c,d){if(this.g==Wk)return Promise.reject($k());this.dispatchEvent(new I(\"loading\"));var e=qk();e.uri=b;e.hd=Date.now()/1E3;d&&\"string\"!=typeof d&&(Ke(\"Loading with a manifest parser factory\",\"Please register a manifest parser and for the mime-type.\"),e.va=function(){return new d});d&&\"string\"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=bl(e)?this.cb:this.W,g=tk(this.fb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ra:!0}});g.pb=function(){};\nreturn new Promise(function(b,c){g.hc=function(){return c(new D(2,7,7002))};g.fc=function(){return b()};g.Ua=function(){return c($k())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;\nfunction bl(b){if(b.va)return!1;if(!mc())return!0;var c=b.mimeType;b=b.uri||\"\";c||(c={mp4:\"video/mp4\",m4v:\"video/mp4\",m4a:\"audio/mp4\",webm:\"video/webm\",ts:\"video/mp2t\",m3u8:\"application/x-mpegurl\",mp3:\"audio/mpeg\",aac:\"audio/aac\",flac:\"audio/flac\"}[U.getExtension(b)]);return c?nc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes(\"Apple\"):!0:!1:!1}function Mk(b,c,d){null==c.u&&(c.u=d.u,L(b.i,c.u,\"error\",function(){var c=cl(b);c&&b.Ha(c)}));b.a=c.u;return Promise.resolve()}\nfunction Nk(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:b.g!=Wk&&(b.g=Jk);b.dispatchEvent(new I(\"unloading\"));c.currentTime=null;c.va=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ma(c.u,\"loadeddata\"),b.i.ma(c.u,\"playing\"),b.i.ma(c.u,\"pause\"),b.i.ma(c.u,\"ended\"),b.i.ma(c.u,\"ratechange\"));b.bb&&(b.bb.a(),b.bb=null);b.Qb&&(b.Qb.stop(),b.Qb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.j){e.A(4);break}return u(e,b.j.stop(),4);\ncase 4:if(!b.f){e.A(6);break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.a(),b.o=null);if(!b.F){e.A(8);break}return u(e,b.F.destroy(),9);case 9:b.F=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute(\"src\"),c.u.load());if(!b.h){e.A(10);break}return u(e,b.h.destroy(),11);case 11:b.h=null;case 10:b.C.a.clear(),b.xb=null,b.V=null,b.Tb.clear(),b.b=null,b.v=null,b.eb=!0,dl(b),v(e)}})})}\nfunction Ok(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.l){case 1:return f=window.muxjs?new nd:new od,g=b.c.textDisplayFactory,h=new g,k=new $d(c.u,f,h),u(e,k.o,2);case 2:b.F=k,v(e)}})})}\nfunction Pk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:c.va=d.va;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.N;b.xb=g;if(c.va){b.m=c.va();f.A(2);break}k=b;return u(f,U.create(g,h,b.c.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.c.manifest),v(f)}})})}\nfunction Qk(b,c){var d=c.uri,e=b.N;b.Pb=new wi;xi(b.Pb,function(c){el(b,\"timelineregionadded\",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Bc(c)},filterAllPeriods:function(c){return fl(b,c)},onTimelineRegionAdded:function(c){var d=b.Pb;a:{var e=r(d.b);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.b.add(c),d.c(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ha(c)}};\nreturn new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.l){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.b=e.s;b.dispatchEvent(new I(\"manifestparsed\"));if(0==b.b.periods.length)throw new D(2,4,4014);gl(b.b.periods);v(e)}})})}),function(){return b.m.stop()})}\nfunction Rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:return b.h=new Gc({nb:b.N,onError:function(d){b.Ha(d)},gc:function(d){hl(b,d)},onExpirationUpdated:function(d,e){il(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.h.configure(b.c.drm),u(d,Nc(b.h,ci(b.b.periods),b.b.offlineSessionIds),2);case 2:fl(b,b.b.periods),v(d)}})})}\nfunction Sk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.l){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.xb=h,b.v=new Ik,k=function(){return jl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.K.set(c)},L(b.i,g,\"playing\",k),L(b.i,g,\"pause\",k),L(b.i,g,\"ended\",k),L(b.i,g,\"ratechange\",l),m=b.c.abrFactory,b.j&&b.rc==m||(b.rc=m,b.j=new m,b.j.configure(b.c.abr)),kl(b,b.b.periods),b.Rb=new Ph(b.c.preferredAudioLanguage,b.c.preferredVariantRole,b.c.preferredAudioChannelCount),\nb.Ka=b.c.preferredTextLanguage,ll(b.b.presentationTimeline,b.c.playRangeStart,b.c.playRangeEnd),u(f,b.h.zb(g),2);case 2:return b.j.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.b.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ml(b,g,c,!0);b.f&&(Qi(b.f,c,d,f),nl(b))}),b.o=ol(b,c.startTime),b.bb=pl(b),b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}}),\nn=Math.max(b.b.minBufferTime,b.c.streaming.rebufferingGoal),ql(b,n),b.f=rl(b),b.f.configure(b.c.streaming),sl(b),b.g=tl,b.dispatchEvent(new I(\"streaming\")),u(f,b.f.start(),3);case 3:b.c.streaming.startAtSegmentBoundary&&(q=b.o.i(),x=ul(b,q),b.o.o(x)),b.b.periods.forEach(b.Bc.bind(b)),vl(b),nl(b),w=wl(b),w.variants.some(function(b){return b.primary}),xl(b,w.variants),dc(b.i,g,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd}),v(f)}})})}\nfunction Tk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.l){case 1:return f=wd,b.h=new Gc({nb:b.N,onError:function(c){b.Ha(c)},gc:function(c){hl(b,c)},onExpirationUpdated:function(c,e){il(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.h.configure(b.c.drm),g={id:0,language:\"und\",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,\npresentationTimeOffset:0,mimeType:\"video/mp4\",codecs:\"\",encrypted:!0,keyId:null,language:\"und\",label:null,type:f.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Nc(b.h,[g],[]),2);case 2:return u(e,b.h.zb(c.u),0)}})})}\nfunction Uk(b,c,d){function e(){return jl(b)}c.uri=d.uri;c.startTime=d.startTime;b.xb=c.uri;b.v=new Ik;b.o=new pi(c.u);null!=c.startTime&&b.o.o(c.startTime);b.K=new gi({cc:function(){return c.u.playbackRate},ed:function(b){c.u.playbackRate=b},Ed:function(b){c.u.currentTime+=b}});ql(b,b.c.streaming.rebufferingGoal);L(b.i,c.u,\"playing\",e);L(b.i,c.u,\"pause\",e);L(b.i,c.u,\"ended\",e);dc(b.i,c.u,\"loadeddata\",function(){b.v.c=Date.now()/1E3-d.hd});b.a.audioTracks&&(L(b.i,b.a.audioTracks,\"addtrack\",function(){return vl(b)}),\nL(b.i,b.a.audioTracks,\"removetrack\",function(){return vl(b)}));if(b.a.textTracks){var f=b.a.textTracks;L(b.i,f,\"addtrack\",function(){return vl(b)});L(b.i,f,\"removetrack\",function(){return vl(b)})}c.u.src=c.uri;b.g=yl;b.dispatchEvent(new I(\"streaming\"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(cl(b)):(dc(b.i,b.a,\"loadeddata\",function(){g.resolve()}),dc(b.i,b.a,\"error\",function(){g.reject(cl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));\nreturn Promise.resolve()})}function gl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(\",\")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}\nfunction sl(b){function c(b){var c=\"\";b.video&&(c=lc(b.video.codecs)[0]);var d=\"\";b.audio&&(d=lc(b.audio.codecs)[0]);return c+\"-\"+d}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=De(d,b.c.preferredAudioChannelCount);var e=new Hb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h=b.a.duration-.1;break;case tl:a:{var e;(e=b.a.ended)||(e=b.F,e=e.g?\"ended\"==e.g.readyState:!0);if(e)c=!0;else{if(b.b.presentationTimeline.U()&&(e=b.b.presentationTimeline.jb(),pd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=rd(b.a.buffered,b.a.currentTime);e=b.V;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Th:Uh;e.a=f;c!=f&&dl(b)})).Ia(.25)}\nfunction rl(b){return new Di(b.b,{Qa:function(){return b.o.i()},L:b.F,nb:b.N,Hd:b.Ze.bind(b),Gd:b.pe.bind(b),onError:b.Ha.bind(b),onEvent:function(c){return b.dispatchEvent(c)},cf:b.df.bind(b),Uc:b.kf.bind(b)})}\nX.prototype.configure=function(b,c){if(2==arguments.length&&\"string\"==typeof b){for(var d=b,e={},f=e,g=0,h=0;;){g=d.indexOf(\".\",g);if(0>g)break;if(0==g||\"\\\\\"!=d[g-1])h=d.substring(h,g).replace(/\\\\\\./g,\".\"),f[h]={},f=f[h],h=g+1;g+=1}f[d.substring(h).replace(/\\\\\\./g,\".\")]=c;b=e}d=Bk(this.c,b,Kk(this));zl(this);return d};X.prototype.configure=X.prototype.configure;\nfunction zl(b){b.m&&b.m.configure(b.c.manifest);b.h&&b.h.configure(b.c.drm);if(b.f){b.f.configure(b.c.streaming);try{b.b.periods.forEach(b.Bc.bind(b))}catch(f){b.Ha(f)}var c=Hi(b.f),d=Ji(b.f),e=wl(b);c=Ge(c,d,e.variants);b.j&&c&&c.allowedByApplication&&c.allowedByKeySystem?xl(b,e.variants):Al(b,e)}b.j&&(b.j.configure(b.c.abr),b.c.abr.enabled&&!b.eb?b.j.enable():b.j.disable(),Bl(b))}X.prototype.getConfiguration=function(){var b=Kk(this);Bk(b,this.c,Kk(this));return b};\nX.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.Df=function(){for(var b in this.c)delete this.c[b];Bk(this.c,Kk(this),Kk(this));zl(this)};X.prototype.resetConfiguration=X.prototype.Df;X.prototype.Ee=function(){return this.g};X.prototype.getLoadMode=X.prototype.Ee;X.prototype.Ie=function(){return this.a};X.prototype.getMediaElement=X.prototype.Ie;X.prototype.Bb=function(){return this.N};X.prototype.getNetworkingEngine=X.prototype.Bb;X.prototype.$b=function(){return this.xb};\nX.prototype.getAssetUri=X.prototype.$b;X.prototype.He=function(){Ke(\"getManifestUri\",'Please use \"getAssetUri\" instead.');return this.$b()};X.prototype.getManifestUri=X.prototype.He;X.prototype.U=function(){return this.b?this.b.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.U;X.prototype.Ta=function(){return this.b?this.b.presentationTimeline.Ta():!1};X.prototype.isInProgress=X.prototype.Ta;\nX.prototype.We=function(){if(this.b){if(!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.We;X.prototype.Ff=function(){if(this.b){var b=this.b.presentationTimeline;return{start:b.ib(),end:b.wa()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};\nX.prototype.seekRange=X.prototype.Ff;X.prototype.keySystem=function(){return this.h?this.h.keySystem():\"\"};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.h?this.h.a:null};X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.bc=function(){return this.h?this.h.bc():Infinity};X.prototype.getExpiration=X.prototype.bc;X.prototype.Ic=function(){return this.V?this.V.a==Uh:!1};X.prototype.isBuffering=X.prototype.Ic;\nX.prototype.Le=function(){if(this.K){var b=this.K;b=b.g?0:b.f}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Le;X.prototype.ag=function(b){0==b?$a(\"A trick play rate of 0 is unsupported!\"):(this.g==yl&&this.K.set(b),this.g==tl&&(this.K.set(b),Oi(this.f,1=h.b.periods.length?h.b.presentationTimeline.Y():h.b.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Ad++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),\nfindSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||\"\",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Tb.add(E);m.textStreams.push(E);return u(l,Ki(h.f,E),2);case 2:return(F=Ii(h.f,\"text\"))&&Hh(h.C,m,F),h.Tb[\"delete\"](E),Al(h,m),vl(h),l[\"return\"](xe(E))}})})};\nX.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.dd=function(b,c){this.Ub.width=b;this.Ub.height=c};X.prototype.setMaxHardwareResolution=X.prototype.dd;X.prototype.ad=function(){if(this.g==tl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Eb&&(d.Eb=!1,Ni(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.ad;X.prototype.Fe=function(){return this.b};X.prototype.getManifest=X.prototype.Fe;\nX.prototype.Ge=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Ge;function ml(b,c,d,e){Ih(b.C,c).variant=d;b=b.v.b;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:\"variant\",fromAdaptation:e,bandwidth:d.bandwidth}))}function Kk(b){var c=zk();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.ad())};c.textDisplayFactory=function(){return new vk(b.a)};return c}\nfunction kl(b,c){for(var d=0;dd&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}\nfunction hl(b,c){if(b.f){var d=wl(b),e=!1,f=Object.keys(c),g=1==f.length&&\"00\"==f[0];f.length&&d.variants.forEach(function(b){He(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?\"00\":d.keyId],b.allowedByKeySystem=!!d&&!Yk.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Hi(b.f);var h=Ji(b.f);(f=Ge(f,h,d.variants))&&!f.allowedByKeySystem&&Al(b,d);e&&(vl(b),xl(b,d.variants))}}\nfunction il(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I(\"expirationupdated\"))}function ll(b,c,d){0=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=ym(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Am(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&\nk.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}\nfunction Am(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Db();var k=g.id;Bm(g,f,function(f){var l=og(f.c(),f.b,f.a,b.a.streaming.retryParameters);sj(c,k,\nl,Tl(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=og(f.c(),f.b,f.a,b.a.streaming.retryParameters),sj(c,k,f,.5*Ul(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}\nfunction Bm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function km(b){if(b.h.a)throw new D(2,9,7001);}function im(){if(!fm())throw new D(2,9,9E3);}function gm(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e[\"return\"](e.s);case 2:Ea(e),Kb(b.g,c),Fa(e,0)}})})}\nfunction vm(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.l){case 1:return d=new Cj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})};\nfunction um(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.l){case 1:if(!e.drmInfo)return g[\"return\"]();h=Ij(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:tm(e,!1),videoCapabilities:tm(e,!0)}});return u(g,mk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),\n0)}})})}function ym(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function om(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Cm(c.value)}\nfunction Cm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}Zk.offline=fm;z(\"shaka.polyfill.installAll\",function(){for(var b=0;b=c.a.length)return b;for(var d=[],e=0;ed.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b