Greasy Fork is available in English.

Flussonic Player Lib

flussonic media player

Tätä skriptiä ei tulisi asentaa suoraan. Se on kirjasto muita skriptejä varten sisällytettäväksi metadirektiivillä // @require https://update.greasyfork.org/scripts/371424/622369/Flussonic%20Player%20Lib.js.

// ==UserScript==
// @name         Flussonic Player Lib
// @namespace    flussonic-user
// @version      0.1.0
// @description  flussonic media player
// @grant        none
// ==/UserScript==

(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["FlussonicMsePlayer"] = factory();
	else
		root["FlussonicMsePlayer"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// 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
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 11);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self
  // eslint-disable-next-line no-new-func
  : Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef


/***/ }),
/* 1 */
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),
/* 2 */
/***/ (function(module, exports) {

var core = module.exports = { version: '2.5.1' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef


/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(29);
var createDesc = __webpack_require__(34);
module.exports = __webpack_require__(4) ? function (object, key, value) {
  return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(6)(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var EVENTS = {
  // MediaSource
  MEDIA_SOURCE_SOURCE_OPEN: 'sourceopen',
  MEDIA_SOURCE_SOURCE_ENDED: 'sourceended',
  MEDIA_SOURCE_SOURCE_CLOSE: 'sourceclose',

  // HTMLMediaElement
  MEDIA_ELEMENT_PROGRESS: 'progress',
  MEDIA_ELEMENT_EMPTIED: 'emptied',

  // WebSocket
  WS_OPEN: 'open',
  WS_MESSAGE: 'message',

  // Buffer
  BUFFER_UPDATE_END: 'updateend',
  BUFFER_ERROR: 'onerror',
  BUFFER_ABORT: 'onabort'
};

exports.default = EVENTS;
module.exports = exports['default'];

/***/ }),
/* 6 */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};


/***/ }),
/* 7 */
/***/ (function(module, exports) {

var id = 0;
var px = Math.random();
module.exports = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};


/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

// optional / simple context binding
var aFunction = __webpack_require__(37);
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),
/* 9 */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__(47)('wks');
var uid = __webpack_require__(7);
var Symbol = __webpack_require__(0).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';

var $exports = module.exports = function (name) {
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};

$exports.store = store;


/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(12);


/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _MsePlayer = __webpack_require__(13);

var _MsePlayer2 = _interopRequireDefault(_MsePlayer);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = _MsePlayer2.default;
module.exports = exports['default'];

/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _segments = __webpack_require__(14);

var segmentsTypes = _interopRequireWildcard(_segments);

var _events = __webpack_require__(5);

var _events2 = _interopRequireDefault(_events);

var _messages = __webpack_require__(15);

var _messages2 = _interopRequireDefault(_messages);

var _mseUtils = __webpack_require__(16);

var mseUtils = _interopRequireWildcard(_mseUtils);

__webpack_require__(26);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var TYPE_CONTENT_VIDEO = 'video';
var TYPE_CONTENT_AUDIO = 'audio';

var BUFFER_MODE_SEGMENTS = 'segments';
var BUFFER_MODE_SEQUENCE = 'sequence';

var LIVE = 'live';
var WS_COMMAND_SEEK_LIVE = '';
var WS_COMMAND_SEEK = 'play_from=';
var DEFAULT_BUFFER_MODE = BUFFER_MODE_SEQUENCE;
var DEFAULT_ERRORS_BEFORE_STOP = 1;
var DEFAULT_UPDATE = 100;

var errorsCount = 0;

var MSEPlayer = function () {
  MSEPlayer.replaceHttpByWS = function replaceHttpByWS(url) {
    return mseUtils.replaceHttpByWS(url);
  };

  MSEPlayer.isSupported = function isSupported() {
    return mseUtils.isSupportedMSE();
  };
  /**
   *
   * @param media HTMLMediaElement
   * @param urlStream
   *
   */


  function MSEPlayer(media, urlStream, opts) {
    _classCallCheck(this, MSEPlayer);

    if (!(media instanceof HTMLMediaElement)) {
      throw new Error(_messages2.default.NOT_HTML_MEDIA_ELEMENT);
    }

    this.media = media;
    this.url = urlStream;
    this.opts = opts || {};
    this.opts.progressUpdateTime = this.opts.progressUpdateTime || DEFAULT_UPDATE;
    this.setBufferMode(this.opts);

    this.opts.errorsBeforeStop = this.opts.errorsBeforeStop ? this.opts.errorsBeforeStop : DEFAULT_ERRORS_BEFORE_STOP;

    if (typeof this.opts.errorsBeforeStop !== 'number' || isNaN(this.opts.errorsBeforeStop)) {
      throw new Error('invalid errorsBeforeStop param, should be number');
    }

    this.onProgress = opts && opts.onProgress;
    this.onMediaInfo = opts && opts.onMediaInfo;
    this.onError = opts && opts.onError;

    this.doArrayBuffer = mseUtils.doArrayBuffer.bind(this);
    this.maybeAppend = this.maybeAppend.bind(this);

    this.init();

    this.onAttachMedia({ media: media });
  }

  MSEPlayer.prototype.play = function play() {
    console.log('FlussonicMsePlayer: play()');
    return this._play();
  };

  MSEPlayer.prototype.stop = function stop() {
    return this.onMediaDetaching();
  };

  MSEPlayer.prototype.seek = function seek(utc) {
    try {
      if (!utc) {
        throw new Error('utc should be "live" or UTC value');
      }
      var commandStr = utc === LIVE ? WS_COMMAND_SEEK_LIVE : WS_COMMAND_SEEK;
      console.log('' + commandStr + utc);
      this.websocket.send('' + commandStr + utc);
      this.afterSeekFlag = true;
    } catch (err) {
      console.warn('onMediaDetaching:' + err.message + ' while calling endOfStream');
    }
  };

  MSEPlayer.prototype.pause = function pause() {
    if (this._pause || !this.media || !this.websocket || !this.mediaSource || this.mediaSource && this.mediaSource.readyState !== 'open' || !this.playPromise) {
      return;
    }

    // https://developers.google.com/web/updates/2017/06/play-request-was-interrupted
    this.playPromise.then(pause.bind(this));
    function pause() {
      this.media.pause();
      this.websocket.send('pause');
      this._pause = true;
      this.playing = false;

      if (this.onPause) {
        try {
          this.onPause();
        } catch (e) {
          console.error('Error ' + e.name + ':' + e.message + '\n' + e.stack);
        }
      }
    }
  };

  MSEPlayer.prototype.setTracks = function setTracks(tracks) {
    var _this = this;

    if (!this.mediaInfo) {
      console.warn('Media info did not loaded. Should try after onMediaInfo triggered or inside.');
      return;
    }

    if (!Array.isArray(tracks)) {
      console.error('tracks should be an Array instance: ["v1", "a1"]');
    }

    var videoTracksStr = tracks.filter(function (id) {
      var stream = _this.mediaInfo.streams.find(function (s) {
        return id === s['track_id'];
      });
      return !!stream && stream.content === TYPE_CONTENT_VIDEO;
    }).join('');

    var audioTracksStr = tracks.filter(function (id) {
      var stream = _this.mediaInfo.streams.find(function (s) {
        return id === s['track_id'];
      });
      return !!stream && stream.content === TYPE_CONTENT_AUDIO;
    }).join('');

    return this._setTracks(videoTracksStr, audioTracksStr);
  };

  /**
   *
   *  Private members
   *
   */


  MSEPlayer.prototype._log = function _log(msg) {
    if (this.opts.debug) {
      console.log(msg);
    }
  };

  MSEPlayer.prototype._play = function _play(time, videoTrack, audioTack) {
    var _this2 = this;

    return new Promise(function (resolve, reject) {
      if (_this2.playing) {
        _this2._log('_play: terminate because already has been playing');
        return resolve();
      }

      if (_this2._pause && !_this2.afterSeekFlag) {
        _this2._resume();
        _this2._log('_play: terminate because _paused and should resume');
        return resolve();
      }

      // TODO: to observe this case, I have no idea when it fired
      if (!_this2.mediaSource) {
        _this2.onAttachMedia({ media: _this2.media });
        _this2.onsoa = _this2._play.bind(_this2, time, videoTrack, audioTack);
        _this2.mediaSource.addEventListener(_events2.default.MEDIA_SOURCE_SOURCE_OPEN, _this2.onsoa);
        console.warn('mediaSource did not create');
        _this2.resolveThenMediaSourceOpen = _this2.resolveThenMediaSourceOpen ? _this2.resolveThenMediaSourceOpen : resolve;
        _this2.rejectThenMediaSourceOpen = _this2.rejectThenMediaSourceOpen ? _this2.rejectThenMediaSourceOpen : reject;
        return;
      }

      _this2.playTime = time;
      _this2.videoTrack = videoTrack;
      _this2.audioTack = audioTack;

      // deferring execution
      if (_this2.mediaSource && _this2.mediaSource.readyState !== 'open') {
        console.warn('readyState is not "open"');
        _this2.shouldPlay = true;
        _this2.resolveThenMediaSourceOpen = _this2.resolveThenMediaSourceOpen ? _this2.resolveThenMediaSourceOpen : resolve;
        _this2.rejectThenMediaSourceOpen = _this2.rejectThenMediaSourceOpen ? _this2.rejectThenMediaSourceOpen : reject;
        return;
      }

      _this2._pause = false;
      _this2.playing = true;

      var startWS = mseUtils.startWebSocket(_this2.url, time, videoTrack, audioTack);

      startWS.bind(_this2)();

      // https://developers.google.com/web/updates/2017/06/play-request-was-interrupted
      _this2.playPromise = _this2.media.play();
      _this2.startProgressTimer();
      _this2.playing = true;

      _this2.playPromise.then(function () {
        if (_this2.resolveThenMediaSourceOpen) {
          _this2.resolveThenMediaSourceOpen();
          _this2.resolveThenMediaSourceOpen = void 0;
          _this2.rejectThenMediaSourceOpen = void 0;
        }
      }, function () {
        if (_this2.rejectThenMediaSourceOpen) {
          _this2.rejectThenMediaSourceOpen();
          _this2.resolveThenMediaSourceOpen = void 0;
          _this2.rejectThenMediaSourceOpen = void 0;
        }
      });
      return _this2.playPromise;
    });
  };

  MSEPlayer.prototype.init = function init() {
    this._buffers = {};
    this._queues = {};
    this.playing = false;

    // flag to pending execution(true)
    this.shouldPlay = false;

    // store to execute pended method play
    this.playTime = void 0;
    this.audioTack = '';
    this.videoTrack = '';
    this.endProgressTimer();
  };

  MSEPlayer.prototype._resume = function _resume() {
    this.websocket.send('resume');
    this.playPromise = this.media.play();
    this._pause = false;
    this.playing = true;
  };

  MSEPlayer.prototype.onMediaDetaching = function onMediaDetaching() {
    if (this.stopRunning) {
      console.log('stop is running.');
      return;
    }
    this.stopRunning = true;
    // https://developers.google.com/web/updates/2017/06/play-request-was-interrupted
    var bindedMD = this.handlerMediaDetaching.bind(this);
    if (this.playPromise) {
      // there are two cases:
      // resolved/rejected
      // both required to shutdown ws, mediasources and etc.
      return this.playPromise.then(bindedMD, bindedMD);
    }
    if (!this.playPromise) {
      return this.handlerMediaDetaching();
    }
  };

  MSEPlayer.prototype.handlerMediaDetaching = function handlerMediaDetaching() {
    var _this3 = this;

    console.info('media source detaching');

    var mediaEmptyPromise = void 0;

    // destroy media source and detach from media element
    this.removeMediaSource();

    if (this.media) {
      this.media.removeEventListener(_events2.default.MEDIA_ELEMENT_PROGRESS, this.oncvp); // checkVideoProgress
      mediaEmptyPromise = new Promise(function (resolve) {
        _this3._onmee = _this3.onMediaElementEmptied(resolve).bind(_this3);
      });
      mediaEmptyPromise.then(function () {
        return _this3.stopRunning = false;
      });
      this.media.addEventListener(_events2.default.MEDIA_ELEMENT_EMPTIED, this._onmee);
    }

    this.oncvp = null;

    this.mediaSource = null;

    this.init();
    this.destroyWebsocket();

    return mediaEmptyPromise;
  };

  MSEPlayer.prototype.removeMediaSource = function removeMediaSource() {
    var ms = this.mediaSource;
    if (ms) {
      if (ms.readyState === 'open') {
        try {
          // endOfStream could trigger exception if any sourcebuffer is in updating state
          // we don't really care about checking sourcebuffer state here,
          // as we are anyway detaching the MediaSource
          // let's just avoid this exception to propagate
          ms.endOfStream();
        } catch (err) {
          console.warn('onMediaDetaching:' + err.message + ' while calling endOfStream');
        }
      }

      ms.removeEventListener(_events2.default.MEDIA_SOURCE_SOURCE_OPEN, this.onmso);
      ms.removeEventListener(_events2.default.MEDIA_SOURCE_SOURCE_ENDED, this.onmse);
      ms.removeEventListener(_events2.default.MEDIA_SOURCE_SOURCE_CLOSE, this.onmsc);
      this.onmso = null;
      this.onmse = null;
      this.onmsc = null;
    }

    // Detach properly the MediaSource from the HTMLMediaElement as
    // suggested in https://github.com/w3c/media-source/issues/53.
    URL.revokeObjectURL(this.media.src);
    this.media.removeAttribute('src');
    this.media.load();
  };

  MSEPlayer.prototype.destroyWebsocket = function destroyWebsocket() {
    if (this.websocket) {
      this.websocket.removeEventListener(_events2.default.WS_MESSAGE, this.onwsdm);
      this.websocket.onclose = function () {}; // disable onclose handler first
      this.websocket.close();
      this.onwsdm = null;
    }
  };

  MSEPlayer.prototype.onMediaElementEmptied = function onMediaElementEmptied(resolve) {
    if (this._onmee && this.media) {
      this.media.removeEventListener(_events2.default.MEDIA_ELEMENT_EMPTIED, this._onmee);
      this._onmee = void 0;
    }
    return resolve();
  };

  MSEPlayer.prototype.onAttachMedia = function onAttachMedia(data) {
    var _this4 = this;

    this.media = data.media;
    var media = this.media;
    if (media) {
      // setup the media source
      var ms = this.mediaSource = new MediaSource();
      //Media Source listeners

      this.onmse = this.onMediaSourceEnded.bind(this);
      this.onmsc = this.onMediaSourceClose.bind(this);

      ms.addEventListener(_events2.default.MEDIA_SOURCE_SOURCE_ENDED, this.onmse);
      ms.addEventListener(_events2.default.MEDIA_SOURCE_SOURCE_CLOSE, this.onmsc);
      // link video and media Source
      media.src = URL.createObjectURL(ms);

      this.oncvp = mseUtils.checkVideoProgress(media).bind(this);
      this.media.addEventListener(_events2.default.MEDIA_ELEMENT_PROGRESS, this.oncvp);
      return new Promise(function (resolve) {
        _this4.onmso = _this4.onMediaSourceOpen.bind(_this4, resolve);
        ms.addEventListener(_events2.default.MEDIA_SOURCE_SOURCE_OPEN, _this4.onmso);
      });
    }
  };

  MSEPlayer.prototype.onMediaSourceOpen = function onMediaSourceOpen(resolve) {
    resolve();
    var mediaSource = this.mediaSource;
    if (mediaSource) {
      // once received, don't listen anymore to sourceopen event
      mediaSource.removeEventListener(_events2.default.MEDIA_SOURCE_SOURCE_OPEN, this.onmso);
    }

    // play was called but stoped and was pend(1.readyState is not open)
    // and time is come to execute it
    if (this.shouldPlay) {
      console.info('readyState now is ' + this.mediaSource.readyState + ', and will be played', this.playTime, this.audioTack, this.videoTrack);
      this.shouldPlay = false;
      this._play(this.playTime, this.audioTack, this.videoTrack);
    }
  };

  MSEPlayer.prototype.onWebsocketOpen = function onWebsocketOpen() {
    this.websocket.send('resume');
    this.websocket.removeEventListener(_events2.default.WS_OPEN, this.onwso);
  };

  MSEPlayer.prototype.dispatchMessage = function dispatchMessage(e) {
    try {
      if (this._pause || !this.playing) {
        return;
      }

      var rawData = e.data;
      if (rawData instanceof ArrayBuffer) {
        this.doArrayBuffer(rawData, this.maybeAppend);
      } else {
        this.procInitSegment(rawData);
        this.afterSeekFlag = false;
      }
    } catch (err) {
      console.error(mseUtils.errorMsg(e), err);

      if (this.media && this.media.error) {
        console.error('MediaError:', this.media.error);
      }

      if (e.data instanceof ArrayBuffer) {
        console.error('Data:', mseUtils.debugData(e.data));
      }
      errorsCount++;
      if (errorsCount >= this.opts.errorsBeforeStop) {
        this.stopPromise = this.stop();
      }

      if (this.onError) {
        this.onError(err, e);
      }
    }
  };

  // there are two cases
  // 1. this.mediaSource is already exists
  // 2. this.meidaSource is undefined


  MSEPlayer.prototype.procInitSegment = function procInitSegment(rawData) {
    var _this5 = this;

    var data = JSON.parse(rawData);
    if (data.type === segmentsTypes.MSE_INIT_SEGMENT) {
      if (this.onMediaInfo) {
        this.mediaInfo = data.metadata;
        try {
          this.onMediaInfo(data.metadata);
        } catch (e) {
          console.error(mseUtils.errorMsg(e));
        }
      }

      // 1.
      if (this.mediaSource && !this.mediaSource.sourceBuffers.length) {
        this.createSourceBuffers(data.tracks);

        // TODO: describe cases
        data.tracks.forEach(function (track) {
          _this5.maybeAppend(track.id, mseUtils.base64ToArrayBuffer(track.payload));
        });

        return;
      }

      // 2
      if (this.mediaSource && this.mediaSource.sourceBuffers.length) {
        if (this.afterSeekFlag) {
          data.tracks.forEach(function (track) {
            _this5.maybeAppend(track.id, mseUtils.base64ToArrayBuffer(track.payload));
          });
          this.afterSeekFlag = false;
          return;
        }

        this.stop().then(function () {
          setTimeout(function () {
            return _this5.play();
          }, 5000);
        });
      }
      // TODO: describe cases
    } else if (data.type === segmentsTypes.MSE_MEDIA_SEGMENT) {
      this.maybeAppend(data.id, mseUtils.base64ToArrayBuffer(data.payload));
    }
  };

  MSEPlayer.prototype.getVideoTracks = function getVideoTracks() {
    if (!this.mediaInfo) {
      return;
    }
    return this.mediaInfo.streams.filter(function (s) {
      return s.content === TYPE_CONTENT_VIDEO;
    });
  };

  MSEPlayer.prototype.getAudioTracks = function getAudioTracks() {
    if (!this.mediaInfo) {
      return;
    }
    return this.mediaInfo.streams.filter(function (s) {
      return s.content === TYPE_CONTENT_AUDIO;
    });
  };

  MSEPlayer.prototype.maybeAppend = function maybeAppend(trackId, binaryData) {

    var buffer = this._buffers[trackId];

    if (this.afterSeekFlag) {

      for (var k in this._buffers) {
        this._buffers[k].abort();
        this._buffers[k].mode = 'sequence';
      }

      this.afterSeekFlag = false;
    }
    var queue = this._queues[trackId];
    if (buffer.updating || queue.length > 0) {
      queue.push(binaryData);
    } else {
      buffer.appendBuffer(binaryData);
    }
  };

  MSEPlayer.prototype.startProgressTimer = function startProgressTimer() {
    if (this.onProgress) {
      this.timer = setInterval(this.onTimer.bind(this), this.opts.progressUpdateTime);
    }
  };

  MSEPlayer.prototype.endProgressTimer = function endProgressTimer() {
    clearInterval(this.timer);
    this.timer = void 0;
  };

  MSEPlayer.prototype.onTimer = function onTimer() {
    if (!(this.utc && this.utc != this.utcPrev)) {
      return;
    }
    try {
      this.onProgress(this.utc);
    } catch (e) {
      console.error(mseUtils.errorMsg(e));
    }

    this.utcPrev = this.utc;
  };

  MSEPlayer.prototype.onMediaSourceEnded = function onMediaSourceEnded() {
    console.log('media source ended');
  };

  MSEPlayer.prototype.onMediaSourceClose = function onMediaSourceClose() {
    console.log('media source closed');
  };

  MSEPlayer.prototype.createSourceBuffers = function createSourceBuffers(tracks) {
    var _this6 = this;

    tracks.forEach(function (track) {
      // TODO: use metadata from server
      var mimeType = track.content === 'video' ? 'video/mp4; codecs="avc1.4d401f"' : 'audio/mp4; codecs="mp4a.40.2"';

      _this6._buffers[track.id] = _this6.mediaSource.addSourceBuffer(mimeType);
      var buffer = _this6._buffers[track.id];
      buffer.mode = _this6.opts && _this6.opts.bufferMode;
      _this6._queues[track.id] = [];
      var queue = _this6._queues[track.id];

      buffer.addEventListener(_events2.default.BUFFER_UPDATE_END, updateEnd.bind(_this6));
      buffer.addEventListener(_events2.default.BUFFER_ERROR, onError);
      buffer.addEventListener(_events2.default.BUFFER_ABORT, onAbort);

      function updateEnd() {
        try {
          if (queue.length > 0 && !buffer.updating) {
            buffer.appendBuffer(queue.shift());
          }
        } catch (e) {
          console.error(mseUtils.errorMsg(e), this.media.error);
        }
      }

      function onError() {
        throw new Error('buffer error: ', arguments);
      }

      function onAbort() {
        console.warn('abort buffer');
      }
    });
  };

  MSEPlayer.prototype._setTracks = function _setTracks(videoTrack, audioTrack) {
    var _this7 = this;

    this.onMediaDetaching().then(function () {
      _this7.onAttachMedia({ media: _this7.media });
      _this7.onsoa = _this7._play.bind(_this7, _this7.utc, videoTrack, audioTrack);
      _this7.mediaSource.addEventListener(_events2.default.MEDIA_SOURCE_SOURCE_OPEN, _this7.onsoa);
    });
  };

  MSEPlayer.prototype.setBufferMode = function setBufferMode(optsOrBufferModeValue) {
    if ((typeof optsOrBufferModeValue === 'undefined' ? 'undefined' : _typeof(optsOrBufferModeValue)) === 'object') {
      this.opts.bufferMode = optsOrBufferModeValue.bufferMode ? optsOrBufferModeValue.bufferMode : DEFAULT_BUFFER_MODE;
    }

    if (typeof optsOrBufferModeValue === 'string') {
      this.opts.bufferMode = optsOrBufferModeValue;
    }

    if (this.opts.bufferMode !== BUFFER_MODE_SEGMENTS && this.opts.bufferMode !== BUFFER_MODE_SEQUENCE) {
      throw new Error('invalid bufferMode param, should be undefined or ' + BUFFER_MODE_SEGMENTS + ' or ' + BUFFER_MODE_SEQUENCE + '.');
    }
  };

  return MSEPlayer;
}();

exports.default = MSEPlayer;
module.exports = exports['default'];

/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var MSE_INIT_SEGMENT = exports.MSE_INIT_SEGMENT = 'mse_init_segment';
var MSE_MEDIA_SEGMENT = exports.MSE_MEDIA_SEGMENT = 'mse_media_segment';

/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var MSG = {
  NOT_HTML_MEDIA_ELEMENT: 'media should be an HTMLMediaElement instance'
};

exports.default = MSG;
module.exports = exports['default'];

/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.errorMsg = exports.replaceHttpByWS = exports.checkVideoProgress = exports.MAX_DELAY = undefined;
exports.getMediaSource = getMediaSource;
exports.isAndroid = isAndroid;
exports.isSupportedMSE = isSupportedMSE;
exports.base64ToArrayBuffer = base64ToArrayBuffer;
exports.RawDataToUint8Array = RawDataToUint8Array;
exports.getTrackId = getTrackId;
exports.getRealUtcFromData = getRealUtcFromData;
exports.doArrayBuffer = doArrayBuffer;
exports.debugData = debugData;
exports.getWSURL = getWSURL;
exports.startWebSocket = startWebSocket;

var _parseurl = __webpack_require__(17);

var _parseurl2 = _interopRequireDefault(_parseurl);

var _events = __webpack_require__(5);

var _events2 = _interopRequireDefault(_events);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function getMediaSource() {
  if (typeof window !== 'undefined') {
    return window.MediaSource || window.WebKitMediaSource;
  }
}

function isAndroid() {
  var ua = navigator.userAgent;
  return ua.indexOf('Android') !== -1;
}

function isSupportedMSE() {
  // https://bugs.chromium.org/p/chromium/issues/detail?id=539707
  if (isAndroid()) {
    return false;
  }
  var mediaSource = getMediaSource();
  var sourceBuffer = window.SourceBuffer || window.WebKitSourceBuffer;
  var isTypeSupported = mediaSource && typeof mediaSource.isTypeSupported === 'function' && mediaSource.isTypeSupported('video/mp4; codecs="avc1.4d401f,mp4a.40.2"');

  // if SourceBuffer is exposed ensure its API is valid
  // safari and old version of Chrome doe not expose SourceBuffer globally so checking SourceBuffer.prototype is impossible
  var sourceBufferValidAPI = !sourceBuffer || sourceBuffer.prototype && typeof sourceBuffer.prototype.appendBuffer === 'function' && typeof sourceBuffer.prototype.remove === 'function';
  return !!isTypeSupported && !!sourceBufferValidAPI;
}

function base64ToArrayBuffer(base64) {
  return Uint8Array.from(atob(base64), function (c) {
    return c.charCodeAt(0);
  });
}

function RawDataToUint8Array(rawData) {
  // 12,4 = mfhd;20,4 slice - segment.id;36,4 = tfhd;44,4 slice - track.id;64,4 = tfdt
  // 72,8 slice - prestime;84,4 = futc;92,8 slice - real utc;104,4 = trun
  var result = new Uint8Array(rawData);
  return result;
}
function getTrackId(data) {
  return data[47];
}

function getRealUtcFromData(view) {
  var pts1 = view[92] << 24 | view[93] << 16 | view[94] << 8 | view[95];
  var pts2 = view[96] << 24 | view[97] << 16 | view[98] << 8 | view[99];
  var realUtc = pts1 + pts2 / 1000000;
  return realUtc;
}

function doArrayBuffer(rawData, mbAppend) {
  var view = RawDataToUint8Array(rawData);
  var trackId = getTrackId(view);
  this.utc = getRealUtcFromData(view);

  mbAppend(trackId, view);
}

function debugData(rawData) {
  var view = RawDataToUint8Array(rawData);
  var trackId = getTrackId(view);
  var utc = getRealUtcFromData(view);

  return { trackId: trackId, utc: utc, view: view };
}

// TODO
function getWSURL(url, utc, videoTrack, audioTrack) {
  // TODO: then use @param time it prevent to wrong data from ws(trackID view[47] for example is 100)
  var time = utc;

  if (!time && !videoTrack && !audioTrack) {
    return url;
  }

  var parsedUrl = (0, _parseurl2.default)({ url: url });
  var othersParams = '';

  if (parsedUrl.query) {
    var currentParamsKeysValues = parsedUrl.query.split('&').map(function (keyValue) {
      return keyValue.split('=');
    });

    othersParams = currentParamsKeysValues.filter(function (p) {
      return p[0] !== 'from' && p[0] !== 'tracks';
    }).map(function (kv) {
      return kv.join('=');
    }).join('&');

    console.log(othersParams);
  }

  var cleanUrl = parsedUrl.protocol + '//' + parsedUrl.host + parsedUrl.pathname + '?';
  var tracksExists = !!videoTrack || !!audioTrack;

  var resultUrl = '' + cleanUrl + (tracksExists ? 'tracks=' + videoTrack + audioTrack : '') + ('' + (tracksExists && !!time ? '&' : '') + (!!time ? 'from=' + Math.floor(time) : '')) + ('' + ((tracksExists || !!time) && !!othersParams ? '&' : '') + othersParams);
  return resultUrl;
}

var MAX_DELAY = exports.MAX_DELAY = /Edge/.test(navigator.userAgent) ? 10 // very slow buffers in Edge
: 2;

var checkVideoProgress = exports.checkVideoProgress = function checkVideoProgress(media) {
  var maxDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : MAX_DELAY;
  return function (evt) {
    var ct = media.currentTime,
        buffered = media.buffered,
        l = media.buffered.length;


    if (!l) {
      return;
    }

    var endTime = buffered.end(l - 1);
    var delay = Math.abs(endTime - ct);

    if (delay <= maxDelay) {
      return;
    }

    console.log('nudge', ct, '->', l ? endTime : '-', evt);
    media.currentTime = endTime - 0.2;
  };
};

function startWebSocket(url, time) {
  var videoTrack = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  var audioTack = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';

  return function () {
    var wsURL = getWSURL(url, time, videoTrack, audioTack);

    this.websocket = new WebSocket(wsURL);
    this.websocket.binaryType = 'arraybuffer';
    // do that for remove event method
    this.onwso = this.onWebsocketOpen.bind(this);
    this.onwsdm = this.dispatchMessage.bind(this);
    this.websocket.addEventListener(_events2.default.WS_OPEN, this.onwso);
    this.websocket.addEventListener(_events2.default.WS_MESSAGE, this.onwsdm);
  };
}

var replaceHttpByWS = exports.replaceHttpByWS = function replaceHttpByWS(url) {
  return url.replace(/^http/, 'ws');
};

var errorMsg = exports.errorMsg = function errorMsg(e) {
  return 'Error ' + e.name + ': ' + e.message + '\n' + e.stack;
};

/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/*!
 * parseurl
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2014-2017 Douglas Christopher Wilson
 * MIT Licensed
 */



/**
 * Module dependencies.
 * @private
 */

var url = __webpack_require__(18)
var parse = url.parse
var Url = url.Url

/**
 * Module exports.
 * @public
 */

module.exports = parseurl
module.exports.original = originalurl

/**
 * Parse the `req` url with memoization.
 *
 * @param {ServerRequest} req
 * @return {Object}
 * @public
 */

function parseurl (req) {
  var url = req.url

  if (url === undefined) {
    // URL is undefined
    return undefined
  }

  var parsed = req._parsedUrl

  if (fresh(url, parsed)) {
    // Return cached URL parse
    return parsed
  }

  // Parse the URL
  parsed = fastparse(url)
  parsed._raw = url

  return (req._parsedUrl = parsed)
};

/**
 * Parse the `req` original url with fallback and memoization.
 *
 * @param {ServerRequest} req
 * @return {Object}
 * @public
 */

function originalurl (req) {
  var url = req.originalUrl

  if (typeof url !== 'string') {
    // Fallback
    return parseurl(req)
  }

  var parsed = req._parsedOriginalUrl

  if (fresh(url, parsed)) {
    // Return cached URL parse
    return parsed
  }

  // Parse the URL
  parsed = fastparse(url)
  parsed._raw = url

  return (req._parsedOriginalUrl = parsed)
};

/**
 * Parse the `str` url with fast-path short-cut.
 *
 * @param {string} str
 * @return {Object}
 * @private
 */

function fastparse (str) {
  if (typeof str !== 'string' || str.charCodeAt(0) !== 0x2f /* / */) {
    return parse(str)
  }

  var pathname = str
  var query = null
  var search = null

  // This takes the regexp from https://github.com/joyent/node/pull/7878
  // Which is /^(\/[^?#\s]*)(\?[^#\s]*)?$/
  // And unrolls it into a for loop
  for (var i = 1; i < str.length; i++) {
    switch (str.charCodeAt(i)) {
      case 0x3f: /* ?  */
        if (search === null) {
          pathname = str.substring(0, i)
          query = str.substring(i + 1)
          search = str.substring(i)
        }
        break
      case 0x09: /* \t */
      case 0x0a: /* \n */
      case 0x0c: /* \f */
      case 0x0d: /* \r */
      case 0x20: /*    */
      case 0x23: /* #  */
      case 0xa0:
      case 0xfeff:
        return parse(str)
    }
  }

  var url = Url !== undefined
    ? new Url()
    : {}
  url.path = str
  url.href = str
  url.pathname = pathname
  url.query = query
  url.search = search

  return url
}

/**
 * Determine if parsed is still fresh for url.
 *
 * @param {string} url
 * @param {object} parsedUrl
 * @return {boolean}
 * @private
 */

function fresh (url, parsedUrl) {
  return typeof parsedUrl === 'object' &&
    parsedUrl !== null &&
    (Url === undefined || parsedUrl instanceof Url) &&
    parsedUrl._raw === url
}


/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



var punycode = __webpack_require__(19);
var util = __webpack_require__(22);

exports.parse = urlParse;
exports.resolve = urlResolve;
exports.resolveObject = urlResolveObject;
exports.format = urlFormat;

exports.Url = Url;

function Url() {
  this.protocol = null;
  this.slashes = null;
  this.auth = null;
  this.host = null;
  this.port = null;
  this.hostname = null;
  this.hash = null;
  this.search = null;
  this.query = null;
  this.pathname = null;
  this.path = null;
  this.href = null;
}

// Reference: RFC 3986, RFC 1808, RFC 2396

// define these here so at least they only have to be
// compiled once on the first module load.
var protocolPattern = /^([a-z0-9.+-]+:)/i,
    portPattern = /:[0-9]*$/,

    // Special case for a simple path URL
    simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,

    // RFC 2396: characters reserved for delimiting URLs.
    // We actually just auto-escape these.
    delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],

    // RFC 2396: characters not allowed for various reasons.
    unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),

    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.
    autoEscape = ['\''].concat(unwise),
    // Characters that are never ever allowed in a hostname.
    // Note that any invalid chars are also handled, but these
    // are the ones that are *expected* to be seen, so we fast-path
    // them.
    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
    hostEndingChars = ['/', '?', '#'],
    hostnameMaxLen = 255,
    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,
    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
    // protocols that can allow "unsafe" and "unwise" chars.
    unsafeProtocol = {
      'javascript': true,
      'javascript:': true
    },
    // protocols that never have a hostname.
    hostlessProtocol = {
      'javascript': true,
      'javascript:': true
    },
    // protocols that always contain a // bit.
    slashedProtocol = {
      'http': true,
      'https': true,
      'ftp': true,
      'gopher': true,
      'file': true,
      'http:': true,
      'https:': true,
      'ftp:': true,
      'gopher:': true,
      'file:': true
    },
    querystring = __webpack_require__(23);

function urlParse(url, parseQueryString, slashesDenoteHost) {
  if (url && util.isObject(url) && url instanceof Url) return url;

  var u = new Url;
  u.parse(url, parseQueryString, slashesDenoteHost);
  return u;
}

Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
  if (!util.isString(url)) {
    throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
  }

  // Copy chrome, IE, opera backslash-handling behavior.
  // Back slashes before the query string get converted to forward slashes
  // See: https://code.google.com/p/chromium/issues/detail?id=25916
  var queryIndex = url.indexOf('?'),
      splitter =
          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',
      uSplit = url.split(splitter),
      slashRegex = /\\/g;
  uSplit[0] = uSplit[0].replace(slashRegex, '/');
  url = uSplit.join(splitter);

  var rest = url;

  // trim before proceeding.
  // This is to support parse stuff like "  http://foo.com  \n"
  rest = rest.trim();

  if (!slashesDenoteHost && url.split('#').length === 1) {
    // Try fast path regexp
    var simplePath = simplePathPattern.exec(rest);
    if (simplePath) {
      this.path = rest;
      this.href = rest;
      this.pathname = simplePath[1];
      if (simplePath[2]) {
        this.search = simplePath[2];
        if (parseQueryString) {
          this.query = querystring.parse(this.search.substr(1));
        } else {
          this.query = this.search.substr(1);
        }
      } else if (parseQueryString) {
        this.search = '';
        this.query = {};
      }
      return this;
    }
  }

  var proto = protocolPattern.exec(rest);
  if (proto) {
    proto = proto[0];
    var lowerProto = proto.toLowerCase();
    this.protocol = lowerProto;
    rest = rest.substr(proto.length);
  }

  // figure out if it's got a host
  // user@server is *always* interpreted as a hostname, and url
  // resolution will treat //foo/bar as host=foo,path=bar because that's
  // how the browser resolves relative URLs.
  if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
    var slashes = rest.substr(0, 2) === '//';
    if (slashes && !(proto && hostlessProtocol[proto])) {
      rest = rest.substr(2);
      this.slashes = true;
    }
  }

  if (!hostlessProtocol[proto] &&
      (slashes || (proto && !slashedProtocol[proto]))) {

    // there's a hostname.
    // the first instance of /, ?, ;, or # ends the host.
    //
    // If there is an @ in the hostname, then non-host chars *are* allowed
    // to the left of the last @ sign, unless some host-ending character
    // comes *before* the @-sign.
    // URLs are obnoxious.
    //
    // ex:
    // http://a@b@c/ => user:a@b host:c
    // http://a@b?@c => user:a host:c path:/?@c

    // v0.12 TODO(isaacs): This is not quite how Chrome does things.
    // Review our test case against browsers more comprehensively.

    // find the first instance of any hostEndingChars
    var hostEnd = -1;
    for (var i = 0; i < hostEndingChars.length; i++) {
      var hec = rest.indexOf(hostEndingChars[i]);
      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
        hostEnd = hec;
    }

    // at this point, either we have an explicit point where the
    // auth portion cannot go past, or the last @ char is the decider.
    var auth, atSign;
    if (hostEnd === -1) {
      // atSign can be anywhere.
      atSign = rest.lastIndexOf('@');
    } else {
      // atSign must be in auth portion.
      // http://a@b/c@d => host:b auth:a path:/c@d
      atSign = rest.lastIndexOf('@', hostEnd);
    }

    // Now we have a portion which is definitely the auth.
    // Pull that off.
    if (atSign !== -1) {
      auth = rest.slice(0, atSign);
      rest = rest.slice(atSign + 1);
      this.auth = decodeURIComponent(auth);
    }

    // the host is the remaining to the left of the first non-host char
    hostEnd = -1;
    for (var i = 0; i < nonHostChars.length; i++) {
      var hec = rest.indexOf(nonHostChars[i]);
      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
        hostEnd = hec;
    }
    // if we still have not hit it, then the entire thing is a host.
    if (hostEnd === -1)
      hostEnd = rest.length;

    this.host = rest.slice(0, hostEnd);
    rest = rest.slice(hostEnd);

    // pull out port.
    this.parseHost();

    // we've indicated that there is a hostname,
    // so even if it's empty, it has to be present.
    this.hostname = this.hostname || '';

    // if hostname begins with [ and ends with ]
    // assume that it's an IPv6 address.
    var ipv6Hostname = this.hostname[0] === '[' &&
        this.hostname[this.hostname.length - 1] === ']';

    // validate a little.
    if (!ipv6Hostname) {
      var hostparts = this.hostname.split(/\./);
      for (var i = 0, l = hostparts.length; i < l; i++) {
        var part = hostparts[i];
        if (!part) continue;
        if (!part.match(hostnamePartPattern)) {
          var newpart = '';
          for (var j = 0, k = part.length; j < k; j++) {
            if (part.charCodeAt(j) > 127) {
              // we replace non-ASCII char with a temporary placeholder
              // we need this to make sure size of hostname is not
              // broken by replacing non-ASCII by nothing
              newpart += 'x';
            } else {
              newpart += part[j];
            }
          }
          // we test again with ASCII char only
          if (!newpart.match(hostnamePartPattern)) {
            var validParts = hostparts.slice(0, i);
            var notHost = hostparts.slice(i + 1);
            var bit = part.match(hostnamePartStart);
            if (bit) {
              validParts.push(bit[1]);
              notHost.unshift(bit[2]);
            }
            if (notHost.length) {
              rest = '/' + notHost.join('.') + rest;
            }
            this.hostname = validParts.join('.');
            break;
          }
        }
      }
    }

    if (this.hostname.length > hostnameMaxLen) {
      this.hostname = '';
    } else {
      // hostnames are always lower case.
      this.hostname = this.hostname.toLowerCase();
    }

    if (!ipv6Hostname) {
      // IDNA Support: Returns a punycoded representation of "domain".
      // It only converts parts of the domain name that
      // have non-ASCII characters, i.e. it doesn't matter if
      // you call it with a domain that already is ASCII-only.
      this.hostname = punycode.toASCII(this.hostname);
    }

    var p = this.port ? ':' + this.port : '';
    var h = this.hostname || '';
    this.host = h + p;
    this.href += this.host;

    // strip [ and ] from the hostname
    // the host field still retains them, though
    if (ipv6Hostname) {
      this.hostname = this.hostname.substr(1, this.hostname.length - 2);
      if (rest[0] !== '/') {
        rest = '/' + rest;
      }
    }
  }

  // now rest is set to the post-host stuff.
  // chop off any delim chars.
  if (!unsafeProtocol[lowerProto]) {

    // First, make 100% sure that any "autoEscape" chars get
    // escaped, even if encodeURIComponent doesn't think they
    // need to be.
    for (var i = 0, l = autoEscape.length; i < l; i++) {
      var ae = autoEscape[i];
      if (rest.indexOf(ae) === -1)
        continue;
      var esc = encodeURIComponent(ae);
      if (esc === ae) {
        esc = escape(ae);
      }
      rest = rest.split(ae).join(esc);
    }
  }


  // chop off from the tail first.
  var hash = rest.indexOf('#');
  if (hash !== -1) {
    // got a fragment string.
    this.hash = rest.substr(hash);
    rest = rest.slice(0, hash);
  }
  var qm = rest.indexOf('?');
  if (qm !== -1) {
    this.search = rest.substr(qm);
    this.query = rest.substr(qm + 1);
    if (parseQueryString) {
      this.query = querystring.parse(this.query);
    }
    rest = rest.slice(0, qm);
  } else if (parseQueryString) {
    // no query string, but parseQueryString still requested
    this.search = '';
    this.query = {};
  }
  if (rest) this.pathname = rest;
  if (slashedProtocol[lowerProto] &&
      this.hostname && !this.pathname) {
    this.pathname = '/';
  }

  //to support http.request
  if (this.pathname || this.search) {
    var p = this.pathname || '';
    var s = this.search || '';
    this.path = p + s;
  }

  // finally, reconstruct the href based on what has been validated.
  this.href = this.format();
  return this;
};

// format a parsed object into a url string
function urlFormat(obj) {
  // ensure it's an object, and not a string url.
  // If it's an obj, this is a no-op.
  // this way, you can call url_format() on strings
  // to clean up potentially wonky urls.
  if (util.isString(obj)) obj = urlParse(obj);
  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
  return obj.format();
}

Url.prototype.format = function() {
  var auth = this.auth || '';
  if (auth) {
    auth = encodeURIComponent(auth);
    auth = auth.replace(/%3A/i, ':');
    auth += '@';
  }

  var protocol = this.protocol || '',
      pathname = this.pathname || '',
      hash = this.hash || '',
      host = false,
      query = '';

  if (this.host) {
    host = auth + this.host;
  } else if (this.hostname) {
    host = auth + (this.hostname.indexOf(':') === -1 ?
        this.hostname :
        '[' + this.hostname + ']');
    if (this.port) {
      host += ':' + this.port;
    }
  }

  if (this.query &&
      util.isObject(this.query) &&
      Object.keys(this.query).length) {
    query = querystring.stringify(this.query);
  }

  var search = this.search || (query && ('?' + query)) || '';

  if (protocol && protocol.substr(-1) !== ':') protocol += ':';

  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.
  // unless they had them to begin with.
  if (this.slashes ||
      (!protocol || slashedProtocol[protocol]) && host !== false) {
    host = '//' + (host || '');
    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
  } else if (!host) {
    host = '';
  }

  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
  if (search && search.charAt(0) !== '?') search = '?' + search;

  pathname = pathname.replace(/[?#]/g, function(match) {
    return encodeURIComponent(match);
  });
  search = search.replace('#', '%23');

  return protocol + host + pathname + search + hash;
};

function urlResolve(source, relative) {
  return urlParse(source, false, true).resolve(relative);
}

Url.prototype.resolve = function(relative) {
  return this.resolveObject(urlParse(relative, false, true)).format();
};

function urlResolveObject(source, relative) {
  if (!source) return relative;
  return urlParse(source, false, true).resolveObject(relative);
}

Url.prototype.resolveObject = function(relative) {
  if (util.isString(relative)) {
    var rel = new Url();
    rel.parse(relative, false, true);
    relative = rel;
  }

  var result = new Url();
  var tkeys = Object.keys(this);
  for (var tk = 0; tk < tkeys.length; tk++) {
    var tkey = tkeys[tk];
    result[tkey] = this[tkey];
  }

  // hash is always overridden, no matter what.
  // even href="" will remove it.
  result.hash = relative.hash;

  // if the relative url is empty, then there's nothing left to do here.
  if (relative.href === '') {
    result.href = result.format();
    return result;
  }

  // hrefs like //foo/bar always cut to the protocol.
  if (relative.slashes && !relative.protocol) {
    // take everything except the protocol from relative
    var rkeys = Object.keys(relative);
    for (var rk = 0; rk < rkeys.length; rk++) {
      var rkey = rkeys[rk];
      if (rkey !== 'protocol')
        result[rkey] = relative[rkey];
    }

    //urlParse appends trailing / to urls like http://www.example.com
    if (slashedProtocol[result.protocol] &&
        result.hostname && !result.pathname) {
      result.path = result.pathname = '/';
    }

    result.href = result.format();
    return result;
  }

  if (relative.protocol && relative.protocol !== result.protocol) {
    // if it's a known url protocol, then changing
    // the protocol does weird things
    // first, if it's not file:, then we MUST have a host,
    // and if there was a path
    // to begin with, then we MUST have a path.
    // if it is file:, then the host is dropped,
    // because that's known to be hostless.
    // anything else is assumed to be absolute.
    if (!slashedProtocol[relative.protocol]) {
      var keys = Object.keys(relative);
      for (var v = 0; v < keys.length; v++) {
        var k = keys[v];
        result[k] = relative[k];
      }
      result.href = result.format();
      return result;
    }

    result.protocol = relative.protocol;
    if (!relative.host && !hostlessProtocol[relative.protocol]) {
      var relPath = (relative.pathname || '').split('/');
      while (relPath.length && !(relative.host = relPath.shift()));
      if (!relative.host) relative.host = '';
      if (!relative.hostname) relative.hostname = '';
      if (relPath[0] !== '') relPath.unshift('');
      if (relPath.length < 2) relPath.unshift('');
      result.pathname = relPath.join('/');
    } else {
      result.pathname = relative.pathname;
    }
    result.search = relative.search;
    result.query = relative.query;
    result.host = relative.host || '';
    result.auth = relative.auth;
    result.hostname = relative.hostname || relative.host;
    result.port = relative.port;
    // to support http.request
    if (result.pathname || result.search) {
      var p = result.pathname || '';
      var s = result.search || '';
      result.path = p + s;
    }
    result.slashes = result.slashes || relative.slashes;
    result.href = result.format();
    return result;
  }

  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
      isRelAbs = (
          relative.host ||
          relative.pathname && relative.pathname.charAt(0) === '/'
      ),
      mustEndAbs = (isRelAbs || isSourceAbs ||
                    (result.host && relative.pathname)),
      removeAllDots = mustEndAbs,
      srcPath = result.pathname && result.pathname.split('/') || [],
      relPath = relative.pathname && relative.pathname.split('/') || [],
      psychotic = result.protocol && !slashedProtocol[result.protocol];

  // if the url is a non-slashed url, then relative
  // links like ../.. should be able
  // to crawl up to the hostname, as well.  This is strange.
  // result.protocol has already been set by now.
  // Later on, put the first path part into the host field.
  if (psychotic) {
    result.hostname = '';
    result.port = null;
    if (result.host) {
      if (srcPath[0] === '') srcPath[0] = result.host;
      else srcPath.unshift(result.host);
    }
    result.host = '';
    if (relative.protocol) {
      relative.hostname = null;
      relative.port = null;
      if (relative.host) {
        if (relPath[0] === '') relPath[0] = relative.host;
        else relPath.unshift(relative.host);
      }
      relative.host = null;
    }
    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
  }

  if (isRelAbs) {
    // it's absolute.
    result.host = (relative.host || relative.host === '') ?
                  relative.host : result.host;
    result.hostname = (relative.hostname || relative.hostname === '') ?
                      relative.hostname : result.hostname;
    result.search = relative.search;
    result.query = relative.query;
    srcPath = relPath;
    // fall through to the dot-handling below.
  } else if (relPath.length) {
    // it's relative
    // throw away the existing file, and take the new path instead.
    if (!srcPath) srcPath = [];
    srcPath.pop();
    srcPath = srcPath.concat(relPath);
    result.search = relative.search;
    result.query = relative.query;
  } else if (!util.isNullOrUndefined(relative.search)) {
    // just pull out the search.
    // like href='?foo'.
    // Put this after the other two cases because it simplifies the booleans
    if (psychotic) {
      result.hostname = result.host = srcPath.shift();
      //occationaly the auth can get stuck only in host
      //this especially happens in cases like
      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
      var authInHost = result.host && result.host.indexOf('@') > 0 ?
                       result.host.split('@') : false;
      if (authInHost) {
        result.auth = authInHost.shift();
        result.host = result.hostname = authInHost.shift();
      }
    }
    result.search = relative.search;
    result.query = relative.query;
    //to support http.request
    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
      result.path = (result.pathname ? result.pathname : '') +
                    (result.search ? result.search : '');
    }
    result.href = result.format();
    return result;
  }

  if (!srcPath.length) {
    // no path at all.  easy.
    // we've already handled the other stuff above.
    result.pathname = null;
    //to support http.request
    if (result.search) {
      result.path = '/' + result.search;
    } else {
      result.path = null;
    }
    result.href = result.format();
    return result;
  }

  // if a url ENDs in . or .., then it must get a trailing slash.
  // however, if it ends in anything else non-slashy,
  // then it must NOT get a trailing slash.
  var last = srcPath.slice(-1)[0];
  var hasTrailingSlash = (
      (result.host || relative.host || srcPath.length > 1) &&
      (last === '.' || last === '..') || last === '');

  // strip single dots, resolve double dots to parent dir
  // if the path tries to go above the root, `up` ends up > 0
  var up = 0;
  for (var i = srcPath.length; i >= 0; i--) {
    last = srcPath[i];
    if (last === '.') {
      srcPath.splice(i, 1);
    } else if (last === '..') {
      srcPath.splice(i, 1);
      up++;
    } else if (up) {
      srcPath.splice(i, 1);
      up--;
    }
  }

  // if the path is allowed to go above the root, restore leading ..s
  if (!mustEndAbs && !removeAllDots) {
    for (; up--; up) {
      srcPath.unshift('..');
    }
  }

  if (mustEndAbs && srcPath[0] !== '' &&
      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
    srcPath.unshift('');
  }

  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
    srcPath.push('');
  }

  var isAbsolute = srcPath[0] === '' ||
      (srcPath[0] && srcPath[0].charAt(0) === '/');

  // put the host back
  if (psychotic) {
    result.hostname = result.host = isAbsolute ? '' :
                                    srcPath.length ? srcPath.shift() : '';
    //occationaly the auth can get stuck only in host
    //this especially happens in cases like
    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')
    var authInHost = result.host && result.host.indexOf('@') > 0 ?
                     result.host.split('@') : false;
    if (authInHost) {
      result.auth = authInHost.shift();
      result.host = result.hostname = authInHost.shift();
    }
  }

  mustEndAbs = mustEndAbs || (result.host && srcPath.length);

  if (mustEndAbs && !isAbsolute) {
    srcPath.unshift('');
  }

  if (!srcPath.length) {
    result.pathname = null;
    result.path = null;
  } else {
    result.pathname = srcPath.join('/');
  }

  //to support request.http
  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {
    result.path = (result.pathname ? result.pathname : '') +
                  (result.search ? result.search : '');
  }
  result.auth = relative.auth || result.auth;
  result.slashes = result.slashes || relative.slashes;
  result.href = result.format();
  return result;
};

Url.prototype.parseHost = function() {
  var host = this.host;
  var port = portPattern.exec(host);
  if (port) {
    port = port[0];
    if (port !== ':') {
      this.port = port.substr(1);
    }
    host = host.substr(0, host.length - port.length);
  }
  if (host) this.hostname = host;
};


/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */
;(function(root) {

	/** Detect free variables */
	var freeExports = typeof exports == 'object' && exports &&
		!exports.nodeType && exports;
	var freeModule = typeof module == 'object' && module &&
		!module.nodeType && module;
	var freeGlobal = typeof global == 'object' && global;
	if (
		freeGlobal.global === freeGlobal ||
		freeGlobal.window === freeGlobal ||
		freeGlobal.self === freeGlobal
	) {
		root = freeGlobal;
	}

	/**
	 * The `punycode` object.
	 * @name punycode
	 * @type Object
	 */
	var punycode,

	/** Highest positive signed 32-bit float value */
	maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1

	/** Bootstring parameters */
	base = 36,
	tMin = 1,
	tMax = 26,
	skew = 38,
	damp = 700,
	initialBias = 72,
	initialN = 128, // 0x80
	delimiter = '-', // '\x2D'

	/** Regular expressions */
	regexPunycode = /^xn--/,
	regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
	regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators

	/** Error messages */
	errors = {
		'overflow': 'Overflow: input needs wider integers to process',
		'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
		'invalid-input': 'Invalid input'
	},

	/** Convenience shortcuts */
	baseMinusTMin = base - tMin,
	floor = Math.floor,
	stringFromCharCode = String.fromCharCode,

	/** Temporary variable */
	key;

	/*--------------------------------------------------------------------------*/

	/**
	 * A generic error utility function.
	 * @private
	 * @param {String} type The error type.
	 * @returns {Error} Throws a `RangeError` with the applicable error message.
	 */
	function error(type) {
		throw new RangeError(errors[type]);
	}

	/**
	 * A generic `Array#map` utility function.
	 * @private
	 * @param {Array} array The array to iterate over.
	 * @param {Function} callback The function that gets called for every array
	 * item.
	 * @returns {Array} A new array of values returned by the callback function.
	 */
	function map(array, fn) {
		var length = array.length;
		var result = [];
		while (length--) {
			result[length] = fn(array[length]);
		}
		return result;
	}

	/**
	 * A simple `Array#map`-like wrapper to work with domain name strings or email
	 * addresses.
	 * @private
	 * @param {String} domain The domain name or email address.
	 * @param {Function} callback The function that gets called for every
	 * character.
	 * @returns {Array} A new string of characters returned by the callback
	 * function.
	 */
	function mapDomain(string, fn) {
		var parts = string.split('@');
		var result = '';
		if (parts.length > 1) {
			// In email addresses, only the domain name should be punycoded. Leave
			// the local part (i.e. everything up to `@`) intact.
			result = parts[0] + '@';
			string = parts[1];
		}
		// Avoid `split(regex)` for IE8 compatibility. See #17.
		string = string.replace(regexSeparators, '\x2E');
		var labels = string.split('.');
		var encoded = map(labels, fn).join('.');
		return result + encoded;
	}

	/**
	 * Creates an array containing the numeric code points of each Unicode
	 * character in the string. While JavaScript uses UCS-2 internally,
	 * this function will convert a pair of surrogate halves (each of which
	 * UCS-2 exposes as separate characters) into a single code point,
	 * matching UTF-16.
	 * @see `punycode.ucs2.encode`
	 * @see <https://mathiasbynens.be/notes/javascript-encoding>
	 * @memberOf punycode.ucs2
	 * @name decode
	 * @param {String} string The Unicode input string (UCS-2).
	 * @returns {Array} The new array of code points.
	 */
	function ucs2decode(string) {
		var output = [],
		    counter = 0,
		    length = string.length,
		    value,
		    extra;
		while (counter < length) {
			value = string.charCodeAt(counter++);
			if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
				// high surrogate, and there is a next character
				extra = string.charCodeAt(counter++);
				if ((extra & 0xFC00) == 0xDC00) { // low surrogate
					output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
				} else {
					// unmatched surrogate; only append this code unit, in case the next
					// code unit is the high surrogate of a surrogate pair
					output.push(value);
					counter--;
				}
			} else {
				output.push(value);
			}
		}
		return output;
	}

	/**
	 * Creates a string based on an array of numeric code points.
	 * @see `punycode.ucs2.decode`
	 * @memberOf punycode.ucs2
	 * @name encode
	 * @param {Array} codePoints The array of numeric code points.
	 * @returns {String} The new Unicode string (UCS-2).
	 */
	function ucs2encode(array) {
		return map(array, function(value) {
			var output = '';
			if (value > 0xFFFF) {
				value -= 0x10000;
				output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
				value = 0xDC00 | value & 0x3FF;
			}
			output += stringFromCharCode(value);
			return output;
		}).join('');
	}

	/**
	 * Converts a basic code point into a digit/integer.
	 * @see `digitToBasic()`
	 * @private
	 * @param {Number} codePoint The basic numeric code point value.
	 * @returns {Number} The numeric value of a basic code point (for use in
	 * representing integers) in the range `0` to `base - 1`, or `base` if
	 * the code point does not represent a value.
	 */
	function basicToDigit(codePoint) {
		if (codePoint - 48 < 10) {
			return codePoint - 22;
		}
		if (codePoint - 65 < 26) {
			return codePoint - 65;
		}
		if (codePoint - 97 < 26) {
			return codePoint - 97;
		}
		return base;
	}

	/**
	 * Converts a digit/integer into a basic code point.
	 * @see `basicToDigit()`
	 * @private
	 * @param {Number} digit The numeric value of a basic code point.
	 * @returns {Number} The basic code point whose value (when used for
	 * representing integers) is `digit`, which needs to be in the range
	 * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
	 * used; else, the lowercase form is used. The behavior is undefined
	 * if `flag` is non-zero and `digit` has no uppercase form.
	 */
	function digitToBasic(digit, flag) {
		//  0..25 map to ASCII a..z or A..Z
		// 26..35 map to ASCII 0..9
		return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
	}

	/**
	 * Bias adaptation function as per section 3.4 of RFC 3492.
	 * https://tools.ietf.org/html/rfc3492#section-3.4
	 * @private
	 */
	function adapt(delta, numPoints, firstTime) {
		var k = 0;
		delta = firstTime ? floor(delta / damp) : delta >> 1;
		delta += floor(delta / numPoints);
		for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
			delta = floor(delta / baseMinusTMin);
		}
		return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
	}

	/**
	 * Converts a Punycode string of ASCII-only symbols to a string of Unicode
	 * symbols.
	 * @memberOf punycode
	 * @param {String} input The Punycode string of ASCII-only symbols.
	 * @returns {String} The resulting string of Unicode symbols.
	 */
	function decode(input) {
		// Don't use UCS-2
		var output = [],
		    inputLength = input.length,
		    out,
		    i = 0,
		    n = initialN,
		    bias = initialBias,
		    basic,
		    j,
		    index,
		    oldi,
		    w,
		    k,
		    digit,
		    t,
		    /** Cached calculation results */
		    baseMinusT;

		// Handle the basic code points: let `basic` be the number of input code
		// points before the last delimiter, or `0` if there is none, then copy
		// the first basic code points to the output.

		basic = input.lastIndexOf(delimiter);
		if (basic < 0) {
			basic = 0;
		}

		for (j = 0; j < basic; ++j) {
			// if it's not a basic code point
			if (input.charCodeAt(j) >= 0x80) {
				error('not-basic');
			}
			output.push(input.charCodeAt(j));
		}

		// Main decoding loop: start just after the last delimiter if any basic code
		// points were copied; start at the beginning otherwise.

		for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {

			// `index` is the index of the next character to be consumed.
			// Decode a generalized variable-length integer into `delta`,
			// which gets added to `i`. The overflow checking is easier
			// if we increase `i` as we go, then subtract off its starting
			// value at the end to obtain `delta`.
			for (oldi = i, w = 1, k = base; /* no condition */; k += base) {

				if (index >= inputLength) {
					error('invalid-input');
				}

				digit = basicToDigit(input.charCodeAt(index++));

				if (digit >= base || digit > floor((maxInt - i) / w)) {
					error('overflow');
				}

				i += digit * w;
				t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);

				if (digit < t) {
					break;
				}

				baseMinusT = base - t;
				if (w > floor(maxInt / baseMinusT)) {
					error('overflow');
				}

				w *= baseMinusT;

			}

			out = output.length + 1;
			bias = adapt(i - oldi, out, oldi == 0);

			// `i` was supposed to wrap around from `out` to `0`,
			// incrementing `n` each time, so we'll fix that now:
			if (floor(i / out) > maxInt - n) {
				error('overflow');
			}

			n += floor(i / out);
			i %= out;

			// Insert `n` at position `i` of the output
			output.splice(i++, 0, n);

		}

		return ucs2encode(output);
	}

	/**
	 * Converts a string of Unicode symbols (e.g. a domain name label) to a
	 * Punycode string of ASCII-only symbols.
	 * @memberOf punycode
	 * @param {String} input The string of Unicode symbols.
	 * @returns {String} The resulting Punycode string of ASCII-only symbols.
	 */
	function encode(input) {
		var n,
		    delta,
		    handledCPCount,
		    basicLength,
		    bias,
		    j,
		    m,
		    q,
		    k,
		    t,
		    currentValue,
		    output = [],
		    /** `inputLength` will hold the number of code points in `input`. */
		    inputLength,
		    /** Cached calculation results */
		    handledCPCountPlusOne,
		    baseMinusT,
		    qMinusT;

		// Convert the input in UCS-2 to Unicode
		input = ucs2decode(input);

		// Cache the length
		inputLength = input.length;

		// Initialize the state
		n = initialN;
		delta = 0;
		bias = initialBias;

		// Handle the basic code points
		for (j = 0; j < inputLength; ++j) {
			currentValue = input[j];
			if (currentValue < 0x80) {
				output.push(stringFromCharCode(currentValue));
			}
		}

		handledCPCount = basicLength = output.length;

		// `handledCPCount` is the number of code points that have been handled;
		// `basicLength` is the number of basic code points.

		// Finish the basic string - if it is not empty - with a delimiter
		if (basicLength) {
			output.push(delimiter);
		}

		// Main encoding loop:
		while (handledCPCount < inputLength) {

			// All non-basic code points < n have been handled already. Find the next
			// larger one:
			for (m = maxInt, j = 0; j < inputLength; ++j) {
				currentValue = input[j];
				if (currentValue >= n && currentValue < m) {
					m = currentValue;
				}
			}

			// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
			// but guard against overflow
			handledCPCountPlusOne = handledCPCount + 1;
			if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
				error('overflow');
			}

			delta += (m - n) * handledCPCountPlusOne;
			n = m;

			for (j = 0; j < inputLength; ++j) {
				currentValue = input[j];

				if (currentValue < n && ++delta > maxInt) {
					error('overflow');
				}

				if (currentValue == n) {
					// Represent delta as a generalized variable-length integer
					for (q = delta, k = base; /* no condition */; k += base) {
						t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
						if (q < t) {
							break;
						}
						qMinusT = q - t;
						baseMinusT = base - t;
						output.push(
							stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
						);
						q = floor(qMinusT / baseMinusT);
					}

					output.push(stringFromCharCode(digitToBasic(q, 0)));
					bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
					delta = 0;
					++handledCPCount;
				}
			}

			++delta;
			++n;

		}
		return output.join('');
	}

	/**
	 * Converts a Punycode string representing a domain name or an email address
	 * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
	 * it doesn't matter if you call it on a string that has already been
	 * converted to Unicode.
	 * @memberOf punycode
	 * @param {String} input The Punycoded domain name or email address to
	 * convert to Unicode.
	 * @returns {String} The Unicode representation of the given Punycode
	 * string.
	 */
	function toUnicode(input) {
		return mapDomain(input, function(string) {
			return regexPunycode.test(string)
				? decode(string.slice(4).toLowerCase())
				: string;
		});
	}

	/**
	 * Converts a Unicode string representing a domain name or an email address to
	 * Punycode. Only the non-ASCII parts of the domain name will be converted,
	 * i.e. it doesn't matter if you call it with a domain that's already in
	 * ASCII.
	 * @memberOf punycode
	 * @param {String} input The domain name or email address to convert, as a
	 * Unicode string.
	 * @returns {String} The Punycode representation of the given domain name or
	 * email address.
	 */
	function toASCII(input) {
		return mapDomain(input, function(string) {
			return regexNonASCII.test(string)
				? 'xn--' + encode(string)
				: string;
		});
	}

	/*--------------------------------------------------------------------------*/

	/** Define the public API */
	punycode = {
		/**
		 * A string representing the current Punycode.js version number.
		 * @memberOf punycode
		 * @type String
		 */
		'version': '1.4.1',
		/**
		 * An object of methods to convert from JavaScript's internal character
		 * representation (UCS-2) to Unicode code points, and back.
		 * @see <https://mathiasbynens.be/notes/javascript-encoding>
		 * @memberOf punycode
		 * @type Object
		 */
		'ucs2': {
			'decode': ucs2decode,
			'encode': ucs2encode
		},
		'decode': decode,
		'encode': encode,
		'toASCII': toASCII,
		'toUnicode': toUnicode
	};

	/** Expose `punycode` */
	// Some AMD build optimizers, like r.js, check for specific condition patterns
	// like the following:
	if (
		true
	) {
		!(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
			return punycode;
		}.call(exports, __webpack_require__, exports, module),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
	} else if (freeExports && freeModule) {
		if (module.exports == freeExports) {
			// in Node.js, io.js, or RingoJS v0.8.0+
			freeModule.exports = punycode;
		} else {
			// in Narwhal or RingoJS v0.7.0-
			for (key in punycode) {
				punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
			}
		}
	} else {
		// in Rhino or a web browser
		root.punycode = punycode;
	}

}(this));

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20)(module), __webpack_require__(21)))

/***/ }),
/* 20 */
/***/ (function(module, exports) {

module.exports = function(module) {
	if(!module.webpackPolyfill) {
		module.deprecate = function() {};
		module.paths = [];
		// module.parent = undefined by default
		if(!module.children) module.children = [];
		Object.defineProperty(module, "loaded", {
			enumerable: true,
			get: function() {
				return module.l;
			}
		});
		Object.defineProperty(module, "id", {
			enumerable: true,
			get: function() {
				return module.i;
			}
		});
		module.webpackPolyfill = 1;
	}
	return module;
};


/***/ }),
/* 21 */
/***/ (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;


/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


module.exports = {
  isString: function(arg) {
    return typeof(arg) === 'string';
  },
  isObject: function(arg) {
    return typeof(arg) === 'object' && arg !== null;
  },
  isNull: function(arg) {
    return arg === null;
  },
  isNullOrUndefined: function(arg) {
    return arg == null;
  }
};


/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.decode = exports.parse = __webpack_require__(24);
exports.encode = exports.stringify = __webpack_require__(25);


/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



// If obj.hasOwnProperty has been overridden, then calling
// obj.hasOwnProperty(prop) will break.
// See: https://github.com/joyent/node/issues/1707
function hasOwnProperty(obj, prop) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}

module.exports = function(qs, sep, eq, options) {
  sep = sep || '&';
  eq = eq || '=';
  var obj = {};

  if (typeof qs !== 'string' || qs.length === 0) {
    return obj;
  }

  var regexp = /\+/g;
  qs = qs.split(sep);

  var maxKeys = 1000;
  if (options && typeof options.maxKeys === 'number') {
    maxKeys = options.maxKeys;
  }

  var len = qs.length;
  // maxKeys <= 0 means that we should not limit keys count
  if (maxKeys > 0 && len > maxKeys) {
    len = maxKeys;
  }

  for (var i = 0; i < len; ++i) {
    var x = qs[i].replace(regexp, '%20'),
        idx = x.indexOf(eq),
        kstr, vstr, k, v;

    if (idx >= 0) {
      kstr = x.substr(0, idx);
      vstr = x.substr(idx + 1);
    } else {
      kstr = x;
      vstr = '';
    }

    k = decodeURIComponent(kstr);
    v = decodeURIComponent(vstr);

    if (!hasOwnProperty(obj, k)) {
      obj[k] = v;
    } else if (isArray(obj[k])) {
      obj[k].push(v);
    } else {
      obj[k] = [obj[k], v];
    }
  }

  return obj;
};

var isArray = Array.isArray || function (xs) {
  return Object.prototype.toString.call(xs) === '[object Array]';
};


/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.



var stringifyPrimitive = function(v) {
  switch (typeof v) {
    case 'string':
      return v;

    case 'boolean':
      return v ? 'true' : 'false';

    case 'number':
      return isFinite(v) ? v : '';

    default:
      return '';
  }
};

module.exports = function(obj, sep, eq, name) {
  sep = sep || '&';
  eq = eq || '=';
  if (obj === null) {
    obj = undefined;
  }

  if (typeof obj === 'object') {
    return map(objectKeys(obj), function(k) {
      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
      if (isArray(obj[k])) {
        return map(obj[k], function(v) {
          return ks + encodeURIComponent(stringifyPrimitive(v));
        }).join(sep);
      } else {
        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
      }
    }).join(sep);

  }

  if (!name) return '';
  return encodeURIComponent(stringifyPrimitive(name)) + eq +
         encodeURIComponent(stringifyPrimitive(obj));
};

var isArray = Array.isArray || function (xs) {
  return Object.prototype.toString.call(xs) === '[object Array]';
};

function map (xs, f) {
  if (xs.map) return xs.map(f);
  var res = [];
  for (var i = 0; i < xs.length; i++) {
    res.push(f(xs[i], i));
  }
  return res;
}

var objectKeys = Object.keys || function (obj) {
  var res = [];
  for (var key in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
  }
  return res;
};


/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(27);
module.exports = __webpack_require__(2).Array.find;


/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__(28);
var $find = __webpack_require__(38)(5);
var KEY = 'find';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
  find: function find(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});
__webpack_require__(48)(KEY);


/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(0);
var core = __webpack_require__(2);
var hide = __webpack_require__(3);
var redefine = __webpack_require__(35);
var ctx = __webpack_require__(8);
var PROTOTYPE = 'prototype';

var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  var key, own, out, exp;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    // export native or passed
    out = (own ? target : source)[key];
    // bind timers to global for call from export context
    exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // extend global
    if (target) redefine(target, key, out, type & $export.U);
    // export
    if (exports[key] != out) hide(exports, key, exp);
    if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  }
};
global.core = core;
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;


/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(30);
var IE8_DOM_DEFINE = __webpack_require__(31);
var toPrimitive = __webpack_require__(33);
var dP = Object.defineProperty;

exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return dP(O, P, Attributes);
  } catch (e) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(1);
module.exports = function (it) {
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};


/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = !__webpack_require__(4) && !__webpack_require__(6)(function () {
  return Object.defineProperty(__webpack_require__(32)('div'), 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(1);
var document = __webpack_require__(0).document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
  return is ? document.createElement(it) : {};
};


/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(1);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
  if (!isObject(it)) return it;
  var fn, val;
  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),
/* 34 */
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(0);
var hide = __webpack_require__(3);
var has = __webpack_require__(36);
var SRC = __webpack_require__(7)('src');
var TO_STRING = 'toString';
var $toString = Function[TO_STRING];
var TPL = ('' + $toString).split(TO_STRING);

__webpack_require__(2).inspectSource = function (it) {
  return $toString.call(it);
};

(module.exports = function (O, key, val, safe) {
  var isFunction = typeof val == 'function';
  if (isFunction) has(val, 'name') || hide(val, 'name', key);
  if (O[key] === val) return;
  if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  if (O === global) {
    O[key] = val;
  } else if (!safe) {
    delete O[key];
    hide(O, key, val);
  } else if (O[key]) {
    O[key] = val;
  } else {
    hide(O, key, val);
  }
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
  return typeof this == 'function' && this[SRC] || $toString.call(this);
});


/***/ }),
/* 36 */
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),
/* 37 */
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};


/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {

// 0 -> Array#forEach
// 1 -> Array#map
// 2 -> Array#filter
// 3 -> Array#some
// 4 -> Array#every
// 5 -> Array#find
// 6 -> Array#findIndex
var ctx = __webpack_require__(8);
var IObject = __webpack_require__(39);
var toObject = __webpack_require__(40);
var toLength = __webpack_require__(42);
var asc = __webpack_require__(44);
module.exports = function (TYPE, $create) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  var create = $create || asc;
  return function ($this, callbackfn, that) {
    var O = toObject($this);
    var self = IObject(O);
    var f = ctx(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
    var val, res;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      val = self[index];
      res = f(val, index, O);
      if (TYPE) {
        if (IS_MAP) result[index] = res;   // map
        else if (res) switch (TYPE) {
          case 3: return true;             // some
          case 5: return val;              // find
          case 6: return index;            // findIndex
          case 2: result.push(val);        // filter
        } else if (IS_EVERY) return false; // every
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  };
};


/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(9);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return cof(it) == 'String' ? it.split('') : Object(it);
};


/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.13 ToObject(argument)
var defined = __webpack_require__(41);
module.exports = function (it) {
  return Object(defined(it));
};


/***/ }),
/* 41 */
/***/ (function(module, exports) {

// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on  " + it);
  return it;
};


/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.15 ToLength
var toInteger = __webpack_require__(43);
var min = Math.min;
module.exports = function (it) {
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};


/***/ }),
/* 43 */
/***/ (function(module, exports) {

// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};


/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {

// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = __webpack_require__(45);

module.exports = function (original, length) {
  return new (speciesConstructor(original))(length);
};


/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(1);
var isArray = __webpack_require__(46);
var SPECIES = __webpack_require__(10)('species');

module.exports = function (original) {
  var C;
  if (isArray(original)) {
    C = original.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return C === undefined ? Array : C;
};


/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {

// 7.2.2 IsArray(argument)
var cof = __webpack_require__(9);
module.exports = Array.isArray || function isArray(arg) {
  return cof(arg) == 'Array';
};


/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(0);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
module.exports = function (key) {
  return store[key] || (store[key] = {});
};


/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {

// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__(10)('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(3)(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
  ArrayProto[UNSCOPABLES][key] = true;
};


/***/ })
/******/ ]);
});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Clappr=e():t.Clappr=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=94)}([function(t,e,i){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(32),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,r.default)(e))&&"function"!=typeof e?t:e}},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=i(126),a=n(r),o=i(72),s=n(o),l=i(32),u=n(l);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,u.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(a.default?(0,a.default)(t,e):t.__proto__=e)}},function(t,e,i){"use strict";e.__esModule=!0;var n=i(71),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,r.default)(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}()},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(38),a=n(r),o=i(0),s=n(o),l=i(32),u=n(l),d=i(55),c=n(d),h=i(5),f=Array.prototype.slice,p=/\s+/,g=function(t,e,i,n){if(!i)return!0;if("object"===(void 0===i?"undefined":(0,u.default)(i))){for(var r in i)t[e].apply(t,[r,i[r]].concat(n));return!1}if(p.test(i)){for(var a=i.split(p),o=0,s=a.length;o<s;o++)t[e].apply(t,[a[o]].concat(n));return!1}return!0},y=function(t,e,i,n){function r(){try{switch(e.length){case 0:for(;++o<s;)(a=t[o]).callback.call(a.ctx);return;case 1:for(;++o<s;)(a=t[o]).callback.call(a.ctx,l);return;case 2:for(;++o<s;)(a=t[o]).callback.call(a.ctx,l,u);return;case 3:for(;++o<s;)(a=t[o]).callback.call(a.ctx,l,u,d);return;default:for(;++o<s;)(a=t[o]).callback.apply(a.ctx,e);return}}catch(t){c.default.error.apply(c.default,[i,"error on event",n,"trigger","-",t]),r()}}var a=void 0,o=-1,s=t.length,l=e[0],u=e[1],d=e[2];r()},v=function(){function t(){(0,s.default)(this,t)}return t.prototype.on=function(t,e,i){return g(this,"on",t,[e,i])&&e?(this._events||(this._events={}),(this._events[t]||(this._events[t]=[])).push({callback:e,context:i,ctx:i||this}),this):this},t.prototype.once=function(t,e,i){var n=this,r=void 0;if(!g(this,"once",t,[e,i])||!e)return this;var a=function(){return n.off(t,r)};return r=function(){a(),e.apply(this,arguments)},this.on(t,r,i)},t.prototype.off=function(t,e,i){var n=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,c=void 0;if(!this._events||!g(this,"off",t,[e,i]))return this;if(!t&&!e&&!i)return this._events=void 0,this;for(s=t?[t]:(0,a.default)(this._events),l=0,u=s.length;l<u;l++)if(t=s[l],o=this._events[t]){if(this._events[t]=n=[],e||i)for(d=0,c=o.length;d<c;d++)r=o[d],(e&&e!==r.callback&&e!==r.callback._callback||i&&i!==r.context)&&n.push(r);n.length||delete this._events[t]}return this},t.prototype.trigger=function(t){var e=this.name||this.constructor.name;if(c.default.debug.apply(c.default,[e].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var i=f.call(arguments,1);if(!g(this,"trigger",t,i))return this;var n=this._events[t],r=this._events.all;return n&&y(n,i,e,t),r&&y(r,arguments,e,t),this},t.prototype.stopListening=function(t,e,i){var n=this._listeningTo;if(!n)return this;var r=!e&&!i;i||"object"!==(void 0===e?"undefined":(0,u.default)(e))||(i=this),t&&((n={})[t._listenId]=t);for(var o in n)t=n[o],t.off(e,i,this),(r||0===(0,a.default)(t._events).length)&&delete this._listeningTo[o];return this},t.register=function(e){t.Custom||(t.Custom={});var i="string"==typeof e&&e.toUpperCase().trim();i&&!t.Custom[i]?t.Custom[i]=i.toLowerCase().split("_").map(function(t,e){return 0===e?t:t=t[0].toUpperCase()+t.slice(1)}).join(""):c.default.error("Events","Error when register event: "+e)},t.listAvailableCustomEvents=function(){return t.Custom||(t.Custom={}),(0,a.default)(t.Custom).filter(function(e){return"string"==typeof t.Custom[e]})},t}();e.default=v;var m={listenTo:"on",listenToOnce:"once"};(0,a.default)(m).forEach(function(t){v.prototype[t]=function(e,i,n){return(this._listeningTo||(this._listeningTo={}))[e._listenId||(e._listenId=(0,h.uniqueId)("l"))]=e,n||"object"!==(void 0===i?"undefined":(0,u.default)(i))||(n=this),e[m[t]](i,n,this),this}}),v.PLAYER_READY="ready",v.PLAYER_RESIZE="resize",v.PLAYER_FULLSCREEN="fullscreen",v.PLAYER_PLAY="play",v.PLAYER_PAUSE="pause",v.PLAYER_STOP="stop",v.PLAYER_ENDED="ended",v.PLAYER_SEEK="seek",v.PLAYER_ERROR="error",v.PLAYER_TIMEUPDATE="timeupdate",v.PLAYER_VOLUMEUPDATE="volumeupdate",v.PLAYER_SUBTITLE_AVAILABLE="subtitleavailable",v.PLAYBACK_PROGRESS="playback:progress",v.PLAYBACK_TIMEUPDATE="playback:timeupdate",v.PLAYBACK_READY="playback:ready",v.PLAYBACK_BUFFERING="playback:buffering",v.PLAYBACK_BUFFERFULL="playback:bufferfull",v.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",v.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",v.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",v.PLAYBACK_BITRATE="playback:bitrate",v.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",v.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",v.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",v.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",v.PLAYBACK_DVR="playback:dvr",v.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",v.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",v.PLAYBACK_ENDED="playback:ended",v.PLAYBACK_PLAY_INTENT="playback:play:intent",v.PLAYBACK_PLAY="playback:play",v.PLAYBACK_PAUSE="playback:pause",v.PLAYBACK_SEEK="playback:seek",v.PLAYBACK_SEEKED="playback:seeked",v.PLAYBACK_STOP="playback:stop",v.PLAYBACK_ERROR="playback:error",v.PLAYBACK_STATS_ADD="playback:stats:add",v.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",v.PLAYBACK_LEVEL_SWITCH="playback:level:switch",v.PLAYBACK_SUBTITLE_AVAILABLE="playback:subtitle:available",v.PLAYBACK_SUBTITLE_CHANGED="playback:subtitle:changed",v.CORE_CONTAINERS_CREATED="core:containers:created",v.CORE_OPTIONS_CHANGE="core:options:change",v.CORE_READY="core:ready",v.CORE_FULLSCREEN="core:fullscreen",v.CORE_SCREEN_ORIENTATION_CHANGED="core:screen:orientation:changed",v.CONTAINER_PLAYBACKSTATE="container:playbackstate",v.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",v.CONTAINER_BITRATE="container:bitrate",v.CONTAINER_STATS_REPORT="container:stats:report",v.CONTAINER_DESTROYED="container:destroyed",v.CONTAINER_READY="container:ready",v.CONTAINER_ERROR="container:error",v.CONTAINER_LOADEDMETADATA="container:loadedmetadata",v.CONTAINER_SUBTITLE_AVAILABLE="container:subtitle:available",v.CONTAINER_SUBTITLE_CHANGED="container:subtitle:changed",v.CONTAINER_TIMEUPDATE="container:timeupdate",v.CONTAINER_PROGRESS="container:progress",v.CONTAINER_PLAY="container:play",v.CONTAINER_STOP="container:stop",v.CONTAINER_PAUSE="container:pause",v.CONTAINER_ENDED="container:ended",v.CONTAINER_CLICK="container:click",v.CONTAINER_DBLCLICK="container:dblclick",v.CONTAINER_CONTEXTMENU="container:contextmenu",v.CONTAINER_MOUSE_ENTER="container:mouseenter",v.CONTAINER_MOUSE_LEAVE="container:mouseleave",v.CONTAINER_SEEK="container:seek",v.CONTAINER_SEEKED="container:seeked",v.CONTAINER_VOLUME="container:volume",v.CONTAINER_FULLSCREEN="container:fullscreen",v.CONTAINER_STATE_BUFFERING="container:state:buffering",v.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",v.CONTAINER_SETTINGSUPDATE="container:settingsupdate",v.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",v.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",v.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",v.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",v.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",v.CONTAINER_STATS_ADD="container:stats:add",v.CONTAINER_OPTIONS_CHANGE="container:options:change",v.MEDIACONTROL_RENDERED="mediacontrol:rendered",v.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",v.MEDIACONTROL_SHOW="mediacontrol:show",v.MEDIACONTROL_HIDE="mediacontrol:hide",v.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",v.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",v.MEDIACONTROL_PLAYING="mediacontrol:playing",v.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",v.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",v.MEDIACONTROL_OPTIONS_CHANGE="mediacontrol:options:change",t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(e)for(var i in e){var n=(0,L.default)(e,i);n?(0,A.default)(t,i,n):t[i]=e[i]}return t}function a(t,e){var i=function(t){function i(){(0,v.default)(this,i);for(var n=arguments.length,r=Array(n),a=0;a<n;a++)r[a]=arguments[a];var o=(0,b.default)(this,t.call.apply(t,[this].concat(r)));return e.initialize&&e.initialize.apply(o,r),o}return(0,E.default)(i,t),i}(t);return r(i.prototype,e),i}function o(t,e){if(!isFinite(t))return"--:--";t*=1e3,t=parseInt(t/1e3);var i=t%60;t=parseInt(t/60);var n=t%60;t=parseInt(t/60);var r=t%24,a=parseInt(t/24),o="";return a&&a>0&&(o+=a+":",r<1&&(o+="00:")),(r&&r>0||e)&&(o+=("0"+r).slice(-2)+":"),o+=("0"+n).slice(-2)+":",o+=("0"+i).slice(-2),o.trim()}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",e=0,i=O.params[t]||O.hashParams[t]||"",n=i.match(/[0-9]+[hms]+/g)||[];if(n.length>0){var r={h:3600,m:60,s:1};n.forEach(function(t){if(t){var i=t[t.length-1],n=parseInt(t.slice(0,t.length-1),10);e+=n*r[i]}})}else i&&(e=parseInt(i,10));return e}function l(t){return P[t]||(P[t]=0),t+ ++P[t]}function u(t){return t-parseFloat(t)+1>=0}function d(){var t=document.getElementsByTagName("script");return t.length?t[t.length-1].src:""}function c(){return window.navigator&&window.navigator.language}function h(){return window.performance&&window.performance.now?performance.now():Date.now()}function f(t,e){var i=t.indexOf(e);i>=0&&t.splice(i,1)}Object.defineProperty(e,"__esModule",{value:!0}),e.DomRecycler=e.cancelAnimationFrame=e.requestAnimationFrame=e.QueryString=e.Config=e.Fullscreen=void 0;var p=i(3),g=n(p),y=i(0),v=n(y),m=i(1),b=n(m),_=i(2),E=n(_),T=i(71),A=n(T),S=i(132),L=n(S);e.assign=r,e.extend=a,e.formatTime=o,e.seekStringToSeconds=s,e.uniqueId=l,e.isNumber=u,e.currentScriptUrl=d,e.getBrowserLanguage=c,e.now=h,e.removeArrayItem=f,i(135);var R=i(13),k=n(R),w=i(6),C=n(w),I=e.Fullscreen={isFullscreen:function(){return!!(document.webkitFullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement)},requestFullscreen:function(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():t.querySelector&&t.querySelector("video")&&t.querySelector("video").webkitEnterFullScreen?t.querySelector("video").webkitEnterFullScreen():t.webkitEnterFullScreen&&t.webkitEnterFullScreen()},cancelFullscreen:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;t.exitFullscreen?t.exitFullscreen():t.webkitCancelFullScreen?t.webkitCancelFullScreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},D=e.Config=function(){function t(){(0,v.default)(this,t)}return t._defaultConfig=function(){return{volume:{value:100,parse:parseInt}}},t._defaultValueFor=function(t){try{return this._defaultConfig()[t].parse(this._defaultConfig()[t].value)}catch(t){return}},t._createKeyspace=function(t){return"clappr."+document.domain+"."+t},t.restore=function(t){return k.default.hasLocalstorage&&localStorage[this._createKeyspace(t)]?this._defaultConfig()[t].parse(localStorage[this._createKeyspace(t)]):this._defaultValueFor(t)},t.persist=function(t,e){if(k.default.hasLocalstorage)try{return localStorage[this._createKeyspace(t)]=e,!0}catch(t){return!1}},t}(),O=e.QueryString=function(){function t(){(0,v.default)(this,t)}return t.parse=function(t){for(var e=void 0,i=/\+/g,n=/([^&=]+)=?([^&]*)/g,r=function(t){return decodeURIComponent(t.replace(i," "))},a={};e=n.exec(t);)a[r(e[1]).toLowerCase()]=r(e[2]);return a},(0,g.default)(t,null,[{key:"params",get:function(){var t=window.location.search.substring(1);return t!==this.query&&(this._urlParams=this.parse(t),this.query=t),this._urlParams}},{key:"hashParams",get:function(){var t=window.location.hash.substring(1);return t!==this.hash&&(this._hashParams=this.parse(t),this.hash=t),this._hashParams}}]),t}(),P={},x=e.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}).bind(window),N=e.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window),M=[],F=e.DomRecycler=function(){function t(){(0,v.default)(this,t)}return t.configure=function(t){this.options=C.default.extend(this.options,t)},t.create=function(t){return this.options.recycleVideo&&"video"===t&&M.length>0?M.shift():(0,C.default)("<"+t+">")},t.garbage=function(t){this.options.recycleVideo&&"VIDEO"===t[0].tagName.toUpperCase()&&(t.children().remove(),M.push(t))},t}();F.options={recycleVideo:!1},e.default={Config:D,Fullscreen:I,QueryString:O,DomRecycler:F,extend:a,formatTime:o,seekStringToSeconds:s,uniqueId:l,currentScriptUrl:d,isNumber:u,requestAnimationFrame:x,cancelAnimationFrame:N,getBrowserLanguage:c,now:h,removeArrayItem:f}},function(t,e){var i=function(){function t(t){return null==t?String(t):W[q.call(t)]||"object"}function e(e){return"function"==t(e)}function i(t){return null!=t&&t==t.window}function n(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function r(e){return"object"==t(e)}function a(t){return r(t)&&!i(t)&&Object.getPrototypeOf(t)==Object.prototype}function o(t){var e=!!t&&"length"in t&&t.length,n=S.type(t);return"function"!=n&&!i(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function s(t){return I.call(t,function(t){return null!=t})}function l(t){return t.length>0?S.fn.concat.apply([],t):t}function u(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function d(t){return t in x?x[t]:x[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function c(t,e){return"number"!=typeof e||N[u(t)]?e:e+"px"}function h(t){var e,i;return P[t]||(e=O.createElement(t),O.body.appendChild(e),i=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==i&&(i="block"),P[t]=i),P[t]}function f(t){return"children"in t?D.call(t.children):S.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function p(t,e){var i,n=t?t.length:0;for(i=0;i<n;i++)this[i]=t[i];this.length=n,this.selector=e||""}function g(t,e,i){for(A in e)i&&(a(e[A])||Q(e[A]))?(a(e[A])&&!a(t[A])&&(t[A]={}),Q(e[A])&&!Q(t[A])&&(t[A]=[]),g(t[A],e[A],i)):e[A]!==T&&(t[A]=e[A])}function y(t,e){return null==e?S(t):S(t).filter(e)}function v(t,i,n,r){return e(i)?i.call(t,n,r):i}function m(t,e,i){null==i?t.removeAttribute(e):t.setAttribute(e,i)}function b(t,e){var i=t.className||"",n=i&&i.baseVal!==T;if(e===T)return n?i.baseVal:i;n?i.baseVal=e:t.className=e}function _(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?S.parseJSON(t):t):t}catch(e){return t}}function E(t,e){e(t);for(var i=0,n=t.childNodes.length;i<n;i++)E(t.childNodes[i],e)}var T,A,S,L,R,k,w=[],C=w.concat,I=w.filter,D=w.slice,O=window.document,P={},x={},N={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},M=/^\s*<(\w+|!)[^>]*>/,F=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,B=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,U=/^(?:body|html)$/i,G=/([A-Z])/g,K=["val","css","html","text","data","width","height","offset"],Y=["after","prepend","before","append"],j=O.createElement("table"),V=O.createElement("tr"),H={tr:O.createElement("tbody"),tbody:j,thead:j,tfoot:j,td:V,th:V,"*":O.createElement("div")},$=/complete|loaded|interactive/,z=/^[\w-]*$/,W={},q=W.toString,X={},Z=O.createElement("div"),J={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return X.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(i)return i.call(t,e);var n,r=t.parentNode,a=!r;return a&&(r=Z).appendChild(t),n=~X.qsa(r,e).indexOf(t),a&&Z.removeChild(t),n},R=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},k=function(t){return I.call(t,function(e,i){return t.indexOf(e)==i})},X.fragment=function(t,e,i){var n,r,o;return F.test(t)&&(n=S(O.createElement(RegExp.$1))),n||(t.replace&&(t=t.replace(B,"<$1></$2>")),e===T&&(e=M.test(t)&&RegExp.$1),e in H||(e="*"),o=H[e],o.innerHTML=""+t,n=S.each(D.call(o.childNodes),function(){o.removeChild(this)})),a(i)&&(r=S(n),S.each(i,function(t,e){K.indexOf(t)>-1?r[t](e):r.attr(t,e)})),n},X.Z=function(t,e){return new p(t,e)},X.isZ=function(t){return t instanceof X.Z},X.init=function(t,i){var n;if(!t)return X.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))n=X.fragment(t,RegExp.$1,i),t=null;else{if(i!==T)return S(i).find(t);n=X.qsa(O,t)}else{if(e(t))return S(O).ready(t);if(X.isZ(t))return t;if(Q(t))n=s(t);else if(r(t))n=[t],t=null;else if(M.test(t))n=X.fragment(t.trim(),RegExp.$1,i),t=null;else{if(i!==T)return S(i).find(t);n=X.qsa(O,t)}}return X.Z(n,t)},S=function(t,e){return X.init(t,e)},S.extend=function(t){var e,i=D.call(arguments,1);return"boolean"==typeof t&&(e=t,t=i.shift()),i.forEach(function(i){g(t,i,e)}),t},X.qsa=function(t,e){var i,n="#"==e[0],r=!n&&"."==e[0],a=n||r?e.slice(1):e,o=z.test(a);return t.getElementById&&o&&n?(i=t.getElementById(a))?[i]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:D.call(o&&!n&&t.getElementsByClassName?r?t.getElementsByClassName(a):t.getElementsByTagName(e):t.querySelectorAll(e))},S.contains=O.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},S.type=t,S.isFunction=e,S.isWindow=i,S.isArray=Q,S.isPlainObject=a,S.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},S.isNumeric=function(t){var e=Number(t),i=typeof t;return null!=t&&"boolean"!=i&&("string"!=i||t.length)&&!isNaN(e)&&isFinite(e)||!1},S.inArray=function(t,e,i){return w.indexOf.call(e,t,i)},S.camelCase=R,S.trim=function(t){return null==t?"":String.prototype.trim.call(t)},S.uuid=0,S.support={},S.expr={},S.noop=function(){},S.map=function(t,e){var i,n,r,a=[];if(o(t))for(n=0;n<t.length;n++)null!=(i=e(t[n],n))&&a.push(i);else for(r in t)null!=(i=e(t[r],r))&&a.push(i);return l(a)},S.each=function(t,e){var i,n;if(o(t)){for(i=0;i<t.length;i++)if(!1===e.call(t[i],i,t[i]))return t}else for(n in t)if(!1===e.call(t[n],n,t[n]))return t;return t},S.grep=function(t,e){return I.call(t,e)},window.JSON&&(S.parseJSON=JSON.parse),S.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){W["[object "+e+"]"]=e.toLowerCase()}),S.fn={constructor:X.Z,length:0,forEach:w.forEach,reduce:w.reduce,push:w.push,sort:w.sort,splice:w.splice,indexOf:w.indexOf,concat:function(){var t,e,i=[];for(t=0;t<arguments.length;t++)e=arguments[t],i[t]=X.isZ(e)?e.toArray():e;return C.apply(X.isZ(this)?this.toArray():this,i)},map:function(t){return S(S.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return S(D.apply(this,arguments))},ready:function(t){return $.test(O.readyState)&&O.body?t(S):O.addEventListener("DOMContentLoaded",function(){t(S)},!1),this},get:function(t){return t===T?D.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return w.every.call(this,function(e,i){return!1!==t.call(e,i,e)}),this},filter:function(t){return e(t)?this.not(this.not(t)):S(I.call(this,function(e){return X.matches(e,t)}))},add:function(t,e){return S(k(this.concat(S(t,e))))},is:function(t){return this.length>0&&X.matches(this[0],t)},not:function(t){var i=[];if(e(t)&&t.call!==T)this.each(function(e){t.call(this,e)||i.push(this)});else{var n="string"==typeof t?this.filter(t):o(t)&&e(t.item)?D.call(t):S(t);this.forEach(function(t){n.indexOf(t)<0&&i.push(t)})}return S(i)},has:function(t){return this.filter(function(){return r(t)?S.contains(this,t):S(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!r(t)?t:S(t)},last:function(){var t=this[this.length-1];return t&&!r(t)?t:S(t)},find:function(t){var e=this;return t?"object"==typeof t?S(t).filter(function(){var t=this;return w.some.call(e,function(e){return S.contains(e,t)})}):1==this.length?S(X.qsa(this[0],t)):this.map(function(){return X.qsa(this,t)}):S()},closest:function(t,e){var i=[],r="object"==typeof t&&S(t);return this.each(function(a,o){for(;o&&!(r?r.indexOf(o)>=0:X.matches(o,t));)o=o!==e&&!n(o)&&o.parentNode;o&&i.indexOf(o)<0&&i.push(o)}),S(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=S.map(i,function(t){if((t=t.parentNode)&&!n(t)&&e.indexOf(t)<0)return e.push(t),t});return y(e,t)},parent:function(t){return y(k(this.pluck("parentNode")),t)},children:function(t){return y(this.map(function(){return f(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||D.call(this.childNodes)})},siblings:function(t){return y(this.map(function(t,e){return I.call(f(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return S.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var i=e(t);if(this[0]&&!i)var n=S(t).get(0),r=n.parentNode||this.length>1;return this.each(function(e){S(this).wrapAll(i?t.call(this,e):r?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){S(this[0]).before(t=S(t));for(var e;(e=t.children()).length;)t=e.first();S(t).append(this)}return this},wrapInner:function(t){var i=e(t);return this.each(function(e){var n=S(this),r=n.contents(),a=i?t.call(this,e):t;r.length?r.wrapAll(a):n.append(a)})},unwrap:function(){return this.parent().each(function(){S(this).replaceWith(S(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=S(this);(t===T?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return S(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return S(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var i=this.innerHTML;S(this).empty().append(v(this,t,e,i))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var i=v(this,t,e,this.textContent);this.textContent=null==i?"":""+i}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var i;return"string"!=typeof t||1 in arguments?this.each(function(i){if(1===this.nodeType)if(r(t))for(A in t)m(this,A,t[A]);else m(this,t,v(this,e,i,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:T},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){m(this,t)},this)})},prop:function(t,e){return t=J[t]||t,1 in arguments?this.each(function(i){this[t]=v(this,e,i,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=J[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var i="data-"+t.replace(G,"-$1").toLowerCase(),n=1 in arguments?this.attr(i,e):this.attr(i);return null!==n?_(n):T},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=v(this,t,e,this.value)})):this[0]&&(this[0].multiple?S(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var i=S(this),n=v(this,t,e,i.offset()),r=i.offsetParent().offset(),a={top:n.top-r.top,left:n.left-r.left};"static"==i.css("position")&&(a.position="relative"),i.css(a)});if(!this.length)return null;if(O.documentElement!==this[0]&&!S.contains(O.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,i){if(arguments.length<2){var n=this[0];if("string"==typeof e){if(!n)return;return n.style[R(e)]||getComputedStyle(n,"").getPropertyValue(e)}if(Q(e)){if(!n)return;var r={},a=getComputedStyle(n,"");return S.each(e,function(t,e){r[e]=n.style[R(e)]||a.getPropertyValue(e)}),r}}var o="";if("string"==t(e))i||0===i?o=u(e)+":"+c(e,i):this.each(function(){this.style.removeProperty(u(e))});else for(A in e)e[A]||0===e[A]?o+=u(A)+":"+c(A,e[A])+";":this.each(function(){this.style.removeProperty(u(A))});return this.each(function(){this.style.cssText+=";"+o})},index:function(t){return t?this.indexOf(S(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&w.some.call(this,function(t){return this.test(b(t))},d(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){L=[];var i=b(this);v(this,t,e,i).split(/\s+/g).forEach(function(t){S(this).hasClass(t)||L.push(t)},this),L.length&&b(this,i+(i?" ":"")+L.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===T)return b(this,"");L=b(this),v(this,t,e,L).split(/\s+/g).forEach(function(t){L=L.replace(d(t)," ")}),b(this,L.trim())}})},toggleClass:function(t,e){return t?this.each(function(i){var n=S(this);v(this,t,i,b(this)).split(/\s+/g).forEach(function(t){(e===T?!n.hasClass(t):e)?n.addClass(t):n.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===T?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===T?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),n=U.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(S(t).css("margin-top"))||0,i.left-=parseFloat(S(t).css("margin-left"))||0,n.top+=parseFloat(S(e[0]).css("border-top-width"))||0,n.left+=parseFloat(S(e[0]).css("border-left-width"))||0,{top:i.top-n.top,left:i.left-n.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||O.body;t&&!U.test(t.nodeName)&&"static"==S(t).css("position");)t=t.offsetParent;return t})}},S.fn.detach=S.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});S.fn[t]=function(r){var a,o=this[0];return r===T?i(o)?o["inner"+e]:n(o)?o.documentElement["scroll"+e]:(a=this.offset())&&a[t]:this.each(function(e){o=S(this),o.css(t,v(this,r,e,o[t]()))})}}),Y.forEach(function(e,i){var n=i%2;S.fn[e]=function(){var e,r,a=S.map(arguments,function(i){var n=[];return e=t(i),"array"==e?(i.forEach(function(t){return t.nodeType!==T?n.push(t):S.zepto.isZ(t)?n=n.concat(t.get()):void(n=n.concat(X.fragment(t)))}),n):"object"==e||null==i?i:X.fragment(i)}),o=this.length>1;return a.length<1?this:this.each(function(t,e){r=n?e:e.parentNode,e=0==i?e.nextSibling:1==i?e.firstChild:2==i?e:null;var s=S.contains(O.documentElement,r);a.forEach(function(t){if(o)t=t.cloneNode(!0);else if(!r)return S(t).remove();r.insertBefore(t,e),s&&E(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},S.fn[n?e+"To":"insert"+(i?"Before":"After")]=function(t){return S(t)[e](this),this}}),X.Z.prototype=p.prototype=S.fn,X.uniq=k,X.deserializeValue=_,S.zepto=X,S}();window.Zepto=i,void 0===window.$&&(window.$=i),function(t){function e(e,i,n){var r=t.Event(i);return t(e).trigger(r,n),!r.isDefaultPrevented()}function i(t,i,n,r){if(t.global)return e(i||b,n,r)}function n(e){e.global&&0==t.active++&&i(e,null,"ajaxStart")}function r(e){e.global&&!--t.active&&i(e,null,"ajaxStop")}function a(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===i(e,n,"ajaxBeforeSend",[t,e]))return!1;i(e,n,"ajaxSend",[t,e])}function o(t,e,n,r){var a=n.context;n.success.call(a,t,"success",e),r&&r.resolveWith(a,[t,"success",e]),i(n,a,"ajaxSuccess",[e,n,t]),l("success",e,n)}function s(t,e,n,r,a){var o=r.context;r.error.call(o,n,e,t),a&&a.rejectWith(o,[n,e,t]),i(r,o,"ajaxError",[n,r,t||e]),l(e,n,r)}function l(t,e,n){var a=n.context;n.complete.call(a,e,t),i(n,a,"ajaxComplete",[e,n]),r(n)}function u(t,e,i){if(i.dataFilter==d)return t;var n=i.context;return i.dataFilter.call(n,t,e)}function d(){}function c(t){return t&&(t=t.split(";",2)[0]),t&&(t==S?"html":t==A?"json":E.test(t)?"script":T.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function f(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=h(e.url,e.data),e.data=void 0)}function p(e,i,n,r){return t.isFunction(i)&&(r=n,n=i,i=void 0),t.isFunction(n)||(r=n,n=void 0),{url:e,data:i,success:n,dataType:r}}function g(e,i,n,r){var a,o=t.isArray(i),s=t.isPlainObject(i);t.each(i,function(i,l){a=t.type(l),r&&(i=n?r:r+"["+(s||"object"==a||"array"==a?i:"")+"]"),!r&&o?e.add(l.name,l.value):"array"==a||!n&&"object"==a?g(e,l,n,i):e.add(i,l)})}var y,v,m=+new Date,b=window.document,_=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,E=/^(?:text|application)\/javascript/i,T=/^(?:text|application)\/xml/i,A="application/json",S="text/html",L=/^\s*$/,R=b.createElement("a");R.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,i){if(!("type"in e))return t.ajax(e);var n,r,l=e.jsonpCallback,u=(t.isFunction(l)?l():l)||"Zepto"+m++,d=b.createElement("script"),c=window[u],h=function(e){t(d).triggerHandler("error",e||"abort")},f={abort:h};return i&&i.promise(f),t(d).on("load error",function(a,l){clearTimeout(r),t(d).off().remove(),"error"!=a.type&&n?o(n[0],f,e,i):s(null,l||"error",f,e,i),window[u]=c,n&&t.isFunction(c)&&c(n[0]),c=n=void 0}),!1===a(f,e)?(h("abort"),f):(window[u]=function(){n=arguments},d.src=e.url.replace(/\?(.+)=\?/,"?$1="+u),b.head.appendChild(d),e.timeout>0&&(r=setTimeout(function(){h("timeout")},e.timeout)),f)},t.ajaxSettings={type:"GET",beforeSend:d,success:d,error:d,complete:d,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:A,xml:"application/xml, text/xml",html:S,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:d},t.ajax=function(e){var i,r,l=t.extend({},e||{}),p=t.Deferred&&t.Deferred();for(y in t.ajaxSettings)void 0===l[y]&&(l[y]=t.ajaxSettings[y]);n(l),l.crossDomain||(i=b.createElement("a"),i.href=l.url,i.href=i.href,l.crossDomain=R.protocol+"//"+R.host!=i.protocol+"//"+i.host),l.url||(l.url=window.location.toString()),(r=l.url.indexOf("#"))>-1&&(l.url=l.url.slice(0,r)),f(l);var g=l.dataType,m=/\?.+=\?/.test(l.url);if(m&&(g="jsonp"),!1!==l.cache&&(e&&!0===e.cache||"script"!=g&&"jsonp"!=g)||(l.url=h(l.url,"_="+Date.now())),"jsonp"==g)return m||(l.url=h(l.url,l.jsonp?l.jsonp+"=?":!1===l.jsonp?"":"callback=?")),t.ajaxJSONP(l,p);var _,E=l.accepts[g],T={},A=function(t,e){T[t.toLowerCase()]=[t,e]},S=/^([\w-]+:)\/\//.test(l.url)?RegExp.$1:window.location.protocol,k=l.xhr(),w=k.setRequestHeader;if(p&&p.promise(k),l.crossDomain||A("X-Requested-With","XMLHttpRequest"),A("Accept",E||"*/*"),(E=l.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),k.overrideMimeType&&k.overrideMimeType(E)),(l.contentType||!1!==l.contentType&&l.data&&"GET"!=l.type.toUpperCase())&&A("Content-Type",l.contentType||"application/x-www-form-urlencoded"),l.headers)for(v in l.headers)A(v,l.headers[v]);if(k.setRequestHeader=A,k.onreadystatechange=function(){if(4==k.readyState){k.onreadystatechange=d,clearTimeout(_);var e,i=!1;if(k.status>=200&&k.status<300||304==k.status||0==k.status&&"file:"==S){if(g=g||c(l.mimeType||k.getResponseHeader("content-type")),"arraybuffer"==k.responseType||"blob"==k.responseType)e=k.response;else{e=k.responseText;try{e=u(e,g,l),"script"==g?(0,eval)(e):"xml"==g?e=k.responseXML:"json"==g&&(e=L.test(e)?null:t.parseJSON(e))}catch(t){i=t}if(i)return s(i,"parsererror",k,l,p)}o(e,k,l,p)}else s(k.statusText||null,k.status?"error":"abort",k,l,p)}},!1===a(k,l))return k.abort(),s(null,"abort",k,l,p),k;var C=!("async"in l)||l.async;if(k.open(l.type,l.url,C,l.username,l.password),l.xhrFields)for(v in l.xhrFields)k[v]=l.xhrFields[v];for(v in T)w.apply(k,T[v]);return l.timeout>0&&(_=setTimeout(function(){k.onreadystatechange=d,k.abort(),s(null,"timeout",k,l,p)},l.timeout)),k.send(l.data?l.data:null),k},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,i,n){if(!this.length)return this;var r,a=this,o=e.split(/\s/),s=p(e,i,n),l=s.success;return o.length>1&&(s.url=o[0],r=o[1]),s.success=function(e){a.html(r?t("<div>").html(e.replace(_,"")).find(r):e),l&&l.apply(a,arguments)},t.ajax(s),this};var k=encodeURIComponent;t.param=function(e,i){var n=[];return n.add=function(e,i){t.isFunction(i)&&(i=i()),null==i&&(i=""),this.push(k(e)+"="+k(i))},g(n,e,i),n.join("&").replace(/%20/g,"+")}}(i),function(t){t.Callbacks=function(e){e=t.extend({},e);var i,n,r,a,o,s,l=[],u=!e.once&&[],d=function(t){for(i=e.memory&&t,n=!0,s=a||0,a=0,o=l.length,r=!0;l&&s<o;++s)if(!1===l[s].apply(t[0],t[1])&&e.stopOnFalse){i=!1;break}r=!1,l&&(u?u.length&&d(u.shift()):i?l.length=0:c.disable())},c={add:function(){if(l){var n=l.length,s=function(i){t.each(i,function(t,i){"function"==typeof i?e.unique&&c.has(i)||l.push(i):i&&i.length&&"string"!=typeof i&&s(i)})};s(arguments),r?o=l.length:i&&(a=n,d(i))}return this},remove:function(){return l&&t.each(arguments,function(e,i){for(var n;(n=t.inArray(i,l,n))>-1;)l.splice(n,1),r&&(n<=o&&--o,n<=s&&--s)}),this},has:function(e){return!(!l||!(e?t.inArray(e,l)>-1:l.length))},empty:function(){return o=l.length=0,this},disable:function(){return l=u=i=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,i||c.disable(),this},locked:function(){return!u},fireWith:function(t,e){return!l||n&&!u||(e=e||[],e=[t,e.slice?e.slice():e],r?u.push(e):d(e)),this},fire:function(){return c.fireWith(this,arguments)},fired:function(){return!!n}};return c}}(i),function(t){function e(i){var n=[["resolve","done",t.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",t.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",t.Callbacks({memory:1})]],r="pending",a={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var i=arguments;return e(function(e){t.each(n,function(n,r){var s=t.isFunction(i[n])&&i[n];o[r[1]](function(){var i=s&&s.apply(this,arguments);if(i&&t.isFunction(i.promise))i.promise().done(e.resolve).fail(e.reject).progress(e.notify);else{var n=this===a?e.promise():this,o=s?[i]:arguments;e[r[0]+"With"](n,o)}})}),i=null}).promise()},promise:function(e){return null!=e?t.extend(e,a):a}},o={};return t.each(n,function(t,e){var i=e[2],s=e[3];a[e[1]]=i.add,s&&i.add(function(){r=s},n[1^t][2].disable,n[2][2].lock),o[e[0]]=function(){return o[e[0]+"With"](this===o?a:this,arguments),this},o[e[0]+"With"]=i.fireWith}),a.promise(o),i&&i.call(o,o),o}var i=Array.prototype.slice;t.when=function(n){var r,a,o,s=i.call(arguments),l=s.length,u=0,d=1!==l||n&&t.isFunction(n.promise)?l:0,c=1===d?n:e(),h=function(t,e,n){return function(a){e[t]=this,n[t]=arguments.length>1?i.call(arguments):a,n===r?c.notifyWith(e,n):--d||c.resolveWith(e,n)}};if(l>1)for(r=new Array(l),a=new Array(l),o=new Array(l);u<l;++u)s[u]&&t.isFunction(s[u].promise)?s[u].promise().done(h(u,o,s)).fail(c.reject).progress(h(u,a,r)):--d;return d||c.resolveWith(o,s),c.promise()},t.Deferred=e}(i),function(t){function e(t){return t._zid||(t._zid=h++)}function i(t,i,a,o){if(i=n(i),i.ns)var s=r(i.ns);return(y[e(t)]||[]).filter(function(t){return t&&(!i.e||t.e==i.e)&&(!i.ns||s.test(t.ns))&&(!a||e(t.fn)===e(a))&&(!o||t.sel==o)})}function n(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function r(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function a(t,e){return t.del&&!m&&t.e in b||!!e}function o(t){return _[t]||m&&b[t]||t}function s(i,r,s,l,d,h,f){var p=e(i),g=y[p]||(y[p]=[]);r.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var r=n(e);r.fn=s,r.sel=d,r.e in _&&(s=function(e){var i=e.relatedTarget;if(!i||i!==this&&!t.contains(this,i))return r.fn.apply(this,arguments)}),r.del=h;var p=h||s;r.proxy=function(t){if(t=u(t),!t.isImmediatePropagationStopped()){t.data=l;var e=p.apply(i,t._args==c?[t]:[t].concat(t._args));return!1===e&&(t.preventDefault(),t.stopPropagation()),e}},r.i=g.length,g.push(r),"addEventListener"in i&&i.addEventListener(o(r.e),r.proxy,a(r,f))})}function l(t,n,r,s,l){var u=e(t);(n||"").split(/\s/).forEach(function(e){i(t,e,r,s).forEach(function(e){delete y[u][e.i],"removeEventListener"in t&&t.removeEventListener(o(e.e),e.proxy,a(e,l))})})}function u(e,i){return!i&&e.isDefaultPrevented||(i||(i=e),t.each(S,function(t,n){var r=i[t];e[t]=function(){return this[n]=E,r&&r.apply(i,arguments)},e[n]=T}),e.timeStamp||(e.timeStamp=Date.now()),(i.defaultPrevented!==c?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=E)),e}function d(t){var e,i={originalEvent:t};for(e in t)A.test(e)||t[e]===c||(i[e]=t[e]);return u(i,t)}var c,h=1,f=Array.prototype.slice,p=t.isFunction,g=function(t){return"string"==typeof t},y={},v={},m="onfocusin"in window,b={focus:"focusin",blur:"focusout"},_={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",t.event={add:s,remove:l},t.proxy=function(i,n){var r=2 in arguments&&f.call(arguments,2);if(p(i)){var a=function(){return i.apply(n,r?r.concat(f.call(arguments)):arguments)};return a._zid=e(i),a}if(g(n))return r?(r.unshift(i[n],i),t.proxy.apply(null,r)):t.proxy(i[n],i);throw new TypeError("expected function")},t.fn.bind=function(t,e,i){return this.on(t,e,i)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,i,n){return this.on(t,e,i,n,1)};var E=function(){return!0},T=function(){return!1},A=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,S={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,i){return this.on(e,t,i)},t.fn.undelegate=function(t,e,i){return this.off(e,t,i)},t.fn.live=function(e,i){return t(document.body).delegate(this.selector,e,i),this},t.fn.die=function(e,i){return t(document.body).undelegate(this.selector,e,i),this},t.fn.on=function(e,i,n,r,a){var o,u,h=this;return e&&!g(e)?(t.each(e,function(t,e){h.on(t,i,n,e,a)}),h):(g(i)||p(r)||!1===r||(r=n,n=i,i=c),r!==c&&!1!==n||(r=n,n=c),!1===r&&(r=T),h.each(function(c,h){a&&(o=function(t){return l(h,t.type,r),r.apply(this,arguments)}),i&&(u=function(e){var n,a=t(e.target).closest(i,h).get(0);if(a&&a!==h)return n=t.extend(d(e),{currentTarget:a,liveFired:h}),(o||r).apply(a,[n].concat(f.call(arguments,1)))}),s(h,e,r,n,i,u||o)}))},t.fn.off=function(e,i,n){var r=this;return e&&!g(e)?(t.each(e,function(t,e){r.off(t,i,e)}),r):(g(i)||p(n)||!1===n||(n=i,i=c),!1===n&&(n=T),r.each(function(){l(this,e,n,i)}))},t.fn.trigger=function(e,i){return e=g(e)||t.isPlainObject(e)?t.Event(e):u(e),e._args=i,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,i)})},t.fn.triggerHandler=function(e,n){var r,a;return this.each(function(o,s){r=d(g(e)?t.Event(e):e),r._args=n,r.target=s,t.each(i(s,e.type||e),function(t,e){if(a=e.proxy(r),r.isImmediatePropagationStopped())return!1})}),a},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){g(t)||(e=t,t=e.type);var i=document.createEvent(v[t]||"Events"),n=!0;if(e)for(var r in e)"bubbles"==r?n=!!e[r]:i[r]=e[r];return i.initEvent(t,n,!0),u(i)}}(i),function(){try{getComputedStyle(void 0)}catch(e){var t=getComputedStyle;window.getComputedStyle=function(e,i){try{return t(e,i)}catch(t){return null}}}}(),function(t){function e(e){return e=t(e),!(!e.width()&&!e.height())&&"none"!==e.css("display")}function i(t,e){t=t.replace(/=#\]/g,'="#"]');var i,n,r=s.exec(t);if(r&&r[2]in o&&(i=o[r[2]],n=r[3],t=r[1],n)){var a=Number(n);n=isNaN(a)?n.replace(/^["']|["']$/g,""):a}return e(t,i,n)}var n=t.zepto,r=n.qsa,a=n.matches,o=t.expr[":"]={visible:function(){if(e(this))return this},hidden:function(){if(!e(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(t){if(0===t)return this},last:function(t,e){if(t===e.length-1)return this},eq:function(t,e,i){if(t===i)return this},contains:function(e,i,n){if(t(this).text().indexOf(n)>-1)return this},has:function(t,e,i){if(n.qsa(this,i).length)return this}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),l=/^\s*>/,u="Zepto"+ +new Date;n.qsa=function(e,a){return i(a,function(i,o,s){try{var d;!i&&o?i="*":l.test(i)&&(d=t(e).addClass(u),i="."+u+" "+i);var c=r(e,i)}catch(t){throw console.error("error performing selector: %o",a),t}finally{d&&d.removeClass(u)}return o?n.uniq(t.map(c,function(t,e){return o.call(t,e,c,s)})):c})},n.matches=function(t,e){return i(e,function(e,i,n){return(!e||a(t,e))&&(!i||i.call(t,null,n)===t)})}}(i),t.exports=i},function(t,e){function i(t,e){var i=t[1]||"",r=t[3];if(!r)return i;if(e&&"function"==typeof btoa){var a=n(r);return[i].concat(r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"})).concat([a]).join("\n")}return[i].join("\n")}function n(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=i(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r<this.length;r++){var a=this[r][0];"number"==typeof a&&(n[a]=!0)}for(r=0;r<t.length;r++){var o=t[r];"number"==typeof o[0]&&n[o[0]]||(i&&!o[2]?o[2]=i:i&&(o[2]="("+o[2]+") and ("+i+")"),e.push(o))}},e}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},r=/(.)^/,a={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},o=/\\|'|\r|\n|\t|\u2028|\u2029/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},l=new RegExp("[&<>\"']","g"),u=function(t){return null===t?"":(""+t).replace(l,function(t){return s[t]})},d=0,c=function(t,e){var i,s=new RegExp([(n.escape||r).source,(n.interpolate||r).source,(n.evaluate||r).source].join("|")+"|$","g"),l=0,c="__p+='";t.replace(s,function(e,i,n,r,s){return c+=t.slice(l,s).replace(o,function(t){return"\\"+a[t]}),i&&(c+="'+\n((__t=("+i+"))==null?'':escapeExpr(__t))+\n'"),n&&(c+="'+\n((__t=("+n+"))==null?'':__t)+\n'"),r&&(c+="';\n"+r+"\n__p+='"),l=s+e.length,e}),c+="';\n",n.variable||(c="with(obj||{}){\n"+c+"}\n"),c="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+c+"return __p;\n//# sourceURL=/microtemplates/source["+d+++"]";try{i=new Function(n.variable||"obj","escapeExpr",c)}catch(t){throw t.source=c,t}if(e)return i(e,u);var h=function(t){return i.call(this,t,u)};return h.source="function("+(n.variable||"obj")+"){\n"+c+"}",h};c.settings=n,e.default=c,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(5),f=i(21),p=n(f),g=function(t){function e(i,n){(0,a.default)(this,e);var r=(0,s.default)(this,t.call(this,i));return r.settings={},r._i18n=n,r}return(0,c.default)(e,t),(0,u.default)(e,[{key:"isAudioOnly",get:function(){return!1}},{key:"isAdaptive",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}}]),e.prototype.consent=function(){},e.prototype.play=function(){},e.prototype.pause=function(){},e.prototype.stop=function(){},e.prototype.seek=function(t){},e.prototype.seekPercentage=function(t){},e.prototype.getStartTimeOffset=function(){return 0},e.prototype.getDuration=function(){return 0},e.prototype.isPlaying=function(){return!1},e.prototype.getPlaybackType=function(){return e.NO_OP},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype.volume=function(t){},e.prototype.destroy=function(){this.$el.remove()},(0,u.default)(e,[{key:"isReady",get:function(){return!1}},{key:"hasClosedCaptionsTracks",get:function(){return this.closedCaptionsTracks.length>0}},{key:"closedCaptionsTracks",get:function(){return[]}},{key:"closedCaptionsTrackId",get:function(){return-1},set:function(t){}}]),e}(p.default);e.default=g,g.extend=function(t){return(0,h.extend)(g,t)},g.canPlay=function(t,e){return!1},g.VOD="vod",g.AOD="aod",g.LIVE="live",g.NO_OP="no_op",g.type="playback",t.exports=e.default},function(t,e,i){function n(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=p[n.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](n.parts[a]);for(;a<n.parts.length;a++)r.parts.push(d(n.parts[a],e))}else{for(var o=[],a=0;a<n.parts.length;a++)o.push(d(n.parts[a],e));p[n.id]={id:n.id,refs:1,parts:o}}}}function r(t,e){for(var i=[],n={},r=0;r<t.length;r++){var a=t[r],o=e.base?a[0]+e.base:a[0],s=a[1],l=a[2],u=a[3],d={css:s,media:l,sourceMap:u};n[o]?n[o].parts.push(d):i.push(n[o]={id:o,parts:[d]})}return i}function a(t,e){var i=v(t.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=_[_.length-1];if("top"===t.insertAt)n?n.nextSibling?i.insertBefore(e,n.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),_.push(e);else if("bottom"===t.insertAt)i.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=v(t.insertInto+" "+t.insertAt.before);i.insertBefore(e,r)}}function o(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=_.indexOf(t);e>=0&&_.splice(e,1)}function s(t){var e=document.createElement("style");return t.attrs.type="text/css",u(e,t.attrs),a(t,e),e}function l(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",u(e,t.attrs),a(t,e),e}function u(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}function d(t,e){var i,n,r,a;if(e.transform&&t.css){if(!(a=e.transform(t.css)))return function(){};t.css=a}if(e.singleton){var u=b++;i=m||(m=s(e)),n=c.bind(null,i,u,!1),r=c.bind(null,i,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=l(e),n=f.bind(null,i,e),r=function(){o(i),i.href&&URL.revokeObjectURL(i.href)}):(i=s(e),n=h.bind(null,i),r=function(){o(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}function c(t,e,i,n){var r=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=T(e,r);else{var a=document.createTextNode(r),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function h(t,e){var i=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}function f(t,e,i){var n=i.css,r=i.sourceMap,a=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||a)&&(n=E(n)),r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}var p={},g=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),y=function(t){return document.querySelector(t)},v=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var i=y.call(this,t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}}(),m=null,b=0,_=[],E=i(146);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=g()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=r(t,e);return n(i,e),function(t){for(var a=[],o=0;o<i.length;o++){var s=i[o],l=p[s.id];l.refs--,a.push(l)}if(t){n(r(t,e),e)}for(var o=0;o<a.length;o++){var l=a[o];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete p[l.id]}}}};var T=function(){var t=[];return function(e,i){return t[e]=i,t.filter(Boolean).join("\n")}}()},function(t,e){var i=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=i)},function(t,e,i){var n=i(44)("wks"),r=i(31),a=i(15).Symbol,o="function"==typeof a;(t.exports=function(t){return n[t]||(n[t]=o&&a[t]||(o?a:r)("Symbol."+t))}).store=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={},r=e.getBrowserInfo=function(t){var e=t.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],i=void 0;if(/trident/i.test(e[1]))return i=/\brv[ :]+(\d+)/g.exec(t)||[],{name:"IE",version:parseInt(i[1]||"")};if("Chrome"===e[1]){if(null!=(i=t.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:parseInt(i[1])};if(null!=(i=t.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:parseInt(i[1])}}else/android/i.test(t)&&(i=t.match(/version\/(\d+)/i))&&(e.splice(1,1,"Android WebView"),e.splice(2,1,i[1]));return e=e[2]?[e[1],e[2]]:[navigator.appName,navigator.appVersion,"-?"],{name:e[0],version:parseInt(e[1])}},a=r(navigator.userAgent);n.isEdge=/edge/i.test(navigator.userAgent),n.isChrome=/chrome|CriOS/i.test(navigator.userAgent)&&!n.isEdge,n.isSafari=/safari/i.test(navigator.userAgent)&&!n.isChrome&&!n.isEdge,n.isFirefox=/firefox/i.test(navigator.userAgent),n.isLegacyIE=!!window.ActiveXObject,n.isIE=n.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),n.isIE11=/trident.*rv:11/i.test(navigator.userAgent),n.isChromecast=n.isChrome&&/CrKey/i.test(navigator.userAgent),n.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Mobile Safari|Opera Mini/i.test(navigator.userAgent),n.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),n.isAndroid=/Android/i.test(navigator.userAgent),n.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),n.isWin8App=/MSAppHost/i.test(navigator.userAgent),n.isWiiU=/WiiU/i.test(navigator.userAgent),n.isPS4=/PlayStation 4/i.test(navigator.userAgent),n.hasLocalstorage=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(t){return!1}}(),n.hasFlash=function(){try{return!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(t){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}}(),n.name=a.name,n.version=a.version,e.default=n},function(t,e,i){var n=i(98),r=i(40);t.exports=function(t){return n(r(t))}},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e,i){var n=i(23),r=i(64),a=i(47),o=Object.defineProperty;e.f=i(20)?Object.defineProperty:function(t,e,i){if(n(t),e=a(e,!0),n(i),r)try{return o(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(5),f=i(4),p=n(f),g=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n._options=i,n.uniqueId=(0,h.uniqueId)("o"),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"options",get:function(){return this._options}}]),e}(p.default);e.default=g,t.exports=e.default},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){var n=i(15),r=i(11),a=i(46),o=i(22),s=function(t,e,i){var l,u,d,c=t&s.F,h=t&s.G,f=t&s.S,p=t&s.P,g=t&s.B,y=t&s.W,v=h?r:r[e]||(r[e]={}),m=v.prototype,b=h?n:f?n[e]:(n[e]||{}).prototype;h&&(i=e);for(l in i)(u=!c&&b&&void 0!==b[l])&&l in v||(d=u?b[l]:i[l],v[l]=h&&"function"!=typeof b[l]?i[l]:g&&u?a(d,n):y&&b[l]==d?function(t){var e=function(e,i,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,i)}return new t(e,i,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(d):p&&"function"==typeof d?a(Function.call,d):d,p&&((v.virtual||(v.virtual={}))[l]=d,t&s.R&&m&&!m[l]&&o(m,l,d)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,i){t.exports=!i(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(6),f=n(h),p=i(5),g=i(17),y=n(g),v=/^(\S+)\s*(.*)$/,m=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.cid=(0,p.uniqueId)("c"),n._ensureElement(),n.delegateEvents(),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}}]),e.prototype.$=function(t){return this.$el.find(t)},e.prototype.render=function(){return this},e.prototype.remove=function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this},e.prototype.setElement=function(t,e){return this.$el&&this.undelegateEvents(),this.$el=f.default.zepto.isZ(t)?t:(0,f.default)(t),this.el=this.$el[0],!1!==e&&this.delegateEvents(),this},e.prototype.delegateEvents=function(t){if(!t&&!(t=this.events))return this;this.undelegateEvents();for(var e in t){var i=t[e];if(i&&i.constructor!==Function&&(i=this[t[e]]),i){var n=e.match(v),r=n[1],a=n[2];r+=".delegateEvents"+this.cid,""===a?this.$el.on(r,i.bind(this)):this.$el.on(r,a,i.bind(this))}}return this},e.prototype.undelegateEvents=function(){return this.$el.off(".delegateEvents"+this.cid),this},e.prototype._ensureElement=function(){if(this.el)this.setElement(this.el,!1);else{var t=f.default.extend({},this.attributes);this.id&&(t.id=this.id),this.className&&(t.class=this.className);var e=p.DomRecycler.create(this.tagName).attr(t);this.setElement(e,!1)}},e}(y.default);e.default=m,t.exports=e.default},function(t,e,i){var n=i(16),r=i(28);t.exports=i(20)?function(t,e,i){return n.f(t,e,r(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var n=i(26);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(4),s=n(o),l=new s.default,u=function t(){(0,a.default)(this,t)};e.default=u,u.on=function(t,e,i){l.on(t,e,i)},u.once=function(t,e,i){l.once(t,e,i)},u.off=function(t,e,i){l.off(t,e,i)},u.trigger=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];l.trigger.apply(l,[t].concat(i))},u.stopListening=function(t,e,i){l.stopListening(t,e,i)},t.exports=e.default},function(t,e,i){var n=i(61),r=i(45);t.exports=Object.keys||function(t){return n(t,r)}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports={}},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(2),u=n(l),d=i(5),c=i(17),h=n(c),f=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i.options));return n.core=i,n.enabled=!0,n.bindEvents(),n}return(0,u.default)(e,t),e.prototype.bindEvents=function(){},e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},e.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},e.prototype.getExternalInterface=function(){return{}},e.prototype.destroy=function(){this.stopListening()},e}(h.default);e.default=f,f.extend=function(t){return(0,d.extend)(f,t)},f.type="core",t.exports=e.default},function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+n).toString(36))}},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=i(102),a=n(r),o=i(113),s=n(o),l="function"==typeof s.default&&"symbol"==typeof a.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===l(a.default)?function(t){return void 0===t?"undefined":l(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":l(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(t){return t&&t.__esModule?t:{default:t}}(n),a=function t(){(0,r.default)(this,t),this.options={},this.playbackPlugins=[],this.currentSize={width:0,height:0}};a._players={},a.getInstance=function(t){return a._players[t]||(a._players[t]=new a)},e.default=a,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(172),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(2),u=n(l),d=i(5),c=i(21),h=n(c),f=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i.options));return n.container=i,n.enabled=!0,n.bindEvents(),n}return(0,u.default)(e,t),e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},e.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},e.prototype.bindEvents=function(){},e.prototype.destroy=function(){this.remove()},e}(h.default);e.default=f,f.extend=function(t){return(0,d.extend)(f,t)},f.type="container",t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(2),u=n(l),d=i(17),c=n(d),h=i(5),f=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i.options));return n.container=i,n.enabled=!0,n.bindEvents(),n}return(0,u.default)(e,t),e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},e.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},e.prototype.bindEvents=function(){},e.prototype.destroy=function(){this.stopListening()},e}(c.default);e.default=f,f.extend=function(t){return(0,h.extend)(f,t)},f.type="container",t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(2),u=n(l),d=i(5),c=i(21),h=n(c),f=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i.options));return n.core=i,n.enabled=!0,n.bindEvents(),n.render(),n}return(0,u.default)(e,t),e.prototype.bindEvents=function(){},e.prototype.getExternalInterface=function(){return{}},e.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},e.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},e.prototype.destroy=function(){this.remove()},e.prototype.render=function(){return this},e}(h.default);e.default=f,f.extend=function(t){return(0,d.extend)(f,t)},f.type="core",t.exports=e.default},function(t,e,i){t.exports={default:i(96),__esModule:!0}},function(t,e,i){var n=i(40);t.exports=function(t){return Object(n(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},function(t,e,i){var n=i(44)("keys"),r=i(31);t.exports=function(t){return n[t]||(n[t]=r(t))}},function(t,e,i){var n=i(15),r=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var n=i(101);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,i){var n=i(26);t.exports=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=!0},function(t,e,i){var n=i(23),r=i(106),a=i(45),o=i(43)("IE_PROTO"),s=function(){},l=function(){var t,e=i(65)("iframe"),n=a.length;for(e.style.display="none",i(107).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;n--;)delete l.prototype[a[n]];return l()};t.exports=Object.create||function(t,e){var i;return null!==t?(s.prototype=n(t),i=new s,s.prototype=null,i[o]=t):i=l(),void 0===e?i:r(i,e)}},function(t,e,i){var n=i(16).f,r=i(18),a=i(12)("toStringTag");t.exports=function(t,e,i){t&&!r(t=i?t:t.prototype,a)&&n(t,a,{configurable:!0,value:e})}},function(t,e,i){e.f=i(12)},function(t,e,i){var n=i(15),r=i(11),a=i(48),o=i(51),s=i(16).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=a?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,i){var n=i(53),r=i(28),a=i(14),o=i(47),s=i(18),l=i(64),u=Object.getOwnPropertyDescriptor;e.f=i(20)?u:function(t,e){if(t=a(t),e=o(e,!0),l)try{return u(t,e)}catch(t){}if(s(t,e))return r(!n.f.call(t,e),t[e])}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(136),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(137),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default={Kibo:r.default},t.exports=e.default},function(t,e){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function r(t){if(d===setTimeout)return setTimeout(t,0);if((d===i||!d)&&setTimeout)return d=setTimeout,setTimeout(t,0);try{return d(t,0)}catch(e){try{return d.call(null,t,0)}catch(e){return d.call(this,t,0)}}}function a(t){if(c===clearTimeout)return clearTimeout(t);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{return c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}function o(){g&&f&&(g=!1,f.length?p=f.concat(p):y=-1,p.length&&s())}function s(){if(!g){var t=r(o);g=!0;for(var e=p.length;e;){for(f=p,p=[];++y<e;)f&&f[y].run();y=-1,e=p.length}f=null,g=!1,a(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var d,c,h=t.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:i}catch(t){d=i}try{c="function"==typeof clearTimeout?clearTimeout:n}catch(t){c=n}}();var f,p=[],g=!1,y=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];p.push(new l(t,e)),1!==p.length||g||r(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M1.425.35L14.575 8l-13.15 7.65V.35z"></path></svg>'},function(t,e,i){"use strict";e.__esModule=!0;var n=i(81),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return(0,r.default)(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=i(177),t.exports=e.default},function(t,e,i){var n=i(18),r=i(14),a=i(99)(!1),o=i(43)("IE_PROTO");t.exports=function(t,e){var i,s=r(t),l=0,u=[];for(i in s)i!=o&&n(s,i)&&u.push(i);for(;e.length>l;)n(s,i=e[l++])&&(~a(u,i)||u.push(i));return u}},function(t,e,i){var n=i(42),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},function(t,e,i){var n=i(19),r=i(11),a=i(27);t.exports=function(t,e){var i=(r.Object||{})[t]||Object[t],o={};o[t]=e(i),n(n.S+n.F*a(function(){i(1)}),"Object",o)}},function(t,e,i){t.exports=!i(20)&&!i(27)(function(){return 7!=Object.defineProperty(i(65)("div"),"a",{get:function(){return 7}}).a})},function(t,e,i){var n=i(26),r=i(15).document,a=n(r)&&n(r.createElement);t.exports=function(t){return a?r.createElement(t):{}}},function(t,e,i){"use strict";var n=i(104)(!0);i(67)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=n(e,i),this._i+=t.length,{value:t,done:!1})})},function(t,e,i){"use strict";var n=i(48),r=i(19),a=i(68),o=i(22),s=i(18),l=i(29),u=i(105),d=i(50),c=i(108),h=i(12)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,i,g,y,v,m){u(i,e,g);var b,_,E,T=function(t){if(!f&&t in R)return R[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}},A=e+" Iterator",S="values"==y,L=!1,R=t.prototype,k=R[h]||R["@@iterator"]||y&&R[y],w=k||T(y),C=y?S?T("entries"):w:void 0,I="Array"==e?R.entries||k:k;if(I&&(E=c(I.call(new t)))!==Object.prototype&&(d(E,A,!0),n||s(E,h)||o(E,h,p)),S&&k&&"values"!==k.name&&(L=!0,w=function(){return k.call(this)}),n&&!m||!f&&!L&&R[h]||o(R,h,w),l[e]=w,l[A]=p,y)if(b={values:S?w:T("values"),keys:v?w:T("keys"),entries:C},m)for(_ in b)_ in R||a(R,_,b[_]);else r(r.P+r.F*(f||L),e,b);return b}},function(t,e,i){t.exports=i(22)},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){var n=i(61),r=i(45).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},function(t,e,i){t.exports={default:i(124),__esModule:!0}},function(t,e,i){t.exports={default:i(130),__esModule:!0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(140),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(143),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(147),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e){t.exports=function(t){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="<%=baseUrl%>/a8c874b93b3d848f39a71260c57e3863.cur"},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z"></path></svg>'},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(6),a=n(r),o=i(8),s=n(o),l={getStyleFor:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return(0,a.default)('<style class="clappr-style"></style>').html((0,s.default)(t.toString())(e))}};e.default=l,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(163),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){t.exports={default:i(164),__esModule:!0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(176),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(182),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(183),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(186),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(188),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(191),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(195),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(201),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(205),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(211),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(212),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(222),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(95),a=n(r),o=i(5),s=n(o),l=i(4),u=n(l),d=i(9),c=n(d),h=i(36),f=n(h),p=i(30),g=n(p),y=i(37),v=n(y),m=i(35),b=n(m),_=i(17),E=n(_),T=i(21),A=n(T),S=i(13),L=n(S),R=i(74),k=n(R),w=i(73),C=n(w),I=i(80),D=n(I),O=i(24),P=n(O),x=i(75),N=n(x),M=i(33),F=n(M),B=i(60),U=n(B),G=i(82),K=n(G),Y=i(84),j=n(Y),V=i(85),H=n(V),$=i(83),z=n($),W=i(34),q=n(W),X=i(86),Z=n(X),J=i(87),Q=n(J),tt=i(91),et=n(tt),it=i(92),nt=n(it),rt=i(93),at=n(rt),ot=i(55),st=n(ot),lt=i(90),ut=n(lt),dt=i(88),ct=n(dt),ht=i(89),ft=n(ht),pt=i(79),gt=n(pt),yt=i(56),vt=n(yt),mt=i(8),bt=n(mt),_t=i(6),Et=n(_t);e.default={Player:a.default,Mediator:P.default,Events:u.default,Browser:L.default,PlayerInfo:F.default,MediaControl:N.default,ContainerPlugin:f.default,UIContainerPlugin:b.default,CorePlugin:g.default,UICorePlugin:v.default,Playback:c.default,Container:k.default,Core:C.default,Loader:D.default,BaseObject:E.default,UIObject:A.default,Utils:s.default,BaseFlashPlayback:U.default,Flash:K.default,FlasHLS:j.default,HLS:H.default,HTML5Audio:z.default,HTML5Video:q.default,HTMLImg:Z.default,NoOp:Q.default,ClickToPausePlugin:et.default,DVRControls:nt.default,Favicon:at.default,Log:st.default,Poster:ut.default,SpinnerThreeBouncePlugin:ct.default,WaterMarkPlugin:ft.default,Styler:gt.default,Vendor:vt.default,version:"0.2.90",template:bt.default,$:Et.default},t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(38),a=n(r),o=i(0),s=n(o),l=i(1),u=n(l),d=i(3),c=n(d),h=i(2),f=n(h),p=i(5),g=i(17),y=n(g),v=i(4),m=n(v),b=i(13),_=n(b),E=i(138),T=n(E),A=i(80),S=n(A),L=i(33),R=n(L),k=i(6),w=n(k),C=(0,p.currentScriptUrl)().replace(/\/[^\/]+$/,""),I=function(t){function e(i){(0,s.default)(this,e);var n=(0,u.default)(this,t.call(this,i)),r={playerId:(0,p.uniqueId)(""),persistConfig:!0,width:640,height:360,baseUrl:C,allowUserInteraction:_.default.isMobile};return n._options=w.default.extend(r,i),n.options.sources=n._normalizeSources(i),n.options.chromeless||(n.options.allowUserInteraction=!0),n.options.allowUserInteraction||(n.options.disableKeyboardShortcuts=!0),n._registerOptionEventListeners(n.options.events),n._coreFactory=new T.default(n),n.playerInfo=R.default.getInstance(n.options.playerId),n.playerInfo.currentSize={width:i.width,height:i.height},n.playerInfo.options=n.options,n.options.parentId?n.setParentId(n.options.parentId):n.options.parent&&n.attachTo(n.options.parent),n}return(0,f.default)(e,t),(0,c.default)(e,[{key:"loader",set:function(t){this._loader=t},get:function(){return this._loader||(this._loader=new S.default(this.options.plugins||{},this.options.playerId)),this._loader}},{key:"ended",get:function(){return this.core.mediaControl.container.ended}},{key:"buffering",get:function(){return this.core.mediaControl.container.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:m.default.PLAYER_READY,onResize:m.default.PLAYER_RESIZE,onPlay:m.default.PLAYER_PLAY,onPause:m.default.PLAYER_PAUSE,onStop:m.default.PLAYER_STOP,onEnded:m.default.PLAYER_ENDED,onSeek:m.default.PLAYER_SEEK,onError:m.default.PLAYER_ERROR,onTimeUpdate:m.default.PLAYER_TIMEUPDATE,onVolumeUpdate:m.default.PLAYER_VOLUMEUPDATE,onSubtitleAvailable:m.default.PLAYER_SUBTITLE_AVAILABLE}}}]),e.prototype.setParentId=function(t){var e=document.querySelector(t);return e&&this.attachTo(e),this},e.prototype.attachTo=function(t){return this.options.parentElement=t,this.core=this._coreFactory.create(),this._addEventListeners(),this},e.prototype._addEventListeners=function(){return this.core.isReady?this._onReady():this.listenToOnce(this.core,m.default.CORE_READY,this._onReady),this.listenTo(this.core.mediaControl,m.default.MEDIACONTROL_CONTAINERCHANGED,this._containerChanged),this.listenTo(this.core,m.default.CORE_FULLSCREEN,this._onFullscreenChange),this},e.prototype._addContainerEventListeners=function(){var t=this.core.mediaControl.container;return t&&(this.listenTo(t,m.default.CONTAINER_PLAY,this._onPlay),this.listenTo(t,m.default.CONTAINER_PAUSE,this._onPause),this.listenTo(t,m.default.CONTAINER_STOP,this._onStop),this.listenTo(t,m.default.CONTAINER_ENDED,this._onEnded),this.listenTo(t,m.default.CONTAINER_SEEK,this._onSeek),this.listenTo(t,m.default.CONTAINER_ERROR,this._onError),this.listenTo(t,m.default.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(t,m.default.CONTAINER_VOLUME,this._onVolumeUpdate),this.listenTo(t,m.default.CONTAINER_SUBTITLE_AVAILABLE,this._onSubtitleAvailable)),this},e.prototype._registerOptionEventListeners=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.default)(i).forEach(function(e){var i=t.eventsMapping[e];i&&t.off(i)}),(0,a.default)(e).forEach(function(i){var n=t.eventsMapping[i];if(n){var r=e[i];r="function"==typeof r&&r,r&&t.on(n,r)}}),this},e.prototype._containerChanged=function(){this.stopListening(),this._addEventListeners()},e.prototype._onReady=function(){this._ready=!0,this._addContainerEventListeners(),this.trigger(m.default.PLAYER_READY)},e.prototype._onFullscreenChange=function(t){this.trigger(m.default.PLAYER_FULLSCREEN,t)},e.prototype._onVolumeUpdate=function(t){this.trigger(m.default.PLAYER_VOLUMEUPDATE,t)},e.prototype._onSubtitleAvailable=function(){this.trigger(m.default.PLAYER_SUBTITLE_AVAILABLE)},e.prototype._onPlay=function(){this.trigger(m.default.PLAYER_PLAY)},e.prototype._onPause=function(){this.trigger(m.default.PLAYER_PAUSE)},e.prototype._onStop=function(){this.trigger(m.default.PLAYER_STOP,this.getCurrentTime())},e.prototype._onEnded=function(){this.trigger(m.default.PLAYER_ENDED)},e.prototype._onSeek=function(t){this.trigger(m.default.PLAYER_SEEK,t)},e.prototype._onTimeUpdate=function(t){this.trigger(m.default.PLAYER_TIMEUPDATE,t)},e.prototype._onError=function(t){this.trigger(m.default.PLAYER_ERROR,t)},e.prototype._normalizeSources=function(t){var e=t.sources||(void 0!==t.source?[t.source]:[]);return 0===e.length?[{source:"",mimeType:""}]:e},e.prototype.resize=function(t){return this.core.resize(t),this},e.prototype.load=function(t,e,i){return void 0!==i&&this.configure({autoPlay:!!i}),this.core.load(t,e),this},e.prototype.destroy=function(){return this.core.destroy(),this},e.prototype.consent=function(){return this.core.getCurrentPlayback().consent(),this},e.prototype.play=function(){return this.core.mediaControl.container.play(),this},e.prototype.pause=function(){return this.core.mediaControl.container.pause(),this},e.prototype.stop=function(){return this.core.mediaControl.container.stop(),this},e.prototype.seek=function(t){return this.core.mediaControl.container.seek(t),this},e.prototype.seekPercentage=function(t){return this.core.mediaControl.container.seekPercentage(t),this},e.prototype.setVolume=function(t){return this.core&&this.core.mediaControl&&this.core.mediaControl.setVolume(t),this},e.prototype.getVolume=function(){return this.core&&this.core.mediaControl?this.core.mediaControl.volume:0},e.prototype.mute=function(){return this._mutedVolume=this.getVolume(),this.setVolume(0),this},e.prototype.unmute=function(){return this.setVolume("number"==typeof this._mutedVolume?this._mutedVolume:100),this._mutedVolume=null,this},e.prototype.isPlaying=function(){return this.core.mediaControl.container.isPlaying()},e.prototype.isDvrEnabled=function(){return this.core.mediaControl.container.isDvrEnabled()},e.prototype.isDvrInUse=function(){return this.core.mediaControl.container.isDvrInUse()},e.prototype.configure=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._registerOptionEventListeners(t.events,this.options.events),this.core.configure(t),this},e.prototype.getPlugin=function(t){return this.core.plugins.concat(this.core.mediaControl.container.plugins).filter(function(e){return e.name===t})[0]},e.prototype.getCurrentTime=function(){return this.core.mediaControl.container.getCurrentTime()},e.prototype.getStartTimeOffset=function(){return this.core.mediaControl.container.getStartTimeOffset()},e.prototype.getDuration=function(){return this.core.mediaControl.container.getDuration()},e}(y.default);e.default=I,t.exports=e.default},function(t,e,i){i(97),t.exports=i(11).Object.keys},function(t,e,i){var n=i(39),r=i(25);i(63)("keys",function(){return function(t){return r(n(t))}})},function(t,e,i){var n=i(41);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e,i){var n=i(14),r=i(62),a=i(100);t.exports=function(t){return function(e,i,o){var s,l=n(e),u=r(l.length),d=a(o,u);if(t&&i!=i){for(;u>d;)if((s=l[d++])!=s)return!0}else for(;u>d;d++)if((t||d in l)&&l[d]===i)return t||d||0;return!t&&-1}}},function(t,e,i){var n=i(42),r=Math.max,a=Math.min;t.exports=function(t,e){return t=n(t),t<0?r(t+e,0):a(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,i){t.exports={default:i(103),__esModule:!0}},function(t,e,i){i(66),i(109),t.exports=i(51).f("iterator")},function(t,e,i){var n=i(42),r=i(40);t.exports=function(t){return function(e,i){var a,o,s=String(r(e)),l=n(i),u=s.length;return l<0||l>=u?t?"":void 0:(a=s.charCodeAt(l),a<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?t?s.charAt(l):a:t?s.slice(l,l+2):o-56320+(a-55296<<10)+65536)}}},function(t,e,i){"use strict";var n=i(49),r=i(28),a=i(50),o={};i(22)(o,i(12)("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=n(o,{next:r(1,i)}),a(t,e+" Iterator")}},function(t,e,i){var n=i(16),r=i(23),a=i(25);t.exports=i(20)?Object.defineProperties:function(t,e){r(t);for(var i,o=a(e),s=o.length,l=0;s>l;)n.f(t,i=o[l++],e[i]);return t}},function(t,e,i){t.exports=i(15).document&&document.documentElement},function(t,e,i){var n=i(18),r=i(39),a=i(43)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,i){i(110);for(var n=i(15),r=i(22),a=i(29),o=i(12)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var u=s[l],d=n[u],c=d&&d.prototype;c&&!c[o]&&r(c,o,u),a[u]=a.Array}},function(t,e,i){"use strict";var n=i(111),r=i(112),a=i(29),o=i(14);t.exports=i(67)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,i):"values"==e?r(0,t[i]):r(0,[i,t[i]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,i){t.exports={default:i(114),__esModule:!0}},function(t,e,i){i(115),i(121),i(122),i(123),t.exports=i(11).Symbol},function(t,e,i){"use strict";var n=i(15),r=i(18),a=i(20),o=i(19),s=i(68),l=i(116).KEY,u=i(27),d=i(44),c=i(50),h=i(31),f=i(12),p=i(51),g=i(52),y=i(117),v=i(118),m=i(119),b=i(23),_=i(14),E=i(47),T=i(28),A=i(49),S=i(120),L=i(54),R=i(16),k=i(25),w=L.f,C=R.f,I=S.f,D=n.Symbol,O=n.JSON,P=O&&O.stringify,x=f("_hidden"),N=f("toPrimitive"),M={}.propertyIsEnumerable,F=d("symbol-registry"),B=d("symbols"),U=d("op-symbols"),G=Object.prototype,K="function"==typeof D,Y=n.QObject,j=!Y||!Y.prototype||!Y.prototype.findChild,V=a&&u(function(){return 7!=A(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,i){var n=w(G,e);n&&delete G[e],C(t,e,i),n&&t!==G&&C(G,e,n)}:C,H=function(t){var e=B[t]=A(D.prototype);return e._k=t,e},$=K&&"symbol"==typeof D.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof D},z=function(t,e,i){return t===G&&z(U,e,i),b(t),e=E(e,!0),b(i),r(B,e)?(i.enumerable?(r(t,x)&&t[x][e]&&(t[x][e]=!1),i=A(i,{enumerable:T(0,!1)})):(r(t,x)||C(t,x,T(1,{})),t[x][e]=!0),V(t,e,i)):C(t,e,i)},W=function(t,e){b(t);for(var i,n=v(e=_(e)),r=0,a=n.length;a>r;)z(t,i=n[r++],e[i]);return t},q=function(t,e){return void 0===e?A(t):W(A(t),e)},X=function(t){var e=M.call(this,t=E(t,!0));return!(this===G&&r(B,t)&&!r(U,t))&&(!(e||!r(this,t)||!r(B,t)||r(this,x)&&this[x][t])||e)},Z=function(t,e){if(t=_(t),e=E(e,!0),t!==G||!r(B,e)||r(U,e)){var i=w(t,e);return!i||!r(B,e)||r(t,x)&&t[x][e]||(i.enumerable=!0),i}},J=function(t){for(var e,i=I(_(t)),n=[],a=0;i.length>a;)r(B,e=i[a++])||e==x||e==l||n.push(e);return n},Q=function(t){for(var e,i=t===G,n=I(i?U:_(t)),a=[],o=0;n.length>o;)!r(B,e=n[o++])||i&&!r(G,e)||a.push(B[e]);return a};K||(D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(i){this===G&&e.call(U,i),r(this,x)&&r(this[x],t)&&(this[x][t]=!1),V(this,t,T(1,i))};return a&&j&&V(G,t,{configurable:!0,set:e}),H(t)},s(D.prototype,"toString",function(){return this._k}),L.f=Z,R.f=z,i(70).f=S.f=J,i(53).f=X,i(69).f=Q,a&&!i(48)&&s(G,"propertyIsEnumerable",X,!0),p.f=function(t){return H(f(t))}),o(o.G+o.W+o.F*!K,{Symbol:D});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)f(tt[et++]);for(var tt=k(f.store),et=0;tt.length>et;)g(tt[et++]);o(o.S+o.F*!K,"Symbol",{for:function(t){return r(F,t+="")?F[t]:F[t]=D(t)},keyFor:function(t){if($(t))return y(F,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){j=!0},useSimple:function(){j=!1}}),o(o.S+o.F*!K,"Object",{create:q,defineProperty:z,defineProperties:W,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),O&&o(o.S+o.F*(!K||u(function(){var t=D();return"[null]"!=P([t])||"{}"!=P({a:t})||"{}"!=P(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!$(t)){for(var e,i,n=[t],r=1;arguments.length>r;)n.push(arguments[r++]);return e=n[1],"function"==typeof e&&(i=e),!i&&m(e)||(e=function(t,e){if(i&&(e=i.call(this,t,e)),!$(e))return e}),n[1]=e,P.apply(O,n)}}}),D.prototype[N]||i(22)(D.prototype,N,D.prototype.valueOf),c(D,"Symbol"),c(Math,"Math",!0),c(n.JSON,"JSON",!0)},function(t,e,i){var n=i(31)("meta"),r=i(26),a=i(18),o=i(16).f,s=0,l=Object.isExtensible||function(){return!0},u=!i(27)(function(){return l(Object.preventExtensions({}))}),d=function(t){o(t,n,{value:{i:"O"+ ++s,w:{}}})},c=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,n)){if(!l(t))return"F";if(!e)return"E";d(t)}return t[n].i},h=function(t,e){if(!a(t,n)){if(!l(t))return!0;if(!e)return!1;d(t)}return t[n].w},f=function(t){return u&&p.NEED&&l(t)&&!a(t,n)&&d(t),t},p=t.exports={KEY:n,NEED:!1,fastKey:c,getWeak:h,onFreeze:f}},function(t,e,i){var n=i(25),r=i(14);t.exports=function(t,e){for(var i,a=r(t),o=n(a),s=o.length,l=0;s>l;)if(a[i=o[l++]]===e)return i}},function(t,e,i){var n=i(25),r=i(69),a=i(53);t.exports=function(t){var e=n(t),i=r.f;if(i)for(var o,s=i(t),l=a.f,u=0;s.length>u;)l.call(t,o=s[u++])&&e.push(o);return e}},function(t,e,i){var n=i(41);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,i){var n=i(14),r=i(70).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(t){return o.slice()}};t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?s(t):r(n(t))}},function(t,e){},function(t,e,i){i(52)("asyncIterator")},function(t,e,i){i(52)("observable")},function(t,e,i){i(125);var n=i(11).Object;t.exports=function(t,e,i){return n.defineProperty(t,e,i)}},function(t,e,i){var n=i(19);n(n.S+n.F*!i(20),"Object",{defineProperty:i(16).f})},function(t,e,i){t.exports={default:i(127),__esModule:!0}},function(t,e,i){i(128),t.exports=i(11).Object.setPrototypeOf},function(t,e,i){var n=i(19);n(n.S,"Object",{setPrototypeOf:i(129).set})},function(t,e,i){var n=i(26),r=i(23),a=function(t,e){if(r(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{n=i(46)(Function.call,i(54).f(Object.prototype,"__proto__").set,2),n(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,i){return a(t,i),e?t.__proto__=i:n(t,i),t}}({},!1):void 0),check:a}},function(t,e,i){i(131);var n=i(11).Object;t.exports=function(t,e){return n.create(t,e)}},function(t,e,i){var n=i(19);n(n.S,"Object",{create:i(49)})},function(t,e,i){t.exports={default:i(133),__esModule:!0}},function(t,e,i){i(134);var n=i(11).Object;t.exports=function(t,e){return n.getOwnPropertyDescriptor(t,e)}},function(t,e,i){var n=i(14),r=i(54).f;i(63)("getOwnPropertyDescriptor",function(){return function(t,e){return r(n(t),e)}})},function(t,e,i){"use strict";Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],r=0;r<i;){var a=e[r];if(t.call(n,a,r,e))return a;r++}}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(t){return t&&t.__esModule?t:{default:t}}(n),a=i(56),o="font-weight: bold; font-size: 13px;",s="color: #ff8000;"+o,l="color: #ff0000;"+o,u=1,d=3,c=["color: #0000ff;font-weight: bold; font-size: 13px;","color: #006600;font-weight: bold; font-size: 13px;",s,l,l],h=["debug","info","warn","error","disabled"],f=function(){function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;(0,r.default)(this,t),this.kibo=new a.Kibo,this.kibo.down(["ctrl shift d"],function(){return e.onOff()}),this.BLACKLIST=["timeupdate","playback:timeupdate","playback:progress","container:hover","container:timeupdate","container:progress"],this.level=i,this.offLevel=n}return t.prototype.debug=function(t){this.log(t,0,Array.prototype.slice.call(arguments,1))},t.prototype.info=function(t){this.log(t,u,Array.prototype.slice.call(arguments,1))},t.prototype.warn=function(t){this.log(t,2,Array.prototype.slice.call(arguments,1))},t.prototype.error=function(t){this.log(t,3,Array.prototype.slice.call(arguments,1))},t.prototype.onOff=function(){this.level===this.offLevel?this.level=this.previousLevel:(this.previousLevel=this.level,this.level=this.offLevel),window.console&&window.console.log&&window.console.log("%c[Clappr.Log] set log level to "+h[this.level],s)},t.prototype.level=function(t){this.level=t},t.prototype.log=function(t,e,i){if(!(this.BLACKLIST.indexOf(i[0])>=0||e<this.level)){i||(i=t,t=null);var n=c[e],r="";t&&(r="["+t+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+h[e]+"]"+r,n].concat(i))}},t}();e.default=f,f.LEVEL_DEBUG=0,f.LEVEL_INFO=u,f.LEVEL_WARN=2,f.LEVEL_ERROR=3,f.getInstance=function(){return void 0===this._instance&&(this._instance=new this,this._instance.previousLevel=this._instance.level,this._instance.level=this._instance.offLevel),this._instance},f.setLevel=function(t){this.getInstance().level=t},f.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},f.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},f.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},f.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)},t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){this.element=t||window.document,this.initialize()};n.KEY_NAMES_BY_CODE={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"caps_lock",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},n.KEY_CODES_BY_NAME={},function(){for(var t in n.KEY_NAMES_BY_CODE)Object.prototype.hasOwnProperty.call(n.KEY_NAMES_BY_CODE,t)&&(n.KEY_CODES_BY_NAME[n.KEY_NAMES_BY_CODE[t]]=+t)}(),n.MODIFIERS=["shift","ctrl","alt"],n.registerEvent=function(){return document.addEventListener?function(t,e,i){t.addEventListener(e,i,!1)}:document.attachEvent?function(t,e,i){t.attachEvent("on"+e,i)}:void 0}(),n.unregisterEvent=function(){return document.removeEventListener?function(t,e,i){t.removeEventListener(e,i,!1)}:document.detachEvent?function(t,e,i){t.detachEvent("on"+e,i)}:void 0}(),n.stringContains=function(t,e){return-1!==t.indexOf(e)},n.neatString=function(t){return t.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},n.capitalize=function(t){return t.toLowerCase().replace(/^./,function(t){return t.toUpperCase()})},n.isString=function(t){return n.stringContains(Object.prototype.toString.call(t),"String")},n.arrayIncludes=function(){return Array.prototype.indexOf?function(t,e){return-1!==t.indexOf(e)}:function(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return!0;return!1}}(),n.extractModifiers=function(t){var e,i;for(e=[],i=0;i<n.MODIFIERS.length;i++)n.stringContains(t,n.MODIFIERS[i])&&e.push(n.MODIFIERS[i]);return e},n.extractKey=function(t){var e,i;for(e=n.neatString(t).split(" "),i=0;i<e.length;i++)if(!n.arrayIncludes(n.MODIFIERS,e[i]))return e[i]},n.modifiersAndKey=function(t){var e,i;return n.stringContains(t,"any")?n.neatString(t).split(" ").slice(0,2).join(" "):(e=n.extractModifiers(t),i=n.extractKey(t),i&&!n.arrayIncludes(n.MODIFIERS,i)&&e.push(i),e.join(" "))},n.keyName=function(t){return n.KEY_NAMES_BY_CODE[t+""]},n.keyCode=function(t){return+n.KEY_CODES_BY_NAME[t]},n.prototype.initialize=function(){var t,e=this;for(this.lastKeyCode=-1,this.lastModifiers={},t=0;t<n.MODIFIERS.length;t++)this.lastModifiers[n.MODIFIERS[t]]=!1;this.keysDown={any:[]},this.keysUp={any:[]},this.downHandler=this.handler("down"),this.upHandler=this.handler("up"),n.registerEvent(this.element,"keydown",this.downHandler),n.registerEvent(this.element,"keyup",this.upHandler),n.registerEvent(window,"unload",function t(){n.unregisterEvent(e.element,"keydown",e.downHandler),n.unregisterEvent(e.element,"keyup",e.upHandler),n.unregisterEvent(window,"unload",t)})},n.prototype.handler=function(t){var e=this;return function(i){var r,a,o;for(i=i||window.event,e.lastKeyCode=i.keyCode,r=0;r<n.MODIFIERS.length;r++)e.lastModifiers[n.MODIFIERS[r]]=i[n.MODIFIERS[r]+"Key"];for(n.arrayIncludes(n.MODIFIERS,n.keyName(e.lastKeyCode))&&(e.lastModifiers[n.keyName(e.lastKeyCode)]=!0),a=e["keys"+n.capitalize(t)],r=0;r<a.any.length;r++)!1===a.any[r](i)&&i.preventDefault&&i.preventDefault();if(o=e.lastModifiersAndKey(),a[o])for(r=0;r<a[o].length;r++)!1===a[o][r](i)&&i.preventDefault&&i.preventDefault()}},n.prototype.registerKeys=function(t,e,i){var r,a,o=this["keys"+n.capitalize(t)];for(n.isString(e)&&(e=[e]),r=0;r<e.length;r++)a=e[r],a=n.modifiersAndKey(a+""),o[a]?o[a].push(i):o[a]=[i];return this},n.prototype.unregisterKeys=function(t,e,i){var r,a,o,s=this["keys"+n.capitalize(t)];for(n.isString(e)&&(e=[e]),r=0;r<e.length;r++)if(o=e[r],o=n.modifiersAndKey(o+""),null===i)delete s[o];else if(s[o])for(a=0;a<s[o].length;a++)if(String(s[o][a])===String(i)){s[o].splice(a,1);break}return this},n.prototype.off=function(t){return this.unregisterKeys("down",t,null)},n.prototype.delegate=function(t,e,i){return null!==i||void 0!==i?this.registerKeys(t,e,i):this.unregisterKeys(t,e,i)},n.prototype.down=function(t,e){return this.delegate("down",t,e)},n.prototype.up=function(t,e){return this.delegate("up",t,e)},n.prototype.lastKey=function(t){return t?this.lastModifiers[t]:n.keyName(this.lastKeyCode)},n.prototype.lastModifiersAndKey=function(){var t,e;for(t=[],e=0;e<n.MODIFIERS.length;e++)this.lastKey(n.MODIFIERS[e])&&t.push(n.MODIFIERS[e]);return n.arrayIncludes(t,this.lastKey())||t.push(this.lastKey()),t.join(" ")},e.default=n,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(139),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(17),f=n(h),p=i(73),g=n(p),y=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this));return n.player=i,n._options=i.options,n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"loader",get:function(){return this.player.loader}}]),e.prototype.create=function(){return this.options.loader=this.loader,this.core=new g.default(this.options),this.addCorePlugins(),this.core.createContainers(this.options),this.core},e.prototype.addCorePlugins=function(){var t=this;return this.loader.corePlugins.forEach(function(e){var i=new e(t.core);t.core.addPlugin(i),t.setupExternalInterface(i)}),this.core},e.prototype.setupExternalInterface=function(t){var e=t.getExternalInterface();for(var i in e)this.player[i]=e[i].bind(t)},e}(f.default);e.default=y,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(5),f=i(4),p=n(f),g=i(21),y=n(g),v=i(13),m=n(v),b=i(141),_=n(b),E=i(75),T=n(E),A=i(24),S=n(A),L=i(33),R=n(L),k=i(79),w=n(k),C=i(6),I=n(C);i(159);var D=i(161),O=n(D),P=void 0,x=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.configureDomRecycler(),n.playerInfo=R.default.getInstance(i.playerId),n.firstResize=!0,n.plugins=[],n.containers=[],n.setupMediaControl(null),n._boundFullscreenHandler=function(){return n.handleFullscreenChange()},(0,I.default)(document).bind("fullscreenchange",n._boundFullscreenHandler),(0,I.default)(document).bind("MSFullscreenChange",n._boundFullscreenHandler),(0,I.default)(document).bind("mozfullscreenchange",n._boundFullscreenHandler),m.default.isMobile&&(0,I.default)(window).bind("resize",function(t){n.handleWindowResize(t)}),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"showMediaControl",mouseleave:"hideMediaControl"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(t){return t}}}}]),e.prototype.configureDomRecycler=function(){var t=!!(this.options&&this.options.playback&&this.options.playback.recycleVideo);h.DomRecycler.configure({recycleVideo:t})},e.prototype.createContainers=function(t){var e=this;this.defer=I.default.Deferred(),this.defer.promise(this),this.containerFactory=new _.default(t,t.loader,this.i18n),this.containerFactory.createContainers().then(function(t){return e.setupContainers(t)}).then(function(t){return e.resolveOnContainersReady(t)})},e.prototype.updateSize=function(){h.Fullscreen.isFullscreen()?this.setFullscreen():this.setPlayerSize()},e.prototype.setFullscreen=function(){m.default.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.playerInfo.currentSize={width:(0,I.default)(window).width(),height:(0,I.default)(window).height()})},e.prototype.setPlayerSize=function(){this.$el.removeClass("fullscreen"),this.playerInfo.currentSize=this.playerInfo.previousSize,this.playerInfo.previousSize={width:(0,I.default)(window).width(),height:(0,I.default)(window).height()},this.resize(this.playerInfo.currentSize)},e.prototype.resize=function(t){(0,h.isNumber)(t.height)||(0,h.isNumber)(t.width)?(this.el.style.height=t.height+"px",this.el.style.width=t.width+"px"):(this.el.style.height=""+t.height,this.el.style.width=""+t.width),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.options.width=t.width,this.options.height=t.height,this.playerInfo.currentSize=t,this.triggerResize(this.playerInfo.currentSize)},e.prototype.enableResizeObserver=function(){var t=this,e=function(){t.playerInfo.computedSize.width===t.el.clientWidth&&t.playerInfo.computedSize.height===t.el.clientHeight||(t.playerInfo.computedSize={width:t.el.clientWidth,height:t.el.clientHeight},t.triggerResize(t.playerInfo.computedSize))};this.resizeObserverInterval=setInterval(e,500)},e.prototype.triggerResize=function(t){(this.firstResize||this.oldHeight!==t.height||this.oldWidth!==t.width)&&(S.default.trigger(this.options.playerId+":"+p.default.PLAYER_RESIZE,t),this.oldHeight=t.height,this.oldWidth=t.width,this.firstResize=!1)},e.prototype.disableResizeObserver=function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)},e.prototype.resolveOnContainersReady=function(t){var e=this;I.default.when.apply(I.default,t).done(function(){e.defer.resolve(e),e.ready=!0,e.trigger(p.default.CORE_READY)})},e.prototype.addPlugin=function(t){this.plugins.push(t)},e.prototype.hasPlugin=function(t){return!!this.getPlugin(t)},e.prototype.getPlugin=function(t){return this.plugins.filter(function(e){return e.name===t})[0]},e.prototype.load=function(t,e){var i=this;this.options.mimeType=e,t=t&&t.constructor===Array?t:[t],this.containers.forEach(function(t){return t.destroy()}),this.mediaControl.container=null,this.containerFactory.options=I.default.extend(this.options,{sources:t}),this.containerFactory.createContainers().then(function(t){return i.setupContainers(t)}).then(function(t){return i.resolveOnContainersReady(t)})},e.prototype.destroy=function(){this.disableResizeObserver(),this.containers.forEach(function(t){return t.destroy()}),this.plugins.forEach(function(t){return t.destroy()}),this.$el.remove(),this.mediaControl.destroy(),(0,I.default)(document).unbind("fullscreenchange",this._boundFullscreenHandler),(0,I.default)(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),(0,I.default)(document).unbind("mozfullscreenchange",this._boundFullscreenHandler)},e.prototype.handleFullscreenChange=function(){this.trigger(p.default.CORE_FULLSCREEN,h.Fullscreen.isFullscreen()),this.updateSize(),this.mediaControl.show()},e.prototype.handleWindowResize=function(t){var e=(0,I.default)(window).width()>(0,I.default)(window).height()?"landscape":"portrait";this._screenOrientation!==e&&(this._screenOrientation=e,this.trigger(p.default.CORE_SCREEN_ORIENTATION_CHANGED,{event:t,orientation:this._screenOrientation}))},e.prototype.setMediaControlContainer=function(t){this.mediaControl.setContainer(t),this.mediaControl.render()},e.prototype.disableMediaControl=function(){this.mediaControl.disable(),this.$el.removeClass("nocursor")},e.prototype.enableMediaControl=function(){this.mediaControl.enable()},e.prototype.removeContainer=function(t){this.stopListening(t),this.containers=this.containers.filter(function(e){return e!==t})},e.prototype.appendContainer=function(t){this.listenTo(t,p.default.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(t)},e.prototype.setupContainers=function(t){return t.map(this.appendContainer.bind(this)),this.trigger(p.default.CORE_CONTAINERS_CREATED),this.renderContainers(),this.setupMediaControl(this.getCurrentContainer()),this.render(),this.appendToParent(),this.containers},e.prototype.renderContainers=function(){var t=this;this.containers.map(function(e){return t.el.appendChild(e.render().el)})},e.prototype.createContainer=function(t,e){var i=this.containerFactory.createContainer(t,e);return this.appendContainer(i),this.el.appendChild(i.render().el),i},e.prototype.setupMediaControl=function(t){this.mediaControl?this.mediaControl.setContainer(t):(this.mediaControl=this.createMediaControl(I.default.extend({container:t,focusElement:this.el},this.options)),this.listenTo(this.mediaControl,p.default.MEDIACONTROL_FULLSCREEN,this.toggleFullscreen),this.listenTo(this.mediaControl,p.default.MEDIACONTROL_SHOW,this.onMediaControlShow.bind(this,!0)),this.listenTo(this.mediaControl,p.default.MEDIACONTROL_HIDE,this.onMediaControlShow.bind(this,!1)))},e.prototype.createMediaControl=function(t){return t.mediacontrol&&t.mediacontrol.external?new t.mediacontrol.external(t).render():new T.default(t).render()},e.prototype.getCurrentContainer=function(){return this.mediaControl&&this.mediaControl.container?this.mediaControl.container:this.containers[0]},e.prototype.getCurrentPlayback=function(){var t=this.getCurrentContainer();return t&&t.playback},e.prototype.getPlaybackType=function(){var t=this.getCurrentContainer();return t&&t.getPlaybackType()},e.prototype.toggleFullscreen=function(){h.Fullscreen.isFullscreen()?(h.Fullscreen.cancelFullscreen(),m.default.isiOS||this.$el.removeClass("fullscreen nocursor")):(h.Fullscreen.requestFullscreen(this.el),m.default.isiOS||this.$el.addClass("fullscreen")),this.mediaControl.show()},e.prototype.showMediaControl=function(t){this.mediaControl.show(t)},e.prototype.hideMediaControl=function(){this.mediaControl.hide(this.options.hideMediaControlDelay)},e.prototype.onMediaControlShow=function(t){this.getCurrentContainer().trigger(t?p.default.CONTAINER_MEDIACONTROL_SHOW:p.default.CONTAINER_MEDIACONTROL_HIDE),t?this.$el.removeClass("nocursor"):h.Fullscreen.isFullscreen()&&this.$el.addClass("nocursor")},e.prototype.configure=function(t){var e=this;this._options=I.default.extend(this._options,t),this.configureDomRecycler();var i=t.source||t.sources;i&&this.load(i,t.mimeType||this.options.mimeType),this.trigger(p.default.CORE_OPTIONS_CHANGE),this.containers.forEach(function(t){t.configure(e.options)}),this.mediaControl.configure(this.options)},e.prototype.appendToParent=function(){!(this.$el.parent()&&this.$el.parent().length)&&this.$el.appendTo(this.options.parentElement)},e.prototype.render=function(){this.$el.append(this.mediaControl.render().el),P||(P=w.default.getStyleFor(O.default,{baseUrl:this.options.baseUrl})),(0,I.default)("head").append(P),this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var t={width:this.options.width,height:this.options.height};return this.playerInfo.previousSize=this.playerInfo.currentSize=this.playerInfo.computedSize=t,this.updateSize(),this.previousSize={width:this.$el.width(),height:this.$el.height()},this.enableResizeObserver(),this},e}(y.default);e.default=x,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(142),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(32),a=n(r),o=i(0),s=n(o),l=i(1),u=n(l),d=i(3),c=n(d),h=i(2),f=n(h),p=i(17),g=n(p),y=i(4),v=n(y),m=i(74),b=n(m),_=i(6),E=n(_),T=function(t){function e(i,n,r){(0,s.default)(this,e);var a=(0,u.default)(this,t.call(this,i));return a._i18n=r,a.loader=n,a}return(0,f.default)(e,t),(0,c.default)(e,[{key:"options",get:function(){return this._options},set:function(t){this._options=t}}]),e.prototype.createContainers=function(){var t=this;return E.default.Deferred(function(e){e.resolve(t.options.sources.map(function(e){return t.createContainer(e)}))})},e.prototype.findPlaybackPlugin=function(t,e){return this.loader.playbackPlugins.filter(function(i){return i.canPlay(t,e)})[0]},e.prototype.createContainer=function(t){var e=null,i=this.options.mimeType;"object"===(void 0===t?"undefined":(0,a.default)(t))?(e=t.source.toString(),t.mimeType&&(i=t.mimeType)):e=t.toString(),e.match(/^\/\//)&&(e=window.location.protocol+e);var n=E.default.extend({},this.options,{src:e,mimeType:i}),r=this.findPlaybackPlugin(e,i),o=new r(n,this._i18n);n=E.default.extend({},n,{playback:o});var s=new b.default(n,this._i18n),l=E.default.Deferred();return l.promise(s),this.addContainerPlugins(s),this.listenToOnce(s,v.default.CONTAINER_READY,function(){return l.resolve(s)}),s},e.prototype.addContainerPlugins=function(t){this.loader.containerPlugins.forEach(function(e){t.addPlugin(new e(t))})},e}(g.default);e.default=T,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(4),f=n(h),p=i(21),g=n(p);i(144);var y=i(6),v=n(y),m=function(t){function e(i,n){(0,a.default)(this,e);var r=(0,s.default)(this,t.call(this,i));return r._i18n=n,r.currentTime=0,r.volume=100,r.playback=i.playback,r.settings=v.default.extend({},r.playback.settings),r.isReady=!1,r.mediaControlDisabled=!1,r.plugins=[r.playback],r.bindEvents(),r}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",doubleTap:"dblClicked",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}},{key:"hasClosedCaptionsTracks",get:function(){return this.playback.hasClosedCaptionsTracks}},{key:"closedCaptionsTracks",get:function(){return this.playback.closedCaptionsTracks}},{key:"closedCaptionsTrackId",get:function(){return this.playback.closedCaptionsTrackId},set:function(t){this.playback.closedCaptionsTrackId=t}}]),e.prototype.bindEvents=function(){this.listenTo(this.playback,f.default.PLAYBACK_PROGRESS,this.progress),this.listenTo(this.playback,f.default.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,f.default.PLAYBACK_READY,this.ready),this.listenTo(this.playback,f.default.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,f.default.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,f.default.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,f.default.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,f.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,f.default.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,f.default.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,f.default.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,f.default.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,f.default.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,f.default.PLAYBACK_SEEKED,this.onSeeked),this.listenTo(this.playback,f.default.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,f.default.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,f.default.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,f.default.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,f.default.PLAYBACK_ERROR,this.error),this.listenTo(this.playback,f.default.PLAYBACK_SUBTITLE_AVAILABLE,this.subtitleAvailable),this.listenTo(this.playback,f.default.PLAYBACK_SUBTITLE_CHANGED,this.subtitleChanged)},e.prototype.subtitleAvailable=function(){this.trigger(f.default.CONTAINER_SUBTITLE_AVAILABLE)},e.prototype.subtitleChanged=function(t){this.trigger(f.default.CONTAINER_SUBTITLE_CHANGED,t)},e.prototype.playbackStateChanged=function(t){this.trigger(f.default.CONTAINER_PLAYBACKSTATE,t)},e.prototype.playbackDvrStateChanged=function(t){this.settings=this.playback.settings,this.dvrInUse=t,this.trigger(f.default.CONTAINER_PLAYBACKDVRSTATECHANGED,t)},e.prototype.updateBitrate=function(t){this.trigger(f.default.CONTAINER_BITRATE,t)},e.prototype.statsReport=function(t){this.trigger(f.default.CONTAINER_STATS_REPORT,t)},e.prototype.getPlaybackType=function(){return this.playback.getPlaybackType()},e.prototype.isDvrEnabled=function(){return!!this.playback.dvrEnabled},e.prototype.isDvrInUse=function(){return!!this.dvrInUse},e.prototype.destroy=function(){this.trigger(f.default.CONTAINER_DESTROYED,this,this.name),this.stopListening(),this.plugins.forEach(function(t){return t.destroy()}),this.$el.remove()},e.prototype.setStyle=function(t){this.$el.css(t)},e.prototype.animate=function(t,e){return this.$el.animate(t,e).promise()},e.prototype.ready=function(){this.isReady=!0,this.trigger(f.default.CONTAINER_READY,this.name)},e.prototype.isPlaying=function(){return this.playback.isPlaying()},e.prototype.getStartTimeOffset=function(){return this.playback.getStartTimeOffset()},e.prototype.getCurrentTime=function(){return this.currentTime},e.prototype.getDuration=function(){return this.playback.getDuration()},e.prototype.error=function(t){this.isReady||this.ready(),this.trigger(f.default.CONTAINER_ERROR,{error:t,container:this},this.name)},e.prototype.loadedMetadata=function(t){this.trigger(f.default.CONTAINER_LOADEDMETADATA,t)},e.prototype.timeUpdated=function(t){this.currentTime=t.current,this.trigger(f.default.CONTAINER_TIMEUPDATE,t,this.name)},e.prototype.progress=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];this.trigger.apply(this,[f.default.CONTAINER_PROGRESS].concat(e,[this.name]))},e.prototype.playing=function(){this.trigger(f.default.CONTAINER_PLAY,this.name)},e.prototype.paused=function(){this.trigger(f.default.CONTAINER_PAUSE,this.name)},e.prototype.play=function(){this.playback.play()},e.prototype.stop=function(){this.playback.stop(),this.currentTime=0},e.prototype.pause=function(){this.playback.pause()},e.prototype.onEnded=function(){this.trigger(f.default.CONTAINER_ENDED,this,this.name),this.currentTime=0},e.prototype.stopped=function(){this.trigger(f.default.CONTAINER_STOP)},e.prototype.clicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(f.default.CONTAINER_CLICK,this,this.name)},e.prototype.dblClicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(f.default.CONTAINER_DBLCLICK,this,this.name)},e.prototype.onContextMenu=function(t){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(f.default.CONTAINER_CONTEXTMENU,t,this.name)},e.prototype.seek=function(t){this.trigger(f.default.CONTAINER_SEEK,t,this.name),this.playback.seek(t)},e.prototype.onSeeked=function(){this.trigger(f.default.CONTAINER_SEEKED,this.name)},e.prototype.seekPercentage=function(t){var e=this.getDuration();if(t>=0&&t<=100){var i=e*(t/100);this.seek(i)}},e.prototype.setVolume=function(t){this.volume=parseInt(t,10),this.trigger(f.default.CONTAINER_VOLUME,t,this.name),this.playback.volume(t)},e.prototype.fullscreen=function(){this.trigger(f.default.CONTAINER_FULLSCREEN,this.name)},e.prototype.onBuffering=function(){this.trigger(f.default.CONTAINER_STATE_BUFFERING,this.name)},e.prototype.bufferfull=function(){this.trigger(f.default.CONTAINER_STATE_BUFFERFULL,this.name)},e.prototype.addPlugin=function(t){this.plugins.push(t)},e.prototype.hasPlugin=function(t){return!!this.getPlugin(t)},e.prototype.getPlugin=function(t){return this.plugins.filter(function(e){return e.name===t})[0]},e.prototype.mouseEnter=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(f.default.CONTAINER_MOUSE_ENTER)},e.prototype.mouseLeave=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(f.default.CONTAINER_MOUSE_LEAVE)},e.prototype.settingsUpdate=function(){this.settings=this.playback.settings,this.trigger(f.default.CONTAINER_SETTINGSUPDATE)},e.prototype.highDefinitionUpdate=function(t){this.trigger(f.default.CONTAINER_HIGHDEFINITIONUPDATE,t)},e.prototype.isHighDefinitionInUse=function(){return this.playback.isHighDefinitionInUse()},e.prototype.disableMediaControl=function(){this.mediaControlDisabled||(this.mediaControlDisabled=!0,this.trigger(f.default.CONTAINER_MEDIACONTROL_DISABLE))},e.prototype.enableMediaControl=function(){this.mediaControlDisabled&&(this.mediaControlDisabled=!1,this.trigger(f.default.CONTAINER_MEDIACONTROL_ENABLE))},e.prototype.updateStyle=function(){!this.options.chromeless||this.options.allowUserInteraction?this.$el.removeClass("chromeless"):this.$el.addClass("chromeless")},e.prototype.configure=function(t){this._options=v.default.extend(this._options,t),this.updateStyle(),this.trigger(f.default.CONTAINER_OPTIONS_CHANGE)},e.prototype.render=function(){return this.$el.append(this.playback.render().el),this.updateStyle(),this},e}(g.default);e.default=m,t.exports=e.default},function(t,e,i){var n=i(145);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,".container[data-container]{position:absolute;background-color:#000;height:100%;width:100%}.container[data-container] .chromeless{cursor:default}[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled{cursor:pointer}",""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r))return t;var a;return a=0===r.indexOf("//")?r:0===r.indexOf("/")?i+r:n+r.replace(/^\.\//,""),"url("+JSON.stringify(a)+")"})}},function(t,e,i){"use strict";(function(n){function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(148),o=r(a),s=i(0),l=r(s),u=i(1),d=r(u),c=i(3),h=r(c),f=i(2),p=r(f),g=i(5),y=i(56),v=i(4),m=r(v),b=i(21),_=r(b),E=i(13),T=r(E),A=i(24),S=r(A),L=i(8),R=r(L),k=i(9),w=r(k),C=i(6),I=r(C);i(150);var D=i(152),O=r(D),P=i(58),x=r(P),N=i(78),M=r(N),F=i(153),B=r(F),U=i(154),G=r(U),K=i(155),Y=r(K),j=i(156),V=r(j),H=i(157),$=r(H),z=i(158),W=r(z),q=function(t){function e(i){(0,l.default)(this,e);var n=(0,d.default)(this,t.call(this,i));return n.persistConfig=n.options.persistConfig,n.container=i.container,n.currentPositionValue=null,n.currentDurationValue=null,n.keepVisible=!1,n.fullScreenOnVideoTagSupported=null,n.setInitialVolume(),n.addEventListeners(),n.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},n.container?I.default.isEmptyObject(n.container.settings)||(n.settings=I.default.extend({},n.container.settings)):n.settings={},n.userDisabled=!1,(n.container&&n.container.mediaControlDisabled||n.options.chromeless)&&n.disable(),n.stopDragHandler=function(t){return n.stopDrag(t)},n.updateDragHandler=function(t){return n.updateDrag(t)},(0,I.default)(document).bind("mouseup",n.stopDragHandler),(0,I.default)(document).bind("mousemove",n.updateDragHandler),n}return(0,p.default)(e,t),(0,h.default)(e,[{key:"name",get:function(){return"MediaControl"}},{key:"disabled",get:function(){return this.userDisabled||this.container&&this.container.getPlaybackType()===w.default.NO_OP}},{key:"attributes",get:function(){return{class:"media-control","data-media-control":""}}},{key:"events",get:function(){return{"click [data-play]":"play","click [data-pause]":"pause","click [data-playpause]":"togglePlayPause","click [data-stop]":"stop","click [data-playstop]":"togglePlayStop","click [data-fullscreen]":"toggleFullscreen","click .bar-container[data-seekbar]":"seek","click .bar-container[data-volume]":"onVolumeClick","click .drawer-icon[data-volume]":"toggleMute","mouseenter .drawer-container[data-volume]":"showVolumeBar","mouseleave .drawer-container[data-volume]":"hideVolumeBar","mousedown .bar-container[data-volume]":"startVolumeDrag","mousemove .bar-container[data-volume]":"mousemoveOnVolumeBar","mousedown .bar-scrubber[data-seekbar]":"startSeekDrag","mousemove .bar-container[data-seekbar]":"mousemoveOnSeekBar","mouseleave .bar-container[data-seekbar]":"mouseleaveOnSeekBar","mouseenter .media-control-layer[data-controls]":"setUserKeepVisible","mouseleave .media-control-layer[data-controls]":"resetUserKeepVisible"}}},{key:"template",get:function(){return(0,R.default)(O.default)}},{key:"volume",get:function(){return this.container&&this.container.isReady?this.container.volume:this.intendedVolume}},{key:"muted",get:function(){return 0===this.volume}}]),e.prototype.addEventListeners=function(){this.container&&(S.default.on(this.options.playerId+":"+m.default.PLAYER_RESIZE,this.playerResize,this),this.listenTo(this.container,m.default.CONTAINER_PLAY,this.changeTogglePlay),this.listenTo(this.container,m.default.CONTAINER_PAUSE,this.changeTogglePlay),this.listenTo(this.container,m.default.CONTAINER_STOP,this.changeTogglePlay),this.listenTo(this.container,m.default.CONTAINER_DBLCLICK,this.toggleFullscreen),this.listenTo(this.container,m.default.CONTAINER_TIMEUPDATE,this.onTimeUpdate),this.listenTo(this.container,m.default.CONTAINER_PROGRESS,this.updateProgressBar),this.listenTo(this.container,m.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.container,m.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.settingsUpdate),this.listenTo(this.container,m.default.CONTAINER_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.container,m.default.CONTAINER_MEDIACONTROL_DISABLE,this.disable),this.listenTo(this.container,m.default.CONTAINER_MEDIACONTROL_ENABLE,this.enable),this.listenTo(this.container,m.default.CONTAINER_ENDED,this.ended),this.listenTo(this.container,m.default.CONTAINER_VOLUME,this.onVolumeChanged),this.listenTo(this.container,m.default.CONTAINER_OPTIONS_CHANGE,this.setInitialVolume),"video"===this.container.playback.el.nodeName.toLowerCase()&&this.listenToOnce(this.container,m.default.CONTAINER_LOADEDMETADATA,this.onLoadedMetadataOnVideoTag))},e.prototype.disable=function(){this.userDisabled=!0,this.hide(),this.$el.hide()},e.prototype.enable=function(){this.options.chromeless||(this.userDisabled=!1,this.show())},e.prototype.play=function(){this.container.play()},e.prototype.pause=function(){this.container.pause()},e.prototype.stop=function(){this.container.stop()},e.prototype.setInitialVolume=function(){var t=this.persistConfig?g.Config.restore("volume"):100,e=this.container&&this.container.options||this.options;this.setVolume(e.mute?0:t,!0)},e.prototype.onVolumeChanged=function(){this.updateVolumeUI()},e.prototype.onLoadedMetadataOnVideoTag=function(){var t=this.container.playback.el;!g.Fullscreen.fullscreenEnabled()&&t.webkitSupportsFullscreen&&(this.fullScreenOnVideoTagSupported=!0,this.settingsUpdate())},e.prototype.updateVolumeUI=function(){if(this.rendered){this.$volumeBarContainer.find(".bar-fill-2").css({});var t=this.$volumeBarContainer.width(),e=this.$volumeBarBackground.width(),i=(t-e)/2,n=e*this.volume/100+i;this.$volumeBarFill.css({width:this.volume+"%"}),this.$volumeBarScrubber.css({left:n}),this.$volumeBarContainer.find(".segmented-bar-element").removeClass("fill");var r=Math.ceil(this.volume/10);this.$volumeBarContainer.find(".segmented-bar-element").slice(0,r).addClass("fill"),this.$volumeIcon.html(""),this.$volumeIcon.removeClass("muted"),this.muted?(this.$volumeIcon.append(Y.default),this.$volumeIcon.addClass("muted")):this.$volumeIcon.append(G.default),this.applyButtonStyle(this.$volumeIcon)}},e.prototype.changeTogglePlay=function(){this.$playPauseToggle.html(""),this.$playStopToggle.html(""),this.container&&this.container.isPlaying()?(this.$playPauseToggle.append(M.default),this.$playStopToggle.append(B.default),this.trigger(m.default.MEDIACONTROL_PLAYING)):(this.$playPauseToggle.append(x.default),this.$playStopToggle.append(x.default),this.trigger(m.default.MEDIACONTROL_NOTPLAYING),T.default.isMobile&&this.show()),this.applyButtonStyle(this.$playPauseToggle),this.applyButtonStyle(this.$playStopToggle)},e.prototype.mousemoveOnSeekBar=function(t){if(this.settings.seekEnabled){var e=t.pageX-this.$seekBarContainer.offset().left-this.$seekBarHover.width()/2;this.$seekBarHover.css({left:e})}this.trigger(m.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,t)},e.prototype.mouseleaveOnSeekBar=function(t){this.trigger(m.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,t)},e.prototype.onVolumeClick=function(t){this.setVolume(this.getVolumeFromUIEvent(t))},e.prototype.mousemoveOnVolumeBar=function(t){this.draggingVolumeBar&&this.setVolume(this.getVolumeFromUIEvent(t))},e.prototype.playerResize=function(t){this.$fullscreenToggle.html(""),g.Fullscreen.isFullscreen()?this.$fullscreenToggle.append($.default):this.$fullscreenToggle.append(V.default),this.applyButtonStyle(this.$fullscreenToggle),this.$el.removeClass("w320"),(t.width<=320||this.options.hideVolumeBar)&&this.$el.addClass("w320")},e.prototype.togglePlayPause=function(){return this.container.isPlaying()?this.container.pause():this.container.play(),!1},e.prototype.togglePlayStop=function(){this.container.isPlaying()?this.container.stop():this.container.play()},e.prototype.startSeekDrag=function(t){this.settings.seekEnabled&&(this.draggingSeekBar=!0,this.$el.addClass("dragging"),this.$seekBarLoaded.addClass("media-control-notransition"),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition"),t&&t.preventDefault())},e.prototype.startVolumeDrag=function(t){this.draggingVolumeBar=!0,this.$el.addClass("dragging"),t&&t.preventDefault()},e.prototype.stopDrag=function(t){this.draggingSeekBar&&this.seek(t),this.$el.removeClass("dragging"),this.$seekBarLoaded.removeClass("media-control-notransition"),this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition dragging"),this.draggingSeekBar=!1,this.draggingVolumeBar=!1},e.prototype.updateDrag=function(t){if(this.draggingSeekBar){t.preventDefault();var e=t.pageX-this.$seekBarContainer.offset().left,i=e/this.$seekBarContainer.width()*100;i=Math.min(100,Math.max(i,0)),this.setSeekPercentage(i)}else this.draggingVolumeBar&&(t.preventDefault(),this.setVolume(this.getVolumeFromUIEvent(t)))},e.prototype.getVolumeFromUIEvent=function(t){return(t.pageX-this.$volumeBarContainer.offset().left)/this.$volumeBarContainer.width()*100},e.prototype.toggleMute=function(){this.setVolume(this.muted?100:0)},e.prototype.setVolume=function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=Math.min(100,Math.max(t,0)),this.intendedVolume=t,this.persistConfig&&!i&&g.Config.persist("volume",t);var n=function(){e.container.isReady?e.container.setVolume(t):e.listenToOnce(e.container,m.default.CONTAINER_READY,function(){e.container.setVolume(t)})};this.container?n():this.listenToOnce(this,m.default.MEDIACONTROL_CONTAINERCHANGED,function(){n()})},e.prototype.toggleFullscreen=function(){this.trigger(m.default.MEDIACONTROL_FULLSCREEN,this.name),this.container.fullscreen(),this.resetUserKeepVisible()},e.prototype.setContainer=function(t){this.container&&(this.stopListening(this.container),this.fullScreenOnVideoTagSupported=null),S.default.off(this.options.playerId+":"+m.default.PLAYER_RESIZE,this.playerResize,this),this.container=t,this.setVolume(this.intendedVolume,!0),this.changeTogglePlay(),this.addEventListeners(),this.settingsUpdate(),this.container.trigger(m.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.container.isDvrInUse()),this.container.mediaControlDisabled&&this.disable(),this.trigger(m.default.MEDIACONTROL_CONTAINERCHANGED)},e.prototype.showVolumeBar=function(){this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.$volumeBarContainer.removeClass("volume-bar-hide")},e.prototype.hideVolumeBar=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:400;this.$volumeBarContainer&&(this.draggingVolumeBar?this.hideVolumeId=setTimeout(function(){return t.hideVolumeBar()},e):(this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.hideVolumeId=setTimeout(function(){return t.$volumeBarContainer.addClass("volume-bar-hide")},e)))},e.prototype.ended=function(){this.changeTogglePlay()},e.prototype.updateProgressBar=function(t){var e=t.start/t.total*100,i=t.current/t.total*100;this.$seekBarLoaded.css({left:e+"%",width:i-e+"%"})},e.prototype.onTimeUpdate=function(t){if(!this.draggingSeekBar){var e=t.current<0?t.total:t.current;this.currentPositionValue=e,this.currentDurationValue=t.total,this.renderSeekBar()}},e.prototype.renderSeekBar=function(){if(null!==this.currentPositionValue&&null!==this.currentDurationValue){this.currentSeekBarPercentage=100,(this.container.getPlaybackType()!==w.default.LIVE||this.container.isDvrInUse())&&(this.currentSeekBarPercentage=this.currentPositionValue/this.currentDurationValue*100),this.setSeekPercentage(this.currentSeekBarPercentage);var t=(0,g.formatTime)(this.currentPositionValue),e=(0,g.formatTime)(this.currentDurationValue);t!==this.displayedPosition&&(this.$position.text(t),this.displayedPosition=t),e!==this.displayedDuration&&(this.$duration.text(e),this.displayedDuration=e)}},e.prototype.seek=function(t){if(this.settings.seekEnabled){var e=t.pageX-this.$seekBarContainer.offset().left,i=e/this.$seekBarContainer.width()*100;return i=Math.min(100,Math.max(i,0)),this.container.seekPercentage(i),this.setSeekPercentage(i),!1}},e.prototype.setKeepVisible=function(){this.keepVisible=!0},e.prototype.resetKeepVisible=function(){this.keepVisible=!1},e.prototype.setUserKeepVisible=function(){this.userKeepVisible=!0},e.prototype.resetUserKeepVisible=function(){this.userKeepVisible=!1},e.prototype.isVisible=function(){return!this.$el.hasClass("media-control-hide")},e.prototype.show=function(t){var e=this;if(!this.disabled){(!t||t.clientX!==this.lastMouseX&&t.clientY!==this.lastMouseY||navigator.userAgent.match(/firefox/i))&&(clearTimeout(this.hideId),this.$el.show(),this.trigger(m.default.MEDIACONTROL_SHOW,this.name),this.$el.removeClass("media-control-hide"),this.hideId=setTimeout(function(){return e.hide()},2e3),t&&(this.lastMouseX=t.clientX,this.lastMouseY=t.clientY))}},e.prototype.hide=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isVisible()){var i=e||2e3;clearTimeout(this.hideId),(this.disabled||!1!==this.options.hideMediaControl)&&(!this.disabled&&(e||this.userKeepVisible||this.keepVisible||this.draggingSeekBar||this.draggingVolumeBar)?this.hideId=setTimeout(function(){return t.hide()},i):(this.trigger(m.default.MEDIACONTROL_HIDE,this.name),this.$el.addClass("media-control-hide"),this.hideVolumeBar(0)))}},e.prototype.settingsUpdate=function(){var t=this.getSettings();!t||this.fullScreenOnVideoTagSupported||g.Fullscreen.fullscreenEnabled()||(t.default&&(0,g.removeArrayItem)(t.default,"fullscreen"),t.left&&(0,g.removeArrayItem)(t.left,"fullscreen"),t.right&&(0,g.removeArrayItem)(t.right,"fullscreen")),(0,o.default)(this.settings)!==(0,o.default)(t)&&(this.settings=t,this.render())},e.prototype.getSettings=function(){return I.default.extend(!0,{},this.container.settings)},e.prototype.highDefinitionUpdate=function(t){this.isHD=t;var e=t?"addClass":"removeClass";this.$hdIndicator[e]("enabled")},e.prototype.createCachedElements=function(){var t=this.$el.find(".media-control-layer");this.$duration=t.find(".media-control-indicator[data-duration]"),this.$fullscreenToggle=t.find("button.media-control-button[data-fullscreen]"),this.$playPauseToggle=t.find("button.media-control-button[data-playpause]"),this.$playStopToggle=t.find("button.media-control-button[data-playstop]"),this.$position=t.find(".media-control-indicator[data-position]"),this.$seekBarContainer=t.find(".bar-container[data-seekbar]"),this.$seekBarHover=t.find(".bar-hover[data-seekbar]"),this.$seekBarLoaded=t.find(".bar-fill-1[data-seekbar]"),this.$seekBarPosition=t.find(".bar-fill-2[data-seekbar]"),this.$seekBarScrubber=t.find(".bar-scrubber[data-seekbar]"),this.$volumeBarContainer=t.find(".bar-container[data-volume]"),this.$volumeContainer=t.find(".drawer-container[data-volume]"),this.$volumeIcon=t.find(".drawer-icon[data-volume]"),this.$volumeBarBackground=this.$el.find(".bar-background[data-volume]"),this.$volumeBarFill=this.$el.find(".bar-fill-1[data-volume]"),this.$volumeBarScrubber=this.$el.find(".bar-scrubber[data-volume]"),this.$hdIndicator=this.$el.find("button.media-control-button[data-hd-indicator]"),this.resetIndicators(),this.initializeIcons()},e.prototype.resetIndicators=function(){this.displayedPosition=this.$position.text(),this.displayedDuration=this.$duration.text()},e.prototype.initializeIcons=function(){var t=this.$el.find(".media-control-layer");t.find("button.media-control-button[data-play]").append(x.default),t.find("button.media-control-button[data-pause]").append(M.default),t.find("button.media-control-button[data-stop]").append(B.default),this.$playPauseToggle.append(x.default),this.$playStopToggle.append(x.default),this.$volumeIcon.append(G.default),this.$fullscreenToggle.append(V.default),this.$hdIndicator.append(W.default)},e.prototype.setSeekPercentage=function(t){t=Math.max(Math.min(t,100),0),this.displayedSeekBarPercentage!==t&&(this.displayedSeekBarPercentage=t,this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition"),this.$seekBarPosition.css({width:t+"%"}),this.$seekBarScrubber.css({left:t+"%"}))},e.prototype.seekRelative=function(t){if(this.settings.seekEnabled){var e=this.container.getCurrentTime(),i=this.container.getDuration(),n=Math.min(Math.max(e+t,0),i);n=Math.min(100*n/i,100),this.container.seekPercentage(n)}},e.prototype.bindKeyAndShow=function(t,e){var i=this;this.kibo.down(t,function(){return i.show(),e()})},e.prototype.bindKeyEvents=function(){var t=this;this.unbindKeyEvents(),this.kibo=new y.Kibo(this.options.focusElement),this.bindKeyAndShow("space",function(){return t.togglePlayPause()}),this.bindKeyAndShow("left",function(){return t.seekRelative(-5)}),this.bindKeyAndShow("right",function(){return t.seekRelative(5)}),this.bindKeyAndShow("shift left",function(){return t.seekRelative(-10)}),this.bindKeyAndShow("shift right",function(){return t.seekRelative(10)}),this.bindKeyAndShow("shift ctrl left",function(){return t.seekRelative(-15)}),this.bindKeyAndShow("shift ctrl right",function(){return t.seekRelative(15)}),["1","2","3","4","5","6","7","8","9","0"].forEach(function(e){t.bindKeyAndShow(e,function(){return t.settings.seekEnabled&&t.container.seekPercentage(10*e)})})},e.prototype.unbindKeyEvents=function(){this.kibo&&(this.kibo.off("space"),this.kibo.off("left"),this.kibo.off("right"),this.kibo.off("shift left"),this.kibo.off("shift right"),this.kibo.off("shift ctrl left"),this.kibo.off("shift ctrl right"),this.kibo.off(["1","2","3","4","5","6","7","8","9","0"]))},e.prototype.parseColors=function(){if(this.options.mediacontrol){this.buttonsColor=this.options.mediacontrol.buttons;var t=this.options.mediacontrol.seekbar;this.$el.find(".bar-fill-2[data-seekbar]").css("background-color",t),this.$el.find(".media-control-icon svg path").css("fill",this.buttonsColor),this.$el.find(".segmented-bar-element[data-volume]").css("boxShadow","inset 2px 0 0 "+this.buttonsColor)}},e.prototype.applyButtonStyle=function(t){this.buttonsColor&&t&&(0,I.default)(t).find("svg path").css("fill",this.buttonsColor)},e.prototype.destroy=function(){this.remove(),(0,I.default)(document).unbind("mouseup",this.stopDragHandler),(0,I.default)(document).unbind("mousemove",this.updateDragHandler),this.unbindKeyEvents()},e.prototype.configure=function(t){this._options=I.default.extend(this._options,t),this.trigger(m.default.MEDIACONTROL_OPTIONS_CHANGE)},e.prototype.render=function(){var t=this;this.$el.html(this.template({settings:this.settings})),this.createCachedElements(),this.$playPauseToggle.addClass("paused"),this.$playStopToggle.addClass("stopped"),this.changeTogglePlay(),this.hideId=setTimeout(function(){return t.hide()},1e3),this.disabled&&this.hide(),T.default.isSafari&&T.default.isMobile&&(T.default.version<10?this.$volumeContainer.css("display","none"):this.$volumeBarContainer.css("display","none")),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition");var e=0;return this.displayedSeekBarPercentage&&(e=this.displayedSeekBarPercentage),this.displayedSeekBarPercentage=null,this.setSeekPercentage(e),n.nextTick(function(){t.settings.seekEnabled||t.$seekBarContainer.addClass("seek-disabled"),T.default.isMobile||t.options.disableKeyboardShortcuts||t.bindKeyEvents(),t.playerResize({width:t.options.width,height:t.options.height}),t.hideVolumeBar(0)}),this.parseColors(),this.highDefinitionUpdate(this.isHD),this.rendered=!0,this.updateVolumeUI(),this.trigger(m.default.MEDIACONTROL_RENDERED),this},e}(_.default);e.default=q,q.extend=function(t){return(0,g.extend)(q,t)},t.exports=e.default}).call(e,i(57))},function(t,e,i){t.exports={default:i(149),__esModule:!0}},function(t,e,i){var n=i(11),r=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(t){return r.stringify.apply(r,arguments)}},function(t,e,i){var n=i(151);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){var n=i(76);e=t.exports=i(7)(!1),e.push([t.i,".media-control-notransition{transition:none!important}.media-control[data-media-control]{position:absolute;width:100%;height:100%;z-index:9999;pointer-events:none}.media-control[data-media-control].dragging{pointer-events:auto;cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url("+n(i(77))+"),move}.media-control[data-media-control].dragging *{cursor:-webkit-grabbing!important;cursor:grabbing!important;cursor:url("+n(i(77))+'),move}.media-control[data-media-control] .media-control-background[data-background]{position:absolute;height:40%;width:100%;bottom:0;background:linear-gradient(transparent,rgba(0,0,0,.9));transition:opacity .6s ease-out}.media-control[data-media-control] .media-control-icon{line-height:0;letter-spacing:0;speak:none;color:#fff;opacity:.5;vertical-align:middle;text-align:left;transition:all .1s ease}.media-control[data-media-control] .media-control-icon:hover{color:#fff;opacity:.75;text-shadow:hsla(0,0%,100%,.8) 0 0 5px}.media-control[data-media-control].media-control-hide .media-control-background[data-background]{opacity:0}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls]{bottom:-50px}.media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls]{position:absolute;bottom:7px;width:100%;height:32px;font-size:0;vertical-align:middle;pointer-events:auto;transition:bottom .4s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control]{position:absolute;top:0;left:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control]{height:100%;text-align:center;line-height:32px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control]{position:absolute;top:0;right:4px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button{background-color:transparent;border:0;margin:0 6px;padding:0;cursor:pointer;display:inline-block;width:32px;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg{width:100%;height:22px}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus{outline:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop]{float:left;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen]{float:right;background-color:transparent;border:0;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator]{background-color:transparent;border:0;cursor:default;display:none;float:right;height:100%}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled{display:block;opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover{opacity:1;text-shadow:none}.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause],.media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop]{float:left}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration],.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{display:inline-block;font-size:10px;color:#fff;cursor:default;line-height:32px;position:relative}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position]{margin:0 6px 0 7px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]{color:hsla(0,0%,100%,.5);margin-right:6px}.media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before{content:"|";margin-right:7px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{position:absolute;top:-20px;left:0;display:inline-block;vertical-align:middle;width:100%;height:25px;cursor:pointer}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{width:100%;height:1px;position:relative;top:12px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled{cursor:default}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar]{opacity:0}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:2px;left:0;width:20px;height:20px;opacity:1;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume]{float:right;display:inline-block;height:32px;cursor:pointer;margin:0 6px;box-sizing:border-box}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume]{float:left;bottom:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]{background-color:transparent;border:0;box-sizing:content-box;width:32px;height:32px;opacity:.5}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover{opacity:.75}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg{height:24px;position:relative;top:3px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path{fill:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg{margin-left:2px}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume]{float:left;position:relative;overflow:hidden;top:6px;width:42px;height:18px;padding:3px 0;transition:width .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume]{height:1px;position:relative;top:7px;margin:0 3px;background-color:#666}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#c2c2c2;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume]{position:absolute;top:0;left:0;width:0;height:100%;background-color:#005aff;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume]{opacity:0;position:absolute;top:-3px;width:5px;height:7px;background-color:hsla(0,0%,100%,.5);transition:opacity .1s ease}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume]{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:0;left:0;width:20px;height:20px;opacity:1;transition:all .1s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume]{position:absolute;left:6px;top:6px;width:8px;height:8px;border-radius:10px;box-shadow:0 0 0 6px hsla(0,0%,100%,.2);background-color:#fff}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]{float:left;width:4px;padding-left:2px;height:12px;opacity:.5;box-shadow:inset 2px 0 0 #fff;transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out;transition:transform .2s ease-out,-webkit-transform .2s ease-out}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill{box-shadow:inset 2px 0 0 #fff;opacity:1}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:first-of-type{padding-left:0}.media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover{-webkit-transform:scaleY(1.5);transform:scaleY(1.5)}.media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide{width:0;height:12px;top:9px;padding:0}',""])},function(t,e){t.exports='<div class="media-control-background" data-background></div>\n<div class="media-control-layer" data-controls>\n  <%  var renderBar = function(name) { %>\n      <div class="bar-container" data-<%= name %>>\n        <div class="bar-background" data-<%= name %>>\n          <div class="bar-fill-1" data-<%= name %>></div>\n          <div class="bar-fill-2" data-<%= name %>></div>\n          <div class="bar-hover" data-<%= name %>></div>\n        </div>\n        <div class="bar-scrubber" data-<%= name %>>\n          <div class="bar-scrubber-icon" data-<%= name %>></div>\n        </div>\n      </div>\n  <%  }; %>\n  <%  var renderSegmentedBar = function(name, segments) {\n      segments = segments || 10; %>\n    <div class="bar-container" data-<%= name %>>\n    <% for (var i = 0; i < segments; i++) { %>\n      <div class="segmented-bar-element" data-<%= name %>></div>\n    <% } %>\n    </div>\n  <% }; %>\n  <% var renderDrawer = function(name, renderContent) { %>\n      <div class="drawer-container" data-<%= name %>>\n        <div class="drawer-icon-container" data-<%= name %>>\n          <div class="drawer-icon media-control-icon" data-<%= name %>></div>\n          <span class="drawer-text" data-<%= name %>></span>\n        </div>\n        <% renderContent(name); %>\n      </div>\n  <% }; %>\n  <% var renderIndicator = function(name) { %>\n      <div class="media-control-indicator" data-<%= name %>></div>\n  <% }; %>\n  <% var renderButton = function(name) { %>\n    <button type="button" class="media-control-button media-control-icon" data-<%= name %> aria-label="<%= name %>"></button>\n  <% }; %>\n  <%  var templates = {\n        bar: renderBar,\n        segmentedBar: renderSegmentedBar,\n      };\n      var render = function(settingsList) {\n        settingsList.forEach(function(setting) {\n          if(setting === "seekbar") {\n            renderBar(setting);\n          } else if (setting === "volume") {\n            renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n          } else if (setting === "duration" || setting === "position") {\n            renderIndicator(setting);\n          } else {\n            renderButton(setting);\n          }\n        });\n      }; %>\n  <% if (settings.default && settings.default.length) { %>\n  <div class="media-control-center-panel" data-media-control>\n    <% render(settings.default); %>\n  </div>\n  <% } %>\n  <% if (settings.left && settings.left.length) { %>\n  <div class="media-control-left-panel" data-media-control>\n    <% render(settings.left); %>\n  </div>\n  <% } %>\n  <% if (settings.right && settings.right.length) { %>\n  <div class="media-control-right-panel" data-media-control>\n    <% render(settings.right); %>\n  </div>\n  <% } %>\n</div>\n'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 1.24h12.6v13.52h-12.6z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z"></path></svg>'},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z"></path></svg>'},function(t,e,i){var n=i(160);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,'[data-player]{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-transform:translateZ(0);transform:translateZ(0);position:relative;margin:0;padding:0;border:0;font-style:normal;font-weight:400;text-align:center;overflow:hidden;font-size:100%;font-family:Roboto,Open Sans,Arial,sans-serif;text-shadow:0 0 0;box-sizing:border-box}[data-player] a,[data-player] abbr,[data-player] acronym,[data-player] address,[data-player] applet,[data-player] article,[data-player] aside,[data-player] audio,[data-player] b,[data-player] big,[data-player] blockquote,[data-player] canvas,[data-player] caption,[data-player] center,[data-player] cite,[data-player] code,[data-player] dd,[data-player] del,[data-player] details,[data-player] dfn,[data-player] div,[data-player] dl,[data-player] dt,[data-player] em,[data-player] embed,[data-player] fieldset,[data-player] figcaption,[data-player] figure,[data-player] footer,[data-player] form,[data-player] h1,[data-player] h2,[data-player] h3,[data-player] h4,[data-player] h5,[data-player] h6,[data-player] header,[data-player] hgroup,[data-player] i,[data-player] iframe,[data-player] img,[data-player] ins,[data-player] kbd,[data-player] label,[data-player] legend,[data-player] li,[data-player] mark,[data-player] menu,[data-player] nav,[data-player] object,[data-player] ol,[data-player] output,[data-player] p,[data-player] pre,[data-player] q,[data-player] ruby,[data-player] s,[data-player] samp,[data-player] section,[data-player] small,[data-player] span,[data-player] strike,[data-player] strong,[data-player] sub,[data-player] summary,[data-player] sup,[data-player] table,[data-player] tbody,[data-player] td,[data-player] tfoot,[data-player] th,[data-player] thead,[data-player] time,[data-player] tr,[data-player] tt,[data-player] u,[data-player] ul,[data-player] var,[data-player] video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}[data-player] table{border-collapse:collapse;border-spacing:0}[data-player] caption,[data-player] td,[data-player] th{text-align:left;font-weight:400;vertical-align:middle}[data-player] blockquote,[data-player] q{quotes:none}[data-player] blockquote:after,[data-player] blockquote:before,[data-player] q:after,[data-player] q:before{content:"";content:none}[data-player] a img{border:none}[data-player]:focus{outline:0}[data-player] *{max-width:none;box-sizing:inherit;float:none}[data-player] div{display:block}[data-player].fullscreen{width:100%!important;height:100%!important;top:0;left:0}[data-player].nocursor{cursor:none}.clappr-style{display:none!important}',""])},function(t,e,i){var n=i(76);e=t.exports=i(7)(!1),e.push([t.i,'@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url('+n(i(162))+') format("truetype")}',""])},function(t,e){t.exports="<%=baseUrl%>/38861cba61c66739c1452c3a71e39852.ttf"},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(72),a=n(r),o=i(59),s=n(o),l=i(0),u=n(l),d=i(1),c=n(d),h=i(2),f=n(h),p=i(17),g=n(p),y=i(33),v=n(y),m=i(34),b=n(m),_=i(82),E=n(_),T=i(83),A=n(T),S=i(84),L=n(S),R=i(85),k=n(R),w=i(86),C=n(w),I=i(87),D=n(I),O=i(88),P=n(O),x=i(199),N=n(x),M=i(89),F=n(M),B=i(90),U=n(B),G=i(209),K=n(G),Y=i(91),j=n(Y),V=i(92),H=n(V),$=i(216),z=n($),W=i(93),q=n(W),X=i(223),Z=n(X),J=i(228),Q=n(J),tt=i(229),et=n(tt),it=i(230),nt=n(it),rt=function(t){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,u.default)(this,e);var a=(0,c.default)(this,t.call(this));return a.playerId=n,a.playbackPlugins=[],r||(a.playbackPlugins=[].concat((0,s.default)(a.playbackPlugins),[k.default])),a.playbackPlugins=[].concat((0,s.default)(a.playbackPlugins),[b.default,A.default]),r||(a.playbackPlugins=[].concat((0,s.default)(a.playbackPlugins),[E.default,L.default])),a.playbackPlugins=[].concat((0,s.default)(a.playbackPlugins),[C.default,D.default]),a.containerPlugins=[P.default,F.default,U.default,N.default,K.default,j.default],a.corePlugins=[H.default,z.default,q.default,Z.default,Q.default,et.default,nt.default],Array.isArray(i)||a.validateExternalPluginsType(i),a.addExternalPlugins(i),a}return(0,f.default)(e,t),e.prototype.groupPluginsByType=function(t){return Array.isArray(t)&&(t=t.reduce(function(t,e){return t[e.type]||(t[e.type]=[]),t[e.type].push(e),t},{})),t},e.prototype.removeDups=function(t){var e=function(t,e){return t[e.prototype.name]&&delete t[e.prototype.name],t[e.prototype.name]=e,t},i=t.reduceRight(e,(0,a.default)(null)),n=[];for(var r in i)n.unshift(i[r]);return n},e.prototype.addExternalPlugins=function(t){t=this.groupPluginsByType(t),t.playback&&(this.playbackPlugins=this.removeDups(t.playback.concat(this.playbackPlugins))),t.container&&(this.containerPlugins=this.removeDups(t.container.concat(this.containerPlugins))),t.core&&(this.corePlugins=this.removeDups(t.core.concat(this.corePlugins))),v.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},e.prototype.validateExternalPluginsType=function(t){["playback","container","core"].forEach(function(e){(t[e]||[]).forEach(function(t){var i="external "+t.type+" plugin on "+e+" array";if(t.type!==e)throw new ReferenceError(i)})})},e}(g.default);e.default=rt,t.exports=e.default},function(t,e,i){i(66),i(165),t.exports=i(11).Array.from},function(t,e,i){"use strict";var n=i(46),r=i(19),a=i(39),o=i(166),s=i(167),l=i(62),u=i(168),d=i(169);r(r.S+r.F*!i(171)(function(t){Array.from(t)}),"Array",{from:function(t){var e,i,r,c,h=a(t),f="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,y=void 0!==g,v=0,m=d(h);if(y&&(g=n(g,p>2?arguments[2]:void 0,2)),void 0==m||f==Array&&s(m))for(e=l(h.length),i=new f(e);e>v;v++)u(i,v,y?g(h[v],v):h[v]);else for(c=m.call(h),i=new f;!(r=c.next()).done;v++)u(i,v,y?o(c,g,[r.value,v],!0):r.value);return i.length=v,i}})},function(t,e,i){var n=i(23);t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(e){var a=t.return;throw void 0!==a&&n(a.call(t)),e}}},function(t,e,i){var n=i(29),r=i(12)("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||a[r]===t)}},function(t,e,i){"use strict";var n=i(16),r=i(28);t.exports=function(t,e,i){e in t?n.f(t,e,r(0,i)):t[e]=i}},function(t,e,i){var n=i(170),r=i(12)("iterator"),a=i(29);t.exports=i(11).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||a[n(t)]}},function(t,e,i){var n=i(41),r=i(12)("toStringTag"),a="Arguments"==n(function(){return arguments}()),o=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,i,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=o(e=Object(t),r))?i:a?n(e):"Object"==(s=n(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,i){var n=i(12)("iterator"),r=!1;try{var a=[7][n]();a.return=function(){r=!0},Array.from(a,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var i=!1;try{var a=[7],o=a[n]();o.next=function(){return{done:i=!0}},a[n]=function(){return o},t(a)}catch(t){}return i}},function(t,e,i){"use strict";(function(n){function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(81),o=r(a),s=i(0),l=r(s),u=i(1),d=r(u),c=i(3),h=r(c),f=i(2),p=r(f),g=i(59),y=r(g),v=i(38),m=r(v),b=i(5),_=i(9),E=r(_),T=i(13),A=r(T),S=i(4),L=r(S),R=i(6),k=r(R),w=i(8),C=r(w),I=i(173),D=r(I);i(174);var O={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map(function(t){return'video/mp4; codecs="'+t+', mp4a.40.2"'}),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};O.ogv=O.ogg,O["3gp"]=O["3gpp"];var P={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},x=(0,m.default)(P).reduce(function(t,e){return[].concat((0,y.default)(t),(0,y.default)(P[e]))},[]),N=function(t){function e(){(0,l.default)(this,e);for(var i=arguments.length,r=Array(i),a=0;a<i;a++)r[a]=arguments[a];var o=(0,d.default)(this,t.call.apply(t,[this].concat(r)));o._destroyed=!1,o._loadStarted=!1,o._isBuffering=!1,o._playheadMoving=!1,o._playheadMovingTimer=null,o._stopped=!1,o._ccTrackId=-1,o._setupSrc(o.options.src),o.options.playback||(o.options.playback=o.options||{}),o.options.playback.disableContextMenu=o.options.playback.disableContextMenu||o.options.disableVideoTagContextMenu;var s=o.options.playback,u=s.preload||(A.default.isSafari?"auto":o.options.preload),c=void 0;return o.options.poster&&("string"==typeof o.options.poster?c=o.options.poster:"string"==typeof o.options.poster.url&&(c=o.options.poster.url)),k.default.extend(o.el,{muted:o.options.mute,defaultMuted:o.options.mute,loop:o.options.loop,poster:c,preload:u||"metadata",controls:(s.controls||o.options.useVideoTagDefaultControls)&&"controls",crossOrigin:s.crossOrigin,"x-webkit-playsinline":s.playInline}),s.playInline&&o.$el.attr({playsinline:"playsinline"}),s.crossOrigin&&o.$el.attr({crossorigin:s.crossOrigin}),o.settings={default:["seekbar"]},o.settings.left=["playpause","position","duration"],o.settings.right=["fullscreen","volume","hd-indicator"],s.externalTracks&&o._setupExternalTracks(s.externalTracks),o.options.autoPlay&&n.nextTick(function(){return!o._destroyed&&o.play()}),o}return(0,p.default)(e,t),(0,h.default)(e,[{key:"name",get:function(){return"html5_video"}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var t=this.options.src,i=e._mimeTypesForUrl(t,P,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||x.indexOf(i[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeking:"_onSeeking",seeked:"_onSeeked",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return this._isBuffering}}]),e.prototype._setupExternalTracks=function(t){this._externalTracks=t.map(function(t){return{kind:t.kind||"subtitles",label:t.label,lang:t.lang,src:t.src}})},e.prototype._setupSrc=function(t){this.el.src!==t&&(this._ccIsSetup=!1,this.el.src=t,this._src=this.el.src)},e.prototype._onLoadedMetadata=function(t){this._handleBufferingEvents(),this.trigger(L.default.PLAYBACK_LOADEDMETADATA,{duration:t.target.duration,data:t}),this._updateSettings();var e=void 0===this._options.autoSeekFromUrl||this._options.autoSeekFromUrl;this.getPlaybackType()!==E.default.LIVE&&e&&this._checkInitialSeek()},e.prototype._onDurationChange=function(){this._updateSettings(),this._onTimeUpdate(),this._onProgress()},e.prototype._updateSettings=function(){this.getPlaybackType()===E.default.VOD||this.getPlaybackType()===E.default.AOD?this.settings.left=["playpause","position","duration"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(L.default.PLAYBACK_SETTINGSUPDATE)},e.prototype.isSeekEnabled=function(){return isFinite(this.getDuration())},e.prototype.getPlaybackType=function(){var t="audio"===this.tagName?E.default.AOD:E.default.VOD;return[0,void 0,1/0].indexOf(this.el.duration)>=0?E.default.LIVE:t},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype.consent=function(){!this.isPlaying()&&this.el.load()},e.prototype.play=function(){this.trigger(L.default.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents();var t=this.el.play();t&&t.catch&&t.catch(function(){})},e.prototype.pause=function(){this.el.pause()},e.prototype.stop=function(){this.pause(),this._stopped=!0,this.el.removeAttribute("src"),this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(L.default.PLAYBACK_STOP)},e.prototype.volume=function(t){0===t?(this.$el.attr({muted:"true"}),this.el.muted=!0):(this.$el.attr({muted:null}),this.el.muted=!1),this.el.volume=t/100},e.prototype.mute=function(){this.el.muted=!0},e.prototype.unmute=function(){this.el.muted=!1},e.prototype.isMuted=function(){return!!this.el.volume},e.prototype.isPlaying=function(){return!this.el.paused&&!this.el.ended},e.prototype._startPlayheadMovingChecks=function(){null===this._playheadMovingTimer&&(this._playheadMovingTimeOnCheck=null,this._determineIfPlayheadMoving(),this._playheadMovingTimer=setInterval(this._determineIfPlayheadMoving.bind(this),500))},e.prototype._stopPlayheadMovingChecks=function(){null!==this._playheadMovingTimer&&(clearInterval(this._playheadMovingTimer),this._playheadMovingTimer=null,this._playheadMoving=!1)},e.prototype._determineIfPlayheadMoving=function(){var t=this._playheadMovingTimeOnCheck,e=this.el.currentTime;this._playheadMoving=t!==e,this._playheadMovingTimeOnCheck=e,this._handleBufferingEvents()},e.prototype._onWaiting=function(){this._loadStarted=!0,this._handleBufferingEvents()},e.prototype._onLoadedData=function(){this._loadStarted=!0,this._handleBufferingEvents()},e.prototype._onCanPlay=function(){this._handleBufferingEvents()},e.prototype._onPlaying=function(){this._checkForClosedCaptions(),this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(L.default.PLAYBACK_PLAY)},e.prototype._onPause=function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(L.default.PLAYBACK_PAUSE)},e.prototype._onSeeking=function(){this._handleBufferingEvents(),this.trigger(L.default.PLAYBACK_SEEK)},e.prototype._onSeeked=function(){this._handleBufferingEvents(),this.trigger(L.default.PLAYBACK_SEEKED)},e.prototype._onEnded=function(){this._handleBufferingEvents(),this.trigger(L.default.PLAYBACK_ENDED,this.name)},e.prototype._handleBufferingEvents=function(){var t=!this.el.ended&&!this.el.paused,e=this._loadStarted&&!this.el.ended&&!this._stopped&&(t&&!this._playheadMoving||this.el.readyState<this.el.HAVE_FUTURE_DATA);this._isBuffering!==e&&(this._isBuffering=e,e?this.trigger(L.default.PLAYBACK_BUFFERING,this.name):this.trigger(L.default.PLAYBACK_BUFFERFULL,this.name))},e.prototype._onError=function(){this.trigger(L.default.PLAYBACK_ERROR,this.el.error,this.name)},e.prototype.destroy=function(){this._destroyed=!0,this.handleTextTrackChange&&this.el.textTracks.removeEventListener("change",this.handleTextTrackChange),this.$el.remove(),delete this.el.src,this._src=null,b.DomRecycler.garbage(this.$el)},e.prototype.seek=function(t){this.el.currentTime=t},e.prototype.seekPercentage=function(t){var e=this.el.duration*(t/100);this.seek(e)},e.prototype._checkInitialSeek=function(){var t=(0,b.seekStringToSeconds)();0!==t&&this.seek(t)},e.prototype.getCurrentTime=function(){return this.el.currentTime},e.prototype.getDuration=function(){return this.el.duration},e.prototype._onTimeUpdate=function(){this.getPlaybackType()===E.default.LIVE?this.trigger(L.default.PLAYBACK_TIMEUPDATE,{current:1,total:1},this.name):this.trigger(L.default.PLAYBACK_TIMEUPDATE,{current:this.el.currentTime,total:this.el.duration},this.name)},e.prototype._onProgress=function(){if(this.el.buffered.length){for(var t=[],e=0,i=0;i<this.el.buffered.length;i++)t=[].concat((0,y.default)(t),[{start:this.el.buffered.start(i),end:this.el.buffered.end(i)}]),this.el.currentTime>=t[i].start&&this.el.currentTime<=t[i].end&&(e=i);var n={start:t[e].start,current:t[e].end,total:this.el.duration};this.trigger(L.default.PLAYBACK_PROGRESS,n,t)}},e.prototype._typeFor=function(t){var i=e._mimeTypesForUrl(t,O,this.options.mimeType);return 0===i.length&&(i=e._mimeTypesForUrl(t,P,this.options.mimeType)),(i[0]||"").split(";")[0]},e.prototype._ready=function(){this._isReadyState||(this._isReadyState=!0,this.trigger(L.default.PLAYBACK_READY,this.name))},e.prototype._checkForClosedCaptions=function(){if(this.isHTML5Video&&!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(L.default.PLAYBACK_SUBTITLE_AVAILABLE);var t=this.closedCaptionsTrackId;this.closedCaptionsTrackId=t,this.handleTextTrackChange=this._handleTextTrackChange.bind(this),this.el.textTracks.addEventListener("change",this.handleTextTrackChange)}this._ccIsSetup=!0}},e.prototype._handleTextTrackChange=function(){var t=this.closedCaptionsTracks,e=t.find(function(t){return"showing"===t.track.mode})||{id:-1};this._ccTrackId!==e.id&&(this._ccTrackId=e.id,this.trigger(L.default.PLAYBACK_SUBTITLE_CHANGED,{id:e.id}))},e.prototype.render=function(){return this.options.playback.disableContextMenu&&this.$el.on("contextmenu",function(){return!1}),this._externalTracks&&this._externalTracks.length>0&&this.$el.html(this.template({tracks:this._externalTracks})),this._ready(),this},(0,h.default)(e,[{key:"isReady",get:function(){return this._isReadyState}},{key:"isHTML5Video",get:function(){return this.name===e.prototype.name}},{key:"closedCaptionsTracks",get:function(){var t=0,e=function(){return t++};return(this.el.textTracks?(0,o.default)(this.el.textTracks):[]).filter(function(t){return"subtitles"===t.kind||"captions"===t.kind}).map(function(t){return{id:e(),name:t.label,track:t}})}},{key:"closedCaptionsTrackId",get:function(){return this._ccTrackId},set:function(t){if((0,b.isNumber)(t)){var e=this.closedCaptionsTracks,i=void 0;if(-1!==t){if(!(i=e.find(function(e){return e.id===t})))return;if("showing"===i.track.mode)return}e.filter(function(t){return"hidden"!==t.track.mode}).forEach(function(t){return t.track.mode="hidden"}),i&&(i.track.mode="showing"),this._ccTrackId=t,this.trigger(L.default.PLAYBACK_SUBTITLE_CHANGED,{id:t})}}},{key:"template",get:function(){return(0,C.default)(D.default)}}]),e}(E.default);e.default=N,N._mimeTypesForUrl=function(t,e,i){var n=(t.split("?")[0].match(/.*\.(.*)$/)||[])[1],r=i||n&&e[n.toLowerCase()]||[];return r.constructor===Array?r:[r]},N._canPlay=function(t,e,i,n){var r=N._mimeTypesForUrl(i,e,n),a=document.createElement(t);return!!r.filter(function(t){return!!a.canPlayType(t).replace(/no/,"")})[0]},N.canPlay=function(t,e){return N._canPlay("audio",P,t,e)||N._canPlay("video",O,t,e)},t.exports=e.default}).call(e,i(57))},function(t,e){t.exports='<% for (var i = 0; i < tracks.length; i++) { %>\n  <track data-html5-video-track="<%= i %>" kind="<%= tracks[i].kind %>" label="<%= tracks[i].label %>" srclang="<%= tracks[i].lang %>" src="<%= tracks[i].src %>" />\n<% }; %>\n'},function(t,e,i){var n=i(175);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,"[data-html5-video]{position:absolute;height:100%;width:100%;display:block}",""])},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(5),f=i(60),p=n(f),g=i(13),y=n(g),v=i(24),m=n(v),b=i(8),_=n(b),E=i(6),T=n(E),A=i(4),S=n(A),L=i(9),R=n(L),k=i(181),w=n(k),C=function(t){function e(){(0,a.default)(this,e);for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];var o=(0,s.default)(this,t.call.apply(t,[this].concat(n)));return o._src=o.options.src,o._baseUrl=o.options.baseUrl,o._autoPlay=o.options.autoPlay,o.settings={default:["seekbar"]},o.settings.left=["playpause","position","duration"],o.settings.right=["fullscreen","volume"],o.settings.seekEnabled=!0,o._isReadyState=!1,o._addListeners(),o}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"flash"}},{key:"swfPath",get:function(){return(0,_.default)(w.default)({baseUrl:this._baseUrl})}},{key:"ended",get:function(){return"ENDED"===this._currentState}},{key:"buffering",get:function(){return!!this._bufferingState&&"ENDED"!==this._currentState}}]),e.prototype._bootstrap=function(){var t=this;this.el.playerPlay?(this.el.width="100%",this.el.height="100%","PLAYING"===this._currentState?this._firstPlay():(this._currentState="IDLE",this._autoPlay&&this.play()),(0,T.default)('<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" />').insertAfter(this.$el),this.getDuration()>0?this._metadataLoaded():m.default.once(this.uniqueId+":timeupdate",this._metadataLoaded,this)):(this._attempts=this._attempts||0,++this._attempts<=60?setTimeout(function(){return t._bootstrap()},50):this.trigger(S.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},e.prototype._metadataLoaded=function(){this._isReadyState=!0,this.trigger(S.default.PLAYBACK_READY,this.name),this.trigger(S.default.PLAYBACK_SETTINGSUPDATE,this.name)},e.prototype.getPlaybackType=function(){return R.default.VOD},e.prototype.isHighDefinitionInUse=function(){return!1},e.prototype._updateTime=function(){this.trigger(S.default.PLAYBACK_TIMEUPDATE,{current:this.el.getPosition(),total:this.el.getDuration()},this.name)},e.prototype._addListeners=function(){m.default.on(this.uniqueId+":progress",this._progress,this),m.default.on(this.uniqueId+":timeupdate",this._updateTime,this),m.default.on(this.uniqueId+":statechanged",this._checkState,this),m.default.on(this.uniqueId+":flashready",this._bootstrap,this)},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),m.default.off(this.uniqueId+":progress"),m.default.off(this.uniqueId+":timeupdate"),m.default.off(this.uniqueId+":statechanged"),m.default.off(this.uniqueId+":flashready")},e.prototype._checkState=function(){this._isIdle||"PAUSED"===this._currentState||("PLAYING_BUFFERING"!==this._currentState&&"PLAYING_BUFFERING"===this.el.getState()?(this._bufferingState=!0,this.trigger(S.default.PLAYBACK_BUFFERING,this.name),this._currentState="PLAYING_BUFFERING"):"PLAYING"===this.el.getState()?(this._bufferingState=!1,this.trigger(S.default.PLAYBACK_BUFFERFULL,this.name),this._currentState="PLAYING"):"IDLE"===this.el.getState()?this._currentState="IDLE":"ENDED"===this.el.getState()&&(this.trigger(S.default.PLAYBACK_ENDED,this.name),this.trigger(S.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.el.getDuration()},this.name),this._currentState="ENDED",this._isIdle=!0))},e.prototype._progress=function(){"IDLE"!==this._currentState&&"ENDED"!==this._currentState&&this.trigger(S.default.PLAYBACK_PROGRESS,{start:0,current:this.el.getBytesLoaded(),total:this.el.getBytesTotal()})},e.prototype._firstPlay=function(){var t=this;this.el.playerPlay?(this._isIdle=!1,this.el.playerPlay(this._src),this.listenToOnce(this,S.default.PLAYBACK_BUFFERFULL,function(){return t._checkInitialSeek()}),this._currentState="PLAYING"):this.listenToOnce(this,S.default.PLAYBACK_READY,this._firstPlay)},e.prototype._checkInitialSeek=function(){var t=(0,h.seekStringToSeconds)(window.location.href);0!==t&&this.seekSeconds(t)},e.prototype.play=function(){this.trigger(S.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState||"PLAYING_BUFFERING"===this._currentState?(this._currentState="PLAYING",this.el.playerResume(),this.trigger(S.default.PLAYBACK_PLAY,this.name)):"PLAYING"!==this._currentState&&(this._firstPlay(),this.trigger(S.default.PLAYBACK_PLAY,this.name))},e.prototype.volume=function(t){var e=this;this.isReady?this.el.playerVolume(t):this.listenToOnce(this,S.default.PLAYBACK_BUFFERFULL,function(){return e.volume(t)})},e.prototype.pause=function(){this._currentState="PAUSED",this.el.playerPause(),this.trigger(S.default.PLAYBACK_PAUSE,this.name)},e.prototype.stop=function(){this.el.playerStop(),this.trigger(S.default.PLAYBACK_STOP),this.trigger(S.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},e.prototype.isPlaying=function(){return!!(this.isReady&&this._currentState.indexOf("PLAYING")>-1)},e.prototype.getDuration=function(){return this.el.getDuration()},e.prototype.seekPercentage=function(t){var e=this;if(this.el.getDuration()>0){var i=this.el.getDuration()*(t/100);this.seek(i)}else this.listenToOnce(this,S.default.PLAYBACK_BUFFERFULL,function(){return e.seekPercentage(t)})},e.prototype.seek=function(t){var e=this;this.isReady&&this.el.playerSeek?(this.el.playerSeek(t),this.trigger(S.default.PLAYBACK_TIMEUPDATE,{current:t,total:this.el.getDuration()},this.name),"PAUSED"===this._currentState&&this.el.playerPause()):this.listenToOnce(this,S.default.PLAYBACK_BUFFERFULL,function(){return e.seek(t)})},e.prototype.destroy=function(){clearInterval(this.bootstrapId),t.prototype.stopListening.call(this),this.$el.remove()},(0,u.default)(e,[{key:"isReady",get:function(){return this._isReadyState}}]),e}(p.default);e.default=C,C.canPlay=function(t){if(y.default.hasFlash&&t&&t.constructor===String){var e=t.split("?")[0].match(/.*\.(.*)$/)||[];return e.length>1&&!y.default.isMobile&&e[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/)}return!1},t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(3),s=n(o),l=i(1),u=n(l),d=i(2),c=n(d),h=i(9),f=n(h),p=i(8),g=n(p),y=i(13),v=n(y),m=i(178),b=n(m);i(179);var _=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,t.apply(this,arguments))}return(0,c.default)(e,t),e.prototype.setElement=function(t){this.$el=t,this.el=t[0]},e.prototype.render=function(){return this.$el.attr("data",this.swfPath),this.$el.html(this.template({cid:this.cid,swfPath:this.swfPath,baseUrl:this.baseUrl,playbackId:this.uniqueId,wmode:this.wmode,callbackName:"window.Clappr.flashlsCallbacks."+this.cid})),v.default.isIE&&(this.$("embed").remove(),v.default.isLegacyIE&&this.$el.attr("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")),this.el.id=this.cid,this},(0,s.default)(e,[{key:"tagName",get:function(){return"object"}},{key:"swfPath",get:function(){return""}},{key:"wmode",get:function(){return"transparent"}},{key:"template",get:function(){return(0,g.default)(b.default)}},{key:"attributes",get:function(){var t="application/x-shockwave-flash";return v.default.isLegacyIE&&(t=""),{class:"clappr-flash-playback",type:t,width:"100%",height:"100%",data:this.swfPath,"data-flash-playback":this.name}}}]),e}(f.default);e.default=_,t.exports=e.default},function(t,e){t.exports='<param name="movie" value="<%= swfPath %>">\n<param name="quality" value="autohigh">\n<param name="swliveconnect" value="true">\n<param name="allowScriptAccess" value="always">\n<param name="bgcolor" value="#000000">\n<param name="allowFullScreen" value="false">\n<param name="wmode" value="<%= wmode %>">\n<param name="tabindex" value="1">\n<param name="FlashVars" value="playbackId=<%= playbackId %>&callback=<%= callbackName %>">\n<embed\n  name="<%= cid %>"\n  type="application/x-shockwave-flash"\n  disabled="disabled"\n  tabindex="-1"\n  enablecontextmenu="false"\n  allowScriptAccess="always"\n  quality="autohigh"\n  pluginspage="http://www.macromedia.com/go/getflashplayer"\n  wmode="<%= wmode %>"\n  swliveconnect="true"\n  allowfullscreen="false"\n  bgcolor="#000000"\n  FlashVars="playbackId=<%= playbackId %>&callback=<%= callbackName %>"\n  data="<%= swfPath %>"\n  src="<%= swfPath %>"\n  width="100%"\n  height="100%">\n</embed>\n'},function(t,e,i){var n=i(180);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,".clappr-flash-playback[data-flash-playback]{display:block;position:absolute;top:0;left:0;height:100%;width:100%;pointer-events:none}",""])},function(t,e){t.exports="<%=baseUrl%>/4b76590b32dab62bc95c1b7951efae78.swf"},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(3),s=n(o),l=i(1),u=n(l),d=i(2),c=n(d),h=i(4),f=n(h),p=i(9),g=n(p),y=i(34),v=n(y),m=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,t.apply(this,arguments))}return(0,c.default)(e,t),e.prototype.updateSettings=function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(f.default.PLAYBACK_SETTINGSUPDATE)},e.prototype.getPlaybackType=function(){return g.default.AOD},(0,s.default)(e,[{key:"name",get:function(){return"html5_audio"}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}}]),e}(v.default);e.default=m,m.canPlay=function(t,e){var i={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]};return v.default._canPlay("audio",i,t,e)},t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(60),f=n(h),p=i(4),g=n(p),y=i(8),v=n(y),m=i(9),b=n(m),_=i(24),E=n(_),T=i(13),A=n(T),S=i(184),L=n(S),R=i(185),k=n(R),w=i(6),C=n(w),I=function(t){function e(){(0,a.default)(this,e);for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];var o=(0,s.default)(this,t.call.apply(t,[this].concat(n)));return o._src=o.options.src,o._baseUrl=o.options.baseUrl,o._initHlsParameters(o.options),o.highDefinition=!1,o._autoPlay=o.options.autoPlay,o._loop=o.options.loop,o._defaultSettings={left:["playstop"],default:["seekbar"],right:["fullscreen","volume","hd-indicator"],seekEnabled:!1},o.settings=C.default.extend({},o._defaultSettings),o._playbackType=b.default.LIVE,o._hasEnded=!1,o._addListeners(),o}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"flashls"}},{key:"swfPath",get:function(){return(0,v.default)(k.default)({baseUrl:this._baseUrl})}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(g.default.PLAYBACK_LEVEL_SWITCH_START),this.el.playerSetCurrentLevel(t)}},{key:"ended",get:function(){return this._hasEnded}},{key:"buffering",get:function(){return!!this._bufferingState&&!this._hasEnded}}]),e.prototype._initHlsParameters=function(t){this._autoStartLoad=void 0===t.autoStartLoad||t.autoStartLoad,this._capLevelToStage=void 0!==t.capLevelToStage&&t.capLevelToStage,this._maxLevelCappingMode=void 0===t.maxLevelCappingMode?"downscale":t.maxLevelCappingMode,this._minBufferLength=void 0===t.minBufferLength?-1:t.minBufferLength,this._minBufferLengthCapping=void 0===t.minBufferLengthCapping?-1:t.minBufferLengthCapping,this._maxBufferLength=void 0===t.maxBufferLength?120:t.maxBufferLength,this._maxBackBufferLength=void 0===t.maxBackBufferLength?30:t.maxBackBufferLength,this._lowBufferLength=void 0===t.lowBufferLength?3:t.lowBufferLength,this._mediaTimePeriod=void 0===t.mediaTimePeriod?100:t.mediaTimePeriod,this._fpsDroppedMonitoringPeriod=void 0===t.fpsDroppedMonitoringPeriod?5e3:t.fpsDroppedMonitoringPeriod,this._fpsDroppedMonitoringThreshold=void 0===t.fpsDroppedMonitoringThreshold?.2:t.fpsDroppedMonitoringThreshold,this._capLevelonFPSDrop=void 0!==t.capLevelonFPSDrop&&t.capLevelonFPSDrop,this._smoothAutoSwitchonFPSDrop=void 0===t.smoothAutoSwitchonFPSDrop?this.capLevelonFPSDrop:t.smoothAutoSwitchonFPSDrop,this._switchDownOnLevelError=void 0===t.switchDownOnLevelError||t.switchDownOnLevelError,this._seekMode=void 0===t.seekMode?"ACCURATE":t.seekMode,this._keyLoadMaxRetry=void 0===t.keyLoadMaxRetry?3:t.keyLoadMaxRetry,this._keyLoadMaxRetryTimeout=void 0===t.keyLoadMaxRetryTimeout?64e3:t.keyLoadMaxRetryTimeout,this._fragmentLoadMaxRetry=void 0===t.fragmentLoadMaxRetry?3:t.fragmentLoadMaxRetry,this._fragmentLoadMaxRetryTimeout=void 0===t.fragmentLoadMaxRetryTimeout?4e3:t.fragmentLoadMaxRetryTimeout,this._fragmentLoadSkipAfterMaxRetry=void 0===t.fragmentLoadSkipAfterMaxRetry||t.fragmentLoadSkipAfterMaxRetry,this._maxSkippedFragments=void 0===t.maxSkippedFragments?5:t.maxSkippedFragments,this._flushLiveURLCache=void 0!==t.flushLiveURLCache&&t.flushLiveURLCache,this._initialLiveManifestSize=void 0===t.initialLiveManifestSize?1:t.initialLiveManifestSize,this._manifestLoadMaxRetry=void 0===t.manifestLoadMaxRetry?3:t.manifestLoadMaxRetry,this._manifestLoadMaxRetryTimeout=void 0===t.manifestLoadMaxRetryTimeout?64e3:t.manifestLoadMaxRetryTimeout,this._manifestRedundantLoadmaxRetry=void 0===t.manifestRedundantLoadmaxRetry?3:t.manifestRedundantLoadmaxRetry,this._startFromBitrate=void 0===t.startFromBitrate?-1:t.startFromBitrate,this._startFromLevel=void 0===t.startFromLevel?-1:t.startFromLevel,this._autoStartMaxDuration=void 0===t.autoStartMaxDuration?-1:t.autoStartMaxDuration,this._seekFromLevel=void 0===t.seekFromLevel?-1:t.seekFromLevel,this._useHardwareVideoDecoder=void 0!==t.useHardwareVideoDecoder&&t.useHardwareVideoDecoder,this._hlsLogEnabled=void 0===t.hlsLogEnabled||t.hlsLogEnabled,this._logDebug=void 0!==t.logDebug&&t.logDebug,this._logDebug2=void 0!==t.logDebug2&&t.logDebug2,this._logWarn=void 0===t.logWarn||t.logWarn,this._logError=void 0===t.logError||t.logError,this._hlsMinimumDvrSize=void 0===t.hlsMinimumDvrSize?60:t.hlsMinimumDvrSize},e.prototype._addListeners=function(){var t=this;E.default.on(this.cid+":flashready",function(){return t._bootstrap()}),E.default.on(this.cid+":timeupdate",function(e){return t._updateTime(e)}),E.default.on(this.cid+":playbackstate",function(e){return t._setPlaybackState(e)}),E.default.on(this.cid+":levelchanged",function(e){return t._levelChanged(e)}),E.default.on(this.cid+":error",function(e,i,n){return t._flashPlaybackError(e,i,n)}),E.default.on(this.cid+":fragmentloaded",function(e){return t._onFragmentLoaded(e)}),E.default.on(this.cid+":levelendlist",function(e){return t._onLevelEndlist(e)})},e.prototype.stopListening=function(){t.prototype.stopListening.call(this),E.default.off(this.cid+":flashready"),E.default.off(this.cid+":timeupdate"),E.default.off(this.cid+":playbackstate"),E.default.off(this.cid+":levelchanged"),E.default.off(this.cid+":playbackerror"),E.default.off(this.cid+":fragmentloaded"),E.default.off(this.cid+":manifestloaded"),E.default.off(this.cid+":levelendlist")},e.prototype._bootstrap=function(){var t=this;this.el.playerLoad?(this.el.width="100%",this.el.height="100%",this._isReadyState=!0,this._srcLoaded=!1,this._currentState="IDLE",this._setFlashSettings(),this._updatePlaybackType(),(this._autoPlay||this._shouldPlayOnManifestLoaded)&&this.play(),this.trigger(g.default.PLAYBACK_READY,this.name)):(this._bootstrapAttempts=this._bootstrapAttempts||0,++this._bootstrapAttempts<=60?setTimeout(function(){return t._bootstrap()},50):this.trigger(g.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},e.prototype._setFlashSettings=function(){this.el.playerSetAutoStartLoad(this._autoStartLoad),this.el.playerSetCapLevelToStage(this._capLevelToStage),this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode),this.el.playerSetMinBufferLength(this._minBufferLength),this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping),this.el.playerSetMaxBufferLength(this._maxBufferLength),this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength),this.el.playerSetLowBufferLength(this._lowBufferLength),this.el.playerSetMediaTimePeriod(this._mediaTimePeriod),this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod),this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold),this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop),this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop),this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError),this.el.playerSetSeekMode(this._seekMode),this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry),this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout),this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry),this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout),this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry),this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments),this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache),this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize),this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry),this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout),this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry),this.el.playerSetStartFromBitrate(this._startFromBitrate),this.el.playerSetStartFromLevel(this._startFromLevel),this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration),this.el.playerSetSeekFromLevel(this._seekFromLevel),this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder),this.el.playerSetLogInfo(this._hlsLogEnabled),this.el.playerSetLogDebug(this._logDebug),this.el.playerSetLogDebug2(this._logDebug2),this.el.playerSetLogWarn(this._logWarn),this.el.playerSetLogError(this._logError)},e.prototype.setAutoStartLoad=function(t){this._autoStartLoad=t,this.el.playerSetAutoStartLoad(this._autoStartLoad)},e.prototype.setCapLevelToStage=function(t){this._capLevelToStage=t,this.el.playerSetCapLevelToStage(this._capLevelToStage)},e.prototype.setMaxLevelCappingMode=function(t){this._maxLevelCappingMode=t,this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode)},e.prototype.setSetMinBufferLength=function(t){this._minBufferLength=t,this.el.playerSetMinBufferLength(this._minBufferLength)},e.prototype.setMinBufferLengthCapping=function(t){this._minBufferLengthCapping=t,this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping)},e.prototype.setMaxBufferLength=function(t){this._maxBufferLength=t,this.el.playerSetMaxBufferLength(this._maxBufferLength)},e.prototype.setMaxBackBufferLength=function(t){this._maxBackBufferLength=t,this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength)},e.prototype.setLowBufferLength=function(t){this._lowBufferLength=t,this.el.playerSetLowBufferLength(this._lowBufferLength)},e.prototype.setMediaTimePeriod=function(t){this._mediaTimePeriod=t,this.el.playerSetMediaTimePeriod(this._mediaTimePeriod)},e.prototype.setFpsDroppedMonitoringPeriod=function(t){this._fpsDroppedMonitoringPeriod=t,this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod)},e.prototype.setFpsDroppedMonitoringThreshold=function(t){this._fpsDroppedMonitoringThreshold=t,this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold)},e.prototype.setCapLevelonFPSDrop=function(t){this._capLevelonFPSDrop=t,this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop)},e.prototype.setSmoothAutoSwitchonFPSDrop=function(t){this._smoothAutoSwitchonFPSDrop=t,this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop)},e.prototype.setSwitchDownOnLevelError=function(t){this._switchDownOnLevelError=t,this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError)},e.prototype.setSeekMode=function(t){this._seekMode=t,this.el.playerSetSeekMode(this._seekMode)},e.prototype.setKeyLoadMaxRetry=function(t){this._keyLoadMaxRetry=t,this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry)},e.prototype.setKeyLoadMaxRetryTimeout=function(t){this._keyLoadMaxRetryTimeout=t,this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout)},e.prototype.setFragmentLoadMaxRetry=function(t){this._fragmentLoadMaxRetry=t,this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry)},e.prototype.setFragmentLoadMaxRetryTimeout=function(t){this._fragmentLoadMaxRetryTimeout=t,this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout)},e.prototype.setFragmentLoadSkipAfterMaxRetry=function(t){this._fragmentLoadSkipAfterMaxRetry=t,this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry)},e.prototype.setMaxSkippedFragments=function(t){this._maxSkippedFragments=t,this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments)},e.prototype.setFlushLiveURLCache=function(t){this._flushLiveURLCache=t,this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache)},e.prototype.setInitialLiveManifestSize=function(t){this._initialLiveManifestSize=t,this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize)},e.prototype.setManifestLoadMaxRetry=function(t){this._manifestLoadMaxRetry=t,this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry)},e.prototype.setManifestLoadMaxRetryTimeout=function(t){this._manifestLoadMaxRetryTimeout=t,this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout)},e.prototype.setManifestRedundantLoadmaxRetry=function(t){this._manifestRedundantLoadmaxRetry=t,this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry)},e.prototype.setStartFromBitrate=function(t){this._startFromBitrate=t,this.el.playerSetStartFromBitrate(this._startFromBitrate)},e.prototype.setStartFromLevel=function(t){this._startFromLevel=t,this.el.playerSetStartFromLevel(this._startFromLevel)},e.prototype.setAutoStartMaxDuration=function(t){this._autoStartMaxDuration=t,this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration)},e.prototype.setSeekFromLevel=function(t){this._seekFromLevel=t,this.el.playerSetSeekFromLevel(this._seekFromLevel)},e.prototype.setUseHardwareVideoDecoder=function(t){this._useHardwareVideoDecoder=t,this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder)},e.prototype.setSetLogInfo=function(t){this._hlsLogEnabled=t,this.el.playerSetLogInfo(this._hlsLogEnabled)},e.prototype.setLogDebug=function(t){this._logDebug=t,this.el.playerSetLogDebug(this._logDebug)},e.prototype.setLogDebug2=function(t){this._logDebug2=t,this.el.playerSetLogDebug2(this._logDebug2)},e.prototype.setLogWarn=function(t){this._logWarn=t,this.el.playerSetLogWarn(this._logWarn)},e.prototype.setLogError=function(t){this._logError=t,this.el.playerSetLogError(this._logError)},e.prototype._levelChanged=function(t){var e=this.el.getLevels()[t];e&&(this.highDefinition=e.height>=720||e.bitrate/1e3>=2e3,this.trigger(g.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this._levels&&0!==this._levels.length||this._fillLevels(),this.trigger(g.default.PLAYBACK_BITRATE,{height:e.height,width:e.width,bandwidth:e.bitrate,bitrate:e.bitrate,level:t}),this.trigger(g.default.PLAYBACK_LEVEL_SWITCH_END))},e.prototype._updateTime=function(t){if("IDLE"!==this._currentState){var e=this._normalizeDuration(t.duration),i=Math.min(Math.max(t.position,0),e),n=this._dvrEnabled,r=this._playbackType===b.default.LIVE;this._dvrEnabled=r&&e>this._hlsMinimumDvrSize,100!==e&&void 0!==r&&(this._dvrEnabled!==n&&(this._updateSettings(),this.trigger(g.default.PLAYBACK_SETTINGSUPDATE,this.name)),!r||this._dvrEnabled&&this._dvrInUse||(i=e),this.trigger(g.default.PLAYBACK_TIMEUPDATE,{current:i,total:e},this.name))}},e.prototype.play=function(){this.trigger(g.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState?this.el.playerResume():this._srcLoaded||"PLAYING"===this._currentState?this.el.playerPlay():this._firstPlay()},e.prototype.getPlaybackType=function(){return this._playbackType?this._playbackType:null},e.prototype.getCurrentTime=function(){return this.el.getPosition()},e.prototype.getCurrentLevelIndex=function(){return this._currentLevel},e.prototype.getCurrentLevel=function(){return this.levels[this.currentLevel]},e.prototype.getCurrentBitrate=function(){return this.levels[this.currentLevel].bitrate},e.prototype.setCurrentLevel=function(t){this.currentLevel=t},e.prototype.isHighDefinitionInUse=function(){return this.highDefinition},e.prototype.getLevels=function(){return this.levels},e.prototype._setPlaybackState=function(t){["PLAYING_BUFFERING","PAUSED_BUFFERING"].indexOf(t)>=0?(this._bufferingState=!0,this.trigger(g.default.PLAYBACK_BUFFERING,this.name),this._updateCurrentState(t)):["PLAYING","PAUSED"].indexOf(t)>=0?(["PLAYING_BUFFERING","PAUSED_BUFFERING","IDLE"].indexOf(this._currentState)>=0&&(this._bufferingState=!1,this.trigger(g.default.PLAYBACK_BUFFERFULL,this.name)),this._updateCurrentState(t)):"IDLE"===t&&(this._srcLoaded=!1,this._loop&&["PLAYING_BUFFERING","PLAYING"].indexOf(this._currentState)>=0?(this.play(),this.seek(0)):(this._updateCurrentState(t),this._hasEnded=!0,this.trigger(g.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.getDuration()},this.name),this.trigger(g.default.PLAYBACK_ENDED,this.name)))},e.prototype._updateCurrentState=function(t){this._currentState=t,"IDLE"!==t&&(this._hasEnded=!1),this._updatePlaybackType(),"PLAYING"===t?this.trigger(g.default.PLAYBACK_PLAY,this.name):"PAUSED"===t&&this.trigger(g.default.PLAYBACK_PAUSE,this.name)},e.prototype._updatePlaybackType=function(){this._playbackType=this.el.getType(),this._playbackType&&(this._playbackType=this._playbackType.toLowerCase(),this._playbackType===b.default.VOD?this._startReportingProgress():this._stopReportingProgress()),this.trigger(g.default.PLAYBACK_PLAYBACKSTATE,{type:this._playbackType})},e.prototype._startReportingProgress=function(){this._reportingProgress||(this._reportingProgress=!0)},e.prototype._stopReportingProgress=function(){this._reportingProgress=!1},e.prototype._onFragmentLoaded=function(t){if(this.trigger(g.default.PLAYBACK_FRAGMENT_LOADED,t),this._reportingProgress&&this.getCurrentTime()){var e=this.getCurrentTime()+this.el.getbufferLength();this.trigger(g.default.PLAYBACK_PROGRESS,{start:this.getCurrentTime(),current:e,total:this.el.getDuration()})}},e.prototype._onLevelEndlist=function(){this._updatePlaybackType()},e.prototype._firstPlay=function(){var t=this;this._shouldPlayOnManifestLoaded=!0,this.el.playerLoad&&(E.default.once(this.cid+":manifestloaded",function(e,i){return t._manifestLoaded(e,i)}),this._setFlashSettings(),this.el.playerLoad(this._src),this._srcLoaded=!0)},e.prototype.volume=function(t){var e=this;this.isReady?this.el.playerVolume(t):this.listenToOnce(this,g.default.PLAYBACK_BUFFERFULL,function(){return e.volume(t)})},e.prototype.pause=function(){(this._playbackType!==b.default.LIVE||this._dvrEnabled)&&(this.el.playerPause(),this._playbackType===b.default.LIVE&&this._dvrEnabled&&this._updateDvr(!0))},e.prototype.stop=function(){this._srcLoaded=!1,this.el.playerStop(),this.trigger(g.default.PLAYBACK_STOP),this.trigger(g.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},e.prototype.isPlaying=function(){return!!this._currentState&&!!this._currentState.match(/playing/i)},e.prototype.getDuration=function(){return this._normalizeDuration(this.el.getDuration())},e.prototype._normalizeDuration=function(t){return this._playbackType===b.default.LIVE&&(t=Math.max(0,t-10)),t},e.prototype.seekPercentage=function(t){var e=this.el.getDuration(),i=0;t>0&&(i=e*t/100),this.seek(i)},e.prototype.seek=function(t){var e=this.getDuration();if(this._playbackType===b.default.LIVE){var i=e-t>3;this._updateDvr(i)}this.el.playerSeek(t),this.trigger(g.default.PLAYBACK_TIMEUPDATE,{current:t,total:e},this.name)},e.prototype._updateDvr=function(t){var e=!!this._dvrInUse;this._dvrInUse=t,this._dvrInUse!==e&&(this._updateSettings(),this.trigger(g.default.PLAYBACK_DVR,this._dvrInUse),this.trigger(g.default.PLAYBACK_STATS_ADD,{dvr:this._dvrInUse}))},e.prototype._flashPlaybackError=function(t,e,i){this.trigger(g.default.PLAYBACK_ERROR,{code:t,url:e,message:i}),this.trigger(g.default.PLAYBACK_STOP)},e.prototype._manifestLoaded=function(t,e){this._shouldPlayOnManifestLoaded&&(this._shouldPlayOnManifestLoaded=!1,this.el.playerPlay()),this._fillLevels(),this.trigger(g.default.PLAYBACK_LOADEDMETADATA,{duration:t,data:e})},e.prototype._fillLevels=function(){var t=this.el.getLevels(),e=t.length;this._levels=[];for(var i=0;i<e;i++)this._levels.push({id:i,label:t[i].height+"p",level:t[i]});this.trigger(g.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},e.prototype.destroy=function(){this.stopListening(),this.$el.remove()},e.prototype._updateSettings=function(){this.settings=C.default.extend({},this._defaultSettings),this._playbackType===b.default.VOD||this._dvrInUse?(this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=!0):this._dvrEnabled?(this.settings.left=["playpause"],this.settings.seekEnabled=!0):this.settings.seekEnabled=!1},e.prototype._createCallbacks=function(){var t=this;window.Clappr||(window.Clappr={}),window.Clappr.flashlsCallbacks||(window.Clappr.flashlsCallbacks={}),this.flashlsEvents=new L.default(this.cid),window.Clappr.flashlsCallbacks[this.cid]=function(e,i){t.flashlsEvents[e].apply(t.flashlsEvents,i)}},e.prototype.render=function(){return t.prototype.render.call(this),this._createCallbacks(),this},(0,u.default)(e,[{key:"isReady",get:function(){return this._isReadyState}},{key:"dvrEnabled",get:function(){return!!this._dvrEnabled}}]),e}(f.default);e.default=I,I.canPlay=function(t,e){var i=t.split("?")[0].match(/.*\.(.*)$/)||[];return A.default.hasFlash&&(i.length>1&&"m3u8"===i[1].toLowerCase()||"application/x-mpegURL"===e||"application/vnd.apple.mpegurl"===e)},t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(24),s=n(o),l=function(){function t(e){(0,a.default)(this,t),this.instanceId=e}return t.prototype.ready=function(){s.default.trigger(this.instanceId+":flashready")},t.prototype.videoSize=function(t,e){s.default.trigger(this.instanceId+":videosizechanged",t,e)},t.prototype.complete=function(){s.default.trigger(this.instanceId+":complete")},t.prototype.error=function(t,e,i){s.default.trigger(this.instanceId+":error",t,e,i)},t.prototype.manifest=function(t,e){s.default.trigger(this.instanceId+":manifestloaded",t,e)},t.prototype.audioLevelLoaded=function(t){s.default.trigger(this.instanceId+":audiolevelloaded",t)},t.prototype.levelLoaded=function(t){s.default.trigger(this.instanceId+":levelloaded",t)},t.prototype.levelEndlist=function(t){s.default.trigger(this.instanceId+":levelendlist",t)},t.prototype.fragmentLoaded=function(t){s.default.trigger(this.instanceId+":fragmentloaded",t)},t.prototype.fragmentPlaying=function(t){s.default.trigger(this.instanceId+":fragmentplaying",t)},t.prototype.position=function(t){s.default.trigger(this.instanceId+":timeupdate",t)},t.prototype.state=function(t){s.default.trigger(this.instanceId+":playbackstate",t)},t.prototype.seekState=function(t){s.default.trigger(this.instanceId+":seekstate",t)},t.prototype.switch=function(t){s.default.trigger(this.instanceId+":levelchanged",t)},t.prototype.audioTracksListChange=function(t){s.default.trigger(this.instanceId+":audiotracklistchanged",t)},t.prototype.audioTrackChange=function(t){s.default.trigger(this.instanceId+":audiotrackchanged",t)},t}();e.default=l,t.exports=e.default},function(t,e){t.exports="<%=baseUrl%>/8fa12a459188502b9f0d39b8a67d9e6c.swf"},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(59),a=n(r),o=i(0),s=n(o),l=i(1),u=n(l),d=i(3),c=n(d),h=i(2),f=n(h),p=i(34),g=n(p),y=i(187),v=n(y),m=i(4),b=n(m),_=i(9),E=n(_),T=i(5),A=i(55),S=n(A),L=function(t){function e(){(0,s.default)(this,e);for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];var a=(0,u.default)(this,t.call.apply(t,[this].concat(n)));return a.options.playback||(a.options.playback=a.options),a._minDvrSize=void 0===a.options.hlsMinimumDvrSize?60:a.options.hlsMinimumDvrSize,a._extrapolatedWindowNumSegments=a.options.playback&&void 0!==a.options.playback.extrapolatedWindowNumSegments?a.options.playback.extrapolatedWindowNumSegments:2,a._playbackType=E.default.VOD,a._lastTimeUpdate={current:0,total:0},a._lastDuration=null,a._playableRegionStartTime=0,a._localStartTimeCorrelation=null,a._localEndTimeCorrelation=null,a._playableRegionDuration=0,a._programDateTime=0,a._durationExcludesAfterLiveSyncPoint=!1,a._segmentTargetDuration=null,a._playlistType=null,a._recoverAttemptsRemaining=a.options.hlsRecoverAttempts||16,a}return(0,f.default)(e,t),(0,c.default)(e,[{key:"name",get:function(){return"hls"}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(t){this._currentLevel=t,this.trigger(b.default.PLAYBACK_LEVEL_SWITCH_START),this._hls.currentLevel=this._currentLevel}},{key:"isReady",get:function(){return this._isReadyState}},{key:"_startTime",get:function(){return this._playbackType===E.default.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return(0,T.now)()}},{key:"_extrapolatedStartTime",get:function(){if(!this._localStartTimeCorrelation)return this._playableRegionStartTime;var t=this._localStartTimeCorrelation,e=this._now-t.local,i=(t.remote+e)/1e3;return Math.min(i,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var t=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return t;var e=this._localEndTimeCorrelation,i=this._now-e.local,n=(e.remote+i)/1e3;return Math.max(t-this._extrapolatedWindowDuration,Math.min(n,t))}},{key:"_duration",get:function(){return this._extrapolatedEndTime-this._startTime}},{key:"_extrapolatedWindowDuration",get:function(){return null===this._segmentTargetDuration?0:this._extrapolatedWindowNumSegments*this._segmentTargetDuration}}],[{key:"HLSJS",get:function(){return v.default}}]),e.prototype._setup=function(){var t=this;this._ccIsSetup=!1,this._ccTracksUpdated=!1,this._hls=new v.default((0,T.assign)({},this.options.playback.hlsjsConfig)),this._hls.on(v.default.Events.MEDIA_ATTACHED,function(){return t._hls.loadSource(t.options.src)}),this._hls.on(v.default.Events.LEVEL_LOADED,function(e,i){return t._updatePlaybackType(e,i)}),this._hls.on(v.default.Events.LEVEL_UPDATED,function(e,i){return t._onLevelUpdated(e,i)}),this._hls.on(v.default.Events.LEVEL_SWITCHING,function(e,i){return t._onLevelSwitch(e,i)}),this._hls.on(v.default.Events.FRAG_LOADED,function(e,i){return t._onFragmentLoaded(e,i)}),this._hls.on(v.default.Events.ERROR,function(e,i){return t._onHLSJSError(e,i)}),this._hls.on(v.default.Events.SUBTITLE_TRACK_LOADED,function(e,i){return t._onSubtitleLoaded(e,i)}),this._hls.on(v.default.Events.SUBTITLE_TRACKS_UPDATED,function(){return t._ccTracksUpdated=!0}),this._hls.attachMedia(this.el)},e.prototype.render=function(){return this._ready(),t.prototype.render.call(this)},e.prototype._ready=function(){this._isReadyState=!0,this.trigger(b.default.PLAYBACK_READY,this.name)},e.prototype._recover=function(t,e){this._recoveredDecodingError?this._recoveredAudioCodecError?(S.default.error("hlsjs: failed to recover"),this.trigger(b.default.PLAYBACK_ERROR,"hlsjs: could not recover from error, evt "+t+", data "+e+" ",this.name)):(this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError()):(this._recoveredDecodingError=!0,this._hls.recoverMediaError())},e.prototype._setupSrc=function(t){},e.prototype._startTimeUpdateTimer=function(){var t=this;this._timeUpdateTimer=setInterval(function(){t._onDurationChange(),t._onTimeUpdate()},100)},e.prototype._stopTimeUpdateTimer=function(){clearInterval(this._timeUpdateTimer)},e.prototype.getProgramDateTime=function(){return this._programDateTime},e.prototype.getDuration=function(){return this._duration},e.prototype.getCurrentTime=function(){return Math.max(0,this.el.currentTime-this._startTime)},e.prototype.getStartTimeOffset=function(){return this._startTime},e.prototype.seekPercentage=function(t){var e=this._duration;t>0&&(e=this._duration*(t/100)),this.seek(e)},e.prototype.seek=function(e){e<0&&(S.default.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this.getDuration()),this.dvrEnabled&&this._updateDvr(e<this.getDuration()-3),e+=this._startTime,t.prototype.seek.call(this,e)},e.prototype.seekToLivePoint=function(){this.seek(this.getDuration())},e.prototype._updateDvr=function(t){this.trigger(b.default.PLAYBACK_DVR,t),this.trigger(b.default.PLAYBACK_STATS_ADD,{dvr:t})},e.prototype._updateSettings=function(){this._playbackType===E.default.VOD?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(b.default.PLAYBACK_SETTINGSUPDATE)},e.prototype._onHLSJSError=function(t,e){if(e.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,e.type){case v.default.ErrorTypes.NETWORK_ERROR:switch(e.details){case v.default.ErrorDetails.MANIFEST_LOAD_ERROR:case v.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case v.default.ErrorDetails.MANIFEST_PARSING_ERROR:case v.default.ErrorDetails.LEVEL_LOAD_ERROR:case v.default.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.default.error("hlsjs: unrecoverable network fatal error, evt "+t+", data "+e+" "),this.trigger(b.default.PLAYBACK_ERROR,{evt:t,data:e},this.name);break;default:S.default.warn("hlsjs: trying to recover from network error, evt "+t+", data "+e+" "),this._hls.startLoad()}break;case v.default.ErrorTypes.MEDIA_ERROR:S.default.warn("hlsjs: trying to recover from media error, evt "+t+", data "+e+" "),this._recover(t,e);break;default:S.default.error("hlsjs: trying to recover from error, evt "+t+", data "+e+" "),this.trigger(b.default.PLAYBACK_ERROR,"hlsjs: could not recover from error, evt "+t+", data "+e+" ",this.name)}else S.default.error("hlsjs: could not recover from error after maximum number of attempts, evt "+t+", data "+e+" "),this.trigger(b.default.PLAYBACK_ERROR,{evt:t,data:e},this.name);else S.default.warn("hlsjs: non-fatal error occurred, evt "+t+", data "+e+" ")},e.prototype._onTimeUpdate=function(){var t={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:this.getProgramDateTime()};this._lastTimeUpdate&&t.current===this._lastTimeUpdate.current&&t.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=t,this.trigger(b.default.PLAYBACK_TIMEUPDATE,t,this.name))},e.prototype._onDurationChange=function(){var e=this.getDuration();this._lastDuration!==e&&(this._lastDuration=e,t.prototype._onDurationChange.call(this))},e.prototype._onProgress=function(){if(this.el.buffered.length){for(var t=[],e=0,i=0;i<this.el.buffered.length;i++)t=[].concat((0,a.default)(t),[{start:Math.max(0,this.el.buffered.start(i)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(i)-this._playableRegionStartTime)}]),this.el.currentTime>=t[i].start&&this.el.currentTime<=t[i].end&&(e=i);var n={start:t[e].start,current:t[e].end,total:this.getDuration()};this.trigger(b.default.PLAYBACK_PROGRESS,n,t)}},e.prototype.play=function(){this._hls||this._setup(),t.prototype.play.call(this),this._startTimeUpdateTimer()},e.prototype.pause=function(){this._hls&&(t.prototype.pause.call(this),this.dvrEnabled&&this._updateDvr(!0))},e.prototype.stop=function(){this._hls&&(t.prototype.stop.call(this),this._hls.destroy(),delete this._hls)},e.prototype.destroy=function(){this._stopTimeUpdateTimer(),this._hls&&(this._hls.destroy(),delete this._hls),t.prototype.destroy.call(this)},e.prototype._updatePlaybackType=function(t,e){this._playbackType=e.details.live?E.default.LIVE:E.default.VOD,this._onLevelUpdated(t,e),this._ccTracksUpdated&&this._playbackType===E.default.LIVE&&this.hasClosedCaptionsTracks&&this._onSubtitleLoaded()},e.prototype._fillLevels=function(){this._levels=this._hls.levels.map(function(t,e){return{id:e,level:t,label:t.bitrate/1e3+"Kbps"}}),this.trigger(b.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},e.prototype._onLevelUpdated=function(t,e){this._segmentTargetDuration=e.details.targetduration,this._playlistType=e.details.type||null;var i=!1,n=!1,r=e.details.fragments,a=this._playableRegionStartTime,o=this._playableRegionDuration;if(0!==r.length){if(r[0].rawProgramDateTime&&(this._programDateTime=r[0].rawProgramDateTime),this._playableRegionStartTime!==r[0].start&&(i=!0,this._playableRegionStartTime=r[0].start),i)if(this._localStartTimeCorrelation){var s=this._localStartTimeCorrelation,l=this._now-s.local,u=(s.remote+l)/1e3;u<r[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*r[0].start}:u>a+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(r[0].start,a+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(r[0].start+this._extrapolatedWindowDuration/2)};var d=e.details.totalduration;if(this._playbackType===E.default.LIVE){var c=e.details.targetduration,h=this.options.playback.hlsjsConfig||{},f=h.liveSyncDurationCount||v.default.DefaultConfig.liveSyncDurationCount,p=c*f;p<=d?(d-=p,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}d!==this._playableRegionDuration&&(n=!0,this._playableRegionDuration=d);var g=r[0].start+d,y=a+o;if(g!==y)if(this._localEndTimeCorrelation){var m=this._localEndTimeCorrelation,b=this._now-m.local,_=(m.remote+b)/1e3;_>g?this._localEndTimeCorrelation={local:this._now,remote:1e3*g}:_<g-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(g-this._extrapolatedWindowDuration)}:_>y&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*y})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*g};n&&this._onDurationChange(),i&&this._onProgress()}},e.prototype._onFragmentLoaded=function(t,e){this.trigger(b.default.PLAYBACK_FRAGMENT_LOADED,e)},e.prototype._onSubtitleLoaded=function(){if(!this._ccIsSetup){this.trigger(b.default.PLAYBACK_SUBTITLE_AVAILABLE);var t=this._playbackType===E.default.LIVE?-1:this.closedCaptionsTrackId;this.closedCaptionsTrackId=t,this._ccIsSetup=!0}},e.prototype._onLevelSwitch=function(t,e){this.levels.length||this._fillLevels(),this.trigger(b.default.PLAYBACK_LEVEL_SWITCH_END),this.trigger(b.default.PLAYBACK_LEVEL_SWITCH,e);var i=this._hls.levels[e.level];i&&(this.highDefinition=i.height>=720||i.bitrate/1e3>=2e3,this.trigger(b.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(b.default.PLAYBACK_BITRATE,{height:i.height,width:i.width,bandwidth:i.bitrate,bitrate:i.bitrate,level:e.level}))},e.prototype.getPlaybackType=function(){return this._playbackType},e.prototype.isSeekEnabled=function(){return this._playbackType===E.default.VOD||this.dvrEnabled},(0,c.default)(e,[{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===E.default.LIVE}}]),e}(g.default);e.default=L,L.canPlay=function(t,e){var i=t.split("?")[0].match(/.*\.(.*)$/)||[],n=i.length>1&&"m3u8"===i[1].toLowerCase()||"application/x-mpegURL"===e||"application/vnd.apple.mpegurl"===e;return!(!v.default.isSupported()||!n)},t.exports=e.default},function(t,e,i){!function(e,i){t.exports=i()}("undefined"!=typeof self&&self,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=9)}([function(t,e,i){"use strict";function n(){}function r(t,e){return e="["+t+"] > "+e}function a(t){var e=self.console[t];return e?function(){for(var i=arguments.length,n=Array(i),a=0;a<i;a++)n[a]=arguments[a];n[0]&&(n[0]=r(t,n[0])),e.apply(self.console,n)}:n}function o(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];i.forEach(function(e){u[e]=t[e]?t[e].bind(t):a(e)})}i.d(e,"a",function(){return d}),i.d(e,"b",function(){return c});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l={trace:n,debug:n,log:n,warn:n,info:n,error:n},u=l,d=function(t){if(!0===t||"object"===(void 0===t?"undefined":s(t))){o(t,"debug","log","info","warn","error");try{u.log()}catch(t){u=l}}else u=l},c=u},function(t,e,i){"use strict";var n={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition"};e.a=n},function(t,e,i){"use strict";i.d(e,"b",function(){return n}),i.d(e,"a",function(){return r});var n={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",KEY_SYSTEM_ERROR:"keySystemError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},r={KEY_SYSTEM_NO_KEYS:"keySystemNoKeys",KEY_SYSTEM_NO_ACCESS:"keySystemNoAccess",KEY_SYSTEM_NO_SESSION:"keySystemNoSession",KEY_SYSTEM_LICENSE_REQUEST_FAILED:"keySystemLicenseRequestFailed",MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",AUDIO_TRACK_LOAD_ERROR:"audioTrackLoadError",AUDIO_TRACK_LOAD_TIMEOUT:"audioTrackLoadTimeOut",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",REMUX_ALLOC_ERROR:"remuxAllocError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_ADD_CODEC_ERROR:"bufferAddCodecError",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",BUFFER_NUDGE_ON_STALL:"bufferNudgeOnStall",INTERNAL_EXCEPTION:"internalException"}},function(t,e,i){!function(e){var i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,n=/^([^\/;?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var r=o.parseURL(t);if(!r)throw new Error("Error trying to parse base URL.");return r.path=o.normalizePath(r.path),o.buildURLFromParts(r)}var a=o.parseURL(e);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):e;var s=o.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=n.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var d=s.path,c=d.substring(0,d.lastIndexOf("/")+1)+a.path;u.path=o.normalizePath(c)}else u.path=s.path,a.params||(u.params=s.params,a.query||(u.query=s.query));return null===u.path&&(u.path=i.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(u)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(r,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}};t.exports=o}()},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}i.d(e,"b",function(){return a});var r=function(){function t(){n(this,t)}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,i){for(var n=i,r=0;t.isHeader(e,i);){r+=10;r+=t._readSize(e,i+6),t.isFooter(e,i+10)&&(r+=10),i+=r}if(r>0)return e.subarray(n,n+r)},t._readSize=function(t,e){var i=0;return i=(127&t[e])<<21,i|=(127&t[e+1])<<14,i|=(127&t[e+2])<<7,i|=127&t[e+3]},t.getTimeStamp=function(e){for(var i=t.getID3Frames(e),n=0;n<i.length;n++){var r=i[n];if(t.isTimeStampFrame(r))return t._readTimeStamp(r)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t._getFrameData=function(e){var i=String.fromCharCode(e[0],e[1],e[2],e[3]),n=t._readSize(e,4);return{type:i,size:n,data:e.subarray(10,10+n)}},t.getID3Frames=function(e){for(var i=0,n=[];t.isHeader(e,i);){var r=t._readSize(e,i+6);i+=10;for(var a=i+r;i+8<a;){var o=t._getFrameData(e.subarray(i)),s=t._decodeFrame(o);s&&n.push(s),i+=o.size+10}t.isFooter(e,i)&&(i+=10)}return n},t._decodeFrame=function(e){return"PRIV"===e.type?t._decodePrivFrame(e):"T"===e.type[0]?t._decodeTextFrame(e):"W"===e.type[0]?t._decodeURLFrame(e):void 0},t._readTimeStamp=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),i=1&e[3],n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,i&&(n+=47721858.84),Math.round(n)}},t._decodePrivFrame=function(e){if(!(e.size<2)){var i=t._utf8ArrayToStr(e.data,!0),n=new Uint8Array(e.data.subarray(i.length+1));return{key:e.type,info:i,data:n.buffer}}},t._decodeTextFrame=function(e){if(!(e.size<2)){if("TXXX"===e.type){var i=1,n=t._utf8ArrayToStr(e.data.subarray(i));i+=n.length+1;var r=t._utf8ArrayToStr(e.data.subarray(i));return{key:e.type,info:n,data:r}}var a=t._utf8ArrayToStr(e.data.subarray(1));return{key:e.type,data:a}}},t._decodeURLFrame=function(e){if("WXXX"===e.type){if(e.size<2)return;var i=1,n=t._utf8ArrayToStr(e.data.subarray(i));i+=n.length+1;var r=t._utf8ArrayToStr(e.data.subarray(i));return{key:e.type,info:n,data:r}}var a=t._utf8ArrayToStr(e.data);return{key:e.type,data:a}},t._utf8ArrayToStr=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.length,n=void 0,r=void 0,a=void 0,o="",s=0;s<i;){if(0===(n=t[s++])&&e)return o;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(n);break;case 12:case 13:r=t[s++],o+=String.fromCharCode((31&n)<<6|63&r);break;case 14:r=t[s++],a=t[s++],o+=String.fromCharCode((15&n)<<12|(63&r)<<6|(63&a)<<0)}}return o},t}(),a=r._utf8ArrayToStr;e.a=r},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){var e=t.byteLength,i=e&&new DataView(t).getUint8(e-1);return i?t.slice(0,e-i):t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=function(){function t(e,i){n(this,t),this.subtle=e,this.aesIV=i}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),u=l,d=function(){function t(e,i){r(this,t),this.subtle=e,this.key=i}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),c=d,h=function(){function t(){a(this,t),this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}return t.prototype.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),i=new Uint32Array(4),n=0;n<4;n++)i[n]=e.getUint32(4*n);return i},t.prototype.initTable=function(){var t=this.sBox,e=this.invSBox,i=this.subMix,n=i[0],r=i[1],a=i[2],o=i[3],s=this.invSubMix,l=s[0],u=s[1],d=s[2],c=s[3],h=new Uint32Array(256),f=0,p=0,g=0;for(g=0;g<256;g++)h[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var y=p^p<<1^p<<2^p<<3^p<<4;y=y>>>8^255&y^99,t[f]=y,e[y]=f;var v=h[f],m=h[v],b=h[m],_=257*h[y]^16843008*y;n[f]=_<<24|_>>>8,r[f]=_<<16|_>>>16,a[f]=_<<8|_>>>24,o[f]=_,_=16843009*b^65537*m^257*v^16843008*f,l[y]=_<<24|_>>>8,u[y]=_<<16|_>>>16,d[y]=_<<8|_>>>24,c[y]=_,f?(f=v^h[h[h[b^v]]],p^=h[h[p]]):f=p=1}},t.prototype.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),i=!0,n=0;n<e.length&&i;)i=e[n]===this.key[n],n++;if(!i){this.key=e;var r=this.keySize=e.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);var a=this.ksRows=4*(r+6+1),o=void 0,s=void 0,l=this.keySchedule=new Uint32Array(a),u=this.invKeySchedule=new Uint32Array(a),d=this.sBox,c=this.rcon,h=this.invSubMix,f=h[0],p=h[1],g=h[2],y=h[3],v=void 0,m=void 0;for(o=0;o<a;o++)o<r?v=l[o]=e[o]:(m=v,o%r==0?(m=m<<8|m>>>24,m=d[m>>>24]<<24|d[m>>>16&255]<<16|d[m>>>8&255]<<8|d[255&m],m^=c[o/r|0]<<24):r>6&&o%r==4&&(m=d[m>>>24]<<24|d[m>>>16&255]<<16|d[m>>>8&255]<<8|d[255&m]),l[o]=v=(l[o-r]^m)>>>0);for(s=0;s<a;s++)o=a-s,m=3&s?l[o]:l[o-4],u[s]=s<4||o<=4?m:f[d[m>>>24]]^p[d[m>>>16&255]]^g[d[m>>>8&255]]^y[d[255&m]],u[s]=u[s]>>>0}},t.prototype.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},t.prototype.decrypt=function(t,e,i,n){for(var r=this.keySize+6,a=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,u=l[0],d=l[1],c=l[2],h=l[3],f=this.uint8ArrayToUint32Array_(i),p=f[0],g=f[1],y=f[2],v=f[3],m=new Int32Array(t),b=new Int32Array(m.length),_=void 0,E=void 0,T=void 0,A=void 0,S=void 0,L=void 0,R=void 0,k=void 0,w=void 0,C=void 0,I=void 0,D=void 0,O=void 0,P=void 0,x=this.networkToHostOrderSwap;e<m.length;){for(w=x(m[e]),C=x(m[e+1]),I=x(m[e+2]),D=x(m[e+3]),S=w^a[0],L=D^a[1],R=I^a[2],k=C^a[3],O=4,P=1;P<r;P++)_=u[S>>>24]^d[L>>16&255]^c[R>>8&255]^h[255&k]^a[O],E=u[L>>>24]^d[R>>16&255]^c[k>>8&255]^h[255&S]^a[O+1],T=u[R>>>24]^d[k>>16&255]^c[S>>8&255]^h[255&L]^a[O+2],A=u[k>>>24]^d[S>>16&255]^c[L>>8&255]^h[255&R]^a[O+3],S=_,L=E,R=T,k=A,O+=4;_=s[S>>>24]<<24^s[L>>16&255]<<16^s[R>>8&255]<<8^s[255&k]^a[O],E=s[L>>>24]<<24^s[R>>16&255]<<16^s[k>>8&255]<<8^s[255&S]^a[O+1],T=s[R>>>24]<<24^s[k>>16&255]<<16^s[S>>8&255]<<8^s[255&L]^a[O+2],A=s[k>>>24]<<24^s[S>>16&255]<<16^s[L>>8&255]<<8^s[255&R]^a[O+3],O+=3,b[e]=x(_^p),b[e+1]=x(A^g),b[e+2]=x(T^y),b[e+3]=x(E^v),p=w,g=C,y=I,v=D,e+=4}return n?o(b.buffer):b.buffer},t.prototype.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}(),f=h,p=i(2),g=i(0),y=function(){function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.removePKCS7Padding,a=void 0===r||r;if(s(this,t),this.logEnabled=!0,this.observer=e,this.config=i,this.removePKCS7Padding=a,a)try{var o=crypto||self.crypto;this.subtle=o.subtle||o.webkitSubtle}catch(t){}this.disableWebCrypto=!this.subtle}return t.prototype.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.prototype.decrypt=function(t,e,i,n){var r=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(g.b.log("JS AES decrypt"),this.logEnabled=!1);var a=this.decryptor;a||(this.decryptor=a=new f),a.expandKey(e),n(a.decrypt(t,0,i,this.removePKCS7Padding))}else{this.logEnabled&&(g.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var o=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new c(o,e)),this.fastAesKey.expandKey().then(function(a){new u(o,i).decrypt(t,a).catch(function(a){r.onWebCryptoError(a,t,e,i,n)}).then(function(t){n(t)})}).catch(function(a){r.onWebCryptoError(a,t,e,i,n)})}},t.prototype.onWebCryptoError=function(t,e,i,n,r){this.config.enableSoftwareAES?(g.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,i,n,r)):(g.b.error("decrypting error : "+t.message),this.observer.trigger(Event.ERROR,{type:p.b.MEDIA_ERROR,details:p.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},t.prototype.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}();e.a=y},function(t,e){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function r(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!r(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,i,r,s,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var d=new Error('Uncaught, unspecified "error" event. ('+e+")");throw d.context=e,d}if(i=this._events[t],o(i))return!1;if(n(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),i.apply(this,s)}else if(a(i))for(s=Array.prototype.slice.call(arguments,1),u=i.slice(),r=u.length,l=0;l<r;l++)u[l].apply(this,s);return!0},i.prototype.addListener=function(t,e){var r;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(r=o(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var r=!1;return i.listener=e,this.on(t,i),this},i.prototype.removeListener=function(t,e){var i,r,o,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(i=this._events[t],o=i.length,r=-1,i===e||n(i.listener)&&i.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(i)){for(s=o;s-- >0;)if(i[s]===e||i[s].listener&&i[s].listener===e){r=s;break}if(r<0)return this;1===i.length?(i.length=0,delete this._events[t]):i.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[t],n(i))this.removeListener(t,i);else if(i)for(;i.length;)this.removeListener(t,i[i.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=i(0),a=i(1),o=Math.pow(2,32)-1,s=function(){function t(e,i){n(this,t),this.observer=e,this.remuxer=i}return t.prototype.resetTimeStamp=function(t){this.initPTS=t},t.prototype.resetInitSegment=function(e,i,n,r){if(e&&e.byteLength){var o=this.initData=t.parseInitSegment(e);null==i&&(i="mp4a.40.5"),null==n&&(n="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:i+","+n,initSegment:r?e:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:i,initSegment:r?e:null}),o.video&&(s.video={container:"video/mp4",codec:n,initSegment:r?e:null})),this.observer.trigger(a.a.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else i&&(this.audioCodec=i),n&&(this.videoCodec=n)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,e){t.data&&(e+=t.start,t=t.data);var i=t[e]<<8|t[e+1];return i<0?65536+i:i},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var i=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return i<0?4294967296+i:i},t.writeUint32=function(t,e,i){t.data&&(e+=t.start,t=t.data),t[e]=i>>24,t[e+1]=i>>16&255,t[e+2]=i>>8&255,t[e+3]=255&i},t.findBox=function(e,i){var n=[],r=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0;if(e.data?(u=e.start,s=e.end,e=e.data):(u=0,s=e.byteLength),!i.length)return null;for(r=u;r<s;)a=t.readUint32(e,r),o=t.bin2str(e.subarray(r+4,r+8)),d=a>1?r+a:s,o===i[0]&&(1===i.length?n.push({data:e,start:r+8,end:d}):(l=t.findBox({data:e,start:r+8,end:d},i.slice(1)),l.length&&(n=n.concat(l)))),r=d;return n},t.parseSegmentIndex=function(e){var i=t.findBox(e,["moov"])[0],n=i?i.end:null,r=0,a=t.findBox(e,["sidx"]),o=void 0;if(!a||!a[0])return null;o=[],a=a[0];var s=a.data[0];r=0===s?8:16;var l=t.readUint32(a,r);r+=4;r+=0===s?8:16,r+=2;var u=a.end+0,d=t.readUint16(a,r);r+=2;for(var c=0;c<d;c++){var h=r,f=t.readUint32(a,h);h+=4;var p=2147483647&f;if(1===(2147483648&f)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var g=t.readUint32(a,h);h+=4,o.push({referenceSize:p,subsegmentDuration:g,info:{duration:g/l,start:u,end:u+p-1}}),u+=p,h+=4,r=h}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:d,references:o,moovEndOffset:n}},t.parseInitSegment=function(e){var i=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var n=t.findBox(e,["tkhd"])[0];if(n){var a=n.data[n.start],o=0===a?12:20,s=t.readUint32(n,o),l=t.findBox(e,["mdia","mdhd"])[0];if(l){a=l.data[l.start],o=0===a?12:20;var u=t.readUint32(l,o),d=t.findBox(e,["mdia","hdlr"])[0];if(d){var c=t.bin2str(d.data.subarray(d.start+8,d.start+12)),h={soun:"audio",vide:"video"}[c];if(h){var f=t.findBox(e,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var p=t.bin2str(f.data.subarray(f.start+12,f.start+16));r.b.log("MP4Demuxer:"+h+":"+p+" found")}i[s]={timescale:u,type:h},i[h]={timescale:u,id:s}}}}}}),i},t.getStartDTS=function(e,i){var n=void 0,r=void 0,a=void 0;return n=t.findBox(i,["moof","traf"]),r=[].concat.apply([],n.map(function(i){return t.findBox(i,["tfhd"]).map(function(n){var r=void 0,a=void 0;return r=t.readUint32(n,4),a=e[r].timescale||9e4,t.findBox(i,["tfdt"]).map(function(e){var i=void 0,n=void 0;return i=e.data[e.start],n=t.readUint32(e,4),1===i&&(n*=Math.pow(2,32),n+=t.readUint32(e,8)),n})[0]/a})})),a=Math.min.apply(null,r),isFinite(a)?a:0},t.offsetStartDTS=function(e,i,n){t.findBox(i,["moof","traf"]).map(function(i){return t.findBox(i,["tfhd"]).map(function(r){var a=t.readUint32(r,4),s=e[a].timescale||9e4;t.findBox(i,["tfdt"]).map(function(e){var i=e.data[e.start],r=t.readUint32(e,4);if(0===i)t.writeUint32(e,4,r-n*s);else{r*=Math.pow(2,32),r+=t.readUint32(e,8),r-=n*s,r=Math.max(r,0);var a=Math.floor(r/(o+1)),l=Math.floor(r%(o+1));t.writeUint32(e,4,a),t.writeUint32(e,8,l)}})})})},t.prototype.append=function(e,i,n,r){var o=this.initData;o||(this.resetInitSegment(e,this.audioCodec,this.videoCodec,!1),o=this.initData);var s=void 0,l=this.initPTS;if(void 0===l){var u=t.getStartDTS(o,e);this.initPTS=l=u-i,this.observer.trigger(a.a.INIT_PTS_FOUND,{initPTS:l})}t.offsetStartDTS(o,e,l),s=t.getStartDTS(o,e),this.remuxer.remux(o.audio,o.video,null,null,s,n,r,e)},t.prototype.destroy=function(){},t}();e.a=s},function(t,e,i){"use strict";function n(t,e,i,n){var r=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=navigator.userAgent.toLowerCase(),d=n,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];return r=1+((192&e[i+2])>>>6),(a=(60&e[i+2])>>>2)>c.length-1?void t.trigger(Event.ERROR,{type:S.b.MEDIA_ERROR,details:S.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+a}):(s=(1&e[i+2])<<2,s|=(192&e[i+3])>>>6,R.b.log("manifest codec:"+n+",ADTS data:type:"+r+",sampleingIndex:"+a+"["+c[a]+"Hz],channelConfig:"+s),/firefox/i.test(u)?a>=6?(r=5,l=new Array(4),o=a-3):(r=2,l=new Array(2),o=a):-1!==u.indexOf("android")?(r=2,l=new Array(2),o=a):(r=5,l=new Array(4),n&&(-1!==n.indexOf("mp4a.40.29")||-1!==n.indexOf("mp4a.40.5"))||!n&&a>=6?o=a-3:((n&&-1!==n.indexOf("mp4a.40.2")&&(a>=6&&1===s||/vivaldi/i.test(u))||!n&&1===s)&&(r=2,l=new Array(2)),o=a)),l[0]=r<<3,l[0]|=(14&a)>>1,l[1]|=(1&a)<<7,l[1]|=s<<3,5===r&&(l[1]|=(14&o)>>1,l[2]=(1&o)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:c[a],channelCount:s,codec:"mp4a.40."+r,manifestCodec:d})}function r(t,e){return 255===t[e]&&240==(246&t[e+1])}function a(t,e){return 1&t[e+1]?7:9}function o(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function s(t,e){return!!(e+1<t.length&&r(t,e))}function l(t,e){if(e+1<t.length&&r(t,e)){var i=a(t,e),n=i;e+5<t.length&&(n=o(t,e));var s=e+n;if(s===t.length||s+1<t.length&&r(t,s))return!0}return!1}function u(t,e,i,r,a){if(!t.samplerate){var o=n(e,i,r,a);t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,R.b.log("parsed codec:"+t.codec+",rate:"+o.samplerate+",nb channel:"+o.channelCount)}}function d(t){return 9216e4/t}function c(t,e,i,n,r){var s=void 0,l=void 0,u=void 0,d=t.length;if(s=a(t,e),l=o(t,e),(l-=s)>0&&e+s+l<=d)return u=i+n*r,{headerLength:s,frameLength:l,stamp:u}}function h(t,e,i,n,r){var a=d(t.samplerate),o=c(e,i,n,r,a);if(o){var s=o.stamp,l=o.headerLength,u=o.frameLength,h={unit:e.subarray(i+l,i+l+u),pts:s,dts:s};return t.samples.push(h),t.len+=u,{sample:h,length:u+l}}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var A=i(1),S=i(2),L=i(5),R=i(0),k=i(4),w=function(){function t(e,i,n){f(this,t),this.observer=e,this.config=n,this.remuxer=i}return t.prototype.resetInitSegment=function(t,e,i,n){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:n,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=k.a.getID3Data(t,0)||[],i=e.length,n=t.length;i<n;i++)if(l(t,i))return R.b.log("ADTS sync word found !"),!0;return!1},t.prototype.append=function(t,e,i,n){for(var r=this._audioTrack,a=k.a.getID3Data(t,0)||[],o=k.a.getTimeStamp(a),l=o?90*o:9e4*e,d=0,c=l,f=t.length,p=a.length,g=[{pts:c,dts:c,data:a}];p<f-1;)if(s(t,p)&&p+5<f){u(r,this.observer,t,p,r.manifestCodec);var y=h(r,t,p,l,d);if(!y){R.b.log("Unable to parse AAC frame");break}p+=y.length,c=y.sample.pts,d++}else k.a.isHeader(t,p)?(a=k.a.getID3Data(t,p),g.push({pts:c,dts:c,data:a}),p+=a.length):p++;this.remuxer.remux(r,{samples:[]},{samples:g,inputTimeScale:9e4},{samples:[]},e,i,n)},t.prototype.destroy=function(){},t}(),C=w,I=i(7),D={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,i,n,r){if(!(i+24>e.length)){var a=this.parseHeader(e,i);if(a&&i+a.frameLength<=e.length){var o=9e4*a.samplesPerFrame/a.sampleRate,s=n+r*o,l={unit:e.subarray(i,i+a.frameLength),pts:s,dts:s};return t.config=[],t.channelCount=a.channelCount,t.samplerate=a.sampleRate,t.samples.push(l),t.len+=a.frameLength,{sample:l,length:a.frameLength}}}},parseHeader:function(t,e){var i=t[e+1]>>3&3,n=t[e+1]>>1&3,r=t[e+2]>>4&15,a=t[e+2]>>2&3,o=t[e+2]>>1&1;if(1!==i&&0!==r&&15!==r&&3!==a){var s=3===i?3-n:3===n?3:4,l=1e3*D.BitratesMap[14*s+r-1],u=3===i?0:2===i?1:2,d=D.SamplingRateMap[3*u+a],c=t[e+3]>>6==3?1:2,h=D.SamplesCoefficients[i][n],f=D.BytesInSlot[n],p=8*h*f;return{sampleRate:d,channelCount:c,frameLength:parseInt(h*l/d+o,10)*f,samplesPerFrame:p}}},isHeaderPattern:function(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])},isHeader:function(t,e){return!!(e+1<t.length&&this.isHeaderPattern(t,e))},probe:function(t,e){if(e+1<t.length&&this.isHeaderPattern(t,e)){var i=this.parseHeader(t,e),n=4;i&&i.frameLength&&(n=i.frameLength);var r=e+n;if(r===t.length||r+1<t.length&&this.isHeaderPattern(t,r))return!0}return!1}},O=D,P=function(){function t(e){p(this,t),this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}return t.prototype.loadWord=function(){var t=this.data,e=this.bytesAvailable,i=t.byteLength-e,n=new Uint8Array(4),r=Math.min(4,e);if(0===r)throw new Error("no bytes available");n.set(t.subarray(i,i+r)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r},t.prototype.skipBits=function(t){var e=void 0;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},t.prototype.readBits=function(t){var e=Math.min(this.bitsAvailable,t),i=this.word>>>32-e;return t>32&&R.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),e=t-e,e>0&&this.bitsAvailable?i<<e|this.readBits(e):i},t.prototype.skipLZ=function(){var t=void 0;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},t.prototype.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.skipEG=function(){this.skipBits(1+this.skipLZ())},t.prototype.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},t.prototype.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},t.prototype.readBoolean=function(){return 1===this.readBits(1)},t.prototype.readUByte=function(){return this.readBits(8)},t.prototype.readUShort=function(){return this.readBits(16)},t.prototype.readUInt=function(){return this.readBits(32)},t.prototype.skipScalingList=function(t){var e=8,i=8,n=void 0,r=void 0;for(n=0;n<t;n++)0!==i&&(r=this.readEG(),i=(e+r+256)%256),e=0===i?e:i},t.prototype.readSPS=function(){var t=0,e=0,i=0,n=0,r=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,c=this.readUByte.bind(this),h=this.readBits.bind(this),f=this.readUEG.bind(this),p=this.readBoolean.bind(this),g=this.skipBits.bind(this),y=this.skipEG.bind(this),v=this.skipUEG.bind(this),m=this.skipScalingList.bind(this);if(c(),r=c(),h(5),g(3),c(),v(),100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r){var b=f();if(3===b&&g(1),v(),v(),g(1),p())for(u=3!==b?8:12,d=0;d<u;d++)p()&&m(d<6?16:64)}v();var _=f();if(0===_)f();else if(1===_)for(g(1),y(),y(),a=f(),d=0;d<a;d++)y();v(),g(1),o=f(),s=f(),l=h(1),0===l&&g(1),g(1),p()&&(t=f(),e=f(),i=f(),n=f());var E=[1,1];if(p()&&p()){switch(c()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[c()<<8|c(),c()<<8|c()]}}return{width:Math.ceil(16*(o+1)-2*t-2*e),height:(2-l)*(s+1)*16-(l?2:4)*(i+n),pixelRatio:E}},t.prototype.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),x=P,N=function(){function t(e,i,n,r){g(this,t),this.decryptdata=n,this.discardEPB=r,this.decrypter=new L.a(e,i,{removePKCS7Padding:!1})}return t.prototype.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,e)},t.prototype.decryptAacSample=function(t,e,i,n){var r=t[e].unit,a=r.subarray(16,r.length-r.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,function(a){a=new Uint8Array(a),r.set(a,16),n||s.decryptAacSamples(t,e+1,i)})},t.prototype.decryptAacSamples=function(t,e,i){for(;;e++){if(e>=t.length)return void i();if(!(t[e].unit.length<32)){var n=this.decrypter.isSync();if(this.decryptAacSample(t,e,i,n),!n)return}}},t.prototype.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,i=new Int8Array(e),n=0,r=32;r<=t.length-16;r+=160,n+=16)i.set(t.subarray(r,r+16),n);return i},t.prototype.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var i=0,n=32;n<=t.length-16;n+=160,i+=16)t.set(e.subarray(i,i+16),n);return t},t.prototype.decryptAvcSample=function(t,e,i,n,r,a){var o=this.discardEPB(r.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,function(s){r.data=l.getAvcDecryptedUnit(o,s),a||l.decryptAvcSamples(t,e,i+1,n)})},t.prototype.decryptAvcSamples=function(t,e,i,n){for(;;e++,i=0){if(e>=t.length)return void n();for(var r=t[e].units;!(i>=r.length);i++){var a=r[i];if(!(a.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(t,e,i,n,a,o),!o)return}}}},t}(),M=N,F={video:0,audio:1,id3:2,text:3},B=function(){function t(e,i,n,r){y(this,t),this.observer=e,this.config=n,this.typeSupported=r,this.remuxer=i,this.sampleAes=null}return t.prototype.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new M(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(e){var i=t._syncOffset(e);return!(i<0)&&(i&&R.b.warn("MPEG2-TS detected but first sync word found @ offset "+i+", junk ahead ?"),!0)},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),i=0;i<e;){if(71===t[i]&&71===t[i+188]&&71===t[i+376])return i;i++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:F[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],len:0,dropped:"video"===t?0:void 0,isAAC:"audio"===t||void 0,duration:"audio"===t?e:void 0}},t.prototype.resetInitSegment=function(e,i,n,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",r),this._audioTrack=t.createTrack("audio",r),this._id3Track=t.createTrack("id3",r),this._txtTrack=t.createTrack("text",r),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=i,this.videoCodec=n,this._duration=r},t.prototype.resetTimeStamp=function(){},t.prototype.append=function(e,i,n,r){var a=void 0,o=e.length,s=void 0,l=void 0,u=void 0,d=void 0,c=!1;this.contiguous=n;var h=this.pmtParsed,f=this._avcTrack,p=this._audioTrack,g=this._id3Track,y=f.pid,v=p.pid,m=g.pid,b=this._pmtId,_=f.pesData,E=p.pesData,T=g.pesData,L=this._parsePAT,k=this._parsePMT,w=this._parsePES,C=this._parseAVCPES.bind(this),I=this._parseAACPES.bind(this),D=this._parseMPEGPES.bind(this),O=this._parseID3PES.bind(this),P=t._syncOffset(e);for(o-=(o+P)%188,a=P;a<o;a+=188)if(71===e[a]){if(s=!!(64&e[a+1]),l=((31&e[a+1])<<8)+e[a+2],(48&e[a+3])>>4>1){if((u=a+5+e[a+4])===a+188)continue}else u=a+4;switch(l){case y:s&&(_&&(d=w(_))&&void 0!==d.pts&&C(d,!1),_={data:[],size:0}),_&&(_.data.push(e.subarray(u,a+188)),_.size+=a+188-u);break;case v:s&&(E&&(d=w(E))&&void 0!==d.pts&&(p.isAAC?I(d):D(d)),E={data:[],size:0}),E&&(E.data.push(e.subarray(u,a+188)),E.size+=a+188-u);break;case m:s&&(T&&(d=w(T))&&void 0!==d.pts&&O(d),T={data:[],size:0}),T&&(T.data.push(e.subarray(u,a+188)),T.size+=a+188-u);break;case 0:s&&(u+=e[u]+1),b=this._pmtId=L(e,u);break;case b:s&&(u+=e[u]+1);var x=k(e,u,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);y=x.avc,y>0&&(f.pid=y),v=x.audio,v>0&&(p.pid=v,p.isAAC=x.isAAC),m=x.id3,m>0&&(g.pid=m),c&&!h&&(R.b.log("reparse from beginning"),c=!1,a=P-188),h=this.pmtParsed=!0;break;case 17:case 8191:break;default:c=!0}}else this.observer.trigger(A.a.ERROR,{type:S.b.MEDIA_ERROR,details:S.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_&&(d=w(_))&&void 0!==d.pts?(C(d,!0),f.pesData=null):f.pesData=_,E&&(d=w(E))&&void 0!==d.pts?(p.isAAC?I(d):D(d),p.pesData=null):(E&&E.size&&R.b.log("last AAC PES packet truncated,might overlap between fragments"),p.pesData=E),T&&(d=w(T))&&void 0!==d.pts?(O(d),g.pesData=null):g.pesData=T,null==this.sampleAes?this.remuxer.remux(p,f,g,this._txtTrack,i,n,r):this.decryptAndRemux(p,f,g,this._txtTrack,i,n,r)},t.prototype.decryptAndRemux=function(t,e,i,n,r,a,o){if(t.samples&&t.isAAC){var s=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){s.decryptAndRemuxAvc(t,e,i,n,r,a,o)})}else this.decryptAndRemuxAvc(t,e,i,n,r,a,o)},t.prototype.decryptAndRemuxAvc=function(t,e,i,n,r,a,o){if(e.samples){var s=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){s.remuxer.remux(t,e,i,n,r,a,o)})}else this.remuxer.remux(t,e,i,n,r,a,o)},t.prototype.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t.prototype._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},t.prototype._parsePMT=function(t,e,i,n){var r=void 0,a=void 0,o=void 0,s=void 0,l={audio:-1,avc:-1,id3:-1,isAAC:!0};for(r=(15&t[e+1])<<8|t[e+2],a=e+3+r-4,o=(15&t[e+10])<<8|t[e+11],e+=12+o;e<a;){switch(s=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!n){R.b.log("unkown stream type:"+t[e]);break}case 15:-1===l.audio&&(l.audio=s);break;case 21:-1===l.id3&&(l.id3=s);break;case 219:if(!n){R.b.log("unkown stream type:"+t[e]);break}case 27:-1===l.avc&&(l.avc=s);break;case 3:case 4:i?-1===l.audio&&(l.audio=s,l.isAAC=!1):R.b.log("MPEG audio found, not supported in this browser for now");break;case 36:R.b.warn("HEVC stream type found, not supported for now");break;default:R.b.log("unkown stream type:"+t[e])}e+=5+((15&t[e+3])<<8|t[e+4])}return l},t.prototype._parsePES=function(t){var e=0,i=void 0,n=void 0,r=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=t.data;if(!t||0===t.size)return null;for(;d[0].length<19&&d.length>1;){var c=new Uint8Array(d[0].length+d[1].length);c.set(d[0]),c.set(d[1],d[0].length),d[0]=c,d.splice(1,1)}if(i=d[0],1===(i[0]<<16)+(i[1]<<8)+i[2]){if((r=(i[4]<<8)+i[5])&&r>t.size-6)return null;n=i[7],192&n&&(s=536870912*(14&i[9])+4194304*(255&i[10])+16384*(254&i[11])+128*(255&i[12])+(254&i[13])/2,s>4294967295&&(s-=8589934592),64&n?(l=536870912*(14&i[14])+4194304*(255&i[15])+16384*(254&i[16])+128*(255&i[17])+(254&i[18])/2,l>4294967295&&(l-=8589934592),s-l>54e5&&(R.b.warn(Math.round((s-l)/9e4)+"s delta between PTS and DTS, align them"),s=l)):l=s),a=i[8],u=a+9,t.size-=u,o=new Uint8Array(t.size);for(var h=0,f=d.length;h<f;h++){i=d[h];var p=i.byteLength;if(u){if(u>p){u-=p;continue}i=i.subarray(u),p-=u,u=0}o.set(i,e),e+=p}return r&&(r-=a+3),{data:o,pts:s,dts:l,len:r}}return null},t.prototype.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var i=e.samples,n=i.length;!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(n||this.contiguous)?(t.id=n,i.push(t)):e.dropped++}t.debug.length&&R.b.log(t.pts+"/"+t.dts+":"+t.debug)},t.prototype._parseAVCPES=function(t,e){var i=this,n=this._avcTrack,r=this._parseAVCNALu(t.data),a=void 0,o=this.avcSample,s=void 0,l=!1,u=void 0,d=this.pushAccesUnit.bind(this),c=function(t,e,i,n){return{key:t,pts:e,dts:i,units:[],debug:n}};t.data=null,o&&r.length&&!n.audFound&&(d(o,n),o=this.avcSample=c(!1,t.pts,t.dts,"")),r.forEach(function(e){switch(e.type){case 1:s=!0,o||(o=i.avcSample=c(!0,t.pts,t.dts,"")),o.frame=!0;var r=e.data;if(l&&r.length>4){var h=new x(r).readSliceType();2!==h&&4!==h&&7!==h&&9!==h||(o.key=!0)}break;case 5:s=!0,o||(o=i.avcSample=c(!0,t.pts,t.dts,"")),o.key=!0,o.frame=!0;break;case 6:s=!0,a=new x(i.discardEPB(e.data)),a.readUByte();for(var f=0,p=0,g=!1,y=0;!g&&a.bytesAvailable>1;){f=0;do{y=a.readUByte(),f+=y}while(255===y);p=0;do{y=a.readUByte(),p+=y}while(255===y);if(4===f&&0!==a.bytesAvailable){g=!0;if(181===a.readUByte()){if(49===a.readUShort()){if(1195456820===a.readUInt()){if(3===a.readUByte()){var v=a.readUByte(),m=a.readUByte(),b=31&v,_=[v,m];for(u=0;u<b;u++)_.push(a.readUByte()),_.push(a.readUByte()),_.push(a.readUByte());i._insertSampleInOrder(i._txtTrack.samples,{type:3,pts:t.pts,bytes:_})}}}}}else if(p<a.bytesAvailable)for(u=0;u<p;u++)a.readUByte()}break;case 7:if(s=!0,l=!0,!n.sps){a=new x(e.data);var E=a.readSPS();n.width=E.width,n.height=E.height,n.pixelRatio=E.pixelRatio,n.sps=[e.data],n.duration=i._duration;var T=e.data.subarray(1,4),A="avc1.";for(u=0;u<3;u++){var S=T[u].toString(16);S.length<2&&(S="0"+S),A+=S}n.codec=A}break;case 8:s=!0,n.pps||(n.pps=[e.data]);break;case 9:s=!1,n.audFound=!0,o&&d(o,n),o=i.avcSample=c(!1,t.pts,t.dts,"");break;case 12:s=!1;break;default:s=!1,o&&(o.debug+="unknown NAL "+e.type+" ")}if(o&&s){o.units.push(e)}}),e&&o&&(d(o,n),this.avcSample=null)},t.prototype._insertSampleInOrder=function(t,e){var i=t.length;if(i>0){if(e.pts>=t[i-1].pts)t.push(e);else for(var n=i-1;n>=0;n--)if(e.pts<t[n].pts){t.splice(n,0,e);break}}else t.push(e)},t.prototype._getLastNalUnit=function(){var t=this.avcSample,e=void 0;if(!t||0===t.units.length){var i=this._avcTrack,n=i.samples;t=n[n.length-1]}if(t){var r=t.units;e=r[r.length-1]}return e},t.prototype._parseAVCNALu=function(t){var e=0,i=t.byteLength,n=void 0,r=void 0,a=this._avcTrack,o=a.naluState||0,s=o,l=[],u=void 0,d=void 0,c=-1,h=void 0;for(-1===o&&(c=0,h=31&t[0],o=0,e=1);e<i;)if(n=t[e++],o)if(1!==o)if(n)if(1===n){if(c>=0)u={data:t.subarray(c,e-o-1),type:h},l.push(u);else{var f=this._getLastNalUnit();if(f&&(s&&e<=4-s&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-s)),(r=e-o-1)>0)){var p=new Uint8Array(f.data.byteLength+r);p.set(f.data,0),p.set(t.subarray(0,r),f.data.byteLength),f.data=p}}e<i?(d=31&t[e],c=e,h=d,o=0):o=-1}else o=0;else o=3;else o=n?0:2;else o=n?0:1;if(c>=0&&o>=0&&(u={data:t.subarray(c,i),type:h,state:o},l.push(u)),0===l.length){var g=this._getLastNalUnit();if(g){var y=new Uint8Array(g.data.byteLength+t.byteLength);y.set(g.data,0),y.set(t,g.data.byteLength),g.data=y}}return a.naluState=o,l},t.prototype.discardEPB=function(t){for(var e=t.byteLength,i=[],n=1,r=void 0,a=void 0;n<e-2;)0===t[n]&&0===t[n+1]&&3===t[n+2]?(i.push(n+2),n+=2):n++;if(0===i.length)return t;r=e-i.length,a=new Uint8Array(r);var o=0;for(n=0;n<r;o++,n++)o===i[0]&&(o++,i.shift()),a[n]=t[o];return a},t.prototype._parseAACPES=function(t){var e=this._audioTrack,i=t.data,n=t.pts,r=this.aacOverFlow,a=this.aacLastPTS,o=void 0,l=void 0,c=void 0,f=void 0,p=void 0;if(r){var g=new Uint8Array(r.byteLength+i.byteLength);g.set(r,0),g.set(i,r.byteLength),i=g}for(c=0,p=i.length;c<p-1&&!s(i,c);c++);if(c){var y=void 0,v=void 0;if(c<p-1?(y="AAC PES did not start with ADTS header,offset:"+c,v=!1):(y="no ADTS header found in AAC PES",v=!0),R.b.warn("parsing error:"+y),this.observer.trigger(A.a.ERROR,{type:S.b.MEDIA_ERROR,details:S.a.FRAG_PARSING_ERROR,fatal:v,reason:y}),v)return}if(u(e,this.observer,i,c,this.audioCodec),l=0,o=d(e.samplerate),r&&a){var m=a+o;Math.abs(m-n)>1&&(R.b.log("AAC: align PTS for overlapping frames by "+Math.round((m-n)/90)),n=m)}for(;c<p;)if(s(i,c)&&c+5<p){var b=h(e,i,c,n,l);if(!b)break;c+=b.length,f=b.sample.pts,l++}else c++;r=c<p?i.subarray(c,p):null,this.aacOverFlow=r,this.aacLastPTS=f},t.prototype._parseMPEGPES=function(t){for(var e=t.data,i=e.length,n=0,r=0,a=t.pts;r<i;)if(O.isHeader(e,r)){var o=O.appendFrame(this._audioTrack,e,r,a,n);if(!o)break;r+=o.length,n++}else r++},t.prototype._parseID3PES=function(t){this._id3Track.samples.push(t)},t}(),U=B,G=function(){function t(e,i,n){v(this,t),this.observer=e,this.config=n,this.remuxer=i}return t.prototype.resetInitSegment=function(t,e,i,n){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:n,inputTimeScale:9e4}},t.prototype.resetTimeStamp=function(){},t.probe=function(t){var e=void 0,i=void 0,n=k.a.getID3Data(t,0);if(n&&void 0!==k.a.getTimeStamp(n))for(e=n.length,i=Math.min(t.length-1,e+100);e<i;e++)if(O.probe(t,e))return R.b.log("MPEG Audio sync word found !"),!0;return!1},t.prototype.append=function(t,e,i,n){for(var r=k.a.getID3Data(t,0),a=k.a.getTimeStamp(r),o=a?90*a:9e4*e,s=r.length,l=t.length,u=0,d=0,c=this._audioTrack,h=[{pts:o,dts:o,data:r}];s<l;)if(O.isHeader(t,s)){var f=O.appendFrame(c,t,s,o,u);if(!f)break;s+=f.length,d=f.sample.pts,u++}else k.a.isHeader(t,s)?(r=k.a.getID3Data(t,s),h.push({pts:d,dts:d,data:r}),s+=r.length):s++;this.remuxer.remux(c,{samples:[]},{samples:h,inputTimeScale:9e4},{samples:[]},e,i,n)},t.prototype.destroy=function(){},t}(),K=G,Y=function(){function t(){m(this,t)}return t.getSilentFrame=function(t,e){switch(t){case"mp4a.40.2":if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}(),j=Y,V=Math.pow(2,32)-1,H=function(){function t(){b(this,t)}return t.init=function(){t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var e=void 0;for(e in t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:i,audio:n};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=a,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,o,l,o,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,r))},t.box=function(t){for(var e=Array.prototype.slice.call(arguments,1),i=8,n=e.length,r=n,a=void 0;n--;)i+=e[n].byteLength;for(a=new Uint8Array(i),a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=255&i,a.set(t,4),n=0,i=8;n<r;n++)a.set(e[n],i),i+=e[n].byteLength;return a},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,i){i*=e;var n=Math.floor(i/(V+1)),r=Math.floor(i%(V+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,i,n){return t.box(t.types.moof,t.mfhd(e),t.traf(n,i))},t.moov=function(e){for(var i=e.length,n=[];i--;)n[i]=t.trak(e[i]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(t.mvex(e)))},t.mvex=function(e){for(var i=e.length,n=[];i--;)n[i]=t.trex(e[i]);return t.box.apply(null,[t.types.mvex].concat(n))},t.mvhd=function(e,i){i*=e;var n=Math.floor(i/(V+1)),r=Math.floor(i%(V+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,a)},t.sdtp=function(e){var i=e.samples||[],n=new Uint8Array(4+i.length),r=void 0,a=void 0;for(a=0;a<i.length;a++)r=i[a].flags,n[a+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return t.box(t.types.sdtp,n)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var i=[],n=[],r=void 0,a=void 0,o=void 0;for(r=0;r<e.sps.length;r++)a=e.sps[r],o=a.byteLength,i.push(o>>>8&255),i.push(255&o),i=i.concat(Array.prototype.slice.call(a));for(r=0;r<e.pps.length;r++)a=e.pps[r],o=a.byteLength,n.push(o>>>8&255),n.push(255&o),n=n.concat(Array.prototype.slice.call(a));var s=t.box(t.types.avcC,new Uint8Array([1,i[3],i[4],i[5],255,224|e.sps.length].concat(i).concat([e.pps.length]).concat(n))),l=e.width,u=e.height,d=e.pixelRatio[0],c=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,c>>24,c>>16&255,c>>8&255,255&c])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var i=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var i=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var i=e.id,n=e.duration*e.timescale,r=e.width,a=e.height,o=Math.floor(n/(V+1)),s=Math.floor(n%(V+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,a>>8&255,255&a,0,0]))},t.traf=function(e,i){var n=t.sdtp(e),r=e.id,a=Math.floor(i/(V+1)),o=Math.floor(i%(V+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),t.trun(e,n.length+16+20+8+16+8+8),n)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var i=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,i){var n=e.samples||[],r=n.length,a=12+16*r,o=new Uint8Array(a),s=void 0,l=void 0,u=void 0,d=void 0,c=void 0,h=void 0;for(i+=8+a,o.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0),s=0;s<r;s++)l=n[s],u=l.duration,d=l.size,c=l.flags,h=l.cts,o.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,d>>>24&255,d>>>16&255,d>>>8&255,255&d,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.paddingValue<<1|c.isNonSync,61440&c.degradPrio,15&c.degradPrio,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*s);return t.box(t.types.trun,o)},t.initSegment=function(e){t.types||t.init();var i=t.moov(e),n=void 0;return n=new Uint8Array(t.FTYP.byteLength+i.byteLength),n.set(t.FTYP),n.set(i,t.FTYP.byteLength),n},t}(),$=H,z=function(){function t(e,i,n,r){_(this,t),this.observer=e,this.config=i,this.typeSupported=n;var a=navigator.userAgent;this.isSafari=r&&r.indexOf("Apple")>-1&&a&&!a.match("CriOS"),this.ISGenerated=!1}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},t.prototype.resetInitSegment=function(){this.ISGenerated=!1},t.prototype.remux=function(t,e,i,n,r,a,o){if(this.ISGenerated||this.generateIS(t,e,r),this.ISGenerated){var s=t.samples.length,l=e.samples.length,u=r,d=r;if(s&&l){var c=(t.samples[0].dts-e.samples[0].dts)/e.inputTimeScale;u+=Math.max(0,c),d+=Math.max(0,-c)}if(s){t.timescale||(R.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,r));var h=this.remuxAudio(t,u,a,o);if(l){var f=void 0;h&&(f=h.endPTS-h.startPTS),e.timescale||(R.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,r)),this.remuxVideo(e,d,a,f,o)}}else if(l){var p=this.remuxVideo(e,d,a,0,o);p&&t.codec&&this.remuxEmptyAudio(t,u,a,p)}}i.samples.length&&this.remuxID3(i,r),n.samples.length&&this.remuxText(n,r),this.observer.trigger(A.a.FRAG_PARSED)},t.prototype.generateIS=function(t,e,i){var n=this.observer,r=t.samples,a=e.samples,o=this.typeSupported,s="audio/mp4",l={},u={tracks:l},d=void 0===this._initPTS,c=void 0,h=void 0;if(d&&(c=h=1/0),t.config&&r.length&&(t.timescale=t.samplerate,R.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(o.mpeg?(s="audio/mpeg",t.codec=""):o.mp3&&(t.codec="mp3")),l.audio={container:s,codec:t.codec,initSegment:!t.isAAC&&o.mpeg?new Uint8Array:$.initSegment([t]),metadata:{channelCount:t.channelCount}},d&&(c=h=r[0].pts-t.inputTimeScale*i)),e.sps&&e.pps&&a.length){var f=e.inputTimeScale;e.timescale=f,l.video={container:"video/mp4",codec:e.codec,initSegment:$.initSegment([e]),metadata:{width:e.width,height:e.height}},d&&(c=Math.min(c,a[0].pts-f*i),h=Math.min(h,a[0].dts-f*i),this.observer.trigger(A.a.INIT_PTS_FOUND,{initPTS:c}))}Object.keys(l).length?(n.trigger(A.a.FRAG_PARSING_INIT_SEGMENT,u),this.ISGenerated=!0,d&&(this._initPTS=c,this._initDTS=h)):n.trigger(A.a.ERROR,{type:S.b.MEDIA_ERROR,details:S.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.prototype.remuxVideo=function(t,e,i,n,r){var a=8,o=t.timescale,s=void 0,l=void 0,u=void 0,d=void 0,c=void 0,h=void 0,f=void 0,p=t.samples,g=[],y=p.length,v=this._PTSNormalize,m=this._initDTS,b=this.nextAvcDts,_=this.isSafari;if(0!==y){_&&(i|=p.length&&b&&(r&&Math.abs(e-b/o)<.1||Math.abs(p[0].pts-b-m)<o/5)),i||(b=e*o),p.forEach(function(t){t.pts=v(t.pts-m,b),t.dts=v(t.dts-m,b)}),p.sort(function(t,e){var i=t.dts-e.dts,n=t.pts-e.pts;return i||n||t.id-e.id});var E=p.reduce(function(t,e){return Math.max(Math.min(t,e.pts-e.dts),-18e3)},0);if(E<0){R.b.warn("PTS < DTS detected in video samples, shifting DTS by "+Math.round(E/90)+" ms to overcome this issue");for(var T=0;T<p.length;T++)p[T].dts+=E}var L=p[0];c=Math.max(L.dts,0),d=Math.max(L.pts,0);var k=Math.round((c-b)/90);i&&k&&(k>1?R.b.log("AVC:"+k+" ms hole between fragments detected,filling it"):k<-1&&R.b.log("AVC:"+-k+" ms overlapping between fragments detected"),c=b,p[0].dts=c,d=Math.max(d-k,b),p[0].pts=d,R.b.log("Video/PTS/DTS adjusted: "+Math.round(d/90)+"/"+Math.round(c/90)+",delta:"+k+" ms")),c,L=p[p.length-1],f=Math.max(L.dts,0),h=Math.max(L.pts,0,f),_&&(s=Math.round((f-c)/(p.length-1)));for(var w=0,C=0,I=0;I<y;I++){for(var D=p[I],O=D.units,P=O.length,x=0,N=0;N<P;N++)x+=O[N].data.length;C+=x,w+=P,D.length=x,D.dts=_?c+I*s:Math.max(D.dts,c),D.pts=Math.max(D.pts,D.dts)}var M=C+4*w+8;try{l=new Uint8Array(M)}catch(t){return void this.observer.trigger(A.a.ERROR,{type:S.b.MUX_ERROR,details:S.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:M,reason:"fail allocating video mdat "+M})}var F=new DataView(l.buffer);F.setUint32(0,M),l.set($.types.mdat,4);for(var B=0;B<y;B++){for(var U=p[B],G=U.units,K=0,Y=void 0,j=0,V=G.length;j<V;j++){var H=G[j],z=H.data,W=H.data.byteLength;F.setUint32(a,W),a+=4,l.set(z,a),a+=W,K+=4+W}if(_)Y=Math.max(0,s*Math.round((U.pts-U.dts)/s));else{if(B<y-1)s=p[B+1].dts-U.dts;else{var q=this.config,X=U.dts-p[B>0?B-1:B].dts;if(q.stretchShortVideoTrack){var Z=q.maxBufferHole,J=Math.floor(Z*o),Q=(n?d+n*o:this.nextAudioPts)-U.pts;Q>J?(s=Q-X,s<0&&(s=X),R.b.log("It is approximately "+Q/90+" ms to the next segment; using duration "+s/90+" ms for the last video frame.")):s=X}else s=X}Y=Math.round(U.pts-U.dts)}g.push({size:K,duration:s,cts:Y,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:U.key?2:1,isNonSync:U.key?0:1}})}this.nextAvcDts=f+s;var tt=t.dropped;if(t.len=0,t.nbNalu=0,t.dropped=0,g.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var et=g[0].flags;et.dependsOn=2,et.isNonSync=0}t.samples=g,u=$.moof(t.sequenceNumber++,c,t),t.samples=[];var it={data1:u,data2:l,startPTS:d/o,endPTS:(h+s)/o,startDTS:c/o,endDTS:this.nextAvcDts/o,type:"video",hasAudio:!1,hasVideo:!0,nb:g.length,dropped:tt};return this.observer.trigger(A.a.FRAG_PARSING_DATA,it),it}},t.prototype.remuxAudio=function(t,e,i,n){var r=t.inputTimeScale,a=t.timescale,o=r/a,s=t.isAAC?1024:1152,l=s*o,u=this._PTSNormalize,d=this._initDTS,c=!t.isAAC&&this.typeSupported.mpeg,h=void 0,f=void 0,p=void 0,g=void 0,y=void 0,v=void 0,m=void 0,b=t.samples,_=[],E=this.nextAudioPts;if(i|=b.length&&E&&(n&&Math.abs(e-E/r)<.1||Math.abs(b[0].pts-E-d)<20*l),b.forEach(function(t){t.pts=t.dts=u(t.pts-d,e*r)}),b=b.filter(function(t){return t.pts>=0}),0!==b.length){if(i||(E=n?e*r:b[0].pts),t.isAAC)for(var T=this.config.maxAudioFramesDrift,L=0,k=E;L<b.length;){var w,C=b[L],I=C.pts;w=I-k;var D=Math.abs(1e3*w/r);if(w<=-T*l)R.b.warn("Dropping 1 audio frame @ "+(k/r).toFixed(3)+"s due to "+Math.round(D)+" ms overlap."),b.splice(L,1),t.len-=C.unit.length;else if(w>=T*l&&D<1e4&&k){var O=Math.round(w/l);R.b.warn("Injecting "+O+" audio frame @ "+(k/r).toFixed(3)+"s due to "+Math.round(1e3*w/r)+" ms gap.");for(var P=0;P<O;P++){var x=Math.max(k,0);p=j.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),p||(R.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),p=C.unit.subarray()),b.splice(L,0,{unit:p,pts:x,dts:x}),t.len+=p.length,k+=l,L++}C.pts=C.dts=k,k+=l,L++}else Math.abs(w),C.pts=C.dts=k,k+=l,L++}for(var N=0,M=b.length;N<M;N++){var F=b[N],B=F.unit,U=F.pts;if(void 0!==m)f.duration=Math.round((U-m)/o);else{var G=Math.round(1e3*(U-E)/r),K=0;if(i&&t.isAAC&&G){if(G>0&&G<1e4)K=Math.round((U-E)/l),R.b.log(G+" ms hole between AAC samples detected,filling it"),K>0&&(p=j.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),p||(p=B.subarray()),t.len+=K*p.length);else if(G<-12){R.b.log("drop overlapping AAC sample, expected/parsed/delta:"+(E/r).toFixed(3)+"s/"+(U/r).toFixed(3)+"s/"+-G+"ms"),t.len-=B.byteLength;continue}U=E}if(v=U,!(t.len>0))return;var Y=c?t.len:t.len+8;h=c?0:8;try{g=new Uint8Array(Y)}catch(t){return void this.observer.trigger(A.a.ERROR,{type:S.b.MUX_ERROR,details:S.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:Y,reason:"fail allocating audio mdat "+Y})}if(!c){new DataView(g.buffer).setUint32(0,Y),g.set($.types.mdat,4)}for(var V=0;V<K;V++)p=j.getSilentFrame(t.manifestCodec||t.codec,t.channelCount),p||(R.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),p=B.subarray()),g.set(p,h),h+=p.byteLength,f={size:p.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},_.push(f)}g.set(B,h);var H=B.byteLength;h+=H,f={size:H,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},_.push(f),m=U}var z=0,W=_.length;if(W>=2&&(z=_[W-2].duration,f.duration=z),W){this.nextAudioPts=E=m+o*z,t.len=0,t.samples=_,y=c?new Uint8Array:$.moof(t.sequenceNumber++,v/o,t),t.samples=[];var q=v/r,X=E/r,Z={data1:y,data2:g,startPTS:q,endPTS:X,startDTS:q,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:W};return this.observer.trigger(A.a.FRAG_PARSING_DATA,Z),Z}return null}},t.prototype.remuxEmptyAudio=function(t,e,i,n){var r=t.inputTimeScale,a=t.samplerate?t.samplerate:r,o=r/a,s=this.nextAudioPts,l=(void 0!==s?s:n.startDTS*r)+this._initDTS,u=n.endDTS*r+this._initDTS,d=1024*o,c=Math.ceil((u-l)/d),h=j.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(R.b.warn("remux empty Audio"),!h)return void R.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!");for(var f=[],p=0;p<c;p++){var g=l+p*d;f.push({unit:h,pts:g,dts:g}),t.len+=h.length}t.samples=f,this.remuxAudio(t,e,i)},t.prototype.remuxID3=function(t,e){var i=t.samples.length,n=void 0,r=t.inputTimeScale,a=this._initPTS,o=this._initDTS;if(i){for(var s=0;s<i;s++)n=t.samples[s],n.pts=(n.pts-a)/r,n.dts=(n.dts-o)/r;this.observer.trigger(A.a.FRAG_PARSING_METADATA,{samples:t.samples})}t.samples=[],e=e},t.prototype.remuxText=function(t,e){t.samples.sort(function(t,e){return t.pts-e.pts});var i=t.samples.length,n=void 0,r=t.inputTimeScale,a=this._initPTS;if(i){for(var o=0;o<i;o++)n=t.samples[o],n.pts=(n.pts-a)/r;this.observer.trigger(A.a.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[],e=e},t.prototype._PTSNormalize=function(t,e){var i=void 0;if(void 0===e)return t;for(i=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=i;return t},t}(),W=z,q=function(){function t(e){E(this,t),this.observer=e}return t.prototype.destroy=function(){},t.prototype.resetTimeStamp=function(){},t.prototype.resetInitSegment=function(){},t.prototype.remux=function(t,e,i,n,r,a,o,s){var l=this.observer,u="";t&&(u+="audio"),e&&(u+="video"),l.trigger(A.a.FRAG_PARSING_DATA,{data1:s,startPTS:r,startDTS:r,type:u,hasAudio:!!t,hasVideo:!!e,nb:1,dropped:0}),l.trigger(A.a.FRAG_PARSED)},t}(),X=q,Z=function(){function t(e,i,n,r){T(this,t),this.observer=e,this.typeSupported=i,this.config=n,this.vendor=r}return t.prototype.destroy=function(){var t=this.demuxer;t&&t.destroy()},t.prototype.push=function(t,e,i,n,r,a,o,s,l,u,d,c){if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var h=this.decrypter;null==h&&(h=this.decrypter=new L.a(this.observer,this.config));var f=this,p=void 0;try{p=performance.now()}catch(t){p=Date.now()}h.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var h=void 0;try{h=performance.now()}catch(t){h=Date.now()}f.observer.trigger(A.a.FRAG_DECRYPTED,{stats:{tstart:p,tdecrypt:h}}),f.pushDecrypted(new Uint8Array(t),e,new Uint8Array(i),n,r,a,o,s,l,u,d,c)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(i),n,r,a,o,s,l,u,d,c)},t.prototype.pushDecrypted=function(t,e,i,n,r,a,o,s,l,u,d,c){var h=this.demuxer;if(!h||(o||s)&&!this.probe(t)){for(var f=this.observer,p=this.typeSupported,g=this.config,y=[{demux:U,remux:W},{demux:I.a,remux:X},{demux:C,remux:W},{demux:K,remux:W}],v=0,m=y.length;v<m;v++){var b=y[v],_=b.demux.probe;if(_(t)){var E=this.remuxer=new b.remux(f,g,p,this.vendor);h=new b.demux(f,E,g,p),this.probe=_;break}}if(!h)return void f.trigger(A.a.ERROR,{type:S.b.MEDIA_ERROR,details:S.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=h}var T=this.remuxer;(o||s)&&(h.resetInitSegment(i,n,r,u),T.resetInitSegment()),o&&(h.resetTimeStamp(c),T.resetTimeStamp(c)),"function"==typeof h.setDecryptData&&h.setDecryptData(e),h.append(t,a,l,d)},t}();e.a=Z},function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){var i=se[e];return!!i&&!0===i[t.slice(0,4)]}function l(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 h(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)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(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 g(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)}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(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 m(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)}function b(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(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)}function S(t,e,i){var n=t[e],r=t[i],a=r.startPTS;isNaN(a)?r.start=i>e?n.start+n.duration:Math.max(n.start-r.duration,0):i>e?(n.duration=a-n.start,n.duration<0&&Ht.b.warn("negative duration computed for frag "+n.sn+",level "+n.level+", there should be some duration drift between playlist and fragment!")):(r.duration=n.start-a,r.duration<0&&Ht.b.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!"))}function L(t,e,i,n,r,a){var o=i;if(!isNaN(e.startPTS)){var s=Math.abs(e.startPTS-i);isNaN(e.deltaPTS)?e.deltaPTS=s:e.deltaPTS=Math.max(s,e.deltaPTS),o=Math.max(i,e.startPTS),i=Math.min(i,e.startPTS),n=Math.max(n,e.endPTS),r=Math.min(r,e.startDTS),a=Math.max(a,e.endDTS)}var l=i-e.start;e.start=e.startPTS=i,e.maxStartPTS=o,e.endPTS=n,e.startDTS=r,e.endDTS=a,e.duration=n-i;var u=e.sn;if(!t||u<t.startSN||u>t.endSN)return 0;var d=void 0,c=void 0,h=void 0;for(d=u-t.startSN,c=t.fragments,c[d]=e,h=d;h>0;h--)S(c,h,h-1);for(h=d;h<c.length-1;h++)S(c,h,h+1);return t.PTSKnown=!0,l}function R(t,e){var i=Math.max(t.startSN,e.startSN)-e.startSN,n=Math.min(t.endSN,e.endSN)-e.startSN,r=e.startSN-t.startSN,a=t.fragments,o=e.fragments,s=0,l=void 0;if(e.initSegment&&t.initSegment&&(e.initSegment=t.initSegment),n<i)return void(e.PTSKnown=!1);for(var u=i;u<=n;u++){var d=a[r+u],c=o[u];c&&d&&(s=d.cc-c.cc,isNaN(d.startPTS)||(c.start=c.startPTS=d.startPTS,c.endPTS=d.endPTS,c.duration=d.duration,c.backtracked=d.backtracked,c.dropped=d.dropped,l=c))}if(s)for(Ht.b.log("discontinuity sliding from playlist, take drift into account"),u=0;u<o.length;u++)o[u].cc+=s;if(l)L(e,l,l.startPTS,l.endPTS,l.startDTS,l.endDTS);else if(r>=0&&r<a.length){var h=a[r].start;for(u=0;u<o.length;u++)o[u].start+=h}e.PTSKnown=t.PTSKnown}function k(t,e){for(var i=null,n=0;n<t.length;n+=1){var r=t[n];if(r&&r.cc===e){i=r;break}}return i}function w(t,e){return Se.search(t,function(t){return t.cc<e?1:t.cc>e?-1:0})}function C(t,e,i){var n=!1;return e&&e.details&&i&&(i.endCC>i.startCC||t&&t.cc<i.startCC)&&(n=!0),n}function I(t,e){var i=t.fragments,n=e.fragments;if(!n.length||!i.length)return void Ht.b.log("No fragments to align");var r=k(i,n[0].cc);return!r||r&&!r.startPTS?void Ht.b.log("No frag in previous level to align on"):r}function D(t,e){e.fragments.forEach(function(e){if(e){var i=e.start+t;e.start=e.startPTS=i,e.endPTS=i+e.duration}}),e.PTSKnown=!0}function O(t,e,i){if(C(t,e,i)){var n=I(e.details,i);n&&(Ht.b.log("Adjusting PTS using last level due to CC increase within current level"),D(n.start,i))}if(!1===i.PTSKnown&&e&&e.details&&e.details.fragments&&e.details.fragments.length){var r=e.details.programDateTime,a=i.programDateTime,o=(a-r)/1e3+e.details.fragments[0].start;isNaN(o)||(Ht.b.log("adjusting PTS using programDateTime delta, sliding:"+o.toFixed(3)),D(o,i))}}function P(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(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 N(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)}function M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F(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 B(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)}function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(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 K(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)}function Y(t,e){var i=null;try{i=new window.Event("addtrack")}catch(t){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=t,e.dispatchEvent(i)}function j(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}function V(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(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 $(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)}function z(){var t=b(),e=window.SourceBuffer||window.WebKitSourceBuffer,i=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!i&&!!n}function W(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z(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 J(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)}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(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 et(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)}function it(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(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 rt(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)}function at(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ot(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 st(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)}function lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(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 ct(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)}function ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ft(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 pt(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)}function gt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new Ti,this.regionList=[]}function yt(t){function e(t,e,i,n){return 3600*(0|t)+60*(0|e)+(0|i)+(0|n)/1e3}var i=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function vt(){this.values=Object.create(null)}function mt(t,e,i,n){var r=n?t.split(n):[t];for(var a in r)if("string"==typeof r[a]){var o=r[a].split(i);if(2===o.length){var s=o[0],l=o[1];e(s,l)}}}function bt(t,e,i){function n(){var e=yt(t);if(null===e)throw new Error("Malformed timestamp: "+a);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function r(){t=t.replace(/^\s+/,"")}var a=t;if(r(),e.startTime=n(),r(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+a);t=t.substr(3),r(),e.endTime=n(),r(),function(t,e){var n=new vt;mt(t,function(t,e){switch(t){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===e){n.set(t,i[r].region);break}break;case"vertical":n.alt(t,e,["rl","lr"]);break;case"line":var a=e.split(","),o=a[0];n.integer(t,o),n.percent(t,o)&&n.set("snapToLines",!1),n.alt(t,o,["auto"]),2===a.length&&n.alt("lineAlign",a[1],["start",Si,"end"]);break;case"position":a=e.split(","),n.percent(t,a[0]),2===a.length&&n.alt("positionAlign",a[1],["start",Si,"end","line-left","line-right","auto"]);break;case"size":n.percent(t,e);break;case"align":n.alt(t,e,["start",Si,"end","left","right"])}},/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical","");var r=n.get("line","auto");"auto"===r&&-1===Ai.line&&(r=-1),e.line=r,e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100),e.align=n.get("align",Si);var a=n.get("position","auto");"auto"===a&&50===Ai.position&&(a="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=a}(t,e)}function _t(t){return t.replace(/<br(?: \/)?>/gi,"\n")}function Et(t,e,i,n){for(var r=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=window.VTTCue||window.TextTrackCue,d=0;d<n.rows.length;d++)if(r=n.rows[d],o=!0,s=0,l="",!r.isEmpty()){for(var c=0;c<r.chars.length;c++)r.chars[c].uchar.match(/\s/)&&o?s++:(l+=r.chars[c].uchar,o=!1);r.cueStartTime=e,e===i&&(i+=1e-4),a=new u(e,i,_t(l.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?a.line=d+1:a.line=d>7?d-2:d+1,a.align="left",a.position=Math.max(0,Math.min(100,s/32*100+(navigator.userAgent.match(/Firefox\//)?50:0))),t.addCue(a)}}function Tt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function At(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function St(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lt(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 Rt(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)}function kt(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function wt(t,e,i,n){return Math.min(e,n)-Math.max(t,i)}function Ct(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function It(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 Dt(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)}function Ot(t){for(var e=[],i=0;i<t.length;i++)"subtitles"===t[i].kind&&e.push(t[i]);return e}function Pt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xt(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 Nt(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)}function Mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ft(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 Bt(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)}function Ut(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var Gt={};i.d(Gt,"newCue",function(){return Et});var Kt=i(3),Yt=i.n(Kt),jt=i(2),Vt=i(1),Ht=i(0),$t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zt=new Set(["hlsEventGeneric","hlsHandlerDestroying","hlsHandlerDestroyed"]),Wt=function(){function t(e){n(this,t),this.hls=e,this.onEvent=this.onEvent.bind(this);for(var i=arguments.length,r=Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];this.handledEvents=r,this.useGenericHandler=!0,this.registerListeners()}return t.prototype.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.prototype.onHandlerDestroying=function(){},t.prototype.onHandlerDestroyed=function(){},t.prototype.isEventHandler=function(){return"object"===$t(this.handledEvents)&&this.handledEvents.length&&"function"==typeof this.onEvent},t.prototype.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if(zt.has(t))throw new Error("Forbidden event-name: "+t);this.hls.on(t,this.onEvent)},this)},t.prototype.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)},this)},t.prototype.onEvent=function(t,e){this.onEventGeneric(t,e)},t.prototype.onEventGeneric=function(t,e){var i=function(t,e){var i="on"+t.replace("hls","");if("function"!=typeof this[i])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+i+")");return this[i].bind(this,e)};try{i.call(this,t,e).call()}catch(e){Ht.b.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.hls.trigger(Vt.a.ERROR,{type:jt.b.OTHER_ERROR,details:jt.a.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}},t}(),qt=Wt,Xt=i(7),Zt=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),Jt=function(){function t(){r(this,t),this.method=null,this.key=null,this.iv=null,this._uri=null}return Zt(t,[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Yt.a.buildAbsoluteURL(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}]),t}(),Qt=Jt,te=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),ee=function(){function t(){var e;a(this,t),this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[],this._elementaryStreams=(e={},e[t.ElementaryStreamTypes.AUDIO]=!1,e[t.ElementaryStreamTypes.VIDEO]=!1,e)}return t.prototype.addElementaryStream=function(t){this._elementaryStreams[t]=!0},t.prototype.hasElementaryStream=function(t){return!0===this._elementaryStreams[t]},t.prototype.createInitializationVector=function(t){for(var e=new Uint8Array(16),i=12;i<16;i++)e[i]=t>>8*(15-i)&255;return e},t.prototype.fragmentDecryptdataFromLevelkey=function(t,e){var i=t;return t&&t.method&&t.uri&&!t.iv&&(i=new Qt,i.method=t.method,i.baseuri=t.baseuri,i.reluri=t.reluri,i.iv=this.createInitializationVector(e)),i},te(t,[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Yt.a.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"programDateTime",get:function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime}},{key:"byteRange",get:function(){if(!this._byteRange&&!this.rawByteRange)return[];if(this._byteRange)return this._byteRange;var t=[];if(this.rawByteRange){var e=this.rawByteRange.split("@",2);if(1===e.length){var i=this.lastByteRangeEndOffset;t[0]=i||0}else t[0]=parseInt(e[1]);t[1]=parseInt(e[0])+t[0],this._byteRange=t}return t}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata}}],[{key:"ElementaryStreamTypes",get:function(){return{AUDIO:"audio",VIDEO:"video"}}}]),t}(),ie=ee,ne=/^(\d+)x(\d+)$/,re=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,ae=function(){function t(e){o(this,t),"string"==typeof e&&(e=t.parseAttrList(e));for(var i in e)e.hasOwnProperty(i)&&(this[i]=e[i])}return t.prototype.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var i=new Uint8Array(e.length/2),n=0;n<e.length/2;n++)i[n]=parseInt(e.slice(2*n,2*n+2),16);return i}return null},t.prototype.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},t.prototype.decimalFloatingPoint=function(t){return parseFloat(this[t])},t.prototype.enumeratedString=function(t){return this[t]},t.prototype.decimalResolution=function(t){var e=ne.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e=void 0,i={};for(re.lastIndex=0;null!==(e=re.exec(t));){var n=e[2];0===n.indexOf('"')&&n.lastIndexOf('"')===n.length-1&&(n=n.slice(1,-1)),i[e[1]]=n}return i},t}(),oe=ae,se={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}},le=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,ue=/#EXT-X-MEDIA:(.*)/g,de=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),ce=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,he=function(){function t(){u(this,t)}return t.findGroup=function(t,e){if(!t)return null;for(var i=null,n=0;n<t.length;n++){var r=t[n];r.id===e&&(i=r)}return i},t.convertAVC1ToAVCOTI=function(t){var e=void 0,i=t.split(".");return i.length>2?(e=i.shift()+".",e+=parseInt(i.shift()).toString(16),e+=("000"+parseInt(i.shift()).toString(16)).substr(-4)):e=t,e},t.resolve=function(t,e){return Yt.a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,i){var n=[],r=void 0;for(le.lastIndex=0;null!=(r=le.exec(e));){var a={},o=a.attrs=new oe(r[1]);a.url=t.resolve(r[2],i);var l=o.decimalResolution("RESOLUTION");l&&(a.width=l.width,a.height=l.height),a.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),a.name=o.NAME,function(t,e){["video","audio"].forEach(function(i){var n=t.filter(function(t){return s(t,i)});if(n.length){var r=n.filter(function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)});e[i+"Codec"]=r.length>0?r[0]:n[0],t=t.filter(function(t){return-1===n.indexOf(t)})}}),e.unknownCodecs=t}([].concat((o.CODECS||"").split(/[ ,]+/)),a),a.videoCodec&&-1!==a.videoCodec.indexOf("avc1")&&(a.videoCodec=t.convertAVC1ToAVCOTI(a.videoCodec)),n.push(a)}return n},t.parseMasterPlaylistMedia=function(e,i,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=void 0,o=[],s=0;for(ue.lastIndex=0;null!==(a=ue.exec(e));){var l={},u=new oe(a[1]);if(u.TYPE===n){if(l.groupId=u["GROUP-ID"],l.name=u.NAME,l.type=n,l.default="YES"===u.DEFAULT,l.autoselect="YES"===u.AUTOSELECT,l.forced="YES"===u.FORCED,u.URI&&(l.url=t.resolve(u.URI,i)),l.lang=u.LANGUAGE,l.name||(l.name=l.lang),r.length){var d=t.findGroup(r,l.groupId);l.audioCodec=d?d.codec:r[0].codec}l.id=s++,o.push(l)}}return o},t.parseLevelPlaylist=function(t,e,i,n){var r=0,a=0,o={type:null,version:null,url:e,fragments:[],live:!0,startSN:0},s=new Qt,l=0,u=null,d=new ie,c=void 0,h=void 0;for(de.lastIndex=0;null!==(c=de.exec(t));){var f=c[1];if(f){d.duration=parseFloat(f);var p=(" "+c[2]).slice(1);d.title=p||null,d.tagList.push(p?["INF",f,p]:["INF",f])}else if(c[3]){if(!isNaN(d.duration)){var g=r++;d.type=n,d.start=a,d.levelkey=s,d.sn=g,d.level=i,d.cc=l,d.baseurl=e,d.relurl=(" "+c[3]).slice(1),o.programDateTime&&(u?d.rawProgramDateTime?d.pdt=Date.parse(d.rawProgramDateTime):d.pdt=u.pdt+1e3*u.duration:d.pdt=Date.parse(o.programDateTime),d.endPdt=d.pdt+1e3*d.duration),o.fragments.push(d),u=d,a+=d.duration,d=new ie}}else if(c[4]){if(d.rawByteRange=(" "+c[4]).slice(1),u){var y=u.byteRangeEndOffset;y&&(d.lastByteRangeEndOffset=y)}}else if(c[5])d.rawProgramDateTime=(" "+c[5]).slice(1),d.tagList.push(["PROGRAM-DATE-TIME",d.rawProgramDateTime]),void 0===o.programDateTime&&(o.programDateTime=new Date(new Date(Date.parse(c[5]))-1e3*a));else{for(c=c[0].match(ce),h=1;h<c.length&&void 0===c[h];h++);var v=(" "+c[h+1]).slice(1),m=(" "+c[h+2]).slice(1);switch(c[h]){case"#":d.tagList.push(m?[v,m]:[v]);break;case"PLAYLIST-TYPE":o.type=v.toUpperCase();break;case"MEDIA-SEQUENCE":r=o.startSN=parseInt(v);break;case"TARGETDURATION":o.targetduration=parseFloat(v);break;case"VERSION":o.version=parseInt(v);break;case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"DIS":l++,d.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":l=parseInt(v);break;case"KEY":var b=v,_=new oe(b),E=_.enumeratedString("METHOD"),T=_.URI,A=_.hexadecimalInteger("IV");E&&(s=new Qt,T&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(E)>=0&&(s.method=E,s.baseuri=e,s.reluri=T,s.key=null,s.iv=A));break;case"START":var S=v,L=new oe(S),R=L.decimalFloatingPoint("TIME-OFFSET");isNaN(R)||(o.startTimeOffset=R);break;case"MAP":var k=new oe(v);d.relurl=k.URI,d.rawByteRange=k.BYTERANGE,d.baseurl=e,d.level=i,d.type=n,d.sn="initSegment",o.initSegment=d,d=new ie;break;default:Ht.b.warn("line parsed but not handled: "+c)}}}return d=u,d&&!d.relurl&&(o.fragments.pop(),a-=d.duration),o.totalduration=a,o.averagetargetduration=a/o.fragments.length,o.endSN=r-1,o.startCC=o.fragments[0]?o.fragments[0].cc:0,o.endCC=l,!o.initSegment&&o.fragments.length&&o.fragments.every(function(t){return t.relurl.endsWith(".mp4")})&&(Ht.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),d=new ie,d.relurl=o.fragments[0].relurl,d.baseurl=e,d.level=i,d.type=n,d.sn="initSegment",o.initSegment=d,o.needSidxRanges=!0),o},t}(),fe=he,pe=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),ge={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ye={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"},ve=function(t){function e(i){d(this,e);var n=c(this,t.call(this,i,Vt.a.MANIFEST_LOADING,Vt.a.LEVEL_LOADING,Vt.a.AUDIO_TRACK_LOADING,Vt.a.SUBTITLE_TRACK_LOADING));return n.loaders={},n}return h(e,t),e.canHaveQualityLevels=function(t){return t!==ge.AUDIO_TRACK&&t!==ge.SUBTITLE_TRACK},e.mapContextToLevelType=function(t){switch(t.type){case ge.AUDIO_TRACK:return ye.AUDIO;case ge.SUBTITLE_TRACK:return ye.SUBTITLE;default:return ye.MAIN}},e.getResponseUrl=function(t,e){var i=t.url;return void 0!==i&&0!==i.indexOf("data:")||(i=e.url),i},e.prototype.createInternalLoader=function(t){var e=this.hls.config,i=e.pLoader,n=e.loader,r=i||n,a=new r(e);return t.loader=a,this.loaders[t.type]=a,a},e.prototype.getInternalLoader=function(t){return this.loaders[t.type]},e.prototype.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.prototype.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.prototype.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},e.prototype.onManifestLoading=function(t){this.load(t.url,{type:ge.MANIFEST})},e.prototype.onLevelLoading=function(t){this.load(t.url,{type:ge.LEVEL,level:t.level,id:t.id})},e.prototype.onAudioTrackLoading=function(t){this.load(t.url,{type:ge.AUDIO_TRACK,id:t.id})},e.prototype.onSubtitleTrackLoading=function(t){this.load(t.url,{type:ge.SUBTITLE_TRACK,id:t.id})},e.prototype.load=function(t,e){var i=this.hls.config,n=this.getInternalLoader(e);if(n){var r=n.context;if(r&&r.url===t)return Ht.b.trace("playlist request ongoing"),!1;Ht.b.warn("aborting previous loader for type: "+e.type),n.abort()}var a=void 0,o=void 0,s=void 0,l=void 0;switch(e.type){case ge.MANIFEST:a=i.manifestLoadingMaxRetry,o=i.manifestLoadingTimeOut,s=i.manifestLoadingRetryDelay,l=i.manifestLoadingMaxRetryTimeout;break;case ge.LEVEL:a=0,o=i.levelLoadingTimeOut;break;default:a=i.levelLoadingMaxRetry,o=i.levelLoadingTimeOut,s=i.levelLoadingRetryDelay,l=i.levelLoadingMaxRetryTimeout,Ht.b.log("Playlist loader for "+e.type+" "+(e.level||e.id))}n=this.createInternalLoader(e),e.url=t,e.responseType=e.responseType||"";var u=void 0,d=void 0;return u={timeout:o,maxRetry:a,retryDelay:s,maxRetryDelay:l},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},n.load(e,u,d),!0},e.prototype.loadsuccess=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(i.isSidxRequest)return this._handleSidxRequest(t,i),void this._handlePlaylistLoaded(t,e,i,n);this.resetInternalLoader(i.type);var r=t.data;if(e.tload=performance.now(),0!==r.indexOf("#EXTM3U"))return void this._handleManifestParsingError(t,i,"no EXTM3U delimiter",n);r.indexOf("#EXTINF:")>0||r.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(t,e,i,n):this._handleMasterPlaylist(t,e,i,n)},e.prototype.loaderror=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,i)},e.prototype.loadtimeout=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._handleNetworkError(e,i,!0)},e.prototype._handleMasterPlaylist=function(t,i,n,r){var a=this.hls,o=t.data,s=e.getResponseUrl(t,n),l=fe.parseMasterPlaylist(o,s);if(!l.length)return void this._handleManifestParsingError(t,n,"no level found in manifest",r);var u=l.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),d=fe.parseMasterPlaylistMedia(o,s,"AUDIO",u),c=fe.parseMasterPlaylistMedia(o,s,"SUBTITLES");if(d.length){var h=!1;d.forEach(function(t){t.url||(h=!0)}),!1===h&&l[0].audioCodec&&!l[0].attrs.AUDIO&&(Ht.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),d.unshift({type:"main",name:"main"}))}a.trigger(Vt.a.MANIFEST_LOADED,{levels:l,audioTracks:d,subtitles:c,url:s,stats:i,networkDetails:r})},e.prototype._handleTrackOrLevelPlaylist=function(t,i,n,r){var a=this.hls,o=n.id,s=n.level,l=n.type,u=e.getResponseUrl(t,n),d=isNaN(s)?isNaN(o)?0:o:s,c=e.mapContextToLevelType(n),h=fe.parseLevelPlaylist(t.data,u,d,c);if(h.tload=i.tload,l===ge.MANIFEST){var f={url:u,details:h};a.trigger(Vt.a.MANIFEST_LOADED,{levels:[f],audioTracks:[],url:u,stats:i,networkDetails:r})}if(i.tparsed=performance.now(),h.needSidxRanges){var p=h.initSegment.url;return void this.load(p,{isSidxRequest:!0,type:l,level:s,levelDetails:h,id:o,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}n.levelDetails=h,this._handlePlaylistLoaded(t,i,n,r)},e.prototype._handleSidxRequest=function(t,e){var i=Xt.a.parseSegmentIndex(new Uint8Array(t.data));i.references.forEach(function(t,i){var n=t.info,r=e.levelDetails.fragments[i];0===r.byteRange.length&&(r.rawByteRange=String(1+n.end-n.start)+"@"+String(n.start))}),e.levelDetails.initSegment.rawByteRange=String(i.moovEndOffset)+"@0"},e.prototype._handleManifestParsingError=function(t,e,i,n){this.hls.trigger(Vt.a.ERROR,{type:jt.b.NETWORK_ERROR,details:jt.a.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:i,networkDetails:n})},e.prototype._handleNetworkError=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=void 0,r=void 0,a=this.getInternalLoader(t);switch(t.type){case ge.MANIFEST:n=i?jt.a.MANIFEST_LOAD_TIMEOUT:jt.a.MANIFEST_LOAD_ERROR,r=!0;break;case ge.LEVEL:n=i?jt.a.LEVEL_LOAD_TIMEOUT:jt.a.LEVEL_LOAD_ERROR,r=!1;break;case ge.AUDIO_TRACK:n=i?jt.a.AUDIO_TRACK_LOAD_TIMEOUT:jt.a.AUDIO_TRACK_LOAD_ERROR,r=!1;break;default:r=!1}a&&(a.abort(),this.resetInternalLoader(t.type)),this.hls.trigger(Vt.a.ERROR,{type:jt.b.NETWORK_ERROR,details:n,fatal:r,url:a.url,loader:a,context:t,networkDetails:e})},e.prototype._handlePlaylistLoaded=function(t,i,n,r){var a=n.type,o=n.level,s=n.id,l=n.levelDetails;if(!l.targetduration)return void this._handleManifestParsingError(t,n,"invalid target duration",r);if(e.canHaveQualityLevels(n.type))this.hls.trigger(Vt.a.LEVEL_LOADED,{details:l,level:o||0,id:s||0,stats:i,networkDetails:r});else switch(a){case ge.AUDIO_TRACK:this.hls.trigger(Vt.a.AUDIO_TRACK_LOADED,{details:l,id:s,stats:i,networkDetails:r});break;case ge.SUBTITLE_TRACK:this.hls.trigger(Vt.a.SUBTITLE_TRACK_LOADED,{details:l,id:s,stats:i,networkDetails:r})}},pe(e,null,[{key:"ContextType",get:function(){return ge}},{key:"LevelType",get:function(){return ye}}]),e}(qt),me=ve,be=function(t){function e(i){f(this,e);var n=p(this,t.call(this,i,Vt.a.FRAG_LOADING));return n.loaders={},n}return g(e,t),e.prototype.destroy=function(){var e=this.loaders;for(var i in e){var n=e[i];n&&n.destroy()}this.loaders={},t.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag,i=e.type,n=this.loaders,r=this.hls.config,a=r.fLoader,o=r.loader;e.loaded=0;var s=n[i];s&&(Ht.b.warn("abort previous fragment loader for type: "+i),s.abort()),s=n[i]=e.loader=r.fLoader?new a(r):new o(r);var l=void 0,u=void 0,d=void 0;l={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var c=e.byteRangeStartOffset,h=e.byteRangeEndOffset;isNaN(c)||isNaN(h)||(l.rangeStart=c,l.rangeEnd=h),u={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:r.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},s.load(l,u,d)},e.prototype.loadsuccess=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=t.data,a=i.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(Vt.a.FRAG_LOADED,{payload:r,frag:a,stats:e,networkDetails:n})},e.prototype.loaderror=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Vt.a.ERROR,{type:jt.b.NETWORK_ERROR,details:jt.a.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:i})},e.prototype.loadtimeout=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Vt.a.ERROR,{type:jt.b.NETWORK_ERROR,details:jt.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:i})},e.prototype.loadprogress=function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=e.frag;r.loaded=t.loaded,this.hls.trigger(Vt.a.FRAG_LOAD_PROGRESS,{frag:r,stats:t,networkDetails:n})},e}(qt),_e=be,Ee=function(t){function e(i){y(this,e);var n=v(this,t.call(this,i,Vt.a.KEY_LOADING));return n.loaders={},n.decryptkey=null,n.decrypturl=null,n}return m(e,t),e.prototype.destroy=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={},qt.prototype.destroy.call(this)},e.prototype.onKeyLoading=function(t){var e=t.frag,i=e.type,n=this.loaders[i],r=e.decryptdata,a=r.uri;if(a!==this.decrypturl||null===this.decryptkey){var o=this.hls.config;n&&(Ht.b.warn("abort previous key loader for type:"+i),n.abort()),e.loader=this.loaders[i]=new o.loader(o),this.decrypturl=a,this.decryptkey=null;var s=void 0,l=void 0,u=void 0;s={url:a,frag:e,responseType:"arraybuffer"},l={timeout:o.fragLoadingTimeOut,maxRetry:o.fragLoadingMaxRetry,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)},e.loader.load(s,l,u)}else this.decryptkey&&(r.key=this.decryptkey,this.hls.trigger(Vt.a.KEY_LOADED,{frag:e}))},e.prototype.loadsuccess=function(t,e,i){var n=i.frag;this.decryptkey=n.decryptdata.key=new Uint8Array(t.data),n.loader=void 0,this.loaders[n.type]=void 0,this.hls.trigger(Vt.a.KEY_LOADED,{frag:n})},e.prototype.loaderror=function(t,e){var i=e.frag,n=i.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Vt.a.ERROR,{type:jt.b.NETWORK_ERROR,details:jt.a.KEY_LOAD_ERROR,fatal:!1,frag:i,response:t})},e.prototype.loadtimeout=function(t,e){var i=e.frag,n=i.loader;n&&n.abort(),this.loaders[e.type]=void 0,this.hls.trigger(Vt.a.ERROR,{type:jt.b.NETWORK_ERROR,details:jt.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:i})},e}(qt),Te=Ee,Ae={search:function(t,e){for(var i=0,n=t.length-1,r=null,a=null;i<=n;){r=(i+n)/2|0,a=t[r];var o=e(a);if(o>0)i=r+1;else{if(!(o<0))return a;n=r-1}}return null}},Se=Ae,Le={isBuffered:function(t,e){try{if(t)for(var i=t.buffered,n=0;n<i.length;n++)if(e>=i.start(n)&&e<=i.end(n))return!0}catch(t){}return!1},bufferInfo:function(t,e,i){try{if(t){var n=t.buffered,r=[],a=void 0;for(a=0;a<n.length;a++)r.push({start:n.start(a),end:n.end(a)});return this.bufferedInfo(r,e,i)}}catch(t){}return{len:0,start:e,end:e,nextStart:void 0}},bufferedInfo:function(t,e,i){var n=[],r=void 0,a=void 0,o=void 0,s=void 0,l=void 0;for(t.sort(function(t,e){var i=t.start-e.start;return i||e.end-t.end}),l=0;l<t.length;l++){var u=n.length;if(u){var d=n[u-1].end;t[l].start-d<i?t[l].end>d&&(n[u-1].end=t[l].end):n.push(t[l])}else n.push(t[l])}for(l=0,r=0,a=o=e;l<n.length;l++){var c=n[l].start,h=n[l].end;if(e+i>=c&&e<h)a=c,o=h,r=o-e;else if(e+i<c){s=c;break}}return{len:r,start:a,end:o,nextStart:s}}},Re=Le,ke=i(8),we=i(6),Ce=i.n(we),Ie=i(10),De=i.n(Ie),Oe=b(),Pe=function(){function t(e,i){_(this,t),this.hls=e,this.id=i;var n=this.observer=new Ce.a,r=e.config;n.trigger=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];n.emit.apply(n,[t,t].concat(i))},n.off=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];n.removeListener.apply(n,[t].concat(i))};var a=function(t,i){i=i||{},i.frag=this.frag,i.id=this.id,e.trigger(t,i)}.bind(this);n.on(Vt.a.FRAG_DECRYPTED,a),n.on(Vt.a.FRAG_PARSING_INIT_SEGMENT,a),n.on(Vt.a.FRAG_PARSING_DATA,a),n.on(Vt.a.FRAG_PARSED,a),n.on(Vt.a.ERROR,a),n.on(Vt.a.FRAG_PARSING_METADATA,a),n.on(Vt.a.FRAG_PARSING_USERDATA,a),n.on(Vt.a.INIT_PTS_FOUND,a);var o={mp4:Oe.isTypeSupported("video/mp4"),mpeg:Oe.isTypeSupported("audio/mpeg"),mp3:Oe.isTypeSupported('audio/mp4; codecs="mp3"')},s=navigator.vendor;if(r.enableWorker&&"undefined"!=typeof Worker){Ht.b.log("demuxing in webworker");var l=void 0;try{l=this.w=De()(11),this.onwmsg=this.onWorkerMessage.bind(this),l.addEventListener("message",this.onwmsg),l.onerror=function(t){e.trigger(Vt.a.ERROR,{type:jt.b.OTHER_ERROR,details:jt.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},l.postMessage({cmd:"init",typeSupported:o,vendor:s,id:i,config:JSON.stringify(r)})}catch(t){Ht.b.error("error while initializing DemuxerWorker, fallback on DemuxerInline"),l&&URL.revokeObjectURL(l.objectURL),this.demuxer=new ke.a(n,o,r,s),this.w=void 0}}else this.demuxer=new ke.a(n,o,r,s)}return t.prototype.destroy=function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var e=this.demuxer;e&&(e.destroy(),this.demuxer=null)}var i=this.observer;i&&(i.removeAllListeners(),this.observer=null)},t.prototype.push=function(t,e,i,n,r,a,o,s){var l=this.w,u=isNaN(r.startDTS)?r.start:r.startDTS,d=r.decryptdata,c=this.frag,h=!(c&&r.cc===c.cc),f=!(c&&r.level===c.level),p=c&&r.sn===c.sn+1,g=!f&&p;if(h&&Ht.b.log(this.id+":discontinuity detected"),f&&Ht.b.log(this.id+":switch detected"),this.frag=r,l)l.postMessage({cmd:"demux",data:t,decryptdata:d,initSegment:e,audioCodec:i,videoCodec:n,timeOffset:u,discontinuity:h,trackSwitch:f,contiguous:g,duration:a,accurateTimeOffset:o,defaultInitPTS:s},t instanceof ArrayBuffer?[t]:[]);else{var y=this.demuxer;y&&y.push(t,d,e,i,n,u,h,f,g,a,o,s)}},t.prototype.onWorkerMessage=function(t){var e=t.data,i=this.hls;switch(e.event){case"init":URL.revokeObjectURL(this.w.objectURL);break;case Vt.a.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data2&&(e.data.data2=new Uint8Array(e.data2));default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,i.trigger(e.event,e.data)}},t}(),xe=Pe,Ne={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},Me=function(t){function e(i){E(this,e);var n=T(this,t.call(this,i,Vt.a.BUFFER_APPENDED,Vt.a.FRAG_BUFFERED,Vt.a.FRAG_LOADED));return n.bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=i.config,n}return A(e,t),e.prototype.destroy=function(){this.fragments=null,this.timeRanges=null,this.config=null,qt.prototype.destroy.call(this),t.prototype.destroy.call(this)},e.prototype.getBufferedFrag=function(t,e){var i=this.fragments,n=Object.keys(i).filter(function(n){var r=i[n];if(r.body.type!==e)return!1;if(!r.buffered)return!1;var a=r.body;return a.startPTS<=t&&t<=a.endPTS});if(0===n.length)return null;var r=n.pop();return i[r].body},e.prototype.detectEvictedFragments=function(t,e){var i=this,n=void 0,r=void 0;Object.keys(this.fragments).forEach(function(a){var o=i.fragments[a];if(!0===o.buffered){var s=o.range[t];if(s){n=s.time;for(var l=0;l<n.length;l++)if(r=n[l],!1===i.isTimeBuffered(r.startPTS,r.endPTS,e)){i.removeFragment(o.body);break}}}})},e.prototype.detectPartialFragments=function(t){var e=this,i=this.getFragmentKey(t),n=this.fragments[i];n&&(n.buffered=!0,Object.keys(this.timeRanges).forEach(function(i){if(!0===t.hasElementaryStream(i)){var r=e.timeRanges[i];n.range[i]=e.getBufferedTimes(t.startPTS,t.endPTS,r)}}))},e.prototype.getBufferedTimes=function(t,e,i){for(var n=[],r=void 0,a=void 0,o=!1,s=0;s<i.length;s++){if(r=i.start(s)-this.bufferPadding,a=i.end(s)+this.bufferPadding,t>=r&&e<=a){n.push({startPTS:Math.max(t,i.start(s)),endPTS:Math.min(e,i.end(s))});break}if(t<a&&e>r)n.push({startPTS:Math.max(t,i.start(s)),endPTS:Math.min(e,i.end(s))}),o=!0;else if(e<=r)break}return{time:n,partial:o}},e.prototype.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.sn},e.prototype.getPartialFragment=function(t){var e=this,i=void 0,n=void 0,r=void 0,a=null,o=0;return Object.keys(this.fragments).forEach(function(s){var l=e.fragments[s];e.isPartial(l)&&(n=l.body.startPTS-e.bufferPadding,r=l.body.endPTS+e.bufferPadding,t>=n&&t<=r&&(i=Math.min(t-n,r-t),o<=i&&(a=l.body,o=i)))}),a},e.prototype.getState=function(t){var e=this.getFragmentKey(t),i=this.fragments[e],n=Ne.NOT_LOADED;return void 0!==i&&(n=i.buffered?!0===this.isPartial(i)?Ne.PARTIAL:Ne.OK:Ne.APPENDING),n},e.prototype.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},e.prototype.isTimeBuffered=function(t,e,i){for(var n=void 0,r=void 0,a=0;a<i.length;a++){if(n=i.start(a)-this.bufferPadding,r=i.end(a)+this.bufferPadding,t>=n&&e<=r)return!0;if(e<=n)return!1}return!1},e.prototype.onFragLoaded=function(t){var e=t.frag;if(!isNaN(e.sn)){var i=this.getFragmentKey(e),n={body:e,range:Object.create(null),buffered:!1};this.fragments[i]=n}},e.prototype.onBufferAppended=function(t){var e=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach(function(t){var i=e.timeRanges[t];e.detectEvictedFragments(t,i)})},e.prototype.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},e.prototype.hasFragment=function(t){var e=this.getFragmentKey(t);return void 0!==this.fragments[e]},e.prototype.removeFragment=function(t){var e=this.getFragmentKey(t);delete this.fragments[e]},e.prototype.removeAllFragments=function(){this.fragments=Object.create(null)},e}(qt),Fe={toString:function(t){for(var e="",i=t.length,n=0;n<i;n++)e+="["+t.start(n).toFixed(3)+","+t.end(n).toFixed(3)+"]";return e}},Be=Fe,Ue=function(t){function e(i){P(this,e);for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var o=x(this,t.call.apply(t,[this,i].concat(r)));return o._tickInterval=null,o._tickCallCount=0,o}return N(e,t),e.prototype.destroy=function(){this.clearInterval(),t.prototype.destroy.call(this)},e.prototype.hasInterval=function(){return null!==this._tickInterval},e.prototype.setInterval=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return!this._tickInterval&&(this._tickInterval=setInterval(this.tick.bind(this,!1),t),!0)}),e.prototype.clearInterval=function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){return!!this._tickInterval&&(clearInterval(this._tickInterval),this._tickInterval=null,!0)}),e.prototype.tick=function(){1===++this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&setTimeout(this.tick.bind(this),0),this._tickCallCount=0)},e.prototype.doTick=function(){throw new Error("TaskLoop is abstract and `doLoop` must be implemented")},e}(qt),Ge=Ue,Ke=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),Ye={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_LEVEL:"WAITING_LEVEL",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR"},je=function(t){function e(i,n){M(this,e);var r=F(this,t.call(this,i,Vt.a.MEDIA_ATTACHED,Vt.a.MEDIA_DETACHING,Vt.a.MANIFEST_LOADING,Vt.a.MANIFEST_PARSED,Vt.a.LEVEL_LOADED,Vt.a.KEY_LOADED,Vt.a.FRAG_LOADED,Vt.a.FRAG_LOAD_EMERGENCY_ABORTED,Vt.a.FRAG_PARSING_INIT_SEGMENT,Vt.a.FRAG_PARSING_DATA,Vt.a.FRAG_PARSED,Vt.a.ERROR,Vt.a.AUDIO_TRACK_SWITCHING,Vt.a.AUDIO_TRACK_SWITCHED,Vt.a.BUFFER_CREATED,Vt.a.BUFFER_APPENDED,Vt.a.BUFFER_FLUSHED));return r.fragmentTracker=n,r.config=i.config,r.audioCodecSwap=!1,r._state=Ye.STOPPED,r}return B(e,t),e.prototype.onHandlerDestroying=function(){this.stopLoad()},e.prototype.onHandlerDestroyed=function(){this.state=Ye.STOPPED,this.fragmentTracker=null},e.prototype.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,i=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var n=i.startLevel;-1===n&&(n=0,this.bitrateTest=!0),this.level=i.nextLoadLevel=n,this.loadedmetadata=!1}e>0&&-1===t&&(Ht.b.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=Ye.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=Ye.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.clearInterval(),this.state=Ye.STOPPED,this.forceStartLoad=!1},e.prototype.doTick=function(){switch(this.state){case Ye.BUFFER_FLUSHING:this.fragLoadError=0;break;case Ye.IDLE:this._doTickIdle();break;case Ye.WAITING_LEVEL:var t=this.levels[this.level];t&&t.details&&(this.state=Ye.IDLE);break;case Ye.FRAG_LOADING_WAITING_RETRY:var e=performance.now(),i=this.retryDate;(!i||e>=i||this.media&&this.media.seeking)&&(Ht.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=Ye.IDLE);break;case Ye.ERROR:case Ye.STOPPED:case Ye.FRAG_LOADING:case Ye.PARSING:case Ye.PARSED:case Ye.ENDED:}this._checkBuffer(),this._checkFragmentChanged()},e.prototype._doTickIdle=function(){var t=this.hls,e=t.config,i=this.media;if(void 0!==this.levelLastLoaded&&(i||!this.startFragRequested&&e.startFragPrefetch)){var n=void 0;n=this.loadedmetadata?i.currentTime:this.nextLoadPosition;var r=t.nextLoadLevel,a=this.levels[r];if(a){var o=a.bitrate,s=void 0;s=o?Math.max(8*e.maxBufferSize/o,e.maxBufferLength):e.maxBufferLength,s=Math.min(s,e.maxMaxBufferLength);var l=Re.bufferInfo(this.mediaBuffer?this.mediaBuffer:i,n,e.maxBufferHole),u=l.len;if(!(u>=s)){Ht.b.trace("buffer length of "+u.toFixed(3)+" is below max of "+s.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=r;var d=a.details;if(void 0===d||!0===d.live&&this.levelLastLoaded!==r)return void(this.state=Ye.WAITING_LEVEL);var c=this.fragPrevious;if(!d.live&&c&&!c.backtracked&&c.sn===d.endSN&&!l.nextStart){if(Math.min(i.duration,c.start+c.duration)-Math.max(l.end,c.start)<=Math.max(.2,c.duration)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(Vt.a.BUFFER_EOS,h),void(this.state=Ye.ENDED)}}this._fetchPayloadOrEos(n,l,d)}}}},e.prototype._fetchPayloadOrEos=function(t,e,i){var n=this.fragPrevious,r=this.level,a=i.fragments,o=a.length;if(0!==o){var s=a[0].start,l=a[o-1].start+a[o-1].duration,u=e.end,d=void 0;if(i.initSegment&&!i.initSegment.data)d=i.initSegment;else if(i.live){var c=this.config.initialLiveManifestSize;if(o<c)return void Ht.b.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+c);if(null===(d=this._ensureFragmentAtLivePoint(i,u,s,l,n,a,o)))return}else u<s&&(d=a[0]);d||(d=this._findFragment(s,n,o,a,u,l,i)),d&&this._loadFragmentOrKey(d,r,i,t,u)}},e.prototype._ensureFragmentAtLivePoint=function(t,e,i,n,r,a,o){var s=this.hls.config,l=this.media,u=void 0,d=void 0!==s.liveMaxLatencyDuration?s.liveMaxLatencyDuration:s.liveMaxLatencyDurationCount*t.targetduration;if(e<Math.max(i-s.maxFragLookUpTolerance,n-d)){var c=this.liveSyncPosition=this.computeLivePosition(i,t);Ht.b.log("buffer end: "+e.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+c.toFixed(3)),e=c,l&&l.readyState&&l.duration>c&&(l.currentTime=c),this.nextLoadPosition=c}if(t.PTSKnown&&e>n&&l&&l.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(r)if(t.programDateTime)u=this._findFragmentByPDT(a,r.endPdt+1);else{var h=r.sn+1;if(h>=t.startSN&&h<=t.endSN){var f=a[h-t.startSN];r.cc===f.cc&&(u=f,Ht.b.log("live playlist, switching playlist, load frag with next SN: "+u.sn))}u||(u=Se.search(a,function(t){return r.cc-t.cc}))&&Ht.b.log("live playlist, switching playlist, load frag with same CC: "+u.sn)}u||(u=a[Math.min(o-1,Math.round(o/2))],Ht.b.log("live playlist, switching playlist, unknown, load middle frag : "+u.sn))}return u},e.prototype._findFragmentByPDT=function(t,e){if(!t||void 0===e)return null;if(e<t[0].pdt)return null;if(e>=t[t.length-1].endPdt)return null;for(var i=0;i<t.length;++i){var n=t[i];if(e<n.endPdt)return n}return null},e.prototype._findFragmentBySN=function(t,e,i,n){var r=this.hls.config,a=void 0,o=r.maxFragLookUpTolerance,s=t?e[t.sn-e[0].sn+1]:void 0,l=function(t){var e=Math.min(o,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-e<=i?1:t.start-e>i&&t.start?-1:0};return i<n&&(i>n-o&&(o=0),a=s&&!l(s)?s:Se.search(e,l)),a},e.prototype._findFragment=function(t,e,i,n,r,a,o){var s=this.hls.config,l=void 0,u=void 0;if(u=r<a?o.programDateTime?this._findFragmentByPDT(n,1e3*r+(o.programDateTime?Date.parse(o.programDateTime):0)-1e3*t):this._findFragmentBySN(e,n,r,a):n[i-1]){l=u;var d=l.sn-o.startSN,c=e&&l.level===e.level,h=n[d-1],f=n[d+1];if(e&&l.sn===e.sn)if(c&&!l.backtracked)if(l.sn<o.endSN){var p=e.deltaPTS;p&&p>s.maxBufferHole&&e.dropped&&d?(l=h,Ht.b.warn("SN just loaded, with large PTS gap between audio and video, maybe frag is not starting with a keyframe ? load previous one to try to overcome this")):(l=f,Ht.b.log("SN just loaded, load next one: "+l.sn))}else l=null;else l.backtracked&&(f&&f.backtracked?(Ht.b.warn("Already backtracked from fragment "+f.sn+", will not backtrack to fragment "+l.sn+". Loading fragment "+f.sn),l=f):(Ht.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),l.dropped=0,h?(l=h,l.backtracked=!0):d&&(l=null)))}return l},e.prototype._loadFragmentOrKey=function(t,e,i,n,r){if(t.decryptdata&&null!=t.decryptdata.uri&&null==t.decryptdata.key)Ht.b.log("Loading key for "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+e),this.state=Ye.KEY_LOADING,this.hls.trigger(Vt.a.KEY_LOADING,{frag:t});else{Ht.b.log("Loading "+t.sn+" of ["+i.startSN+" ,"+i.endSN+"],level "+e+", currentTime:"+n.toFixed(3)+",bufferEnd:"+r.toFixed(3));var a=this.fragmentTracker.getState(t);this.fragCurrent=t,this.startFragRequested=!0,isNaN(t.sn)||t.bitrateTest||(this.nextLoadPosition=t.start+t.duration),t.backtracked||a===Ne.NOT_LOADED?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(Vt.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new xe(this.hls,"main")),this.state=Ye.FRAG_LOADING):a===Ne.APPENDING&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)}},e.prototype.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,me.LevelType.MAIN)},e.prototype.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},e.prototype._checkFragmentChanged=function(){var t=void 0,e=void 0,i=this.media;if(i&&i.readyState&&!1===i.seeking&&(e=i.currentTime,e>i.playbackRate*this.lastCurrentTime&&(this.lastCurrentTime=e),Re.isBuffered(i,e)?t=this.getBufferedFrag(e):Re.isBuffered(i,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var n=t;if(n!==this.fragPlaying){this.hls.trigger(Vt.a.FRAG_CHANGED,{frag:n});var r=n.level;this.fragPlaying&&this.fragPlaying.level===r||this.hls.trigger(Vt.a.LEVEL_SWITCHED,{level:r}),this.fragPlaying=n}}},e.prototype.immediateLevelSwitch=function(){if(Ht.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t=this.media,e=void 0;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var i=this.fragCurrent;i&&i.loader&&i.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},e.prototype.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,Re.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},e.prototype.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e=void 0,i=void 0,n=void 0;if(i=this.getBufferedFrag(t.currentTime),i&&i.startPTS>1&&this.flushMainBuffer(0,i.startPTS-1),t.paused)e=0;else{var r=this.hls.nextLoadLevel,a=this.levels[r],o=this.fragLastKbps;e=o&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*o)+1:0}if((n=this.getBufferedFrag(t.currentTime+e))&&(n=this.followingBufferedFrag(n))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(n.maxStartPTS,Number.POSITIVE_INFINITY)}}},e.prototype.flushMainBuffer=function(t,e){this.state=Ye.BUFFER_FLUSHING;var i={startOffset:t,endOffset:e};this.altAudio&&(i.type="video"),this.hls.trigger(Vt.a.BUFFER_FLUSHING,i)},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var i=this.config;this.levels&&i.autoStartLoad&&this.hls.startLoad(i.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(Ht.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){var t=this.media,e=t?t.currentTime:void 0,i=this.config;isNaN(e)||Ht.b.log("media seeking to "+e.toFixed(3));var n=this.mediaBuffer?this.mediaBuffer:t,r=Re.bufferInfo(n,e,this.config.maxBufferHole);if(this.state===Ye.FRAG_LOADING){var a=this.fragCurrent;if(0===r.len&&a){var o=i.maxFragLookUpTolerance,s=a.start-o,l=a.start+a.duration+o;e<s||e>l?(a.loader&&(Ht.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=Ye.IDLE):Ht.b.log("seeking outside of buffer but within currently loaded fragment range")}}else this.state===Ye.ENDED&&(0===r.len&&(this.fragPrevious=0),this.state=Ye.IDLE);t&&(this.lastCurrentTime=e),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=e),this.tick()},e.prototype.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;isNaN(e)||Ht.b.log("media seeked to "+e.toFixed(3)),this.tick()},e.prototype.onMediaEnded=function(){Ht.b.log("media ended"),this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestLoading=function(){Ht.b.log("trigger BUFFER_RESET"),this.hls.trigger(Vt.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},e.prototype.onManifestParsed=function(t){var e=!1,i=!1,n=void 0;t.levels.forEach(function(t){(n=t.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(e=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))}),this.audioCodecSwitch=e&&i,this.audioCodecSwitch&&Ht.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1;var r=this.config;(r.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(r.startPosition)},e.prototype.onLevelLoaded=function(t){var e=t.details,i=t.level,n=this.levels[this.levelLastLoaded],r=this.levels[i],a=e.totalduration,o=0;if(Ht.b.log("level "+i+" loaded ["+e.startSN+","+e.endSN+"],duration:"+a),e.live){var s=r.details;s&&e.fragments.length>0?(R(s,e),o=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),e.PTSKnown&&!isNaN(o)?Ht.b.log("live playlist sliding:"+o.toFixed(3)):(Ht.b.log("live playlist - outdated PTS, unknown sliding"),O(this.fragPrevious,n,e))):(Ht.b.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,O(this.fragPrevious,n,e))}else e.PTSKnown=!1;if(r.details=e,this.levelLastLoaded=i,this.hls.trigger(Vt.a.LEVEL_UPDATED,{details:e,level:i}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var l=e.startTimeOffset;isNaN(l)?e.live?(this.startPosition=this.computeLivePosition(o,e),Ht.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0:(l<0&&(Ht.b.log("negative start time offset "+l+", count from end of last fragment"),l=o+a+l),Ht.b.log("start time offset found in playlist, adjust startPosition to "+l),this.startPosition=l),this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===Ye.WAITING_LEVEL&&(this.state=Ye.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===Ye.KEY_LOADING&&(this.state=Ye.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,i=t.frag;if(this.state===Ye.FRAG_LOADING&&e&&"main"===i.type&&i.level===e.level&&i.sn===e.sn){var n=t.stats,r=this.levels[e.level],a=r.details;if(Ht.b.log("Loaded  "+e.sn+" of ["+a.startSN+" ,"+a.endSN+"],level "+e.level),this.bitrateTest=!1,this.stats=n,!0===i.bitrateTest&&this.hls.nextLoadLevel)this.state=Ye.IDLE,this.startFragRequested=!1,n.tparsed=n.tbuffered=performance.now(),this.hls.trigger(Vt.a.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.tick();else if("initSegment"===i.sn)this.state=Ye.IDLE,n.tparsed=n.tbuffered=performance.now(),a.initSegment.data=t.payload,this.hls.trigger(Vt.a.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.tick();else{this.state=Ye.PARSING;var o=a.totalduration,s=e.level,l=e.sn,u=this.config.defaultAudioCodec||r.audioCodec;this.audioCodecSwap&&(Ht.b.log("swapping playlist audio codec"),void 0===u&&(u=this.lastAudioCodec),u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),this.pendingBuffering=!0,this.appended=!1,Ht.b.log("Parsing "+l+" of ["+a.startSN+" ,"+a.endSN+"],level "+s+", cc "+e.cc);var d=this.demuxer;d||(d=this.demuxer=new xe(this.hls,"main"));var c=this.media,h=c&&c.seeking,f=!h&&(a.PTSKnown||!a.live),p=a.initSegment?a.initSegment.data:[];d.push(t.payload,p,u,r.videoCodec,e,o,f,void 0)}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,i=t.frag;if(e&&"main"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===Ye.PARSING){var n=t.tracks,r=void 0,a=void 0;if(n.audio&&this.altAudio&&delete n.audio,a=n.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(Ht.b.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==a.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==a.container&&(o="mp4a.40.2",Ht.b.log("Android: force audio codec to "+o)),a.levelCodec=o,a.id=t.id}a=n.video,a&&(a.levelCodec=this.levels[this.level].videoCodec,a.id=t.id),this.hls.trigger(Vt.a.BUFFER_CODECS,n);for(r in n){a=n[r],Ht.b.log("main track:"+r+",container:"+a.container+",codecs[level/parsed]=["+a.levelCodec+"/"+a.codec+"]");var l=a.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(Vt.a.BUFFER_APPENDING,{type:r,data:l,parent:"main",content:"initSegment"}))}this.tick()}},e.prototype.onFragParsingData=function(t){var e=this,i=this.fragCurrent,n=t.frag;if(i&&"main"===t.id&&n.sn===i.sn&&n.level===i.level&&("audio"!==t.type||!this.altAudio)&&this.state===Ye.PARSING){var r=this.levels[this.level],a=i;if(isNaN(t.endPTS)&&(t.endPTS=t.startPTS+i.duration,t.endDTS=t.startDTS+i.duration),!0===t.hasAudio&&a.addElementaryStream(ie.ElementaryStreamTypes.AUDIO),!0===t.hasVideo&&a.addElementaryStream(ie.ElementaryStreamTypes.VIDEO),Ht.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(a.dropped=t.dropped,a.dropped)if(a.backtracked)Ht.b.warn("Already backtracked on this fragment, appending with the gap");else{var o=r.details;if(!o||a.sn!==o.startSN)return Ht.b.warn("missing video frame(s), backtracking fragment"),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=Ye.IDLE,this.fragPrevious=a,void this.tick();Ht.b.warn("missing video frame(s) on first frag, appending with gap")}else a.backtracked=!1;var s=L(r.details,a,t.startPTS,t.endPTS,t.startDTS,t.endDTS),l=this.hls;l.trigger(Vt.a.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:s,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(i){i&&i.length&&e.state===Ye.PARSING&&(e.appended=!0,e.pendingBuffering=!0,l.trigger(Vt.a.BUFFER_APPENDING,{type:t.type,data:i,parent:"main",content:"data"}))}),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,i=t.frag;e&&"main"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===Ye.PARSING&&(this.stats.tparsed=performance.now(),this.state=Ye.PARSED,this._checkAppendedParsed())},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url,i=t.id;if(!e){if(this.mediaBuffer!==this.media){Ht.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var n=this.fragCurrent;n.loader&&(Ht.b.log("switching to main audio track, cancel main fragment load"),n.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=Ye.IDLE}var r=this.hls;r.trigger(Vt.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),r.trigger(Vt.a.AUDIO_TRACK_SWITCHED,{id:i}),this.altAudio=!1}},e.prototype.onAudioTrackSwitched=function(t){var e=t.id,i=!!this.hls.audioTracks[e].url;if(i){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(Ht.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=i,this.tick()},e.prototype.onBufferCreated=function(t){var e=t.tracks,i=void 0,n=void 0,r=!1;for(var a in e){var o=e[a];"main"===o.id?(n=a,i=o,"video"===a&&(this.videoBuffer=e[a].buffer)):r=!0}r&&i?(Ht.b.log("alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media},e.prototype.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==Ye.PARSING&&e!==Ye.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==Ye.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;Ht.b.log("main buffered : "+Be.toString(e.buffered)),this.fragPrevious=t;var i=this.stats;i.tbuffered=performance.now(),this.fragLastKbps=Math.round(8*i.total/(i.tbuffered-i.tfirst)),this.hls.trigger(Vt.a.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.state=Ye.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var i=!!this.media&&Re.isBuffered(this.media,this.media.currentTime)&&Re.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case jt.a.FRAG_LOAD_ERROR:case jt.a.FRAG_LOAD_TIMEOUT:case jt.a.KEY_LOAD_ERROR:case jt.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var n=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);Ht.b.warn("mediaController: frag loading failed, retry in "+n+" ms"),this.retryDate=performance.now()+n,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=Ye.FRAG_LOADING_WAITING_RETRY}else Ht.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=Ye.ERROR;break;case jt.a.LEVEL_LOAD_ERROR:case jt.a.LEVEL_LOAD_TIMEOUT:this.state!==Ye.ERROR&&(t.fatal?(this.state=Ye.ERROR,Ht.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==Ye.WAITING_LEVEL||(this.state=Ye.IDLE));break;case jt.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==Ye.PARSING&&this.state!==Ye.PARSED||(i?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=Ye.IDLE):(Ht.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},e.prototype._reduceMaxBufferLength=function(t){var e=this.config;return e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,Ht.b.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},e.prototype._checkBuffer=function(){var t=this.media,e=this.config;if(t&&t.readyState){var i=t.currentTime,n=this.mediaBuffer?this.mediaBuffer:t,r=n.buffered;if(!this.loadedmetadata&&r.length){this.loadedmetadata=!0;var a=t.seeking?i:this.startPosition;i!==a&&(Ht.b.log("target start position not buffered, seek to buffered.start(0) "+a+" from current time"+i+" "),t.currentTime=a)}else if(this.immediateSwitch)this.immediateLevelSwitchEnd();else{var o=Re.bufferInfo(t,i,e.maxBufferHole),s=!(t.paused&&t.readyState>1||t.ended||0===t.buffered.length),l=i!==this.lastCurrentTime;if(l)this.stallReported&&(Ht.b.warn("playback not stuck anymore @"+i+", after "+Math.round(performance.now()-this.stalled)+"ms"),this.stallReported=!1),this.stalled=void 0,this.nudgeRetry=0;else if(s){var u=performance.now(),d=this.hls;if(this.stalled){var c=u-this.stalled,h=o.len,f=this.nudgeRetry||0,p=this.fragmentTracker.getPartialFragment(i);if(null!==p)for(var g=0,y=0;y<t.buffered.length;y++){var v=t.buffered.start(y);if(i>=g&&i<v)return t.currentTime=Math.max(v,t.currentTime+.1),Ht.b.warn("skipping hole, adjusting currentTime from "+i+" to "+t.currentTime),this.stalled=void 0,void d.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+t.currentTime,frag:p});g=t.buffered.end(y)}if(h>.5&&c>1e3*e.highBufferWatchdogPeriod)if(this.stallReported||(this.stallReported=!0,Ht.b.warn("playback stalling in high buffer @"+i),d.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:h})),this.stalled=void 0,this.nudgeRetry=++f,f<e.nudgeMaxRetry){var m=t.currentTime,b=m+f*e.nudgeOffset;Ht.b.log("adjust currentTime from "+m+" to "+b),t.currentTime=b,d.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else Ht.b.error("still stuck in high buffer @"+i+" after "+e.nudgeMaxRetry+", raise fatal error"),d.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.BUFFER_STALLED_ERROR,fatal:!0})}else this.stalled=u,this.stallReported=!1}}}},e.prototype.onFragLoadEmergencyAborted=function(){this.state=Ye.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},e.prototype.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;this.fragmentTracker.detectEvictedFragments(ie.ElementaryStreamTypes.VIDEO,t.buffered),this.state=Ye.IDLE,this.fragPrevious=null},e.prototype.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},e.prototype.computeLivePosition=function(t,e){var i=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-i)},Ke(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,Ht.b.log("main stream:"+e+"->"+t),this.hls.trigger(Vt.a.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}]),e}(Ge),Ve=je,He=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),$e=function(t){function e(i){U(this,e);var n=G(this,t.call(this,i,Vt.a.MANIFEST_LOADED,Vt.a.LEVEL_LOADED,Vt.a.FRAG_LOADED,Vt.a.ERROR));return n.canload=!1,n.currentLevelIndex=null,n.manualLevelIndex=-1,n.timer=null,n}return K(e,t),e.prototype.onHandlerDestroying=function(){this.cleanTimer(),this.manualLevelIndex=-1},e.prototype.cleanTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.startLoad=function(){var t=this._levels;this.canload=!0,this.levelRetryCount=0,t&&t.forEach(function(t){t.loadError=0;var e=t.details;e&&e.live&&(t.details=void 0)}),null!==this.timer&&this.loadLevel()},e.prototype.stopLoad=function(){this.canload=!1},e.prototype.onManifestLoaded=function(t){var e=[],i=void 0,n={},r=null,a=!1,o=!1,s=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),u=[];if(t.levels.forEach(function(t){t.loadError=0,t.fragmentError=!1,a=a||!!t.videoCodec,o=o||!!t.audioCodec||!(!t.attrs||!t.attrs.AUDIO),!0===s&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0),r=n[t.bitrate],void 0===r?(t.url=[t.url],t.urlId=0,n[t.bitrate]=t,e.push(t)):r.url.push(t.url)}),!0===a&&!0===o&&(e=e.filter(function(t){return!!t.videoCodec})),e=e.filter(function(t){var e=t.audioCodec,i=t.videoCodec;return(!e||l(e))&&(!i||l(i))}),t.audioTracks&&(u=t.audioTracks.filter(function(t){return!t.audioCodec||l(t.audioCodec,"audio")})),e.length>0){i=e[0].bitrate,e.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=e;for(var d=0;d<e.length;d++)if(e[d].bitrate===i){this._firstLevel=d,Ht.b.log("manifest loaded,"+e.length+" level(s) found, first bitrate:"+i);break}this.hls.trigger(Vt.a.MANIFEST_PARSED,{levels:e,audioTracks:u,firstLevel:this._firstLevel,stats:t.stats,audio:o,video:a,altAudio:u.length>0})}else this.hls.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},e.prototype.setLevelInternal=function(t){var e=this._levels,i=this.hls;if(t>=0&&t<e.length){if(this.cleanTimer(),this.currentLevelIndex!==t){Ht.b.log("switching to level "+t),this.currentLevelIndex=t;var n=e[t];n.level=t,i.trigger(Vt.a.LEVEL_SWITCHING,n)}var r=e[t],a=r.details;if(!a||!0===a.live){var o=r.urlId;i.trigger(Vt.a.LEVEL_LOADING,{url:r.url[o],level:t,id:o})}}else i.trigger(Vt.a.ERROR,{type:jt.b.OTHER_ERROR,details:jt.a.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})},e.prototype.onError=function(t){if(!0===t.fatal)return void(t.type===jt.b.NETWORK_ERROR&&this.cleanTimer());var e=!1,i=!1,n=void 0;switch(t.details){case jt.a.FRAG_LOAD_ERROR:case jt.a.FRAG_LOAD_TIMEOUT:case jt.a.KEY_LOAD_ERROR:case jt.a.KEY_LOAD_TIMEOUT:n=t.frag.level,i=!0;break;case jt.a.LEVEL_LOAD_ERROR:case jt.a.LEVEL_LOAD_TIMEOUT:n=t.context.level,e=!0;break;case jt.a.REMUX_ALLOC_ERROR:n=t.level,e=!0}void 0!==n&&this.recoverLevel(t,n,e,i)},e.prototype.recoverLevel=function(t,e,i,n){var r=this,a=this.hls.config,o=t.details,s=this._levels[e],l=void 0,u=void 0,d=void 0;if(s.loadError++,s.fragmentError=n,!0===i){if(!(this.levelRetryCount+1<=a.levelLoadingMaxRetry))return Ht.b.error("level controller, cannot recover from "+o+" error"),this.currentLevelIndex=null,this.cleanTimer(),void(t.fatal=!0);u=Math.min(Math.pow(2,this.levelRetryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout),this.timer=setTimeout(function(){return r.loadLevel()},u),t.levelRetry=!0,this.levelRetryCount++,Ht.b.warn("level controller, "+o+", retry in "+u+" ms, current retry count is "+this.levelRetryCount)}!0!==i&&!0!==n||(l=s.url.length,l>1&&s.loadError<l?(Ht.b.warn("level controller, "+o+" for level "+e+": switching to redundant stream id "+s.urlId),s.urlId=(s.urlId+1)%l,s.details=void 0):-1===this.manualLevelIndex?(d=0===e?this._levels.length-1:e-1,Ht.b.warn("level controller, "+o+": switch to "+d),this.hls.nextAutoLevel=this.currentLevelIndex=d):!0===n&&(Ht.b.warn("level controller, "+o+": reload a fragment"),this.currentLevelIndex=null))},e.prototype.onFragLoaded=function(t){var e=t.frag;if(void 0!==e&&"main"===e.type){var i=this._levels[e.level];void 0!==i&&(i.fragmentError=!1,i.loadError=0,this.levelRetryCount=0)}},e.prototype.onLevelLoaded=function(t){var e=this,i=t.level;if(i===this.currentLevelIndex){var n=this._levels[i];!1===n.fragmentError&&(n.loadError=0,this.levelRetryCount=0);var r=t.details;if(r.live){var a=1e3*(r.averagetargetduration?r.averagetargetduration:r.targetduration),o=a,s=n.details;s&&r.endSN===s.endSN&&(o/=2,Ht.b.log("same live playlist, reload twice faster")),o-=performance.now()-t.stats.trequest,o=Math.max(a/2,Math.round(o)),Ht.b.log("live playlist, reload in "+Math.round(o)+" ms"),this.timer=setTimeout(function(){return e.loadLevel()},o)}else this.cleanTimer()}},e.prototype.loadLevel=function(){var t=void 0,e=void 0;null!==this.currentLevelIndex&&!0===this.canload&&void 0!==(t=this._levels[this.currentLevelIndex])&&t.url.length>0&&(e=t.urlId,this.hls.trigger(Vt.a.LEVEL_LOADING,{url:t.url[e],level:this.currentLevelIndex,id:e}))},He(e,[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&void 0!==e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}]),e}(qt),ze=$e,We=i(4),qe=function(t){function e(i){V(this,e);var n=H(this,t.call(this,i,Vt.a.MEDIA_ATTACHED,Vt.a.MEDIA_DETACHING,Vt.a.FRAG_PARSING_METADATA));return n.id3Track=void 0,n.media=void 0,n}return $(e,t),e.prototype.destroy=function(){qt.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){this.media=t.media,this.media},e.prototype.onMediaDetaching=function(){j(this.id3Track),this.id3Track=void 0,this.media=void 0},e.prototype.getID3Track=function(t){for(var e=0;e<t.length;e++){var i=t[e];if("metadata"===i.kind&&"id3"===i.label)return Y(i,this.media),i}return this.media.addTextTrack("metadata","id3")},e.prototype.onFragParsingMetadata=function(t){var e=t.frag,i=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var n=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,r=0;r<i.length;r++){var a=We.a.getID3Frames(i[r].data);if(a){var o=i[r].pts,s=r<i.length-1?i[r+1].pts:e.endPTS;o===s&&(s+=1e-4);for(var l=0;l<a.length;l++){var u=a[l];if(!We.a.isTimeStampFrame(u)){var d=new n(o,s,"");d.value=u,this.id3Track.addCue(d)}}}}},e}(qt),Xe=qe,Ze=function(){function t(e){W(this,t),this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}return t.prototype.sample=function(t,e){var i=Math.pow(this.alpha_,t);this.estimate_=e*(1-i)+i*this.estimate_,this.totalWeight_+=t},t.prototype.getTotalWeight=function(){return this.totalWeight_},t.prototype.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}(),Je=Ze,Qe=function(){function t(e,i,n,r){q(this,t),this.hls=e,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Je(i),this.fast_=new Je(n)}return t.prototype.sample=function(t,e){t=Math.max(t,this.minDelayMs_);var i=8e3*e/t,n=t/1e3;this.fast_.sample(n,i),this.slow_.sample(n,i)},t.prototype.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},t.prototype.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.prototype.destroy=function(){},t}(),ti=Qe,ei=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),ii=function(t){function e(i){X(this,e);var n=Z(this,t.call(this,i,Vt.a.FRAG_LOADING,Vt.a.FRAG_LOADED,Vt.a.FRAG_BUFFERED,Vt.a.ERROR));return n.lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=i,n.timer=null,n._bwEstimator=null,n.onCheck=n._abandonRulesCheck.bind(n),n}return J(e,t),e.prototype.destroy=function(){this.clearTimer(),qt.prototype.destroy.call(this)},e.prototype.onFragLoading=function(t){var e=t.frag;if("main"===e.type){if(this.timer||(this.timer=setInterval(this.onCheck,100)),!this._bwEstimator){var i=this.hls,n=t.frag.level,r=i.levels[n].details.live,a=i.config,o=void 0,s=void 0;r?(o=a.abrEwmaFastLive,s=a.abrEwmaSlowLive):(o=a.abrEwmaFastVoD,s=a.abrEwmaSlowVoD),this._bwEstimator=new ti(i,s,o,a.abrEwmaDefaultEstimate)}this.fragCurrent=e}},e.prototype._abandonRulesCheck=function(){var t=this.hls,e=t.media,i=this.fragCurrent,n=i.loader,r=t.minAutoLevel;if(!n||n.stats&&n.stats.aborted)return Ht.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=n.stats;if(e&&a&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&i.autoLevel&&i.level){var o=performance.now()-a.trequest,s=Math.abs(e.playbackRate);if(o>500*i.duration/s){var l=t.levels,u=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/o),d=l[i.level],c=d.realBitrate?Math.max(d.realBitrate,d.bitrate):d.bitrate,h=a.total?a.total:Math.max(a.loaded,Math.round(i.duration*c/8)),f=e.currentTime,p=(h-a.loaded)/u,g=(Re.bufferInfo(e,f,t.config.maxBufferHole).end-f)/s;if(g<2*i.duration/s&&p>g){var y=void 0,v=void 0;for(v=i.level-1;v>r;v--){var m=l[v].realBitrate?Math.max(l[v].realBitrate,l[v].bitrate):l[v].bitrate;if((y=i.duration*m/(6.4*u))<g)break}y<p&&(Ht.b.warn("loading too slow, abort fragment loading and switch to level "+v+":fragLoadedDelay["+v+"]<fragLoadedDelay["+(i.level-1)+"];bufferStarvationDelay:"+y.toFixed(1)+"<"+p.toFixed(1)+":"+g.toFixed(1)),t.nextLoadLevel=v,this._bwEstimator.sample(o,a.loaded),n.abort(),this.clearTimer(),t.trigger(Vt.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,stats:a}))}}}},e.prototype.onFragLoaded=function(t){var e=t.frag;if("main"===e.type&&!isNaN(e.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var i=this.hls.levels[e.level],n=(i.loaded?i.loaded.bytes:0)+t.stats.loaded,r=(i.loaded?i.loaded.duration:0)+t.frag.duration;i.loaded={bytes:n,duration:r},i.realBitrate=Math.round(8*n/r)}if(t.frag.bitrateTest){var a=t.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(t)}}},e.prototype.onFragBuffered=function(t){var e=t.stats,i=t.frag;if(!(!0===e.aborted||"main"!==i.type||isNaN(i.sn)||i.bitrateTest&&e.tload!==e.tbuffered)){var n=e.tparsed-e.trequest;Ht.b.log("latency/loading/parsing/append/kbps:"+Math.round(e.tfirst-e.trequest)+"/"+Math.round(e.tload-e.tfirst)+"/"+Math.round(e.tparsed-e.tload)+"/"+Math.round(e.tbuffered-e.tparsed)+"/"+Math.round(8*e.loaded/(e.tbuffered-e.trequest))),this._bwEstimator.sample(n,e.loaded),e.bwEstimate=this._bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=n/1e3:this.bitrateTestDelay=0}},e.prototype.onError=function(t){switch(t.details){case jt.a.FRAG_LOAD_ERROR:case jt.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},e.prototype.clearTimer=function(){clearInterval(this.timer),this.timer=null},e.prototype._findBestLevel=function(t,e,i,n,r,a,o,s,l){for(var u=r;u>=n;u--){var d=l[u],c=d.details,h=c?c.totalduration/c.fragments.length:e,f=!!c&&c.live,p=void 0;p=u<=t?o*i:s*i;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,y=g*h/p;if(Ht.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(p)+"/"+g+"/"+h+"/"+a+"/"+y),p>g&&(!y||f&&!this.bitrateTestDelay||y<a))return u}return-1},ei(e,[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this._bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var i=this._nextABRAutoLevel;return-1!==t&&(i=Math.min(t,i)),i},set:function(t){this._nextAutoLevel=t}},{key:"_nextABRAutoLevel",get:function(){var t=this.hls,e=t.maxAutoLevel,i=t.levels,n=t.config,r=t.minAutoLevel,a=t.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=a?a.currentTime:0,u=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this._bwEstimator?this._bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,c=(Re.bufferInfo(a,l,n.maxBufferHole).end-l)/u,h=this._findBestLevel(o,s,d,r,e,c,n.abrBandWidthFactor,n.abrBandWidthUpFactor,i);if(h>=0)return h;Ht.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var f=s?Math.min(s,n.maxStarvationDelay):n.maxStarvationDelay,p=n.abrBandWidthFactor,g=n.abrBandWidthUpFactor;if(0===c){var y=this.bitrateTestDelay;if(y){f=(s?Math.min(s,n.maxLoadingDelay):n.maxLoadingDelay)-y,Ht.b.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),p=g=1}}return h=this._findBestLevel(o,s,d,r,e,c+f,p,g,i),Math.max(h,0)}}]),e}(qt),ni=ii,ri=b(),ai=function(t){function e(i){Q(this,e);var n=tt(this,t.call(this,i,Vt.a.MEDIA_ATTACHING,Vt.a.MEDIA_DETACHING,Vt.a.MANIFEST_PARSED,Vt.a.BUFFER_RESET,Vt.a.BUFFER_APPENDING,Vt.a.BUFFER_CODECS,Vt.a.BUFFER_EOS,Vt.a.BUFFER_FLUSHING,Vt.a.LEVEL_PTS_UPDATED,Vt.a.LEVEL_UPDATED));return n._msDuration=null,n._levelDuration=null,n._live=null,n._objectUrl=null,n.onsbue=n.onSBUpdateEnd.bind(n),n.onsbe=n.onSBUpdateError.bind(n),n.pendingTracks={},n.tracks={},n}return et(e,t),e.prototype.destroy=function(){qt.prototype.destroy.call(this)},e.prototype.onLevelPtsUpdated=function(t){var e=t.type,i=this.tracks.audio;if("audio"===e&&i&&"audio/mpeg"===i.container){var n=this.sourceBuffer.audio;if(Math.abs(n.timestampOffset-t.start)>.1){var r=n.updating;try{n.abort()}catch(t){r=!0,Ht.b.warn("can not abort audio buffer: "+t)}r?this.audioTimestampOffset=t.start:(Ht.b.warn("change mpeg audio timestamp offset from "+n.timestampOffset+" to "+t.start),n.timestampOffset=t.start)}}},e.prototype.onManifestParsed=function(t){var e=t.audio,i=t.video||t.levels.length&&t.audio,n=0;t.altAudio&&(e||i)&&(n=(e?1:0)+(i?1:0),Ht.b.log(n+" sourceBuffer(s) expected")),this.sourceBufferNb=n},e.prototype.onMediaAttaching=function(t){var e=this.media=t.media;if(e){var i=this.mediaSource=new ri;this.onmso=this.onMediaSourceOpen.bind(this),this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),i.addEventListener("sourceopen",this.onmso),i.addEventListener("sourceended",this.onmse),i.addEventListener("sourceclose",this.onmsc),e.src=URL.createObjectURL(i),this._objectUrl=e.src}},e.prototype.onMediaDetaching=function(){Ht.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){Ht.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.onmso),t.removeEventListener("sourceended",this.onmse),t.removeEventListener("sourceclose",this.onmsc),this.media&&(URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):Ht.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.onmso=this.onmse=this.onmsc=null,this.hls.trigger(Vt.a.MEDIA_DETACHED)},e.prototype.onMediaSourceOpen=function(){Ht.b.log("media source opened"),this.hls.trigger(Vt.a.MEDIA_ATTACHED,{media:this.media});var t=this.mediaSource;t&&t.removeEventListener("sourceopen",this.onmso),this.checkPendingTracks()},e.prototype.checkPendingTracks=function(){var t=this.pendingTracks,e=Object.keys(t).length;e&&(this.sourceBufferNb<=e||0===this.sourceBufferNb)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},e.prototype.onMediaSourceClose=function(){Ht.b.log("media source closed")},e.prototype.onMediaSourceEnded=function(){Ht.b.log("media source ended")},e.prototype.onSBUpdateEnd=function(){if(this.audioTimestampOffset){var t=this.sourceBuffer.audio;Ht.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+this.audioTimestampOffset),t.timestampOffset=this.audioTimestampOffset,delete this.audioTimestampOffset}this._needsFlush&&this.doFlush(),this._needsEos&&this.checkEos(),this.appending=!1;var e=this.parent,i=this.segments.reduce(function(t,i){return i.parent===e?t+1:t},0),n={},r=this.sourceBuffer;for(var a in r)n[a]=r[a].buffered;this.hls.trigger(Vt.a.BUFFER_APPENDED,{parent:e,pending:i,timeRanges:n}),this._needsFlush||this.doAppending(),this.updateMediaElementDuration()},e.prototype.onSBUpdateError=function(t){Ht.b.error("sourceBuffer error:",t),this.hls.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var i=t[e];try{this.mediaSource.removeSourceBuffer(i),i.removeEventListener("updateend",this.onsbue),i.removeEventListener("error",this.onsbe)}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},e.prototype.onBufferCodecs=function(t){if(0===Object.keys(this.sourceBuffer).length){for(var e in t)this.pendingTracks[e]=t[e];var i=this.mediaSource;i&&"open"===i.readyState&&this.checkPendingTracks()}},e.prototype.createSourceBuffers=function(t){var e=this.sourceBuffer,i=this.mediaSource;for(var n in t)if(!e[n]){var r=t[n],a=r.levelCodec||r.codec,o=r.container+";codecs="+a;Ht.b.log("creating sourceBuffer("+o+")");try{var s=e[n]=i.addSourceBuffer(o);s.addEventListener("updateend",this.onsbue),s.addEventListener("error",this.onsbe),this.tracks[n]={codec:a,container:r.container},r.buffer=s}catch(t){Ht.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:o})}}this.hls.trigger(Vt.a.BUFFER_CREATED,{tracks:t})},e.prototype.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},e.prototype.onBufferAppendFail=function(t){Ht.b.error("sourceBuffer error:",t.event),this.hls.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:jt.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.prototype.onBufferEos=function(t){var e=this.sourceBuffer,i=t.type;for(var n in e)i&&n!==i||e[n].ended||(e[n].ended=!0,Ht.b.log(n+" sourceBuffer now EOS"));this.checkEos()},e.prototype.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(!e||"open"!==e.readyState)return void(this._needsEos=!1);for(var i in t){var n=t[i];if(!n.ended)return;if(n.updating)return void(this._needsEos=!0)}Ht.b.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){Ht.b.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1},e.prototype.onBufferFlushing=function(t){this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}),this.flushBufferCounter=0,this.doFlush()},e.prototype.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._live=e.live,this.updateMediaElementDuration())},e.prototype.updateMediaElementDuration=function(){var t=this.hls.config,e=void 0;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var i in this.sourceBuffer)if(!0===this.sourceBuffer[i].updating)return;e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(Ht.b.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||e===1/0||isNaN(e))&&(Ht.b.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},e.prototype.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,i=this.sourceBuffer;try{for(var n in i)e+=i[n].buffered.length}catch(t){Ht.b.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(Vt.a.BUFFER_FLUSHED)}},e.prototype.doAppending=function(){var t=this.hls,e=this.sourceBuffer,i=this.segments;if(Object.keys(e).length){if(this.media.error)return this.segments=[],void Ht.b.error("trying to append although a media error occured, flush segment and abort");if(this.appending)return;if(i&&i.length){var n=i.shift();try{var r=n.type,a=e[r];a?a.updating?i.unshift(n):(a.ended=!1,this.parent=n.parent,a.appendBuffer(n.data),this.appendError=0,this.appended++,this.appending=!0):this.onSBUpdateEnd()}catch(e){Ht.b.error("error while trying to append buffer:"+e.message),i.unshift(n);var o={type:jt.b.MEDIA_ERROR,parent:n.parent};22!==e.code?(this.appendError?this.appendError++:this.appendError=1,o.details=jt.a.BUFFER_APPEND_ERROR,this.appendError>t.config.appendErrorMaxRetry?(Ht.b.log("fail "+t.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),i=[],o.fatal=!0,t.trigger(Vt.a.ERROR,o)):(o.fatal=!1,t.trigger(Vt.a.ERROR,o))):(this.segments=[],o.details=jt.a.BUFFER_FULL_ERROR,o.fatal=!1,t.trigger(Vt.a.ERROR,o))}}}},e.prototype.flushBuffer=function(t,e,i){var n=void 0,r=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=this.sourceBuffer;if(Object.keys(u).length){if(Ht.b.log("flushBuffer,pos/start/end: "+this.media.currentTime.toFixed(3)+"/"+t+"/"+e),this.flushBufferCounter<this.appended){for(var d in u)if(!i||d===i){if(n=u[d],n.ended=!1,n.updating)return Ht.b.warn("cannot flush, sb updating in progress"),!1;try{for(r=0;r<n.buffered.length;r++)if(a=n.buffered.start(r),o=n.buffered.end(r),-1!==navigator.userAgent.toLowerCase().indexOf("firefox")&&e===Number.POSITIVE_INFINITY?(s=t,l=e):(s=Math.max(a,t),l=Math.min(o,e)),Math.min(l,o)-s>.5)return this.flushBufferCounter++,Ht.b.log("flush "+d+" ["+s+","+l+"], of ["+a+","+o+"], pos:"+this.media.currentTime),n.remove(s,l),!1}catch(t){Ht.b.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else Ht.b.warn("abort flushing too many retries");Ht.b.log("buffer flushed")}return!0},e}(qt),oi=ai,si=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),li=function(t){function e(i){return it(this,e),nt(this,t.call(this,i,Vt.a.FPS_DROP_LEVEL_CAPPING,Vt.a.MEDIA_ATTACHING,Vt.a.MANIFEST_PARSED))}return rt(e,t),e.prototype.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=this.restrictedLevels=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer)))},e.prototype.onFpsDropLevelCapping=function(t){e.isLevelAllowed(t.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(t.droppedLevel)},e.prototype.onMediaAttaching=function(t){this.media=t.media instanceof HTMLVideoElement?t.media:null},e.prototype.onManifestParsed=function(t){var e=this.hls;this.restrictedLevels=[],e.config.capLevelToPlayerSize&&(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.levels=t.levels,e.firstLevel=this.getMaxLevel(t.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},e.prototype.detectPlayerSize=function(){if(this.media){var t=this.levels?this.levels.length:0;if(t){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t-1),e.autoLevelCapping>this.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},e.prototype.getMaxLevel=function(t){var i=this;if(!this.levels)return-1;var n=this.levels.filter(function(n,r){return e.isLevelAllowed(r,i.restrictedLevels)&&r<=t});return e.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},e.isLevelAllowed=function(t){return-1===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).indexOf(t)},e.getMaxLevelByMediaSize=function(t,e,i){if(!t||t&&!t.length)return-1;for(var n=t.length-1,r=0;r<t.length;r+=1){var a=t[r];if((a.width>=e||a.height>=i)&&function(t,e){return!e||(t.width!==e.width||t.height!==e.height)}(a,t[r+1])){n=r;break}}return n},si(e,[{key:"mediaWidth",get:function(){var t=void 0,i=this.media;return i&&(t=i.width||i.clientWidth||i.offsetWidth,t*=e.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t=void 0,i=this.media;return i&&(t=i.height||i.clientHeight||i.offsetHeight,t*=e.contentScaleFactor),t}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}]),e}(qt),ui=li,di=function(t){function e(i){return at(this,e),ot(this,t.call(this,i,Vt.a.MEDIA_ATTACHING))}return st(e,t),e.prototype.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},e.prototype.onMediaAttaching=function(t){var e=this.hls.config;if(e.capLevelOnFPSDrop){"function"==typeof(this.video=t.media instanceof HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod)}},e.prototype.checkFPS=function(t,e,i){var n=performance.now();if(e){if(this.lastTime){var r=n-this.lastTime,a=i-this.lastDroppedFrames,o=e-this.lastDecodedFrames,s=1e3*a/r,l=this.hls;if(l.trigger(Vt.a.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:i}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var u=l.currentLevel;Ht.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(Vt.a.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,l.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=i,this.lastDecodedFrames=e}},e.prototype.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},e}(qt),ci=di,hi=function(){function t(e){lt(this,t),e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}return t.prototype.destroy=function(){this.abort(),this.loader=null},t.prototype.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.prototype.load=function(t,e,i){this.context=t,this.config=e,this.callbacks=i,this.stats={trequest:performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},t.prototype.loadInternal=function(){var t=void 0,e=this.context;t=this.loader=new XMLHttpRequest;var i=this.stats;i.tfirst=0,i.loaded=0;var n=this.xhrSetup;try{if(n)try{n(t,e.url)}catch(i){t.open("GET",e.url,!0),n(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(i){return void this.callbacks.onError({code:t.status,text:i.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},t.prototype.readystatechange=function(t){var e=t.currentTarget,i=e.readyState,n=this.stats,r=this.context,a=this.config;if(!n.aborted&&i>=2)if(window.clearTimeout(this.requestTimeout),0===n.tfirst&&(n.tfirst=Math.max(performance.now(),n.trequest)),4===i){var o=e.status;if(o>=200&&o<300){n.tload=Math.max(n.tfirst,performance.now());var s=void 0,l=void 0;"arraybuffer"===r.responseType?(s=e.response,l=s.byteLength):(s=e.responseText,l=s.length),n.loaded=n.total=l;var u={url:e.responseURL,data:s};this.callbacks.onSuccess(u,n,r,e)}else n.retry>=a.maxRetry||o>=400&&o<499?(Ht.b.error(o+" while loading "+r.url),this.callbacks.onError({code:o,text:e.statusText},r,e)):(Ht.b.warn(o+" while loading "+r.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),n.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)},t.prototype.loadtimeout=function(){Ht.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.prototype.loadprogress=function(t){var e=t.currentTarget,i=this.stats;i.loaded=t.loaded,t.lengthComputable&&(i.total=t.total);var n=this.callbacks.onProgress;n&&n(i,this.context,null,e)},t}(),fi=hi,pi=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),gi=function(t){function e(i){ut(this,e);var n=dt(this,t.call(this,i,Vt.a.MANIFEST_LOADING,Vt.a.MANIFEST_PARSED,Vt.a.AUDIO_TRACK_LOADED,Vt.a.ERROR));return n.ticks=0,n.ontick=n.tick.bind(n),n}return ct(e,t),e.prototype.destroy=function(){this.cleanTimer(),qt.prototype.destroy.call(this)},e.prototype.cleanTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},e.prototype.tick=function(){1===++this.ticks&&(this.doTick(),this.ticks>1&&setTimeout(this.tick,1),this.ticks=0)},e.prototype.doTick=function(){this.updateTrack(this.trackId)},e.prototype.onError=function(t){t.fatal&&t.type===jt.b.NETWORK_ERROR&&this.cleanTimer()},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestParsed=function(t){var e=this,i=t.audioTracks||[],n=!1;this.tracks=i,this.hls.trigger(Vt.a.AUDIO_TRACKS_UPDATED,{audioTracks:i});var r=0;i.forEach(function(t){if(t.default&&!n)return e.audioTrack=r,void(n=!0);r++}),!1===n&&i.length&&(Ht.b.log("no default audio track defined, use first audio track as default"),this.audioTrack=0)},e.prototype.onAudioTrackLoaded=function(t){t.id<this.tracks.length&&(Ht.b.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval(this.ontick,1e3*t.details.targetduration)),!t.details.live&&this.timer&&this.cleanTimer())},e.prototype.setAudioTrackInternal=function(t){if(t>=0&&t<this.tracks.length){this.cleanTimer(),this.trackId=t,Ht.b.log("switching to audioTrack "+t);var e=this.tracks[t],i=this.hls,n=e.type,r=e.url,a={id:t,type:n,url:r};i.trigger(Vt.a.AUDIO_TRACK_SWITCHING,a);var o=e.details;!r||void 0!==o&&!0!==o.live||(Ht.b.log("(re)loading playlist for audioTrack "+t),i.trigger(Vt.a.AUDIO_TRACK_LOADING,{url:r,id:t}))}},e.prototype.updateTrack=function(t){if(t>=0&&t<this.tracks.length){this.cleanTimer(),this.trackId=t,Ht.b.log("updating audioTrack "+t);var e=this.tracks[t],i=e.url,n=e.details;!i||void 0!==n&&!0!==n.live||(Ht.b.log("(re)loading playlist for audioTrack "+t),this.hls.trigger(Vt.a.AUDIO_TRACK_LOADING,{url:i,id:t}))}},pi(e,[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.trackId===t&&void 0!==this.tracks[t].details||this.setAudioTrackInternal(t)}}]),e}(qt),yi=gi,vi=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),mi={STOPPED:"STOPPED",STARTING:"STARTING",IDLE:"IDLE",PAUSED:"PAUSED",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BUFFER_FLUSHING:"BUFFER_FLUSHING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS"},bi=function(t){function e(i,n){ht(this,e);var r=ft(this,t.call(this,i,Vt.a.MEDIA_ATTACHED,Vt.a.MEDIA_DETACHING,Vt.a.AUDIO_TRACKS_UPDATED,Vt.a.AUDIO_TRACK_SWITCHING,Vt.a.AUDIO_TRACK_LOADED,Vt.a.KEY_LOADED,Vt.a.FRAG_LOADED,Vt.a.FRAG_PARSING_INIT_SEGMENT,Vt.a.FRAG_PARSING_DATA,Vt.a.FRAG_PARSED,Vt.a.ERROR,Vt.a.BUFFER_RESET,Vt.a.BUFFER_CREATED,Vt.a.BUFFER_APPENDED,Vt.a.BUFFER_FLUSHED,Vt.a.INIT_PTS_FOUND));return r.fragmentTracker=n,r.config=i.config,r.audioCodecSwap=!1,r._state=mi.STOPPED,r.initPTS=[],r.waitingFragment=null,r.videoTrackCC=null,r}return pt(e,t),e.prototype.onHandlerDestroying=function(){this.stopLoad()},e.prototype.onHandlerDestroyed=function(){this.state=mi.STOPPED,this.fragmentTracker=null},e.prototype.onInitPtsFound=function(t){var e=t.id,i=t.frag.cc,n=t.initPTS;"main"===e&&(this.initPTS[i]=n,this.videoTrackCC=i,Ht.b.log("InitPTS for cc: "+i+" found from video track: "+n),this.state===mi.WAITING_INIT_PTS&&this.tick())},e.prototype.startLoad=function(t){if(this.tracks){var e=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,e>0&&-1===t?(Ht.b.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=mi.IDLE):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=mi.STARTING),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=mi.STOPPED},e.prototype.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t),this.fragCurrent=null),this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=mi.STOPPED},e.prototype.doTick=function(){var t=void 0,e=void 0,i=void 0,n=this.hls,r=n.config;switch(this.state){case mi.ERROR:case mi.PAUSED:case mi.BUFFER_FLUSHING:break;case mi.STARTING:this.state=mi.WAITING_TRACK,this.loadedmetadata=!1;break;case mi.IDLE:var a=this.tracks;if(!a)break;if(!this.media&&(this.startFragRequested||!r.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var o=this.mediaBuffer?this.mediaBuffer:this.media,s=this.videoBuffer?this.videoBuffer:this.media,l=Re.bufferInfo(o,t,r.maxBufferHole),u=Re.bufferInfo(s,t,r.maxBufferHole),d=l.len,c=l.end,h=this.fragPrevious,f=Math.min(r.maxBufferLength,r.maxMaxBufferLength),p=Math.max(f,u.len),g=this.audioSwitch,y=this.trackId;if((d<p||g)&&y<a.length){if(void 0===(i=a[y].details)){this.state=mi.WAITING_TRACK;break}if(!g&&!i.live&&h&&h.sn===i.endSN&&!l.nextStart&&(!this.media.seeking||this.media.duration-c<h.duration/2)){this.hls.trigger(Vt.a.BUFFER_EOS,{type:"audio"}),this.state=mi.ENDED;break}var v=i.fragments,m=v.length,b=v[0].start,_=v[m-1].start+v[m-1].duration,E=void 0;if(g)if(i.live&&!i.PTSKnown)Ht.b.log("switching audiotrack, live stream, unknown PTS,load first fragment"),c=0;else if(c=t,i.PTSKnown&&t<b){if(!(l.end>b||l.nextStart))return;Ht.b.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=b+.05}if(i.initSegment&&!i.initSegment.data)E=i.initSegment;else if(c<=b){if(E=v[0],null!==this.videoTrackCC&&E.cc!==this.videoTrackCC&&(E=w(v,this.videoTrackCC)),i.live&&E.loadIdx&&E.loadIdx===this.fragLoadIdx){var T=l.nextStart?l.nextStart:b;return Ht.b.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(T+.05)),void(this.media.currentTime=T+.05)}}else{var A=void 0,S=r.maxFragLookUpTolerance,L=h?v[h.sn-v[0].sn+1]:void 0,R=function(t){var e=Math.min(S,t.duration);return t.start+t.duration-e<=c?1:t.start-e>c&&t.start?-1:0};c<_?(c>_-S&&(S=0),A=L&&!R(L)?L:Se.search(v,R)):A=v[m-1],A&&(E=A,b=A.start,h&&E.level===h.level&&E.sn===h.sn&&(E.sn<i.endSN?(E=v[E.sn+1-i.startSN],Ht.b.log("SN just loaded, load next one: "+E.sn)):E=null))}E&&(E.decryptdata&&null!=E.decryptdata.uri&&null==E.decryptdata.key?(Ht.b.log("Loading key for "+E.sn+" of ["+i.startSN+" ,"+i.endSN+"],track "+y),this.state=mi.KEY_LOADING,n.trigger(Vt.a.KEY_LOADING,{frag:E})):(Ht.b.log("Loading "+E.sn+", cc: "+E.cc+" of ["+i.startSN+" ,"+i.endSN+"],track "+y+", currentTime:"+t+",bufferEnd:"+c.toFixed(3)),this.fragmentTracker.getState(E)===Ne.NOT_LOADED&&(this.fragCurrent=E,this.startFragRequested=!0,isNaN(E.sn)||(this.nextLoadPosition=E.start+E.duration),n.trigger(Vt.a.FRAG_LOADING,{frag:E}),this.state=mi.FRAG_LOADING)))}break;case mi.WAITING_TRACK:e=this.tracks[this.trackId],e&&e.details&&(this.state=mi.IDLE);break;case mi.FRAG_LOADING_WAITING_RETRY:var k=performance.now(),C=this.retryDate;o=this.media;var I=o&&o.seeking;(!C||k>=C||I)&&(Ht.b.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=mi.IDLE);break;case mi.WAITING_INIT_PTS:var D=this.videoTrackCC;if(void 0===this.initPTS[D])break;var O=this.waitingFragment;if(O){var P=O.frag.cc;D!==P?(e=this.tracks[this.trackId],e.details&&e.details.live&&(Ht.b.warn("Waiting fragment CC ("+P+") does not match video track CC ("+D+")"),this.waitingFragment=null,this.state=mi.IDLE)):(this.state=mi.FRAG_LOADING,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=mi.IDLE;break;case mi.STOPPED:case mi.FRAG_LOADING:case mi.PARSING:case mi.PARSED:case mi.ENDED:}},e.prototype.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var i=this.config;this.tracks&&i.autoStartLoad&&this.startLoad(i.startPosition)},e.prototype.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(Ht.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.stopLoad()},e.prototype.onMediaSeeking=function(){this.state===mi.ENDED&&(this.state=mi.IDLE),this.media&&(this.lastCurrentTime=this.media.currentTime),this.tick()},e.prototype.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},e.prototype.onAudioTracksUpdated=function(t){Ht.b.log("audio tracks updated"),this.tracks=t.audioTracks},e.prototype.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.state=mi.PAUSED,this.waitingFragment=null,e?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=mi.IDLE),this.tick()},e.prototype.onAudioTrackLoaded=function(t){var e=t.details,i=t.id,n=this.tracks[i],r=e.totalduration,a=0;if(Ht.b.log("track "+i+" loaded ["+e.startSN+","+e.endSN+"],duration:"+r),e.live){var o=n.details;o&&e.fragments.length>0?(R(o,e),a=e.fragments[0].start,e.PTSKnown?Ht.b.log("live audio playlist sliding:"+a.toFixed(3)):Ht.b.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,Ht.b.log("live audio playlist - first load, unknown sliding"))}else e.PTSKnown=!1;if(n.details=e,!this.startFragRequested){if(-1===this.startPosition){var s=e.startTimeOffset;isNaN(s)?this.startPosition=0:(Ht.b.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s)}this.nextLoadPosition=this.startPosition}this.state===mi.WAITING_TRACK&&(this.state=mi.IDLE),this.tick()},e.prototype.onKeyLoaded=function(){this.state===mi.KEY_LOADING&&(this.state=mi.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,i=t.frag;if(this.state===mi.FRAG_LOADING&&e&&"audio"===i.type&&i.level===e.level&&i.sn===e.sn){var n=this.tracks[this.trackId],r=n.details,a=r.totalduration,o=e.level,s=e.sn,l=e.cc,u=this.config.defaultAudioCodec||n.audioCodec||"mp4a.40.2",d=this.stats=t.stats;if("initSegment"===s)this.state=mi.IDLE,d.tparsed=d.tbuffered=performance.now(),r.initSegment.data=t.payload,this.hls.trigger(Vt.a.FRAG_BUFFERED,{stats:d,frag:e,id:"audio"}),this.tick();else{this.state=mi.PARSING,this.appended=!1,this.demuxer||(this.demuxer=new xe(this.hls,"audio"));var c=this.initPTS[l],h=r.initSegment?r.initSegment.data:[];if(r.initSegment||void 0!==c){this.pendingBuffering=!0,Ht.b.log("Demuxing "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o);this.demuxer.push(t.payload,h,u,null,e,a,!1,c)}else Ht.b.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+s+" of ["+r.startSN+" ,"+r.endSN+"],track "+o),this.waitingFragment=t,this.state=mi.WAITING_INIT_PTS}}this.fragLoadError=0},e.prototype.onFragParsingInitSegment=function(t){var e=this.fragCurrent,i=t.frag;if(e&&"audio"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===mi.PARSING){var n=t.tracks,r=void 0;if(n.video&&delete n.video,r=n.audio){r.levelCodec=r.codec,r.id=t.id,this.hls.trigger(Vt.a.BUFFER_CODECS,n),Ht.b.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var a=r.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(Vt.a.BUFFER_APPENDING,o))}this.tick()}}},e.prototype.onFragParsingData=function(t){var e=this,i=this.fragCurrent,n=t.frag;if(i&&"audio"===t.id&&"audio"===t.type&&n.sn===i.sn&&n.level===i.level&&this.state===mi.PARSING){var r=this.trackId,a=this.tracks[r],o=this.hls;isNaN(t.endPTS)&&(t.endPTS=t.startPTS+i.duration,t.endDTS=t.startDTS+i.duration),i.addElementaryStream(ie.ElementaryStreamTypes.AUDIO),Ht.b.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),L(a.details,i,t.startPTS,t.endPTS);var s=this.audioSwitch,l=this.media,u=!1;if(s&&l)if(l.readyState){var d=l.currentTime;Ht.b.log("switching audio track : currentTime:"+d),d>=t.startPTS&&(Ht.b.log("switching audio track : flushing all audio"),this.state=mi.BUFFER_FLUSHING,o.trigger(Vt.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),u=!0,this.audioSwitch=!1,o.trigger(Vt.a.AUDIO_TRACK_SWITCHED,{id:r}))}else this.audioSwitch=!1,o.trigger(Vt.a.AUDIO_TRACK_SWITCHED,{id:r});var c=this.pendingData;if(!c)return console.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(Vt.a.ERROR,{type:jt.b.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&c.push({type:t.type,data:e,parent:"audio",content:"data"})}),!u&&c.length&&(c.forEach(function(t){e.state===mi.PARSING&&(e.pendingBuffering=!0,e.hls.trigger(Vt.a.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},e.prototype.onFragParsed=function(t){var e=this.fragCurrent,i=t.frag;e&&"audio"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===mi.PARSING&&(this.stats.tparsed=performance.now(),this.state=mi.PARSED,this._checkAppendedParsed())},e.prototype.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},e.prototype.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},e.prototype.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==mi.PARSING&&e!==mi.PARSED||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},e.prototype._checkAppendedParsed=function(){if(!(this.state!==mi.PARSED||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,i=this.hls;if(t){this.fragPrevious=t,e.tbuffered=performance.now(),i.trigger(Vt.a.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;Ht.b.log("audio buffered : "+Be.toString(n.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,i.trigger(Vt.a.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=mi.IDLE}this.tick()}},e.prototype.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case jt.a.FRAG_LOAD_ERROR:case jt.a.FRAG_LOAD_TIMEOUT:if(!t.fatal){var i=this.fragLoadError;i?i++:i=1;var n=this.config;if(i<=n.fragLoadingMaxRetry){this.fragLoadError=i;var r=Math.min(Math.pow(2,i-1)*n.fragLoadingRetryDelay,n.fragLoadingMaxRetryTimeout);Ht.b.warn("audioStreamController: frag loading failed, retry in "+r+" ms"),this.retryDate=performance.now()+r,this.state=mi.FRAG_LOADING_WAITING_RETRY}else Ht.b.error("audioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=mi.ERROR}break;case jt.a.AUDIO_TRACK_LOAD_ERROR:case jt.a.AUDIO_TRACK_LOAD_TIMEOUT:case jt.a.KEY_LOAD_ERROR:case jt.a.KEY_LOAD_TIMEOUT:this.state!==mi.ERROR&&(this.state=t.fatal?mi.ERROR:mi.IDLE,Ht.b.warn("audioStreamController: "+t.details+" while loading frag,switch to "+this.state+" state ..."));break;case jt.a.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===mi.PARSING||this.state===mi.PARSED)){var a=this.mediaBuffer,o=this.media.currentTime;if(a&&Re.isBuffered(a,o)&&Re.isBuffered(a,o+.5)){var s=this.config;s.maxMaxBufferLength>=s.maxBufferLength&&(s.maxMaxBufferLength/=2,Ht.b.warn("audio:reduce max buffer length to "+s.maxMaxBufferLength+"s")),this.state=mi.IDLE}else Ht.b.warn("buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=mi.BUFFER_FLUSHING,this.hls.trigger(Vt.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},e.prototype.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(Ht.b.log("appending pending audio data on Buffer Flushed"),e.forEach(function(e){t.hls.trigger(Vt.a.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=mi.PARSED):(this.state=mi.IDLE,this.fragPrevious=null,this.tick())},vi(e,[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,Ht.b.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}]),e}(Ge),_i=bi,Ei=function(){function t(t){return"string"==typeof t&&(!!a[t.toLowerCase()]&&t.toLowerCase())}function e(t){return"string"==typeof t&&(!!o[t.toLowerCase()]&&t.toLowerCase())}function i(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}function n(n,a,o){var s=this,l=function(){if("undefined"!=typeof navigator)return/MSIE\s8\.0/.test(navigator.userAgent)}(),u={};l?s=document.createElement("custom"):u.enumerable=!0,s.hasBeenReset=!1;var d="",c=!1,h=n,f=a,p=o,g=null,y="",v=!0,m="auto",b="start",_=50,E="middle",T=50,A="middle";if(Object.defineProperty(s,"id",i({},u,{get:function(){return d},set:function(t){d=""+t}})),Object.defineProperty(s,"pauseOnExit",i({},u,{get:function(){return c},set:function(t){c=!!t}})),Object.defineProperty(s,"startTime",i({},u,{get:function(){return h},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");h=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},u,{get:function(){return f},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},u,{get:function(){return p},set:function(t){p=""+t,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},u,{get:function(){return g},set:function(t){g=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},u,{get:function(){return y},set:function(e){var i=t(e);if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");y=i,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},u,{get:function(){return v},set:function(t){v=!!t,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},u,{get:function(){return m},set:function(t){if("number"!=typeof t&&t!==r)throw new SyntaxError("An invalid number or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},u,{get:function(){return b},set:function(t){var i=e(t);if(!i)throw new SyntaxError("An invalid or illegal string was specified.");b=i,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},u,{get:function(){return _},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},u,{get:function(){return E},set:function(t){var i=e(t);if(!i)throw new SyntaxError("An invalid or illegal string was specified.");E=i,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},u,{get:function(){return T},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");T=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},u,{get:function(){return A},set:function(t){var i=e(t);if(!i)throw new SyntaxError("An invalid or illegal string was specified.");A=i,this.hasBeenReset=!0}})),s.displayState=void 0,l)return s}if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var r="auto",a={"":!0,lr:!0,rl:!0},o={start:!0,middle:!0,end:!0,left:!0,right:!0};return n.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},n}(),Ti=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};vt.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,i){for(var n=0;n<i.length;++n)if(e===i[n]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var Ai=new Ei(0,0,0),Si="middle"===Ai.align?"middle":"center";gt.prototype={parse:function(t){function e(){var t=i.buffer,e=0;for(t=_t(t);e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,i.buffer=t.substr(e),n}var i=this;t&&(i.buffer+=i.decoder.decode(t,{stream:!0}));try{var n=void 0;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;n=e();var r=n.match(/^()?WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new Error("Malformed WebVTT signature.");i.state="HEADER"}for(var a=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(a?a=!1:n=e(),i.state){case"HEADER":/:/.test(n)?function(t){mt(t,function(t,e){switch(t){case"Region":console.log("parse region",e)}},/:/)}(n):n||(i.state="ID");continue;case"NOTE":n||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){i.state="NOTE";break}if(!n)continue;if(i.cue=new Ei(0,0,""),i.state="CUE",-1===n.indexOf("--\x3e")){i.cue.id=n;continue}case"CUE":try{bt(n,i.cue,i.regionList)}catch(t){i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var o=-1!==n.indexOf("--\x3e");if(!n||o&&(a=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=n;continue;case"BADCUE":n||(i.state="ID");continue}}}catch(t){"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Error("Malformed WebVTT signature.")}catch(t){throw t}return t.onflush&&t.onflush(),this}};var Li=gt,Ri={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},ki=function(t){var e=t;return Ri.hasOwnProperty(t)&&(e=Ri[t]),String.fromCharCode(e)},wi=15,Ci=100,Ii={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Di={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Oi={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Pi={25:2,26:4,29:6,30:8,31:10,27:13,28:15},xi=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Ni={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(t){this.time=t},log:function(t,e){var i=this.verboseFilter[t];this.verboseLevel>=i&&console.log(this.time+" ["+t+"] "+e)}},Mi=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].toString(16));return e},Fi=function(){function t(e,i,n,r,a){Tt(this,t),this.foreground=e||"white",this.underline=i||!1,this.italics=n||!1,this.background=r||"black",this.flash=a||!1}return t.prototype.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.prototype.setStyles=function(t){for(var e=["foreground","underline","italics","background","flash"],i=0;i<e.length;i++){var n=e[i];t.hasOwnProperty(n)&&(this[n]=t[n])}},t.prototype.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.prototype.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},t.prototype.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},t.prototype.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),Bi=function(){function t(e,i,n,r,a,o){Tt(this,t),this.uchar=e||" ",this.penState=new Fi(i,n,r,a,o)}return t.prototype.reset=function(){this.uchar=" ",this.penState.reset()},t.prototype.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},t.prototype.setPenState=function(t){this.penState.copy(t)},t.prototype.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},t.prototype.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},t.prototype.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),Ui=function(){function t(){Tt(this,t),this.chars=[];for(var e=0;e<Ci;e++)this.chars.push(new Bi);this.pos=0,this.currPenState=new Fi}return t.prototype.equals=function(t){for(var e=!0,i=0;i<Ci;i++)if(!this.chars[i].equals(t.chars[i])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<Ci;e++)this.chars[e].copy(t.chars[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<Ci;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},t.prototype.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(Ni.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>Ci&&(Ni.log("ERROR","Too large cursor position "+this.pos),this.pos=Ci)},t.prototype.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var i=this.pos+1;i<e+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(e)},t.prototype.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.prototype.insertChar=function(t){t>=144&&this.backSpace();var e=ki(t);if(this.pos>=Ci)return void Ni.log("ERROR","Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!");this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1)},t.prototype.clearFromPos=function(t){var e=void 0;for(e=t;e<Ci;e++)this.chars[e].reset()},t.prototype.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.prototype.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.prototype.getTextString=function(){for(var t=[],e=!0,i=0;i<Ci;i++){var n=this.chars[i].uchar;" "!==n&&(e=!1),t.push(n)}return e?"":t.join("")},t.prototype.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),Gi=function(){function t(){Tt(this,t),this.rows=[];for(var e=0;e<wi;e++)this.rows.push(new Ui);this.currRow=wi-1,this.nrRollUpRows=null,this.reset()}return t.prototype.reset=function(){for(var t=0;t<wi;t++)this.rows[t].clear();this.currRow=wi-1},t.prototype.equals=function(t){for(var e=!0,i=0;i<wi;i++)if(!this.rows[i].equals(t.rows[i])){e=!1;break}return e},t.prototype.copy=function(t){for(var e=0;e<wi;e++)this.rows[e].copy(t.rows[e])},t.prototype.isEmpty=function(){for(var t=!0,e=0;e<wi;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},t.prototype.backSpace=function(){this.rows[this.currRow].backSpace()},t.prototype.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.prototype.insertChar=function(t){this.rows[this.currRow].insertChar(t)},t.prototype.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},t.prototype.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},t.prototype.setCursor=function(t){Ni.log("INFO","setCursor: "+t),this.rows[this.currRow].setCursor(t)},t.prototype.setPAC=function(t){Ni.log("INFO","pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var i=0;i<wi;i++)this.rows[i].clear();var n=this.currRow+1-this.nrRollUpRows,r=this.lastOutputScreen;if(r){var a=r.rows[n].cueStartTime;if(a&&a<Ni.time)for(var o=0;o<this.nrRollUpRows;o++)this.rows[e-this.nrRollUpRows+o+1].copy(r.rows[n+o])}}this.currRow=e;var s=this.rows[this.currRow];if(null!==t.indent){var l=t.indent,u=Math.max(l-1,0);s.setCursor(t.indent),t.color=s.chars[u].penState.foreground}var d={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(d)},t.prototype.setBkgData=function(t){Ni.log("INFO","bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},t.prototype.setRollUpRows=function(t){this.nrRollUpRows=t},t.prototype.rollUp=function(){if(null===this.nrRollUpRows)return void Ni.log("DEBUG","roll_up but nrRollUpRows not set yet");Ni.log("TEXT",this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),Ni.log("INFO","Rolling up")},t.prototype.getDisplayText=function(t){t=t||!1;for(var e=[],i="",n=-1,r=0;r<wi;r++){var a=this.rows[r].getTextString();a&&(n=r+1,t?e.push("Row "+n+": '"+a+"'"):e.push(a.trim()))}return e.length>0&&(i=t?"["+e.join(" | ")+"]":e.join("\n")),i},t.prototype.getTextAndFormat=function(){return this.rows},t}(),Ki=function(){function t(e,i){Tt(this,t),this.chNr=e,this.outputFilter=i,this.mode=null,this.verbose=0,this.displayedMemory=new Gi,this.nonDisplayedMemory=new Gi,this.lastOutputScreen=new Gi,this.currRollUpRow=this.displayedMemory.rows[wi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}return t.prototype.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[wi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},t.prototype.getHandler=function(){return this.outputFilter},t.prototype.setHandler=function(t){this.outputFilter=t},t.prototype.setPAC=function(t){this.writeScreen.setPAC(t)},t.prototype.setBkgData=function(t){this.writeScreen.setBkgData(t)},t.prototype.setMode=function(t){t!==this.mode&&(this.mode=t,Ni.log("INFO","MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},t.prototype.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var i=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";Ni.log("INFO",i+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(Ni.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.prototype.ccRCL=function(){Ni.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.prototype.ccBS=function(){Ni.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.prototype.ccAOF=function(){},t.prototype.ccAON=function(){},t.prototype.ccDER=function(){Ni.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.prototype.ccRU=function(t){Ni.log("INFO","RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},t.prototype.ccFON=function(){Ni.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.prototype.ccRDC=function(){Ni.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.prototype.ccTR=function(){Ni.log("INFO","TR"),this.setMode("MODE_TEXT")},t.prototype.ccRTD=function(){Ni.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.prototype.ccEDM=function(){Ni.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.prototype.ccCR=function(){Ni.log("CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.prototype.ccENM=function(){Ni.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.prototype.ccEOC=function(){if(Ni.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,Ni.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.prototype.ccTO=function(t){Ni.log("INFO","TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},t.prototype.ccMIDROW=function(t){var e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{var i=Math.floor(t/2)-16,n=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=n[i]}Ni.log("INFO","MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},t.prototype.outputDataUpdate=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=Ni.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),!0===t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue()),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},t.prototype.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),Yi=function(){function t(e,i,n){Tt(this,t),this.field=e||1,this.outputs=[i,n],this.channels=[new Ki(1,i),new Ki(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}return t.prototype.getHandler=function(t){return this.channels[t].getHandler()},t.prototype.setHandler=function(t,e){this.channels[t].setHandler(e)},t.prototype.addData=function(t,e){var i=void 0,n=void 0,r=void 0,a=!1;this.lastTime=t,Ni.setTime(t);for(var o=0;o<e.length;o+=2)if(n=127&e[o],r=127&e[o+1],0!==n||0!==r){if(Ni.log("DATA","["+Mi([e[o],e[o+1]])+"] -> ("+Mi([n,r])+")"),i=this.parseCmd(n,r),i||(i=this.parseMidrow(n,r)),i||(i=this.parsePAC(n,r)),i||(i=this.parseBackgroundAttributes(n,r)),!i&&(a=this.parseChars(n,r)))if(this.currChNr&&this.currChNr>=0){var s=this.channels[this.currChNr-1];s.insertChars(a)}else Ni.log("WARNING","No channel found yet. TEXT-MODE?");i?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,Ni.log("WARNING","Couldn't parse cleaned data "+Mi([n,r])+" orig: "+Mi([e[o],e[o+1]])))}else this.dataCounters.padding+=2},t.prototype.parseCmd=function(t,e){var i=null,n=(20===t||28===t)&&e>=32&&e<=47,r=(23===t||31===t)&&e>=33&&e<=35;if(!n&&!r)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,Ni.log("DEBUG","Repeated command ("+Mi([t,e])+") is dropped"),!0;i=20===t||23===t?1:2;var a=this.channels[i-1];return 20===t||28===t?32===e?a.ccRCL():33===e?a.ccBS():34===e?a.ccAOF():35===e?a.ccAON():36===e?a.ccDER():37===e?a.ccRU(2):38===e?a.ccRU(3):39===e?a.ccRU(4):40===e?a.ccFON():41===e?a.ccRDC():42===e?a.ccTR():43===e?a.ccRTD():44===e?a.ccEDM():45===e?a.ccCR():46===e?a.ccENM():47===e&&a.ccEOC():a.ccTO(e-32),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=i,!0},t.prototype.parseMidrow=function(t,e){var i=null;if((17===t||25===t)&&e>=32&&e<=47){if((i=17===t?1:2)!==this.currChNr)return Ni.log("ERROR","Mismatch channel in midrow parsing"),!1;return this.channels[i-1].ccMIDROW(e),Ni.log("DEBUG","MIDROW ("+Mi([t,e])+")"),!0}return!1},t.prototype.parsePAC=function(t,e){var i=null,n=null,r=(t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127,a=(16===t||24===t)&&e>=64&&e<=95;if(!r&&!a)return!1;if(t===this.lastCmdA&&e===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;i=t<=23?1:2,n=e>=64&&e<=95?1===i?Ii[t]:Oi[t]:1===i?Di[t]:Pi[t];var o=this.interpretPAC(n,e);return this.channels[i-1].setPAC(o),this.lastCmdA=t,this.lastCmdB=e,this.currChNr=i,!0},t.prototype.interpretPAC=function(t,e){var i=e,n={color:null,italics:!1,indent:null,underline:!1,row:t};return i=e>95?e-96:e-64,n.underline=1==(1&i),i<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((i-16)/2),n},t.prototype.parseChars=function(t,e){var i=null,n=null,r=null;if(t>=25?(i=2,r=t-8):(i=1,r=t),r>=17&&r<=19){var a=e;a=17===r?e+80:18===r?e+112:e+144,Ni.log("INFO","Special char '"+ki(a)+"' in channel "+i),n=[a]}else t>=32&&t<=127&&(n=0===e?[t]:[t,e]);if(n){var o=Mi(n);Ni.log("DEBUG","Char codes =  "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return n},t.prototype.parseBackgroundAttributes=function(t,e){var i=void 0,n=void 0,r=void 0,a=void 0,o=(16===t||24===t)&&e>=32&&e<=47,s=(23===t||31===t)&&e>=45&&e<=47;return!(!o&&!s)&&(i={},16===t||24===t?(n=Math.floor((e-32)/2),i.background=xi[n],e%2==1&&(i.background=i.background+"_semi")):45===e?i.background="transparent":(i.foreground="black",47===e&&(i.underline=!0)),r=t<24?1:2,a=this.channels[r-1],a.setBkgData(i),this.lastCmdA=null,this.lastCmdB=null,!0)},t.prototype.reset=function(){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].reset();this.lastCmdA=null,this.lastCmdB=null},t.prototype.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].cueSplitAtTime(t)},t}(),ji=Yi,Vi=function(){function t(e,i){At(this,t),this.timelineController=e,this.track=i,this.startTime=null,this.endTime=null,this.screen=null}return t.prototype.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues("textTrack"+this.track,this.startTime,this.endTime,this.screen),this.startTime=null)},t.prototype.newCue=function(t,e,i){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=i,this.timelineController.createCaptionsTrack(this.track)},t}(),Hi=Vi,$i=function(t,e,i){return t.substr(i||0,e.length)===e},zi=function(t){var e=parseInt(t.substr(-3)),i=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),r=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;return isNaN(e)||isNaN(i)||isNaN(n)||isNaN(r)?-1:(e+=1e3*i,e+=6e4*n,e+=36e5*r)},Wi=function(t){for(var e=5381,i=t.length;i;)e=33*e^t.charCodeAt(--i);return(e>>>0).toString()},qi=function(t,e,i){var n=t[e],r=t[n.prevCC];if(!r||!r.new&&n.new)return t.ccOffset=t.presentationOffset=n.start,void(n.new=!1);for(;r&&r.new;)t.ccOffset+=n.start-r.start,n.new=!1,n=r,r=t[n.prevCC];t.presentationOffset=i},Xi={parse:function(t,e,i,n,r,a){var o=/\r\n|\n\r|\n|\r/g,s=Object(We.b)(new Uint8Array(t)).trim().replace(o,"\n").split("\n"),l="00:00.000",u=0,d=0,c=0,h=[],f=void 0,p=!0,g=new Li;g.oncue=function(t){var e=i[n],r=i.ccOffset;e&&e.new&&(void 0!==d?r=i.ccOffset=e.start:qi(i,n,c)),c&&(r=c+i.ccOffset-i.presentationOffset),t.startTime+=r-d,t.endTime+=r-d,t.id=Wi(t.startTime.toString())+Wi(t.endTime.toString())+Wi(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&h.push(t)},g.onparsingerror=function(t){f=t},g.onflush=function(){if(f&&a)return void a(f);r(h)},s.forEach(function(t){if(p){if($i(t,"X-TIMESTAMP-MAP=")){p=!1,t.substr(16).split(",").forEach(function(t){$i(t,"LOCAL:")?l=t.substr(6):$i(t,"MPEGTS:")&&(u=parseInt(t.substr(7)))});try{e=e<0?e+8589934592:e,u-=e,d=zi(l)/1e3,c=u/9e4,-1===d&&(f=new Error("Malformed X-TIMESTAMP-MAP: "+t))}catch(e){f=new Error("Malformed X-TIMESTAMP-MAP: "+t)}return}""===t&&(p=!1)}g.parse(t+"\n")}),g.flush()}},Zi=Xi,Ji=function(t){function e(i){St(this,e);var n=Lt(this,t.call(this,i,Vt.a.MEDIA_ATTACHING,Vt.a.MEDIA_DETACHING,Vt.a.FRAG_PARSING_USERDATA,Vt.a.FRAG_DECRYPTED,Vt.a.MANIFEST_LOADING,Vt.a.MANIFEST_LOADED,Vt.a.FRAG_LOADED,Vt.a.LEVEL_SWITCHING,Vt.a.INIT_PTS_FOUND));if(n.hls=i,n.config=i.config,n.enabled=!0,n.Cues=i.config.cueHandler,n.textTracks=[],n.tracks=[],n.unparsedVttFrags=[],n.initPTS=void 0,n.cueRanges=[],n.config.enableCEA708Captions){var r=new Hi(n,1),a=new Hi(n,2);n.cea608Parser=new ji(0,r,a)}return n}return Rt(e,t),e.prototype.addCues=function(t,e,i,n){for(var r=this.cueRanges,a=!1,o=r.length;o--;){var s=r[o],l=wt(s[0],s[1],e,i);if(l>=0&&(s[0]=Math.min(s[0],e),s[1]=Math.max(s[1],i),a=!0,l/(i-e)>.5))return}a||r.push([e,i]),this.Cues.newCue(this[t],e,i,n)},e.prototype.onInitPtsFound=function(t){var e=this;void 0===this.initPTS&&(this.initPTS=t.initPTS),this.unparsedVttFrags.length&&(this.unparsedVttFrags.forEach(function(t){e.onFragLoaded(t)}),this.unparsedVttFrags=[])},e.prototype.getExistingTrack=function(t){var e=this.media;if(e)for(var i=0;i<e.textTracks.length;i++){var n=e.textTracks[i],r="textTrack"+t;if(!0===n[r])return n}return null},e.prototype.createCaptionsTrack=function(t){var e="textTrack"+t;if(!this[e]){var i=this.getExistingTrack(t);if(i)this[e]=i,j(this[e]),Y(this[e],this.media);else{var n=this.createTextTrack("captions",this.config["captionsTextTrack"+t+"Label"],this.config["captionsTextTrack"+t+"LanguageCode"]);n&&(n[e]=!0,this[e]=n)}}},e.prototype.createTextTrack=function(t,e,i){var n=this.media;if(n)return n.addTextTrack(t,e,i)},e.prototype.destroy=function(){qt.prototype.destroy.call(this)},e.prototype.onMediaAttaching=function(t){this.media=t.media,this._cleanTracks()},e.prototype.onMediaDetaching=function(){j(this.textTrack1),j(this.textTrack2)},e.prototype.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0},this._cleanTracks()},e.prototype._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var i=0;i<e.length;i++)j(e[i])}},e.prototype.onManifestLoaded=function(t){var e=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=void 0,this.cueRanges=[],this.config.enableWebVTT){this.tracks=t.subtitles||[];var i=this.media?this.media.textTracks:[];this.tracks.forEach(function(t,n){var r=void 0;if(n<i.length){var a=i[n];kt(a,t)&&(r=a)}r||(r=e.createTextTrack("subtitles",t.name,t.lang)),t.default?r.mode=e.hls.subtitleDisplay?"showing":"hidden":r.mode="disabled",e.textTracks.push(r)})}},e.prototype.onLevelSwitching=function(){this.enabled="NONE"!==this.hls.currentLevel.closedCaptions},e.prototype.onFragLoaded=function(t){var e=t.frag,i=t.payload;if("main"===e.type){var n=e.sn;if(n!==this.lastSn+1){var r=this.cea608Parser;r&&r.reset()}this.lastSn=n}else if("subtitle"===e.type)if(i.byteLength){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);var a=e.decryptdata;null!=a&&null!=a.key&&"AES-128"===a.method||this._parseVTTs(e,i)}else this.hls.trigger(Vt.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})},e.prototype._parseVTTs=function(t,e){var i=this.vttCCs;i[t.cc]||(i[t.cc]={start:t.start,prevCC:this.prevCC,new:!0},this.prevCC=t.cc);var n=this.textTracks,r=this.hls;Zi.parse(e,this.initPTS,i,t.cc,function(e){var i=n[t.trackId];if("disabled"===i.mode)return void r.trigger(Vt.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t});e.forEach(function(t){if(!i.cues.getCueById(t.id))try{i.addCue(t)}catch(n){var e=new window.TextTrackCue(t.startTime,t.endTime,t.text);e.id=t.id,i.addCue(e)}}),r.trigger(Vt.a.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(e){Ht.b.log("Failed to parse VTT cue: "+e),r.trigger(Vt.a.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})})},e.prototype.onFragDecrypted=function(t){var e=t.payload,i=t.frag;if("subtitle"===i.type){if(void 0===this.initPTS)return void this.unparsedVttFrags.push(t);this._parseVTTs(i,e)}},e.prototype.onFragParsingUserdata=function(t){if(this.enabled&&this.config.enableCEA708Captions)for(var e=0;e<t.samples.length;e++){var i=this.extractCea608Data(t.samples[e].bytes);this.cea608Parser.addData(t.samples[e].pts,i)}},e.prototype.extractCea608Data=function(t){for(var e=31&t[0],i=2,n=void 0,r=void 0,a=void 0,o=void 0,s=void 0,l=[],u=0;u<e;u++)n=t[i++],r=127&t[i++],a=127&t[i++],o=0!=(4&n),s=3&n,0===r&&0===a||o&&0===s&&(l.push(r),l.push(a));return l},e}(qt),Qi=Ji,tn=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),en=function(t){function e(i){Ct(this,e);var n=It(this,t.call(this,i,Vt.a.MEDIA_ATTACHED,Vt.a.MEDIA_DETACHING,Vt.a.MANIFEST_LOADING,Vt.a.MANIFEST_LOADED,Vt.a.SUBTITLE_TRACK_LOADED));return n.tracks=[],n.trackId=-1,n.media=void 0,n.subtitleDisplay=!1,n}return Dt(e,t),e.prototype._onTextTracksChanged=function(){if(this.media){for(var t=-1,e=Ot(this.media.textTracks),i=0;i<e.length;i++)if("hidden"===e[i].mode)t=i;else if("showing"===e[i].mode){t=i;break}this.subtitleTrack=t}},e.prototype.destroy=function(){qt.prototype.destroy.call(this)},e.prototype.onMediaAttached=function(t){var e=this;this.media=t.media,this.media&&(void 0!==this.queuedDefaultTrack&&(this.subtitleTrack=this.queuedDefaultTrack,delete this.queuedDefaultTrack),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){e.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},e.prototype.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.media=void 0)},e.prototype.onManifestLoading=function(){this.tracks=[],this.trackId=-1},e.prototype.onManifestLoaded=function(t){var e=this,i=t.subtitles||[];this.tracks=i,this.trackId=-1,this.hls.trigger(Vt.a.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:i}),i.forEach(function(t){t.default&&(e.media?e.subtitleTrack=t.id:e.queuedDefaultTrack=t.id)})},e.prototype.onTick=function(){var t=this.trackId,e=this.tracks[t];if(e){var i=e.details;void 0!==i&&!0!==i.live||(Ht.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(Vt.a.SUBTITLE_TRACK_LOADING,{url:e.url,id:t}))}},e.prototype.onSubtitleTrackLoaded=function(t){var e=this;t.id<this.tracks.length&&(Ht.b.log("subtitle track "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.timer&&(this.timer=setInterval(function(){e.onTick()},1e3*t.details.targetduration,this)),!t.details.live&&this.timer&&(clearInterval(this.timer),this.timer=null))},e.prototype.setSubtitleTrackInternal=function(t){if(!(t<-1||t>=this.tracks.length)){this.timer&&(clearInterval(this.timer),this.timer=null);var e=Ot(this.media.textTracks);if(-1!==this.trackId&&(e[this.trackId].mode="disabled"),this.trackId=t,Ht.b.log("switching to subtitle track "+t),this.hls.trigger(Vt.a.SUBTITLE_TRACK_SWITCH,{id:t}),-1!==t){var i=this.tracks[t];t<e.length&&(e[t].mode=this.subtitleDisplay?"showing":"hidden");var n=i.details;void 0!==n&&!0!==n.live||(Ht.b.log("(re)loading playlist for subtitle track "+t),this.hls.trigger(Vt.a.SUBTITLE_TRACK_LOADING,{url:i.url,id:t}))}}},tn(e,[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&this.setSubtitleTrackInternal(t)}}]),e}(qt),nn=en,rn=i(5),an={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING"},on=function(t){function e(i){Pt(this,e);var n=xt(this,t.call(this,i,Vt.a.MEDIA_ATTACHED,Vt.a.ERROR,Vt.a.KEY_LOADED,Vt.a.FRAG_LOADED,Vt.a.SUBTITLE_TRACKS_UPDATED,Vt.a.SUBTITLE_TRACK_SWITCH,Vt.a.SUBTITLE_TRACK_LOADED,Vt.a.SUBTITLE_FRAG_PROCESSED));return n.config=i.config,n.vttFragSNsProcessed={},n.vttFragQueues=void 0,n.currentlyProcessing=null,n.state=an.STOPPED,n.currentTrackId=-1,n.decrypter=new rn.a(i.observer,i.config),n}return Nt(e,t),e.prototype.onHandlerDestroyed=function(){this.state=an.STOPPED},e.prototype.clearVttFragQueues=function(){var t=this;this.vttFragQueues={},this.tracks.forEach(function(e){t.vttFragQueues[e.id]=[]})},e.prototype.nextFrag=function(){if(null===this.currentlyProcessing&&this.currentTrackId>-1&&this.vttFragQueues[this.currentTrackId].length){var t=this.currentlyProcessing=this.vttFragQueues[this.currentTrackId].shift();this.fragCurrent=t,this.hls.trigger(Vt.a.FRAG_LOADING,{frag:t}),this.state=an.FRAG_LOADING}},e.prototype.onSubtitleFragProcessed=function(t){t.success&&this.vttFragSNsProcessed[t.frag.trackId].push(t.frag.sn),this.currentlyProcessing=null,this.state=an.IDLE,this.nextFrag()},e.prototype.onMediaAttached=function(){this.state=an.IDLE},e.prototype.onError=function(t){var e=t.frag;e&&"subtitle"!==e.type||this.currentlyProcessing&&(this.currentlyProcessing=null,this.nextFrag())},e.prototype.doTick=function(){var t=this;switch(this.state){case an.IDLE:var e=this.tracks,i=this.currentTrackId,n=this.vttFragSNsProcessed[i],r=this.vttFragQueues[i],a=this.currentlyProcessing?this.currentlyProcessing.sn:-1,o=function(t){return n.indexOf(t.sn)>-1},s=function(t){return r.some(function(e){return e.sn===t.sn})};if(!e)break;var l;if(i<e.length&&(l=e[i].details),void 0===l)break;l.fragments.forEach(function(e){o(e)||e.sn===a||s(e)||(e.decryptdata&&null!=e.decryptdata.uri&&null==e.decryptdata.key?(Ht.b.log("Loading key for "+e.sn),t.state=an.KEY_LOADING,t.hls.trigger(Vt.a.KEY_LOADING,{frag:e})):(e.trackId=i,r.push(e),t.nextFrag()))})}},e.prototype.onSubtitleTracksUpdated=function(t){var e=this;Ht.b.log("subtitle tracks updated"),this.tracks=t.subtitleTracks,this.clearVttFragQueues(),this.vttFragSNsProcessed={},this.tracks.forEach(function(t){e.vttFragSNsProcessed[t.id]=[]})},e.prototype.onSubtitleTrackSwitch=function(t){if(this.currentTrackId=t.id,-1!==this.currentTrackId){void 0!==this.tracks[this.currentTrackId].details&&this.tick()}},e.prototype.onSubtitleTrackLoaded=function(){this.tick()},e.prototype.onKeyLoaded=function(){this.state===an.KEY_LOADING&&(this.state=an.IDLE,this.tick())},e.prototype.onFragLoaded=function(t){var e=this.fragCurrent,i=t.frag.decryptdata,n=t.frag,r=this.hls;if(this.state===an.FRAG_LOADING&&e&&"subtitle"===t.frag.type&&e.sn===t.frag.sn&&t.payload.byteLength>0&&null!=i&&null!=i.key&&"AES-128"===i.method){var a=void 0;try{a=performance.now()}catch(t){a=Date.now()}this.decrypter.decrypt(t.payload,i.key.buffer,i.iv.buffer,function(t){var e=void 0;try{e=performance.now()}catch(t){e=Date.now()}r.trigger(Vt.a.FRAG_DECRYPTED,{frag:n,payload:t,stats:{tstart:a,tdecrypt:e}})})}},e}(Ge),sn=on,ln=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),un={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready"},dn=function(t,e,i){var n={videoCapabilities:[]};return e.forEach(function(t){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"'})}),[n]},cn=function(t,e,i){switch(t){case un.WIDEVINE:return dn(0,i);default:throw Error("Unknown key-system: "+t)}},hn=function(t){function e(i){Mt(this,e);var n=Ft(this,t.call(this,i,Vt.a.MEDIA_ATTACHED,Vt.a.MANIFEST_PARSED));return n._widevineLicenseUrl=i.config.widevineLicenseUrl,n._licenseXhrSetup=i.config.licenseXhrSetup,n._emeEnabled=i.config.emeEnabled,n._requestMediaKeySystemAccess=i.config.requestMediaKeySystemAccessFunc,n._mediaKeysList=[],n._media=null,n._hasSetMediaKeys=!1,n._isMediaEncrypted=!1,n._requestLicenseFailureCount=0,n}return Bt(e,t),e.prototype.getLicenseServerUrl=function(t){var e=void 0;switch(t){case un.WIDEVINE:e=this._widevineLicenseUrl;break;default:e=null}return e||(Ht.b.error('No license server URL configured for key-system "'+t+'"'),this.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})),e},e.prototype._attemptKeySystemAccess=function(t,e,i){var n=this,r=cn(t,0,i);if(!r)return void Ht.b.warn("Can not create config for key-system (maybe because platform is not supported):",t);Ht.b.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(t,r).then(function(e){n._onMediaKeySystemAccessObtained(t,e)}).catch(function(e){Ht.b.error('Failed to obtain key-system "'+t+'" access:',e)})},e.prototype._onMediaKeySystemAccessObtained=function(t,e){var i=this;Ht.b.log('Access for key-system "'+t+'" obtained');var n={mediaKeys:null,mediaKeysSession:null,mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:t};this._mediaKeysList.push(n),e.createMediaKeys().then(function(e){n.mediaKeys=e,Ht.b.log('Media-keys created for key-system "'+t+'"'),i._onMediaKeysCreated()}).catch(function(t){Ht.b.error("Failed to create media-keys:",t)})},e.prototype._onMediaKeysCreated=function(){var t=this;this._mediaKeysList.forEach(function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),t._onNewMediaKeySession(e.mediaKeysSession))})},e.prototype._onNewMediaKeySession=function(t){var e=this;Ht.b.log("New key-system session "+t.sessionId),t.addEventListener("message",function(i){e._onKeySessionMessage(t,i.message)},!1)},e.prototype._onKeySessionMessage=function(t,e){Ht.b.log("Got EME message event, creating license request"),this._requestLicense(e,function(e){Ht.b.log("Received license data, updating key-session"),t.update(e)})},e.prototype._onMediaEncrypted=function(t,e){Ht.b.log('Media is encrypted using "'+t+'" init data type'),this._isMediaEncrypted=!0,this._mediaEncryptionInitDataType=t,this._mediaEncryptionInitData=e,this._attemptSetMediaKeys(),this._generateRequestWithPreferredKeySession()},e.prototype._attemptSetMediaKeys=function(){if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return Ht.b.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_NO_KEYS,fatal:!0});Ht.b.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},e.prototype._generateRequestWithPreferredKeySession=function(){var t=this,e=this._mediaKeysList[0];if(!e)return Ht.b.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(e.mediaKeysSessionInitialized)return void Ht.b.warn("Key-Session already initialized but requested again");var i=e.mediaKeysSession;i||(Ht.b.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_NO_SESSION,fatal:!0}));var n=this._mediaEncryptionInitDataType,r=this._mediaEncryptionInitData;Ht.b.log('Generating key-session request for "'+n+'" init data type'),e.mediaKeysSessionInitialized=!0,i.generateRequest(n,r).then(function(){Ht.b.debug("Key-session generation succeeded")}).catch(function(e){Ht.b.error("Error generating key-session request:",e),t.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_NO_SESSION,fatal:!1})})},e.prototype._createLicenseXhr=function(t,e,i){var n=new XMLHttpRequest,r=this._licenseXhrSetup;try{if(r)try{r(n,t)}catch(e){n.open("POST",t,!0),r(n,t)}n.readyState||n.open("POST",t,!0)}catch(t){return Ht.b.error("Error setting up key-system license XHR",t),void this.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}return n.responseType="arraybuffer",n.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,n,t,e,i),n},e.prototype._onLicenseRequestReadyStageChange=function(t,e,i,n){switch(t.readyState){case 4:if(200===t.status)this._requestLicenseFailureCount=0,Ht.b.log("License request succeeded"),n(t.response);else{if(Ht.b.error("License Request XHR failed ("+e+"). Status: "+t.status+" ("+t.statusText+")"),++this._requestLicenseFailureCount<=3){var r=3-this._requestLicenseFailureCount+1;return Ht.b.warn("Retrying license request, "+r+" attempts left"),void this._requestLicense(i,n)}this.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}}},e.prototype._generateLicenseRequestChallenge=function(t,e){var i=void 0;return t.mediaKeySystemDomain===un.PLAYREADY?Ht.b.error("PlayReady is not supported (yet)"):t.mediaKeySystemDomain===un.WIDEVINE?i=e:Ht.b.error("Unsupported key-system:",t.mediaKeySystemDomain),i},e.prototype._requestLicense=function(t,e){Ht.b.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i)return Ht.b.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(Vt.a.ERROR,{type:jt.b.KEY_SYSTEM_ERROR,details:jt.a.KEY_SYSTEM_NO_ACCESS,fatal:!0});var n=this.getLicenseServerUrl(i.mediaKeySystemDomain),r=this._createLicenseXhr(n,t,e);Ht.b.log("Sending license request to URL: "+n),r.send(this._generateLicenseRequestChallenge(i,t))},e.prototype.onMediaAttached=function(t){var e=this;if(this._emeEnabled){var i=t.media;this._media=i,i.addEventListener("encrypted",function(t){e._onMediaEncrypted(t.initDataType,t.initData)})}},e.prototype.onManifestParsed=function(t){if(this._emeEnabled){var e=t.levels.map(function(t){return t.audioCodec}),i=t.levels.map(function(t){return t.videoCodec});this._attemptKeySystemAccess(un.WIDEVINE,e,i)}},ln(e,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),e}(qt),fn=hn,pn=function(){return window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null}(),gn={autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:fi,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:ni,bufferController:oi,capLevelController:ui,fpsController:ci,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:pn};gn.subtitleStreamController=sn,gn.subtitleTrackController=nn,gn.timelineController=Qi,gn.cueHandler=Gt,gn.enableCEA708Captions=!0,gn.enableWebVTT=!0,gn.captionsTextTrack1Label="English",gn.captionsTextTrack1LanguageCode="en",gn.captionsTextTrack2Label="Spanish",gn.captionsTextTrack2LanguageCode="es",gn.audioStreamController=_i,gn.audioTrackController=yi,gn.emeController=fn;var yn=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();i(12);var vn=function(){function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ut(this,t);var n=t.DefaultConfig;if((i.liveSyncDurationCount||i.liveMaxLatencyDurationCount)&&(i.liveSyncDuration||i.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");for(var r in n)r in i||(i[r]=n[r]);if(void 0!==i.liveMaxLatencyDurationCount&&i.liveMaxLatencyDurationCount<=i.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==i.liveMaxLatencyDuration&&(i.liveMaxLatencyDuration<=i.liveSyncDuration||void 0===i.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(Ht.a)(i.debug),this.config=i,this._autoLevelCapping=-1;var a=this.observer=new Ce.a;a.trigger=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];a.emit.apply(a,[t,t].concat(i))},a.off=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];a.removeListener.apply(a,[t].concat(i))},this.on=a.on.bind(a),this.off=a.off.bind(a),this.trigger=a.trigger.bind(a);var o=this.abrController=new i.abrController(this),s=new i.bufferController(this),l=new i.capLevelController(this),u=new i.fpsController(this),d=new me(this),c=new _e(this),h=new Te(this),f=new Xe(this),p=this.levelController=new ze(this),g=new Me(this),y=this.streamController=new Ve(this,g),v=[p,y],m=i.audioStreamController;m&&v.push(new m(this,g)),this.networkControllers=v;var b=[d,c,h,o,s,l,u,f,g];if(m=i.audioTrackController){var _=new m(this);this.audioTrackController=_,b.push(_)}if(m=i.subtitleTrackController){var E=new m(this);this.subtitleTrackController=E,b.push(E)}if(m=i.emeController){var T=new m(this);this.emeController=T,b.push(T)}[i.subtitleStreamController,i.timelineController].forEach(function(t){t&&b.push(new t(e))}),this.coreComponents=b}return t.isSupported=function(){return z()},yn(t,null,[{key:"version",get:function(){return"0.9.1"}},{key:"Events",get:function(){return Vt.a}},{key:"ErrorTypes",get:function(){return jt.b}},{key:"ErrorDetails",get:function(){return jt.a}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:gn},set:function(e){t.defaultConfig=e}}]),t.prototype.destroy=function(){Ht.b.log("destroy"),this.trigger(Vt.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(t){t.destroy()}),this.url=null,this.observer.removeAllListeners(),this._autoLevelCapping=-1},t.prototype.attachMedia=function(t){Ht.b.log("attachMedia"),this.media=t,this.trigger(Vt.a.MEDIA_ATTACHING,{media:t})},t.prototype.detachMedia=function(){Ht.b.log("detachMedia"),this.trigger(Vt.a.MEDIA_DETACHING),this.media=null},t.prototype.loadSource=function(t){t=Yt.a.buildAbsoluteURL(window.location.href,t,{alwaysNormalize:!0}),Ht.b.log("loadSource:"+t),this.url=t,this.trigger(Vt.a.MANIFEST_LOADING,{url:t})},t.prototype.startLoad=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;Ht.b.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},t.prototype.stopLoad=function(){Ht.b.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},t.prototype.swapAudioCodec=function(){Ht.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.prototype.recoverMediaError=function(){Ht.b.log("recoverMediaError");var t=this.media;this.detachMedia(),this.attachMedia(t)},yn(t,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){Ht.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){Ht.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){Ht.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){Ht.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){Ht.b.log("set startLevel:"+t);var e=this;-1!==t&&(t=Math.max(t,e.minAutoLevel)),e.levelController.startLevel=t}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){Ht.b.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this,e=t.levels,i=t.config.minAutoBitrate,n=e?e.length:0,r=0;r<n;r++){if((e[r].realBitrate?Math.max(e[r].realBitrate,e[r].bitrate):e[r].bitrate)>i)return r}return 0}},{key:"maxAutoLevel",get:function(){var t=this,e=t.levels,i=t.autoLevelCapping;return-1===i&&e&&e.length?e.length-1:i}},{key:"nextAutoLevel",get:function(){var t=this;return Math.min(Math.max(t.abrController.nextAutoLevel,t.minAutoLevel),t.maxAutoLevel)},set:function(t){var e=this;e.abrController.nextAutoLevel=Math.max(e.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),t}();e.default=vn},function(t,e,i){function n(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e.oe=function(t){throw console.error(t),t};var n=e(e.s=ENTRY_MODULE);return n.default||n}function r(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(t,e,n){var a={};a[n]=[];var o=e.toString(),s=o.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var d,c=s[1],h=new RegExp("(\\\\n|\\W)"+r(c)+u,"g");d=h.exec(o);)"dll-reference"!==d[3]&&a[n].push(d[3]);for(h=new RegExp("\\("+r(c)+'\\("(dll-reference\\s('+l+'))"\\)\\)'+u,"g");d=h.exec(o);)t[d[2]]||(a[n].push(d[1]),t[d[2]]=i(d[1]).m),a[d[2]]=a[d[2]]||[],a[d[2]].push(d[4]);return a}function o(t){return Object.keys(t).reduce(function(e,i){return e||t[i].length>0},!1)}function s(t,e){for(var i={main:[e]},n={main:[]},r={main:{}};o(i);)for(var s=Object.keys(i),l=0;l<s.length;l++){var u=s[l],d=i[u],c=d.pop();if(r[u]=r[u]||{},!r[u][c]&&t[u][c]){r[u][c]=!0,n[u]=n[u]||[],n[u].push(c);for(var h=a(t,t[u][c],u),f=Object.keys(h),p=0;p<f.length;p++)i[f[p]]=i[f[p]]||[],i[f[p]]=i[f[p]].concat(h[f[p]])}}return n}var l="[\\.|\\-|\\+|\\w|/|@]+",u="\\((/\\*.*?\\*/)?s?.*?("+l+").*?\\)";t.exports=function(t,e){e=e||{};var r={main:i.m},a=e.all?{main:Object.keys(r)}:s(r,t),o="";Object.keys(a).filter(function(t){return"main"!==t}).forEach(function(t){for(var e=0;a[t][e];)e++;a[t].push(e),r[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+t+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+a[t].map(function(e){return JSON.stringify(e)+": "+r[t][e].toString()}).join(",")+"});\n"}),o=o+"("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+a.main.map(function(t){return JSON.stringify(t)+": "+r.main[t].toString()}).join(",")+"})(self);";var l=new window.Blob([o],{type:"text/javascript"});if(e.bare)return l;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,d=u.createObjectURL(l),c=new window.Worker(d);return c.objectURL=d,c}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),r=i(1),a=i(0),o=i(6),s=i.n(o),l=function(t){var e=new s.a;e.trigger=function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.emit.apply(e,[t,t].concat(n))},e.off=function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.removeListener.apply(e,[t].concat(n))};var i=function(e,i){t.postMessage({event:e,data:i})};t.addEventListener("message",function(r){var o=r.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);t.demuxer=new n.a(e,o.typeSupported,s,o.vendor);try{Object(a.a)(!0===s.debug)}catch(t){console.warn("demuxerWorker: unable to enable logs")}i("init",null);break;case"demux":t.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}}),e.on(r.a.FRAG_DECRYPTED,i),e.on(r.a.FRAG_PARSING_INIT_SEGMENT,i),e.on(r.a.FRAG_PARSED,i),e.on(r.a.ERROR,i),e.on(r.a.FRAG_PARSING_METADATA,i),e.on(r.a.FRAG_PARSING_USERDATA,i),e.on(r.a.INIT_PTS_FOUND,i),e.on(r.a.FRAG_PARSING_DATA,function(e,i){var n=[],r={event:e,data:i};i.data1&&(r.data1=i.data1.buffer,n.push(i.data1.buffer),delete i.data1),i.data2&&(r.data2=i.data2.buffer,n.push(i.data2.buffer),delete i.data2),t.postMessage(r,n)})};e.default=l},function(t,e){String.prototype.endsWith||function(){"use strict";var t=function(){try{var t={},e=Object.defineProperty,i=e(t,t,t)&&e}catch(t){}return i}(),e={}.toString,i=function(t){if(null==this)throw TypeError();var i=String(this);if(t&&"[object RegExp]"==e.call(t))throw TypeError();var n=i.length,r=String(t),a=r.length,o=n;if(arguments.length>1){var s=arguments[1];void 0!==s&&(o=s?Number(s):0)!=o&&(o=0)}var l=Math.min(Math.max(o,0),n),u=l-a;if(u<0)return!1;for(var d=-1;++d<a;)if(i.charCodeAt(u+d)!=r.charCodeAt(d))return!1;return!0};t?t(String.prototype,"endsWith",{value:i,configurable:!0,writable:!0}):String.prototype.endsWith=i}()}]).default})},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(9),f=n(h),p=i(4),g=n(p);i(189);var y=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.el.src=i.src,n}return(0,c.default)(e,t),e.prototype.getPlaybackType=function(){return f.default.NO_OP},(0,u.default)(e,[{key:"name",get:function(){return"html_img"}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}}]),e.prototype.render=function(){return this.trigger(g.default.PLAYBACK_READY,this.name),this},e.prototype._onLoad=function(){this.trigger(g.default.PLAYBACK_ENDED,this.name)},e.prototype._onError=function(t){var e="error"===t.type?"load error":"loading aborted";this.trigger(g.default.PLAYBACK_ERROR,{message:e},this.name)},e}(f.default);e.default=y,y.canPlay=function(t){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(t)},t.exports=e.default},function(t,e,i){var n=i(190);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,"[data-html-img]{max-width:100%;max-height:100%}",""])},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(5),f=i(9),p=n(f),g=i(8),y=n(g),v=i(4),m=n(v),b=i(192),_=n(b);i(193);var E=function(t){function e(){(0,a.default)(this,e);for(var i=arguments.length,n=Array(i),r=0;r<i;r++)n[r]=arguments[r];var o=(0,s.default)(this,t.call.apply(t,[this].concat(n)));return o._noiseFrameNum=-1,o}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"no_op"}},{key:"template",get:function(){return(0,y.default)(_.default)}},{key:"attributes",get:function(){return{"data-no-op":""}}}]),e.prototype.render=function(){var t=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported");this.$el.html(this.template({message:t})),this.trigger(m.default.PLAYBACK_READY,this.name);var e=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&e||this._animate(),this},e.prototype._noise=function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var t=this.context.createImageData(this.context.canvas.width,this.context.canvas.height),e=void 0;try{e=new Uint32Array(t.data.buffer)}catch(r){e=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var i=t.data,n=0;n<i.length;n++)e[n]=i[n]}for(var r=e.length,a=6*Math.random()+4,o=0,s=0,l=0;l<r;){if(o<0){o=a*Math.random();s=255*Math.pow(Math.random(),.4)<<24}o-=1,e[l++]=s}this.context.putImageData(t,0,0)}},e.prototype._loop=function(){var t=this;this._stop||(this._noise(),this._animationHandle=(0,h.requestAnimationFrame)(function(){return t._loop()}))},e.prototype.destroy=function(){this._animationHandle&&((0,h.cancelAnimationFrame)(this._animationHandle),this._stop=!0)},e.prototype._animate=function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()},e}(p.default);e.default=E,E.canPlay=function(t){return!0},t.exports=e.default},function(t,e){t.exports="<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n"},function(t,e,i){var n=i(194);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,"[data-no-op]{position:absolute;height:100%;width:100%;text-align:center}[data-no-op] p[data-no-op-msg]{position:absolute;text-align:center;font-size:25px;left:0;right:0;color:#fff;padding:10px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);max-height:100%;overflow:auto}[data-no-op] canvas[data-no-op-canvas]{background-color:#777;height:100%;width:100%}",""])},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(35),f=n(h),p=i(4),g=n(p),y=i(8),v=n(y),m=i(196),b=n(m);i(197);var _=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.template=(0,v.default)(b.default),n.showTimeout=null,n.listenTo(n.container,g.default.CONTAINER_STATE_BUFFERING,n.onBuffering),n.listenTo(n.container,g.default.CONTAINER_STATE_BUFFERFULL,n.onBufferFull),n.listenTo(n.container,g.default.CONTAINER_STOP,n.onStop),n.listenTo(n.container,g.default.CONTAINER_ENDED,n.onStop),n.listenTo(n.container,g.default.CONTAINER_ERROR,n.onStop),n.render(),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"spinner"}},{key:"attributes",get:function(){return{"data-spinner":"",class:"spinner-three-bounce"}}}]),e.prototype.onBuffering=function(){this.show()},e.prototype.onBufferFull=function(){this.hide()},e.prototype.onStop=function(){this.hide()},e.prototype.show=function(){var t=this;null===this.showTimeout&&(this.showTimeout=setTimeout(function(){return t.$el.show()},300))},e.prototype.hide=function(){null!==this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.$el.hide()},e.prototype.render=function(){return this.$el.html(this.template()),this.container.$el.append(this.$el),this.$el.hide(),this.container.buffering&&this.onBuffering(),this},e}(f.default);e.default=_,t.exports=e.default},function(t,e){t.exports="<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n"},function(t,e,i){var n=i(198);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,".spinner-three-bounce[data-spinner]{position:absolute;margin:0 auto;width:70px;text-align:center;z-index:999;left:0;right:0;margin-left:auto;margin-right:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.spinner-three-bounce[data-spinner]>div{width:18px;height:18px;background-color:#fff;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner-three-bounce[data-spinner] [data-bounce1]{-webkit-animation-delay:-.32s;animation-delay:-.32s}.spinner-three-bounce[data-spinner] [data-bounce2]{-webkit-animation-delay:-.16s;animation-delay:-.16s}@-webkit-keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}",""])},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(200),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(36),f=n(h),p=i(4),g=n(p),y=i(6),v=n(y),m=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.setInitialAttrs(),n.reportInterval=n.options.reportInterval||5e3,n.state="IDLE",n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"stats"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container.playback,g.default.PLAYBACK_PLAY,this.onPlay),this.listenTo(this.container,g.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,g.default.CONTAINER_ENDED,this.onStop),this.listenTo(this.container,g.default.CONTAINER_DESTROYED,this.onStop),this.listenTo(this.container,g.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,g.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,g.default.CONTAINER_STATS_ADD,this.onStatsAdd),this.listenTo(this.container,g.default.CONTAINER_BITRATE,this.onStatsAdd),this.listenTo(this.container.playback,g.default.PLAYBACK_STATS_ADD,this.onStatsAdd)},e.prototype.setInitialAttrs=function(){this.firstPlay=!0,this.startupTime=0,this.rebufferingTime=0,this.watchingTime=0,this.rebuffers=0,this.externalMetrics={}},e.prototype.onPlay=function(){this.state="PLAYING",this.watchingTimeInit=Date.now(),this.intervalId||(this.intervalId=setInterval(this.report.bind(this),this.reportInterval))},e.prototype.onStop=function(){clearInterval(this.intervalId),this.report(),this.intervalId=void 0,this.state="STOPPED"},e.prototype.onBuffering=function(){this.firstPlay?this.startupTimeInit=Date.now():this.rebufferingTimeInit=Date.now(),this.state="BUFFERING",this.rebuffers++},e.prototype.onBufferFull=function(){this.firstPlay&&this.startupTimeInit?(this.firstPlay=!1,this.startupTime=Date.now()-this.startupTimeInit,this.watchingTimeInit=Date.now()):this.rebufferingTimeInit&&(this.rebufferingTime+=this.getRebufferingTime()),this.rebufferingTimeInit=void 0,this.state="PLAYING"},e.prototype.getRebufferingTime=function(){return Date.now()-this.rebufferingTimeInit},e.prototype.getWatchingTime=function(){return Date.now()-this.watchingTimeInit-this.rebufferingTime},e.prototype.isRebuffering=function(){return!!this.rebufferingTimeInit},e.prototype.onStatsAdd=function(t){v.default.extend(this.externalMetrics,t)},e.prototype.getStats=function(){var t={startupTime:this.startupTime,rebuffers:this.rebuffers,rebufferingTime:this.isRebuffering()?this.rebufferingTime+this.getRebufferingTime():this.rebufferingTime,watchingTime:this.isRebuffering()?this.getWatchingTime()-this.getRebufferingTime():this.getWatchingTime()};return v.default.extend(t,this.externalMetrics),t},e.prototype.report=function(){this.container.statsReport(this.getStats())},e}(f.default);e.default=m,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(35),f=n(h),p=i(4),g=n(p),y=i(8),v=n(y),m=i(202),b=n(m);i(203);var _=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.configure(),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"watermark"}},{key:"template",get:function(){return(0,v.default)(b.default)}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,g.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,g.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,g.default.CONTAINER_OPTIONS_CHANGE,this.configure)},e.prototype.configure=function(){this.position=this.options.position||"bottom-right",this.options.watermark?(this.imageUrl=this.options.watermark,this.imageLink=this.options.watermarkLink,this.render()):this.$el.remove()},e.prototype.onPlay=function(){this.hidden||this.$el.show()},e.prototype.onStop=function(){this.$el.hide()},e.prototype.render=function(){this.$el.hide();var t={position:this.position,imageUrl:this.imageUrl,imageLink:this.imageLink};return this.$el.html(this.template(t)),this.container.$el.append(this.$el),this},e}(f.default);e.default=_,t.exports=e.default},function(t,e){t.exports="<div data-watermark data-watermark-<%=position %>>\n<% if(typeof imageLink !== 'undefined') { %>\n<a target=_blank href=\"<%= imageLink %>\">\n<% } %>\n<img src=\"<%= imageUrl %>\">\n<% if(typeof imageLink !== 'undefined') { %>\n</a>\n<% } %>\n</div>\n"},function(t,e,i){var n=i(204);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,"[data-watermark]{position:absolute;min-width:70px;max-width:200px;width:12%;text-align:center;z-index:10}[data-watermark] a{outline:none;cursor:pointer}[data-watermark] img{max-width:100%}[data-watermark-bottom-left]{bottom:10px;left:10px}[data-watermark-bottom-right]{bottom:10px;right:42px}[data-watermark-top-left]{top:10px;left:10px}[data-watermark-top-right]{top:10px;right:37px}",""])},function(t,e,i){"use strict";(function(n){function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=i(0),o=r(a),s=i(1),l=r(s),u=i(3),d=r(u),c=i(2),h=r(c),f=i(35),p=r(f),g=i(4),y=r(g),v=i(8),m=r(v),b=i(9),_=r(b),E=i(206),T=r(E),A=i(58),S=r(A);i(207);var L=function(t){function e(i){(0,o.default)(this,e);var r=(0,l.default)(this,t.call(this,i));return r.hasStartedPlaying=!1,r.playRequested=!1,r.render(),n.nextTick(function(){return r.update()}),r}return(0,h.default)(e,t),(0,d.default)(e,[{key:"name",get:function(){return"poster"}},{key:"template",get:function(){return(0,m.default)(T.default)}},{key:"shouldRender",get:function(){var t=!(!this.options.poster||!this.options.poster.showForNoOp);return"html_img"!==this.container.playback.name&&(this.container.playback.getPlaybackType()!==_.default.NO_OP||t)}},{key:"attributes",get:function(){return{class:"player-poster","data-poster":""}}},{key:"events",get:function(){return{click:"clicked"}}},{key:"showOnVideoEnd",get:function(){return!this.options.poster||this.options.poster.showOnVideoEnd||void 0===this.options.poster.showOnVideoEnd}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,y.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,y.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,y.default.CONTAINER_STATE_BUFFERING,this.update),this.listenTo(this.container,y.default.CONTAINER_STATE_BUFFERFULL,this.update),this.listenTo(this.container,y.default.CONTAINER_OPTIONS_CHANGE,this.render),this.showOnVideoEnd&&this.listenTo(this.container,y.default.CONTAINER_ENDED,this.onStop)},e.prototype.stopListening=function(){t.prototype.stopListening.call(this)},e.prototype.onPlay=function(){this.hasStartedPlaying=!0,this.update()},e.prototype.onStop=function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()},e.prototype.showPlayButton=function(t){!t||this.options.chromeless&&!this.options.allowUserInteraction?(this.$playButton.hide(),this.$el.removeClass("clickable")):(this.$playButton.show(),this.$el.addClass("clickable"))},e.prototype.clicked=function(){return this.options.chromeless&&!this.options.allowUserInteraction||(this.playRequested=!0,this.update(),this.container.play()),!1},e.prototype.shouldHideOnPlay=function(){return!this.container.playback.isAudioOnly},e.prototype.update=function(){if(this.shouldRender){var t=!this.playRequested&&!this.hasStartedPlaying&&!this.container.buffering;this.showPlayButton(t),this.hasStartedPlaying?(this.container.enableMediaControl(),this.shouldHideOnPlay()&&this.$el.hide()):(this.container.disableMediaControl(),this.$el.show())}},e.prototype.render=function(){if(this.shouldRender){this.$el.html(this.template());if(this.options.poster&&void 0===this.options.poster.custom){var t=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+t+")"})}else this.options.poster&&this.$el.css({background:this.options.poster.custom});this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(S.default),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var e=this.options.mediacontrol&&this.options.mediacontrol.buttons;return e&&this.$el.find("svg path").css("fill",e),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(e=this.options.mediacontrol.buttons,this.$playButton.css("color",e)),this.update(),this}},e}(p.default);e.default=L,t.exports=e.default}).call(e,i(57))},function(t,e){t.exports='<div class="play-wrapper" data-poster></div>\n'},function(t,e,i){var n=i(208);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,".player-poster[data-poster]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:absolute;height:100%;width:100%;z-index:998;top:0;left:0;background-color:#000;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.player-poster[data-poster].clickable{cursor:pointer}.player-poster[data-poster]:hover .play-wrapper[data-poster]{opacity:1}.player-poster[data-poster] .play-wrapper[data-poster]{width:100%;height:25%;margin:0 auto;opacity:.75;transition:opacity .1s ease}.player-poster[data-poster] .play-wrapper[data-poster] svg{height:100%}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#fff}",""])},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(210),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(36),f=n(h),p=i(4),g=n(p),y=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.container.options.gaAccount&&(n.account=n.container.options.gaAccount,n.trackerName=n.container.options.gaTrackerName?n.container.options.gaTrackerName+".":"Clappr.",n.domainName=n.container.options.gaDomainName,n.currentHDState=void 0,n.embedScript()),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"google_analytics"}}]),e.prototype.embedScript=function(){var t=this;if(window._gat)this.addEventListeners();else{var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("async","async"),e.setAttribute("src","//www.google-analytics.com/ga.js"),e.onload=function(){return t.addEventListeners()},document.body.appendChild(e)}},e.prototype.addEventListeners=function(){var t=this;this.container&&(this.listenTo(this.container,g.default.CONTAINER_READY,this.onReady),this.listenTo(this.container,g.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,g.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,g.default.CONTAINER_PAUSE,this.onPause),this.listenTo(this.container,g.default.CONTAINER_ENDED,this.onEnded),this.listenTo(this.container,g.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,g.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,g.default.CONTAINER_ERROR,this.onError),this.listenTo(this.container,g.default.CONTAINER_PLAYBACKSTATE,this.onPlaybackChanged),this.listenTo(this.container,g.default.CONTAINER_VOLUME,function(e){return t.onVolumeChanged(e)}),this.listenTo(this.container,g.default.CONTAINER_SEEK,function(e){return t.onSeek(e)}),this.listenTo(this.container,g.default.CONTAINER_FULL_SCREEN,this.onFullscreen),this.listenTo(this.container,g.default.CONTAINER_HIGHDEFINITIONUPDATE,this.onHD),this.listenTo(this.container,g.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.onDVR)),_gaq.push([this.trackerName+"_setAccount",this.account]),this.domainName&&_gaq.push([this.trackerName+"_setDomainName",this.domainName])},e.prototype.onReady=function(){this.push(["Video","Playback",this.container.playback.name])},e.prototype.onPlay=function(){this.push(["Video","Play",this.container.playback.src])},e.prototype.onStop=function(){this.push(["Video","Stop",this.container.playback.src])},e.prototype.onEnded=function(){this.push(["Video","Ended",this.container.playback.src])},e.prototype.onBuffering=function(){this.push(["Video","Buffering",this.container.playback.src])},e.prototype.onBufferFull=function(){this.push(["Video","Bufferfull",this.container.playback.src])},e.prototype.onError=function(){this.push(["Video","Error",this.container.playback.src])},e.prototype.onHD=function(t){var e=t?"ON":"OFF";e!==this.currentHDState&&(this.currentHDState=e,this.push(["Video","HD - "+e,this.container.playback.src]))},e.prototype.onPlaybackChanged=function(t){null!==t.type&&this.push(["Video","Playback Type - "+t.type,this.container.playback.src])},e.prototype.onDVR=function(t){var e=t?"ON":"OFF";this.push(["Interaction","DVR - "+e,this.container.playback.src])},e.prototype.onPause=function(){this.push(["Video","Pause",this.container.playback.src])},e.prototype.onSeek=function(){this.push(["Video","Seek",this.container.playback.src])},e.prototype.onVolumeChanged=function(){this.push(["Interaction","Volume",this.container.playback.src])},e.prototype.onFullscreen=function(){this.push(["Interaction","Fullscreen",this.container.playback.src])},e.prototype.push=function(t){var e=[this.trackerName+"_trackEvent"].concat(t);_gaq.push(e)},e}(f.default);e.default=y,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(36),f=n(h),p=i(4),g=n(p),y=i(9),v=n(y),m=function(t){function e(i){return(0,a.default)(this,e),(0,s.default)(this,t.call(this,i))}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"click_to_pause"}}]),e.prototype.bindEvents=function(){this.listenTo(this.container,g.default.CONTAINER_CLICK,this.click),this.listenTo(this.container,g.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate)},e.prototype.click=function(){(this.container.getPlaybackType()!==v.default.LIVE||this.container.isDvrEnabled())&&(this.container.isPlaying()?this.container.pause():this.container.play())},e.prototype.settingsUpdate=function(){var t=this.container.getPlaybackType()!==v.default.LIVE||this.container.isDvrEnabled();if(t!==this.pointerEnabled){var e=t?"addClass":"removeClass";this.container.$el[e]("pointer-enabled"),this.pointerEnabled=t}},e}(f.default);e.default=m,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(37),f=n(h),p=i(8),g=n(p),y=i(9),v=n(y),m=i(4),b=n(m),_=i(213),E=n(_);i(214);var T=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.settingsUpdate(),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"template",get:function(){return(0,g.default)(E.default)}},{key:"name",get:function(){return"dvr_controls"}},{key:"events",get:function(){return{"click .live-button":"click"}}},{key:"attributes",get:function(){return{class:"dvr-controls","data-dvr-controls":""}}}]),e.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,b.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,b.default.MEDIACONTROL_RENDERED,this.settingsUpdate),this.listenTo(this.core,b.default.CORE_OPTIONS_CHANGE,this.render),this.core.getCurrentContainer()&&(this.listenToOnce(this.core.getCurrentContainer(),b.default.CONTAINER_TIMEUPDATE,this.render),this.listenTo(this.core.getCurrentContainer(),b.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.dvrChanged))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.dvrChanged=function(t){this.core.getPlaybackType()===v.default.LIVE&&(this.settingsUpdate(),this.core.mediaControl.$el.addClass("live"),t?(this.core.mediaControl.$el.addClass("dvr"),this.core.mediaControl.$el.find(".media-control-indicator[data-position], .media-control-indicator[data-duration]").hide()):this.core.mediaControl.$el.removeClass("dvr"))},e.prototype.click=function(){var t=this.core.mediaControl,e=t.container;e.isPlaying()||e.play(),t.$el.hasClass("dvr")&&e.seek(e.getDuration())},e.prototype.settingsUpdate=function(){var t=this;this.stopListening(),this.core.mediaControl.$el.removeClass("live"),this.shouldRender()&&(this.render(),this.$el.click(function(){return t.click()})),this.bindEvents()},e.prototype.shouldRender=function(){return(void 0===this.core.options.useDvrControls||!!this.core.options.useDvrControls)&&this.core.getPlaybackType()===v.default.LIVE},e.prototype.render=function(){return this.$el.html(this.template({live:this.core.i18n.t("live"),backToLive:this.core.i18n.t("back_to_live")})),this.shouldRender()&&(this.core.mediaControl.$el.addClass("live"),this.core.mediaControl.$(".media-control-left-panel[data-media-control]").append(this.$el)),this},e}(f.default);e.default=T,t.exports=e.default},function(t,e){t.exports='<div class="live-info"><%= live %></div>\n<button type="button" class="live-button" aria-label="<%= backToLive %>"><%= backToLive %></button>\n'},function(t,e,i){var n=i(215);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,'.dvr-controls[data-dvr-controls]{display:inline-block;float:left;color:#fff;line-height:32px;font-size:10px;font-weight:700;margin-left:6px}.dvr-controls[data-dvr-controls] .live-info{cursor:default;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase}.dvr-controls[data-dvr-controls] .live-info:before{content:"";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#ff0101}.dvr-controls[data-dvr-controls] .live-info.disabled{opacity:.3}.dvr-controls[data-dvr-controls] .live-info.disabled:before{background-color:#fff}.dvr-controls[data-dvr-controls] .live-button{cursor:pointer;outline:none;display:none;border:0;color:#fff;background-color:transparent;height:32px;padding:0;opacity:.7;font-family:Roboto,Open Sans,Arial,sans-serif;text-transform:uppercase;transition:all .1s ease}.dvr-controls[data-dvr-controls] .live-button:before{content:"";display:inline-block;position:relative;width:7px;height:7px;border-radius:3.5px;margin-right:3.5px;background-color:#fff}.dvr-controls[data-dvr-controls] .live-button:hover{opacity:1;text-shadow:hsla(0,0%,100%,.75) 0 0 5px}.dvr .dvr-controls[data-dvr-controls] .live-info{display:none}.dvr .dvr-controls[data-dvr-controls] .live-button{display:block}.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#005aff}.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar]{background-color:#ff0101}',""])},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(217),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(37),f=n(h),p=i(8),g=n(p),y=i(4),v=n(y),m=i(218),b=n(m),_=i(219),E=n(_);i(220);var T=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i)),r=i.options.closedCaptionsConfig;return n._title=r&&r.title?r.title:null,n._ariaLabel=r&&r.ariaLabel?r.ariaLabel:"cc-button",n._labelCb=r&&r.labelCallback&&"function"==typeof r.labelCallback?r.labelCallback:function(t){return t.name},n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"closed_captions"}},{key:"template",get:function(){return(0,g.default)(E.default)}},{key:"events",get:function(){return{"click [data-cc-button]":"toggleContextMenu","click [data-cc-select]":"onTrackSelect"}}},{key:"attributes",get:function(){return{class:"cc-controls","data-cc-controls":""}}}]),e.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,v.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,v.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,v.default.MEDIACONTROL_HIDE,this.hideContextMenu),this.container=this.core.getCurrentContainer(),this.container&&(this.listenTo(this.container,v.default.CONTAINER_SUBTITLE_AVAILABLE,this.onSubtitleAvailable),this.listenTo(this.container,v.default.CONTAINER_SUBTITLE_CHANGED,this.onSubtitleChanged),this.listenTo(this.container,v.default.CONTAINER_STOP,this.onContainerStop))},e.prototype.onContainerStop=function(){this.ccAvailable(!1)},e.prototype.containerChanged=function(){this.ccAvailable(!1),this.stopListening(),this.bindEvents()},e.prototype.onSubtitleAvailable=function(){this.renderCcButton(),this.ccAvailable(!0)},e.prototype.onSubtitleChanged=function(t){this.setCurrentContextMenuElement(t.id)},e.prototype.onTrackSelect=function(t){var e=parseInt(t.target.dataset.ccSelect,10);return this.container.closedCaptionsTrackId=e,this.hideContextMenu(),t.stopPropagation(),!1},e.prototype.ccAvailable=function(t){var e=t?"addClass":"removeClass";this.$el[e]("available")},e.prototype.toggleContextMenu=function(){this.$el.find("ul").toggle()},e.prototype.hideContextMenu=function(){this.$el.find("ul").hide()},e.prototype.contextMenuElement=function(t){return this.$el.find("ul a"+(isNaN(t)?"":'[data-cc-select="'+t+'"]')).parent()},e.prototype.setCurrentContextMenuElement=function(t){if(this._trackId!==t){this.contextMenuElement().removeClass("current"),this.contextMenuElement(t).addClass("current");var e=t>-1?"addClass":"removeClass";this.$ccButton[e]("enabled"),this._trackId=t}},e.prototype.renderCcButton=function(){for(var t=this.container?this.container.closedCaptionsTracks:[],e=0;e<t.length;e++)t[e].label=this._labelCb(t[e]);this.$el.html(this.template({ariaLabel:this._ariaLabel,disabledLabel:this.core.i18n.t("disabled"),title:this._title,tracks:t})),this.$ccButton=this.$el.find("button.cc-button[data-cc-button]"),this.$ccButton.append(b.default),this.$el.append(this.style)},e.prototype.render=function(){this.renderCcButton();var t=this.core.mediaControl.$el.find("button[data-fullscreen]");return t[0]?this.$el.insertAfter(t):this.core.mediaControl.$el.find(".media-control-right-panel[data-media-control]").prepend(this.$el),this},e}(f.default);e.default=T,t.exports=e.default},function(t,e){t.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 49 41.8" style="enable-background:new 0 0 49 41.8;" xml:space="preserve"><path d="M47.1,0H3.2C1.6,0,0,1.2,0,2.8v31.5C0,35.9,1.6,37,3.2,37h11.9l3.2,1.9l4.7,2.7c0.9,0.5,2-0.1,2-1.1V37h22.1 c1.6,0,1.9-1.1,1.9-2.7V2.8C49,1.2,48.7,0,47.1,0z M7.2,18.6c0-4.8,3.5-9.3,9.9-9.3c4.8,0,7.1,2.7,7.1,2.7l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2c0,0-2.7,2.9-7.6,2.9 C10.8,27.9,7.2,23.5,7.2,18.6z M36.9,27.9c-6.4,0-9.9-4.4-9.9-9.3c0-4.8,3.5-9.3,9.9-9.3C41.7,9.3,44,12,44,12l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2C44.5,25,41.9,27.9,36.9,27.9z"></path></svg>'},function(t,e){t.exports='<button type="button" class="cc-button media-control-button media-control-icon" data-cc-button aria-label="<%= ariaLabel %>"></button>\n<ul>\n  <% if (title) { %>\n  <li data-title><%= title %></li>\n  <% }; %>\n  <li><a href="#" data-cc-select="-1"><%= disabledLabel %></a></li>\n  <% for (var i = 0; i < tracks.length; i++) { %>\n    <li><a href="#" data-cc-select="<%= tracks[i].id %>"><%= tracks[i].label %></a></li>\n  <% }; %>\n</ul>\n'},function(t,e,i){var n=i(221);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,".cc-controls[data-cc-controls]{float:right;position:relative;display:none}.cc-controls[data-cc-controls].available{display:block}.cc-controls[data-cc-controls] .cc-button{padding:6px!important}.cc-controls[data-cc-controls] .cc-button.enabled{display:block;opacity:1}.cc-controls[data-cc-controls] .cc-button.enabled:hover{opacity:1;text-shadow:none}.cc-controls[data-cc-controls]>ul{list-style-type:none;position:absolute;bottom:25px;border:1px solid #000;display:none;background-color:#e6e6e6}.cc-controls[data-cc-controls] li{font-size:10px}.cc-controls[data-cc-controls] li[data-title]{background-color:#c3c2c2;padding:5px}.cc-controls[data-cc-controls] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.cc-controls[data-cc-controls] li a:hover{background-color:#555;color:#fff}.cc-controls[data-cc-controls] li a:hover a{color:#fff;text-decoration:none}.cc-controls[data-cc-controls] li.current a{color:red}",""])},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(30),f=n(h),p=i(4),g=n(p),y=i(6),v=n(y),m=i(58),b=n(m),_=i(78),E=n(_),T=(0,v.default)('link[rel="shortcut icon"]'),A=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n._container=null,n.configure(),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"favicon"}},{key:"oldIcon",get:function(){return T}}]),e.prototype.configure=function(){this.core.options.changeFavicon?this.enabled||(this.stopListening(this.core,g.default.CORE_OPTIONS_CHANGE),this.enable()):this.enabled&&(this.disable(),this.listenTo(this.core,g.default.CORE_OPTIONS_CHANGE,this.configure))},e.prototype.bindEvents=function(){this.listenTo(this.core,g.default.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core.mediaControl,g.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.core.mediaControl.container&&this.containerChanged()},e.prototype.containerChanged=function(){this._container&&this.stopListening(this._container),this._container=this.core.mediaControl.container,this.listenTo(this._container,g.default.CONTAINER_PLAY,this.setPlayIcon),this.listenTo(this._container,g.default.CONTAINER_PAUSE,this.setPauseIcon),this.listenTo(this._container,g.default.CONTAINER_STOP,this.resetIcon),this.listenTo(this._container,g.default.CONTAINER_ENDED,this.resetIcon),this.listenTo(this._container,g.default.CONTAINER_ERROR,this.resetIcon),this.resetIcon()},e.prototype.disable=function(){t.prototype.disable.call(this),this.resetIcon()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.resetIcon()},e.prototype.createIcon=function(t){var e=(0,v.default)("<canvas/>");e[0].width=16,e[0].height=16;var i=e[0].getContext("2d");i.fillStyle="#000";var n=(0,v.default)(t).find("path").attr("d"),r=new Path2D(n);i.fill(r);var a=(0,v.default)('<link rel="shortcut icon" type="image/png"/>');return a.attr("href",e[0].toDataURL("image/png")),a},e.prototype.setPlayIcon=function(){this.playIcon||(this.playIcon=this.createIcon(b.default)),this.changeIcon(this.playIcon)},e.prototype.setPauseIcon=function(){this.pauseIcon||(this.pauseIcon=this.createIcon(E.default)),this.changeIcon(this.pauseIcon)},e.prototype.resetIcon=function(){(0,v.default)('link[rel="shortcut icon"]').remove(),(0,v.default)("head").append(this.oldIcon)},e.prototype.changeIcon=function(t){t&&((0,v.default)('link[rel="shortcut icon"]').remove(),(0,v.default)("head").append(t))},e}(f.default);e.default=A,t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(224),r=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=r.default,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(5),f=i(37),p=n(f),g=i(8),y=n(g),v=i(4),m=n(v),b=i(9),_=n(b),E=i(225),T=n(E);i(226);var A=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n.hoveringOverSeekBar=!1,n.hoverPosition=null,n.duration=null,n.firstFragDateTime=null,n.actualLiveTime=!!n.mediaControl.options.actualLiveTime,n.actualLiveTime&&(n.mediaControl.options.actualLiveServerTime?n.actualLiveServerTimeDiff=(new Date).getTime()-new Date(n.mediaControl.options.actualLiveServerTime).getTime():n.actualLiveServerTimeDiff=0),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"seek_time"}},{key:"template",get:function(){return(0,y.default)(T.default)}},{key:"attributes",get:function(){return{class:"seek-time","data-seek-time":""}}},{key:"mediaControl",get:function(){return this.core.mediaControl}},{key:"mediaControlContainer",get:function(){return this.mediaControl.container}},{key:"isLiveStreamWithDvr",get:function(){return this.mediaControlContainer&&this.mediaControlContainer.getPlaybackType()===_.default.LIVE&&this.mediaControlContainer.isDvrEnabled()}},{key:"durationShown",get:function(){return this.isLiveStreamWithDvr&&!this.actualLiveTime}},{key:"useActualLiveTime",get:function(){return this.actualLiveTime&&this.isLiveStreamWithDvr}}]),e.prototype.bindEvents=function(){this.listenTo(this.mediaControl,m.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,m.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,m.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,m.default.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,m.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,m.default.CONTAINER_TIMEUPDATE,this.updateDuration))},e.prototype.onContainerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.updateDuration=function(t){this.duration=t.total,this.firstFragDateTime=t.firstFragDateTime,this.update()},e.prototype.showTime=function(t){this.hoveringOverSeekBar=!0,this.calculateHoverPosition(t),this.update()},e.prototype.hideTime=function(){this.hoveringOverSeekBar=!1,this.update()},e.prototype.calculateHoverPosition=function(t){var e=t.pageX-this.mediaControl.$seekBarContainer.offset().left;this.hoverPosition=Math.min(1,Math.max(e/this.mediaControl.$seekBarContainer.width(),0))},e.prototype.getSeekTime=function(){var t=void 0,e=void 0,i=void 0,n=void 0;return this.useActualLiveTime?(this.actualLiveServerTimeDiff?(i=new Date((new Date).getTime()-this.actualLiveServerTimeDiff),n=new Date(i),e=(n-i.setHours(0,0,0,0))/1e3):this.firstFragDateTime&&(n=new Date(this.firstFragDateTime),i=new Date(this.firstFragDateTime),i.setHours(0,0,0,0),e=(n.getTime()-i.getTime())/1e3+this.duration),(t=e-this.duration+this.hoverPosition*this.duration)<0&&(t+=86400)):t=this.hoverPosition*this.duration,{seekTime:t,secondsSinceMidnight:e}},e.prototype.update=function(){if(this.rendered)if(this.shouldBeVisible()){var t=this.getSeekTime(),e=(0,h.formatTime)(t.seekTime,this.useActualLiveTime);if(e!==this.displayedSeekTime&&(this.$seekTimeEl.text(e),this.displayedSeekTime=e),this.durationShown){this.$durationEl.show();var i=(0,h.formatTime)(this.actualLiveTime?t.secondsSinceMidnight:this.duration,this.actualLiveTime);i!==this.displayedDuration&&(this.$durationEl.text(i),this.displayedDuration=i)}else this.$durationEl.hide();this.$el.show();var n=this.mediaControl.$seekBarContainer.width(),r=this.$el.width(),a=this.hoverPosition*n;a-=r/2,a=Math.max(0,Math.min(a,n-r)),this.$el.css("left",a)}else this.$el.hide(),this.$el.css("left","-100%")},e.prototype.shouldBeVisible=function(){return this.mediaControlContainer&&this.mediaControlContainer.settings.seekEnabled&&this.hoveringOverSeekBar&&null!==this.hoverPosition&&null!==this.duration},e.prototype.render=function(){this.rendered=!0,this.displayedDuration=null,this.displayedSeekTime=null,this.$el.html(this.template()),this.$el.hide(),this.mediaControl.$el.append(this.el),this.$seekTimeEl=this.$el.find("[data-seek-time]"),this.$durationEl=this.$el.find("[data-duration]"),this.$durationEl.hide(),this.update()},e}(p.default);e.default=A,t.exports=e.default},function(t,e){t.exports="<span data-seek-time></span>\n<span data-duration></span>\n"},function(t,e,i){var n=i(227);"string"==typeof n&&(n=[[t.i,n,""]]);var r={singleton:!0,hmr:!0};r.transform=void 0,r.insertInto=void 0;i(10)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,i){e=t.exports=i(7)(!1),e.push([t.i,'.seek-time[data-seek-time]{position:absolute;white-space:nowrap;height:20px;line-height:20px;font-size:0;left:-100%;bottom:55px;background-color:rgba(2,2,2,.5);z-index:9999;transition:opacity .1s ease}.seek-time[data-seek-time].hidden[data-seek-time]{opacity:0}.seek-time[data-seek-time] [data-seek-time]{display:inline-block;color:#fff;font-size:10px;padding-left:7px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]{display:inline-block;color:hsla(0,0%,100%,.5);font-size:10px;padding-right:7px;vertical-align:top}.seek-time[data-seek-time] [data-duration]:before{content:"|";margin-right:7px}',""])},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(3),s=n(o),l=i(1),u=n(l),d=i(2),c=n(d),h=i(30),f=n(h),p=i(4),g=n(p),y=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,t.apply(this,arguments))}return(0,c.default)(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core,g.default.CORE_CONTAINERS_CREATED,this.onContainersCreated)},e.prototype.onContainersCreated=function(){var t=this.core.containers.filter(function(t){return"no_op"!==t.playback.name})[0]||this.core.containers[0];t&&this.core.containers.forEach(function(e){e!==t&&e.destroy()})},(0,s.default)(e,[{key:"name",get:function(){return"sources"}}]),e}(f.default);e.default=y,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(3),s=n(o),l=i(1),u=n(l),d=i(2),c=n(d),h=i(4),f=n(h),p=i(30),g=n(p),y=i(5),v=function(t){function e(){return(0,a.default)(this,e),(0,u.default)(this,t.apply(this,arguments))}return(0,c.default)(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,f.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged);var t=this.core.getCurrentContainer();t&&(this.listenTo(t,f.default.CONTAINER_ENDED,this.ended),this.listenTo(t,f.default.CONTAINER_STOP,this.ended))},e.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},e.prototype.ended=function(){(void 0===this.core.options.exitFullscreenOnEnd||this.core.options.exitFullscreenOnEnd)&&y.Fullscreen.isFullscreen()&&this.core.toggleFullscreen()},(0,s.default)(e,[{key:"name",get:function(){return"end_video"}}]),e}(g.default);e.default=v,t.exports=e.default},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=i(0),a=n(r),o=i(1),s=n(o),l=i(3),u=n(l),d=i(2),c=n(d),h=i(5),f=i(6),p=n(f),g=i(30),y=n(g),v=function(t){function e(i){(0,a.default)(this,e);var n=(0,s.default)(this,t.call(this,i));return n._initializeMessages(),n}return(0,c.default)(e,t),(0,u.default)(e,[{key:"name",get:function(){return"strings"}}]),e.prototype.t=function(t){var e=this._language();return(e&&this._messages[e]||this._messages.en)[t]||t},e.prototype._language=function(){return this.core.options.language||(0,h.getBrowserLanguage)()},e.prototype._initializeMessages=function(){var t={en:{live:"live",back_to_live:"back to live",disabled:"Disabled",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser."},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",disabled:"Desativado",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente."},es:{live:"vivo",back_to_live:"volver en vivo",disabled:"Discapacitado",playback_not_supported:"Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",disabled:"Отключено",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."},fr:{live:"en direct",disabled:"Désactivé",back_to_live:"retour au direct",playback_not_supported:"Votre navigateur ne supporte pas la lecture de cette vidéo. Merci de tenter sur un autre navigateur."},tr:{live:"canlı",back_to_live:"canlı yayına dön",disabled:"Engelli",playback_not_supported:"Tarayıcınız bu videoyu oynatma desteğine sahip değil. Lütfen farklı bir tarayıcı ile deneyin."},et:{live:"Otseülekanne",back_to_live:"Tagasi otseülekande juurde",disabled:"Keelatud",playback_not_supported:"Teie brauser ei toeta selle video taasesitust. Proovige kasutada muud brauserit."}};this._messages=p.default.extend(!0,t,this.core.options.strings||{}),this._messages["pt-BR"]=this._messages.pt,this._messages["en-US"]=this._messages.en,this._messages["es-419"]=this._messages.es,this._messages["fr-FR"]=this._messages.fr,this._messages["tr-TR"]=this._messages.tr,this._messages["et-EE"]=this._messages.et},e}(y.default);e.default=v,t.exports=e.default}])});
//# sourceMappingURL=clappr.min.js.map
!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.ClapprStats=e(require("Clappr")):t.ClapprStats=e(t.Clappr)}(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.i=function(t){return t},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="",e(e.s=3)}([function(t,e,n){"use strict";(function(e){function n(t,e){return null==t?void 0:t[e]}function r(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function i(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function o(){this.__data__=vt?vt(null):{}}function s(t){return this.has(t)&&delete this.__data__[t]}function a(t){var e=this.__data__;if(vt){var n=e[t];return n===Y?void 0:n}return lt.call(e,t)?e[t]:void 0}function u(t){var e=this.__data__;return vt?void 0!==e[t]:lt.call(e,t)}function c(t,e){return this.__data__[t]=vt&&void 0===e?Y:e,this}function h(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function l(){this.__data__=[]}function f(t){var e=this.__data__,n=g(e,t);return!(n<0)&&(n==e.length-1?e.pop():dt.call(e,n,1),!0)}function p(t){var e=this.__data__,n=g(e,t);return n<0?void 0:e[n][1]}function _(t){return g(this.__data__,t)>-1}function d(t,e){var n=this.__data__,r=g(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function y(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function v(){this.__data__={hash:new i,map:new(yt||h),string:new i}}function m(t){return N(this,t).delete(t)}function b(t){return N(this,t).get(t)}function T(t){return N(this,t).has(t)}function E(t,e){return N(this,t).set(t,e),this}function g(t,e){for(var n=t.length;n--;)if(F(t[n][0],e))return n;return-1}function w(t,e){e=x(e,t)?[e]:k(e);for(var n=0,r=e.length;null!=t&&n<r;)t=t[S(e[n++])];return n&&n==r?t:void 0}function P(t){return!(!I(t)||A(t))&&(j(t)||r(t)?pt:et).test(M(t))}function O(t){if("string"==typeof t)return t;if(H(t))return bt?bt.call(t):"";var e=t+"";return"0"==e&&1/t==-V?"-0":e}function k(t){return Et(t)?t:Tt(t)}function N(t,e){var n=t.__data__;return C(e)?n["string"==typeof e?"string":"hash"]:n.map}function R(t,e){var r=n(t,e);return P(r)?r:void 0}function x(t,e){if(Et(t))return!1;var n=void 0===t?"undefined":G(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!H(t))||(J.test(t)||!q.test(t)||null!=e&&t in Object(e))}function C(t){var e=void 0===t?"undefined":G(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function A(t){return!!ct&&ct in t}function S(t){if("string"==typeof t||H(t))return t;var e=t+"";return"0"==e&&1/t==-V?"-0":e}function M(t){if(null!=t){try{return ht.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function B(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError($);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(B.Cache||y),n}function F(t,e){return t===e||t!==t&&e!==e}function j(t){var e=I(t)?ft.call(t):"";return e==W||e==z}function I(t){var e=void 0===t?"undefined":G(t);return!!t&&("object"==e||"function"==e)}function L(t){return!!t&&"object"==(void 0===t?"undefined":G(t))}function H(t){return"symbol"==(void 0===t?"undefined":G(t))||L(t)&&ft.call(t)==K}function U(t){return null==t?"":O(t)}function D(t,e,n){var r=null==t?void 0:w(t,e);return void 0===r?n:r}var G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$="Expected a function",Y="__lodash_hash_undefined__",V=1/0,W="[object Function]",z="[object GeneratorFunction]",K="[object Symbol]",q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,X=/^\./,Q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,tt=/\\(\\)?/g,et=/^\[object .+?Constructor\]$/,nt="object"==(void 0===e?"undefined":G(e))&&e&&e.Object===Object&&e,rt="object"==("undefined"==typeof self?"undefined":G(self))&&self&&self.Object===Object&&self,it=nt||rt||Function("return this")(),ot=Array.prototype,st=Function.prototype,at=Object.prototype,ut=it["__core-js_shared__"],ct=function(){var t=/[^.]+$/.exec(ut&&ut.keys&&ut.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ht=st.toString,lt=at.hasOwnProperty,ft=at.toString,pt=RegExp("^"+ht.call(lt).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_t=it.Symbol,dt=ot.splice,yt=R(it,"Map"),vt=R(Object,"create"),mt=_t?_t.prototype:void 0,bt=mt?mt.toString:void 0;i.prototype.clear=o,i.prototype.delete=s,i.prototype.get=a,i.prototype.has=u,i.prototype.set=c,h.prototype.clear=l,h.prototype.delete=f,h.prototype.get=p,h.prototype.has=_,h.prototype.set=d,y.prototype.clear=v,y.prototype.delete=m,y.prototype.get=b,y.prototype.has=T,y.prototype.set=E;var Tt=B(function(t){t=U(t);var e=[];return X.test(t)&&e.push(""),t.replace(Q,function(t,n,r,i){e.push(r?i.replace(tt,"$1"):n||t)}),e});B.Cache=y;var Et=Array.isArray;t.exports=D}).call(e,n(2))},function(e,n){e.exports=t},function(t,e,n){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":i(window))&&(r=window)}t.exports=r},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 o(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 s=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;if(void 0!==s)return s.call(r)},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(1),c=n(0),h=function(t){return t&&t.__esModule?t:{default:t}}(c),l=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._runEach=(0,h.default)(t,"options.clapprStats.runEach",5e3),n._onReport=(0,h.default)(t,"options.clapprStats.onReport",n._defaultReport),n._uriToMeasureLatency=(0,h.default)(t,"options.clapprStats.uriToMeasureLatency"),n._urisToMeasureBandwidth=(0,h.default)(t,"options.clapprStats.urisToMeasureBandwidth"),n._runBandwidthTestEvery=(0,h.default)(t,"options.clapprStats.runBandwidthTestEvery",10),n._bwMeasureCount=0,n._completion={watch:(0,h.default)(t,"options.clapprStats.onCompletion",[]),calls:[]},n._newMetrics(),n.on(e.REPORT_EVENT,n._onReport),n}return o(e,t),a(e,[{key:"_now",value:function(){return window.performance&&"function"==typeof window.performance.now?window.performance.now():new Date}},{key:"_inc",value:function(t){this._metrics.counters[t]+=1}},{key:"_timerHasStarted",value:function(t){return void 0!==this["_start"+t]}},{key:"_start",value:function(t){this["_start"+t]=this._now()}},{key:"_stop",value:function(t){this._metrics.timers[t]+=this._now()-this["_start"+t]}},{key:"_defaultReport",value:function(t){console.log(t)}},{key:"name",get:function(){return"clappr_stats"}},{key:"_playbackName",get:function(){return this.container.playback.name}},{key:"_playbackType",get:function(){return this.container.getPlaybackType()}}]),a(e,[{key:"bindEvents",value:function(){var t=this;this.listenTo(this.container,u.Events.CONTAINER_BITRATE,this.onBitrate),this.listenTo(this.container,u.Events.CONTAINER_STOP,this.stopReporting),this.listenTo(this.container,u.Events.CONTAINER_ENDED,this.stopReporting),this.listenToOnce(this.container.playback,u.Events.PLAYBACK_PLAY_INTENT,this.startTimers),this.listenToOnce(this.container,u.Events.CONTAINER_PLAY,this.onFirstPlaying),this.listenTo(this.container,u.Events.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,u.Events.CONTAINER_PAUSE,this.onPause),this.listenToOnce(this.container,u.Events.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,u.Events.CONTAINER_SEEK,this.onSeek),this.listenTo(this.container,u.Events.CONTAINER_ERROR,function(){return t._inc("error")}),this.listenTo(this.container,u.Events.CONTAINER_FULLSCREEN,function(){return t._inc("fullscreen")}),this.listenTo(this.container,u.Events.CONTAINER_PLAYBACKDVRSTATECHANGED,function(e){e&&t._inc("dvrUsage")}),this.listenTo(this.container.playback,u.Events.PLAYBACK_PROGRESS,this.onProgress),this.listenTo(this.container.playback,u.Events.PLAYBACK_TIMEUPDATE,this.onTimeUpdate)}},{key:"destroy",value:function(){this.stopReporting(),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"onBitrate",value:function(t){var e=parseInt((0,h.default)(t,"bitrate",0),10),n=this._now();if(this._metrics.extra.bitratesHistory.length>0){var r=this._metrics.extra.bitratesHistory[this._metrics.extra.bitratesHistory.length-1];r.end=n,r.time=n-r.start}this._metrics.extra.bitratesHistory.push({start:this._now(),bitrate:e}),this._inc("changeLevel")}},{key:"stopReporting",value:function(){this._buildReport(),clearInterval(this._intervalId),this._newMetrics(),this.stopListening(),this.bindEvents()}},{key:"startTimers",value:function(){this._intervalId=setInterval(this._buildReport.bind(this),this._runEach),this._start("session"),this._start("startup")}},{key:"onFirstPlaying",value:function(){this.listenTo(this.container,u.Events.CONTAINER_TIMEUPDATE,this.onContainerUpdateWhilePlaying),this._start("watch"),this._stop("startup")}},{key:"playAfterPause",value:function(){this.listenTo(this.container,u.Events.CONTAINER_TIMEUPDATE,this.onContainerUpdateWhilePlaying),this._stop("pause"),this._start("watch")}},{key:"onPlay",value:function(){this._inc("play")}},{key:"onPause",value:function(){this._stop("watch"),this._start("pause"),this._inc("pause"),this.listenToOnce(this.container,u.Events.CONTAINER_PLAY,this.playAfterPause),this.stopListening(this.container,u.Events.CONTAINER_TIMEUPDATE,this.onContainerUpdateWhilePlaying)}},{key:"onSeek",value:function(t){this._inc("seek"),this._metrics.extra.watchHistory.push([1e3*t,1e3*t])}},{key:"onTimeUpdate",value:function(t){var e=1e3*t.current,n=1e3*t.total,r=this._metrics.extra.watchHistory.length;if(this._metrics.extra.duration=n,this._metrics.extra.currentTime=e,this._metrics.extra.watchedPercentage=e/n*100,0===r?this._metrics.extra.watchHistory.push([e,e]):this._metrics.extra.watchHistory[r-1][1]=e,this._metrics.extra.bitratesHistory.length>0){var i=this._metrics.extra.bitratesHistory[this._metrics.extra.bitratesHistory.length-1];i.end||(i.time=this._now()-i.start)}this._onCompletion()}},{key:"onContainerUpdateWhilePlaying",value:function(){this.container.playback.isPlaying()&&(this._stop("watch"),this._start("watch"))}},{key:"onBuffering",value:function(){this._inc("buffering"),this._start("buffering"),this.listenToOnce(this.container,u.Events.CONTAINER_STATE_BUFFERFULL,this.onBufferfull)}},{key:"onBufferfull",value:function(){this._stop("buffering"),this.listenToOnce(this.container,u.Events.CONTAINER_STATE_BUFFERING,this.onBuffering)}},{key:"onProgress",value:function(t){this._metrics.extra.buffersize=1e3*t.current}},{key:"_newMetrics",value:function(){this._metrics={counters:{play:0,pause:0,error:0,buffering:0,decodedFrames:0,droppedFrames:0,fps:0,changeLevel:0,seek:0,fullscreen:0,dvrUsage:0},timers:{startup:0,watch:0,pause:0,buffering:0,session:0,latency:0},extra:{playbackName:"",playbackType:"",bitratesHistory:[],bitrateWeightedMean:0,bitrateMostUsed:0,buffersize:0,watchHistory:[],watchedPercentage:0,bufferingPercentage:0,bandwidth:0,duration:0,currentTime:0}}}},{key:"_onCompletion",value:function(){var t=this._metrics.extra.watchedPercentage,n=this._completion.watch,r=-1!=this._completion.calls.indexOf(t);-1==n.indexOf(t)||r||(u.Log.info(this.name+" PERCENTAGE_EVENT: "+t),this._completion.calls.push(t),this.trigger(e.PERCENTAGE_EVENT,t))}},{key:"_buildReport",value:function(){this._stop("session"),this._start("session"),this._metrics.extra.playbackName=this._playbackName,this._metrics.extra.playbackType=this._playbackType,this._calculateBitrates(),this._calculatePercentages(),this._fetchFPS(),this._measureLatency(),this._measureBandwidth(),this.trigger(e.REPORT_EVENT,JSON.parse(JSON.stringify(this._metrics)))}},{key:"_fetchFPS",value:function(){var t={html5_video:this._html5FetchFPS,hls:this._html5FetchFPS,dash_shaka_playback:this._html5FetchFPS};t[this._playbackName]&&t[this._playbackName].call(this)}},{key:"_calculateBitrates",value:function(){var t=this._metrics.extra.bitratesHistory.map(function(t){return t.time}).reduce(function(t,e){return t+e},0);this._metrics.extra.bitrateWeightedMean=this._metrics.extra.bitratesHistory.map(function(t){return t.bitrate*t.time}).reduce(function(t,e){return t+e},0)/t,this._metrics.extra.bitratesHistory.length>0&&(this._metrics.extra.bitrateMostUsed=this._metrics.extra.bitratesHistory.slice().sort(function(t,e){return t.time<e.time})[0].bitrate)}},{key:"_calculatePercentages",value:function(){this._metrics.extra.duration>0&&(this._metrics.extra.bufferingPercentage=this._metrics.timers.buffering/this._metrics.extra.duration*100)}},{key:"_html5FetchFPS",value:function(){var t=this.container.playback.el,e=t.webkitDecodedFrameCount||t.mozDecodedFrames||0,n=t.webkitDroppedFrameCount||t.mozParsedFrames-t.mozDecodedFrames||0,r=e-(this._lastDecodedFramesCount||0);this._metrics.counters.decodedFrames=e,this._metrics.counters.droppedFrames=n,this._metrics.counters.fps=r/(this._runEach/1e3),this._lastDecodedFramesCount=e}},{key:"_measureLatency",value:function(){var t=this;if(this._uriToMeasureLatency){var e,n=[],r=function(){e=n[2]-n[1],t._metrics.timers.latency=e};!function e(){if(n.push(t._now()),n.length>2)r();else{var i=new Image;i.onload=e,i.src=t._uriToMeasureLatency+"?"+Math.random()+"="+t._now()}}()}}},{key:"_measureBandwidth",value:function(){var t=this;if(this._urisToMeasureBandwidth&&this._bwMeasureCount%this._runBandwidthTestEvery==0){var e=0,n=function(n){var r=(t._urisToMeasureBandwidth[e-1].end-t._urisToMeasureBandwidth[e-1].start)/1e3,i=8*n.loaded/r;t._metrics.extra.bandwidth=i,t._urisToMeasureBandwidth.forEach(function(t){t.start=0,t.end=0,t.expired=!1,clearTimeout(t.timer)})};!function r(i){if(e>0&&(t._urisToMeasureBandwidth[e-1].end=t._now(),clearTimeout(t._urisToMeasureBandwidth[e-1].timer)),e>=t._urisToMeasureBandwidth.length||e>0&&t._urisToMeasureBandwidth[e-1].expired)n(i);else{var o=new XMLHttpRequest;o.open("GET",t._urisToMeasureBandwidth[e].url,!0),o.responseType="arraybuffer",o.onload=o.onabort=r,t._urisToMeasureBandwidth[e].start=t._now(),t._urisToMeasureBandwidth[e].timer=setTimeout(function(e){t._urisToMeasureBandwidth[e].expired=!0,o.abort()},t._urisToMeasureBandwidth[e].timeout,e),o.send()}e++}()}this._bwMeasureCount++}}]),e}(u.ContainerPlugin);e.default=l,l.REPORT_EVENT="clappr:stats:report",l.PERCENTAGE_EVENT="clappr:stats:percentage",t.exports=e.default}])});
!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.LevelSelector=e(require("clappr")):t.LevelSelector=e(t.Clappr)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.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="<%=baseUrl%>/",e(e.s=39)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(10),o=n(29),i=n(14),u=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(11)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(1),o=n(12);t.exports=n(2)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(54),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(22)("wks"),o=n(13),i=n(0).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(0),o=n(4),i=n(28),u=n(5),l=n(3),s=function(t,e,n){var c,a,f,p=t&s.F,v=t&s.G,d=t&s.S,h=t&s.P,y=t&s.B,b=t&s.W,g=v?o:o[e]||(o[e]={}),m=g.prototype,_=v?r:d?r[e]:(r[e]||{}).prototype;v&&(n=e);for(c in n)(a=!p&&_&&void 0!==_[c])&&l(g,c)||(f=a?_[c]:n[c],g[c]=v&&"function"!=typeof _[c]?n[c]:y&&a?i(f,r):b&&_[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):h&&"function"==typeof f?i(Function.call,f):f,h&&((g.virtual||(g.virtual={}))[c]=f,t&s.R&&m&&!m[c]&&u(m,c,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){t.exports=!0},function(t,e){t.exports={}},function(t,e,n){var r=n(10),o=n(53),i=n(23),u=n(21)("IE_PROTO"),l=function(){},s=function(){var t,e=n(30)("iframe"),r=i.length;for(e.style.display="none",n(58).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s.prototype[i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=r(t),n=new l,l.prototype=null,n[u]=t):n=s(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(34),o=n(23);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(22)("keys"),o=n(13);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(1).f,o=n(3),i=n(8)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){e.f=n(8)},function(t,e,n){var r=n(0),o=n(4),i=n(17),u=n(25),l=n(1).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||l(e,t,{value:u.f(t)})}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(46);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){t.exports=!n(2)&&!n(11)(function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(6),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(48),i=r(o),u=n(65),l=r(u),s="function"==typeof l.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof l.default&&t.constructor===l.default&&t!==l.default.prototype?"symbol":typeof t};e.default="function"==typeof l.default&&"symbol"===s(i.default)?function(t){return void 0===t?"undefined":s(t)}:function(t){return t&&"function"==typeof l.default&&t.constructor===l.default&&t!==l.default.prototype?"symbol":void 0===t?"undefined":s(t)}},function(t,e,n){"use strict";var r=n(17),o=n(9),i=n(33),u=n(5),l=n(18),s=n(52),c=n(24),a=n(59),f=n(8)("iterator"),p=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,e,n,d,h,y,b){s(n,e,d);var g,m,_,L=function(t){if(!p&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",x="values"==h,S=!1,O=t.prototype,C=O[f]||O["@@iterator"]||h&&O[h],w=C||L(h),T=h?x?L("entries"):w:void 0,j="Array"==e?O.entries||C:C;if(j&&(_=a(j.call(new t)))!==Object.prototype&&_.next&&(c(_,E,!0),r||"function"==typeof _[f]||u(_,f,v)),x&&C&&"values"!==C.name&&(S=!0,w=function(){return C.call(this)}),r&&!b||!p&&!S&&O[f]||u(O,f,w),l[e]=w,l[E]=v,h)if(g={values:x?w:L("values"),keys:y?w:L("keys"),entries:T},b)for(m in g)m in O||i(O,m,g[m]);else o(o.P+o.F*(p||S),e,g);return g}},function(t,e,n){t.exports=n(5)},function(t,e,n){var r=n(3),o=n(7),i=n(55)(!1),u=n(21)("IE_PROTO");t.exports=function(t,e){var n,l=o(t),s=0,c=[];for(n in l)n!=u&&r(l,n)&&c.push(n);for(;e.length>s;)r(l,n=e[s++])&&(~i(c,n)||c.push(n));return c}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(34),o=n(23).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(27),o=n(12),i=n(7),u=n(14),l=n(3),s=n(29),c=Object.getOwnPropertyDescriptor;e.f=n(2)?c:function(t,e){if(t=i(t),e=u(e,!0),s)try{return c(t,e)}catch(t){}if(l(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(40),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=o.default,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(41),i=r(o),u=n(42),l=r(u),s=n(47),c=r(s),a=n(75),f=r(a),p=n(83),v=n(84),d=r(v),h=n(85),y=r(h),b=function(t){function e(){return(0,i.default)(this,e),(0,c.default)(this,t.apply(this,arguments))}return(0,f.default)(e,t),e.prototype.bindEvents=function(){this.listenTo(this.core,p.Events.CORE_READY,this.bindPlaybackEvents),this.listenTo(this.core.mediaControl,p.Events.MEDIACONTROL_CONTAINERCHANGED,this.reload),this.listenTo(this.core.mediaControl,p.Events.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,p.Events.MEDIACONTROL_HIDE,this.hideSelectLevelMenu)},e.prototype.unBindEvents=function(){this.stopListening(this.core,p.Events.CORE_READY),this.stopListening(this.core.mediaControl,p.Events.MEDIACONTROL_CONTAINERCHANGED),this.stopListening(this.core.mediaControl,p.Events.MEDIACONTROL_RENDERED),this.stopListening(this.core.mediaControl,p.Events.MEDIACONTROL_HIDE),this.stopListening(this.core.getCurrentPlayback(),p.Events.PLAYBACK_LEVELS_AVAILABLE),this.stopListening(this.core.getCurrentPlayback(),p.Events.PLAYBACK_LEVEL_SWITCH_START),this.stopListening(this.core.getCurrentPlayback(),p.Events.PLAYBACK_LEVEL_SWITCH_END),this.stopListening(this.core.getCurrentPlayback(),p.Events.PLAYBACK_BITRATE)},e.prototype.bindPlaybackEvents=function(){var t=this.core.getCurrentPlayback();this.listenTo(t,p.Events.PLAYBACK_LEVELS_AVAILABLE,this.fillLevels),this.listenTo(t,p.Events.PLAYBACK_LEVEL_SWITCH_START,this.startLevelSwitch),this.listenTo(t,p.Events.PLAYBACK_LEVEL_SWITCH_END,this.stopLevelSwitch),this.listenTo(t,p.Events.PLAYBACK_BITRATE,this.updateCurrentLevel),t.levels&&t.levels.length>0&&this.fillLevels(t.levels)},e.prototype.reload=function(){this.unBindEvents(),this.bindEvents(),this.bindPlaybackEvents()},e.prototype.shouldRender=function(){if(!this.core.getCurrentContainer())return!1;var t=this.core.getCurrentPlayback();if(!t)return!1;var e=void 0!==t.currentLevel,n=!!(this.levels&&this.levels.length>1);return e&&n},e.prototype.render=function(){if(this.shouldRender()){var t=p.Styler.getStyleFor(y.default,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({levels:this.levels,title:this.getTitle()})),this.$el.append(t),this.core.mediaControl.$(".media-control-right-panel").append(this.el),this.highlightCurrentLevel()}return this},e.prototype.fillLevels=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;void 0===this.selectedLevelId&&(this.selectedLevelId=e),this.levels=t,this.configureLevelsLabels(),this.render()},e.prototype.configureLevelsLabels=function(){if(void 0!==this.core.options.levelSelectorConfig){var t=this.core.options.levelSelectorConfig.labelCallback;if(t&&"function"!=typeof t)throw new TypeError("labelCallback must be a function");var e=this.core.options.levelSelectorConfig.labels,n=e?this.core.options.levelSelectorConfig.labels:{};if(t||e){var r=void 0,o=void 0;for(var i in this.levels)r=this.levels[i],o=n[r.id],t?r.label=t(r,o):o&&(r.label=o)}}},e.prototype.findLevelBy=function(t){var e=void 0;return this.levels.forEach(function(n){n.id===t&&(e=n)}),e},e.prototype.onLevelSelect=function(t){return this.selectedLevelId=parseInt(t.target.dataset.levelSelectorSelect,10),this.core.getCurrentPlayback().currentLevel!=this.selectedLevelId&&(this.core.getCurrentPlayback().currentLevel=this.selectedLevelId,this.toggleContextMenu(),t.stopPropagation(),!1)},e.prototype.onShowLevelSelectMenu=function(){this.toggleContextMenu()},e.prototype.hideSelectLevelMenu=function(){this.$(".level_selector ul").hide()},e.prototype.toggleContextMenu=function(){this.$(".level_selector ul").toggle()},e.prototype.buttonElement=function(){return this.$(".level_selector button")},e.prototype.levelElement=function(t){return this.$(".level_selector ul a"+(isNaN(t)?"":'[data-level-selector-select="'+t+'"]')).parent()},e.prototype.getTitle=function(){return(this.core.options.levelSelectorConfig||{}).title},e.prototype.startLevelSwitch=function(){this.buttonElement().addClass("changing")},e.prototype.stopLevelSwitch=function(){this.buttonElement().removeClass("changing")},e.prototype.updateText=function(t){-1===t?this.buttonElement().text(this.currentLevel?"AUTO ("+this.currentLevel.label+")":"AUTO"):this.buttonElement().text(this.findLevelBy(t).label)},e.prototype.updateCurrentLevel=function(t){var e=this.findLevelBy(t.level);this.currentLevel=e||null,this.highlightCurrentLevel()},e.prototype.highlightCurrentLevel=function(){this.levelElement().removeClass("current"),this.currentLevel&&this.levelElement(this.currentLevel.id).addClass("current"),this.updateText(this.selectedLevelId)},(0,l.default)(e,[{key:"name",get:function(){return"level_selector"}},{key:"template",get:function(){return(0,p.template)(d.default)}},{key:"attributes",get:function(){return{class:this.name,"data-level-selector":""}}},{key:"events",get:function(){return{"click [data-level-selector-select]":"onLevelSelect","click [data-level-selector-button]":"onShowLevelSelectMenu"}}}],[{key:"version",get:function(){return VERSION}}]),e}(p.UICorePlugin);e.default=b,t.exports=e.default},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){t.exports={default:n(44),__esModule:!0}},function(t,e,n){n(45);var r=n(4).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(9);r(r.S+r.F*!n(2),"Object",{defineProperty:n(1).f})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(31),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,o.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){t.exports={default:n(49),__esModule:!0}},function(t,e,n){n(50),n(61),t.exports=n(25).f("iterator")},function(t,e,n){"use strict";var r=n(51)(!0);n(32)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(15),o=n(16);t.exports=function(t){return function(e,n){var i,u,l=String(o(e)),s=r(n),c=l.length;return s<0||s>=c?t?"":void 0:(i=l.charCodeAt(s),i<55296||i>56319||s+1===c||(u=l.charCodeAt(s+1))<56320||u>57343?t?l.charAt(s):i:t?l.slice(s,s+2):u-56320+(i-55296<<10)+65536)}}},function(t,e,n){"use strict";var r=n(19),o=n(12),i=n(24),u={};n(5)(u,n(8)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(u,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(1),o=n(10),i=n(20);t.exports=n(2)?Object.defineProperties:function(t,e){o(t);for(var n,u=i(e),l=u.length,s=0;l>s;)r.f(t,n=u[s++],e[n]);return t}},function(t,e,n){var r=n(35);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(7),o=n(56),i=n(57);t.exports=function(t){return function(e,n,u){var l,s=r(e),c=o(s.length),a=i(u,c);if(t&&n!=n){for(;c>a;)if((l=s[a++])!=l)return!0}else for(;c>a;a++)if((t||a in s)&&s[a]===n)return t||a||0;return!t&&-1}}},function(t,e,n){var r=n(15),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(15),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(3),o=n(60),i=n(21)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(62);for(var r=n(0),o=n(5),i=n(18),u=n(8)("toStringTag"),l="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<l.length;s++){var c=l[s],a=r[c],f=a&&a.prototype;f&&!f[u]&&o(f,u,c),i[c]=i.Array}},function(t,e,n){"use strict";var r=n(63),o=n(64),i=n(18),u=n(7);t.exports=n(32)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){t.exports={default:n(66),__esModule:!0}},function(t,e,n){n(67),n(72),n(73),n(74),t.exports=n(4).Symbol},function(t,e,n){"use strict";var r=n(0),o=n(3),i=n(2),u=n(9),l=n(33),s=n(68).KEY,c=n(11),a=n(22),f=n(24),p=n(13),v=n(8),d=n(25),h=n(26),y=n(69),b=n(70),g=n(10),m=n(6),_=n(7),L=n(14),E=n(12),x=n(19),S=n(71),O=n(38),C=n(1),w=n(20),T=O.f,j=C.f,A=S.f,P=r.Symbol,M=r.JSON,k=M&&M.stringify,R=v("_hidden"),N=v("toPrimitive"),I={}.propertyIsEnumerable,D=a("symbol-registry"),B=a("symbols"),U=a("op-symbols"),F=Object.prototype,V="function"==typeof P,G=r.QObject,H=!G||!G.prototype||!G.prototype.findChild,Y=i&&c(function(){return 7!=x(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=T(F,e);r&&delete F[e],j(t,e,n),r&&t!==F&&j(F,e,r)}:j,K=function(t){var e=B[t]=x(P.prototype);return e._k=t,e},W=V&&"symbol"==typeof P.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof P},$=function(t,e,n){return t===F&&$(U,e,n),g(t),e=L(e,!0),g(n),o(B,e)?(n.enumerable?(o(t,R)&&t[R][e]&&(t[R][e]=!1),n=x(n,{enumerable:E(0,!1)})):(o(t,R)||j(t,R,E(1,{})),t[R][e]=!0),Y(t,e,n)):j(t,e,n)},J=function(t,e){g(t);for(var n,r=y(e=_(e)),o=0,i=r.length;i>o;)$(t,n=r[o++],e[n]);return t},z=function(t,e){return void 0===e?x(t):J(x(t),e)},q=function(t){var e=I.call(this,t=L(t,!0));return!(this===F&&o(B,t)&&!o(U,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,R)&&this[R][t])||e)},Q=function(t,e){if(t=_(t),e=L(e,!0),t!==F||!o(B,e)||o(U,e)){var n=T(t,e);return!n||!o(B,e)||o(t,R)&&t[R][e]||(n.enumerable=!0),n}},X=function(t){for(var e,n=A(_(t)),r=[],i=0;n.length>i;)o(B,e=n[i++])||e==R||e==s||r.push(e);return r},Z=function(t){for(var e,n=t===F,r=A(n?U:_(t)),i=[],u=0;r.length>u;)!o(B,e=r[u++])||n&&!o(F,e)||i.push(B[e]);return i};V||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===F&&e.call(U,n),o(this,R)&&o(this[R],t)&&(this[R][t]=!1),Y(this,t,E(1,n))};return i&&H&&Y(F,t,{configurable:!0,set:e}),K(t)},l(P.prototype,"toString",function(){return this._k}),O.f=Q,C.f=$,n(37).f=S.f=X,n(27).f=q,n(36).f=Z,i&&!n(17)&&l(F,"propertyIsEnumerable",q,!0),d.f=function(t){return K(v(t))}),u(u.G+u.W+u.F*!V,{Symbol:P});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)v(tt[et++]);for(var nt=w(v.store),rt=0;nt.length>rt;)h(nt[rt++]);u(u.S+u.F*!V,"Symbol",{for:function(t){return o(D,t+="")?D[t]:D[t]=P(t)},keyFor:function(t){if(!W(t))throw TypeError(t+" is not a symbol!");for(var e in D)if(D[e]===t)return e},useSetter:function(){H=!0},useSimple:function(){H=!1}}),u(u.S+u.F*!V,"Object",{create:z,defineProperty:$,defineProperties:J,getOwnPropertyDescriptor:Q,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),M&&u(u.S+u.F*(!V||c(function(){var t=P();return"[null]"!=k([t])||"{}"!=k({a:t})||"{}"!=k(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!W(t))return b(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,k.apply(M,r)}}),P.prototype[N]||n(5)(P.prototype,N,P.prototype.valueOf),f(P,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(13)("meta"),o=n(6),i=n(3),u=n(1).f,l=0,s=Object.isExtensible||function(){return!0},c=!n(11)(function(){return s(Object.preventExtensions({}))}),a=function(t){u(t,r,{value:{i:"O"+ ++l,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!s(t))return"F";if(!e)return"E";a(t)}return t[r].i},p=function(t,e){if(!i(t,r)){if(!s(t))return!0;if(!e)return!1;a(t)}return t[r].w},v=function(t){return c&&d.NEED&&s(t)&&!i(t,r)&&a(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:v}},function(t,e,n){var r=n(20),o=n(36),i=n(27);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var u,l=n(t),s=i.f,c=0;l.length>c;)s.call(t,u=l[c++])&&e.push(u);return e}},function(t,e,n){var r=n(35);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(7),o=n(37).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(t){try{return o(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?l(t):o(r(t))}},function(t,e){},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){n(26)("observable")},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(76),i=r(o),u=n(80),l=r(u),s=n(31),c=r(s);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,c.default)(e)));t.prototype=(0,l.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?(0,i.default)(t,e):t.__proto__=e)}},function(t,e,n){t.exports={default:n(77),__esModule:!0}},function(t,e,n){n(78),t.exports=n(4).Object.setPrototypeOf},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(79).set})},function(t,e,n){var r=n(6),o=n(10),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(28)(Function.call,n(38).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){t.exports={default:n(81),__esModule:!0}},function(t,e,n){n(82);var r=n(4).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(19)})},function(e,n){e.exports=t},function(t,e){t.exports='<button data-level-selector-button>\n  Auto\n</button>\n<ul>\n  <% if (title) { %>\n  <li data-title><%= title %></li>\n  <% }; %>\n  <li><a href="#" data-level-selector-select="-1">AUTO</a></li>\n  <% for (var i = 0; i < levels.length; i++) { %>\n    <li><a href="#" data-level-selector-select="<%= levels[i].id %>"><%= levels[i].label %></a></li>\n  <% }; %>\n</ul>\n'},function(t,e,n){var r=n(86);"string"==typeof r&&(r=[[t.i,r,""]]);n(88)(r,{singleton:!0});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(87)(!1),e.push([t.i,".level_selector[data-level-selector]{float:right;position:relative;height:100%}.level_selector[data-level-selector] button{background-color:transparent;color:#fff;font-family:Roboto,Open Sans,Arial,sans-serif;-webkit-font-smoothing:antialiased;border:none;font-size:10px;height:100%}.level_selector[data-level-selector] button:hover{color:#c9c9c9}.level_selector[data-level-selector] button.changing{-webkit-animation:pulse .5s infinite alternate}.level_selector[data-level-selector]>ul{list-style-type:none;position:absolute;bottom:100%;border:1px solid #000;display:none;background-color:#e6e6e6;white-space:nowrap}.level_selector[data-level-selector] li{font-size:10px}.level_selector[data-level-selector] li[data-title]{background-color:#c3c2c2;padding:5px}.level_selector[data-level-selector] li a{color:#444;padding:2px 10px;display:block;text-decoration:none}.level_selector[data-level-selector] li a:hover{background-color:#555;color:#fff}.level_selector[data-level-selector] li a:hover a{color:#fff;text-decoration:none}.level_selector[data-level-selector] li.current a{color:red}",""])},function(t,e){function n(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var u=t[o];"number"==typeof u[0]&&r[u[0]]||(n&&!u[2]?u[2]=n:n&&(u[2]="("+u[2]+") and ("+n+")"),e.push(u))}},e}},function(t,e){function n(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=a[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(u(r.parts[i],e))}else{for(var l=[],i=0;i<r.parts.length;i++)l.push(u(r.parts[i],e));a[r.id]={id:r.id,refs:1,parts:l}}}}function r(t){for(var e=[],n={},r=0;r<t.length;r++){var o=t[r],i=o[0],u=o[1],l=o[2],s=o[3],c={css:u,media:l,sourceMap:s};n[i]?n[i].parts.push(c):e.push(n[i]={id:i,parts:[c]})}return e}function o(){var t=document.createElement("style"),e=v();return t.type="text/css",e.appendChild(t),t}function i(){var t=document.createElement("link"),e=v();return t.rel="stylesheet",e.appendChild(t),t}function u(t,e){var n,r,u;if(e.singleton){var a=h++;n=d||(d=o()),r=l.bind(null,n,a,!1),u=l.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=i(),r=c.bind(null,n),u=function(){n.parentNode.removeChild(n),n.href&&URL.revokeObjectURL(n.href)}):(n=o(),r=s.bind(null,n),u=function(){n.parentNode.removeChild(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else u()}}function l(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=y(e,o);else{var i=document.createTextNode(o),u=t.childNodes;u[e]&&t.removeChild(u[e]),u.length?t.insertBefore(i,u[e]):t.appendChild(i)}}function s(t,e){var n=e.css,r=e.media;e.sourceMap;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function c(t,e){var n=e.css,r=(e.media,e.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var a={},f=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}},p=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=f(function(){return document.head||document.getElementsByTagName("head")[0]}),d=null,h=0;t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},void 0===e.singleton&&(e.singleton=p());var o=r(t);return n(o,e),function(t){for(var i=[],u=0;u<o.length;u++){var l=o[u],s=a[l.id];s.refs--,i.push(s)}if(t){n(r(t),e)}for(var u=0;u<i.length;u++){var s=i[u];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete a[s.id]}}}};var y=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("Clappr"),require("ClapprStats"),require("FlussonicMsePlayer"),require("LevelSelector")):"function"==typeof define&&define.amd?define(["Clappr","ClapprStats","FlussonicMsePlayer","LevelSelector"],e):"object"==typeof exports?exports.FlussonicPlayer=e(require("Clappr"),require("ClapprStats"),require("FlussonicMsePlayer"),require("LevelSelector")):t.FlussonicPlayer=e(t.Clappr,t.ClapprStats,t.FlussonicMsePlayer,t.LevelSelector)}("undefined"!=typeof self?self:this,function(t,e,n,r){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.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="",e(e.s=177)}([function(t,e,n){"use strict";var r=n(2),o=n(18),i=n(11),s=n(12),u=n(19),c=function t(e,n,c){var a,f,l,p,h=e&t.F,v=e&t.G,y=e&t.S,d=e&t.P,b=e&t.B,g=v?r:y?r[n]||(r[n]={}):(r[n]||{}).prototype,m=v?o:o[n]||(o[n]={}),w=m.prototype||(m.prototype={});v&&(c=n);for(a in c)f=!h&&g&&void 0!==g[a],l=(f?g:c)[a],p=b&&f?u(l,r):d&&"function"==typeof l?u(Function.call,l):l,g&&s(g,a,l,e&t.U),m[a]!=l&&i(m,a,p),d&&w[a]!=l&&(w[a]=l)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,n){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return"object"===(void 0===t?"undefined":r(t))?null!==t:"function"==typeof t}},function(t,e,n){"use strict";var r=n(58)("wks"),o=n(36),i=n(2).Symbol,s="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))}).store=r},function(t,e,n){"use strict";t.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(1),o=n(119),i=n(22),s=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var r=n(24),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){"use strict";var r=n(23);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";var r=n(7),o=n(35);t.exports=n(6)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";var r=n(2),o=n(11),i=n(14),s=n(36)("src"),u=Function.toString,c=(""+u).split("toString");n(18).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var a="function"==typeof n;a&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(a&&(i(n,s)||o(n,s,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||u.call(this)})},function(t,e,n){"use strict";var r=n(0),o=n(3),i=n(23),s=/"/g,u=function(t,e,n,r){var o=String(i(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+String(r).replace(s,"&quot;")+'"'),u+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(u),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,n){"use strict";var r=n(50),o=n(23);t.exports=function(t){return r(o(t))}},function(t,e,n){"use strict";var r=n(51),o=n(35),i=n(15),s=n(22),u=n(14),c=n(119),a=Object.getOwnPropertyDescriptor;e.f=n(6)?a:function(t,e){if(t=i(t),e=s(e,!0),c)try{return a(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){"use strict";var r=n(14),o=n(9),i=n(82)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){"use strict";var r=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},function(t,e,n){"use strict";var r=n(10);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){"use strict";t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e,n){"use strict";var r=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:r)(t)}},function(t,e,n){"use strict";var r=n(0),o=n(18),i=n(3);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",s)}},function(t,e,n){"use strict";var r=n(19),o=n(50),i=n(9),s=n(8),u=n(99);t.exports=function(t,e){var n=1==t,c=2==t,a=3==t,f=4==t,l=6==t,p=5==t||l,h=e||u;return function(e,u,v){for(var y,d,b=i(e),g=o(b),m=r(u,v,3),w=s(g.length),x=0,_=n?h(e,w):c?h(e,0):void 0;w>x;x++)if((p||x in g)&&(y=g[x],d=m(y,x,b),t))if(n)_[x]=d;else if(d)switch(t){case 3:return!0;case 5:return y;case 6:return x;case 2:_.push(y)}else if(f)return!1;return l?-1:a||f?f:_}}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};if(n(6)){var o=n(33),i=n(2),s=n(3),u=n(0),c=n(69),a=n(105),f=n(19),l=n(42),p=n(35),h=n(11),v=n(44),y=n(24),d=n(8),b=n(145),g=n(38),m=n(22),w=n(14),x=n(52),_=n(4),S=n(9),O=n(96),j=n(39),P=n(17),E=n(40).f,A=n(98),T=n(36),M=n(5),k=n(26),F=n(59),I=n(66),R=n(101),C=n(48),L=n(63),N=n(41),B=n(100),U=n(135),D=n(7),z=n(16),W=D.f,$=z.f,V=i.RangeError,q=i.TypeError,G=i.Uint8Array,K=Array.prototype,H=a.ArrayBuffer,Y=a.DataView,J=k(0),X=k(2),Z=k(3),Q=k(4),tt=k(5),et=k(6),nt=F(!0),rt=F(!1),ot=R.values,it=R.keys,st=R.entries,ut=K.lastIndexOf,ct=K.reduce,at=K.reduceRight,ft=K.join,lt=K.sort,pt=K.slice,ht=K.toString,vt=K.toLocaleString,yt=M("iterator"),dt=M("toStringTag"),bt=T("typed_constructor"),gt=T("def_constructor"),mt=c.CONSTR,wt=c.TYPED,xt=c.VIEW,_t=k(1,function(t,e){return Et(I(t,t[gt]),e)}),St=s(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),Ot=!!G&&!!G.prototype.set&&s(function(){new G(1).set({})}),jt=function(t,e){var n=y(t);if(n<0||n%e)throw V("Wrong offset!");return n},Pt=function(t){if(_(t)&&wt in t)return t;throw q(t+" is not a typed array!")},Et=function(t,e){if(!(_(t)&&bt in t))throw q("It is not a typed array constructor!");return new t(e)},At=function(t,e){return Tt(I(t,t[gt]),e)},Tt=function(t,e){for(var n=0,r=e.length,o=Et(t,r);r>n;)o[n]=e[n++];return o},Mt=function(t,e,n){W(t,e,{get:function(){return this._d[n]}})},kt=function(t){var e,n,r,o,i,s,u=S(t),c=arguments.length,a=c>1?arguments[1]:void 0,l=void 0!==a,p=A(u);if(void 0!=p&&!O(p)){for(s=p.call(u),r=[],e=0;!(i=s.next()).done;e++)r.push(i.value);u=r}for(l&&c>2&&(a=f(a,arguments[2],2)),e=0,n=d(u.length),o=Et(this,n);n>e;e++)o[e]=l?a(u[e],e):u[e];return o},Ft=function(){for(var t=0,e=arguments.length,n=Et(this,e);e>t;)n[t]=arguments[t++];return n},It=!!G&&s(function(){vt.call(new G(1))}),Rt=function(){return vt.apply(It?pt.call(Pt(this)):Pt(this),arguments)},Ct={copyWithin:function(t,e){return U.call(Pt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Q(Pt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return B.apply(Pt(this),arguments)},filter:function(t){return At(this,X(Pt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return tt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return et(Pt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){J(Pt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return rt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ft.apply(Pt(this),arguments)},lastIndexOf:function(t){return ut.apply(Pt(this),arguments)},map:function(t){return _t(Pt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ct.apply(Pt(this),arguments)},reduceRight:function(t){return at.apply(Pt(this),arguments)},reverse:function(){for(var t,e=this,n=Pt(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return Z(Pt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return lt.call(Pt(this),t)},subarray:function(t,e){var n=Pt(this),r=n.length,o=g(t,r);return new(I(n,n[gt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,d((void 0===e?r:g(e,r))-o))}},Lt=function(t,e){return At(this,pt.call(Pt(this),t,e))},Nt=function(t){Pt(this);var e=jt(arguments[1],1),n=this.length,r=S(t),o=d(r.length),i=0;if(o+e>n)throw V("Wrong length!");for(;i<o;)this[e+i]=r[i++]},Bt={entries:function(){return st.call(Pt(this))},keys:function(){return it.call(Pt(this))},values:function(){return ot.call(Pt(this))}},Ut=function(t,e){return _(t)&&t[wt]&&"symbol"!=(void 0===e?"undefined":r(e))&&e in t&&String(+e)==String(e)},Dt=function(t,e){return Ut(t,e=m(e,!0))?p(2,t[e]):$(t,e)},zt=function(t,e,n){return!(Ut(t,e=m(e,!0))&&_(n)&&w(n,"value"))||w(n,"get")||w(n,"set")||n.configurable||w(n,"writable")&&!n.writable||w(n,"enumerable")&&!n.enumerable?W(t,e,n):(t[e]=n.value,t)};mt||(z.f=Dt,D.f=zt),u(u.S+u.F*!mt,"Object",{getOwnPropertyDescriptor:Dt,defineProperty:zt}),s(function(){ht.call({})})&&(ht=vt=function(){return ft.call(this)});var Wt=v({},Ct);v(Wt,Bt),h(Wt,yt,Bt.values),v(Wt,{slice:Lt,set:Nt,constructor:function(){},toString:ht,toLocaleString:Rt}),Mt(Wt,"buffer","b"),Mt(Wt,"byteOffset","o"),Mt(Wt,"byteLength","l"),Mt(Wt,"length","e"),W(Wt,dt,{get:function(){return this[wt]}}),t.exports=function(t,e,n,r){r=!!r;var a=t+(r?"Clamped":"")+"Array",f="get"+t,p="set"+t,v=i[a],y=v||{},g=v&&P(v),m=!v||!c.ABV,w={},S=v&&v.prototype,O=function(t,n){var r=t._d;return r.v[f](n*e+r.o,St)},A=function(t,n,o){var i=t._d;r&&(o=(o=Math.round(o))<0?0:o>255?255:255&o),i.v[p](n*e+i.o,o,St)},T=function(t,e){W(t,e,{get:function(){return O(this,e)},set:function(t){return A(this,e,t)},enumerable:!0})};m?(v=n(function(t,n,r,o){l(t,v,a,"_d");var i,s,u,c,f=0,p=0;if(_(n)){if(!(n instanceof H||"ArrayBuffer"==(c=x(n))||"SharedArrayBuffer"==c))return wt in n?Tt(v,n):kt.call(v,n);i=n,p=jt(r,e);var y=n.byteLength;if(void 0===o){if(y%e)throw V("Wrong length!");if((s=y-p)<0)throw V("Wrong length!")}else if((s=d(o)*e)+p>y)throw V("Wrong length!");u=s/e}else u=b(n),s=u*e,i=new H(s);for(h(t,"_d",{b:i,o:p,l:s,e:u,v:new Y(i)});f<u;)T(t,f++)}),S=v.prototype=j(Wt),h(S,"constructor",v)):s(function(){v(1)})&&s(function(){new v(-1)})&&L(function(t){new v,new v(null),new v(1.5),new v(t)},!0)||(v=n(function(t,n,r,o){l(t,v,a);var i;return _(n)?n instanceof H||"ArrayBuffer"==(i=x(n))||"SharedArrayBuffer"==i?void 0!==o?new y(n,jt(r,e),o):void 0!==r?new y(n,jt(r,e)):new y(n):wt in n?Tt(v,n):kt.call(v,n):new y(b(n))}),J(g!==Function.prototype?E(y).concat(E(g)):E(y),function(t){t in v||h(v,t,y[t])}),v.prototype=S,o||(S.constructor=v));var M=S[yt],k=!!M&&("values"==M.name||void 0==M.name),F=Bt.values;h(v,bt,!0),h(S,wt,a),h(S,xt,!0),h(S,gt,v),(r?new v(1)[dt]==a:dt in S)||W(S,dt,{get:function(){return a}}),w[a]=v,u(u.G+u.W+u.F*(v!=y),w),u(u.S,a,{BYTES_PER_ELEMENT:e}),u(u.S+u.F*s(function(){y.of.call(v,1)}),a,{from:kt,of:Ft}),"BYTES_PER_ELEMENT"in S||h(S,"BYTES_PER_ELEMENT",e),u(u.P,a,Ct),N(a),u(u.P+u.F*Ot,a,{set:Nt}),u(u.P+u.F*!k,a,Bt),o||S.toString==ht||(S.toString=ht),u(u.P+u.F*s(function(){new v(1).slice()}),a,{slice:Lt}),u(u.P+u.F*(s(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!s(function(){S.toLocaleString.call([1,2])})),a,{toLocaleString:Rt}),C[a]=k?M:F,o||k||h(S,yt,F)}}else t.exports=function(){}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(140),i=n(0),s=n(58)("metadata"),u=s.store||(s.store=new(n(143))),c=function(t,e,n){var r=u.get(t);if(!r){if(!n)return;u.set(t,r=new o)}var i=r.get(e);if(!i){if(!n)return;r.set(e,i=new o)}return i},a=function(t,e,n){var r=c(e,n,!1);return void 0!==r&&r.has(t)},f=function(t,e,n){var r=c(e,n,!1);return void 0===r?void 0:r.get(t)},l=function(t,e,n,r){c(n,r,!0).set(t,e)},p=function(t,e){var n=c(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},h=function(t){return void 0===t||"symbol"==(void 0===t?"undefined":r(t))?t:String(t)},v=function(t){i(i.S,"Reflect",t)};t.exports={store:u,map:c,has:a,get:f,set:l,keys:p,key:h,exp:v}},function(e,n){e.exports=t},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(156),i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,s=o||i||Function("return this")();t.exports=s},function(t,e,n){"use strict";var r=Array.isArray;t.exports=r},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(36)("meta"),i=n(4),s=n(14),u=n(7).f,c=0,a=Object.isExtensible||function(){return!0},f=!n(3)(function(){return a(Object.preventExtensions({}))}),l=function(t){u(t,o,{value:{i:"O"+ ++c,w:{}}})},p=function(t,e){if(!i(t))return"symbol"==(void 0===t?"undefined":r(t))?t:("string"==typeof t?"S":"P")+t;if(!s(t,o)){if(!a(t))return"F";if(!e)return"E";l(t)}return t[o].i},h=function(t,e){if(!s(t,o)){if(!a(t))return!0;if(!e)return!1;l(t)}return t[o].w},v=function(t){return f&&y.NEED&&a(t)&&!s(t,o)&&l(t),t},y=t.exports={KEY:o,NEED:!1,fastKey:p,getWeak:h,onFreeze:v}},function(t,e,n){"use strict";t.exports=!1},function(t,e,n){"use strict";var r=n(5)("unscopables"),o=Array.prototype;void 0==o[r]&&n(11)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var r=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+o).toString(36))}},function(t,e,n){"use strict";var r=n(121),o=n(83);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(24),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){"use strict";var r=n(1),o=n(122),i=n(83),s=n(82)("IE_PROTO"),u=function(){},c=function(){var t,e=n(80)("iframe"),r=i.length;for(e.style.display="none",n(84).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(u.prototype=r(t),n=new u,u.prototype=null,n[s]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){"use strict";var r=n(121),o=n(83).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(2),o=n(7),i=n(6),s=n(5)("species");t.exports=function(t){var e=r[t];i&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var r=n(19),o=n(133),i=n(96),s=n(1),u=n(8),c=n(98),a={},f={},l=t.exports=function(t,e,n,l,p){var h,v,y,d,b=p?function(){return t}:c(t),g=r(n,l,e?2:1),m=0;if("function"!=typeof b)throw TypeError(t+" is not iterable!");if(i(b)){for(h=u(t.length);h>m;m++)if((d=e?g(s(v=t[m])[0],v[1]):g(t[m]))===a||d===f)return d}else for(y=b.call(t);!(v=y.next()).done;)if((d=o(y,g,v.value,e))===a||d===f)return d};l.BREAK=a,l.RETURN=f},function(t,e,n){"use strict";var r=n(12);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";function r(t,e){var n=i(t,e);return o(n)?n:void 0}var o=n(397),i=n(402);t.exports=r},function(t,e,n){"use strict";var r=n(7).f,o=n(14),i=n(5)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){"use strict";var r=n(0),o=n(23),i=n(3),s=n(86),u="["+s+"]",c="​…",a=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),l=function(t,e,n){var o={},u=i(function(){return!!s[t]()||c[t]()!=c}),a=o[t]=u?e(p):s[t];n&&(o[n]=a),r(r.P+r.F*u,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(a,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},function(t,e,n){"use strict";t.exports={}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=n(20);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";e.f={}.propertyIsEnumerable},function(t,e,n){"use strict";var r=n(20),o=n(5)("toStringTag"),i="Arguments"==r(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),o))?n:i?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},function(t,e,n){"use strict";function r(t){return null==t?void 0===t?c:u:a&&a in Object(t)?i(t):s(t)}var o=n(76),i=n(398),s=n(399),u="[object Null]",c="[object Undefined]",a=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){"use strict";function r(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==(void 0===t?"undefined":o(t))}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e,n){"use strict";function r(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}var o=n(115),i=1/0;t.exports=r},function(t,e,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"===("undefined"==typeof window?"undefined":o(window))&&(r=window)}t.exports=r},function(t,e,n){"use strict";var r=n(18),o=n(2),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(33)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){"use strict";var r=n(15),o=n(8),i=n(38);t.exports=function(t){return function(e,n,s){var u,c=r(e),a=o(c.length),f=i(s,a);if(t&&n!=n){for(;a>f;)if((u=c[f++])!=u)return!0}else for(;a>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){"use strict";e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var r=n(20);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){"use strict";var r=n(4),o=n(20),i=n(5)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){"use strict";var r=n(5)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(1);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(11),o=n(12),i=n(3),s=n(23),u=n(5);t.exports=function(t,e,n){var c=u(t),a=n(s,c,""[t]),f=a[0],l=a[1];i(function(){var e={};return e[c]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,f),r(RegExp.prototype,c,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)}))}},function(t,e,n){"use strict";var r=n(1),o=n(10),i=n(5)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||void 0==(n=r(s)[i])?e:o(n)}},function(t,e,n){"use strict";var r=n(2),o=r.navigator;t.exports=o&&o.userAgent||""},function(t,e,n){"use strict";var r=n(2),o=n(0),i=n(12),s=n(44),u=n(32),c=n(43),a=n(42),f=n(4),l=n(3),p=n(63),h=n(46),v=n(87);t.exports=function(t,e,n,y,d,b){var g=r[t],m=g,w=d?"set":"add",x=m&&m.prototype,_={},S=function(t){var e=x[t];i(x,t,"delete"==t?function(t){return!(b&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return b&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof m&&(b||x.forEach&&!l(function(){(new m).entries().next()}))){var O=new m,j=O[w](b?{}:-0,1)!=O,P=l(function(){O.has(1)}),E=p(function(t){new m(t)}),A=!b&&l(function(){for(var t=new m,e=5;e--;)t[w](e,e);return!t.has(-0)});E||(m=e(function(e,n){a(e,m,t);var r=v(new g,e,m);return void 0!=n&&c(n,d,r[w],r),r}),m.prototype=x,x.constructor=m),(P||A)&&(S("delete"),S("has"),d&&S("get")),(A||j)&&S(w),b&&x.clear&&delete x.clear}else m=y.getConstructor(e,t,d,w),s(m.prototype,n),u.NEED=!0;return h(m,t),_[t]=m,o(o.G+o.W+o.F*(m!=g),_),b||y.setStrong(m,t,d),m}},function(t,e,n){"use strict";for(var r,o=n(2),i=n(11),s=n(36),u=s("typed_array"),c=s("view"),a=!(!o.ArrayBuffer||!o.DataView),f=a,l=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=o[p[l++]])?(i(r.prototype,u,!0),i(r.prototype,c,!0)):f=!1;t.exports={ABV:a,CONSTR:f,TYPED:u,VIEW:c}},function(t,e,n){"use strict";t.exports=n(33)||!n(3)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(2)[t]})},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var r=n(0),o=n(10),i=n(19),s=n(43);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,u,c=arguments[1];return o(this),e=void 0!==c,e&&o(c),void 0==t?new this:(n=[],e?(r=0,u=i(c,arguments[2],2),s(t,!1,function(t){n.push(u(t,r++))})):s(t,!1,n.push,n),new this(n))}})}},function(t,e,n){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var o=n(387),i=n(388),s=n(389),u=n(390),c=n(391);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}var o=n(106);t.exports=r},function(t,e,n){"use strict";var r=n(30),o=r.Symbol;t.exports=o},function(t,e,n){"use strict";var r=n(45),o=r(Object,"create");t.exports=o},function(t,e,n){"use strict";function r(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}var o=n(411);t.exports=r},function(t,e,n){"use strict";function r(t,e){return o(t)?t:i(t,e)?[t]:s(u(t))}var o=n(31),i=n(114),s=n(444),u=n(447);t.exports=r},function(t,e,n){"use strict";var r=n(4),o=n(2).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){"use strict";var r=n(2),o=n(18),i=n(33),s=n(120),u=n(7).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:s.f(t)})}},function(t,e,n){"use strict";var r=n(58)("keys"),o=n(36);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){"use strict";t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){"use strict";var r=n(2).document;t.exports=r&&r.documentElement},function(t,e,n){"use strict";var r=n(4),o=n(1),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(19)(Function.call,n(16).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){"use strict";t.exports="\t\n\v\f\r Â áš€á Žâ€€â€â€‚â€ƒâ€„â€…â€†â€‡â€ˆâ€‰â€Šâ€¯âŸã€€\u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(4),o=n(85).set;t.exports=function(t,e,n){var i,s=e.constructor;return s!==n&&"function"==typeof s&&(i=s.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(24),o=n(23);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e,n){"use strict";t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){"use strict";var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},function(t,e,n){"use strict";var r=n(24),o=n(23);t.exports=function(t){return function(e,n){var i,s,u=String(o(e)),c=r(n),a=u.length;return c<0||c>=a?t?"":void 0:(i=u.charCodeAt(c),i<55296||i>56319||c+1===a||(s=u.charCodeAt(c+1))<56320||s>57343?t?u.charAt(c):i:t?u.slice(c,c+2):s-56320+(i-55296<<10)+65536)}}},function(t,e,n){"use strict";var r=n(33),o=n(0),i=n(12),s=n(11),u=n(48),c=n(93),a=n(46),f=n(17),l=n(5)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,v,y,d,b){c(n,e,v);var g,m,w,x=function(t){if(!p&&t in j)return j[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",S="values"==y,O=!1,j=t.prototype,P=j[l]||j["@@iterator"]||y&&j[y],E=P||x(y),A=y?S?x("entries"):E:void 0,T="Array"==e?j.entries||P:P;if(T&&(w=f(T.call(new t)))!==Object.prototype&&w.next&&(a(w,_,!0),r||"function"==typeof w[l]||s(w,l,h)),S&&P&&"values"!==P.name&&(O=!0,E=function(){return P.call(this)}),r&&!b||!p&&!O&&j[l]||s(j,l,E),u[e]=E,u[_]=h,y)if(g={values:S?E:x("values"),keys:d?E:x("keys"),entries:A},b)for(m in g)m in j||i(j,m,g[m]);else o(o.P+o.F*(p||O),e,g);return g}},function(t,e,n){"use strict";var r=n(39),o=n(35),i=n(46),s={};n(11)(s,n(5)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(62),o=n(23);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){"use strict";var r=n(5)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){"use strict";var r=n(48),o=n(5)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){"use strict";var r=n(7),o=n(35);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){"use strict";var r=n(52),o=n(5)("iterator"),i=n(48);t.exports=n(18).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){"use strict";var r=n(270);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(9),o=n(38),i=n(8);t.exports=function(t){for(var e=r(this),n=i(e.length),s=arguments.length,u=o(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,a=void 0===c?n:o(c,n);a>u;)e[u++]=t;return e}},function(t,e,n){"use strict";var r=n(34),o=n(136),i=n(48),s=n(15);t.exports=n(92)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r,o,i,s=n(19),u=n(126),c=n(84),a=n(80),f=n(2),l=f.process,p=f.setImmediate,h=f.clearImmediate,v=f.MessageChannel,y=f.Dispatch,d=0,b={},g=function(){var t=+this;if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},m=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return b[++d]=function(){u("function"==typeof t?t:Function(t),e)},r(d),d},h=function(t){delete b[t]},"process"==n(20)(l)?r=function(t){l.nextTick(s(g,t,1))}:y&&y.now?r=function(t){y.now(s(g,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=m,r=s(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",m,!1)):r="onreadystatechange"in a("script")?function(t){c.appendChild(a("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(s(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,n){"use strict";var r=n(2),o=n(102).set,i=r.MutationObserver||r.WebKitMutationObserver,s=r.process,u=r.Promise,c="process"==n(20)(s);t.exports=function(){var t,e,n,a=function(){var r,o;for(c&&(r=s.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){s.nextTick(a)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);n=function(){f.then(a)}}else n=function(){o.call(r,a)};else{var l=!0,p=document.createTextNode("");new i(a).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=o(e),this.reject=o(n)}var o=n(10);t.exports.f=function(t){return new r(t)}},function(t,e,n){"use strict";function r(t,e,n){var r,o,i,s=new Array(n),u=8*n-e-1,c=(1<<u)-1,a=c>>1,f=23===e?B(2,-24)-B(2,-77):0,l=0,p=t<0||0===t&&1/t<0?1:0;for(t=N(t),t!=t||t===C?(o=t!=t?1:0,r=c):(r=U(D(t)/z),t*(i=B(2,-r))<1&&(r--,i*=2),t+=r+a>=1?f/i:f*B(2,1-a),t*i>=2&&(r++,i/=2),r+a>=c?(o=0,r=c):r+a>=1?(o=(t*i-1)*B(2,e),r+=a):(o=t*B(2,a-1)*B(2,e),r=0));e>=8;s[l++]=255&o,o/=256,e-=8);for(r=r<<e|o,u+=e;u>0;s[l++]=255&r,r/=256,u-=8);return s[--l]|=128*p,s}function o(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,s=i>>1,u=o-7,c=n-1,a=t[c--],f=127&a;for(a>>=7;u>0;f=256*f+t[c],c--,u-=8);for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;r=256*r+t[c],c--,u-=8);if(0===f)f=1-s;else{if(f===i)return r?NaN:a?-C:C;r+=B(2,e),f-=s}return(a?-1:1)*r*B(2,f-e)}function i(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function s(t){return[255&t]}function u(t){return[255&t,t>>8&255]}function c(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function a(t){return r(t,52,8)}function f(t){return r(t,23,4)}function l(t,e,n){P(t[T],e,{get:function(){return this[n]}})}function p(t,e,n,r){var o=+n,i=O(o);if(i+e>t[$])throw R(M);var s=t[W]._b,u=i+t[V],c=s.slice(u,u+e);return r?c:c.reverse()}function h(t,e,n,r,o,i){var s=+n,u=O(s);if(u+e>t[$])throw R(M);for(var c=t[W]._b,a=u+t[V],f=r(+o),l=0;l<e;l++)c[a+l]=f[i?l:e-l-1]}var v=n(2),y=n(6),d=n(33),b=n(69),g=n(11),m=n(44),w=n(3),x=n(42),_=n(24),S=n(8),O=n(145),j=n(40).f,P=n(7).f,E=n(100),A=n(46),T="prototype",M="Wrong index!",k=v.ArrayBuffer,F=v.DataView,I=v.Math,R=v.RangeError,C=v.Infinity,L=k,N=I.abs,B=I.pow,U=I.floor,D=I.log,z=I.LN2,W=y?"_b":"buffer",$=y?"_l":"byteLength",V=y?"_o":"byteOffset";if(b.ABV){if(!w(function(){k(1)})||!w(function(){new k(-1)})||w(function(){return new k,new k(1.5),new k(NaN),"ArrayBuffer"!=k.name})){k=function(t){return x(this,k),new L(O(t))};for(var q,G=k[T]=L[T],K=j(L),H=0;K.length>H;)(q=K[H++])in k||g(k,q,L[q]);d||(G.constructor=k)}var Y=new F(new k(2)),J=F[T].setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||m(F[T],{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},!0)}else k=function(t){x(this,k,"ArrayBuffer");var e=O(t);this._b=E.call(new Array(e),0),this[$]=e},F=function(t,e,n){x(this,F,"DataView"),x(t,k,"DataView");var r=t[$],o=_(e);if(o<0||o>r)throw R("Wrong offset!");if(n=void 0===n?r-o:S(n),o+n>r)throw R("Wrong length!");this[W]=t,this[V]=o,this[$]=n},y&&(l(k,"byteLength","_l"),l(F,"buffer","_b"),l(F,"byteLength","_l"),l(F,"byteOffset","_o")),m(F[T],{getInt8:function(t){return p(this,1,t)[0]<<24>>24},getUint8:function(t){return p(this,1,t)[0]},getInt16:function(t){var e=p(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=p(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return i(p(this,4,t,arguments[1]))},getUint32:function(t){return i(p(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return o(p(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return o(p(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){h(this,1,t,s,e)},setUint8:function(t,e){h(this,1,t,s,e)},setInt16:function(t,e){h(this,2,t,u,e,arguments[2])},setUint16:function(t,e){h(this,2,t,u,e,arguments[2])},setInt32:function(t,e){h(this,4,t,c,e,arguments[2])},setUint32:function(t,e){h(this,4,t,c,e,arguments[2])},setFloat32:function(t,e){h(this,4,t,f,e,arguments[2])},setFloat64:function(t,e){h(this,8,t,a,e,arguments[2])}});A(k,"ArrayBuffer"),A(F,"DataView"),g(F[T],b.VIEW,!0),e.ArrayBuffer=k,e.DataView=F},function(t,e,n){"use strict";function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,n){"use strict";var r=n(45),o=n(30),i=r(o,"Map");t.exports=i},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var o=n(403),i=n(410),s=n(412),u=n(413),c=n(414);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,t.exports=r},function(t,e,n){"use strict";function r(t){return s(t)?o(t):i(t)}var o=n(164),i=n(434),s=n(112);t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=void 0===t?"undefined":o(t);return!!(e=null==e?i:e)&&("number"==n||"symbol"!=n&&s.test(t))&&t>-1&&t%1==0&&t<e}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=9007199254740991,s=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e,n){"use strict";function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}var o=9007199254740991;t.exports=r},function(t,e,n){"use strict";function r(t){return null!=t&&i(t.length)&&!o(t)}var o=n(155),i=n(111);t.exports=r},function(t,e,n){"use strict";function r(t,e){e=o(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[i(e[n++])];return n&&n==r?t:void 0}var o=n(79),i=n(56);t.exports=r},function(t,e,n){"use strict";function r(t,e){if(i(t))return!1;var n=void 0===t?"undefined":o(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!s(t))||(c.test(t)||!u.test(t)||null!=e&&t in Object(e))}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(31),s=n(115),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;t.exports=r},function(t,e,n){"use strict";function r(t){return"symbol"==(void 0===t?"undefined":o(t))||s(t)&&i(t)==u}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(53),s=n(55),u="[object Symbol]";t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){var e=parseInt(t,10);return e>=0&&e<=100?e:void 0}function i(t){var e=_(t);return[].concat(x,e?[e]:[])}function s(t){var e=_(t),n=t[e];return n?e+"="+n:void 0}function u(t){return!1===t.poster?{poster:t.poster}:{isVideoPoster:!t.hasPreview,poster:function(){var e=s(t),n=t.host,r=t.protocol,o=t.streamName,i=t.hasPreview;return O(r+"//"+n+"/"+o+"/preview."+(i?"jpg":"mp4"),e)}()}}function c(t,e){return function(n){var r=E(n,e)?t[n]:void 0;return"true"===r||"on"===r||"false"!==r&&"off"!=r&&r}}Object.defineProperty(e,"__esModule",{value:!0}),e.buildUrl=e.normalizeStringBooleans=e.getSource=e.get=e.getPosterOts=e.getDuration=e.getToken=e.getWhitelist=e.makeOpts=e.getTokenName=e.AUTH_TOKEN_NAME=void 0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},l=function(){function t(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,u=t[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=n(466),h=r(p),v=n(473),y=r(v),d=n(482),b=r(d),g=function(t,e){var n=(0,h.default)({url:t}),r=n.pathname,i=r.split("/"),s=i.filter(function(t){return""!==t&&-1===t.indexOf(".html")}),u=s.join("/"),c=n.query,a={};if(c){a=c.split("&").filter(function(t){return""!==t}).reduce(function(t,e){var n=e.split("="),r=l(n,2),o=r[0],i=r[1],s=function(t){return decodeURIComponent(t)};return t[s(o)]=s(i),t},{})}var p=e.reduce(function(t,e){return f({},t,e)},{}),v=f({},a,p),y=v.baseUrl,d=y&&(0,h.default)({url:y}),b=d||n,g=b.host,w=b.hostname,x=b.protocol,S=b.port,O={host:g,hostname:w,protocol:x,port:S,streamName:u},j=f({},O,a,v);return null!=j.volume&&(j.volume=o(j.volume)),m(j,[_(j),"volume"])},m=function(t,e){var n={};return(0,y.default)(t,function(t,r){e&&e.indexOf(r)>-1||null!==t&&"object"===(void 0===t?"undefined":a(t))?n[r]=t:n[r]=null!=(0,b.default)(t)?(0,b.default)(t):t}),n},w=e.AUTH_TOKEN_NAME="authTokenName",x=["streamName",w,"authToken","autoplay","ago","debug","duration","from","logo","poster","hasPreview","isVideoPoster","proto","play_duration","realtime","to","tracks","url","source"],_=function(t){return t[w]||"token"},S=function(t){var e=t.from,n=t.to;return e&&n&&n-e>0?n-e:void 0},O=function(t,e){return e?t+"?"+e:t},j=function(t,e){var n=t.authToken,r=t.protocol,o=t.host,i=t.streamName;return O(r+"//"+o+"/"+i+"/"+e,n)},P=function(t,e){var n=t.streamName,r=t.ago,o=t.from,i=t.duration,s=t.tracks,u=t.realtime,c=t.protocol,a=t.host,f=t.debug,l=t.authToken,p=t.url,h=t.source;return function(){var t=p||h;return u&&e?t="//"+a+"/"+n+"/mse_ld":r?t="//"+a+"/"+n+"/rewind-"+r+".m3u8":o&&i?t="//"+a+"/"+n+"/index-"+o+"-"+i+".m3u8":o?t="//"+a+"/"+n+"/timeshift_abs-"+o+".m3u8":s?t="//"+a+"/"+n+"/tracks-"+s+"/index.m3u8":t||(t="//"+a+"/"+n+"/index.m3u8"),f&&console.log("set source",t),t=""+(u?"":c)+t,t=O(t,l),u&&o&&(t=t+(l?"&":"?")+"from="+o),t}},E=function(t,e){return e.indexOf(t)>-1};e.getTokenName=_,e.makeOpts=g,e.getWhitelist=i,e.getToken=s,e.getDuration=S,e.getPosterOts=u,e.get=c,e.getSource=P,e.normalizeStringBooleans=m,e.buildUrl=j},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},o=/(.)^/,i={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},s=/\\|'|\r|\n|\t|\u2028|\u2029/g,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},c=new RegExp("[&<>\"']","g"),a=function(t){return null===t?"":(""+t).replace(c,function(t){return u[t]})},f=0,l=function(t,e){var n,u=new RegExp([(r.escape||o).source,(r.interpolate||o).source,(r.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";t.replace(u,function(e,n,r,o,u){return l+=t.slice(c,u).replace(s,function(t){return"\\"+i[t]}),n&&(l+="'+\n((__t=("+n+"))==null?'':escapeExpr(__t))+\n'"),r&&(l+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),o&&(l+="';\n"+o+"\n__p+='"),c=u+e.length,e}),l+="';\n",r.variable||(l="with(obj||{}){\n"+l+"}\n"),l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n//# sourceURL=/microtemplates/source["+f+++"]";try{n=new Function(r.variable||"obj","escapeExpr",l)}catch(t){throw t.source=l,t}if(e)return n(e,a);var p=function(t){return n.call(this,t,a)};return p.source="function("+(r.variable||"obj")+"){\n"+l+"}",p};l.settings=r,e.default=l,t.exports=e.default},function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=o(r);return[n].concat(r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"})).concat([i]).join("\n")}return[n].join("\n")}function o(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=r(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var s=t[o];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},function(t,e,n){"use strict";t.exports=!n(6)&&!n(3)(function(){return 7!=Object.defineProperty(n(80)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";e.f=n(5)},function(t,e,n){"use strict";var r=n(14),o=n(15),i=n(59)(!1),s=n(82)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,a=[];for(n in u)n!=s&&r(u,n)&&a.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(a,n)||a.push(n));return a}},function(t,e,n){"use strict";var r=n(7),o=n(1),i=n(37);t.exports=n(6)?Object.defineProperties:function(t,e){o(t);for(var n,s=i(e),u=s.length,c=0;u>c;)r.f(t,n=s[c++],e[n]);return t}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(15),i=n(40).f,s={}.toString,u="object"==("undefined"==typeof window?"undefined":r(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return i(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==s.call(t)?c(t):i(o(t))}},function(t,e,n){"use strict";var r=n(37),o=n(60),i=n(51),s=n(9),u=n(50),c=Object.assign;t.exports=!c||n(3)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=s(t),c=arguments.length,a=1,f=o.f,l=i.f;c>a;)for(var p,h=u(arguments[a++]),v=f?r(h).concat(f(h)):r(h),y=v.length,d=0;y>d;)l.call(h,p=v[d++])&&(n[p]=h[p]);return n}:c},function(t,e,n){"use strict";var r=n(10),o=n(4),i=n(126),s=[].slice,u={},c=function(t,e,n){if(!(e in u)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";u[e]=Function("F,a","return new F("+r.join(",")+")")}return u[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=s.call(arguments,1),u=function r(){var o=n.concat(s.call(arguments));return this instanceof r?c(e,o.length,o):i(e,o,t)};return o(e.prototype)&&(u.prototype=e.prototype),u}},function(t,e,n){"use strict";t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){"use strict";var r=n(2).parseInt,o=n(47).trim,i=n(86),s=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(s.test(n)?16:10))}:r},function(t,e,n){"use strict";var r=n(2).parseFloat,o=n(47).trim;t.exports=1/r(n(86)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){"use strict";var r=n(20);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(4),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e,n){"use strict";t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){"use strict";var r=n(89),o=Math.pow,i=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126),a=function(t){return t+1/i-1/i};t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),f=r(t);return o<c?f*a(o/c/s)*c*s:(e=(1+s/i)*o,n=e-(e-o),n>u||n!=n?f*(1/0):f*n)}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){"use strict";var r=n(10),o=n(9),i=n(50),s=n(8);t.exports=function(t,e,n,u,c){r(e);var a=o(t),f=i(a),l=s(a.length),p=c?l-1:0,h=c?-1:1;if(n<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,c?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:l>p;p+=h)p in f&&(u=e(u,f[p],p,a));return u}},function(t,e,n){"use strict";var r=n(9),o=n(38),i=n(8);t.exports=[].copyWithin||function(t,e){var n=r(this),s=i(n.length),u=o(t,s),c=o(e,s),a=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===a?s:o(a,s))-c,s-u),l=1;for(c<u&&u<c+f&&(l=-1,c+=f-1,u+=f-1);f-- >0;)c in n?n[u]=n[c]:delete n[u],u+=l,c+=l;return n}},function(t,e,n){"use strict";t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";n(6)&&"g"!=/./g.flags&&n(7).f(RegExp.prototype,"flags",{configurable:!0,get:n(64)})},function(t,e,n){"use strict";t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(1),o=n(4),i=n(104);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(141),o=n(49);t.exports=n(68)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(7).f,o=n(39),i=n(44),s=n(19),u=n(42),c=n(43),a=n(92),f=n(136),l=n(41),p=n(6),h=n(32).fastKey,v=n(49),y=p?"_s":"size",d=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,a){var f=t(function(t,r){u(t,f,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=r&&c(r,n,t[a],t)});return i(f.prototype,{clear:function(){for(var t=v(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var n=v(this,e),r=d(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[y]--}return!!r},forEach:function(t){v(this,e);for(var n,r=s(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!d(v(this,e),t)}}),p&&r(f.prototype,"size",{get:function(){return v(this,e)[y]}}),f},def:function(t,e,n){var r,o,i=d(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[y]++,"F"!==o&&(t._i[o]=i)),t},getEntry:d,setStrong:function(t,e,n){a(t,e,function(t,n){this._t=v(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?f(0,n.k):"values"==e?f(0,n.v):f(0,[n.k,n.v]):(t._t=void 0,f(1))},n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(141),o=n(49);t.exports=n(68)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,o=n(26)(0),i=n(12),s=n(32),u=n(124),c=n(144),a=n(4),f=n(3),l=n(49),p=s.getWeak,h=Object.isExtensible,v=c.ufstore,y={},d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(t){if(a(t)){var e=p(t);return!0===e?v(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},g=t.exports=n(68)("WeakMap",d,b,c,!0,!0);f(function(){return 7!=(new g).set((Object.freeze||Object)(y),7).get(y)})&&(r=c.getConstructor(d,"WeakMap"),u(r.prototype,b),s.NEED=!0,o(["delete","has","get","set"],function(t){var e=g.prototype,n=e[t];i(e,t,function(e,o){if(a(e)&&!h(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(44),o=n(32).getWeak,i=n(1),s=n(4),u=n(42),c=n(43),a=n(26),f=n(14),l=n(49),p=a(5),h=a(6),v=0,y=function(t){return t._l||(t._l=new d)},d=function(){this.a=[]},b=function(t,e){return p(t.a,function(t){return t[0]===e})};d.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var a=t(function(t,r){u(t,a,e,"_i"),t._t=e,t._i=v++,t._l=void 0,void 0!=r&&c(r,n,t[i],t)});return r(a.prototype,{delete:function(t){if(!s(t))return!1;var n=o(t);return!0===n?y(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!s(t))return!1;var n=o(t);return!0===n?y(l(this,e)).has(t):n&&f(n,this._i)}}),a},def:function(t,e,n){var r=o(i(e),!0);return!0===r?y(t).set(e,n):r[t._i]=n,t},ufstore:y}},function(t,e,n){"use strict";var r=n(24),o=n(8);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){"use strict";var r=n(40),o=n(60),i=n(1),s=n(2).Reflect;t.exports=s&&s.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){"use strict";function r(t,e,n,a,f,l,p,h){for(var v,y,d=f,b=0,g=!!p&&u(p,h,3);b<a;){if(b in n){if(v=g?g(n[b],b,e):n[b],y=!1,i(v)&&(y=v[c],y=void 0!==y?!!y:o(v)),y&&l>0)d=r(t,e,v,s(v.length),d,l-1)-1;else{if(d>=9007199254740991)throw TypeError();t[d]=v}d++}b++}return d}var o=n(61),i=n(4),s=n(8),u=n(19),c=n(5)("isConcatSpreadable");t.exports=r},function(t,e,n){"use strict";var r=n(8),o=n(88),i=n(23);t.exports=function(t,e,n,s){var u=String(i(t)),c=u.length,a=void 0===n?" ":String(n),f=r(e);if(f<=c||""==a)return u;var l=f-c,p=o.call(a,Math.ceil(l/a.length));return p.length>l&&(p=p.slice(0,l)),s?p+u:u+p}},function(t,e,n){"use strict";var r=n(37),o=n(15),i=n(51).f;t.exports=function(t){return function(e){for(var n,s=o(e),u=r(s),c=u.length,a=0,f=[];c>a;)i.call(s,n=u[a++])&&f.push(t?[n,s[n]]:s[n]);return f}}},function(t,e,n){"use strict";var r=n(52),o=n(151);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return o(this)}}},function(t,e,n){"use strict";var r=n(43);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){"use strict";t.exports=Math.scale||function(t,e,n,r,o){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||o!=o?NaN:t===1/0||t===-1/0?t:(t-e)*(o-r)/(n-e)+r}},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this.__data__=new o(t);this.size=e.size}var o=n(74),i=n(392),s=n(393),u=n(394),c=n(395),a=n(396);r.prototype.clear=i,r.prototype.delete=s,r.prototype.get=u,r.prototype.has=c,r.prototype.set=a,t.exports=r},function(t,e,n){"use strict";function r(t){if(!i(t))return!1;var e=o(t);return e==u||e==c||e==s||e==a}var o=n(53),i=n(54),s="[object AsyncFunction]",u="[object Function]",c="[object GeneratorFunction]",a="[object Proxy]";t.exports=r},function(t,e,n){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e;t.exports=r}).call(e,n(57))},function(t,e,n){"use strict";function r(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var o=Function.prototype,i=o.toString;t.exports=r},function(t,e,n){"use strict";function r(t,e,n,s,u){return t===e||(null==t||null==e||!i(t)&&!i(e)?t!==t&&e!==e:o(t,e,n,s,r,u))}var o=n(415),i=n(55);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,a,f){var l=n&u,p=t.length,h=e.length;if(p!=h&&!(l&&h>p))return!1;var v=f.get(t);if(v&&f.get(e))return v==e;var y=-1,d=!0,b=n&c?new o:void 0;for(f.set(t,e),f.set(e,t);++y<p;){var g=t[y],m=e[y];if(r)var w=l?r(m,g,y,e,t,f):r(g,m,y,t,e,f);if(void 0!==w){if(w)continue;d=!1;break}if(b){if(!i(e,function(t,e){if(!s(b,e)&&(g===t||a(g,t,n,r,f)))return b.push(e)})){d=!1;break}}else if(g!==m&&!a(g,m,n,r,f)){d=!1;break}}return f.delete(t),f.delete(e),d}var o=n(416),i=n(419),s=n(420),u=1,c=2;t.exports=r},function(t,e,n){"use strict";function r(t,e,n){var r=e(t);return i(t)?r:o(r,n(t))}var o=n(161),i=n(31);t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}t.exports=r},function(t,e,n){"use strict";var r=n(427),o=n(163),i=Object.prototype,s=i.propertyIsEnumerable,u=Object.getOwnPropertySymbols,c=u?function(t){return null==t?[]:(t=Object(t),r(u(t),function(e){return s.call(t,e)}))}:o;t.exports=c},function(t,e,n){"use strict";function r(){return[]}t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=s(t),r=!n&&i(t),f=!n&&!r&&u(t),p=!n&&!r&&!f&&a(t),h=n||r||f||p,v=h?o(t.length,String):[],y=v.length;for(var d in t)!e&&!l.call(t,d)||h&&("length"==d||f&&("offset"==d||"parent"==d)||p&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||c(d,y))||v.push(d);return v}var o=n(428),i=n(165),s=n(31),u=n(166),c=n(110),a=n(167),f=Object.prototype,l=f.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";var r=n(429),o=n(55),i=Object.prototype,s=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&s.call(t,"callee")&&!u.call(t,"callee")};t.exports=c},function(t,e,n){"use strict";(function(t){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(30),i=n(430),s="object"==r(e)&&e&&!e.nodeType&&e,u=s&&"object"==r(t)&&t&&!t.nodeType&&t,c=u&&u.exports===s,a=c?o.Buffer:void 0,f=a?a.isBuffer:void 0,l=f||i;t.exports=l}).call(e,n(73)(t))},function(t,e,n){"use strict";var r=n(431),o=n(432),i=n(433),s=i&&i.isTypedArray,u=s?o(s):r;t.exports=u},function(t,e,n){"use strict";function r(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||o)}var o=Object.prototype;t.exports=r},function(t,e,n){"use strict";function r(t,e){return function(n){return t(e(n))}}t.exports=r},function(t,e,n){"use strict";function r(t){return t===t&&!o(t)}var o=n(54);t.exports=r},function(t,e,n){"use strict";function r(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}t.exports=r},function(t,e,n){"use strict";function r(t){return t}t.exports=r},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){"use strict";t.exports=function(t){return null==t?"":""+t}},function(t,e){t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M1.425.35L14.575 8l-13.15 7.65V.35z"></path></svg>'},function(t,e,n){"use strict";function r(t){var e={media:{width:0,height:0},letterboxing:{horizontal:0,vertical:0}},n=Object.assign({},e);return n.media.width=t.media.width*t.dom.height/t.media.height,n.media.height=t.media.height*n.media.width/t.media.width,n.media.width>t.dom.width&&(n.media.height=t.media.height*t.dom.width/t.media.width,n.media.width=t.media.width*n.media.height/t.media.height),n.media.width<t.dom.width?n.letterboxing.horizontal=Math.floor((t.dom.width-n.media.width)/2):n.media.height<t.dom.height&&(n.letterboxing.vertical=Math.floor((t.dom.height-n.media.height)/2)),n.media.width=Math.floor(n.media.width),n.media.height=Math.floor(n.media.height),n}function o(){return c.default.phone||c.default.tablet}function i(t,e){var n=e.getBoundingClientRect(),o=r({media:{width:t.width,height:t.height},dom:{width:n.width,height:n.height}});t.style.position="absolute",t.style.top=o.letterboxing.vertical+"px",t.style.left=o.letterboxing.horizontal+"px",t.style.width=o.media.width+"px",t.style.height=o.media.height+"px"}function s(t){var e=window,n=e.innerWidth,r=e.innerHeight,o=document.documentElement,i=o.clientHeight,s=o.clientWidth,u=t.getBoundingClientRect(),c=u.bottom,a=u.right,f=u.left,l=u.top;return c>=0&&a>=0&&l<=(r||i)&&f<=(n||s)}Object.defineProperty(e,"__esModule",{value:!0}),e.requestAnimationFrame=void 0,e.calculateSize=r,e.isMobileBrowser=o,e.setCanvasSize=i,e.isInVisibleArea=s;var u=n(490),c=function(t){return t&&t.__esModule?t:{default:t}}(u),a=function(){var t=Date.now();return function(e){var n=Date.now();n-t>16?(t=n,e(n)):setTimeout(function(){polyfill(e)},0)}}();e.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||a},function(t,e,n){n(178),t.exports=n(380)},function(t,e,n){"use strict";(function(t){function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n(179),n(376),n(377),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&e(Array,t,Function.call.bind([][t]))})}).call(e,n(57))},function(t,e,n){"use strict";n(180),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(260),n(261),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(101),n(284),n(285),n(137),n(286),n(287),n(288),n(289),n(290),n(140),n(142),n(143),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),t.exports=n(18)},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(2),i=n(14),s=n(6),u=n(0),c=n(12),a=n(32).KEY,f=n(3),l=n(58),p=n(46),h=n(36),v=n(5),y=n(120),d=n(81),b=n(181),g=n(61),m=n(1),w=n(4),x=n(15),_=n(22),S=n(35),O=n(39),j=n(123),P=n(16),E=n(7),A=n(37),T=P.f,M=E.f,k=j.f,F=o.Symbol,I=o.JSON,R=I&&I.stringify,C=v("_hidden"),L=v("toPrimitive"),N={}.propertyIsEnumerable,B=l("symbol-registry"),U=l("symbols"),D=l("op-symbols"),z=Object.prototype,W="function"==typeof F,$=o.QObject,V=!$||!$.prototype||!$.prototype.findChild,q=s&&f(function(){return 7!=O(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=T(z,e);r&&delete z[e],M(t,e,n),r&&t!==z&&M(z,e,r)}:M,G=function(t){var e=U[t]=O(F.prototype);return e._k=t,e},K=W&&"symbol"==r(F.iterator)?function(t){return"symbol"==(void 0===t?"undefined":r(t))}:function(t){return t instanceof F},H=function(t,e,n){return t===z&&H(D,e,n),m(t),e=_(e,!0),m(n),i(U,e)?(n.enumerable?(i(t,C)&&t[C][e]&&(t[C][e]=!1),n=O(n,{enumerable:S(0,!1)})):(i(t,C)||M(t,C,S(1,{})),t[C][e]=!0),q(t,e,n)):M(t,e,n)},Y=function(t,e){m(t);for(var n,r=b(e=x(e)),o=0,i=r.length;i>o;)H(t,n=r[o++],e[n]);return t},J=function(t,e){return void 0===e?O(t):Y(O(t),e)},X=function(t){var e=N.call(this,t=_(t,!0));return!(this===z&&i(U,t)&&!i(D,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,C)&&this[C][t])||e)},Z=function(t,e){if(t=x(t),e=_(e,!0),t!==z||!i(U,e)||i(D,e)){var n=T(t,e);return!n||!i(U,e)||i(t,C)&&t[C][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=k(x(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==C||e==a||r.push(e);return r},tt=function(t){for(var e,n=t===z,r=k(n?D:x(t)),o=[],s=0;r.length>s;)!i(U,e=r[s++])||n&&!i(z,e)||o.push(U[e]);return o};W||(F=function(){if(this instanceof F)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function e(n){this===z&&e.call(D,n),i(this,C)&&i(this[C],t)&&(this[C][t]=!1),q(this,t,S(1,n))};return s&&V&&q(z,t,{configurable:!0,set:e}),G(t)},c(F.prototype,"toString",function(){return this._k}),P.f=Z,E.f=H,n(40).f=j.f=Q,n(51).f=X,n(60).f=tt,s&&!n(33)&&c(z,"propertyIsEnumerable",X,!0),y.f=function(t){return G(v(t))}),u(u.G+u.W+u.F*!W,{Symbol:F});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)v(et[nt++]);for(var rt=A(v.store),ot=0;rt.length>ot;)d(rt[ot++]);u(u.S+u.F*!W,"Symbol",{for:function(t){return i(B,t+="")?B[t]:B[t]=F(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in B)if(B[e]===t)return e},useSetter:function(){V=!0},useSimple:function(){V=!1}}),u(u.S+u.F*!W,"Object",{create:J,defineProperty:H,defineProperties:Y,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt}),I&&u(u.S+u.F*(!W||f(function(){var t=F();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(w(e)||void 0!==t)&&!K(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,R.apply(I,r)}}),F.prototype[L]||n(11)(F.prototype,L,F.prototype.valueOf),p(F,"Symbol"),p(Math,"Math",!0),p(o.JSON,"JSON",!0)},function(t,e,n){"use strict";var r=n(37),o=n(60),i=n(51);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var s,u=n(t),c=i.f,a=0;u.length>a;)c.call(t,s=u[a++])&&e.push(s);return e}},function(t,e,n){"use strict";var r=n(0);r(r.S,"Object",{create:n(39)})},function(t,e,n){"use strict";var r=n(0);r(r.S+r.F*!n(6),"Object",{defineProperty:n(7).f})},function(t,e,n){"use strict";var r=n(0);r(r.S+r.F*!n(6),"Object",{defineProperties:n(122)})},function(t,e,n){"use strict";var r=n(15),o=n(16).f;n(25)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},function(t,e,n){"use strict";var r=n(9),o=n(17);n(25)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){"use strict";var r=n(9),o=n(37);n(25)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){"use strict";n(25)("getOwnPropertyNames",function(){return n(123).f})},function(t,e,n){"use strict";var r=n(4),o=n(32).onFreeze;n(25)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){"use strict";var r=n(4),o=n(32).onFreeze;n(25)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){"use strict";var r=n(4),o=n(32).onFreeze;n(25)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){"use strict";var r=n(4);n(25)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){"use strict";var r=n(4);n(25)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){"use strict";var r=n(4);n(25)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){"use strict";var r=n(0);r(r.S+r.F,"Object",{assign:n(124)})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Object",{is:n(197)})},function(t,e,n){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(0);r(r.S,"Object",{setPrototypeOf:n(85).set})},function(t,e,n){"use strict";var r=n(52),o={};o[n(5)("toStringTag")]="z",o+""!="[object z]"&&n(12)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){"use strict";var r=n(0);r(r.P,"Function",{bind:n(125)})},function(t,e,n){"use strict";var r=n(7).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(6)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(4),o=n(17),i=n(5)("hasInstance"),s=Function.prototype;i in s||n(7).f(s,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){"use strict";var r=n(0),o=n(127);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,e,n){"use strict";var r=n(0),o=n(128);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){"use strict";var r=n(2),o=n(14),i=n(20),s=n(87),u=n(22),c=n(3),a=n(40).f,f=n(16).f,l=n(7).f,p=n(47).trim,h=r.Number,v=h,y=h.prototype,d="Number"==i(n(39)(y)),b="trim"in String.prototype,g=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){e=b?e.trim():p(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var s,c=e.slice(2),a=0,f=c.length;a<f;a++)if((s=c.charCodeAt(a))<48||s>o)return NaN;return parseInt(c,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(d?c(function(){y.valueOf.call(n)}):"Number"!=i(n))?s(new v(g(e)),n,h):g(e)};for(var m,w=n(6)?a(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(v,m=w[x])&&!o(h,m)&&l(h,m,f(v,m));h.prototype=y,y.constructor=h,n(12)(r,"Number",h)}},function(t,e,n){"use strict";var r=n(0),o=n(24),i=n(129),s=n(88),u=1..toFixed,c=Math.floor,a=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*a[n],a[n]=r%1e7,r=c(r/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)n+=a[e],a[e]=c(n/t),n=n%t*1e7},h=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==a[t]){var n=String(a[t]);e=""===e?n:e+s.call("0",7-n.length)+n}return e},v=function t(e,n,r){return 0===n?r:n%2==1?t(e,n-1,r*e):t(e*e,n/2,r)},y=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)(function(){u.call({})})),"Number",{toFixed:function(t){var e,n,r,u,c=i(this,f),a=o(t),d="",b="0";if(a<0||a>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(d="-",c=-c),c>1e-21)if(e=y(c*v(2,69,1))-69,n=e<0?c*v(2,-e,1):c/v(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=a;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=e-1;r>=23;)p(1<<23),r-=23;p(1<<r),l(1,1),p(2),b=h()}else l(0,n),l(1<<-e,0),b=h()+s.call("0",a);return a>0?(u=b.length,b=d+(u<=a?"0."+s.call("0",a-u)+b:b.slice(0,u-a)+"."+b.slice(u-a))):b=d+b,b}})},function(t,e,n){"use strict";var r=n(0),o=n(3),i=n(129),s=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==s.call(1,void 0)})||!o(function(){s.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?s.call(e):s.call(e,t)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){"use strict";var r=n(0),o=n(2).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Number",{isInteger:n(130)})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){"use strict";var r=n(0),o=n(130),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){"use strict";var r=n(0),o=n(128);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){"use strict";var r=n(0),o=n(127);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){"use strict";var r=n(0),o=n(131),i=Math.sqrt,s=Math.acosh;r(r.S+r.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,e,n){"use strict";function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var o=n(0),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(t,e,n){"use strict";var r=n(0),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){"use strict";var r=n(0),o=n(89);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){"use strict";var r=n(0),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){"use strict";var r=n(0),o=n(90);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{fround:n(132)})},function(t,e,n){"use strict";var r=n(0),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,s=0,u=arguments.length,c=0;s<u;)n=o(arguments[s++]),c<n?(r=c/n,i=i*r*r+1,c=n):n>0?(r=n/c,i+=r*r):i+=n;return c===1/0?1/0:c*Math.sqrt(i)}})},function(t,e,n){"use strict";var r=n(0),o=Math.imul;r(r.S+r.F*n(3)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{log1p:n(131)})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{sign:n(89)})},function(t,e,n){"use strict";var r=n(0),o=n(90),i=Math.exp;r(r.S+r.F*n(3)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){"use strict";var r=n(0),o=n(90),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){"use strict";var r=n(0),o=n(38),i=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,s=0;r>s;){if(e=+arguments[s++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){"use strict";var r=n(0),o=n(15),i=n(8);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,s=[],u=0;n>u;)s.push(String(e[u++])),u<r&&s.push(String(arguments[u]));return s.join("")}})},function(t,e,n){"use strict";n(47)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(91)(!0);n(92)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(0),o=n(91)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(0),o=n(8),i=n(94),s="".endsWith;r(r.P+r.F*n(95)("endsWith"),"String",{endsWith:function(t){var e=i(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),u=void 0===n?r:Math.min(o(n),r),c=String(t);return s?s.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,n){"use strict";var r=n(0),o=n(94);r(r.P+r.F*n(95)("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var r=n(0);r(r.P,"String",{repeat:n(88)})},function(t,e,n){"use strict";var r=n(0),o=n(8),i=n(94),s="".startsWith;r(r.P+r.F*n(95)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(13)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(13)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(13)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(13)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(13)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(13)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(13)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(13)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(13)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(13)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(13)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(13)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(13)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),o=n(9),i=n(22);r(r.P+r.F*n(3)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var r=n(0),o=n(259);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(3),o=Date.prototype.getTime,i=Date.prototype.toISOString,s=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+s(t.getUTCMonth()+1)+"-"+s(t.getUTCDate())+"T"+s(t.getUTCHours())+":"+s(t.getUTCMinutes())+":"+s(t.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}:i},function(t,e,n){"use strict";var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(12)(r,"toString",function(){var t=i.call(this);return t===t?o.call(this):"Invalid Date"})},function(t,e,n){"use strict";var r=n(5)("toPrimitive"),o=Date.prototype;r in o||n(11)(o,r,n(262))},function(t,e,n){"use strict";var r=n(1),o=n(22);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!=t)}},function(t,e,n){"use strict";var r=n(0);r(r.S,"Array",{isArray:n(61)})},function(t,e,n){"use strict";var r=n(19),o=n(0),i=n(9),s=n(133),u=n(96),c=n(8),a=n(97),f=n(98);o(o.S+o.F*!n(63)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,v=arguments.length,y=v>1?arguments[1]:void 0,d=void 0!==y,b=0,g=f(p);if(d&&(y=r(y,v>2?arguments[2]:void 0,2)),void 0==g||h==Array&&u(g))for(e=c(p.length),n=new h(e);e>b;b++)a(n,b,d?y(p[b],b):p[b]);else for(l=g.call(p),n=new h;!(o=l.next()).done;b++)a(n,b,d?s(l,y,[o.value,b],!0):o.value);return n.length=b,n}})},function(t,e,n){"use strict";var r=n(0),o=n(97);r(r.S+r.F*n(3)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),o=n(15),i=[].join;r(r.P+r.F*(n(50)!=Object||!n(21)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),o=n(84),i=n(20),s=n(38),u=n(8),c=[].slice;r(r.P+r.F*n(3)(function(){o&&c.call(o)}),"Array",{slice:function(t,e){var n=u(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var o=s(t,n),a=s(e,n),f=u(a-o),l=new Array(f),p=0;p<f;p++)l[p]="String"==r?this.charAt(o+p):this[o+p];return l}})},function(t,e,n){"use strict";var r=n(0),o=n(10),i=n(9),s=n(3),u=[].sort,c=[1,2,3];r(r.P+r.F*(s(function(){c.sort(void 0)})||!s(function(){c.sort(null)})||!n(21)(u)),"Array",{sort:function(t){return void 0===t?u.call(i(this)):u.call(i(this),o(t))}})},function(t,e,n){"use strict";var r=n(0),o=n(26)(0),i=n(21)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(4),o=n(61),i=n(5)("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(0),o=n(26)(1);r(r.P+r.F*!n(21)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(26)(2);r(r.P+r.F*!n(21)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(26)(3);r(r.P+r.F*!n(21)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(26)(4);r(r.P+r.F*!n(21)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(134);r(r.P+r.F*!n(21)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(0),o=n(134);r(r.P+r.F*!n(21)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(0),o=n(59)(!1),i=[].indexOf,s=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(s||!n(21)(i)),"Array",{indexOf:function(t){return s?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(15),i=n(24),s=n(8),u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(21)(u)),"Array",{lastIndexOf:function(t){if(c)return u.apply(this,arguments)||0;var e=o(this),n=s(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){"use strict";var r=n(0);r(r.P,"Array",{copyWithin:n(135)}),n(34)("copyWithin")},function(t,e,n){"use strict";var r=n(0);r(r.P,"Array",{fill:n(100)}),n(34)("fill")},function(t,e,n){"use strict";var r=n(0),o=n(26)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(34)("find")},function(t,e,n){"use strict";var r=n(0),o=n(26)(6),i="findIndex",s=!0;i in[]&&Array(1)[i](function(){s=!1}),r(r.P+r.F*s,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(34)(i)},function(t,e,n){"use strict";n(41)("Array")},function(t,e,n){"use strict";var r=n(2),o=n(87),i=n(7).f,s=n(40).f,u=n(62),c=n(64),a=r.RegExp,f=a,l=a.prototype,p=/a/g,h=/a/g,v=new a(p)!==p;if(n(6)&&(!v||n(3)(function(){return h[n(5)("match")]=!1,a(p)!=p||a(h)==h||"/a/i"!=a(p,"i")}))){a=function(t,e){var n=this instanceof a,r=u(t),i=void 0===e;return!n&&r&&t.constructor===a&&i?t:o(v?new f(r&&!i?t.source:t,e):f((r=t instanceof a)?t.source:t,r&&i?c.call(t):e),n?this:l,a)};for(var y=s(f),d=0;y.length>d;)!function(t){t in a||i(a,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})}(y[d++]);l.constructor=a,a.prototype=l,n(12)(r,"RegExp",a)}n(41)("RegExp")},function(t,e,n){"use strict";n(137);var r=n(1),o=n(64),i=n(6),s=/./.toString,u=function(t){n(12)(RegExp.prototype,"toString",t,!0)};n(3)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=s.name&&u(function(){return s.call(this)})},function(t,e,n){"use strict";n(65)("match",1,function(t,e,n){return[function(n){var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){"use strict";n(65)("replace",2,function(t,e,n){return[function(r,o){var i=t(this),s=void 0==r?void 0:r[e];return void 0!==s?s.call(r,i,o):n.call(String(i),r,o)},n]})},function(t,e,n){"use strict";n(65)("search",1,function(t,e,n){return[function(n){var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){"use strict";n(65)("split",2,function(t,e,r){var o=n(62),i=r,s=[].push,u="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[u]||2!="ab".split(/(?:ab)*/)[u]||4!=".".split(/(.?)(.?)/)[u]||".".split(/()()/)[u]>1||"".split(/.?/)[u]){var c=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,a,f,l,p,h=[],v=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),y=0,d=void 0===e?4294967295:e>>>0,b=new RegExp(t.source,v+"g");for(c||(r=new RegExp("^"+b.source+"$(?!\\s)",v));(a=b.exec(n))&&!((f=a.index+a[0][u])>y&&(h.push(n.slice(y,a.index)),!c&&a[u]>1&&a[0].replace(r,function(){for(p=1;p<arguments[u]-2;p++)void 0===arguments[p]&&(a[p]=void 0)}),a[u]>1&&a.index<n[u]&&s.apply(h,a.slice(1)),l=a[0][u],y=f,h[u]>=d));)b.lastIndex===a.index&&b.lastIndex++;return y===n[u]?!l&&b.test("")||h.push(""):h.push(n.slice(y)),h[u]>d?h.slice(0,d):h}}else"0".split(void 0,0)[u]&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,o){var i=t(this),s=void 0==n?void 0:n[e];return void 0!==s?s.call(n,i,o):r.call(String(i),n,o)},r]})},function(t,e,n){"use strict";var r,o,i,s,u=n(33),c=n(2),a=n(19),f=n(52),l=n(0),p=n(4),h=n(10),v=n(42),y=n(43),d=n(66),b=n(102).set,g=n(103)(),m=n(104),w=n(138),x=n(67),_=n(139),S=c.TypeError,O=c.process,j=O&&O.versions,P=j&&j.v8||"",E=c.Promise,A="process"==f(O),T=function(){},M=o=m.f,k=!!function(){try{var t=E.resolve(1),e=(t.constructor={})[n(5)("species")]=function(t){t(T,T)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(T)instanceof e&&0!==P.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),F=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},I=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,o=1==t._s,i=0;n.length>i;)!function(e){var n,i,s,u=o?e.ok:e.fail,c=e.resolve,a=e.reject,f=e.domain;try{u?(o||(2==t._h&&L(t),t._h=1),!0===u?n=r:(f&&f.enter(),n=u(r),f&&(f.exit(),s=!0)),n===e.promise?a(S("Promise-chain cycle")):(i=F(n))?i.call(n,c,a):c(n)):a(r)}catch(t){f&&!s&&f.exit(),a(t)}}(n[i++]);t._c=[],t._n=!1,e&&!t._h&&R(t)})}},R=function(t){b.call(c,function(){var e,n,r,o=t._v,i=C(t);if(i&&(e=w(function(){A?O.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=A||C(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},C=function(t){return 1!==t._h&&0===(t._a||t._c).length},L=function(t){b.call(c,function(){var e;A?O.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),I(e,!0))},B=function t(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw S("Promise can't be resolved itself");(n=F(e))?g(function(){var o={_w:r,_d:!1};try{n.call(e,a(t,o,1),a(N,o,1))}catch(t){N.call(o,t)}}):(r._v=e,r._s=1,I(r,!1))}catch(t){N.call({_w:r,_d:!1},t)}}};k||(E=function(t){v(this,E,"Promise","_h"),h(t),r.call(this);try{t(a(B,this,1),a(N,this,1))}catch(t){N.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(44)(E.prototype,{then:function(t,e){var n=M(d(this,E));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=A?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=a(B,t,1),this.reject=a(N,t,1)},m.f=M=function(t){return t===E||t===s?new i(t):o(t)}),l(l.G+l.W+l.F*!k,{Promise:E}),n(46)(E,"Promise"),n(41)("Promise"),s=n(18).Promise,l(l.S+l.F*!k,"Promise",{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!k),"Promise",{resolve:function(t){return _(u&&this===s?E:this,t)}}),l(l.S+l.F*!(k&&n(63)(function(t){E.all(t).catch(T)})),"Promise",{all:function(t){var e=this,n=M(e),r=n.resolve,o=n.reject,i=w(function(){var n=[],i=0,s=1;y(t,!1,function(t){var u=i++,c=!1;n.push(void 0),s++,e.resolve(t).then(function(t){c||(c=!0,n[u]=t,--s||r(n))},o)}),--s||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=M(e),r=n.reject,o=w(function(){y(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(t,e,n){"use strict";var r=n(144),o=n(49);n(68)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),o=n(69),i=n(105),s=n(1),u=n(38),c=n(8),a=n(4),f=n(2).ArrayBuffer,l=n(66),p=i.ArrayBuffer,h=i.DataView,v=o.ABV&&f.isView,y=p.prototype.slice,d=o.VIEW;r(r.G+r.W+r.F*(f!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||a(t)&&d in t}}),r(r.P+r.U+r.F*n(3)(function(){return!new p(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==y&&void 0===e)return y.call(s(this),t);for(var n=s(this).byteLength,r=u(t,n),o=u(void 0===e?n:e,n),i=new(l(this,p))(c(o-r)),a=new h(this),f=new h(i),v=0;r<o;)f.setUint8(v++,a.getUint8(r++));return i}}),n(41)("ArrayBuffer")},function(t,e,n){"use strict";var r=n(0);r(r.G+r.W+r.F*!n(69).ABV,{DataView:n(105).DataView})},function(t,e,n){"use strict";n(27)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";n(27)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";n(27)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){"use strict";n(27)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";n(27)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";n(27)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";n(27)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";n(27)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";n(27)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";var r=n(0),o=n(10),i=n(1),s=(n(2).Reflect||{}).apply,u=Function.apply;r(r.S+r.F*!n(3)(function(){s(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),c=i(n);return s?s(r,e,c):u.call(r,e,c)}})},function(t,e,n){"use strict";var r=n(0),o=n(39),i=n(10),s=n(1),u=n(4),c=n(3),a=n(125),f=(n(2).Reflect||{}).construct,l=c(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),p=!c(function(){f(function(){})});r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),s(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(a.apply(t,r))}var c=n.prototype,h=o(u(c)?c:Object.prototype),v=Function.apply.call(t,h,e);return u(v)?v:h}})},function(t,e,n){"use strict";var r=n(7),o=n(0),i=n(1),s=n(22);o(o.S+o.F*n(3)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=s(e,!0),i(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(0),o=n(16).f,i=n(1);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(93)(i,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){"use strict";function r(t,e){var n,u,f=arguments.length<3?t:arguments[2];return a(t)===f?t[e]:(n=o.f(t,e))?s(n,"value")?n.value:void 0!==n.get?n.get.call(f):void 0:c(u=i(t))?r(u,e,f):void 0}var o=n(16),i=n(17),s=n(14),u=n(0),c=n(4),a=n(1);u(u.S,"Reflect",{get:r})},function(t,e,n){"use strict";var r=n(16),o=n(0),i=n(1);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=n(1);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Reflect",{ownKeys:n(146)})},function(t,e,n){"use strict";var r=n(0),o=n(1),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){"use strict";function r(t,e,n){var c,p,h=arguments.length<4?t:arguments[3],v=i.f(f(t),e);if(!v){if(l(p=s(t)))return r(p,e,n,h);v=a(0)}if(u(v,"value")){if(!1===v.writable||!l(h))return!1;if(c=i.f(h,e)){if(c.get||c.set||!1===c.writable)return!1;c.value=n,o.f(h,e,c)}else o.f(h,e,a(0,n));return!0}return void 0!==v.set&&(v.set.call(h,n),!0)}var o=n(7),i=n(16),s=n(17),u=n(14),c=n(0),a=n(35),f=n(1),l=n(4);c(c.S,"Reflect",{set:r})},function(t,e,n){"use strict";var r=n(0),o=n(85);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(0),o=n(59)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(34)("includes")},function(t,e,n){"use strict";var r=n(0),o=n(147),i=n(9),s=n(8),u=n(10),c=n(99);r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return u(t),e=s(r.length),n=c(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),n(34)("flatMap")},function(t,e,n){"use strict";var r=n(0),o=n(147),i=n(9),s=n(8),u=n(24),c=n(99);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=i(this),n=s(e.length),r=c(e,0);return o(r,e,e,n,0,void 0===t?1:u(t)),r}}),n(34)("flatten")},function(t,e,n){"use strict";var r=n(0),o=n(91)(!0);r(r.P,"String",{at:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(0),o=n(148),i=n(67);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var r=n(0),o=n(148),i=n(67);r(r.P+r.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(i),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(47)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(47)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(0),o=n(23),i=n(8),s=n(62),u=n(64),c=RegExp.prototype,a=function(t,e){this._r=t,this._s=e};n(93)(a,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(o(this),!s(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in c?String(t.flags):u.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(t.lastIndex),new a(r,e)}})},function(t,e,n){"use strict";n(81)("asyncIterator")},function(t,e,n){"use strict";n(81)("observable")},function(t,e,n){"use strict";var r=n(0),o=n(146),i=n(15),s=n(16),u=n(97);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=s.f,a=o(r),f={},l=0;a.length>l;)void 0!==(n=c(r,e=a[l++]))&&u(f,e,n);return f}})},function(t,e,n){"use strict";var r=n(0),o=n(149)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){"use strict";var r=n(0),o=n(149)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";var r=n(0),o=n(9),i=n(10),s=n(7);n(6)&&r(r.P+n(70),"Object",{__defineGetter__:function(t,e){s.f(o(this),t,{get:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),o=n(9),i=n(10),s=n(7);n(6)&&r(r.P+n(70),"Object",{__defineSetter__:function(t,e){s.f(o(this),t,{set:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),o=n(9),i=n(22),s=n(17),u=n(16).f;n(6)&&r(r.P+n(70),"Object",{__lookupGetter__:function(t){var e,n=o(this),r=i(t,!0);do{if(e=u(n,r))return e.get}while(n=s(n))}})},function(t,e,n){"use strict";var r=n(0),o=n(9),i=n(22),s=n(17),u=n(16).f;n(6)&&r(r.P+n(70),"Object",{__lookupSetter__:function(t){var e,n=o(this),r=i(t,!0);do{if(e=u(n,r))return e.set}while(n=s(n))}})},function(t,e,n){"use strict";var r=n(0);r(r.P+r.R,"Map",{toJSON:n(150)("Map")})},function(t,e,n){"use strict";var r=n(0);r(r.P+r.R,"Set",{toJSON:n(150)("Set")})},function(t,e,n){"use strict";n(71)("Map")},function(t,e,n){"use strict";n(71)("Set")},function(t,e,n){"use strict";n(71)("WeakMap")},function(t,e,n){"use strict";n(71)("WeakSet")},function(t,e,n){"use strict";n(72)("Map")},function(t,e,n){"use strict";n(72)("Set")},function(t,e,n){"use strict";n(72)("WeakMap")},function(t,e,n){"use strict";n(72)("WeakSet")},function(t,e,n){"use strict";var r=n(0);r(r.G,{global:n(2)})},function(t,e,n){"use strict";var r=n(0);r(r.S,"System",{global:n(2)})},function(t,e,n){"use strict";var r=n(0),o=n(20);r(r.S,"Error",{isError:function(t){return"Error"===o(t)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){"use strict";var r=n(0),o=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*o}})},function(t,e,n){"use strict";var r=n(0),o=n(152),i=n(132);r(r.S,"Math",{fscale:function(t,e,n,r,s){return i(o(t,e,n,r,s))}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{iaddh:function(t,e,n,r){var o=t>>>0,i=e>>>0,s=n>>>0;return i+(r>>>0)+((o&s|(o|s)&~(o+s>>>0))>>>31)|0}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{isubh:function(t,e,n,r){var o=t>>>0,i=e>>>0,s=n>>>0;return i-(r>>>0)-((~o&s|~(o^s)&o-s>>>0)>>>31)|0}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r,s=n>>16,u=r>>16,c=(s*i>>>0)+(o*i>>>16);return s*u+(c>>16)+((o*u>>>0)+(65535&c)>>16)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){"use strict";var r=n(0),o=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*o}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{scale:n(152)})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r,s=n>>>16,u=r>>>16,c=(s*i>>>0)+(o*i>>>16);return s*u+(c>>>16)+((o*u>>>0)+(65535&c)>>>16)}})},function(t,e,n){"use strict";var r=n(0);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(0),o=n(18),i=n(2),s=n(66),u=n(139);r(r.P+r.R,"Promise",{finally:function(t){var e=s(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then(function(){return n})}:t,n?function(n){return u(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(0),o=n(104),i=n(138);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=r.key,s=r.set;r.exp({defineMetadata:function(t,e,n,r){s(t,e,o(n),i(r))}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=r.key,s=r.map,u=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:i(arguments[2]),r=s(o(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var c=u.get(e);return c.delete(n),!!c.size||u.delete(e)}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=n(17),s=r.has,u=r.get,c=r.key,a=function t(e,n,r){if(s(e,n,r))return u(e,n,r);var o=i(n);return null!==o?t(e,o,r):void 0};r.exp({getMetadata:function(t,e){return a(t,o(e),arguments.length<3?void 0:c(arguments[2]))}})},function(t,e,n){"use strict";var r=n(142),o=n(151),i=n(28),s=n(1),u=n(17),c=i.keys,a=i.key,f=function t(e,n){var i=c(e,n),s=u(e);if(null===s)return i;var a=t(s,n);return a.length?i.length?o(new r(i.concat(a))):a:i};i.exp({getMetadataKeys:function(t){return f(s(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=r.get,s=r.key;r.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=r.keys,s=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:s(arguments[1]))}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=n(17),s=r.has,u=r.key,c=function t(e,n,r){if(s(e,n,r))return!0;var o=i(n);return null!==o&&t(e,o,r)};r.exp({hasMetadata:function(t,e){return c(t,o(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=r.has,s=r.key;r.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){"use strict";var r=n(28),o=n(1),i=n(10),s=r.key,u=r.set;r.exp({metadata:function(t,e){return function(n,r){u(t,e,(void 0!==r?o:i)(n),s(r))}}})},function(t,e,n){"use strict";var r=n(0),o=n(103)(),i=n(2).process,s="process"==n(20)(i);r(r.G,{asap:function(t){var e=s&&i.domain;o(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(18),s=n(103)(),u=n(5)("observable"),c=n(10),a=n(1),f=n(42),l=n(44),p=n(11),h=n(43),v=h.RETURN,y=function(t){return null==t?void 0:c(t)},d=function(t){var e=t._c;e&&(t._c=void 0,e())},b=function(t){return void 0===t._o},g=function(t){b(t)||(t._o=void 0,d(t))},m=function(t,e){a(t),this._c=void 0,this._o=t,t=new w(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:c(n),this._c=n)}catch(e){return void t.error(e)}b(this)&&d(this)};m.prototype=l({},{unsubscribe:function(){g(this)}});var w=function(t){this._s=t};w.prototype=l({},{next:function(t){var e=this._s;if(!b(e)){var n=e._o;try{var r=y(n.next);if(r)return r.call(n,t)}catch(t){try{g(e)}finally{throw t}}}},error:function(t){var e=this._s;if(b(e))throw t;var n=e._o;e._o=void 0;try{var r=y(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{d(e)}finally{throw t}}return d(e),t},complete:function(t){var e=this._s;if(!b(e)){var n=e._o;e._o=void 0;try{var r=y(n.complete);t=r?r.call(n,t):void 0}catch(t){try{d(e)}finally{throw t}}return d(e),t}}});var x=function(t){f(this,x,"Observable","_f")._f=c(t)};l(x.prototype,{subscribe:function(t){return new m(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(n,r){c(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:n})})}}),l(x,{from:function(t){var e="function"==typeof this?this:x,n=y(a(t)[u]);if(n){var r=a(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return s(function(){if(!n){try{if(h(t,!1,function(t){if(e.next(t),n)return v})===v)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:x)(function(t){var e=!1;return s(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),p(x.prototype,u,function(){return this}),r(r.G,{Observable:x}),n(41)("Observable")},function(t,e,n){"use strict";var r=n(2),o=n(0),i=n(67),s=[].slice,u=/MSIE .\./.test(i),c=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&s.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){"use strict";var r=n(0),o=n(102);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){"use strict";for(var r=n(101),o=n(37),i=n(12),s=n(2),u=n(11),c=n(48),a=n(5),f=a("iterator"),l=a("toStringTag"),p=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(h),y=0;y<v.length;y++){var d,b=v[y],g=h[b],m=s[b],w=m&&m.prototype;if(w&&(w[f]||u(w,f,p),w[l]||u(w,l,b),c[b]=p,g))for(d in r)w[d]||i(w,d,r[d],!0)}},function(t,e,n){"use strict";(function(t,e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){function r(t,e,n,r){var o=e&&e.prototype instanceof i?e:i,s=Object.create(o.prototype),u=new v(r||[]);return s._invoke=f(t,n,u),s}function o(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function i(){}function s(){}function u(){}function c(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function a(e){function r(t,i,s,u){var c=o(e[t],e,i);if("throw"!==c.type){var a=c.arg,f=a.value;return f&&"object"===(void 0===f?"undefined":n(f))&&m.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,s,u)},function(t){r("throw",t,s,u)}):Promise.resolve(f).then(function(t){a.value=t,s(a)},u)}u(c.arg)}function i(t,e){function n(){return new Promise(function(n,o){r(t,e,n,o)})}return s=s?s.then(n,n):n()}"object"===n(t.process)&&t.process.domain&&(r=t.process.domain.bind(r));var s;this._invoke=i}function f(t,e,n){var r=P;return function(i,s){if(r===A)throw new Error("Generator is already running");if(r===T){if("throw"===i)throw s;return d()}for(n.method=i,n.arg=s;;){var u=n.delegate;if(u){var c=l(u,n);if(c){if(c===M)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===P)throw r=T,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=A;var a=o(t,e,n);if("normal"===a.type){if(r=n.done?T:E,a.arg===M)continue;return{value:a.arg,done:n.done}}"throw"===a.type&&(r=T,n.method="throw",n.arg=a.arg)}}}function l(t,e){var n=t.iterator[e.method];if(n===b){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=b,l(t,e),"throw"===e.method))return M;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return M}var r=o(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,M;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=b),e.delegate=null,M):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,M)}function p(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function h(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function v(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(p,this),this.reset(!0)}function y(t){if(t){var e=t[x];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(m.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=b,e.done=!0,e};return r.next=r}}return{next:d}}function d(){return{value:b,done:!0}}var b,g=Object.prototype,m=g.hasOwnProperty,w="function"==typeof Symbol?Symbol:{},x=w.iterator||"@@iterator",_=w.asyncIterator||"@@asyncIterator",S=w.toStringTag||"@@toStringTag",O="object"===n(e),j=t.regeneratorRuntime;if(j)return void(O&&(e.exports=j));j=t.regeneratorRuntime=O?e.exports:{},j.wrap=r;var P="suspendedStart",E="suspendedYield",A="executing",T="completed",M={},k={};k[x]=function(){return this};var F=Object.getPrototypeOf,I=F&&F(F(y([])));I&&I!==g&&m.call(I,x)&&(k=I);var R=u.prototype=i.prototype=Object.create(k);s.prototype=R.constructor=u,u.constructor=s,u[S]=s.displayName="GeneratorFunction",j.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===s||"GeneratorFunction"===(e.displayName||e.name))},j.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,S in t||(t[S]="GeneratorFunction")),t.prototype=Object.create(R),t},j.awrap=function(t){return{__await:t}},c(a.prototype),a.prototype[_]=function(){return this},j.AsyncIterator=a,j.async=function(t,e,n,o){var i=new a(r(t,e,n,o));return j.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},c(R),R[S]="Generator",R[x]=function(){return this},R.toString=function(){return"[object Generator]"},j.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},j.values=y,v.prototype={constructor:v,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(h),!t)for(var e in this)"t"===e.charAt(0)&&m.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=b)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){function e(e,r){return i.type="throw",i.arg=t,n.next=e,r&&(n.method="next",n.arg=b),!!r}if(this.done)throw t;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var s=m.call(o,"catchLoc"),u=m.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,M):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),M},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),M}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:y(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=b),M}}}("object"===(void 0===t?"undefined":n(t))?t:"object"===("undefined"==typeof window?"undefined":n(window))?window:"object"===("undefined"==typeof self?"undefined":n(self))?self:void 0)}).call(e,n(57),n(73)(t))},function(t,e,n){"use strict";n(378),t.exports=n(18).RegExp.escape},function(t,e,n){"use strict";var r=n(0),o=n(379)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return o(t)}})},function(t,e,n){"use strict";t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(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 s(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)}function u(t){var e={};e.source=t.constructSource((0,E.isSupported)())();var n=t.get("autoplay");return e.autoPlay=!1!==n,e.authToken=t.get("authToken"),e.logo=t.get("logo"),e.poster=t.get("poster"),e.playback||(e.playback={}),e.playback.hlsjsConfig||(e.playback.hlsjsConfig={manifestLoadingTimeOut:2e4,manifestLoadingMaxRetry:3,maxBufferSize:5e5,maxBufferLength:5,maxMaxBufferLength:5}),!1!==e.autorestart&&(e.events||(e.events={}),e.playback.manifestLoadingMaxRetry||(e.playback.manifestLoadingMaxRetry=5)),e.clapprStats||(e.clapprStats={}),e.clapprStats.runEach||(e.clapprStats.runEach=5e3),e.debug&&console.info("options",e),e}function c(t,e){var n=e.get("isVideoPoster"),r=a({},t);return r.plugins||(r.plugins=[]),r.logo&&r.plugins.push(x.default),n?r.plugins.push(b.default):r.plugins.push(m.default),r.plugins.push(E.MSELD),r.plugins.push(A.VideoThumbnails),r.plugins.push(h.default),r.plugins.push(M.default),r.plugins.push(M.default),0===r.volume||r.autoPlay&&l.Browser.isChrome?r.mute=!0:r.volume>0&&r.plugins.push(S.default),r.eventLog&&r.plugins.push(P.default),r}var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=n(29),p=n(381),h=r(p),v=n(382),y=r(v),d=n(486),b=r(d),g=n(491),m=r(g),w=n(493),x=r(w),_=n(496),S=r(_),O=n(497),j=(r(O),n(498)),P=r(j),E=n(499),A=n(502),T=n(503),M=r(T),k=n(116),F=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(k),I=function(t){function e(n){o(this,e);var r=new y.default(n),s=u(r),f=a({},n,s),l=f.clapprStats?f.clapprStats.onReport:null;f.clapprStats.onReport=function(t){p.metrics=t,r.get("debug")&&console.log(t),l&&l(t)},f.events.onError||(f.events.onError=function(t){return console.error(t)}),f=c(f,r);var p=i(this,t.call(this,f));if(r.get("play_duration")){var h=parseInt(r.get("play_duration"),10);setTimeout(function(){return p.stop()},1e3*h)}return p}return s(e,t),e.parseUrl=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return F.makeOpts(t,n)},f(e,[{key:"name",get:function(){return"flussonic"}}]),e}(l.Player);I.FlasHLS=l.FlasHLS,I.ClapprPlayer=l.Player,t.exports=I},function(t,n){t.exports=e},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(383),s=function(t){return t&&t.__esModule?t:{default:t}}(i),u=n(116),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(u),a=function t(e){r(this,t);var n=c.getWhitelist(e),i=c.getToken(e),u=c.getDuration(e),a=c.getPosterOts(e),f=o({},e,a,{duration:u},{authToken:i}),l=(0,s.default)(f,function(t){return void 0!==t});this.get=c.get(l,n).bind(this),this.constructSource=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return c.getSource(l,t)}};e.default=a,t.exports=e.default},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n=o(u(t),function(t){return[t]});return e=i(e),s(t,n,function(t,n){return e(t,n[0])})}var o=n(153),i=n(384),s=n(455),u=n(460);t.exports=r},function(t,e,n){"use strict";function r(t){return"function"==typeof t?t:null==t?u:"object"==(void 0===t?"undefined":o(t))?c(t)?s(t[0],t[1]):i(t):a(t)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(385),s=n(442),u=n(172),c=n(31),a=n(452);t.exports=r},function(t,e,n){"use strict";function r(t){var e=i(t);return 1==e.length&&e[0][2]?s(e[0][0],e[0][1]):function(n){return n===t||o(n,t,e)}}var o=n(386),i=n(441),s=n(171);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){var c=n.length,a=c,f=!r;if(null==t)return!a;for(t=Object(t);c--;){var l=n[c];if(f&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++c<a;){l=n[c];var p=l[0],h=t[p],v=l[1];if(f&&l[2]){if(void 0===h&&!(p in t))return!1}else{var y=new o;if(r)var d=r(h,v,p,t,e,y);if(!(void 0===d?i(v,h,s|u,r,y):d))return!1}}return!0}var o=n(154),i=n(158),s=1,u=2;t.exports=r},function(t,e,n){"use strict";function r(){this.__data__=[],this.size=0}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,n=o(e,t);return!(n<0)&&(n==e.length-1?e.pop():s.call(e,n,1),--this.size,!0)}var o=n(75),i=Array.prototype,s=i.splice;t.exports=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}var o=n(75);t.exports=r},function(t,e,n){"use strict";function r(t){return o(this.__data__,t)>-1}var o=n(75);t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var o=n(75);t.exports=r},function(t,e,n){"use strict";function r(){this.__data__=new o,this.size=0}var o=n(74);t.exports=r},function(t,e,n){"use strict";function r(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=r},function(t,e,n){"use strict";function r(t){return this.__data__.get(t)}t.exports=r},function(t,e,n){"use strict";function r(t){return this.__data__.has(t)}t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.length<u-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new s(r)}return n.set(t,e),this.size=n.size,this}var o=n(74),i=n(107),s=n(108),u=200;t.exports=r},function(t,e,n){"use strict";function r(t){return!(!s(t)||i(t))&&(o(t)?v:a).test(u(t))}var o=n(155),i=n(400),s=n(54),u=n(157),c=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,f=Function.prototype,l=Object.prototype,p=f.toString,h=l.hasOwnProperty,v=RegExp("^"+p.call(h).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,e,n){"use strict";function r(t){var e=s.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[c]=n:delete t[c]),o}var o=n(76),i=Object.prototype,s=i.hasOwnProperty,u=i.toString,c=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){"use strict";function r(t){return i.call(t)}var o=Object.prototype,i=o.toString;t.exports=r},function(t,e,n){"use strict";function r(t){return!!i&&i in t}var o=n(401),i=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=r},function(t,e,n){"use strict";var r=n(30),o=r["__core-js_shared__"];t.exports=o},function(t,e,n){"use strict";function r(t,e){return null==t?void 0:t[e]}t.exports=r},function(t,e,n){"use strict";function r(){this.size=0,this.__data__={hash:new o,map:new(s||i),string:new o}}var o=n(404),i=n(74),s=n(107);t.exports=r},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var o=n(405),i=n(406),s=n(407),u=n(408),c=n(409);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,t.exports=r},function(t,e,n){"use strict";function r(){this.__data__=o?o(null):{},this.size=0}var o=n(77);t.exports=r},function(t,e,n){"use strict";function r(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this.__data__;if(o){var n=e[t];return n===i?void 0:n}return u.call(e,t)?e[t]:void 0}var o=n(77),i="__lodash_hash_undefined__",s=Object.prototype,u=s.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";function r(t){var e=this.__data__;return o?void 0!==e[t]:s.call(e,t)}var o=n(77),i=Object.prototype,s=i.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?i:e,this}var o=n(77),i="__lodash_hash_undefined__";t.exports=r},function(t,e,n){"use strict";function r(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}var o=n(78);t.exports=r},function(t,e,n){"use strict";function r(t){var e=void 0===t?"undefined":o(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e,n){"use strict";function r(t){return o(this,t).get(t)}var o=n(78);t.exports=r},function(t,e,n){"use strict";function r(t){return o(this,t).has(t)}var o=n(78);t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var o=n(78);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,d,g){var m=a(t),w=a(e),x=m?v:c(t),_=w?v:c(e);x=x==h?y:x,_=_==h?y:_;var S=x==y,O=_==y,j=x==_;if(j&&f(t)){if(!f(e))return!1;m=!0,S=!1}if(j&&!S)return g||(g=new o),m||l(t)?i(t,e,n,r,d,g):s(t,e,x,n,r,d,g);if(!(n&p)){var P=S&&b.call(t,"__wrapped__"),E=O&&b.call(e,"__wrapped__");if(P||E){var A=P?t.value():t,T=E?e.value():e;return g||(g=new o),d(A,T,n,r,g)}}return!!j&&(g||(g=new o),u(t,e,n,r,d,g))}var o=n(154),i=n(159),s=n(421),u=n(425),c=n(436),a=n(31),f=n(166),l=n(167),p=1,h="[object Arguments]",v="[object Array]",y="[object Object]",d=Object.prototype,b=d.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new o;++e<n;)this.add(t[e])}var o=n(108),i=n(417),s=n(418);r.prototype.add=r.prototype.push=i,r.prototype.has=s,t.exports=r},function(t,e,n){"use strict";function r(t){return this.__data__.set(t,o),this}var o="__lodash_hash_undefined__";t.exports=r},function(t,e,n){"use strict";function r(t){return this.__data__.has(t)}t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}t.exports=r},function(t,e,n){"use strict";function r(t,e){return t.has(e)}t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,o,S,j){switch(n){case _:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case x:return!(t.byteLength!=e.byteLength||!S(new i(t),new i(e)));case p:case h:case d:return s(+t,+e);case v:return t.name==e.name&&t.message==e.message;case b:case m:return t==e+"";case y:var P=c;case g:var E=r&f;if(P||(P=a),t.size!=e.size&&!E)return!1;var A=j.get(t);if(A)return A==e;r|=l,j.set(t,e);var T=u(P(t),P(e),r,o,S,j);return j.delete(t),T;case w:if(O)return O.call(t)==O.call(e)}return!1}var o=n(76),i=n(422),s=n(106),u=n(159),c=n(423),a=n(424),f=1,l=2,p="[object Boolean]",h="[object Date]",v="[object Error]",y="[object Map]",d="[object Number]",b="[object RegExp]",g="[object Set]",m="[object String]",w="[object Symbol]",x="[object ArrayBuffer]",_="[object DataView]",S=o?o.prototype:void 0,O=S?S.valueOf:void 0;t.exports=r},function(t,e,n){"use strict";var r=n(30),o=r.Uint8Array;t.exports=o},function(t,e,n){"use strict";function r(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}t.exports=r},function(t,e,n){"use strict";function r(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,s,c){var a=n&i,f=o(t),l=f.length;if(l!=o(e).length&&!a)return!1;for(var p=l;p--;){var h=f[p];if(!(a?h in e:u.call(e,h)))return!1}var v=c.get(t);if(v&&c.get(e))return v==e;var y=!0;c.set(t,e),c.set(e,t);for(var d=a;++p<l;){h=f[p];var b=t[h],g=e[h];if(r)var m=a?r(g,b,h,e,t,c):r(b,g,h,t,e,c);if(!(void 0===m?b===g||s(b,g,n,r,c):m)){y=!1;break}d||(d="constructor"==h)}if(y&&!d){var w=t.constructor,x=e.constructor;w!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x)&&(y=!1)}return c.delete(t),c.delete(e),y}var o=n(426),i=1,s=Object.prototype,u=s.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";function r(t){return o(t,s,i)}var o=n(160),i=n(162),s=n(109);t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}t.exports=r},function(t,e,n){"use strict";function r(t){return i(t)&&o(t)==s}var o=n(53),i=n(55),s="[object Arguments]";t.exports=r},function(t,e,n){"use strict";function r(){return!1}t.exports=r},function(t,e,n){"use strict";function r(t){return s(t)&&i(t.length)&&!!u[o(t)]}var o=n(53),i=n(111),s=n(55),u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u["[object Arguments]"]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u["[object Map]"]=u["[object Number]"]=u["[object Object]"]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1,t.exports=r},function(t,e,n){"use strict";function r(t){return function(e){return t(e)}}t.exports=r},function(t,e,n){"use strict";(function(t){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(156),i="object"==r(e)&&e&&!e.nodeType&&e,s=i&&"object"==r(t)&&t&&!t.nodeType&&t,u=s&&s.exports===i,c=u&&o.process,a=function(){try{var t=s&&s.require&&s.require("util").types;return t||c&&c.binding&&c.binding("util")}catch(t){}}();t.exports=a}).call(e,n(73)(t))},function(t,e,n){"use strict";function r(t){if(!o(t))return i(t);var e=[];for(var n in Object(t))u.call(t,n)&&"constructor"!=n&&e.push(n);return e}var o=n(168),i=n(435),s=Object.prototype,u=s.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";var r=n(169),o=r(Object.keys,Object);t.exports=o},function(t,e,n){"use strict";var r=n(437),o=n(107),i=n(438),s=n(439),u=n(440),c=n(53),a=n(157),f=a(r),l=a(o),p=a(i),h=a(s),v=a(u),y=c;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=y(new o)||i&&"[object Promise]"!=y(i.resolve())||s&&"[object Set]"!=y(new s)||u&&"[object WeakMap]"!=y(new u))&&(y=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?a(n):"";if(r)switch(r){case f:return"[object DataView]";case l:return"[object Map]";case p:return"[object Promise]";case h:return"[object Set]";case v:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){"use strict";var r=n(45),o=n(30),i=r(o,"DataView");t.exports=i},function(t,e,n){"use strict";var r=n(45),o=n(30),i=r(o,"Promise");t.exports=i},function(t,e,n){"use strict";var r=n(45),o=n(30),i=r(o,"Set");t.exports=i},function(t,e,n){"use strict";var r=n(45),o=n(30),i=r(o,"WeakMap");t.exports=i},function(t,e,n){"use strict";function r(t){for(var e=i(t),n=e.length;n--;){var r=e[n],s=t[r];e[n]=[r,s,o(s)]}return e}var o=n(170),i=n(109);t.exports=r},function(t,e,n){"use strict";function r(t,e){return u(t)&&c(e)?a(f(t),e):function(n){var r=i(n,t);return void 0===r&&r===e?s(n,t):o(e,r,l|p)}}var o=n(158),i=n(443),s=n(449),u=n(114),c=n(170),a=n(171),f=n(56),l=1,p=2;t.exports=r},function(t,e,n){"use strict";function r(t,e,n){var r=null==t?void 0:o(t,e);return void 0===r?n:r}var o=n(113);t.exports=r},function(t,e,n){"use strict";var r=n(445),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=r(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)}),e});t.exports=s},function(t,e,n){"use strict";function r(t){var e=o(t,function(t){return n.size===i&&n.clear(),t}),n=e.cache;return e}var o=n(446),i=500;t.exports=r},function(t,e,n){"use strict";function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var n=function n(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(r.Cache||o),n}var o=n(108),i="Expected a function";r.Cache=o,t.exports=r},function(t,e,n){"use strict";function r(t){return null==t?"":o(t)}var o=n(448);t.exports=r},function(t,e,n){"use strict";function r(t){if("string"==typeof t)return t;if(s(t))return i(t,r)+"";if(u(t))return f?f.call(t):"";var e=t+"";return"0"==e&&1/t==-c?"-0":e}var o=n(76),i=n(153),s=n(31),u=n(115),c=1/0,a=o?o.prototype:void 0,f=a?a.toString:void 0;t.exports=r},function(t,e,n){"use strict";function r(t,e){return null!=t&&i(t,e,o)}var o=n(450),i=n(451);t.exports=r},function(t,e,n){"use strict";function r(t,e){return null!=t&&e in Object(t)}t.exports=r},function(t,e,n){"use strict";function r(t,e,n){e=o(e,t);for(var r=-1,f=e.length,l=!1;++r<f;){var p=a(e[r]);if(!(l=null!=t&&n(t,p)))break;t=t[p]}return l||++r!=f?l:!!(f=null==t?0:t.length)&&c(f)&&u(p,f)&&(s(t)||i(t))}var o=n(79),i=n(165),s=n(31),u=n(110),c=n(111),a=n(56);t.exports=r},function(t,e,n){"use strict";function r(t){return s(t)?o(u(t)):i(t)}var o=n(453),i=n(454),s=n(114),u=n(56);t.exports=r},function(t,e,n){"use strict";function r(t){return function(e){return null==e?void 0:e[t]}}t.exports=r},function(t,e,n){"use strict";function r(t){return function(e){return o(e,t)}}var o=n(113);t.exports=r},function(t,e,n){"use strict";function r(t,e,n){for(var r=-1,u=e.length,c={};++r<u;){var a=e[r],f=o(t,a);n(f,a)&&i(c,s(a,t),f)}return c}var o=n(113),i=n(456),s=n(79);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){if(!u(t))return t;e=i(e,t);for(var a=-1,f=e.length,l=f-1,p=t;null!=p&&++a<f;){var h=c(e[a]),v=n;if(a!=l){var y=p[h];v=r?r(y,h,p):void 0,void 0===v&&(v=u(y)?y:s(e[a+1])?[]:{})}o(p,h,v),p=p[h]}return t}var o=n(457),i=n(79),s=n(110),u=n(54),c=n(56);t.exports=r},function(t,e,n){"use strict";function r(t,e,n){var r=t[e];u.call(t,e)&&i(r,n)&&(void 0!==n||e in t)||o(t,e,n)}var o=n(458),i=n(106),s=Object.prototype,u=s.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";function r(t,e,n){"__proto__"==e&&o?o(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var o=n(459);t.exports=r},function(t,e,n){"use strict";var r=n(45),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){"use strict";function r(t){return o(t,s,i)}var o=n(160),i=n(461),s=n(463);t.exports=r},function(t,e,n){"use strict";var r=n(161),o=n(462),i=n(162),s=n(163),u=Object.getOwnPropertySymbols,c=u?function(t){for(var e=[];t;)r(e,i(t)),t=o(t);return e}:s;t.exports=c},function(t,e,n){"use strict";var r=n(169),o=r(Object.getPrototypeOf,Object);t.exports=o},function(t,e,n){"use strict";function r(t){return s(t)?o(t,!0):i(t)}var o=n(164),i=n(464),s=n(112);t.exports=r},function(t,e,n){"use strict";function r(t){if(!o(t))return s(t);var e=i(t),n=[];for(var r in t)("constructor"!=r||!e&&c.call(t,r))&&n.push(r);return n}var o=n(54),i=n(168),s=n(465),u=Object.prototype,c=u.hasOwnProperty;t.exports=r},function(t,e,n){"use strict";function r(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.url;if(void 0!==e){var n=t._parsedUrl;return s(e,n)?n:(n=i(e),n._raw=e,t._parsedUrl=n)}}function o(t){var e=t.originalUrl;if("string"!=typeof e)return r(t);var n=t._parsedOriginalUrl;return s(e,n)?n:(n=i(e),n._raw=e,t._parsedOriginalUrl=n)}function i(t){if("string"!=typeof t||47!==t.charCodeAt(0))return a(t);for(var e=t,n=null,r=null,o=1;o<t.length;o++)switch(t.charCodeAt(o)){case 63:null===r&&(e=t.substring(0,o),n=t.substring(o+1),r=t.substring(o));break;case 9:case 10:case 12:case 13:case 32:case 35:case 160:case 65279:return a(t)}var i=void 0!==f?new f:{};return i.path=t,i.href=t,i.pathname=e,i.query=n,i.search=r,i}function s(t,e){return"object"===(void 0===e?"undefined":u(e))&&null!==e&&(void 0===f||e instanceof f)&&e._raw===t}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=n(467),a=c.parse,f=c.Url;t.exports=r,t.exports.original=o},function(t,e,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(t,e,n){if(t&&f.isObject(t)&&t instanceof r)return t;var o=new r;return o.parse(t,e,n),o}function i(t){return f.isString(t)&&(t=o(t)),t instanceof r?t.format():r.prototype.format.call(t)}function s(t,e){return o(t,!1,!0).resolve(e)}function u(t,e){return t?o(t,!1,!0).resolveObject(e):e}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=n(468),f=n(469);e.parse=o,e.resolve=s,e.resolveObject=u,e.format=i,e.Url=r;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,v=["<",">",'"',"`"," ","\r","\n","\t"],y=["{","}","|","\\","^","`"].concat(v),d=["'"].concat(y),b=["%","/","?",";","#"].concat(d),g=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=n(470);r.prototype.parse=function(t,e,n){if(!f.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+(void 0===t?"undefined":c(t)));var r=t.indexOf("?"),o=-1!==r&&r<t.indexOf("#")?"?":"#",i=t.split(o),s=/\\/g;i[0]=i[0].replace(s,"/"),t=i.join(o);var u=t;if(u=u.trim(),!n&&1===t.split("#").length){var p=h.exec(u);if(p)return this.path=u,this.href=u,this.pathname=p[1],p[2]?(this.search=p[2],this.query=e?O.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var v=l.exec(u);if(v){v=v[0];var y=v.toLowerCase();this.protocol=y,u=u.substr(v.length)}if(n||v||u.match(/^\/\/[^@\/]+@[^@\/]+/)){var j="//"===u.substr(0,2);!j||v&&_[v]||(u=u.substr(2),this.slashes=!0)}if(!_[v]&&(j||v&&!S[v])){for(var P=-1,E=0;E<g.length;E++){var A=u.indexOf(g[E]);-1!==A&&(-1===P||A<P)&&(P=A)}var T,M;M=-1===P?u.lastIndexOf("@"):u.lastIndexOf("@",P),-1!==M&&(T=u.slice(0,M),u=u.slice(M+1),this.auth=decodeURIComponent(T)),P=-1;for(var E=0;E<b.length;E++){var A=u.indexOf(b[E]);-1!==A&&(-1===P||A<P)&&(P=A)}-1===P&&(P=u.length),this.host=u.slice(0,P),u=u.slice(P),this.parseHost(),this.hostname=this.hostname||"";var k="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!k)for(var F=this.hostname.split(/\./),E=0,I=F.length;E<I;E++){var R=F[E];if(R&&!R.match(m)){for(var C="",L=0,N=R.length;L<N;L++)R.charCodeAt(L)>127?C+="x":C+=R[L];if(!C.match(m)){var B=F.slice(0,E),U=F.slice(E+1),D=R.match(w);D&&(B.push(D[1]),U.unshift(D[2])),U.length&&(u="/"+U.join(".")+u),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),k||(this.hostname=a.toASCII(this.hostname));var z=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+z,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!x[y])for(var E=0,I=d.length;E<I;E++){var $=d[E];if(-1!==u.indexOf($)){var V=encodeURIComponent($);V===$&&(V=escape($)),u=u.split($).join(V)}}var q=u.indexOf("#");-1!==q&&(this.hash=u.substr(q),u=u.slice(0,q));var G=u.indexOf("?");if(-1!==G?(this.search=u.substr(G),this.query=u.substr(G+1),e&&(this.query=O.parse(this.query)),u=u.slice(0,G)):e&&(this.search="",this.query={}),u&&(this.pathname=u),S[y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var z=this.pathname||"",K=this.search||"";this.path=z+K}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&f.isObject(this.query)&&Object.keys(this.query).length&&(i=O.stringify(this.query));var s=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||S[e])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+o+n+s+r},r.prototype.resolve=function(t){return this.resolveObject(o(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(f.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var n=new r,o=Object.keys(this),i=0;i<o.length;i++){var s=o[i];n[s]=this[s]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var a=u[c];"protocol"!==a&&(n[a]=t[a])}return S[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!S[t.protocol]){for(var l=Object.keys(t),p=0;p<l.length;p++){var h=l[p];n[h]=t[h]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||_[t.protocol])n.pathname=t.pathname;else{for(var v=(t.pathname||"").split("/");v.length&&!(t.host=v.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==v[0]&&v.unshift(""),v.length<2&&v.unshift(""),n.pathname=v.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var y=n.pathname||"",d=n.search||"";n.path=y+d}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),g=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=g||b||n.host&&t.pathname,w=m,x=n.pathname&&n.pathname.split("/")||[],v=t.pathname&&t.pathname.split("/")||[],O=n.protocol&&!S[n.protocol];if(O&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===v[0]?v[0]=t.host:v.unshift(t.host)),t.host=null),m=m&&(""===v[0]||""===x[0])),g)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,x=v;else if(v.length)x||(x=[]),x.pop(),x=x.concat(v),n.search=t.search,n.query=t.query;else if(!f.isNullOrUndefined(t.search)){if(O){n.hostname=n.host=x.shift();var j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");j&&(n.auth=j.shift(),n.host=n.hostname=j.shift())}return n.search=t.search,n.query=t.query,f.isNull(n.pathname)&&f.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var P=x.slice(-1)[0],E=(n.host||t.host||x.length>1)&&("."===P||".."===P)||""===P,A=0,T=x.length;T>=0;T--)P=x[T],"."===P?x.splice(T,1):".."===P?(x.splice(T,1),A++):A&&(x.splice(T,1),A--);if(!m&&!w)for(;A--;A)x.unshift("..");!m||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),E&&"/"!==x.join("/").substr(-1)&&x.push("");var M=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(O){n.hostname=n.host=M?"":x.length?x.shift():"";var j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");j&&(n.auth=j.shift(),n.host=n.hostname=j.shift())}return m=m||n.host&&x.length,m&&!M&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),f.isNull(n.pathname)&&f.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=p.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";(function(t,r){var o,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(s){function u(t){throw new RangeError(L[t])}function c(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function a(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(C,"."),r+c(t.split("."),e).join(".")}function f(t){for(var e,n,r=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function l(t){return c(t,function(t){var e="";return t>65535&&(t-=65536,e+=U(t>>>10&1023|55296),t=56320|1023&t),e+=U(t)}).join("")}function p(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:j}function h(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function v(t,e,n){var r=0;for(t=n?B(t/T):t>>1,t+=B(t/e);t>N*E>>1;r+=j)t=B(t/N);return B(r+(N+1)*t/(t+A))}function y(t){var e,n,r,o,i,s,c,a,f,h,y=[],d=t.length,b=0,g=k,m=M;for(n=t.lastIndexOf(F),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&u("not-basic"),y.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<d;){for(i=b,s=1,c=j;o>=d&&u("invalid-input"),a=p(t.charCodeAt(o++)),(a>=j||a>B((O-b)/s))&&u("overflow"),b+=a*s,f=c<=m?P:c>=m+E?E:c-m,!(a<f);c+=j)h=j-f,s>B(O/h)&&u("overflow"),s*=h;e=y.length+1,m=v(b-i,e,0==i),B(b/e)>O-g&&u("overflow"),g+=B(b/e),b%=e,y.splice(b++,0,g)}return l(y)}function d(t){var e,n,r,o,i,s,c,a,l,p,y,d,b,g,m,w=[];for(t=f(t),d=t.length,e=k,n=0,i=M,s=0;s<d;++s)(y=t[s])<128&&w.push(U(y));for(r=o=w.length,o&&w.push(F);r<d;){for(c=O,s=0;s<d;++s)(y=t[s])>=e&&y<c&&(c=y);for(b=r+1,c-e>B((O-n)/b)&&u("overflow"),n+=(c-e)*b,e=c,s=0;s<d;++s)if(y=t[s],y<e&&++n>O&&u("overflow"),y==e){for(a=n,l=j;p=l<=i?P:l>=i+E?E:l-i,!(a<p);l+=j)m=a-p,g=j-p,w.push(U(h(p+m%g,0))),a=B(m/g);w.push(U(h(a,0))),i=v(n,b,r==o),n=0,++r}++n,++e}return w.join("")}function b(t){return a(t,function(t){return I.test(t)?y(t.slice(4).toLowerCase()):t})}function g(t){return a(t,function(t){return R.test(t)?"xn--"+d(t):t})}var m="object"==i(e)&&e&&!e.nodeType&&e,w="object"==i(t)&&t&&!t.nodeType&&t,x="object"==(void 0===r?"undefined":i(r))&&r;x.global!==x&&x.window!==x&&x.self!==x||(s=x);var _,S,O=2147483647,j=36,P=1,E=26,A=38,T=700,M=72,k=128,F="-",I=/^xn--/,R=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=j-P,B=Math.floor,U=String.fromCharCode;if(_={version:"1.4.1",ucs2:{decode:f,encode:l},decode:y,encode:d,toASCII:g,toUnicode:b},"object"==i(n(173))&&n(173))void 0!==(o=function(){return _}.call(e,n,e,t))&&(t.exports=o);else if(m&&w)if(t.exports==m)w.exports=_;else for(S in _)_.hasOwnProperty(S)&&(m[S]=_[S]);else s.punycode=_}(void 0)}).call(e,n(73)(t),n(57))},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===(void 0===t?"undefined":r(t))&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(471),e.encode=e.stringify=n(472)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,i){e=e||"&",n=n||"=";var s={};if("string"!=typeof t||0===t.length)return s;var u=/\+/g;t=t.split(e);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var a=t.length;c>0&&a>c&&(a=c);for(var f=0;f<a;++f){var l,p,h,v,y=t[f].replace(u,"%20"),d=y.indexOf(n);d>=0?(l=y.substr(0,d),p=y.substr(d+1)):(l=y,p=""),h=decodeURIComponent(l),v=decodeURIComponent(p),r(s,h)?o(s[h])?s[h].push(v):s[h]=[s[h],v]:s[h]=v}return s};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(t){switch(void 0===t?"undefined":o(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,c){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===(void 0===t?"undefined":o(t))?r(u(t),function(o){var u=encodeURIComponent(i(o))+n;return s(t[o])?r(t[o],function(t){return u+encodeURIComponent(i(t))}).join(e):u+encodeURIComponent(i(t[o]))}).join(e):c?encodeURIComponent(i(c))+n+encodeURIComponent(i(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){"use strict";t.exports=n(474)},function(t,e,n){"use strict";function r(t,e){return(u(t)?o:i)(t,s(e))}var o=n(475),i=n(476),s=n(481),u=n(31);t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}t.exports=r},function(t,e,n){"use strict";var r=n(477),o=n(480),i=o(r);t.exports=i},function(t,e,n){"use strict";function r(t,e){return t&&o(t,e,i)}var o=n(478),i=n(109);t.exports=r},function(t,e,n){"use strict";var r=n(479),o=r();t.exports=o},function(t,e,n){"use strict";function r(t){return function(e,n,r){for(var o=-1,i=Object(e),s=r(e),u=s.length;u--;){var c=s[t?u:++o];if(!1===n(i[c],c,i))break}return e}}t.exports=r},function(t,e,n){"use strict";function r(t,e){return function(n,r){if(null==n)return n;if(!o(n))return t(n,r);for(var i=n.length,s=e?i:-1,u=Object(n);(e?s--:++s<i)&&!1!==r(u[s],s,u););return n}}var o=n(112);t.exports=r},function(t,e,n){"use strict";function r(t){return"function"==typeof t?t:o}var o=n(172);t.exports=r},function(t,e,n){"use strict";function r(t,e){var n,r,o=t.toLowerCase();for(e=[].concat(e),n=0;n<e.length;n+=1)if(r=e[n]){if(r.test&&r.test(t))return!0;if(r.toLowerCase()===o)return!0}}var o=n(483);t.exports=function(t,e,n){return"number"==typeof t&&(t=""+t),"string"!=typeof t?!!t:(t=o(t),!!r(t,e||["true","1"])||!r(t,n||["false","0"])&&void 0)}},function(t,e,n){"use strict";var r=n(174),o=n(484),i=String.prototype.trim;t.exports=function(t,e){return t=r(t),!e&&i?i.call(t):(e=o(e),t.replace(new RegExp("^"+e+"+|"+e+"+$","g"),""))}},function(t,e,n){"use strict";var r=n(485);t.exports=function(t){return null==t?"\\s":t.source?t.source:"["+r(t)+"]"}},function(t,e,n){"use strict";var r=n(174);t.exports=function(t){return r(t).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(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 s(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 u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(29),a=n(117),f=r(a),l=n(175),p=r(l),h=n(487),v=r(h),y=n(488),d=r(y),b=n(489),g=r(b),m=n(176),w=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.startBlinkPoster(),r}return s(e,t),u(e,[{key:"name",get:function(){return"poster"}}]),e.prototype.bindEvents=function(){t.prototype.bindEvents.call(this),this.listenTo(this.container,c.Events.CONTAINER_OPTIONS_CHANGE,this.changeOptsRuntime)},e.prototype.changeOptsRuntime=function(){if(this.options.blinkPoster)return void this.startBlinkPoster();this.stopBlinkPoster()},e.prototype.startBlinkPoster=function(){if(this.options.blinkPoster&&!this.hasStartedPlaying){var t=this.options.blinkPosterDelay||5e3;this.posterChangeSource=this.posterChangeSource.bind(this),this.posterTimer=setTimeout(this.posterChangeSource,t)}},e.prototype.stopBlinkPoster=function(){clearTimeout(this.posterTimer)},e.prototype.onStop=function(){t.prototype.onStop.call(this),this.startBlinkPoster()},e.prototype.onPlay=function(){t.prototype.onPlay.call(this),this.stopBlinkPoster()},e.prototype.posterChangeSource=function(){var t=this,e=this.options.authToken?"&":"?",n=this.getPosterSource({postfix:e+"_t="+Number(new Date)});this.setPosterSource(n).then(function(){t.posterTimer=setTimeout(t.posterChangeSource,5e3)})},e.prototype.setPosterSource=function(t){function e(t){this.updateCanvas(),t()}var n=this;return(0,m.isInVisibleArea)(this.$el[0])?new Promise(function(r){var o=n._videoPoster,i=e.bind(n);o.attr({src:t}),o.load(),o.addEventListener("loadeddata",i(r))}):Promise.resolve()},e.prototype.renderVideoPoster=function(){this.$el.html(this.templateVideo()),this.setPosterStyles(),this.setVideoPoster()},e.prototype.renderCanvasPoster=function(){this.$el.html(this.templateCanvas()),this.setPosterStyles(),this.setVideoPoster(),this._canvasPoster=this.$el.find("canvas"),this._videoPoster.get(0).addEventListener("loadeddata",this.handleLoadedData.bind(this))},e.prototype.handleLoadedData=function(){var t=this._canvasPoster.get(0),e=t.getContext("2d");this._context=e;var n=this._videoPoster.get(0),r=n.videoWidth,o=n.videoHeight;t.width=r,this._w=r,t.height=o,this._h=o,(0,m.setCanvasSize)(t,this.container.el),e.fillRect(0,0,r,o),e.drawImage(this._videoPoster.get(0),0,0,r,o)},e.prototype.updateCanvas=function(){function t(){var t=this._context,e=this._w,n=this._h;t.drawImage(this._videoPoster.get(0),0,0,e,n)}(0,m.requestAnimationFrame)(t.bind(this))},e.prototype.handleResize=function(){(0,m.setCanvasSize)(this._canvas)},e.prototype.setPosterStyles=function(){this.$el.append('<style class="clappr-style"></style>'),this.$el.find(".clappr-style").html((0,f.default)(v.default.toString()))},e.prototype.setVideoPoster=function(){this._videoPoster=this.$el.find(".poster-video"),this._videoPoster.attr({src:this.getPosterSource()})},e.prototype.renderPlayButton=function(){this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(p.default),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var t=this.options.mediacontrol&&this.options.mediacontrol.buttons;t&&this.$el.find("svg path").css("fill",t),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(t=this.options.mediacontrol.buttons,this.$playButton.css("color",t))},e.prototype.getPosterSource=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.postfix,n=this.options.poster.url||this.options.poster;return e?""+n+e:n},e.prototype.isMobile=function(){return null==this._isMobile&&(this._isMobile=(0,m.isMobileBrowser)()),this._isMobile},e.prototype.render=function(){if(this.shouldRender){var t=this.options.blinkPoster;return this.isMobile()||t?this.renderCanvasPoster():this.renderVideoPoster(),this.renderPlayButton(),this.update(),this}},u(e,[{key:"templateVideo",get:function(){return(0,f.default)(d.default)}},{key:"templateCanvas",get:function(){return(0,f.default)(g.default)}},{key:"shouldRender",get:function(){var t=!!this.options.poster;return"html_img"!==this.container.playback.name&&("no_op"!==this.container.playback.getPlaybackType()||t)}},{key:"showOnVideoEnd",get:function(){return!this.options.poster||this.options.poster.showOnVideoEnd||void 0===this.options.poster.showOnVideoEnd}}]),e}(c.Poster);e.default=w,t.exports=e.default},function(t,e,n){e=t.exports=n(118)(!1),e.push([t.i,".player-poster[data-poster] {\n  display: -webkit-box;\n  display: -moz-box;\n  display: box;\n  display: -webkit-flex;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-pack: center;\n  -moz-box-pack: center;\n  box-pack: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  -ms-justify-content: center;\n  -o-justify-content: center;\n  justify-content: center;\n  -ms-flex-pack: center;\n  -webkit-box-align: center;\n  -moz-box-align: center;\n  box-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  -ms-align-items: center;\n  -o-align-items: center;\n  align-items: center;\n  -ms-flex-align: center;\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  z-index: 998;\n  top: 0;\n  left: 0;\n  background-color: #000;\n  background-size: contain; }\n  .player-poster[data-poster].clickable {\n    cursor: pointer; }\n  .player-poster[data-poster]:hover .play-wrapper {\n    opacity: 1; }\n  .player-poster[data-poster] .play-wrapper {\n    width: 100%;\n    height: 25%;\n    margin: 0 auto;\n    opacity: 0.75;\n    -webkit-transition: opacity 0.1s ease;\n    -moz-transition: opacity 0.1s ease;\n    transition: opacity 0.1s ease; }\n    .player-poster[data-poster] .play-wrapper svg {\n      height: 100%; }\n      .player-poster[data-poster] .play-wrapper svg path {\n        fill: #fff; }\n\n.video-poster-wrapper {\n  position: absolute;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  bottom: 0;\n  left: 0; }\n  .video-poster-wrapper .play-wrapper-cont {\n    top: 0;\n    left: 0;\n    display: -webkit-box;\n    display: -moz-box;\n    display: box;\n    display: -webkit-flex;\n    display: -moz-flex;\n    display: -ms-flexbox;\n    display: flex;\n    -webkit-box-pack: center;\n    -moz-box-pack: center;\n    box-pack: center;\n    -webkit-justify-content: center;\n    -moz-justify-content: center;\n    -ms-justify-content: center;\n    -o-justify-content: center;\n    justify-content: center;\n    -ms-flex-pack: center;\n    -webkit-box-align: center;\n    -moz-box-align: center;\n    box-align: center;\n    -webkit-align-items: center;\n    -moz-align-items: center;\n    -ms-align-items: center;\n    -o-align-items: center;\n    align-items: center;\n    -ms-flex-align: center;\n    position: absolute;\n    height: 100%;\n    width: 100%; }\n  .video-poster-wrapper .poster-video.poster-video-canvas {\n    left: -10000px;\n    top: -10000px; }\n  .video-poster-wrapper .poster-video, .video-poster-wrapper .poster-video-second {\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    width: 100%;\n    height: 100%;\n    display: block; }\n    .video-poster-wrapper .poster-video.poster-hid, .video-poster-wrapper .poster-video-second.poster-hid {\n      display: none; }\n",""])},function(t,e){t.exports='<div class="video-poster-wrapper">\n  <video class="poster-video" autoPlay/>\n  <video class="poster-video-second" autoPlay/>\n  <div class="play-wrapper-cont">\n    <div class="play-wrapper">\n    </div>\n  </div>\n</div>\n'},function(t,e){t.exports='<div class="video-poster-wrapper">\n  <video class="poster-video poster-video-canvas" autoPlay/>\n  <canvas/>\n  <div class="play-wrapper-cont">\n    <div class="play-wrapper">\n    </div>\n  </div>\n</div>\n'},function(t,e,n){"use strict";var r,o,i;!function(n){var s=/iPhone/i,u=/iPod/i,c=/iPad/i,a=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,f=/Android/i,l=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,p=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,h=/Windows Phone/i,v=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,y=/BlackBerry/i,d=/BB10/i,b=/Opera Mini/i,g=/(CriOS|Chrome)(?=.*\bMobile\b)/i,m=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,w=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),x=function(t,e){return t.test(e)},_=function(t){var e=t||navigator.userAgent,n=e.split("[FBAN");if(void 0!==n[1]&&(e=n[0]),n=e.split("Twitter"),void 0!==n[1]&&(e=n[0]),this.apple={phone:x(s,e),ipod:x(u,e),tablet:!x(s,e)&&x(c,e),device:x(s,e)||x(u,e)||x(c,e)},this.amazon={phone:x(l,e),tablet:!x(l,e)&&x(p,e),device:x(l,e)||x(p,e)},this.android={phone:x(l,e)||x(a,e),tablet:!x(l,e)&&!x(a,e)&&(x(p,e)||x(f,e)),device:x(l,e)||x(p,e)||x(a,e)||x(f,e)},this.windows={phone:x(h,e),tablet:x(v,e),device:x(h,e)||x(v,e)},this.other={blackberry:x(y,e),blackberry10:x(d,e),opera:x(b,e),firefox:x(m,e),chrome:x(g,e),device:x(y,e)||x(d,e)||x(b,e)||x(m,e)||x(g,e)},this.seven_inch=x(w,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},S=function(){var t=new _;return t.Class=_,t};void 0!==t&&t.exports&&"undefined"==typeof window?t.exports=_:void 0!==t&&t.exports&&"undefined"!=typeof window?t.exports=S():(o=[],r=n.isMobile=S(),void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i))}(void 0)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(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 s(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 u=n(29),c=n(175),a=r(c),f=n(492),l=r(f),p=n(117),h=r(p),v=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return s(e,t),e.prototype.setPosterStyles=function(){this.$el.append('<style class="clappr-style"></style>'),this.$el.find(".clappr-style").html((0,h.default)(l.default.toString()))},e.prototype.render=function(){if(this.shouldRender){this.$el.html(this.template()),this.setPosterStyles();if(this.options.poster&&void 0==this.options.poster.custom){var t=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+t+")"})}else this.options.poster&&this.$el.css({background:this.options.poster.custom});this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(a.default),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var e=this.options.mediacontrol&&this.options.mediacontrol.buttons;return e&&this.$el.find("svg path").css("fill",e),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(e=this.options.mediacontrol.buttons,this.$playButton.css("color",e)),this.update(),this}},e}(u.Poster);e.default=v,t.exports=e.default},function(t,e,n){e=t.exports=n(118)(!1),e.push([t.i,".player-poster[data-poster] {\n  display: -webkit-box;\n  display: -moz-box;\n  display: box;\n  display: -webkit-flex;\n  display: -moz-flex;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-pack: center;\n  -moz-box-pack: center;\n  box-pack: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  -ms-justify-content: center;\n  -o-justify-content: center;\n  justify-content: center;\n  -ms-flex-pack: center;\n  -webkit-box-align: center;\n  -moz-box-align: center;\n  box-align: center;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  -ms-align-items: center;\n  -o-align-items: center;\n  align-items: center;\n  -ms-flex-align: center;\n  position: absolute;\n  height: 100%;\n  width: 100%;\n  z-index: 998;\n  top: 0;\n  left: 0;\n  background-color: #000;\n  background-size: contain;\n  background-repeat: no-repeat;\n  background-position: 50% 50%; }\n  .player-poster[data-poster].clickable {\n    cursor: pointer; }\n  .player-poster[data-poster]:hover .play-wrapper[data-poster] {\n    opacity: 1; }\n  .player-poster[data-poster] .play-wrapper[data-poster] {\n    width: 100%;\n    height: 25%;\n    margin: 0 auto;\n    opacity: 0.75;\n    -webkit-transition: opacity 0.1s ease;\n    -moz-transition: opacity 0.1s ease;\n    transition: opacity 0.1s ease; }\n    .player-poster[data-poster] .play-wrapper[data-poster] svg {\n      height: 100%; }\n      .player-poster[data-poster] .play-wrapper[data-poster] svg path {\n        fill: #fff; }\n",""])},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(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 s(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 u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(29),a=n(117),f=r(a),l=n(176),p=n(494),h=r(p),v=n(495),y=r(v),d=function(t){function e(n){o(this,e);var r=i(this,t.call(this,n));return r.hasStartedPlaying=!1,r.playRequested=!1,r.render(),r}return s(e,t),e.prototype.bindEvents=function(){this.setPositionBinded=this.setPosition.bind(this),window.addEventListener("resize",this.setPositionBinded),(c.Browser.isSafari||c.Browser.isIE)&&this.container.playback.el.addEventListener("loadeddata",this.setPositionBinded),this.listenTo(this.container,c.Events.CONTAINER_STOP,this.onStop),this.listenTo(this.container,c.Events.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,c.Events.CONTAINER_LOADEDMETADATA,this.setPositionBinded)},e.prototype.stopListening=function(){window.removeEventListener("resize",this.setPositionBinded),(c.Browser.isSafari||c.Browser.isIE)&&window.removeEventListener("loadeddata",this.setPositionBinded),t.prototype.stopListening.call(this)},e.prototype.onPlay=function(){this.hasStartedPlaying=!0,this.update()},e.prototype.onStop=function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()},e.prototype.update=function(){this.shouldRender&&(this.hasStartedPlaying?this.$el.show():this.$el.hide())},u(e,[{key:"name",get:function(){return"logo"}},{key:"template",get:function(){return(0,f.default)(h.default)}},{key:"attributes",get:function(){return{class:"player-logo","data-logo":""}}},{key:"shouldRender",get:function(){return!!this.options.logo.path}}]),e.prototype.render=function(){if(this.shouldRender)return this.$el.html(this.template()),this.setLogoStyles(),this.setLogoImgAttrs(),this.container.$el.append(this.$el),this.update(),this},e.prototype.setLogoImgAttrs=function(){var t=this.options.logo,e=t.path,n=t.width,r=void 0===n?60:n,o=t.height,i=void 0===o?60:o;this.$logoContainer=this.$el.find(".flussonic-logo"),this.$logoContainer.find(".fl-logo-img").attr({src:"/"+e,style:"width: "+r+"px;height: "+i+"px;"})},e.prototype.setPosition=function(){if(this.shouldRender){var t=this.container.$el,e=t.get(0).getBoundingClientRect(),n=t.find("video[data-html5-video]"),r=n.get(0),o=r.videoWidth,i=r.videoHeight,s=(0,l.calculateSize)({dom:{width:e.width,height:e.height},media:{width:o,height:i}}),u=this.options.logo,c=s.letterboxing,a=c.vertical,f=c.horizontal,p=this.$logoContainer.get(0);this.setStyles(u,["top","bottom"],p,a),this.setStyles(u,["left","right"],p,f),this.update()}},e.prototype.setStyles=function(t,e,n,r){var o=this;e.forEach(function(e){return o.setStyle(t,e,n,r)})},e.prototype.setStyle=function(t,e,n,r){t[e]&&(n.style[e]=parseInt(t[e],10)+r+"px")},e.prototype.setLogoStyles=function(){this.$el.append('<style class="clappr-style"></style>'),this.$el.find(".clappr-style").html((0,f.default)(y.default.toString()))},e}(c.UIContainerPlugin);e.default=d,t.exports=e.default},function(t,e){t.exports='<div class="flussonic-logo">\n  <img class="fl-logo-img"/>\n</div>\n'},function(t,e,n){e=t.exports=n(118)(!1),e.push([t.i,".player-logo[data-logo] {\n  position: absolute;\n  z-index: 1200; }\n\n.flussonic-logo {\n  position: absolute; }\n",""])},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 o(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 i(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 s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(29),c=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.bindEvents=function(){if(this.container.options.volume>0)return void this.listenToOnce(this.container,u.Events.CONTAINER_MEDIACONTROL_ENABLE,this.setInitialVolume);this.enabled=!1},e.prototype.setInitialVolume=function(){this.container.setVolume(this.container.options.volume)},s(e,[{key:"name",get:function(){return"volumePlugin"}}]),e}(u.ContainerPlugin);e.default=c,t.exports=e.default},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 o(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 i(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 s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(29),c=n(116),a=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.bindEvents=function(){var t=this;if("mseld"===this.container.playback.name)return this.listenTo(this.container.playback,u.Events.PLAYBACK_BUFFERING,this.waitForTime(5e3)),void this.listenTo(this.container.playback,u.Events.PLAYBACK_BUFFERFULL,function(){return t._buffering=!1});this.listenTo(this.container.playback,u.Events.PLAYBACK_ERROR,this.startListenStatus)},e.prototype.startListenStatus=function(t){"mseld"!==this.container.playback.name&&(!t||t&&t.data&&"networkError"!==t.data.type)||(this._statusUrl=(0,c.buildUrl)(this.container.options,"status.json"),this.checkStatus=this.checkStatus.bind(this),clearInterval(this.timerStatus),this.timerStatus=setInterval(this.checkStatus,1e3))},e.prototype.waitForTime=function(t){var e=this;return function(){e._buffering=!0,setTimeout(function(){e._buffering&&e.startListenStatus()},t)}},e.prototype.checkStatus=function(){var t=this;fetch(this._statusUrl).then(function(e){404===e.status&&(t.container.playback.setWaitStatus&&t.container.playback.setWaitStatus(!0),t.container.playback.stop()),200===e.status&&(clearInterval(t.timerStatus),t.container.playback.setWaitStatus&&t.container.playback.setWaitStatus(!1),t.container.playback.isPlaying()&&t.container.playback.stop(),t.container.playback.play())})},e.prototype.disable=function(){t.prototype.disable.call(this),clearInterval(this.timerStatus)},e.prototype.destroy=function(){t.prototype.destroy.call(this),clearInterval(this.timerStatus)},s(e,[{key:"name",get:function(){return"StreamStatusPlugin"}}]),e}(u.UIContainerPlugin);e.default=a,t.exports=e.default},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 o(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 i(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 s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(29),c=function(t){function e(){return r(this,e),o(this,t.apply(this,arguments))}return i(e,t),e.prototype.bindEvents=function(){for(var t in u.Events)"register"!==t&&"listAvailableCustomEvents"!==t&&this.listenTo(this.container.playback,u.Events[t],this.fireEvent.bind(this,t))},e.prototype.fireEvent=function(t){console.log(t)},s(e,[{key:"name",get:function(){return"DebugPlugin"}}]),e}(u.UIContainerPlugin);e.default=c,t.exports=e.default},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 o(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 i(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 s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(29);n(500);var c=n(501),a=function(t){return t&&t.__esModule?t:{default:t}}(c),f=function(t){function e(){r(this,e);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];var u=o(this,t.call.apply(t,[this].concat(i)));return u.options.playback||(u.options.playback=u.options),u._startTimeUpdateTimer(),u}return i(e,t),s(e,[{key:"name",get:function(){return"mseld"}}],[{key:"MSELD",get:function(){return e}}]),e.prototype._startTimeUpdateTimer=function(){var t=this;this._timeUpdateTimer=setInterval(function(){t._onTimeUpdate()},100)},e.prototype._onTimeUpdate=function(){var t={current:this.getCurrentTime(),total:this.getDuration()};this._lastTimeUpdate&&t.current===this._lastTimeUpdate.current||(this._lastTimeUpdate=t,this.trigger(u.Events.PLAYBACK_TIMEUPDATE,t,this.name))},e.prototype._updateSettings=function(){this.settings.left=["playstop"],this.trigger(u.Events.PLAYBACK_SETTINGSUPDATE)},e.prototype._onDurationChange=function(){var e=this.getDuration();console.log("onDurationChange",e,this._lastDuration),this._lastDuration!==e&&(this._lastDuration=e,t.prototype._onDurationChange.call(this))},e.prototype._stopTimeUpdateTimer=function(){clearInterval(this._timeUpdateTimer)},e.prototype.getPlaybackType=function(){return u.Playback.LIVE},e.prototype.destroy=function(){this.MSE&&(this.MSE.stop(),this.MSE=void 0),this._stopTimeUpdateTimer(),t.prototype.destroy.call(this)},e.prototype.resolveRedirect=function(t){return fetch(t,{method:"OPTIONS"}).catch(function(e){return t}).then(function(e){return e.headers.get("location")||t})},e.prototype.getStartTimeOffset=function(){return this.getCurrentTime()},e.prototype.play=function(){var t=this;if(!this._waitStatus&&!this.MSE){var e=this.options.src;this.resolveRedirect(e).then(function(e){var n=a.default.replaceHttpByWS(e);t.MSE=new a.default(t.el,n,{bufferMode:"segments"});var r=t.MSE.play();r&&r.then(function(){t.trigger(u.Events.PLAYBACK_PLAY_INTENT),t._stopped=!1})})}},e.prototype.setWaitStatus=function(t){this._waitStatus=t},e.prototype.stop=function(e){var n=this;this.MSE&&this.MSE.stop().then(function(){t.prototype.stop.call(n),n.MSE=void 0})},e}(u.HTML5Video);e.default=f,f.isSupported=function(){return a.default.isSupported()},f.canPlay=function(t,e){return(-1!=t.indexOf("mse_ld")||"application/x-flussonic-mse"==e)&&f.isSupported()},t.exports=e.default},function(t,e,n){"use strict";!function(t){function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!=typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return b.iterable&&(e[Symbol.iterator]=function(){return e}),e}function o(t){this.map={},t instanceof o?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function i(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function s(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function u(t){var e=new FileReader,n=s(e);return e.readAsArrayBuffer(t),n}function c(t){var e=new FileReader,n=s(e);return e.readAsText(t),n}function a(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function f(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function l(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(b.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(b.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(b.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(b.arrayBuffer&&b.blob&&m(t))this._bodyArrayBuffer=f(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!b.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!w(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=f(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):b.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},b.blob&&(this.blob=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(u)}),this.text=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return c(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(a(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},b.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(t){var e=t.toUpperCase();return x.indexOf(e)>-1?e:t}function h(t,e){e=e||{};var n=e.body;if(t instanceof h){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new o(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new o(e.headers)),this.method=p(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function v(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function y(t){var e=new o;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}}),e}function d(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new o(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var b={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(b.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=function(t){return t&&DataView.prototype.isPrototypeOf(t)},w=ArrayBuffer.isView||function(t){return t&&g.indexOf(Object.prototype.toString.call(t))>-1};o.prototype.append=function(t,r){t=e(t),r=n(r);var o=this.map[t];this.map[t]=o?o+","+r:r},o.prototype.delete=function(t){delete this.map[e(t)]},o.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},o.prototype.set=function(t,r){this.map[e(t)]=n(r)},o.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},o.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},o.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},o.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},b.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},l.call(h.prototype),l.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},d.error=function(){var t=new d(null,{status:0,statusText:""});return t.type="error",t};var _=[301,302,303,307,308];d.redirect=function(t,e){if(-1===_.indexOf(e))throw new RangeError("Invalid status code");return new d(null,{status:e,headers:{location:t}})},t.Headers=o,t.Request=h,t.Response=d,t.fetch=function(t,e){return new Promise(function(n,r){var o=new h(t,e),i=new XMLHttpRequest;i.onload=function(){var t={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};t.url="responseURL"in i?i.responseURL:t.headers.get("X-Request-URL");var e="response"in i?i.response:i.responseText;n(new d(e,t))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&b.blob&&(i.responseType="blob"),o.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:void 0)},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VideoThumbnails=void 0;var r=n(29),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r),i=o.Events,s=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},u=function(){return s()+s()+"-"+s()+"-"+s()+"-"+s()+"-"+s()+s()+s()},c=function(t){return t.css("position","fixed").css("width","300px").css("height","160px").css("bottom","100px")},a=function(t){return t<10?"0"+t:String(t)},f=function(t){return a(t.getUTCFullYear())+"/"+a(t.getUTCMonth()+1)+"/"+a(t.getUTCDate())+"/"+a(t.getUTCHours())+"/"+a(t.getUTCMinutes())+"/"+a(t.getUTCSeconds())+"-preview.mp4"},l=function(t){return function(e){var n=t.playerInfo.options,r=n.source,o=n.authToken;return r.slice(0,r.lastIndexOf("/"))+"/"+f(e)+(o?"?"+o:"")}};e.VideoThumbnails=o.UICorePlugin.extend({name:"VideoThumbnails",initialize:function(){return this.guid=u(),this.$el.html('<video autoplay  id="'+this.guid+'" width="100%" type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\' />'),c(this.$el),this},bindEvents:function(){this.listenTo(this.core.mediaControl,i.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.onMouseMove.bind(this)),this.listenTo(this.core.mediaControl,i.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.onMouseLeave),this.listenTo(this.core.mediaControl,i.MEDIACONTROL_RENDERED,this.onRendered),this.listenTo(this.core.mediaControl,i.MEDIACONTROL_SHOW,this.bindHLS)},bindHLS:function(){var t=this.core.getCurrentPlayback(),e=t._hls;e&&!this.attachedEvent&&(this.listenTo(e,"hlsLevelPtsUpdated",this.hlsPtsUpdated.bind(this)),this.attachedEvent=!0)},hlsPtsUpdated:function(t,e){e.details.fragments[0]&&(this.totalDuration=e.details.totalduration,this.startProgramDateTime=e.details.fragments[0].rawProgramDateTime)},onMouseMove:function(t){var e=t.clientX,n=this.core.mediaControl.$seekBarContainer.width();this.updateThumbPosition(n,e),this.totalDuration&&this.startProgramDateTime?this.updateThumbUrl(n,e):this.hide()},updateThumbUrl:function(t,e){var n=new Date(this.startProgramDateTime),r=e-this.core.mediaControl.$seekBarContainer.offset().left,o=Math.min(1,Math.max(r/t,0)),i=n.getTime(),s=this.totalDuration*o*1e3,u=i+s,c=new Date(u),a=l(this.core)(c);document.getElementById(this.guid).setAttribute("src",a)},updateThumbPosition:function(t,e){var n=Math.max(0,Math.min(t-300,e-150));this.$el.css("left",n),this.show()},onMouseLeave:function(){this.hide()},onRendered:function(){this.core.mediaControl.$el.find(".media-control-background").first().append(this.$el)},show:function(){this.$el.css("display","block")},hide:function(){this.$el.css("display","none")}})},function(t,e){t.exports=r}])});