1!function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}}()({1:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._user_setting=void 0;var obj,_index=require("./modules/index"),_Utils=(obj=require("./modules/classes/Utils"))&&obj.__esModule?obj:{default:obj};function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}var _user_setting={};exports._user_setting=_user_setting,"object"===("undefined"==typeof infiny_config?"undefined":_typeof(infiny_config))&&function(){var setting=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("object"===_typeof(setting))if("string"==typeof setting.radio&&""!==setting.radio){var default_setting={volume:.7};default_setting=(new _Utils.default).extendDefaults(default_setting,setting),exports._user_setting=_user_setting=default_setting,(0,_index.miniPlayer)()}else console.log("Debes indicar la radio de origen");else console.log("Debes ingresar la configuración mÃnima")}(infiny_config)},{"./modules/classes/Utils":8,"./modules/index":11}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ads_player=void 0;var _vast_player,_Utils=_interopRequireDefault(require("./classes/Utils")),_vastPlayer=_interopRequireDefault(require("vast-player")),_template=require("./template"),_playPause=_interopRequireDefault(require("./play-pause")),_index=require("./index");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _utils=new _Utils.default,first_play=!1,is_playing=!1,is_error=!1,loopAd=2,loop=1;function init(){var vast=_index._radio_data.vast;(_vast_player=new _vastPlayer.default(document.querySelector("#js-container-ads"))).load(vast).then(function(){var video=getVideoTag();video.setAttribute("playsinline",""),getVideoTag().addEventListener("ended",videoAdsEnd),volume(.7),_utils.isAudio(video.src)||_template.template.showModal(!0),_template.template.printStatus("Ads"),playAds()}).catch(function(error){is_error=!0,_playPause.default.playPauseStatus(!0)})}function playAds(){is_error||first_play||(first_play=!0,is_playing=!0,_vast_player.startAd())}function getVideoTag(){return _vast_player.container.getElementsByTagName("video")[0]}function volume(){var volume=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.7;is_error||(Number.isInteger(volume)&&(volume/=100),volume>1&&(volume=1),volume<0&&(volume=0),_vast_player.adVolume=volume)}function videoAdsEnd(){loop==loopAd?(is_playing=!1,_template.template.showModal(!1),_playPause.default.playPauseStatus(!0),function(){var sec=_index._radio_data.vast_time||0;if(0==(sec=1e3*parseInt(sec)))return;setTimeout(function(){first_play=!1,is_error=!1,_playPause.default.playPauseStatus(!1),init()},sec)}()):(_template.template.showModal(!1),first_play=!1,is_playing=!1,is_error=!1,init()),loop+=1}var ads_player={init:init,playAds:playAds,stopAds:function(){is_error||first_play&&is_playing&&_vast_player.stopAd()},volume:volume,getDuration:function(){return _vast_player.adDuration},isPlaying:function(){return!is_error&&!!(is_playing&&_vast_player.adRemainingTime>0)},canYouPlayAds:function(){return!!_index._radio_data.vast&&!is_error&&!first_play},videoAdsEnd:videoAdsEnd};exports.ads_player=ads_player},{"./classes/Utils":8,"./index":11,"./play-pause":13,"./template":15,"vast-player":85}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _main=require("../main"),functionsObject_play=function(){"function"==typeof _main._user_setting.onPlay&&_main._user_setting.onPlay()},functionsObject_pause=function(){"function"==typeof _main._user_setting.onPause&&_main._user_setting.onPause()},_default=function(){var type=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";""!==type&&("play"===type?functionsObject_play():"pause"===type&&functionsObject_pause())};exports.default=_default},{"../main":1}],4:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_fetchJsonp=(obj=require("fetch-jsonp"))&&obj.__esModule?obj:{default:obj};var _default={base_url:"https://infiny.live/api/v1",isValidURL:function(string){return null!==string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)},request:function(){var endpoint=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",options=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fetch(endpoint,options)},get:function(){var endpoint=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isValidURL(endpoint)||(endpoint=this.base_url+endpoint),this.request(endpoint,{method:"GET"}).then(function(response){return response.json()})},getJsonp:function(){var endpoint=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,_fetchJsonp.default)(endpoint,{timeout:1e3}).then(function(response){return response.json()})}};exports.default=_default},{"fetch-jsonp":40}],5:[function(require,module,exports){"use strict";function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default=function Cookies(){var _this=this;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}
1(this,Cookies),_defineProperty(this,"setCookie",function(cname,cvalue,exdays){var d=new Date;d.setTime(d.getTime()+24*exdays*60*60*1e3);var expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+";"+expires+";path=/"}),_defineProperty(this,"getCookie",function(cname){for(var name=cname+"=",ca=decodeURIComponent(document.cookie).split(";"),i=0;i<ca.length;i++){for(var c=ca[i];" "==c.charAt(0);)c=c.substring(1);if(0==c.indexOf(name))return c.substring(name.length,c.length)}return""}),_defineProperty(this,"deleteCookie",function(){var cname=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return""!=cname&&(_this.setCookie(cname,"",-1),!0)})};exports.default=_default},{}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_config=(obj=require("./../config"))&&obj.__esModule?obj:{default:obj},_index=require("./../index");function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var _default=function TemplateBar(){var _this=this,setting=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,TemplateBar),_defineProperty(this,"setUrlPlayerFull",function(){_this.infiny_url=_config.default.infiny_url+_this.setting.radio,_this.infiny_url_target="_blank",_this.setting.player_full&&("string"==typeof _this.setting.player_full.url&&""!==_this.setting.player_full.url&&(_this.infiny_url=_this.setting.player_full.url),"boolean"==typeof _this.setting.player_full.url_in_another_tab&&(_this.infiny_url_target=_this.setting.player_full.url_in_another_tab?"_blank":""))}),_defineProperty(this,"setColor",function(){_this.colors=_config.default.colors,_this.colors.primary_bar=_config.default.colors.primary,_this.colors.secondary_bar=_config.default.colors.secondary,"object"===_typeof(_index._radio_data.colors)&&(_this.colors=_objectSpread(_objectSpread({},_this.colors),_index._radio_data.colors),_this.colors.primary_bar=_this.colors.primary,_this.colors.secondary_bar=_this.colors.secondary),"object"===_typeof(_this.setting.colors)&&("string"==typeof _this.setting.colors.primary&&""!=_this.setting.colors.primary&&(_this.colors.primary=_this.setting.colors.primary),"string"==typeof _this.setting.colors.secondary&&""!=_this.setting.colors.secondary&&(_this.colors.secondary=_this.setting.colors.secondary),"string"==typeof _this.setting.colors.tertiary&&""!=_this.setting.colors.tertiary&&(_this.colors.tertiary=_this.setting.colors.tertiary),"string"==typeof _this.setting.colors.text&&""!=_this.setting.colors.text&&(_this.colors.text=_this.setting.colors.text),"string"==typeof _this.setting.colors.primary_bar&&""!=_this.setting.colors.primary_bar&&(_this.colors.primary_bar=_this.setting.colors.primary_bar),"string"==typeof _this.setting.colors.secondary_bar&&""!=_this.setting.colors.secondary_bar&&(_this.colors.secondary_bar=_this.setting.colors.secondary_bar))}),_defineProperty(this,"setImageDefault",function(){_this.image_default=_config.default.placeholder_image,"object"===_typeof(_index._radio_data.radio_default.images)&&"string"==typeof _index._radio_data.radio_default.images.small&&""!=_index._radio_data.radio_default.images.small?_this.image_default=_index._radio_data.radio_default.images.small:"object"===_typeof(_index._radio_data.images_logo)&&"string"==typeof _index._radio_data.images_logo.small&&""!=_index._radio_data.images_logo.small&&(_this.image_default=_index._radio_data.images_logo.small),"string"==typeof _this.setting.placeholder&&""!=_this.setting.placeholder&&(_this.image_default=_this.setting.placeholder)}),_defineProperty(this,"styleColor",function(){return"<style>\n\t\t\t\t\t._is-main-bar{\n\t\t\t\t\t\t--primary-color: ".concat(_this.colors.primary,";\n\t\t\t\t\t\t--secondary-color: ").concat(_this.colors.secondary,";\n\t\t\t\t\t\t--tertiary-color: ").concat(_this.colors.tertiary,";\n\t\t\t\t\t}\n\t\t\t\t\t._is-main-bar-progress__current{\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\t\t\t\t\t._is-main-bar__container{\n\t\t\t\t\t\tcolor: ").concat(_this.colors.text,";\n\t\t\t\t\t}\n\t\t\t\t\t._is-main-bar-progress-bar{\n\t\t\t\t\t\t--_main-clr-bg: ").concat(_this.colors.primary_bar,";\n\t\t\t\t\t\t--_track-clr-bg: ").concat(_this.colors.secondary_bar,";\n\t\t\t\t\t}\n\n\t\t\t\t\t#time{\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\tflex-direction: row;\n \t\t\t\t\talign-items: center;\n\t\t\t\t\t\tfont-size: smaller;\n\t\t\t\t\t}\n\n\t\t\t\t\t#mp3_current_time {\n\t\t\t\t\t\tmargin-right: 5px; /* Espacio entre el tiempo actual y la duración */\n\t\t\t\t\t}\n\n\t\t\t\t\t#mp3_duration {\n\t\t\t\t\t\tmargin-left: 5px; /* Espacio entre el tiempo actual y la duración */\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@media screen and (max-width: 767px) {\n\t\t\t\t\t\t#time {\n\t\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t\t\talign-items: flex-start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#mp3_current_time {\n\t\t\t\t\t\t\tmargin-right: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t#mp3_duration {\n\t\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t\t\tmargin-top: 5px; /* Espacio entre los span en pantallas móviles */\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#de {\n\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t</style>")}),_defineProperty(this,"getTemplate",function(){return'<div class="_is-main-bar js-infiny-bar">\n\n\t\t\t\t\t'.concat(_this.styleColor(),'\n\n\t\t\t <div class="_is-main-bar__overlay" ></div>\n\n\t\t\t <input type="range" min="0" max="100" step="0.1" value="
10" name="progress" id="progress_slider" class="_is-main-bar-progress-bar js-scroll-mp3-time" style="display:none;">\n\n\t\t\t <div class="_is-main-bar__container _is-container" >\n\t\t\t <div class="_is-main-bar__left _is-main-bar__item">\n\t\t\t <div class="_is-main-bar__card _is-main-bar-card">\n\t\t\t <div class="_is-main-bar-card__left">\n\t\t\t <div class="_is-main-bar-card__media">\n\t\t\t <img src="').concat(_this.image_default,'" alt="Imagen Player" class="_is-main-bar-card__image js-infiny-bar__image">\n\t\t\t </div>\n\t\t\t </div>\n\n\t\t\t <div class="_is-main-bar-card__right">\n\t\t\t <a href="#" class="_is-main-bar-card__button js-infiny-bar__status is_live">En vivo</a>\n\t\t\t <strong class="_is-main-bar-card__title js-infiny-bar__title">...</strong>\n\t\t\t <span class="_is-main-bar-card__subtitle js-infiny-bar__subtitle">...</span>\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t </div>\n\n\t\t\t <div class="_is-main-bar__center _is-main-bar__item">\n\t\t\t \x3c!--<a href="#" class="_is-main-bar__button is-icon-rewind"></a>--\x3e\n\t\t\t <a href="#" class="_is-main-bar__button _is-main-bar__button--bigger is-icon-play js-infiny-bar__play"></a>\n\t\t\t \x3c!--<a href="#" class="_is-main-bar__button is-icon-forward"></a>--\x3e\n\t\t\t </div>\n\n\t\t\t <div class="_is-main-bar__right _is-main-bar__item">\n\t\t\t <div class="_is-main-bar-socials">\n\n\t\t\t\t\t\t\t\t<div id="time">\n\t\t\t\t\t\t\t\t\t<span id="mp3_current_time">00:00</span> \n\t\t\t\t\t\t\t\t\t<span id="de"> de </span>\n\t\t\t\t\t\t\t\t\t<span id="mp3_duration">00:00</span>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t <div class="_is-main-bar-socials__item">\n\t\t\t <div class="_is-main-bar-socials__volume _is-main-bar-socials-volume">\n\t\t\t <span class="_is-main-bar-socials__button _is-main-bar-socials-volume__button _is-js-toggle-volume">\n\t\t\t <i class="is-icon-volume _is-main-bar-socials-volume__icon" aria-hidden="true"></i>\n\t\t\t </span>\n\n\t\t\t <div class="_is-main-bar-socials-volume__content">\n\t\t\t <input type="range" min="0" max="100" step="1" value="70" class="_is-main-bar-socials__slider _is-js-player-volume-slider">\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t </div>\n\n\t\t\t \x3c!--<div class="_is-main-bar-socials__item">\n\t\t\t <a href="#" class="_is-main-bar-socials__button _is-main-bar-socials__button--share">\n\t\t\t <i class="is-icon-share _is-main-bar-socials__icon" aria-hidden="true"></i>\n\t\t\t </a>\n\t\t\t </div>--\x3e\n\n\t\t\t <div class="_is-main-bar-socials__item">\n\t\t\t <a href="').concat(_this.infiny_url,'" target="').concat(_this.infiny_url_target,'" class="_is-main-bar-socials__button _is-main-bar-socials__button--maximize js-open-full-player">\n\t\t\t <i class="is-icon-maximize _is-main-bar-socials__icon" aria-hidden="true"></i>\n\t\t\t </a>\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t \t<audio id="infiny__player" class="video-js" style="width:1px; height:1px;display:none;"></audio>\n\t\t\t </div>')}),_defineProperty(this,"print",function(){var html=_this.getTemplate();_this.insideElement.insertAdjacentHTML("beforeend",html)}),this.setting=setting||{},this.setting.element&&document.contains(document.querySelector(this.setting.element))||(this.setting.element="body"),this.insideElement=document.querySelector(this.setting.element),this.setUrlPlayerFull(),this.setImageDefault(),this.setColor()};exports.default=_default},{"./../config":10,"./../index":11}],7:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;_interopRequireDefault(require("./../config")),require("./../index");
1var _adsPlayer=require("./../ads-player");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var _utils=new(_interopRequireDefault(require("./Utils")).default),_default=function TemplateModal(){var _this=this,setting=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,TemplateModal),_defineProperty(this,"getTemplate",function(){return'\x3c!-- The Modal --\x3e\n\t\t\t <div id="" class="infiny-bar-modal">\n\t\t\t \t\x3c!-- Modal content --\x3e\n\t\t\t \t<div class="infiny-bar-modal__content">\n\t\t\t \t\t<div class="infiny-bar-modal__header" >\n\t\t\t\t\t\t <span class="infiny-bar-modal__title">Publicidad</span>\n\t\t\t\t\t\t <span class="infiny-bar-modal__close">Ã</span>\n\t\t\t\t\t\t</div>\n\t\t\t \t\t<div id="js-container-ads"></div>\n\t\t\t \t</div>\n\t\t\t </div>'}),_defineProperty(this,"print",function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var html=_this.getTemplate();_this.insideElement.insertAdjacentHTML("afterend",html),_this.events()}),_defineProperty(this,"events",function(){document.querySelector(".infiny-bar-modal__close").onclick=function(event){var modal=document.querySelector(".infiny-bar-modal");_utils.hide(modal),_adsPlayer.ads_player.stopAds(),_adsPlayer.ads_player.videoAdsEnd()}}),this.setting=setting||{},this.setting.element&&document.contains(document.querySelector(this.setting.element))||(this.setting.element="body"),this.insideElement=document.querySelector(this.setting.element)};exports.default=_default},{"./../ads-player":2,"./../config":10,"./../index":11,"./Utils":8}],8:[function(require,module,exports){"use strict";function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default=function Utils(){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Utils),_defineProperty(this,"show",function(){var element=arguments.length>0&&void 0!==arguments[0]&&arguments[0];element&&(element.style.display="block")}),_defineProperty(this,"hide",function(){var element=arguments.length>0&&void 0!==arguments[0]&&arguments[0];element&&(element.style.display="none")}),_defineProperty(this,"isAudio",function(){var src=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!src&&((src=src.toLowerCase()).indexOf(".mp3")>0||src.indexOf(".wav")>0||src.indexOf(".ogg")>0)}),_defineProperty(this,"createUrlLive",function(){var base_url=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",streamServer=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!(!base_url||!streamServer)&&(base_url=base_url.replace("{{StreamServerValue}}",streamServer))}),_defineProperty(this,"extendDefaults",function(source,properties){var property;for(property in properties)properties.hasOwnProperty(property)&&(source[property]=properties[property]);return source})};exports.default=_default},{}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _video=_interopRequireDefault(require("video.js")),_Cookies=_interopRequireDefault(require("./Cookies"));_interopRequireDefault(require("../play-pause")),function(obj){if(obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj)}(require("../volume"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}new _Cookies.default;var _default=function PlayerVideoJs(){var _this=this,setting=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,PlayerVideoJs),_defineProperty(this,"src",function(){var src=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("object"!==_typeof(this.infinyPlayer))return console.error("Player no inicializado"),!1;if(""==src)return console.error("src vacio"),!1;var src_data={src:src,type:"audio/aac"};src.indexOf(".m3u8")>0&&(src_data.type="application/x-mpegURL"),this.infinyPlayer.src(src_data)}),_defineProperty(this,"init",function(){var src=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("object"!==_typeof(_this.infinyPlayer)){var volume=_this.setting.volume;_this.infinyPlayer=(0,_video.default)(_this.id,{preload:"none"}),"string"==typeof src&&""!=src&&_this.src(src);var tmp_player=_this.infinyPlayer;_this.infinyPlayer.ready(function(){tmp_player.volume(volume)})}}),_defineProperty(this,"play",function(){_this.infinyPlayer.play()}),_defineProperty(this,"pause",function(){_this.infinyPlayer.pause()}),_defineProperty(this,"volume",function(volume){_this.infinyPlayer.volume(volume)}),_defineProperty(this,"playing",function(){return!_this.infinyPlayer.paused()}),_defineProperty(this,"duration",function(){return _this.infinyPlayer.duration()}),_defineProperty(this,"currentTime",function(time){_this.infinyPlayer.currentTime(time)}),_defineProperty(this,"getCurrentTime",function(){return _this.infinyPlayer.currentTime()}),this.id="infiny__player",this.setting=setting||{},"string"==typeof this.setting.src_audio&&""!=this.setting.src_audio&&this.init(this.setting.src_audio)};exports.default=_default},{"../play-pause":13,"../volume":16,"./Cookies":5,"video.js":117}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default={infiny_url:"https://infiny.live/player/",placeholder_image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAHlBMVEX09PTh4eH19fXg4ODk5OTw8PDs7Ozq6uru7u7n5+dZKxXMAAAELUlEQVR4nO2dWXKtMAwFwQMX9r/hB9RNMOARhCTyTv/kIxVQl4kHYZmuAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAsZ03o9eA6OfwyH360bXWz30kyd2HHvbq8LaibQdJ2V+C7Yf6RSdQsEZOxApGqWCsyJNK5qPVsEZCsHOS1tksBNFI2rsZTY8gaG0QxaCRjRj0ITS4/wvW0judguaKbjaID1f+xLEZG8/psZtV6OeKF3GbH2DHW9fbDN0WgTn/j0wvBtVYEjSM9MAwxZgKAMMW4ChDLyGxoQ/eGA0NMYPk3O9c9PH80nyGZo1A/e9l3WEiZM8DxmeZm3GH/Ib1jFNXZna0AzntTFZcigPj2E8f2M/HIoshqkEFYsih+Fu7b9XZOhvWNow4bdw85YVMBjmkqg0Kb4sHG2YaUKaFF+W5w3zefDnO5vnR/wwPxXh8YwOw1Oaz4Pbmzct8ryhLxhe+EdsivRxw/RgePW2821a/uZ5w8ILt/auZp7Ct8Qqb9g6/17XKA3BKnhK227yswirjvZtPc22yqwN912jxW6bQGW87xrx93mCuoBfNWs7JkKqIuaYeWcf04brn3ey1ITMsXrK7F9oWD1Ft+pUxPyeFXB8L1I5aJYsRnKbTcM9E5utyleQzUTVz2eSu8mKYb8km5jbLleI+xUZ4cJ+wHzgr8jqFzY85iNnfPe0vJn5uVff8mamuKMzGzrn27Xu9+3a4Bu2JddsWc3Erv4NaeWe3HTw6t9yV246Tkev3bB6V3UyfOWGDdvGU/HrNmzbFx8X0GzYvPE/asA14l+hubIhqqC4DS+UbsQc9Bpeq005S2g1vFx8c7LQani5uuikIWhohnR5wI3yqaOHnOG8ZLQpxVv1YYd1p5jhuiZOKN4sgNsrShl+F/0xxfsVfjtFoRE/yGqcfkdQwhgqyrRhmLY5tiJJjWbwvkfEcJeXOjyoNEWoVrYND4m3UJGqyla2DU+ZxUCRqoxY1DCWOv3pbsjqpCUNo4LfVqQrBBc0jAquioaylF/OMCG4KlKW8j9vmBjxk4LUSLUhm6CUIZ+gkCGjoIwhp6CIIaughCGvoIAhsyC/Ibcg+4jPLsjdhvyCzIYCgryGEoK8hoV93u83lDn+i9VQ4iGFIQwrDN2fN/z7bQhDGMIQhjCEYdnwvxrxPyKnljIadn6QgNOwMxKwGgoDwxZgKAMMW4ChDE/N2kiCoyA4eYTgPO/t/PPluyc6COrICc5kDybZ1jodhPP+u4LFg1qkofjXyR9jIgzFaaKl84Rkoen9FDci1Tmb0h5JqM6gNFo7m2R5zgVFbd8kW5nHZzJOx0MowNqhHHiL4+h2H7ARZvl4HvUHAtfD1yfpycyX6TPSfwCxE8o+JXhADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAs/ANyGFT0fw3sTAAAAABJRU5ErkJggg==",colors:{primary:"#c9c9c9",secondary:"#c9c9c9",tertiary:"#c9c9c9",text:"#fff"}}},{}],11:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.miniPlayer=function(){_Api.default.get("/".concat(_main._user_setting.radio)).then(function(data){200===data.code&&(exports._radio_data=_radio_data=data.data,"string"==typeof _main._user_setting.src_audio&&""!=_main._user_setting.src_audio?(createBar(),_player2.player.initPlayer()):function(){if(_data_server)_Api.default.get(_radio_data.timeline_new.streamServer).then(function(streamServerJson){createBar(),streamServerJson;var url_live=_utils.createUrlLive(_radio_data.timeline_new.now,streamServerJson.streamServerValue);_player2.player.initPlayer(url_live)}).catch(function(error){console.error("[error]",error)});else{createBar();var extra="";_dpssid&&(extra="?did="+_dpssid);var url_live="https://redirector.rudo.video/hls-audio/"+_sh+"/"+_channel+"/playlist/manifest/gotardisz/audio/now/livestream1.m3u8"+extra;_player2.player.initPlayer(url_live)}}())}).catch(function(error){console.error("[error]",error)})},exports.bindButtonEvents=bindButtonEvents,exports._radio_now_data=exports._radio_data=void 0;var _Api=_interopRequireDefault(require("./classes/Api")),_Utils=_interopRequireDefault(require("./classes/Utils")),_volume=require("./volume"),_player2=require("./player"),_playPause=_interopRequireDefault(require("./play-pause")),openFullPlayer=function(obj){if
1(obj&&obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&&"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&&cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&&(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&&cache.set(obj,newObj);return newObj}(require("./open-full-player")),_template=require("./template"),_main=require("./../main");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _utils=new _Utils.default,_radio_data={};exports._radio_data=_radio_data;var _radio_now_data={};exports._radio_now_data=_radio_now_data;var previous_radio=null;infiny_config.radio;function bindButtonEvents(){document.querySelector("body").addEventListener("click",function(event){if(event.target.closest(".js-play-mp3-infiny-bar")){event.preventDefault();var tmp=event.target.closest(".js-play-mp3-infiny-bar"),mp3=tmp.getAttribute("data-mp3"),image=tmp.getAttribute("data-image"),title=tmp.getAttribute("data-title"),subtitle=tmp.getAttribute("data-subtitle");document.querySelector(".js-infiny-bar__title").textContent=title,document.querySelector(".js-infiny-bar__subtitle").textContent=subtitle,document.querySelector(".js-infiny-bar__image").src=image,_player2.player.updateSrc(mp3),_player2.player.playPlayer(!0),_playPause.default.changeBtnStatusPlayPause(!0);var status=document.querySelector(".js-infiny-bar__status");status.classList.remove("is_live"),status.classList.add("is_mp3"),_template.template.printStatus("Volver al aire"),document.querySelector(".js-scroll-mp3-time").style.display="block",document.querySelector("#time").style.display="flex"}})}function createBar(){document.querySelectorAll(".js-play-mp3-infiny-bar");_template.template.init(_main._user_setting),_playPause.default.initPlayPause(),openFullPlayer.startEvent(),(0,_volume.initVolume)(),getRadioNowData();var time=document.querySelector("#time"),timeInt=document.querySelector("#mp3_duration"),timeNow=document.querySelector("#mp3_current_time");setInterval(function(){var status=document.querySelector(".js-infiny-bar__status"),timeSlider=document.querySelector(".js-scroll-mp3-time");status.classList.contains("is_mp3")&&(timeSlider.value=_player2.player.nowTimeMP3(),timeInt.innerHTML=_player2.player.currentTime(1),timeNow.innerHTML=_player2.player.currentTime(2))},1e3),document.querySelector(".js-infiny-bar__status").addEventListener("click",function(event){if(event.preventDefault(),!event.target.classList.contains("is_live")){var status=document.querySelector(".js-infiny-bar__status");updateRadioData(),_template.template.printStatus("En vivo"),status.classList.add("is_live"),status.classList.remove("is_mp3"),_player2.player.isPlaying()||setTimeout(function(){_playPause.default.playPauseStatus(!0)},1e3);var bar=document.querySelector(".js-scroll-mp3-time");bar.value=0,bar.style.display="none",time.style.display="none"}}),bindButtonEvents(),document.querySelector(".js-scroll-mp3-time").addEventListener("input",function(event){event.preventDefault();var value=event.target.value;_player2.player.setTimeMP3(value)})}function updateRadioData(){_Api.default.get("/".concat(_main._user_setting.radio)).then(function(data){if(200===data.code)if(_data_server)_Api.default.get(_radio_data.timeline_new.streamServer).then(function(streamServerJson){streamServerJson;var url_live=_utils.createUrlLive(_radio_data.timeline_new.now,streamServerJson.streamServerValue);"string"==typeof _main._user_setting.src_audio&&""!=_main._user_setting.src_audio?_player2.player.updateSrc(_main._user_setting.src_audio):_player2.player.updateSrc(url_live),getRadioNowData(),_player2.player.isPlaying()&&_player2.player.playPlayer(!0)}).catch(function(error){console.error("[error]",error)});else{exports._radio_data=_radio_data=data.data;var extra="";_dpssid&&(extra="?did="+_dpssid);var url_live="https://redirector.rudo.video/hls-audio/"+_sh+"/"+infiny_config.radio+"/playlist/manifest/gotardisz/audio/now/livestream1.m3u8"+extra;_player2.player.updateSrc(url_live),getRadioNowData(),_player2.player.isPlaying()&&_player2.player.playPlayer(!0)}}).catch(function(error){console.error("[error]",error)})}function getRadioNowData(){1==_radio_data.radio_default.menu.canciones?(_Api.default.get(_radio_data.now_playing.now+"?="+Date.now()).then(function(data){exports._radio_now_data=_radio_now_data=data,_template.template.printNowPlayingData()}).catch(function(error){_template.template.printNowPlayingData(),console.log(error)}),setTimeout(getRadioNowData,5e4)):_template.template.printNowPlayingData()}setInterval(function(){null==previous_radio?previous_radio=infiny_config.radio:previous_radio!=infiny_config.radio&&(previous_radio=infiny_config.radio,_main._user_setting.radio=previous_radio,updateRadioData(),getRadioNowData())},1e3)},{"./../main":1,"./classes/Api":4,"./classes/Utils":8,"./open-full-player":12,"./play-pause":13,"./player":14,"./template":15,"./volume":16}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.startEvent=void 0;var obj,_playPause=(obj=require("./play-pause"))&&obj.__esModule?obj:{default:obj},_player=require("./player");exports.startEvent=function(){var dot=document.querySelector(".js-open-full-player");dot&&dot.addEventListener("click",function(e){_player.player.isPlaying()&&_playPause.default.playPauseStatus(!1)})}},{"./play-pause":13,"./player":14}],13:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _Cookies=_interopRequireDefault(require("./classes/Cookies")),_callbacks=_interopRequireDefault(require("./callbacks")),_player=require("./player"),_template=require("./template"),_adsPlayer=require("./ads-
1player");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var _cookie=new _Cookies.default;function changeBtnStatusPlayPause(){var play=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],btn=document.querySelector(".js-infiny-bar__play"),status=document.querySelector(".js-infiny-bar__status");btn&&(play?(status.classList.contains("is_live")?_template.template.printStatus("En vivo"):(_template.template.printStatus("Volver al aire"),status.classList.remove("is_live")),btn.classList.remove("is-icon-play"),btn.classList.add("playing","is-icon-pause"),_cookie.setCookie("-infiny-bar-playing",1,1)):(_template.template.printStatus("Volver al aire"),status.classList.remove("is_live"),btn.classList.remove("playing","is-icon-pause"),btn.classList.add("is-icon-play"),_player.player.playPlayer(!1),_cookie.deleteCookie("-infiny-bar-playing")))}function playPauseStatus(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?(_player.player.playPlayer(!0),changeBtnStatusPlayPause(!0),(0,_callbacks.default)("play")):(_player.player.playPlayer(!1),changeBtnStatusPlayPause(!1),(0,_callbacks.default)("pause"))}var _default={initPlayPause:function(){document.querySelector(".js-infiny-bar__play").addEventListener("click",function(event){return event.preventDefault(),_adsPlayer.ads_player.isPlaying()?(console.warn("Publicidad reproduciendose"),!1):_adsPlayer.ads_player.canYouPlayAds()?(_adsPlayer.ads_player.init(),!1):void(event.target.classList.contains("playing")?playPauseStatus(!1):playPauseStatus(!0))})},playPauseStatus:playPauseStatus,changeBtnStatusPlayPause:changeBtnStatusPlayPause};exports.default=_default},{"./ads-player":2,"./callbacks":3,"./classes/Cookies":5,"./player":14,"./template":15}],14:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.player=void 0;var obj,_videojs,_VideoJs=(obj=require("./classes/Video-js"))&&obj.__esModule?obj:{default:obj},_main=(require("./index"),require("./../main"));var player={initPlayer:function(){var url_live=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_videojs=new _VideoJs.default(_main._user_setting),function(){var url_live=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("string"==typeof _main._user_setting.src_audio&&""!==_main._user_setting.src_audio)_videojs.init(_main._user_setting.src_audio);else{if(!url_live)return console.error("infiny: Url streaming vacia."),!1;_videojs.init(url_live)}}(url_live)},playPlayer:function(){arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?_videojs.pause():_videojs.play()},volume:function(){var volume=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.7;Number.isInteger(volume)&&(volume/=100),volume>1&&(volume=1),volume<0&&(volume=0),_videojs.volume(volume)},updateSrc:function(){var src=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_videojs.src(src)},isPlaying:function(){return _videojs.playing()},nowTimeMP3:function(){return _videojs.getCurrentTime()/_videojs.duration()*100},setTimeMP3:function(){var seekTime=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)/100*_videojs.duration();_videojs.currentTime(seekTime)},currentTime:function(tipo){return function(time){if(isNaN(time))return"00:00";var Hours=Math.floor(time/3600),min=Math.floor(time%3600/60),sec=Math.floor(time%60),formattedTime=Hours>0?(Hours<10?"0"+Hours:Hours)+":":"";return formattedTime+=(min<10?"0"+min:min)+":"+(sec<10?"0"+sec:sec)}(1==tipo?_videojs.duration():_videojs.getCurrentTime())}};exports.player=player},{"./../main":1,"./classes/Video-js":9,"./index":11}],15:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.template=void 0;var _TemplateBar=_interopRequireDefault(require("./classes/TemplateBar")),_TemplateModal=_interopRequireDefault(require("./classes/TemplateModal")),_Utils=_interopRequireDefault(require("./classes/Utils")),_index=require("./index"),_main=require("./../main"),_config=_interopRequireDefault(require("./config"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}var _templateBar,_templateModal,_utils=new _Utils.default;var template={init:function(){_templateBar=new _TemplateBar.default(_main._user_setting),_templateModal=new _TemplateModal.default(_main._user_setting),_templateBar.print(),_templateModal.print()},printNowPlayingData:function(){if(document.querySelector(".js-infiny-bar")){if(!document.querySelector(".js-infiny-bar__status").classList.contains("is_mp3")){document.querySelector(".js-infiny-bar__title").textContent=_index._radio_now_data.name,"object"===_typeof(_index._radio_now_data.artist)?document.querySelector(".js-infiny-bar__subtitle").textContent=_index._radio_now_data.artist.name||_index._radio_data.name:document.querySelector(".js-infiny-bar__subtitle").textContent=_index._radio_data.name;var image=_config.default.placeholder_image;"string"==typeof _main._user_setting.placeholder&&""!=_main._user_setting.placeholder&&(image=_main._user_setting.placeholder),"object"===_typeof(_index._radio_now_data.images)&&"string"==typeof _index._radio_now_data.images.small&&""!=_index._radio_now_data.images.small?image=_index._radio_now_data.images.small:"object"===_typeof(_index._radio_data.radio_default.images)&&"string"==typeof _index._radio_data.radio_default.images.small&&""!=_index._radio_data.radio_default.images.small&&(image=_index._radio_data.radio_default.images.small),document.querySelector(".js-infiny-bar__image").src=image}}else console.error("Template bar no rendereado")},printStatus:function(){var status=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"En vivo";document.querySelector(".js-infiny-bar__status").textContent=status},showModal:function(){var display=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],element=document.querySelector(".infiny-bar-modal");display?_utils.show(element):_utils.hide(element)}};exports.template=template},{"./../main":1,"./classes/TemplateBar":6,"./classes/TemplateModal":7,"./classes/Utils":8,"./config":10,"./index":11}],16:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initVolume=function(){(0,_jquery.default)("._is-js-player-volume-slider").rangeslider({polyfill:!1,onSlideEnd:function(position,value){_player.player.volume(value)}}),document.querySelector("._is-js-toggle-volume").addEventListener("click",function(event){event.preventDefault(),document.querySelector("._is-main-bar-socials-volume__content").classList.toggle("_is-is-actived")})},exports.setVolume=function(){var value=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,$slider=(0,_jquery.default)("._is-js-player-volume-slider");$slider.val(value),$slider.rangeslider("update",!0)};var _jquery=_interopRequireDefault(require("jquery")),_player=(_interopRequireDefault(require("rangeslider.js")),require("./player"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}}
1,{"./player":14,jquery:46,"rangeslider.js":72}],17:[function(require,module,exports){module.exports=function(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}},{}],18:[function(require,module,exports){var setPrototypeOf=require("./setPrototypeOf"),isNativeReflectConstruct=require("./isNativeReflectConstruct");function _construct(Parent,args,Class){return isNativeReflectConstruct()?module.exports=_construct=Reflect.construct:module.exports=_construct=function(Parent,args,Class){var a=[null];a.push.apply(a,args);var instance=new(Function.bind.apply(Parent,a));return Class&&setPrototypeOf(instance,Class.prototype),instance},_construct.apply(null,arguments)}module.exports=_construct},{"./isNativeReflectConstruct":23,"./setPrototypeOf":25}],19:[function(require,module,exports){function _extends(){return module.exports=_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}module.exports=_extends},{}],20:[function(require,module,exports){function _getPrototypeOf(o){return module.exports=_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}module.exports=_getPrototypeOf},{}],21:[function(require,module,exports){var setPrototypeOf=require("./setPrototypeOf");module.exports=function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&setPrototypeOf(subClass,superClass)}},{"./setPrototypeOf":25}],22:[function(require,module,exports){module.exports=function(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}},{}],23:[function(require,module,exports){module.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}},{}],24:[function(require,module,exports){var _typeof=require("@babel/runtime/helpers/typeof"),assertThisInitialized=require("./assertThisInitialized");module.exports=function(self,call){return!call||"object"!==_typeof(call)&&"function"!=typeof call?assertThisInitialized(self):call}},{"./assertThisInitialized":17,"@babel/runtime/helpers/typeof":26}],25:[function(require,module,exports){function _setPrototypeOf(o,p){return module.exports=_setPrototypeOf=Object.setPrototypeOf||function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}module.exports=_setPrototypeOf},{}],26:[function(require,module,exports){function _typeof(obj){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?module.exports=_typeof=function(obj){return typeof obj}:module.exports=_typeof=function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}module.exports=_typeof},{}],27:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var toUint8=function(bytes){return bytes instanceof Uint8Array?bytes:new Uint8Array(bytes&&bytes.buffer||bytes,bytes&&bytes.byteOffset||0,bytes&&bytes.byteLength||0)};exports.bytesToString=function(bytes){if(!bytes)return"";bytes=Array.prototype.slice.call(bytes);var string=String.fromCharCode.apply(null,toUint8(bytes));try{return decodeURIComponent(escape(string))}catch(e){}return string},exports.concatTypedArrays=function(){for(var _len=arguments.length,buffers=new Array(_len),_key=0;_key<_len;_key++)buffers[_key]=arguments[_key];var totalLength=buffers.reduce(function(total,buf){return total+=buf&&(buf.byteLength||buf.length)||0},0),tempBuffer=new Uint8Array(totalLength),offset=0;
1return buffers.forEach(function(buf){buf=toUint8(buf),tempBuffer.set(buf,offset),offset+=buf.byteLength}),tempBuffer},exports.isTypedArray=function(obj){return ArrayBuffer.isView(obj)},exports.stringToBytes=function(string,stringIsBytes){void 0===stringIsBytes&&(stringIsBytes=!1);return"string"!=typeof string&&string&&"function"==typeof string.toString&&(string=string.toString()),"string"!=typeof string?[]:(stringIsBytes||(string=unescape(encodeURIComponent(string))),string.split("").map(function(s){return 255&s.charCodeAt(0)}))},exports.toUint8=toUint8},{}],28:[function(require,module,exports){"use strict";function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var window__default=_interopDefaultLegacy(require("global/window")),regexs={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/},translateLegacyCodec=function(codec){return codec?codec.replace(/avc1\.(\d+)\.(\d+)/i,function(orig,profile,avcLevel){return"avc1."+("00"+Number(profile).toString(16)).slice(-2)+"00"+("00"+Number(avcLevel).toString(16)).slice(-2)}):codec},translateLegacyCodecs=function(codecs){return codecs.map(translateLegacyCodec)},parseCodecs=function(codecString){void 0===codecString&&(codecString="");var codecs=codecString.split(","),result={};return codecs.forEach(function(codec){codec=codec.trim(),["video","audio"].forEach(function(name){var match=regexs[name].exec(codec.toLowerCase());if(match&&!(match.length<=1)){var type=codec.substring(0,match[1].length),details=codec.replace(type,"");result[name]={type:type,details:details}}})}),result},isAudioCodec=function(codec){return void 0===codec&&(codec=""),regexs.audio.test(codec.trim().toLowerCase())},getMimeForCodec=function(codecString){if(codecString&&"string"==typeof codecString){var codecs=codecString.toLowerCase().split(",").map(function(c){return translateLegacyCodec(c.trim())}),type="video";1===codecs.length&&isAudioCodec(codecs[0])&&(type="audio");var container="mp4";return codecs.every(function(c){return regexs.mp4.test(c)})?container="mp4":codecs.every(function(c){return regexs.webm.test(c)})?container="webm":codecs.every(function(c){return regexs.ogg.test(c)})&&(container="ogg"),type+"/"+container+';codecs="'+codecString+'"'}};exports.DEFAULT_AUDIO_CODEC="mp4a.40.2",exports.DEFAULT_VIDEO_CODEC="avc1.4d400d",exports.browserSupportsCodec=function(codecString){return void 0===codecString&&(codecString=""),window__default.default.MediaSource&&window__default.default.MediaSource.isTypeSupported&&window__default.default.MediaSource.isTypeSupported(getMimeForCodec(codecString))||!1},exports.codecsFromDefault=function(master,audioGroupId){if(!master.mediaGroups.AUDIO||!audioGroupId)return null;var audioGroup=master.mediaGroups.AUDIO[audioGroupId];if(!audioGroup)return null;for(var name in audioGroup){var audioType=audioGroup[name];if(audioType.default&&audioType.playlists)return parseCodecs(audioType.playlists[0].attributes.CODECS)}return null},exports.getMimeForCodec=getMimeForCodec,exports.isAudioCodec=isAudioCodec,exports.isVideoCodec=function(codec){return void 0===codec&&(codec=""),regexs.video.test(codec.trim().toLowerCase())},exports.mapLegacyAvcCodecs=function(codecString){return codecString.replace(/avc1\.(\d+)\.(\d+)/i,function(match){return translateLegacyCodecs([match])[0]})},exports.muxerSupportsCodec=function(codecString){return void 0===codecString&&(codecString=""),codecString.toLowerCase().split(",").every(function(codec){return codec=codec.trim(),regexs.muxerVideo.test(codec)||regexs.muxerAudio.test(codec)})},exports.parseCodecs=parseCodecs,exports.translateLegacyCodec=translateLegacyCodec,exports.translateLegacyCodecs=translateLegacyCodecs},{"global/window":42}],29:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var toUint8=function(bytes){return bytes instanceof Uint8Array?bytes:new Uint8Array(bytes&&bytes.buffer||bytes,bytes&&bytes.byteOffset||0,bytes&&bytes.byteLength||0)},bytesToString=function(bytes){if(!bytes)return"";bytes=Array.prototype.slice.call(bytes);var string=String.fromCharCode.apply(null,toUint8(bytes));try{return decodeURIComponent(escape(string))}catch(e){}return string},id3Size=function(bytes,offset){void 0===offset&&(offset=0);var returnSize=(bytes=toUint8(bytes))[offset+6]<<21|bytes[offset+7]<<14|bytes[offset+8]<<7|bytes[offset+9];return(16&bytes[offset+5])>>
14?returnSize+20:returnSize+10},getId3Offset=function getId3Offset(bytes,offset){return void 0===offset&&(offset=0),(bytes=toUint8(bytes)).length-offset<10||"ID3"!==bytesToString(bytes.subarray(offset,offset+3))?offset:getId3Offset(bytes,offset+=id3Size(bytes,offset))},isLikely={aac:function(bytes){var offset=getId3Offset(bytes);return bytes.length>=offset+2&&255==(255&bytes[offset])&&224==(224&bytes[offset+1])&&16==(22&bytes[offset+1])},mp3:function(bytes){var offset=getId3Offset(bytes);return bytes.length>=offset+2&&255==(255&bytes[offset])&&224==(224&bytes[offset+1])&&2==(6&bytes[offset+1])},webm:function(bytes){return bytes.length>=4&&26==(255&bytes[0])&&69==(255&bytes[1])&&223==(255&bytes[2])&&163==(255&bytes[3])},mp4:function(bytes){return bytes.length>=8&&/^(f|s)typ$/.test(bytesToString(bytes.subarray(4,8)))&&!/^ftyp3g$/.test(bytesToString(bytes.subarray(4,10)))},"3gp":function(bytes){return bytes.length>=10&&/^ftyp3g$/.test(bytesToString(bytes.subarray(4,10)))},ts:function(bytes){if(bytes.length<189&&bytes.length>=1)return 71===bytes[0];for(var i=0;i+188<bytes.length&&i<188;){if(71===bytes[i]&&71===bytes[i+188])return!0;i+=1}return!1},flac:function(bytes){return bytes.length>=4&&/^fLaC$/.test(bytesToString(bytes.subarray(0,4)))},ogg:function(bytes){return bytes.length>=4&&/^OggS$/.test(bytesToString(bytes.subarray(0,4)))}},isLikelyTypes=Object.keys(isLikely).filter(function(t){return"ts"!==t}).concat("ts");isLikelyTypes.forEach(function(type){var isLikelyFn=isLikely[type];isLikely[type]=function(bytes){return isLikelyFn(toUint8(bytes))}});exports.detectContainerForBytes=function(bytes){bytes=toUint8(bytes);for(var i=0;i<isLikelyTypes.length;i++){var type=isLikelyTypes[i];if(isLikely[type](bytes))return type}return""},exports.getId3Offset=getId3Offset,exports.id3Size=id3Size,exports.isLikely=isLikely,exports.isLikelyFmp4MediaSegment=function(bytes){bytes=toUint8(bytes);for(var i=0;i<bytes.length;){var size=(bytes[i]<<24|bytes[i+1]<<16|bytes[i+2]<<8|bytes[i+3])>>>0;if("moof"===bytesToString(bytes.subarray(i+4,i+8)))return!0;0===size||size+i>bytes.length?i=bytes.length:i+=size}return!1}},{}],30:[function(require,module,exports){(function(Buffer){(function(){"use strict";function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var window__default=_interopDefaultLegacy(require("global/window")),atob=function(s){return window__default.default.atob?window__default.default.atob(s):Buffer.from(s,"base64").toString("binary")};module.exports=function(b64Text){for(var decodedString=atob(b64Text),array=new Uint8Array(decodedString.length),i=0;i<decodedString.length;i++)array[i]=decodedString.charCodeAt(i);return array}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:38,"global/window":42}],31:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MPEGURL_REGEX=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,DASH_REGEX=/^application\/dash\+xml/i;exports.simpleTypeFromSourceType=function(type){return MPEGURL_REGEX.test(type)?"hls":DASH_REGEX.test(type)?"dash":"application/vnd.videojs.vhs+json"===type?"vhs-json":null}},{}],32:[function(require,module,exports){"use strict";var URLToolkit=require("url-toolkit"),window=require("global/window");function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var URLToolkit__default=_interopDefaultLegacy(URLToolkit),window__default=_interopDefaultLegacy(window);module.exports=function(baseUrl,relativeUrl){return/^[a-z]+:/i.test(relativeUrl)?relativeUrl:(/\/\//i.test(baseUrl)||(baseUrl=URLToolkit__default.default.buildAbsoluteURL(window__default.default.location&&window__default.default.location.href||"",baseUrl)),URLToolkit__default.default.buildAbsoluteURL(baseUrl,relativeUrl))}},{"global/window":42,"url-toolkit":81}],33:[function(require,module,exports){"use strict";var Stream=function(){function Stream(){this.listeners={}}var _proto=Stream.prototype;return _proto.on=function(type,listener){this.listeners[type]||(this.listeners[type]=[]),this.listeners[type].push(listener)},_proto.off=function(type,listener){if(!this.listeners[type])return!1;var index=this.listeners[type].indexOf(listener);return this.listeners[type]=this.listeners[type].slice(0),this.listeners[type].splice(index,1),index>-1}
vendor: 6,900 bytes, line 1
1,_proto.trigger=function(type){var callbacks=this.listeners[type];if(callbacks)if(2===arguments.length)for(var length=callbacks.length,i=0;i<length;++i)callbacks[i].call(this,arguments[1]);else for(var args=Array.prototype.slice.call(arguments,1),_length=callbacks.length,_i=0;_i<_length;++_i)callbacks[_i].apply(this,args)},_proto.dispose=function(){this.listeners={}},_proto.pipe=function(destination){this.on("data",function(data){destination.push(data)})},Stream}();module.exports=Stream},{}],34:[function(require,module,exports){"use strict";var window=require("global/window"),_extends=require("@babel/runtime/helpers/extends"),isFunction=require("is-function"),parseHeaders=function(headers){var result={};return headers?(headers.trim().split("\n").forEach(function(row){var index=row.indexOf(":"),key=row.slice(0,index).trim().toLowerCase(),value=row.slice(index+1).trim();void 0===result[key]?result[key]=value:Array.isArray(result[key])?result[key].push(value):result[key]=[result[key],value]}),result):result};function initParams(uri,options,callback){var params=uri;return isFunction(options)?(callback=options,"string"==typeof uri&&(params={uri:uri})):params=_extends({},options,{uri:uri}),params.callback=callback,params}function createXHR(uri,options,callback){return _createXHR(options=initParams(uri,options,callback))}function _createXHR(options){if(void 0===options.callback)throw new Error("callback argument missing");var called=!1,callback=function(err,response,body){called||(called=!0,options.callback(err,response,body))};function getBody(){var body=void 0;if(body=xhr.response?xhr.response:xhr.responseText||function(xhr){try{if("document"===xhr.responseType)return xhr.responseXML;var firefoxBugTakenEffect=xhr.responseXML&&"parsererror"===xhr.responseXML.documentElement.nodeName;if(""===xhr.responseType&&!firefoxBugTakenEffect)return xhr.responseXML}catch(e){}return null}(xhr),isJson)try{body=JSON.parse(body)}catch(e){}return body}function errorFunc(evt){return clearTimeout(timeoutTimer),evt instanceof Error||(evt=new Error(""+(evt||"Unknown XMLHttpRequest Error"))),evt.statusCode=0,callback(evt,failureResponse)}function loadFunc(){if(!aborted){var status;clearTimeout(timeoutTimer),status=options.useXDR&&void 0===xhr.status?200:1223===xhr.status?204:xhr.status;var response=failureResponse,err=null;return 0!==status?(response={body:getBody(),statusCode:status,method:method,headers:{},url:uri,rawRequest:xhr},xhr.getAllResponseHeaders&&(response.headers=parseHeaders(xhr.getAllResponseHeaders()))):err=new Error("Internal XMLHttpRequest Error"),callback(err,response,response.body)}}var key,aborted,xhr=options.xhr||null;xhr||(xhr=options.cors||options.useXDR?new createXHR.XDomainRequest:new createXHR.XMLHttpRequest);var timeoutTimer,uri=xhr.url=options.uri||options.url,method=xhr.method=options.method||"GET",body=options.body||options.data,headers=xhr.headers=options.headers||{},sync=!!options.sync,isJson=!1,failureResponse={body:void 0,headers:{},statusCode:0,method:method,url:uri,rawRequest:xhr};if("json"in options&&!1!==options.json&&(isJson=!0,headers.accept||headers.Accept||(headers.Accept="application/json"),"GET"!==method&&"HEAD"!==method&&(headers["content-type"]||headers["Content-Type"]||(headers["Content-Type"]="application/json"),body=JSON.stringify(!0===options.json?body:options.json))),xhr.onreadystatechange=function(){4===xhr.readyState&&setTimeout(loadFunc,0)},xhr.onload=loadFunc,xhr.onerror=errorFunc,xhr.onprogress=function(){},xhr.onabort=function(){aborted=!0},xhr.ontimeout=errorFunc,xhr.open(method,uri,!sync,options.username,options.password),sync||(xhr.withCredentials=!!options.withCredentials),!sync&&options.timeout>0&&(timeoutTimer=setTimeout(function(){if(!aborted){aborted=!0,xhr.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",errorFunc(e)}},options.timeout)),xhr.setRequestHeader)for(key in headers)headers.hasOwnProperty(key)&&xhr.setRequestHeader(key,headers[key]);else if(options.headers&&!function(obj){for(var i in obj)if(obj.hasOwnProperty(i))return!1;return!0}(options.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in options&&(xhr.responseType=options.responseType),"beforeSend"in options&&"function"==typeof options.beforeSend&&options.beforeSend(xhr),xhr.send(body||null),xhr}module.exports=createXHR,module.exports.default=createXHR,createXHR.XMLHttpRequest=window.XMLHttpRequest||function(){},createXHR.XDomainRequest="withCredentials"in new createXHR.XMLHttpRequest?createXHR.XMLHttpRequest:window.XDomainRequest,function(array,iterator){for(var i=0;i<array.length;i++)iterator(array[i])}(["get","put","post","patch","head","delete"],function(method){createXHR["delete"===method?"del":method]=function(uri,options,callback){return(options=initParams(uri,options,callback)).method=method.toUpperCase(),_createXHR(options)}})},{"@babel/runtime/helpers/extends":19,"global/window":35,"is-function":45}],35:[function(require,module,exports){(function(global){(function(){var win;win="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{},module.exports=win}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],36:[function(require,module,exports){"use strict";exports.byteLength=function(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return 3*(validLen+placeHoldersLen)/4-placeHoldersLen},exports.toByteArray=function(b64){var tmp,i,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr(function(b64,validLen,placeHoldersLen){return 3*(validLen+placeHoldersLen)/4-placeHoldersLen}(0,validLen,placeHoldersLen)),curByte=0,len=placeHoldersLen>0?validLen-4:validLen;for(i=0;i<len;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[curByte++]=tmp>>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;i<len2;i+=16383)parts.push(encodeChunk(uint8,i,i+16383>len2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 6,816 bytes, line 1
1+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function getLens(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16&16711680)+(uint8[i+1]<<8&65280)+(255&uint8[i+2]),output.push(lookup[(num=tmp)>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],37:[function(require,module,exports){},{}],38:[function(require,module,exports){(function(Buffer){(function(){"use strict";var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=function(length){+length!=length&&(length=0);return Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;function createBuffer(length){if(length>K_MAX_LENGTH)throw new RangeError('The value "'+length+'" is invalid for option "size"');var buf=new Uint8Array(length);return buf.__proto__=Buffer.prototype,buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return function(string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);actual!==length&&(buf=buf.slice(0,actual));return buf}(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayLike(value);if(null==value)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer))return function(array,byteOffset,length){if(byteOffset<0||array.byteLength<byteOffset)throw new RangeError('"offset" is outside of buffer bounds');if(array.byteLength<byteOffset+(length||0))throw new RangeError('"length" is outside of buffer bounds');var buf;buf=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length);return buf.__proto__=Buffer.prototype,buf}(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError('The "value" argument must not be of type number. Received type number');var valueOf=value.valueOf&&value.valueOf();if(null!=valueOf&&valueOf!==value)return Buffer.from(valueOf,encodingOrOffset,length);var b=function(obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length),buf=createBuffer(len);return 0===buf.length?buf:(obj.copy(buf,0,0,len),buf)}if(void 0!==obj.length)return"number"!=typeof obj.length||numberIsNaN(obj.length)?createBuffer(0):fromArrayLike(obj);if("Buffer"===obj.type&&Array.isArray(obj.data))return fromArrayLike(obj.data)}(value);if(b)return b;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof value[Symbol.toPrimitive])return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be of type number');if(size<0)throw new RangeError('The value "'+size+'" is invalid for option "size"')}function allocUnsafe(size){return assertSize(size),createBuffer(size<0?0:0|checked(size))}function fromArrayLike(array){for(var length=array.length<0?0:0|checked(array.length),buf=createBuffer(length),i=0;i<length;i+=1)buf[i]=255&array[i];return buf}function checked(length){if(length>=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);var len=string.length,mustMatch=arguments.length>2&&!0===arguments[2];if(!mustMatch&&0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>
vendor: 7,326 bytes, line 1
1arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(function(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(function(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i<end;){var secondByte,thirdByte,fourthByte,tempCodePoint,firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);var res="",i=0;for(;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}(res)}exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(size,fill,encoding){return function(size,fill,encoding){return assertSize(size),size<=0?createBuffer(size):void 0!==fill?"string"==typeof encoding?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill):createBuffer(size)}(size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)},Buffer.isBuffer=function(b){return null!=b&&!0===b._isBuffer&&b!==Buffer.prototype},Buffer.compare=function(a,b){if(isInstance(a,Uint8Array)&&(a=Buffer.from(a,a.offset,a.byteLength)),isInstance(b,Uint8Array)&&(b=Buffer.from(b,b.offset,b.byteLength)),!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!Array.isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(isInstance(buf,Uint8Array)&&(buf=Buffer.from(buf)),!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(len%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(len%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):function(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}.apply(this,arguments)}
vendor: 4,231 bytes, line 1
1,Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return str=this.toString("hex",0,max).replace(/(.{2})/g,"$1 ").trim(),this.length>max&&(str+=" ... "),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(this===target)return 0;for(var x=(thisEnd>>>=0)-(thisStart>>>=0),y=(end>>>=0)-(start>>>=0),len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset>>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}
vendor: 8,669 bytes, line 1
1function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var len=this.length;(start=~~start)<0?(start+=len)<0&&(start=0):start>len&&(start=len),(end=void 0===end?len:~~end)<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);var newBuf=this.subarray(start,end);return newBuf.__proto__=Buffer.prototype,newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>
vendor: 5,750 bytes, line 1
1=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var len=end-start;if(this===target&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(targetStart,start,end);else if(this===target&&start<targetStart&&targetStart<end)for(var i=len-1;i>=0;--i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(1===val.length){var code=val.charCodeAt(0);("utf8"===encoding&&code<128||"latin1"===encoding)&&(val=code)}}else"number"==typeof val&&(val&=255);if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;var i;if(start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:Buffer.from(val,encoding),len=bytes.length;if(0===len)throw new TypeError('The value "'+val+'" is invalid for argument "value"');for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){var codePoint;units=units||1/0;for(var length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if((codePoint=string.charCodeAt(i))>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=(str=str.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!=obj}}).call(this)}).call(this,require("buffer").Buffer)},{"base64-js":36,buffer:38,ieee754:43}],39:[function(require,module,exports){var objectCreate=Object.create||function(proto){var F=function(){};return F.prototype=proto,new F},objectKeys=Object.keys||function(obj){var keys=[];for(var k in obj)Object.prototype.hasOwnProperty.call(obj,k)&&keys.push(k);return k},bind=Function.prototype.bind||function(context){var fn=this;return function(){return fn.apply(context,arguments)}};function EventEmitter(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=objectCreate(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0;var hasDefineProperty,defaultMaxListeners=10;try{var o={};Object.defineProperty&&Object.defineProperty(o,"x",{value:0}),hasDefineProperty=0===o.x}catch(err){hasDefineProperty=!1}function $getMaxListeners(that){return void 0===that._maxListeners?EventEmitter.defaultMaxListeners:that._maxListeners}function _addListener(target,type,listener,prepend){var m,events,existing;if("function"!=typeof listener)throw new TypeError('"listener" argument must be a function');if((events=target._events)?(events.newListener&&(target.emit("newListener",type,listener.listener?listener.listener:listener),events=target._events),existing=events[type]):(events=target._events=objectCreate(null),target._eventsCount=0),existing){if("function"==typeof existing?existing=events[type]=prepend?[listener,existing]:[existing,listener]:prepend?existing.unshift(listener):existing.push(listener),!existing.warned&&(m=$getMaxListeners(target))&&m>0&&existing.length>m){existing.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+' "'+String(type)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');w.name="MaxListenersExceededWarning",w.emitter=target,w.type=type,w.count=existing.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",w.name,w.message)}}else existing=events[type]=listener,++target._eventsCount;return target}
vendor: 4,809 bytes, line 1
1function onceWrapper(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var args=new Array(arguments.length),i=0;i<args.length;++i)args[i]=arguments[i];this.listener.apply(this.target,args)}}function _onceWrap(target,type,listener){var state={fired:!1,wrapFn:void 0,target:target,type:type,listener:listener},wrapped=bind.call(onceWrapper,state);return wrapped.listener=listener,state.wrapFn=wrapped,wrapped}function _listeners(target,type,unwrap){var events=target._events;if(!events)return[];var evlistener=events[type];return evlistener?"function"==typeof evlistener?unwrap?[evlistener.listener||evlistener]:[evlistener]:unwrap?function(arr){for(var ret=new Array(arr.length),i=0;i<ret.length;++i)ret[i]=arr[i].listener||arr[i];return ret}(evlistener):arrayClone(evlistener,evlistener.length):[]}function listenerCount(type){var events=this._events;if(events){var evlistener=events[type];if("function"==typeof evlistener)return 1;if(evlistener)return evlistener.length}return 0}function arrayClone(arr,n){for(var copy=new Array(n),i=0;i<n;++i)copy[i]=arr[i];return copy}hasDefineProperty?Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(arg){if("number"!=typeof arg||arg<0||arg!=arg)throw new TypeError('"defaultMaxListeners" must be a positive number');defaultMaxListeners=arg}}):EventEmitter.defaultMaxListeners=defaultMaxListeners,EventEmitter.prototype.setMaxListeners=function(n){if("number"!=typeof n||n<0||isNaN(n))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=n,this},EventEmitter.prototype.getMaxListeners=function(){return $getMaxListeners(this)},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,events,doError="error"===type;if(events=this._events)doError=doError&&null==events.error;else if(!doError)return!1;if(doError){if(arguments.length>1&&(er=arguments[1]),er instanceof Error)throw er;var err=new Error('Unhandled "error" event. ('+er+")");throw err.context=er,err}if(!(handler=events[type]))return!1;var isFn="function"==typeof handler;switch(len=arguments.length){case 1:!function(handler,isFn,self){if(isFn)handler.call(self);else for(var len=handler.length,listeners=arrayClone(handler,len),i=0;i<len;++i)listeners[i].call(self)}(handler,isFn,this);break;case 2:!function(handler,isFn,self,arg1){if(isFn)handler.call(self,arg1);else for(var len=handler.length,listeners=arrayClone(handler,len),i=0;i<len;++i)listeners[i].call(self,arg1)}(handler,isFn,this,arguments[1]);break;case 3:!function(handler,isFn,self,arg1,arg2){if(isFn)handler.call(self,arg1,arg2);else for(var len=handler.length,listeners=arrayClone(handler,len),i=0;i<len;++i)listeners[i].call(self,arg1,arg2)}(handler,isFn,this,arguments[1],arguments[2]);break;case 4:!function(handler,isFn,self,arg1,arg2,arg3){if(isFn)handler.call(self,arg1,arg2,arg3);else for(var len=handler.length,listeners=arrayClone(handler,len),i=0;i<len;++i)listeners[i].call(self,arg1,arg2,arg3)}(handler,isFn,this,arguments[1],arguments[2],arguments[3]);break;default:for(args=new Array(len-1),i=1;i<len;i++)args[i-1]=arguments[i];!function(handler,isFn,self,args){if(isFn)handler.apply(self,args);else for(var len=handler.length,listeners=arrayClone(handler,len),i=0;i<len;++i)listeners[i].apply(self,args)}(handler,isFn,this,args)}return!0},EventEmitter.prototype.addListener=function(type,listener){return _addListener(this,type,listener,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function(type,listener){return _addListener(this,type,listener,!0)},EventEmitter.prototype.once=function(type,listener){if("function"!=typeof listener)throw new TypeError('"listener" argument must be a function');return this.on(type,_onceWrap(this,type,listener)),this},EventEmitter.prototype.prependOnceListener=function(type,listener){if("function"!=typeof listener)throw new TypeError('"listener" argument must be a function');return this.prependListener(type,_onceWrap(this,type,listener)),this},EventEmitter.prototype.removeListener=function(type,listener){var list,events,position,i,originalListener;if("function"!=typeof listener)throw new TypeError('"listener" argument must be a function');if(!(events=this._events))return this;if(!(list=events[type]))return this;if(list===listener||list.listener===listener)0==--this._eventsCount?this._events=objectCreate(null):(delete events[type],events.removeListener&&this.emit
1("removeListener",type,list.listener||listener));else if("function"!=typeof list){for(position=-1,i=list.length-1;i>=0;i--)if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener,position=i;break}if(position<0)return this;0===position?list.shift():function(list,index){for(var i=index,k=i+1,n=list.length;k<n;i+=1,k+=1)list[i]=list[k];list.pop()}(list,position),1===list.length&&(events[type]=list[0]),events.removeListener&&this.emit("removeListener",type,originalListener||listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var listeners,events,i;if(!(events=this._events))return this;if(!events.removeListener)return 0===arguments.length?(this._events=objectCreate(null),this._eventsCount=0):events[type]&&(0==--this._eventsCount?this._events=objectCreate(null):delete events[type]),this;if(0===arguments.length){var key,keys=objectKeys(events);for(i=0;i<keys.length;++i)"removeListener"!==(key=keys[i])&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events=objectCreate(null),this._eventsCount=0,this}if("function"==typeof(listeners=events[type]))this.removeListener(type,listeners);else if(listeners)for(i=listeners.length-1;i>=0;i--)this.removeListener(type,listeners[i]);return this},EventEmitter.prototype.listeners=function(type){return _listeners(this,type,!0)},EventEmitter.prototype.rawListeners=function(type){return _listeners(this,type,!1)},EventEmitter.listenerCount=function(emitter,type){return"function"==typeof emitter.listenerCount?emitter.listenerCount(type):listenerCount.call(emitter,type)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],40:[function(require,module,exports){!function(global,factory){if("function"==typeof define&&define.amd)define(["exports","module"],factory);else if(void 0!==exports&&void 0!==module)factory(exports,module);else{var mod={exports:{}};factory(mod.exports,mod),global.fetchJsonp=mod.exports}}(this,function(exports,module){"use strict";var defaultOptions={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function clearFunction(functionName){try{delete window[functionName]}catch(e){window[functionName]=void 0}}function removeScript(scriptId){var script=document.getElementById(scriptId);script&&document.getElementsByTagName("head")[0].removeChild(script)}module.exports=function(_url){var options=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],url=_url,timeout=options.timeout||defaultOptions.timeout,jsonpCallback=options.jsonpCallback||defaultOptions.jsonpCallback,timeoutId=void 0;return new Promise(function(resolve,reject){var callbackFunction=options.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),scriptId=jsonpCallback+"_"+callbackFunction;window[callbackFunction]=function(response){resolve({ok:!0,json:function(){return Promise.resolve(response)}}),timeoutId&&clearTimeout(timeoutId),removeScript(scriptId),clearFunction(callbackFunction)},url+=-1===url.indexOf("?")?"?":"&";var jsonpScript=document.createElement("script");jsonpScript.setAttribute("src",""+url+jsonpCallback+"="+callbackFunction),options.charset&&jsonpScript.setAttribute("charset",options.charset),jsonpScript.id=scriptId,document.getElementsByTagName("head")[0].appendChild(jsonpScript),timeoutId=setTimeout(function(){reject(new Error("JSONP request to "+_url+" timed out")),clearFunction(callbackFunction),removeScript(scriptId),window[callbackFunction]=function(){clearFunction(callbackFunction)}},timeout),jsonpScript.onerror=function(){reject(new Error("JSONP request to "+_url+" failed")),clearFunction(callbackFunction),removeScript(scriptId),timeoutId&&clearTimeout(timeoutId)}})}})},{}],41:[function(require,module,exports){(function(global){(function(){var doccy,topLevel=void 0!==global?global:"undefined"!=typeof window?window:{},minDoc=require("min-document");"undefined"!=typeof document?doccy=document:(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"])||(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"]=minDoc),module.exports=doccy}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"min-document":37}],42:[function(require,module,exports){arguments[4][35][0].apply(exports,arguments)},{dup:35}],43:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||
10===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],44:[function(require,module,exports){(function(global){(function(){"use strict";var scheduleDrain,draining,Mutation=global.MutationObserver||global.WebKitMutationObserver;if(Mutation){var called=0,observer=new Mutation(nextTick),element=global.document.createTextNode("");observer.observe(element,{characterData:!0}),scheduleDrain=function(){element.data=called=++called%2}}else if(global.setImmediate||void 0===global.MessageChannel)scheduleDrain="document"in global&&"onreadystatechange"in global.document.createElement("script")?function(){var scriptEl=global.document.createElement("script");scriptEl.onreadystatechange=function(){nextTick(),scriptEl.onreadystatechange=null,scriptEl.parentNode.removeChild(scriptEl),scriptEl=null},global.document.documentElement.appendChild(scriptEl)}:function(){setTimeout(nextTick,0)};else{var channel=new global.MessageChannel;channel.port1.onmessage=nextTick,scheduleDrain=function(){channel.port2.postMessage(0)}}var queue=[];function nextTick(){var i,oldQueue;draining=!0;for(var len=queue.length;len;){for(oldQueue=queue,queue=[],i=-1;++i<len;)oldQueue[i]();len=queue.length}draining=!1}module.exports=function(task){1!==queue.push(task)||draining||scheduleDrain()}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(require,module,exports){module.exports=function(fn){if(!fn)return!1;var string=toString.call(fn);return"[object Function]"===string||"function"==typeof fn&&"[object RegExp]"!==string||"undefined"!=typeof window&&(fn===window.setTimeout||fn===window.alert||fn===window.confirm||fn===window.prompt)};var toString=Object.prototype.toString},{}],46:[function(require,module,exports){!function(global,factory){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=global.document?factory(global,!0):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)}:factory(global)}("undefined"!=typeof window?window:this,function(window,noGlobal){"use strict";var arr=[],getProto=Object.getPrototypeOf,slice=arr.slice,flat=arr.flat?function(array){return arr.flat.call(array)}:function(array){return arr.concat.apply([],array)},push=arr.push,indexOf=arr.indexOf,class2type={},toString=class2type.toString,hasOwn=class2type.hasOwnProperty,fnToString=hasOwn.toString,ObjectFunctionString=fnToString.call(Object),support={},isFunction=function(obj){return"function"==typeof obj&&"number"!=typeof obj.nodeType},isWindow=function(obj){return null!=obj&&obj===obj.window},document=window.document,preservedScriptAttributes={type:!0,src:!0,nonce:!0,noModule:!0};function DOMEval(code,node,doc){var i,val,script=(doc=doc||document).createElement("script");if(script.text=code,node)for(i in preservedScriptAttributes)(val=node[i]||node.getAttribute&&node.getAttribute(i))&&script.setAttribute(i,val);doc.head.appendChild(script).parentNode.removeChild(script)}function toType(obj){return null==obj?obj+"":"object"==typeof obj||"function"==typeof obj?class2type[toString.call(obj)]||"object":typeof obj}var jQuery=function(selector,context){return new jQuery.fn.init(selector,context)};function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type=toType(obj);return!isFunction(obj)&&!isWindow(obj)&&("array"===type||0===length||"number"==typeof length&&length>0&&length-1 in obj)}jQuery.fn=jQuery.prototype={jquery:"3.5.1",constructor:jQuery,length:0,toArray:function(){return slice.call(this)},get:function(num){return null==num?slice.call(this):num<0?this[num+this.length]:this[num]},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);
vendor: 6,105 bytes, line 1
1return ret.prevObject=this,ret},each:function(callback){return jQuery.each(this,callback)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(jQuery.grep(this,function(_elem,i){return(i+1)%2}))},odd:function(){return this.pushStack(jQuery.grep(this,function(_elem,i){return i%2}))},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor()},push:push,sort:arr.sort,splice:arr.splice},jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=!1;for("boolean"==typeof target&&(deep=target,target=arguments[i]||{},i++),"object"==typeof target||isFunction(target)||(target={}),i===length&&(target=this,i--);i<length;i++)if(null!=(options=arguments[i]))for(name in options)copy=options[name],"__proto__"!==name&&target!==copy&&(deep&©&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))?(src=target[name],clone=copyIsArray&&!Array.isArray(src)?[]:copyIsArray||jQuery.isPlainObject(src)?src:{},copyIsArray=!1,target[name]=jQuery.extend(deep,clone,copy)):void 0!==copy&&(target[name]=copy));return target},jQuery.extend({expando:"jQuery"+("3.5.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(msg){throw new Error(msg)},noop:function(){},isPlainObject:function(obj){var proto,Ctor;return!(!obj||"[object Object]"!==toString.call(obj))&&(!(proto=getProto(obj))||"function"==typeof(Ctor=hasOwn.call(proto,"constructor")&&proto.constructor)&&fnToString.call(Ctor)===ObjectFunctionString)},isEmptyObject:function(obj){var name;for(name in obj)return!1;return!0},globalEval:function(code,options,doc){DOMEval(code,{nonce:options&&options.nonce},doc)},each:function(obj,callback){var length,i=0;if(isArrayLike(obj))for(length=obj.length;i<length&&!1!==callback.call(obj[i],i,obj[i]);i++);else for(i in obj)if(!1===callback.call(obj[i],i,obj[i]))break;return obj},makeArray:function(arr,results){var ret=results||[];return null!=arr&&(isArrayLike(Object(arr))?jQuery.merge(ret,"string"==typeof arr?[arr]:arr):push.call(ret,arr)),ret},inArray:function(elem,arr,i){return null==arr?-1:indexOf.call(arr,elem,i)},merge:function(first,second){for(var len=+second.length,j=0,i=first.length;j<len;j++)first[i++]=second[j];return first.length=i,first},grep:function(elems,callback,invert){for(var matches=[],i=0,length=elems.length,callbackExpect=!invert;i<length;i++)!callback(elems[i],i)!==callbackExpect&&matches.push(elems[i]);return matches},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems))for(length=elems.length;i<length;i++)null!=(value=callback(elems[i],i,arg))&&ret.push(value);else for(i in elems)null!=(value=callback(elems[i],i,arg))&&ret.push(value);return flat(ret)},guid:1,support:support}),"function"==typeof Symbol&&(jQuery.fn[Symbol.iterator]=arr[Symbol.iterator]),jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_i,name){class2type["[object "+name+"]"]=name.toLowerCase()});var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),nonnativeSelectorCache=createCache(),sortOrder=function(a,b){return a===b&&(hasDuplicate=!0),0},hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,pushNative=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){for(var i=0,len=list.length;i<len;i++)if(list[i]===elem)return i;return-1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|.*)\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rdescend=new RegExp(whitespace+"|>"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rhtml=/HTML$/i,rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\([^\\r\\n\\f])","g"),funescape=function(escape,nonHex){var high="0x"+escape.slice(1)-65536;return nonHex||(high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320))},rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,fcssescape=function(ch,asCodePoint){return asCodePoint?"\0"===ch?"�":ch.slice(0,-1)+"\\"+ch.charCo
vendor: 8,646 bytes, line 1
1deAt(ch.length-1).toString(16)+" ":"\\"+ch},unloadHandler=function(){setDocument()},inDisabledFieldset=addCombinator(function(elem){return!0===elem.disabled&&"fieldset"===elem.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes),arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){pushNative.apply(target,slice.call(els))}:function(target,els){for(var j=target.length,i=0;target[j++]=els[i++];);target.length=j-1}}}function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;if(results=results||[],"string"!=typeof selector||!selector||1!==nodeType&&9!==nodeType&&11!==nodeType)return results;if(!seed&&(setDocument(context),context=context||document,documentIsHTML)){if(11!==nodeType&&(match=rquickExpr.exec(selector)))if(m=match[1]){if(9===nodeType){if(!(elem=context.getElementById(m)))return results;if(elem.id===m)return results.push(elem),results}else if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,context.getElementsByTagName(selector)),results;if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName)return push.apply(results,context.getElementsByClassName(m)),results}if(support.qsa&&!nonnativeSelectorCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))&&(1!==nodeType||"object"!==context.nodeName.toLowerCase())){if(newSelector=selector,newContext=context,1===nodeType&&(rdescend.test(selector)||rcombinators.test(selector))){for((newContext=rsibling.test(selector)&&testContext(context.parentNode)||context)===context&&support.scope||((nid=context.getAttribute("id"))?nid=nid.replace(rcssescape,fcssescape):context.setAttribute("id",nid=expando)),i=(groups=tokenize(selector)).length;i--;)groups[i]=(nid?"#"+nid:":scope")+" "+toSelector(groups[i]);newSelector=groups.join(",")}try{return push.apply(results,newContext.querySelectorAll(newSelector)),results}catch(qsaError){nonnativeSelectorCache(selector,!0)}finally{nid===expando&&context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];return function cache(key,value){return keys.push(key+" ")>Expr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el)}catch(e){return!1}finally{el.parentNode&&el.parentNode.removeChild(el),el=null}}function addHandle(attrs,handler){for(var arr=attrs.split("|"),i=arr.length;i--;)Expr.attrHandle[arr[i]]=handler}function siblingCheck(a,b){var cur=b&&a,diff=cur&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(diff)return diff;if(cur)for(;cur=cur.nextSibling;)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){return"input"===elem.nodeName.toLowerCase()&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&elem.type===type}}function createDisabledPseudo(disabled){return function(elem){return"form"in elem?elem.parentNode&&!1===elem.disabled?"label"in elem?"label"in elem.parentNode?elem.parentNode.disabled===disabled:elem.disabled===disabled:elem.isDisabled===disabled||elem.isDisabled!==!disabled&&inDisabledFieldset(elem)===disabled:elem.disabled===disabled:"label"in elem&&elem.disabled===disabled}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function testContext(context){return context&&void 0!==context.getElementsByTagName&&context}for(i in support=Sizzle.support={},isXML=Sizzle.isXML=function(elem){var namespace=elem.namespaceURI,docElem=(elem.ownerDocument||elem).documentElement;return!rhtml.test(namespace||docElem&&docElem.nodeName||"HTML")},setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;return doc!=document&&9===doc.nodeType&&doc.documentElement?(docElem=(document=doc).documentElement,documentIsHTML=!isXML(document),preferredDoc!=document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow&&(subWindow.addEventListener?subWindow.addEventListener("unload",unloadHandler,!1):subWindow.attachEvent&&subWindow.attachEvent("onunload",unloadHandler)),support.scope=assert(function(el){return docElem.appendChild(el).appendChild(document.createElement("div")),void 0!==el.querySelectorAll&&!el.querySelectorAll(":scope fieldset div").length}),support.attributes=assert(function(el){return el.className="i",!el.getAttribute("className")}),support.getElementsByTagName=assert(function(el){return el.appendChild(document.createComment("")),!el.getElementsByTagName("*").length}),support.getElementsByClassName=rnative.test(document.getElementsByClassName),support.getById=assert(function(el){return docElem.appendChild(el).id=expando,!document.getElementsByName||!document.getElementsByName(expando).length}),support.getById?(Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}},Expr.find.ID=function(id,context){if(void 0!==context.getElementById&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[]}}):(Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=void 0!==elem.getAttributeNode&&elem.getAttributeNode("id");return node&&node.value===attrId}},Expr.find.ID=function(id,context){if(void 0!==context.getElementById&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){if((node=elem.getAttributeNode("id"))&&node.value===id)return[elem];for(elems=context.getElementsByName(id),i=0;elem=elems[i++];)if((node=elem.getAttributeNode("id"))&&node.value===id)return[elem]}return[]}}),Expr.find.TAG=support.getElementsByTagName?function(tag,context){return void 0!==context.getElementsByTagName?context.getElementsByTagName(tag):support.qsa?context.querySelectorAll(tag):void 0}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if("*"===tag){for(;elem=results[i++];)1===elem.nodeType&&tmp.push(elem);return tmp}return results},Expr.find.CLASS=support.getElementsByClassName&&function(className,context){if(void 0!==context.getElementsByClassName&&documentIsHTML)return context.getElementsByClassName(className)},rbuggyMatches=[],rbuggyQSA=[],(support.qsa=rnative.test(document.querySelectorAll))&&(assert(function(el){var input;docElem.appendChild(el).innerHTML="<a id='"+expando+"'></a><select id='"+expando+"-\r\\' msallowcapture=''><option selected=''></option></select>",el.querySelectorAll("[msallowcapture^='']").length&&rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")"),el.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")"),el.querySelectorAll("[id~="+expando+"-]").length||rbuggyQSA.push("~="),(input=document.createElement("input")).setAttribute("name",""),el.appendChild(input),el.querySelectorAll("[name='']").length||rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+whitespace+"*(?:''|\"\")"),el.querySelectorAll(":checked").length||rbuggyQSA.push(":checked"),el.querySelectorAll("a#"+expando+"+*").length||rbuggyQSA.push(".#.+[+~]"),el.querySelectorAll("\\\f"),rbuggyQSA.push("[\\r\\n\\f]")}),assert(function(el){el.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var input=document.createElement("input");input.setAttribute("type","hidden"),el.appendChild(input).setAttribute("name","D"),el.querySelectorAll("[name=d]").length&&rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?="),2!==el.querySelectorAll(":enabled").length&&rbuggyQSA.push(":enabled",":disabled"),docElem.appendChild(el).disabled=!0,2!==el.querySelectorAll(":disabled").length&&rbuggyQSA.push(":enabled",":disabled"),el.querySelectorAll("*,:x"),rbuggyQSA.push(",.*:")})),(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))&&assert(function(el){support.disconnectedMatch=matches.call(el,"*"),matches.call(el,"[s!='']:x"),rbuggyMatches.push("!=",pseudos)}
vendor: 5,858 bytes, line 1
1),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|")),hasCompare=rnative.test(docElem.compareDocumentPosition),contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=9===a.nodeType?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!(!bup||1!==bup.nodeType||!(adown.contains?adown.contains(bup):a.compareDocumentPosition&&16&a.compareDocumentPosition(bup)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},sortOrder=hasCompare?function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare||(1&(compare=(a.ownerDocument||a)==(b.ownerDocument||b)?a.compareDocumentPosition(b):1)||!support.sortDetached&&b.compareDocumentPosition(a)===compare?a==document||a.ownerDocument==preferredDoc&&contains(preferredDoc,a)?-1:b==document||b.ownerDocument==preferredDoc&&contains(preferredDoc,b)?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0:4&compare?-1:1)}:function(a,b){if(a===b)return hasDuplicate=!0,0;var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup)return a==document?-1:b==document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;if(aup===bup)return siblingCheck(a,b);for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);for(;ap[i]===bp[i];)i++;return i?siblingCheck(ap[i],bp[i]):ap[i]==preferredDoc?-1:bp[i]==preferredDoc?1:0},document):document},Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)},Sizzle.matchesSelector=function(elem,expr){if(setDocument(elem),support.matchesSelector&&documentIsHTML&&!nonnativeSelectorCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&11!==elem.document.nodeType)return ret}catch(e){nonnativeSelectorCache(expr,!0)}return Sizzle(expr,document,null,[elem]).length>0},Sizzle.contains=function(context,elem){return(context.ownerDocument||context)!=document&&setDocument(context),contains(context,elem)},Sizzle.attr=function(elem,name){(elem.ownerDocument||elem)!=document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):void 0;return void 0!==val?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null},Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape)},Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)},Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;if(hasDuplicate=!support.detectDuplicates,sortInput=!support.sortStable&&results.slice(0),results.sort(sortOrder),hasDuplicate){for(;elem=results[i++];)elem===results[i]&&(j=duplicates.push(i));for(;j--;)results.splice(duplicates[j],1)}return sortInput=null,results},getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(1===nodeType||9===nodeType||11===nodeType){if("string"==typeof elem.textContent)return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(3===nodeType||4===nodeType)return elem.nodeValue}else for(;node=elem[i++];)ret+=getText(node);return ret},(Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape),"~="===match[2]&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),"nth"===match[1].slice(0,3)?(match[3]||Sizzle.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*("even"===match[3]||"odd"===match[3])),match[5]=+(match[7]+match[8]||"odd"===match[3])):match[3]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]?match[2]=match[4]||match[5]||"":unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return"*"===nodeNameSelector?function(){return!0}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test("string"==typeof elem.className&&elem.className||void 0!==elem.getAttribute&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return null==result?"!="===operator:!operator||(result+="","="===operator?result===check:"!="===operator?result!==check:"^="===operator?check&&0===result.indexOf(check):"*="===operator?check&&result.indexOf(check)>-1:"$="===operator?check&&result.slice(-check.length)===check:"~="===operator?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:"|="===operator&&(result===check||result.slice(0,check.length+1)===check+"-"))}},CHILD:function(type,what,_argument,first,last){var simple="nth"!==type.slice(0,3),forward="last"!==type.slice(-4),ofType="of-type"===what;return 1===first&&0===last?function(elem){return!!elem.parentNode}
vendor: 14,280 bytes, line 1
1:function(elem,_context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=!1;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:1===node.nodeType)return!1;start=dir="only"===type&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(diff=(nodeIndex=(cache=(uniqueCache=(outerCache=(node=parent)[expando]||(node[expando]={}))[node.uniqueID]||(outerCache[node.uniqueID]={}))[type]||[])[0]===dirruns&&cache[1])&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(1===node.nodeType&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(diff=nodeIndex=(cache=(uniqueCache=(outerCache=(node=elem)[expando]||(node[expando]={}))[node.uniqueID]||(outerCache[node.uniqueID]={}))[type]||[])[0]===dirruns&&cache[1]),!1===diff)for(;(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())&&((ofType?node.nodeName.toLowerCase()!==name:1!==node.nodeType)||!++diff||(useCache&&((uniqueCache=(outerCache=node[expando]||(node[expando]={}))[node.uniqueID]||(outerCache[node.uniqueID]={}))[type]=[dirruns,diff]),node!==elem)););return(diff-=last)===first||diff%first==0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)seed[idx=indexOf(seed,matched[i])]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,_context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))}):function(elem,_context,xml){return input[0]=elem,matcher(input,null,xml,results),input[0]=null,!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return text=text.replace(runescape,funescape),function(elem){return(elem.textContent||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){return ridentifier.test(lang||"")||Sizzle.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return(elemLang=elemLang.toLowerCase())===lang||0===elemLang.indexOf(lang+"-")}while((elem=elem.parentNode)&&1===elem.nodeType);return!1}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(!1),disabled:createDisabledPseudo(!0),checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return"input"===nodeName&&!!elem.checked||"option"===nodeName&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,!0===elem.selected},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&"button"===elem.type||"button"===name},text:function(elem){var attr;return"input"===elem.nodeName.toLowerCase()&&"text"===elem.type&&(null==(attr=elem.getAttribute("type"))||"text"===attr.toLowerCase())},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(_matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(_matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){for(var i=1;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument>length?length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;++i<length;)matchIndexes.push(i);return matchIndexes})}}).pseudos.nth=Expr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Expr.pseudos[i]=createInputPseudo(i);for(i in{submit:!0,reset:!0})Expr.pseudos[i]=createButtonPseudo(i);function setFilters(){}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";i<len;i++)selector+=tokens[i].value;return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&"parentNode"===key,doneName=done++;return combinator.first?function(elem,context,xml){for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)return matcher(elem,context,xml);return!1}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){for(;elem=elem[dir];)if((1===elem.nodeType||checkNonElements)&&matcher(elem,context,xml))return!0}else for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)if(uniqueCache=(outerCache=elem[expando]||(elem[expando]={}))[elem.uniqueID]||(outerCache[elem.uniqueID]={}),skip&&skip===elem.nodeName.toLowerCase())elem=elem[dir]||elem;else{if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName)return newCache[2]=oldCache[2];if(uniqueCache[key]=newCache,newCache[2]=matcher(elem,context,xml))return!0}return!1}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=null!=map;i<len;i++)(elem=unmatched[i])&&(filter&&!filter(elem,context,xml)||(newUnmatched.push(elem),mapped&&map.push(i)));return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){return postFilter&&!postFilter[expando]&&(postFilter=setMatcher(postFilter)),postFinder&&!postFinder[expando]&&(postFinder=setMatcher(postFinder,postSelector)),markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||function(selector,contexts,results){for(var i=0,len=contexts.length;i<len;i++)Sizzle(selector,contexts[i],results);return results}(selector||"*",context.nodeType?[context]:context,[]),matcherIn=!preFilter||!seed&&selector?elems:condense(elems,preMap,preFilter,context,xml),matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(temp=condense(matcherOut,postMap),postFilter(temp,[],context,xml),i=temp.length;i--;)(elem=temp[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed){if(postFinder||preFilter){if(postFinder){for(temp=[],i=matcherOut.length;i--;)(elem=matcherOut[i])&&temp.push(matcherIn[i]=elem);postFinder(null,matcherOut=[],temp,xml)}for(i=matcherOut.length;i--;)(elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));return checkContext=null,ret}];i<len;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if((matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches))[expando]){for(j=++i;j<len&&!Expr.relative[tokens[j].type];j++);return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:" "===tokens[i-2].type?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}return elementMatcher(matchers)}return setFilters.prototype=Expr.filters=Expr.pseudos,Expr.setFilters=new setFilters,tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached)return parseOnly?0:cached.slice(0);for(soFar=selector,groups=[],preFilters=Expr.preFilter;soFar;){for(type in matched&&!(match=rcomma.exec(soFar))||(match&&(soFar=soFar.slice(match[0].length)||soFar),groups.push(tokens=[])),matched=!1,(match=rcombinators.exec(soFar))&&(matched=match.shift(),tokens.push({value:matched,type:match[0].replace(rtrim," ")}),soFar=soFar.slice(matched.length)),Expr.filter)!(match=matchExpr[type].exec(soFar))||preFilters[type]&&!(match=preFilters[type](match))||(matched=match.shift(),tokens.push({value:matched,type:type,matches:match}),soFar=soFar.slice(matched.length));if(!matched)break}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)},compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){for(match||(match=tokenize(selector)),i=match.length;i--;)(cached=matcherFromTokens(match[i]))[expando]?setMatchers.push(cached):elementMatchers.push(cached);(cached=compilerCache(selector,function(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context==document||context||outermost);i!==len&&null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0,context||elem.ownerDocument==document||(setDocument(elem),xml=!documentIsHTML);matcher=elementMatchers[j++];)if(matcher(elem,context||document,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}(elementMatchers,setMatchers))).selector=selector}return cached},select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled="function"==typeof selector&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);if(results=results||[],1===match.length){if((tokens=match[0]=match[0].slice(0)).length>2&&"ID"===(token=tokens[0]).type&&9===context.nodeType&&documentIsHTML&&Expr.relative[tokens[1].type]){if(!(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0]))return results;compiled&&(context=context.parentNode),selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),!(selector=seed.length&&toSelector(tokens)))return push.apply(results,seed),results;break}}return(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context),results},support.sortStable=expando.split("").sort(sortOrder).join("")===expando,support.detectDuplicates=!!hasDuplicate,setDocument(),support.sortDetached=assert(function(el){return 1&el.compareDocumentPosition(document.createElement("fieldset"))}),assert(function(el){return el.innerHTML="<a href='#'></a>","#"===el.firstChild.getAttribute("href")})||addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML)return elem.getAttribute(name,"type"===name.toLowerCase()?1:2)}),support.attributes&&assert(function(el){return el.innerHTML="<input/>",el.firstChild.setAttribute("value",""),""===el.firstChild.getAttribute("value")})||addHandle("value",function(elem,_name,isXML){if(!isXML&&"input"===elem.nodeName.toLowerCase())return elem.defaultValue}),assert(function(el){return null==el.getAttribute("disabled")})||addHandle(booleans,function(elem,name,isXML){var val;if(!isXML)return!0===elem[name]?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}),Sizzle}(window);
vendor: 2,568 bytes, line 1
1jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains,jQuery.escapeSelector=Sizzle.escape;var dir=function(elem,dir,until){for(var matched=[],truncate=void 0!==until;(elem=elem[dir])&&9!==elem.nodeType;)if(1===elem.nodeType){if(truncate&&jQuery(elem).is(until))break;matched.push(elem)}return matched},siblings=function(n,elem){for(var matched=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&matched.push(n);return matched},rneedsContext=jQuery.expr.match.needsContext;function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()}var rsingleTag=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function winnow(elements,qualifier,not){return isFunction(qualifier)?jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not}):qualifier.nodeType?jQuery.grep(elements,function(elem){return elem===qualifier!==not}):"string"!=typeof qualifier?jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not}):jQuery.filter(qualifier,elements,not)}jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return 1===elem.nodeType}))},jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if("string"!=typeof selector)return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++)if(jQuery.contains(self[i],this))return!0}));for(ret=this.pushStack([]),i=0;i<len;i++)jQuery.find(selector,self[i],ret);return len>1?jQuery.uniqueSort(ret):ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector)return this;if(root=root||rootjQuery,"string"==typeof selector){if(!(match="<"===selector[0]&&">"===selector[selector.length-1]&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector))||!match[1]&&context)return!context||context.jquery?(context||root).find(selector):this.constructor(context).find(selector);
vendor: 5,757 bytes, line 1
1if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}return(elem=document.getElementById(match[2]))&&(this[0]=elem,this.length=1),this}return selector.nodeType?(this[0]=selector,this.length=1,this):isFunction(selector)?void 0!==root.ready?root.ready(selector):selector(jQuery):jQuery.makeArray(selector,this)}).prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};function sibling(cur,dir){for(;(cur=cur[dir])&&1!==cur.nodeType;);return cur}jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){for(var i=0;i<l;i++)if(jQuery.contains(this,targets[i]))return!0})},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],targets="string"!=typeof selectors&&jQuery(selectors);if(!rneedsContext.test(selectors))for(;i<l;i++)for(cur=this[i];cur&&cur!==context;cur=cur.parentNode)if(cur.nodeType<11&&(targets?targets.index(cur)>-1:1===cur.nodeType&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function(elem){return elem?"string"==typeof elem?indexOf.call(jQuery(elem),this[0]):indexOf.call(this,elem.jquery?elem[0]:elem):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,_i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,_i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,_i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){return null!=elem.contentDocument&&getProto(elem.contentDocument)?elem.contentDocument:(nodeName(elem,"template")&&(elem=elem.content||elem),jQuery.merge([],elem.childNodes))}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);return"Until"!==name.slice(-5)&&(selector=until),selector&&"string"==typeof selector&&(matched=jQuery.filter(selector,matched)),this.length>1&&(guaranteedUnique[name]||jQuery.uniqueSort(matched),rparentsprev.test(name)&&matched.reverse()),this.pushStack(matched)}});var rnothtmlwhite=/[^\x20\t\r\n\f]+/g;function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject,noValue){var method;try{value&&isFunction(method=value.promise)?method.call(value).done(resolve).fail(reject):value&&isFunction(method=value.then)?method.call(value,resolve,reject):resolve.apply(void 0,[value].slice(noValue))}catch(value){reject.apply(void 0,[value])}}jQuery.Callbacks=function(options){options="string"==typeof options?function(options){var object={};return jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=!0}),object}(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){for(locked=locked||options.once,fired=firing=!0;queue.length;firingIndex=-1)for(memory=queue.shift();++firingIndex<list.length;)!1===list[firingIndex].apply(memory[0],memory[1])&&options.stopOnFalse&&(firingIndex=list.length,memory=!1);options.memory||(memory=!1),firing=!1,locked&&(list=memory?[]:"")},self={add:function(){return list&&(memory&&!firing&&(firingIndex=list.length-1,queue.push(memory)),function add(args){jQuery.each(args,function(_,arg){isFunction(arg)?options.unique&&self.has(arg)||list.push(arg):arg&&arg.length&&"string"!==toType(arg)&&add(arg)})}(arguments),memory&&!firing&&fire()),this},remove:function(){return jQuery.each(arguments,function(_,arg){for(var index;(index=jQuery.inArray(arg,list,index))>-1;)list.splice(index,1),index<=firingIndex&&firingIndex--}),this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function(){return list&&(list=[]),this},disable:function(){return locked=queue=[],list=memory="",this},disabled:function(){return!list},lock:function(){return locked=queue=[],memory||firing||(list=memory=""),this},locked:function(){return!!locked},fireWith:function(context,args){return locked||(args=[context,(args=args||[]).slice?args.slice():args],queue.push(args),firing||fire()),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!fired}};return self},jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),this}
vendor: 11,003 bytes, line 1
1,catch:function(fn){return promise.then(null,fn)},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(_i,tuple){var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);returned&&isFunction(returned.promise)?returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject):newDefer[tuple[0]+"With"](this,fn?[returned]:arguments)})}),fns=null}).promise()},then:function(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(!(depth<maxDepth)){if((returned=handler.apply(that,args))===deferred.promise())throw new TypeError("Thenable self-resolution");then=returned&&("object"==typeof returned||"function"==typeof returned)&&returned.then,isFunction(then)?special?then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special)):(maxDepth++,then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith))):(handler!==Identity&&(that=void 0,args=[returned]),(special||deferred.resolveWith)(that,args))}},process=special?mightThrow:function(){try{mightThrow()}catch(e){jQuery.Deferred.exceptionHook&&jQuery.Deferred.exceptionHook(e,process.stackTrace),depth+1>=maxDepth&&(handler!==Thrower&&(that=void 0,args=[e]),deferred.rejectWith(that,args))}};depth?process():(jQuery.Deferred.getStackHook&&(process.stackTrace=jQuery.Deferred.getStackHook()),window.setTimeout(process))}}return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith)),tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity)),tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower))}).promise()},promise:function(obj){return null!=obj?jQuery.extend(obj,promise):promise}},deferred={};return jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add,stateString&&list.add(function(){state=stateString},tuples[3-i][2].disable,tuples[3-i][3].disable,tuples[0][2].lock,tuples[0][3].lock),list.add(tuple[3].fire),deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?void 0:this,arguments),this},deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),master=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this,resolveValues[i]=arguments.length>1?slice.call(arguments):value,--remaining||master.resolveWith(resolveContexts,resolveValues)}};if(remaining<=1&&(adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject,!remaining),"pending"===master.state()||isFunction(resolveValues[i]&&resolveValues[i].then)))return master.then();for(;i--;)adoptValue(resolveValues[i],updateFunc(i),master.reject);return master.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){window.console&&window.console.warn&&error&&rerrorNames.test(error.name)&&window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack)},jQuery.readyException=function(error){window.setTimeout(function(){throw error})};var readyList=jQuery.Deferred();function completed(){document.removeEventListener("DOMContentLoaded",completed),window.removeEventListener("load",completed),jQuery.ready()}jQuery.fn.ready=function(fn){return readyList.then(fn).catch(function(error){jQuery.readyException(error)}),this},jQuery.extend({isReady:!1,readyWait:1,ready:function(wait){(!0===wait?--jQuery.readyWait:jQuery.isReady)||(jQuery.isReady=!0,!0!==wait&&--jQuery.readyWait>0||readyList.resolveWith(document,[jQuery]))}}),jQuery.ready.then=readyList.then,"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed),window.addEventListener("load",completed));var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=null==key;if("object"===toType(key))for(i in chainable=!0,key)access(elems,fn,i,key[i],!0,emptyGet,raw);else if(void 0!==value&&(chainable=!0,isFunction(value)||(raw=!0),bulk&&(raw?(fn.call(elems,value),fn=null):(bulk=fn,fn=function(elem,_key,value){return bulk.call(jQuery(elem),value)})),fn))for(;i<len;i++)fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));return chainable?elems:bulk?fn.call(elems):len?fn(elems[0],key):emptyGet},rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g;function fcamelCase(_all,letter){return letter.toUpperCase()}function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)}var acceptData=function(owner){return 1===owner.nodeType||9===owner.nodeType||!+owner.nodeType};function Data(){this.expando=jQuery.expando+Data.uid++}Data.uid=1,Data.prototype={cache:function(owner){var value=owner[this.expando];return value||(value={},acceptData(owner)&&(owner.nodeType?owner[this.expando]=value:Object.defineProperty(owner,this.expando,{value:value,configurable:!0}))),value},set:function(owner,data,value){var prop,cache=this.cache(owner);if("string"==typeof data)cache[camelCase(data)]=value;else for(prop in data)cache[camelCase(prop)]=data[prop];return cache},get:function(owner,key){return void 0===key?this.cache(owner):owner[this.expando]&&owner[this.expando][camelCase(key)]},access:function(owner,key,value){return void 0===key||key&&"string"==typeof key&&void 0===value?this.get(owner,key):(this.set(owner,key,value),void 0!==value?value:key)},remove:function(owner,key){var i,cache=owner[this.expando];if(void 0!==cache){if(void 0!==key){i=(key=Array.isArray(key)?key.map(camelCase):(key=camelCase(key))in cache?[key]:key.match(rnothtmlwhite)||[]).length;for(;i--;)delete cache[key[i]]}(void 0===key||jQuery.isEmptyObject(cache))&&(owner.nodeType?owner[this.expando]=void 0:delete owner[this.expando])}},hasData:function(owner){var cache=owner[this.expando];return void 0!==cache&&!jQuery.isEmptyObject(cache)}};var dataPriv=new Data,dataUser=new Data,rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function dataAttr(elem,key,data){var name;if(void 0===data&&1===elem.nodeType)if(name="data-"+key.replace(rmultiDash,"-$&").toLowerCase(),"string"==typeof(data=elem.getAttribute(name))){try{data=function(data){return"true"===data||"false"!==data&&("null"===data?null:data===+data+""?+data:rbrace.test(data)?JSON.parse(data):data)}(data)}catch(e){}dataUser.set(elem,key,data)}else data=void 0;return data}jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem)},data:function(elem,name,data){return dataUser.access(elem,name,data)},removeData:function(elem,name){dataUser.remove(elem,name)},_data:function(elem,name,data){return dataPriv.access(elem,name,data)},_removeData:function(elem,name){dataPriv.remove(elem,name)}}),jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(void 0===key){if(this.length&&(data=dataUser.get(elem),1===elem.nodeType&&!dataPriv.get(elem,"hasDataAttrs"))){for(i=attrs.length;i--;)attrs[i]&&0===(name=attrs[i].name).indexOf("data-")&&(name=camelCase(name.slice(5)),dataAttr(elem,name,data[name]));dataPriv.set(elem,"hasDataAttrs",!0)}return data}return"object"==typeof key?this.each(function(){dataUser.set(this,key)}):access(this,function(value){var data;if(elem&&void 0===value)return void 0!==(data=dataUser.get(elem,key))?data:void 0!==(data=dataAttr(elem,key))?data:void 0;this.each(function(){dataUser.set(this,key,value)})},null,value,arguments.length>1,null,!0)},removeData:function(key){return this.each(function(){dataUser.remove(this,key)})}}),jQuery.extend({queue:function(elem,type,data){var queue;if(elem)return type=(type||"fx")+"queue",queue=dataPriv.get(elem,type),data&&(!queue||Array.isArray(data)?queue=dataPriv.access(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type);"inprogress"===fn&&(fn=queue.shift(),startLength--),fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,function(){jQuery.dequeue(elem,type)},hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key])})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length<setter?jQuery.queue(this[0],type):void 0===data?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type),"fx"===type&&"inprogress"!==queue[0]&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])};for("string"!=typeof type&&(obj=type,type=void 0),type=type||"fx";i--;)(tmp=dataPriv.get(elements[i],type+"queueHooks"))&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),cssExpand=["Top","Right","Bottom","Left"],documentElement=document.documentElement,isAttached=function(elem){return jQuery.contains(elem.ownerDocument,elem)},composed={composed:!0};documentElement.getRootNode&&(isAttached=function(elem){return jQuery.contains(elem.ownerDocument,elem)||elem.getRootNode(composed)===elem.ownerDocument});var isHiddenWithinTree=function(elem,el){return"none"===(elem=el||elem).style.display||""===elem.style.display&&isAttached(elem)&&"none"===jQuery.css(elem,"display")};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery.css(elem,prop,"")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=elem.nodeType&&(jQuery.cssNumber[prop]||"px"!==unit&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){for(initial/=2,unit=unit||initialInUnit[3],initialInUnit=+initial||1;maxIterations--;)jQuery.style(elem,prop,initialInUnit+unit),(1-scale)*(1-(scale=currentValue()
vendor: 9,104 bytes, line 1
1/initial||.5))<=0&&(maxIterations=0),initialInUnit/=scale;initialInUnit*=2,jQuery.style(elem,prop,initialInUnit+unit),valueParts=valueParts||[]}return valueParts&&(initialInUnit=+initialInUnit||+initial||0,adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2],tween&&(tween.unit=unit,tween.start=initialInUnit,tween.end=adjusted)),adjusted}var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];return display||(temp=doc.body.appendChild(doc.createElement(nodeName)),display=jQuery.css(temp,"display"),temp.parentNode.removeChild(temp),"none"===display&&(display="block"),defaultDisplayMap[nodeName]=display,display)}function showHide(elements,show){for(var display,elem,values=[],index=0,length=elements.length;index<length;index++)(elem=elements[index]).style&&(display=elem.style.display,show?("none"===display&&(values[index]=dataPriv.get(elem,"display")||null,values[index]||(elem.style.display="")),""===elem.style.display&&isHiddenWithinTree(elem)&&(values[index]=getDefaultDisplay(elem))):"none"!==display&&(values[index]="none",dataPriv.set(elem,"display",display)));for(index=0;index<length;index++)null!=values[index]&&(elements[index].style.display=values[index]);return elements}jQuery.fn.extend({show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(state){return"boolean"==typeof state?state?this.show():this.hide():this.each(function(){isHiddenWithinTree(this)?jQuery(this).show():jQuery(this).hide()})}});var div,input,rcheckableType=/^(?:checkbox|radio)$/i,rtagName=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,rscriptType=/^$|^module$|\/(?:java|ecma)script/i;div=document.createDocumentFragment().appendChild(document.createElement("div")),(input=document.createElement("input")).setAttribute("type","radio"),input.setAttribute("checked","checked"),input.setAttribute("name","t"),div.appendChild(input),support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,div.innerHTML="<textarea>x</textarea>",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue,div.innerHTML="<option></option>",support.option=!!div.lastChild;var wrapMap={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function getAll(context,tag){var ret;return ret=void 0!==context.getElementsByTagName?context.getElementsByTagName(tag||"*"):void 0!==context.querySelectorAll?context.querySelectorAll(tag||"*"):[],void 0===tag||tag&&nodeName(context,tag)?jQuery.merge([context],ret):ret}function setGlobalEval(elems,refElements){for(var i=0,l=elems.length;i<l;i++)dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"))}wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,support.option||(wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"]);var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){for(var elem,tmp,tag,wrap,attached,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;i<l;i++)if((elem=elems[i])||0===elem)if("object"===toType(elem))jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(rhtml.test(elem)){for(tmp=tmp||fragment.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;jQuery.merge(nodes,tmp.childNodes),(tmp=fragment.firstChild).textContent=""}else nodes.push(context.createTextNode(elem));for(fragment.textContent="",i=0;elem=nodes[i++];)if(selection&&jQuery.inArray(elem,selection)>-1)ignored&&ignored.push(elem);else if(attached=isAttached(elem),tmp=getAll(fragment.appendChild(elem),"script"),attached&&setGlobalEval(tmp),scripts)for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return fragment}var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return!0}function returnFalse(){return!1}function expectSync(elem,type){return elem===function(){try{return document.activeElement}catch(err){}}()==("focus"===type)}function on(elem,types,selector,data,fn,one){var origFn,type;if("object"==typeof types){for(type in"string"!=typeof selector&&(data=data||selector,selector=void 0),types)on(elem,type,selector,data,types[type],one);return elem}if(null==data&&null==fn?(fn=selector,data=selector=void 0):null==fn&&("string"==typeof selector?(fn=data,data=void 0):(fn=data,data=selector,selector=void 0)),!1===fn)fn=returnFalse;else if(!fn)return elem;return 1===one&&(origFn=fn,(fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)}).guid=origFn.guid||(origFn.guid=jQuery.guid++)),elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}function leverageNative(el,type,expectSync){expectSync?(dataPriv.set(el,type,!1),jQuery.event.add(el,type,{namespace:!1,handler:function(event){var notAsync,result,saved=dataPriv.get(this,type);if(1&event.isTrigger&&this[type]){if(saved.length)(jQuery.event.special[type]||{}).delegateType&&event.stopPropagation();else if(saved=slice.call(arguments),dataPriv.set(this,type,saved),notAsync=expectSync(this,type),this[type](),saved!==(result=dataPriv.get(this,type))||notAsync?dataPriv.set(this,type,!1):result={},saved!==result)return event.stopImmediatePropagation(),event.preventDefault(),result.value}else saved.length&&(dataPriv.set(this,type,{value:jQuery.event.trigger(jQuery.extend(saved[0],jQuery.Event.prototype),saved.slice(1),this)}),event.stopImmediatePropagation())}})):void 0===dataPriv.get(el,type)&&jQuery.event.add(el,type,returnTrue)}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(acceptData(elem))for(handler.handler&&(handler=(handleObjIn=handler).handler,selector=handleObjIn.selector),selector&&jQuery.find.matchesSelector(documentElement,selector),handler.guid||(handler.guid=jQuery.guid++),(events=elemData.events)||(events=elemData.events=Object.create(null)),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return void 0!==jQuery&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):void 0}),t=(types=(types||"").match(rnothtmlwhite)||[""]).length;t--;)type=origType=(tmp=rtypenamespace.exec(types[t])||[])[1],namespaces=(tmp[2]||"").split(".").sort(),type&&(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||((handlers=events[type]=[]).delegateCount=0,special.setup&&!1!==special.setup.call(elem,data,namespaces,eventHandle)||elem.addEventListener&&elem.addEventListener(type,eventHandle)),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0)},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(elemData&&(events=elemData.events)){for(t=(types=(types||"").match(rnothtmlwhite)||[""]).length;t--;)if(type=origType=(tmp=rtypenamespace.exec(types[t])||[])[1],namespaces=(tmp[2]||"").split(".").sort(),type){for(special=jQuery.event.special[type]||{},handlers=events[type=(selector?special.delegateType:special.bindType)||type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],!mappedTypes&&origType!==handleObj.origType||handler&&handler.guid!==handleObj.guid||tmp&&!tmp.test(handleObj.namespace)||selector&&selector!==handleObj.selector&&("**"!==selector||!handleObj.selector)||(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));origCount&&!handlers.length&&(special.teardown&&!1!==special.teardown.call(elem,namespaces,elemData.handle)||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}else for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);jQuery.isEmptyObject(events)&&dataPriv.remove(elem,"handle events")}},dispatch:function(nativeEvent){var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),event=jQuery.event.fix(nativeEvent),handlers=(dataPriv.get(this,"events")||Object.create(null))[event.type]||[],special=jQuery.event.special[event.type]||{};
vendor: 4,968 bytes, line 1
1for(args[0]=event,i=1;i<arguments.length;i++)args[i]=arguments[i];if(event.delegateTarget=this,!special.preDispatch||!1!==special.preDispatch.call(this,event)){for(handlerQueue=jQuery.event.handlers.call(this,event,handlers),i=0;(matched=handlerQueue[i++])&&!event.isPropagationStopped();)for(event.currentTarget=matched.elem,j=0;(handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped();)event.rnamespace&&!1!==handleObj.namespace&&!event.rnamespace.test(handleObj.namespace)||(event.handleObj=handleObj,event.data=handleObj.data,void 0!==(ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args))&&!1===(event.result=ret)&&(event.preventDefault(),event.stopPropagation()));return special.postDispatch&&special.postDispatch.call(this,event),event.result}},handlers:function(event,handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&!("click"===event.type&&event.button>=1))for(;cur!==this;cur=cur.parentNode||this)if(1===cur.nodeType&&("click"!==event.type||!0!==cur.disabled)){for(matchedHandlers=[],matchedSelectors={},i=0;i<delegateCount;i++)void 0===matchedSelectors[sel=(handleObj=handlers[i]).selector+" "]&&(matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length),matchedSelectors[sel]&&matchedHandlers.push(handleObj);matchedHandlers.length&&handlerQueue.push({elem:cur,handlers:matchedHandlers})}return cur=this,delegateCount<handlers.length&&handlerQueue.push({elem:cur,handlers:handlers.slice(delegateCount)}),handlerQueue},addProp:function(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:!0,configurable:!0,get:isFunction(hook)?function(){if(this.originalEvent)return hook(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[name]},set:function(value){Object.defineProperty(this,name,{enumerable:!0,configurable:!0,writable:!0,value:value})}})},fix:function(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent)},special:{load:{noBubble:!0},click:{setup:function(data){var el=this||data;return rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")&&leverageNative(el,"click",returnTrue),!1},trigger:function(data){var el=this||data;return rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")&&leverageNative(el,"click"),!0},_default:function(event){var target=event.target;return rcheckableType.test(target.type)&&target.click&&nodeName(target,"input")&&dataPriv.get(target,"click")||nodeName(target,"a")}},beforeunload:{postDispatch:function(event){void 0!==event.result&&event.originalEvent&&(event.originalEvent.returnValue=event.result)}}}},jQuery.removeEvent=function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle)},jQuery.Event=function(src,props){if(!(this instanceof jQuery.Event))return new jQuery.Event(src,props);src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||void 0===src.defaultPrevented&&!1===src.returnValue?returnTrue:returnFalse,this.target=src.target&&3===src.target.nodeType?src.target.parentNode:src.target,this.currentTarget=src.currentTarget,this.relatedTarget=src.relatedTarget):this.type=src,props&&jQuery.extend(this,props),this.timeStamp=src&&src.timeStamp||Date.now(),this[jQuery.expando]=!0},jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},jQuery.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(event){var button=event.button;return null==event.which&&rkeyEvent.test(event.type)?null!=event.charCode?event.charCode:event.keyCode:!event.which&&void 0!==button&&rmouseEvent.test(event.type)?1&button?1:2&button?3:4&button?2:0:event.which}},jQuery.event.addProp),jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){jQuery.event.special[type]={setup:function(){return leverageNative(this,type,expectSync),!1},trigger:function(){return leverageNative(this,type),!0},delegateType:delegateType}}
vendor: 4,327 bytes, line 1
1),jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,related=event.relatedTarget,handleObj=event.handleObj;return related&&(related===this||jQuery.contains(this,related))||(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}}),jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn)},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if("object"==typeof types){for(type in types)this.off(type,selector,types[type]);return this}return!1!==selector&&"function"!=typeof selector||(fn=selector,selector=void 0),!1===fn&&(fn=returnFalse),this.each(function(){jQuery.event.remove(this,types,fn,selector)})}});var rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function manipulationTarget(elem,content){return nodeName(elem,"table")&&nodeName(11!==content.nodeType?content:content.firstChild,"tr")&&jQuery(elem).children("tbody")[0]||elem}function disableScript(elem){return elem.type=(null!==elem.getAttribute("type"))+"/"+elem.type,elem}function restoreScript(elem){return"true/"===(elem.type||"").slice(0,5)?elem.type=elem.type.slice(5):elem.removeAttribute("type"),elem}function cloneCopyEvent(src,dest){var i,l,type,udataOld,udataCur,events;if(1===dest.nodeType){if(dataPriv.hasData(src)&&(events=dataPriv.get(src).events))for(type in dataPriv.remove(dest,"handle events"),events)for(i=0,l=events[type].length;i<l;i++)jQuery.event.add(dest,type,events[type][i]);dataUser.hasData(src)&&(udataOld=dataUser.access(src),udataCur=jQuery.extend({},udataOld),dataUser.set(dest,udataCur))}}function domManip(collection,args,callback,ignored){args=flat(args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],valueIsFunction=isFunction(value);if(valueIsFunction||l>1&&"string"==typeof value&&!support.checkClone&&rchecked.test(value))return collection.each(function(index){var self=collection.eq(index);valueIsFunction&&(args[0]=value.call(this,index,self.html())),domManip(self,args,callback,ignored)});if(l&&(first=(fragment=buildFragment(args,collection[0].ownerDocument,!1,collection,ignored)).firstChild,1===fragment.childNodes.length&&(fragment=first),first||ignored)){for(hasScripts=(scripts=jQuery.map(getAll(fragment,"script"),disableScript)).length;i<l;i++)node=fragment,i!==iNoClone&&(node=jQuery.clone(node,!0,!0),hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(collection[i],node,i);if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;i<hasScripts;i++)node=scripts[i],rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src&&"module"!==(node.type||"").toLowerCase()?jQuery._evalUrl&&!node.noModule&&jQuery._evalUrl(node.src,{nonce:node.nonce||node.getAttribute("nonce")},doc):DOMEval(node.textContent.replace(rcleanScript,""),node,doc))}return collection}function remove(elem,selector,keepData){for(var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;null!=(node=nodes[i]);i++)keepData||1!==node.nodeType||jQuery.cleanData(getAll(node)),node.parentNode&&(keepData&&isAttached(node)&&setGlobalEval(getAll(node,"script")),node.parentNode.removeChild(node));return elem}jQuery.extend({htmlPrefilter:function(html){return html},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,src,dest,nodeName,clone=elem.cloneNode(!0),inPage=isAttached(elem);if(!(support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),i=0,l=(srcElements=getAll(elem)).length;i<l;i++)src=srcElements[i],dest=destElements[i],nodeName=void 0,"input"===(nodeName=dest.nodeName.toLowerCase())&&rcheckableType.test(src.type)?de
vendor: 4,596 bytes, line 1
1st.checked=src.checked:"input"!==nodeName&&"textarea"!==nodeName||(dest.defaultValue=src.defaultValue);if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0,l=srcElements.length;i<l;i++)cloneCopyEvent(srcElements[i],destElements[i]);else cloneCopyEvent(elem,clone);return(destElements=getAll(clone,"script")).length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),clone},cleanData:function(elems){for(var data,elem,type,special=jQuery.event.special,i=0;void 0!==(elem=elems[i]);i++)if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);elem[dataPriv.expando]=void 0}elem[dataUser.expando]&&(elem[dataUser.expando]=void 0)}}}),jQuery.fn.extend({detach:function(selector){return remove(this,selector,!0)},remove:function(selector){return remove(this,selector)},text:function(value){return access(this,function(value){return void 0===value?jQuery.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=value)})},null,value,arguments.length)},append:function(){return domManip(this,arguments,function(elem){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||manipulationTarget(this,elem).appendChild(elem)})},prepend:function(){return domManip(this,arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return domManip(this,arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)})},after:function(){return domManip(this,arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)})},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++)1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.textContent="");return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null!=dataAndEvents&&dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(void 0===value&&1===elem.nodeType)return elem.innerHTML;if("string"==typeof value&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++)1===(elem=this[i]||{}).nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.innerHTML=value);elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;jQuery.inArray(this,ignored)<0&&(jQuery.cleanData(getAll(this)),parent&&parent.replaceChild(elem,this))},ignored)}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;i<=last;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),push.apply(ret,elems.get());return this.pushStack(ret)}});var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"),getStyles=function(elem){var view=elem.ownerDocument.defaultView;return view&&view.opener||(view=window),view.getComputedStyle(elem)},swap=function(elem,options,callback){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];for(name in ret=callback.call(elem),options)elem.style[name]=old[name];return ret},rboxStyle=new RegExp(cssExpand.join("|"),"i");function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;return(computed=computed||getStyles(elem))&&(""!==(ret=computed.getPropertyValue(name)||computed[name])||isAttached(elem)||(ret=jQuery.style(elem,name)),!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),void 0!==ret?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(!conditionFn())return(this.get=hookFn).apply(this,arguments);delete this.get}}}!function(){function computeStyleTests(){if(div){container.style.cssText="position:absolute;
1left:-11111px;width:60px;margin-top:1px;padding:0;border:0",div.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",documentElement.appendChild(container).appendChild(div);var divStyle=window.getComputedStyle(div);pixelPositionVal="1%"!==divStyle.top,reliableMarginLeftVal=12===roundPixelMeasures(divStyle.marginLeft),div.style.right="60%",pixelBoxStylesVal=36===roundPixelMeasures(divStyle.right),boxSizingReliableVal=36===roundPixelMeasures(divStyle.width),div.style.position="absolute",scrollboxSizeVal=12===roundPixelMeasures(div.offsetWidth/3),documentElement.removeChild(container),div=null}}function roundPixelMeasures(measure){return Math.round(parseFloat(measure))}var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,reliableTrDimensionsVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");div.style&&(div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle="content-box"===div.style.backgroundClip,jQuery.extend(support,{boxSizingReliable:function(){return computeStyleTests(),boxSizingReliableVal},pixelBoxStyles:function(){return computeStyleTests(),pixelBoxStylesVal},pixelPosition:function(){return computeStyleTests(),pixelPositionVal},reliableMarginLeft:function(){return computeStyleTests(),reliableMarginLeftVal},scrollboxSize:function(){return computeStyleTests(),scrollboxSizeVal},reliableTrDimensions:function(){var table,tr,trChild,trStyle;return null==reliableTrDimensionsVal&&(table=document.createElement("table"),tr=document.createElement("tr"),trChild=document.createElement("div"),table.style.cssText="position:absolute;left:-11111px",tr.style.height="1px",trChild.style.height="9px",documentElement.appendChild(table).appendChild(tr).appendChild(trChild),trStyle=window.getComputedStyle(tr),reliableTrDimensionsVal=parseInt(trStyle.height)>3,documentElement.removeChild(table)),reliableTrDimensionsVal}}))}();var cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style,vendorProps={};function finalPropName(name){var final=jQuery.cssProps[name]||vendorProps[name];return final||(name in emptyStyle?name:vendorProps[name]=function(name){for(var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;i--;)if((name=cssPrefixes[i]+capName)in emptyStyle)return name}(name)||name)}var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rcustomProp=/^--/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"};function setPositiveNumber(_elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value}function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i="width"===dimension?1:0,extra=0,delta=0;if(box===(isBorderBox?"border":"content"))return 0;for(;i<4;i+=2)"margin"===box&&(delta+=jQuery.css(elem,box+cssExpand[i],!0,styles)),isBorderBox?("content"===box&&(delta-=jQuery.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==box&&(delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(delta+=jQuery.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==box?delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles):extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles));return!isBorderBox&&computedVal>=0&&(delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-computedVal-delta-extra-.5))||0),delta}function getWidthOrHeight(elem,dimension,extra){var styles=getStyles(elem),isBorderBox=(!support.boxSizingReliable()||extra)&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles),valueIsBorderBox=isBorderBox,val=curCSS(elem,dimension,styles),offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);if(rnumnonpx.test(val)){if(!extra)return val;val="auto"}return(!support.boxSizingReliable()&&isBorderBox||!support.reliableTrDimensions()&&nodeName(elem,"tr")||"auto"===val||!parseFloat(val)&&"inline"===jQuery.css(elem,"display",!1,styles))&&elem.getClientRects().length&&(isBorderBox="border-box"===jQuery.css(elem,"boxSizing",!1,styles),(valueIsBorderBox=offsetProp in elem)&&(val=elem[offsetProp])),(val=parseFloat(val)||0)+boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,val)+"px"}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return""===ret?"1":ret}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=camelCase(name),isCu
vendor: 7,328 bytes, line 1
1stomProp=rcustomProp.test(name),style=elem.style;if(isCustomProp||(name=finalPropName(origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],void 0===value)return hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,!1,extra))?ret:style[name];"string"===(type=typeof value)&&(ret=rcssNum.exec(value))&&ret[1]&&(value=adjustCSS(elem,name,ret),type="number"),null!=value&&value==value&&("number"!==type||isCustomProp||(value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px")),support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),hooks&&"set"in hooks&&void 0===(value=hooks.set(elem,value,extra))||(isCustomProp?style.setProperty(name,value):style[name]=value))}},css:function(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name);return rcustomProp.test(name)||(name=finalPropName(origName)),(hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName])&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),void 0===val&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),!0===extra||isFinite(num)?num||0:val):val}}),jQuery.each(["height","width"],function(_i,dimension){jQuery.cssHooks[dimension]={get:function(elem,computed,extra){if(computed)return!rdisplayswap.test(jQuery.css(elem,"display"))||elem.getClientRects().length&&elem.getBoundingClientRect().width?getWidthOrHeight(elem,dimension,extra):swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra)})},set:function(elem,value,extra){var matches,styles=getStyles(elem),scrollboxSizeBuggy=!support.scrollboxSize()&&"absolute"===styles.position,isBorderBox=(scrollboxSizeBuggy||extra)&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles),subtract=extra?boxModelAdjustment(elem,dimension,extra,isBorderBox,styles):0;return isBorderBox&&scrollboxSizeBuggy&&(subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-parseFloat(styles[dimension])-boxModelAdjustment(elem,dimension,"border",!1,styles)-.5)),subtract&&(matches=rcssNum.exec(value))&&"px"!==(matches[3]||"px")&&(elem.style[dimension]=value,value=jQuery.css(elem,dimension)),setPositiveNumber(0,value,subtract)}}}),jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed)return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left}))+"px"}),jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){for(var i=0,expanded={},parts="string"==typeof value?value.split(" "):[value];i<4;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}},"margin"!==prefix&&(jQuery.cssHooks[prefix+suffix].set=setPositiveNumber)}),jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){for(styles=getStyles(elem),len=name.length;i<len;i++)map[name[i]]=jQuery.css(elem,name[i],!1,styles);return map}return void 0!==value?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem,this.prop=prop,this.easing=easing||jQuery.easing._default,this.options=options,this.start=this.now=this.cur(),this.end=end,this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.options.duration?this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):this.pos=eased=percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(tween){var result;return 1!==tween.elem.nodeType||null!=tween.elem[tween.prop]&&null==tween.elem.style[tween.prop]?tween.elem[tween.prop]:(result=jQuery.css(tween.elem,tween.prop,""))&&"auto"!==result?result:0},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):1!==tween.elem.nodeType||!jQuery.cssHooks[tween.prop]&&null==tween.elem.style[finalPropName(tween.prop)]?tween.elem[tween.prop]=tween.now:jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}},jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2},_default:"swing"},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){inProgress&&(!1===document.hidden&&window.requestAnimationFrame?window.requestAnimationFrame(schedule):window.setTimeout(schedule,jQuery.fx.interval),jQuery.fx.tick())}function createFxNow(){return window.setTimeout(function(){fxNow=void 0}),fxNow=Date.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};for(includeWidth=includeWidth?1:0;i<4;i+=2-includeWidth)attrs["margin"+(which=cssExpand[i])]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function createTween(value,prop,animation){for(var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;index<length;index++)if(tween=collection[index].call(animation,prop,value))return tween}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped)return!1;for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),percent=1-(remaining/animation.duration||0),index=0,length=animation.tweens.length;index<length;index++)animation.tweens[index].run(percent);return deferred.notifyWith(elem,[animation,percent,remaining]),percent<1&&length?remaining:(length||deferred.notifyWith(elem,[animation,1,0]),deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);return animation.tweens.push(tween),tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=!0;index<length;index++)animation.tweens[index].run(1);return gotoEnd?(deferred.notifyWith(elem,[animation,1,0]),deferred.resolveWith(elem,[animation,gotoEnd])):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(!function(props,specialEasing){var index,name,easing,value,hooks;
vendor: 10,876 bytes, line 1
1for(index in props)if(easing=specialEasing[name=camelCase(index)],value=props[index],Array.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),(hooks=jQuery.cssHooks[name])&&"expand"in hooks)for(index in value=hooks.expand(value),delete props[name],value)index in props||(props[index]=value[index],specialEasing[index]=easing);else specialEasing[name]=easing}(props,animation.opts.specialEasing);index<length;index++)if(result=Animation.prefilters[index].call(animation,elem,props,animation.opts))return isFunction(result.stop)&&(jQuery._queueHooks(animation.elem,animation.opts.queue).stop=result.stop.bind(result)),result;return jQuery.map(props,createTween,animation),isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always),jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})),animation}jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);return adjustCSS(tween.elem,prop,rcssNum.exec(value),tween),tween}]},tweener:function(props,callback){isFunction(props)?(callback=props,props=["*"]):props=props.match(rnothtmlwhite);for(var prop,index=0,length=props.length;index<length;index++)prop=props[index],Animation.tweeners[prop]=Animation.tweeners[prop]||[],Animation.tweeners[prop].unshift(callback)},prefilters:[function(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");for(prop in opts.queue||(null==(hooks=jQuery._queueHooks(elem,"fx")).unqueued&&(hooks.unqueued=0,oldfire=hooks.empty.fire,hooks.empty.fire=function(){hooks.unqueued||oldfire()}),hooks.unqueued++,anim.always(function(){anim.always(function(){hooks.unqueued--,jQuery.queue(elem,"fx").length||hooks.empty.fire()})})),props)if(value=props[prop],rfxtypes.test(value)){if(delete props[prop],toggle=toggle||"toggle"===value,value===(hidden?"hide":"show")){if("show"!==value||!dataShow||void 0===dataShow[prop])continue;hidden=!0}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}if((propTween=!jQuery.isEmptyObject(props))||!jQuery.isEmptyObject(orig))for(prop in isBox&&1===elem.nodeType&&(opts.overflow=[style.overflow,style.overflowX,style.overflowY],null==(restoreDisplay=dataShow&&dataShow.display)&&(restoreDisplay=dataPriv.get(elem,"display")),"none"===(display=jQuery.css(elem,"display"))&&(restoreDisplay?display=restoreDisplay:(showHide([elem],!0),restoreDisplay=elem.style.display||restoreDisplay,display=jQuery.css(elem,"display"),showHide([elem]))),("inline"===display||"inline-block"===display&&null!=restoreDisplay)&&"none"===jQuery.css(elem,"float")&&(propTween||(anim.done(function(){style.display=restoreDisplay}),null==restoreDisplay&&(display=style.display,restoreDisplay="none"===display?"":display)),style.display="inline-block")),opts.overflow&&(style.overflow="hidden",anim.always(function(){style.overflow=opts.overflow[0],style.overflowX=opts.overflow[1],style.overflowY=opts.overflow[2]})),propTween=!1,orig)propTween||(dataShow?"hidden"in dataShow&&(hidden=dataShow.hidden):dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay}),toggle&&(dataShow.hidden=!hidden),hidden&&showHide([elem],!0),anim.done(function(){for(prop in hidden||showHide([elem]),dataPriv.remove(elem,"fxshow"),orig)jQuery.style(elem,prop,orig[prop])})),propTween=createTween(hidden?dataShow[prop]:0,prop,anim),prop in dataShow||(dataShow[prop]=propTween.start,hidden&&(propTween.end=propTween.start,propTween.start=0))}],prefilter:function(callback,prepend){prepend?Animation.prefilters.unshift(callback):Animation.prefilters.push(callback)}}),jQuery.speed=function(speed,easing,fn){var opt=speed&&"object"==typeof speed?jQuery.extend({},speed):{complete:fn||!fn&&easing||isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!isFunction(easing)&&easing};return jQuery.fx.off?opt.duration=0:"number"!=typeof opt.duration&&(opt.duration in jQuery.fx.speeds?opt.duration=jQuery.fx.speeds[opt.duration]:opt.duration=jQuery.fx.speeds._default),null!=opt.queue&&!0!==opt.queue||(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){isFunction(opt.old)&&opt.old.call(this),opt.queue&&jQuery.dequeue(this,opt.queue)},opt},jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);(empty||dataPriv.get(this,"finish"))&&anim.stop(!0)};return doAnimation.finish=doAnimation,empty||!1===optall.queue?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop,stop(gotoEnd)};return"string"!=typeof type&&(gotoEnd=clearQueue,clearQueue=type,type=void 0),clearQueue&&this.queue(type||"fx",[]),this.each(function(){var dequeue=!0,index=null!=type&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index)data[index]&&data[index].stop&&stopQueue(data[index]);else for(index in data)data[index]&&data[index].stop&&rrun.test(index)&&stopQueue(data[index]);for(index=timers.length;index--;)timers[index].elem!==this||null!=type&&timers[index].queue!==type||(timers[index].anim.stop(gotoEnd),dequeue=!1,timers.splice(index,1));!dequeue&&gotoEnd||jQuery.dequeue(this,type)})},finish:function(type){return!1!==type&&(type=type||"fx"),this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;for(data.finish=!0,jQuery.queue(this,type,[]),hooks&&hooks.stop&&hooks.stop.call(this,!0),index=timers.length;index--;)timers[index].elem===this&&timers[index].queue===type&&(timers[index].anim.stop(!0),timers.splice(index,1));for(index=0;index<length;index++)queue[index]&&queue[index].finish&&queue[index].finish.call(this);delete data.finish})}}),jQuery.each(["toggle","show","hide"],function(_i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return null==speed||"boolean"==typeof speed?cssFn.apply(this,arguments):this.animate(genFx(name,!0),speed,easing,callback)}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}}),jQuery.timers=[],jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;for(fxNow=Date.now();i<timers.length;i++)(timer=timers[i])()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop(),fxNow=void 0},jQuery.fx.timer=function(timer){jQuery.timers.push(timer),jQuery.fx.start()},jQuery.fx.interval=13,jQuery.fx.start=function(){inProgress||(inProgress=!0,schedule())},jQuery.fx.stop=function(){inProgress=null},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fn.delay=function(time,type){return time=jQuery.fx&&jQuery.fx.speeds[time]||time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout)}})},function(){var input=document.createElement("input"),opt=document.createElement("select").appendChild(document.createElement("option"));input.type="checkbox",support.checkOn=""!==input.value,support.optSelected=opt.selected,(input=document.createElement("input")).value="t",input.type="radio",support.radioValue="t"===input.value}();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}}),jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return void 0===elem.getAttribute?jQuery.prop(elem,name,value):(1===nType&&jQuery.isXMLDoc(elem)||(hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:void 0)),void 0!==value?null===value?void jQuery.removeAttr(elem,name):hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:(elem.setAttribute(name,value+""),value):hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:null==(ret=jQuery.find.attr(elem,name))?void 0:ret)},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&"radio"===value&&nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)elem.removeAttribute(name)}}),boolHook={set:function(elem,value,name){return!1===value?jQuery.removeAttr(elem,name):elem.setAttribute(name,name),name}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();return isXML||(handle=attrHandle[lowercaseName],attrHandle[lowercaseName]=ret,ret=null!=getter(elem,name,isXML)?lowercaseName:null,attrHandle[lowercaseName]=handle),ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;function stripAndCollapse(value){return(value.match(rnothtmlwhite)||[]).join(" ")}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||""}function classesToArray(value){return Array.isArray(value)?value:"string"==typeof value&&value.match(rnothtmlwhite)||[]}jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}}),jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return 1===nType&&jQuery.isXMLDoc(elem)||(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?
vendor: 15,240 bytes, line 1
10:-1}}},propFix:{for:"htmlFor",class:"className"}}),support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&parent.parentNode&&parent.parentNode.selectedIndex,null},set:function(elem){var parent=elem.parentNode;parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex)}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this}),jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)))});if((classes=classesToArray(value)).length)for(;elem=this[i++];)if(curValue=getClass(elem),cur=1===elem.nodeType&&" "+stripAndCollapse(curValue)+" "){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");curValue!==(finalValue=stripAndCollapse(cur))&&elem.setAttribute("class",finalValue)}return this},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)))});if(!arguments.length)return this.attr("class","");if((classes=classesToArray(value)).length)for(;elem=this[i++];)if(curValue=getClass(elem),cur=1===elem.nodeType&&" "+stripAndCollapse(curValue)+" "){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>-1;)cur=cur.replace(" "+clazz+" "," ");curValue!==(finalValue=stripAndCollapse(cur))&&elem.setAttribute("class",finalValue)}return this},toggleClass:function(value,stateVal){var type=typeof value,isValidValue="string"===type||Array.isArray(value);return"boolean"==typeof stateVal&&isValidValue?stateVal?this.addClass(value):this.removeClass(value):isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)}):this.each(function(){var className,i,self,classNames;if(isValidValue)for(i=0,self=jQuery(this),classNames=classesToArray(value);className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else void 0!==value&&"boolean"!==type||((className=getClass(this))&&dataPriv.set(this,"__className__",className),this.setAttribute&&this.setAttribute("class",className||!1===value?"":dataPriv.get(this,"__className__")||""))})},hasClass:function(selector){var className,elem,i=0;for(className=" "+selector+" ";elem=this[i++];)if(1===elem.nodeType&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1)return!0;return!1}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,valueIsFunction,elem=this[0];return arguments.length?(valueIsFunction=isFunction(value),this.each(function(i){var val;1===this.nodeType&&(null==(val=valueIsFunction?value.call(this,i,jQuery(this).val()):value)?val="":"number"==typeof val?val+="":Array.isArray(val)&&(val=jQuery.map(val,function(value){return null==value?"":value+""})),(hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()])&&"set"in hooks&&void 0!==hooks.set(this,val,"value")||(this.value=val))})):elem?(hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()])&&"get"in hooks&&void 0!==(ret=hooks.get(elem,"value"))?ret:"string"==typeof(ret=elem.value)?ret.replace(rreturn,""):null==ret?"":ret:void 0}}),jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return null!=val?val:stripAndCollapse(jQuery.text(elem))}},select:{get:function(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type,values=one?null:[],max=one?index+1:options.length;for(i=index<0?max:one?index:0;i<max;i++)if(((option=options[i]).selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;values.push(value)}return values},set:function(elem,value){for(var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;i--;)((option=options[i]).selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1)&&(optionSet=!0);return optionSet||(elem.selectedIndex=-1),values}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(Array.isArray(value))return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1}},support.checkOn||(jQuery.valHooks[this].get=function(elem){return null===elem.getAttribute("value")?"on":elem.value})}),support.focusin="onfocusin"in window;var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function(e){e.stopPropagation()};jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];if(cur=lastElement=tmp=elem=elem||document,3!==elem.nodeType&&8!==elem.nodeType&&!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf(".")>-1&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,(event=event[jQuery.expando]?event:new jQuery.Event(type,"object"==typeof event&&event)).isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=void 0,event.target||(event.target=elem),data=null==data?[event]:jQuery.makeArray(data,[event]),special=jQuery.event.special[type]||{},onlyHandlers||!special.trigger||!1!==special.trigger.apply(elem,data))){if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)lastElement=cur,event.type=i>1?bubbleType:special.bindType||type,(handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&dataPriv.get(cur,"handle"))&&handle.apply(cur,data),(handle=ontype&&cur[ontype])&&handle.apply&&acceptData(cur)&&(event.result=handle.apply(cur,data),!1===event.result&&event.preventDefault());return event.type=type,onlyHandlers||event.isDefaultPrevented()||special._default&&!1!==special._default.apply(eventPath.pop(),data)||!acceptData(elem)||ontype&&isFunction(elem[type])&&!isWindow(elem)&&((tmp=elem[ontype])&&(elem[ontype]=null),jQuery.event.triggered=type,event.isPropagationStopped()&&lastElement.addEventListener(type,stopPropagationCallback),elem[type](),event.isPropagationStopped()&&lastElement.removeEventListener(type,stopPropagationCallback),jQuery.event.triggered=void 0,tmp&&(elem[ontype]=tmp)),event.result}},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0});jQuery.event.trigger(e,null,elem)}}),jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem)return jQuery.event.trigger(type,data,elem,!0)}}),support.focusin||jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event))};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this.document||this,attaches=dataPriv.access(doc,fix);attaches||doc.addEventListener(orig,handler,!0),dataPriv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this.document||this,attaches=dataPriv.access(doc,fix)-1;attaches?dataPriv.access(doc,fix,attaches):(doc.removeEventListener(orig,handler,!0),dataPriv.remove(doc,fix))}}});var location=window.location,nonce={guid:Date.now()},rquery=/\?/;jQuery.parseXML=function(data){var xml;if(!data||"string"!=typeof data)return null;try{xml=(new window.DOMParser).parseFromString(data,"text/xml")}catch(e){xml=void 0}return xml&&!xml.getElementsByTagName("parsererror").length||jQuery.error("Invalid XML: "+data),xml};var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj))jQuery.each(obj,function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+("object"==typeof v&&null!=v?i:"")+"]",v,traditional,add)});else if(traditional||"object"!==toType(obj))add(prefix,obj);else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(null==value?"":value)};if(null==a)return"";if(Array.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(_i,elem){var val=jQuery(this).val();return null==val?null:Array.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){"string"!=typeof dataTypeExpression&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func))for(;dataType=dataTypes[i++];)"+"===dataType[0]?(dataType=dataType.slice(1)||"*",(structure[dataType]=structure[dataType]||[]).unshift(func)):(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;return inspected[dataType]=!0,jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);return"string"!=typeof dataTypeOrTransport||seekingTransport||inspected[dataTypeOrTransport]?seekingTransport?!(selected=dataTypeOrTransport):void 0:(options.dataTypes.unshift(dataTypeOrTransport),inspect(dataTypeOrTransport),!1)}),selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)void 0!==src[key]&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);return deep&&jQuery.extend(!0,target,deep),target}originAnchor.href=location.href,jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(location.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){"object"==typeof url&&(options=url,url=void 0),options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()+" "]=(responseHeaders[match[1].toLowerCase()+" "]||[]).concat(match[2]);match=responseHeaders[key.toLowerCase()+" "]}return null==match?null:match.join(", ")},getAllResponseHeaders:function(){return completed?responseHeadersString:null},setRequestHeader:function(name,value){return null==completed&&(name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return null==completed&&(s.mimeType=type),this},statusCode:function(map){var code;if(map)if(completed)jqXHR.always(map[jqXHR.status]);else for(code in map)statusCode[code]=[statusCode[code],map[code]];return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR),s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""],null==s.crossDomain){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url,urlAnchor.href=urlAnchor.href,s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!=urlAnchor.protocol+"//"+urlAnchor.host}catch(e){s.crossDomain=!0}}if(s.data&&s.processData&&"string"!=typeof s.data&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),completed)return jqXHR;for(i in(fireGlobals=jQuery.event&&s.global)&&0==jQuery.active++&&jQuery.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!rnoContent.test(s.type),cacheURL=s.url.replace(rhash,""),s.hasContent?s.data&&s.processData&&0===(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&(s.data=s.data.replace(r20,"+")):(uncached=s.url.slice(cacheURL.length),s.data&&(s.processData||"string"==typeof s.data)&&(cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),!1===s.cache&&(cacheURL=cache
vendor: 8,692 bytes, line 1
1URL.replace(rantiCache,"$1"),uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce.guid+++uncached),s.url=cacheURL+uncached),s.ifModified&&(jQuery.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]),jQuery.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])),(s.data&&s.hasContent&&!1!==s.contentType||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType),jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+allTypes+"; q=0.01":""):s.accepts["*"]),s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(!1===s.beforeSend.call(callbackContext,jqXHR,s)||completed))return jqXHR.abort();if(strAbort="abort",completeDeferred.add(s.complete),jqXHR.done(s.success),jqXHR.fail(s.error),transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR)){if(jqXHR.readyState=1,fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]),completed)return jqXHR;s.async&&s.timeout>0&&(timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{completed=!1,transport.send(requestHeaders,done)}catch(e){if(completed)throw e;done(-1,e)}}else done(-1,"No Transport");function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;completed||(completed=!0,timeoutTimer&&window.clearTimeout(timeoutTimer),transport=void 0,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&status<300||304===status,responses&&(response=function(s,jqXHR,responses){for(var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;"*"===dataTypes[0];)dataTypes.shift(),void 0===ct&&(ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"));if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}if(finalDataType)return finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]}(s,jqXHR,responses)),!isSuccess&&jQuery.inArray("script",s.dataTypes)>-1&&(s.converters["text script"]=function(){}),response=function(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(current=dataTypes.shift();current;)if(s.responseFields[current]&&(jqXHR[s.responseFields[current]]=response),!prev&&isSuccess&&s.dataFilter&&(response=s.dataFilter(response,s.dataType)),prev=current,current=dataTypes.shift())if("*"===current)current=prev;else if("*"!==prev&&prev!==current){if(!(conv=converters[prev+" "+current]||converters["* "+current]))for(conv2 in converters)if((tmp=conv2.split(" "))[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]])){!0===conv?conv=converters[conv2]:!0!==converters[conv2]&&(current=tmp[0],dataTypes.unshift(tmp[1]));break}if(!0!==conv)if(conv&&s.throws)response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}return{state:"success",data:response}}(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&((modified=jqXHR.getResponseHeader("Last-Modified"))&&(jQuery.lastModified[cacheURL]=modified),(modified=jqXHR.getResponseHeader("etag"))&&(jQuery.etag[cacheURL]=modified)),204===status||"HEAD"===s.type?statusText="nocontent":304===status?statusText="notmodified":(statusText=response.state,success=response.data,isSuccess=!(error=response.error))):(error=statusText,!status&&statusText||(statusText="error",status<0&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=void 0,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,void 0,callback,"script")}}),jQuery.each(["get","post"],function(_i,method){jQuery[method]=function(url,data,callback,type){return isFunction(data)&&(type=type||callback,callback=data,data=void 0),jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url))}}),jQuery.ajaxPrefilter(function(s){var i;for(i in s.headers)"content-type"===i.toLowerCase()&&(s.contentType=s.headers[i]||"")}),jQuery._evalUrl=function(url,options,doc){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(response){jQuery.globalEval(response,options,doc)}})},jQuery.fn.extend({wrapAll:function(html){var wrap;return this[0]&&(isFunction(html)&&(html=html.call(this[0])),wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&wrap.insertBefore(this[0]),wrap.map(function(){for(var elem=this;elem.firstElementChild;)elem=elem.firstElementChild;return elem}).append(this)),this},wrapInner:function(html){return isFunction(html)?this.each(function(i){jQuery(this).wrapInner(html.call(this,i))}):this.each(function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html)})},unwrap:function(selector){return this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes)}),this}}),jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem)},jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)},jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain)return{send:function(headers,complete){var i,xhr=options.xhr();if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];for(i in options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType),options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest"),headers)xhr.setRequestHeader(i,headers[i]);callback=function(type){return function(){callback&&(callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null,"abort"===type?xhr.abort():"error"===type?"number"!=typeof xhr.status?complete(0,"error"):complete(xhr.status,xhr.statusText):complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,"text"!==(xhr.responseType||"text")||"string"!=typeof xhr.responseText?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders()))}},xhr.onload=callback(),errorCallback=xhr.onerror=xhr.ontimeout=callback("error"),void 0!==xhr.onabort?xhr.onabort=errorCallback:xhr.onreadystatechange=function(){4===xhr.readyState&&window.setTimeout(function(){callback&&errorCallback()})},callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback)throw e}},abort:function(){callback&&callback()}}}),jQuery.ajaxPrefilter(function(s){s.crossDomain&&(s.contents.script=!1)}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){return jQuery.globalEval(text),text}}}),jQuery.ajaxPrefilter("script",function(s){void 0===s.cache&&(s.cache=!1),s.crossDomain&&(s.type="GET")}),jQuery.ajaxTransport("script",function(s){var script,callback;if(s.crossDomain||s.scriptAttrs)return{send:function(_,complete){script=jQuery("<script>").attr(s.scriptAttrs||{}
vendor: 4,901 bytes, line 1
1).prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove(),callback=null,evt&&complete("error"===evt.type?404:200,evt.type)}),document.head.appendChild(script[0])},abort:function(){callback&&callback()}}});var body,oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce.guid++;return this[callback]=!0,callback}}),jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=!1!==s.jsonp&&(rjsonp.test(s.url)?"url":"string"==typeof s.data&&0===(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");if(jsonProp||"jsonp"===s.dataTypes[0])return callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,jsonProp?s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName):!1!==s.jsonp&&(s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName),s.converters["script json"]=function(){return responseContainer||jQuery.error(callbackName+" was not called"),responseContainer[0]},s.dataTypes[0]="json",overwritten=window[callbackName],window[callbackName]=function(){responseContainer=arguments},jqXHR.always(function(){void 0===overwritten?jQuery(window).removeProp(callbackName):window[callbackName]=overwritten,s[callbackName]&&(s.jsonpCallback=originalSettings.jsonpCallback,oldCallbacks.push(callbackName)),responseContainer&&isFunction(overwritten)&&overwritten(responseContainer[0]),responseContainer=overwritten=void 0}),"script"}),support.createHTMLDocument=((body=document.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===body.childNodes.length),jQuery.parseHTML=function(data,context,keepScripts){return"string"!=typeof data?[]:("boolean"==typeof context&&(keepScripts=context,context=!1),context||(support.createHTMLDocument?((base=(context=document.implementation.createHTMLDocument("")).createElement("base")).href=document.location.href,context.head.appendChild(base)):context=document),scripts=!keepScripts&&[],(parsed=rsingleTag.exec(data))?[context.createElement(parsed[1])]:(parsed=buildFragment([data],context,scripts),scripts&&scripts.length&&jQuery(scripts).remove(),jQuery.merge([],parsed.childNodes)));var base,parsed,scripts},jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");return off>-1&&(selector=stripAndCollapse(url.slice(off)),url=url.slice(0,off)),isFunction(params)?(callback=params,params=void 0):params&&"object"==typeof params&&(type="POST"),self.length>0&&jQuery.ajax({url:url,type:type||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments,self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR])})}),this},jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length},jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};"static"===position&&(elem.style.position="relative"),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),("absolute"===position||"fixed"===position)&&(curCSSTop+curCSSLeft).indexOf("auto")>-1?(curTop=(curPosition=curElem.position()).top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),isFunction(options)&&(options=options.call(elem,i,jQuery.extend({},curOffset))),null!=options.top&&(props.top=options.top-curOffset.top+curTop),null!=options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(elem,props):("number"==typeof props.top&&(props.top+="px"),"number"==typeof props.left&&(props.left+="px"),curElem.css(props))}},jQuery.fn.extend({offset:function(options){if(arguments.length)return void 0===options?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var rect,win,elem=this[0];return elem?elem.getClientRects().length?(rect=elem.getBoundingClientRect(),win=elem.ownerDocument.defaultView,{top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var offsetParent,offset,doc,elem=this[0],parentOffset={top:0,left:0};if("fixed"===jQuery.css(elem,"position"))offset=elem.getBoundingClientRect();else{for(offset=this.offset(),doc=elem.ownerDocument,offsetParent=elem.offsetParent||doc.documentElement;offsetParent&&(offsetParent===doc.body||offsetParent===doc.documentElement)&&"static"===jQuery.css(offsetParent,"position");)offsetParent=offsetParent.parentNode;
vendor: 4,323 bytes, line 1
1offsetParent&&offsetParent!==elem&&1===offsetParent.nodeType&&((parentOffset=jQuery(offsetParent).offset()).top+=jQuery.css(offsetParent,"borderTopWidth",!0),parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",!0))}return{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent;offsetParent&&"static"===jQuery.css(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||documentElement})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win;if(isWindow(elem)?win=elem:9===elem.nodeType&&(win=elem.defaultView),void 0===val)return win?win[prop]:elem[method];win?win.scrollTo(top?win.pageXOffset:val,top?val:win.pageYOffset):elem[method]=val},method,val,arguments.length)}}),jQuery.each(["top","left"],function(_i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed)return computed=curCSS(elem,prop),rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed})}),jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||"boolean"!=typeof margin),extra=defaultExtra||(!0===margin||!0===value?"margin":"border");return access(this,function(elem,type,value){var doc;return isWindow(elem)?0===funcName.indexOf("outer")?elem["inner"+name]:elem.document.documentElement["client"+name]:9===elem.nodeType?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):void 0===value?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:void 0,chainable)}})}),jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}}),jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return 1===arguments.length?this.off(selector,"**"):this.off(types,selector||"**",fn)},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)}}),jQuery.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(_i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});var rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;jQuery.proxy=function(fn,context){var tmp,args,proxy;if("string"==typeof context&&(tmp=fn[context],context=fn,fn=tmp),isFunction(fn))return args=slice.call(arguments,2),(proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))}).guid=fn.guid=fn.guid||jQuery.guid++,proxy},jQuery.holdReady=function(hold){hold?jQuery.readyWait++:jQuery.ready(!0)},jQuery.isArray=Array.isArray,jQuery.parseJSON=JSON.parse,jQuery.nodeName=nodeName,jQuery.isFunction=isFunction,jQuery.isWindow=isWindow,jQuery.camelCase=camelCase,jQuery.type=toType,jQuery.now=Date.now,jQuery.isNumeric=function(obj){var type=jQuery.type(obj);return("number"===type||"string"===type)&&!isNaN(obj-parseFloat(obj))},jQuery.trim=function(text){return null==text?"":(text+"").replace(rtrim,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return jQuery});var _jQuery=window.jQuery,_$=window.$;return jQuery.noConflict=function(deep){return window.$===jQuery&&(window.$=_$),deep&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},void 0===noGlobal&&(window.jQuery=window.$=jQuery),jQuery})},{}],47:[function(require,module,exports){function keyCode(searchInput){if(searchInput&&"object"==typeof searchInput){var hasKeyCode=searchInput.which||searchInput.ke
1yCode||searchInput.charCode;hasKeyCode&&(searchInput=hasKeyCode)}if("number"==typeof searchInput)return names[searchInput];var foundNamedKey,search=String(searchInput);return(foundNamedKey=codes[search.toLowerCase()])?foundNamedKey:(foundNamedKey=aliases[search.toLowerCase()])||(1===search.length?search.charCodeAt(0):void 0)}keyCode.isEventKey=function(event,nameOrCode){if(event&&"object"==typeof event){var keyCode=event.which||event.keyCode||event.charCode;if(null==keyCode)return!1;if("string"==typeof nameOrCode){var foundNamedKey;if(foundNamedKey=codes[nameOrCode.toLowerCase()])return foundNamedKey===keyCode;if(foundNamedKey=aliases[nameOrCode.toLowerCase()])return foundNamedKey===keyCode}else if("number"==typeof nameOrCode)return nameOrCode===keyCode;return!1}};var codes=(exports=module.exports=keyCode).code=exports.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},aliases=exports.aliases={windows:91,"â§":16,"â¥":18,"â":17,"â":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(i=97;i<123;i++)codes[String.fromCharCode(i)]=i-32;for(var i=48;i<58;i++)codes[i-48]=i;for(i=1;i<13;i++)codes["f"+i]=i+111;for(i=0;i<10;i++)codes["numpad "+i]=i+96;var names=exports.names=exports.title={};for(i in codes)names[codes[i]]=i;for(var alias in aliases)codes[alias]=aliases[alias]},{}],48:[function(require,module,exports){"use strict";var immediate=require("immediate");function INTERNAL(){}var handlers={},REJECTED=["REJECTED"],FULFILLED=["FULFILLED"],PENDING=["PENDING"];function Promise(resolver){if("function"!=typeof resolver)throw new TypeError("resolver must be a function");this.state=PENDING,this.queue=[],this.outcome=void 0,resolver!==INTERNAL&&safelyResolveThenable(this,resolver)}function QueueItem(promise,onFulfilled,onRejected){this.promise=promise,"function"==typeof onFulfilled&&(this.onFulfilled=onFulfilled,this.callFulfilled=this.otherCallFulfilled),"function"==typeof onRejected&&(this.onRejected=onRejected,this.callRejected=this.otherCallRejected)}function unwrap(promise,func,value){immediate(function(){var returnValue;try{returnValue=func(value)}catch(e){return handlers.reject(promise,e)}returnValue===promise?handlers.reject(promise,new TypeError("Cannot resolve promise with itself")):handlers.resolve(promise,returnValue)})}function getThen(obj){var then=obj&&obj.then;if(obj&&("object"==typeof obj||"function"==typeof obj)&&"function"==typeof then)return function(){then.apply(obj,arguments)}}function safelyResolveThenable(self,thenable){var called=!1;function onError(value){called||(called=!0,handlers.reject(self,value))}function onSuccess(value){called||(called=!0,handlers.resolve(self,value))}var result=tryCatch(function(){thenable(onSuccess,onError)});"error"===result.status&&onError(result.value)}function tryCatch(func,value){var out={};try{out.value=func(value),out.status="success"}catch(e){out.status="error",out.value=e}return out}module.exports=Promise,Promise.prototype.finally=function(callback){if("function"!=typeof callback)return this;var p=this.constructor;return this.then(function(value){return p.resolve(callback()).then(function(){return value})},function(reason){return p.resolve(callback()).then(function(){throw reason})})},Promise.prototype.catch=function(onRejected){return this.then(null,onRejected)},Promise.prototype.then=function(onFulfilled,onRejected){if("function"!=typeof onFulfilled&&this.state===FULFILLED||"function"!=typeof onRejected&&this.state===REJECTED)return this;var promise=new this.constructor(INTERNAL);this.state!==PENDING?unwrap(promise,this.state===FULFILLED?onFulfilled:onRejected,this.outcome):this.queue.push(new QueueItem(promise,onFulfilled,onRejected));return promise},QueueItem.prototype.callFulfilled=function(value){handlers.resolve(this.promise,value)},QueueItem.prototype.otherCallFulfilled=function(value){unwrap(this.promise,this.onFulfilled,value)},QueueItem.prototype.callRejected=function(value){handlers.reject(this.promise,value)},QueueItem.prototype.otherCallRejected=function(value){unwrap(this.promise,this.onRejected,value)},handlers.resolve=function(self,value){var result=tryCatch(getThen,value);if("error"===result.status)return handlers.reject(self,result.value);var thenable=result.value;if(thenable)safelyResolveThenable(self,thenable);else{self.state=FULFILLED,self.outcome=value;for(var i=-1,len=self.queue.length;++i<len;)self.queue[i].callFulfilled(value)}return self},handlers.reject=function(self,error){self.state=REJECTED,self.outcome=error;for(var i=-1,len=self.queue.length;++i<len;)self.queue[i].callRejected(error);return self},Promise.resolve=function(value){if(value instanceof this)return value;return handlers.resolve(new this(INTERNAL),value)},Promise.reject=function(reason){var promise=new this(INTERNAL);return handlers.reject(promise,reason)},Promise.all=function(iterable){var self=this;if("[object Array]"!==Object.prototype.toString.call(iterable))return this.reject(new TypeError("must be an array"));var len=iterable.length,called=!1;if(!len)return this.resolve([]);var values=new Array(len),resolved=0,i=-1,promise=new this(INTERNAL);for(;++i<len;)allResolver(iterable[i],i);return promise;function allResolver(value,i){self.resolve(value).then(function(outValue){values[i]=outValue,++resolved!==len||called||(called=!0,handlers.resolve(promise,values))},function(error){called||(called=!0,handlers.reject(promise,error))})}},Promise.race=function(iterable){var self=this;if("[object Array]"!==Object.prototype.toString.call(iterable))return this.reject(new TypeError("must be an array"));var len=iterable.length,called=!1;if(!len)return this.resolve([]);var i=-1,promise=new this(INTERNAL);for(;++i<len;)value=iterable[i],self.resolve(value).then(function(response){called||(called=!0,handlers.resolve(promise,response))},function(error){called||(called=!0,handlers.reject(promise,error))});var value;return promise}},{immediate:44}],49:[function(require,module,exports){"use strict";function _interopDefault(ex){return ex&&"object"==typeof ex&&"default"in ex?ex.default:ex}Object.defineProperty(exports,"__esModule",{value:!0});var _inheritsLoose=_interopDefault(require("@babel/runtime/helpers/inheritsLoose")),Stream=_interopDefault(require("@videojs/vhs-utils/dist/stream.js")),_extends=_interopDefault(require("@babel/runtime/helpers/extends")),_assertThisInitialized=_interopDefault(require("@babel/runtime/helpers/assertThisInitialized")),decodeB64ToUint8Array=_interopDefault(require("@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js")),LineStream=function(_Stream){function LineStream(){var _this;return(_this=_Stream.call(this)||this).buffer="",_this}return _inheritsLoose(LineStream,_Stream),LineStream.prototype.push=function(data){var nextNewline;for(this.buffer+=data,nextNewline=this.buffer.indexOf("\n");nextNewline>-1;nextNewline=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,nextNewline)),this.buffer=this.buffer.substring(nextNewline+1)},LineStream}(Stream),parseAttributes=function(attributes){for(var attr,attrs=attributes.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),result={},i=attrs.length;i--;)""!==attrs[i]&&((attr=/([^=]*)=(.*)/.exec(attrs[i]).slice(1))[0]=attr[0].replace(/^\s+|\s+$/g,""),attr[1]=attr[1].replace(/^\s+|\s+$/g,""),attr[1]=attr[1].replace(/^['"](.*)['"]$/g,"$1"),result[attr[0]]=attr[1]);return result},ParseStream=function(_Stream){function ParseStream(){var _this;return(_this=_Stream.call(this)||this).customParsers=[],_this.tagMappers=[],_this}_inheritsLoose(ParseStream,_Stream);var _proto=ParseStream.prototype;return _proto.push=function(line){var match,event,_this2=this;0!==(line=line.trim()).length&&("#"===line[0]?this.tagMappers.reduce(function(acc,mapper){var mappedLine=mapper(line);return mappedLine===line?acc:acc.concat([mappedLine])}
vendor: 14,274 bytes, line 1
1,[line]).forEach(function(newLine){for(var i=0;i<_this2.customParsers.length;i++)if(_this2.customParsers[i].call(_this2,newLine))return;if(0===newLine.indexOf("#EXT"))if(newLine=newLine.replace("\r",""),match=/^#EXTM3U/.exec(newLine))_this2.trigger("data",{type:"tag",tagType:"m3u"});else{if(match=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(newLine))return event={type:"tag",tagType:"inf"},match[1]&&(event.duration=parseFloat(match[1])),match[2]&&(event.title=match[2]),void _this2.trigger("data",event);if(match=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(newLine))return event={type:"tag",tagType:"targetduration"},match[1]&&(event.duration=parseInt(match[1],10)),void _this2.trigger("data",event);if(match=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(newLine))return event={type:"tag",tagType:"totalduration"},match[1]&&(event.duration=parseInt(match[1],10)),void _this2.trigger("data",event);if(match=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(newLine))return event={type:"tag",tagType:"version"},match[1]&&(event.version=parseInt(match[1],10)),void _this2.trigger("data",event);if(match=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(newLine))return event={type:"tag",tagType:"media-sequence"},match[1]&&(event.number=parseInt(match[1],10)),void _this2.trigger("data",event);if(match=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(newLine))return event={type:"tag",tagType:"discontinuity-sequence"},match[1]&&(event.number=parseInt(match[1],10)),void _this2.trigger("data",event);if(match=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(newLine))return event={type:"tag",tagType:"playlist-type"},match[1]&&(event.playlistType=match[1]),void _this2.trigger("data",event);if(match=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(newLine))return event={type:"tag",tagType:"byterange"},match[1]&&(event.length=parseInt(match[1],10)),match[2]&&(event.offset=parseInt(match[2],10)),void _this2.trigger("data",event);if(match=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(newLine))return event={type:"tag",tagType:"allow-cache"},match[1]&&(event.allowed=!/NO/.test(match[1])),void _this2.trigger("data",event);if(match=/^#EXT-X-MAP:?(.*)$/.exec(newLine)){if(event={type:"tag",tagType:"map"},match[1]){var attributes=parseAttributes(match[1]);if(attributes.URI&&(event.uri=attributes.URI),attributes.BYTERANGE){var _attributes$BYTERANGE=attributes.BYTERANGE.split("@"),length=_attributes$BYTERANGE[0],offset=_attributes$BYTERANGE[1];event.byterange={},length&&(event.byterange.length=parseInt(length,10)),offset&&(event.byterange.offset=parseInt(offset,10))}}_this2.trigger("data",event)}else if(match=/^#EXT-X-STREAM-INF:?(.*)$/.exec(newLine)){if(event={type:"tag",tagType:"stream-inf"},match[1]){if(event.attributes=parseAttributes(match[1]),event.attributes.RESOLUTION){var split=event.attributes.RESOLUTION.split("x"),resolution={};split[0]&&(resolution.width=parseInt(split[0],10)),split[1]&&(resolution.height=parseInt(split[1],10)),event.attributes.RESOLUTION=resolution}event.attributes.BANDWIDTH&&(event.attributes.BANDWIDTH=parseInt(event.attributes.BANDWIDTH,10)),event.attributes["PROGRAM-ID"]&&(event.attributes["PROGRAM-ID"]=parseInt(event.attributes["PROGRAM-ID"],10))}_this2.trigger("data",event)}else{if(match=/^#EXT-X-MEDIA:?(.*)$/.exec(newLine))return event={type:"tag",tagType:"media"},match[1]&&(event.attributes=parseAttributes(match[1])),void _this2.trigger("data",event);if(match=/^#EXT-X-ENDLIST/.exec(newLine))_this2.trigger("data",{type:"tag",tagType:"endlist"});else if(match=/^#EXT-X-DISCONTINUITY/.exec(newLine))_this2.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(match=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(newLine))return event={type:"tag",tagType:"program-date-time"},match[1]&&(event.dateTimeString=match[1],event.dateTimeObject=new Date(match[1])),void _this2.trigger("data",event);if(match=/^#EXT-X-KEY:?(.*)$/.exec(newLine))return event={type:"tag",tagType:"key"},match[1]&&(event.attributes=parseAttributes(match[1]),event.attributes.IV&&("0x"===event.attributes.IV.substring(0,2).toLowerCase()&&(event.attributes.IV=event.attributes.IV.substring(2)),event.attributes.IV=event.attributes.IV.match(/.{8}/g),event.attributes.IV[0]=parseInt(event.attributes.IV[0],16),event.attributes.IV[1]=parseInt(event.attributes.IV[1],16),event.attributes.IV[2]=parseInt(event.attributes.IV[2],16),event.attributes.IV[3]=parseInt(event.attributes.IV[3],16),event.attributes.IV=new Uint32Array(event.attributes.IV))),void _this2.trigger("data",event);if(match=/^#EXT-X-START:?(.*)$/.exec(newLine))return event={type:"tag",tagType:"start"},match[1]&&(event.attributes=parseAttributes(match[1]),event.attributes["TIME-OFFSET"]=parseFloat(event.attributes["TIME-OFFSET"]),event.attributes.PRECISE=/YES/.test(event.attributes.PRECISE)),void _this2.trigger("data",event);if(match=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(newLine))return event={type:"tag",tagType:"cue-out-cont"},match[1]?event.data=match[1]:event.data="",void _this2.trigger("data",event);if(match=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(newLine))return event={type:"tag",tagType:"cue-out"},match[1]?event.data=match[1]:event.data="",void _this2.trigger("data",event);if(match=/^#EXT-X-CUE-IN:?(.*)?$/.exec(newLine))return event={type:"tag",tagType:"cue-in"},match[1]?event.data=match[1]:event.data="",void _this2.trigger("data",event);_this2.trigger("data",{type:"tag",data:newLine.slice(4)})}}}else _this2.trigger("data",{type:"comment",text:newLine.slice(1)})}):this.trigger("data",{type:"uri",uri:line}))},_proto.addParser=function(_ref){var _this3=this,expression=_ref.expression,customType=_ref.customType,dataParser=_ref.dataParser,segment=_ref.segment;"function"!=typeof dataParser&&(dataParser=function(line){return line}),this.customParsers.push(function(line){if(expression.exec(line))return _this3.trigger("data",{type:"custom",data:dataParser(line),customType:customType,segment:segment}),!0})},_proto.addTagMapper=function(_ref2){var expression=_ref2.expression,map=_ref2.map;this.tagMappers.push(function(line){return expression.test(line)?map(line):line})},ParseStream}(Stream),Parser=function(_Stream){function Parser(){var _this;(_this=_Stream.call(this)||this).lineStream=new LineStream,_this.parseStream=new ParseStream,_this.lineStream.pipe(_this.parseStream);var currentMap,_key,self=_assertThisInitialized(_this),uris=[],currentUri={},defaultMediaGroups={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},currentTimeline=0;_this.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var lastByterangeEnd=0;return _this.parseStream.on("data",function(entry){var mediaGroup,rendition;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=entry.allowed,"allowed"in entry||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var byterange={};"length"in entry&&(currentUri.byterange=byterange,byterange.length=entry.length,"offset"in entry||(entry.offset=lastByterangeEnd)),"offset"in entry&&(currentUri.byterange=byterange,byterange.offset=entry.offset),lastByterangeEnd=byterange.offset+byterange.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),entry.duration>0&&(currentUri.duration=entry.duration),0===entry.duration&&(currentUri.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=uris},key:function(){if(entry.attributes)if("NONE"!==entry.attributes.METHOD)if(entry.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===entry.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(entry.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===entry.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==entry.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):entry.attributes.KEYID&&"0x"===entry.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:entry.attributes.KEYFORMAT,keyId:entry.attributes.KEYID.substring(2)},pssh:decodeB64ToUint8Array(entry.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}entry.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),_key={method:entry.attributes.METHOD||"AES-128",uri:entry.attributes.URI},void 0!==entry.attributes.IV&&(_key.iv=entry.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else _key=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(entry.number)?this.manifest.mediaSequence=entry.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+entry.number})},"discontinuity-sequence":function(){isFinite(entry.number)?(this.manifest.discontinuitySequence=entry.number,currentTimeline=entry.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+entry.number})},"playlist-type":function(){/VOD|EVENT/.test(entry.playlistType)?this.manifest.playlistType=entry.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+entry.playlist})},map:function(){currentMap={},entry.uri&&(currentMap.uri=entry.uri),entry.byterange&&(currentMap.byterange=entry.byterange)},"stream-inf":function(){this.manifest.playlists=uris,this.manifest.mediaGroups=this.manifest.mediaGroups||defaultMediaGroups,entry.attributes?(currentUri.attributes||(currentUri.attributes={}),_extends(currentUri.attributes,entry.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||defaultMediaGroups,entry.attributes&&entry.attributes.TYPE&&entry.attributes["GROUP-ID"]&&entry.attributes.NAME){var mediaGroupType=this.manifest.mediaGroups[entry.attributes.TYPE];mediaGroupType[entry.attributes["GROUP-ID"]]=mediaGroupType[entry.attributes["GROUP-ID"]]||{},mediaGroup=mediaGroupType[entry.attributes["GROUP-ID"]],(rendition={default:/yes/i.test(entry.attributes.DEFAULT)}).default?rendition.autoselect=!0:rendition.autoselect=/yes/i.test(entry.attributes.AUTOSELECT),entry.attributes.LANGUAGE&&(rendition.language=entry.attributes.LANGUAGE),entry.attributes.URI&&(rendition.uri=entry.attributes.URI),entry.attributes["INSTREAM-ID"]&&(rendition.instreamId=entry.attributes["INSTREAM-ID"]),entry.attributes.CHARACTERISTICS&&(rendition.characteristics=entry.attributes.CHARACTERISTICS),entry.attributes.FORCED&&(rendition.forced=/yes/i.test(entry.attributes.FORCED)),mediaGroup[entry.attributes.NAME]=rendition}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){currentTimeline+=1,currentUri.discontinuity=!0,this.manifest.discontinuityStarts.push(uris.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=entry.dateTimeString,this.manifest.dateTimeObject=entry.dateTimeObject),currentUri.dateTimeString=entry.dateTimeString,currentUri.dateTimeObject=entry.dateTimeObject},targetduration:function(){!isFinite(entry.duration)||entry.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+entry.duration}):this.manifest.targetDuration=entry.duration},totalduration:function(){!isFinite(entry.duration)||entry.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+entry.duration}):this.manifest.totalDuration=entry.duration},start:function(){entry.attributes&&!isNaN(entry.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:entry.attributes["TIME-OFFSET"],precise:entry.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){currentUri.cueOut=entry.data},"cue-out-cont":function(){currentUri.cueOutCont=entry.data},"cue-in":function(){currentUri.cueIn=entry.data}}[entry.tagType]||function(){}).call(self)},uri:function(){currentUri.uri=entry.uri,uris.push(currentUri),!this.manifest.targetDuration||"duration"in currentUri||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),currentUri.duration=this.manifest.targetDuration),_key&&(currentUri.key=_key),currentUri.timeline=currentTimeline,currentMap&&(currentUri.map=currentMap),currentUri={}},comment:function(){},custom:function(){entry.segment?(currentUri.custom=currentUri.custom||{},currentUri.custom[entry.customType]=entry.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[entry.customType]=entry.data)}})[entry.type].call(self)}),_this}_inheritsLoose(Parser,_Stream);var _proto=Parser.prototype;return _proto.push=function(chunk){this.lineStream.push(chunk)},_proto.end=function(){this.lineStream.push("\n")},_proto.addParser=function(options){this.parseStream.addParser(options)},_proto.addTagMapper=function(options){this.parseStream.addTagMapper(options)},Parser}(Stream);exports.LineStream=LineStream,exports.ParseStream=ParseStream,exports.Parser=Parser},{"@babel/runtime/helpers/assertThisInitialized":17,"@babel/runtime/helpers/extends":19,"@babel/runtime/helpers/inheritsLoose":22,"@videojs/vhs-utils/dist/decode-b64-to-uint8-array.js":30,"@videojs/vhs-utils/dist/stream.js":33}],50:[function(require,module,exports){"use strict";function _interopDefault(ex){return ex&&"object"==typeof ex&&"default"in ex?ex.default:ex}Object.defineProperty(exports,"__esModule",{value:!0});var resolveUrl=_interopDefault(require("@videojs/vhs-utils/dist/resolve-url")),window=_interopDefault(require("global/window")),decodeB64ToUint8Array=_interopDefault(require("@videojs/vhs-utils/dist/decode-b64-to-uint8-array")),xmldom=require("xmldom"),isObject=function(obj){return!!obj&&"object"==typeof obj},merge=function merge(){for(var _len=arguments.length,objects=new Array(_len),_
vendor: 4,941 bytes, line 1
1key=0;_key<_len;_key++)objects[_key]=arguments[_key];return objects.reduce(function(result,source){return Object.keys(source).forEach(function(key){Array.isArray(result[key])&&Array.isArray(source[key])?result[key]=result[key].concat(source[key]):isObject(result[key])&&isObject(source[key])?result[key]=merge(result[key],source[key]):result[key]=source[key]}),result},{})},flatten=function(lists){return lists.reduce(function(x,y){return x.concat(y)},[])},from=function(list){if(!list.length)return[];for(var result=[],i=0;i<list.length;i++)result.push(list[i]);return result},errors_INVALID_NUMBER_OF_PERIOD="INVALID_NUMBER_OF_PERIOD",errors_DASH_EMPTY_MANIFEST="DASH_EMPTY_MANIFEST",errors_DASH_INVALID_XML="DASH_INVALID_XML",errors_NO_BASE_URL="NO_BASE_URL",errors_SEGMENT_TIME_UNSPECIFIED="SEGMENT_TIME_UNSPECIFIED",errors_UNSUPPORTED_UTC_TIMING_SCHEME="UNSUPPORTED_UTC_TIMING_SCHEME",urlTypeToSegment=function(_ref){var _ref$baseUrl=_ref.baseUrl,baseUrl=void 0===_ref$baseUrl?"":_ref$baseUrl,_ref$source=_ref.source,source=void 0===_ref$source?"":_ref$source,_ref$range=_ref.range,range=void 0===_ref$range?"":_ref$range,_ref$indexRange=_ref.indexRange,indexRange=void 0===_ref$indexRange?"":_ref$indexRange,segment={uri:source,resolvedUri:resolveUrl(baseUrl||"",source)};if(range||indexRange){var ranges=(range||indexRange).split("-"),startRange=parseInt(ranges[0],10),endRange=parseInt(ranges[1],10);segment.byterange={length:endRange-startRange+1,offset:startRange}}return segment},segmentRange={static:function(attributes){var duration=attributes.duration,_attributes$timescale=attributes.timescale,timescale=void 0===_attributes$timescale?1:_attributes$timescale,sourceDuration=attributes.sourceDuration;return{start:0,end:Math.ceil(sourceDuration/(duration/timescale))}},dynamic:function(attributes){var NOW=attributes.NOW,clientOffset=attributes.clientOffset,availabilityStartTime=attributes.availabilityStartTime,_attributes$timescale2=attributes.timescale,timescale=void 0===_attributes$timescale2?1:_attributes$timescale2,duration=attributes.duration,_attributes$start=attributes.start,start=void 0===_attributes$start?0:_attributes$start,_attributes$minimumUp=attributes.minimumUpdatePeriod,minimumUpdatePeriod=void 0===_attributes$minimumUp?0:_attributes$minimumUp,_attributes$timeShift=attributes.timeShiftBufferDepth,timeShiftBufferDepth=void 0===_attributes$timeShift?1/0:_attributes$timeShift,now=(NOW+clientOffset)/1e3,periodStartWC=availabilityStartTime+start,periodDuration=now+minimumUpdatePeriod-periodStartWC,segmentCount=Math.ceil(periodDuration*timescale/duration),availableStart=Math.floor((now-periodStartWC-timeShiftBufferDepth)*timescale/duration),availableEnd=Math.floor((now-periodStartWC)*timescale/duration);return{start:Math.max(0,availableStart),end:Math.min(segmentCount,availableEnd)}}},parseByDuration=function(attributes){var _attributes$type=attributes.type,type=void 0===_attributes$type?"static":_attributes$type,duration=attributes.duration,_attributes$timescale4=attributes.timescale,timescale=void 0===_attributes$timescale4?1:_attributes$timescale4,sourceDuration=attributes.sourceDuration,_segmentRange$type=segmentRange[type](attributes),segments=function(start,end){for(var result=[],i=start;i<end;i++)result.push(i);return result}(_segmentRange$type.start,_segmentRange$type.end).map(function(attributes){return function(number,index){var duration=attributes.duration,_attributes$timescale3=attributes.timescale,timescale=void 0===_attributes$timescale3?1:_attributes$timescale3,periodIndex=attributes.periodIndex,_attributes$startNumb=attributes.startNumber;return{number:(void 0===_attributes$startNumb?1:_attributes$startNumb)+number,duration:duration/timescale,timeline:periodIndex,time:index*duration}}}(attributes));if("static"===type){var index=segments.length-1;segments[index].duration=sourceDuration-duration/timescale*index}return segments},segmentsFromBase=function(attributes){var baseUrl=attributes.baseUrl,_attributes$initializ=attributes.initialization,initialization=void 0===_attributes$initializ?{}:_attributes$initializ,sourceDuration=attributes.sourceDuration,_attributes$indexRang=attributes.indexRange,indexRange=void 0===_attributes$indexRang?"":_attributes$indexRang,duration=attributes.duration;if(!baseUrl)throw new Error(errors_NO_BASE_URL);var initSegment=urlTypeToSegment({baseUrl:baseUrl,source:initialization.sourceURL,range:initialization.range}),segment=urlTypeToSegment({baseUrl:baseUrl,source:baseUrl,indexRange:indexRange});if(segment.map=initSegment,duration){var segmentTimeInfo=parseByDuration(attributes);segmentTimeInfo.length&&(segment.duration=segmentTimeInfo[0].duration,segment.timeline=segmentTimeInfo[0].timeline)}else sourceDuration&&(segment.duration=sourceDuration,segment.timeline=0);return segment.number=0,[segment]},addSegmentsToPlaylist=function(playlist,sidx,baseUrl){for(var initSegment=playlist.sidx.map?playlist.sidx.map:null,
1sourceDuration=playlist.sidx.duration,timeline=playlist.timeline||0,sidxByteRange=playlist.sidx.byterange,sidxEnd=sidxByteRange.offset+sidxByteRange.length,timescale=sidx.timescale,mediaReferences=sidx.references.filter(function(r){return 1!==r.referenceType}),segments=[],startIndex=sidxEnd+sidx.firstOffset,i=0;i<mediaReferences.length;i++){var reference=sidx.references[i],size=reference.referencedSize,duration=reference.subsegmentDuration,segment=segmentsFromBase({baseUrl:baseUrl,timescale:timescale,timeline:timeline,periodIndex:timeline,duration:duration,sourceDuration:sourceDuration,indexRange:startIndex+"-"+(startIndex+size-1)})[0];initSegment&&(segment.map=initSegment),segments.push(segment),startIndex+=size}return playlist.segments=segments,playlist},mergeDiscontiguousPlaylists=function(playlists){var o;return(o=playlists.reduce(function(acc,playlist){var _acc$name$segments,name=playlist.attributes.id+(playlist.attributes.lang||"");acc[name]?(playlist.segments[0]&&(playlist.segments[0].discontinuity=!0),(_acc$name$segments=acc[name].segments).push.apply(_acc$name$segments,playlist.segments),playlist.attributes.contentProtection&&(acc[name].attributes.contentProtection=playlist.attributes.contentProtection)):acc[name]=playlist;return acc},{}),Object.keys(o).map(function(k){return o[k]})).map(function(playlist){var l,key;return playlist.discontinuityStarts=(l=playlist.segments,key="discontinuity",l.reduce(function(a,e,i){return e[key]&&a.push(i),a},[])),playlist})},addSegmentInfoFromSidx=function(playlists,sidxMapping){if(void 0===sidxMapping&&(sidxMapping={}),!Object.keys(sidxMapping).length)return playlists;for(var i in playlists){var playlist=playlists[i];if(playlist.sidx){var sidxKey=playlist.sidx.uri+"-"+(byterange=playlist.sidx.byterange,endRange=void 0,endRange=byterange.offset+byterange.length-1,byterange.offset+"-"+endRange),sidxMatch=sidxMapping[sidxKey]&&sidxMapping[sidxKey].sidx;playlist.sidx&&sidxMatch&&addSegmentsToPlaylist(playlist,sidxMatch,playlist.sidx.resolvedUri)}}var byterange,endRange;return playlists},formatAudioPlaylist=function(_ref){var _attributes,attributes=_ref.attributes,segments=_ref.segments,sidx=_ref.sidx,playlist={attributes:(_attributes={NAME:attributes.id,BANDWIDTH:attributes.bandwidth,CODECS:attributes.codecs},_attributes["PROGRAM-ID"]=1,_attributes),uri:"",endList:"static"===(attributes.type||"static"),timeline:attributes.periodIndex,resolvedUri:"",targetDuration:attributes.duration,segments:segments,mediaSequence:segments.length?segments[0].number:1};return attributes.contentProtection&&(playlist.contentProtection=attributes.contentProtection),sidx&&(playlist.sidx=sidx),playlist},formatVttPlaylist=function(_ref2){var _m3u8Attributes,attributes=_ref2.attributes,segments=_ref2.segments;void 0===segments&&(segments=[{uri:attributes.baseUrl,timeline:attributes.periodIndex,resolvedUri:attributes.baseUrl||"",duration:attributes.sourceDuration,number:0}],attributes.duration=attributes.sourceDuration);var m3u8Attributes=((_m3u8Attributes={NAME:attributes.id,BANDWIDTH:attributes.bandwidth})["PROGRAM-ID"]=1,_m3u8Attributes);return attributes.codecs&&(m3u8Attributes.CODECS=attributes.codecs),{attributes:m3u8Attributes,uri:"",endList:"static"===(attributes.type||"static"),timeline:attributes.periodIndex,resolvedUri:attributes.baseUrl||"",targetDuration:attributes.duration,segments:segments,mediaSequence:segments.length?segments[0].number:1}},formatVideoPlaylist=function(_ref3){var _attributes2,attributes=_ref3.attributes,segments=_ref3.segments,sidx=_ref3.sidx,playlist={attributes:(_attributes2={NAME:attributes.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:attributes.width,height:attributes.height},CODECS:attributes.codecs,BANDWIDTH:attributes.bandwidth},_attributes2["PROGRAM-ID"]=1,_attributes2),uri:"",endList:"static"===(attributes.type||"static"),timeline:attributes.periodIndex,resolvedUri:"",targetDuration:attributes.duration,segments:segments,mediaSequence:segments.length?segments[0].number:1};return attributes.contentProtection&&(playlist.contentProtection=attributes.contentProtection),sidx&&(playlist.sidx=sidx),playlist},toM3u8=function(dashPlaylists,locations,sidxMapping){var _mediaGroups;if(void 0===sidxMapping&&(sidxMapping={}),!dashPlaylists.length)return{};var _dashPlaylists$0$attr=dashPlaylists[0].attributes,duration=_dashPlaylists$0$attr.sourceDuration,_dashPlaylists$0$attr2=_dashPlaylists$0$attr.type,type=void 0===_dashPlaylists$0$attr2?"static":_dashPlaylists$0$attr2,suggestedPresentationDelay=_dashPlaylists$0$attr.suggestedPresentationDelay,minimumUpdatePeriod=_dashPlaylists$0$attr.minimumUpdatePeriod,videoPlaylists=mergeDiscontiguousPlaylists(dashPlaylists.filter(function(_ref4){var attributes=_ref4.attributes;return"video/mp4"===attributes.mimeType||"video"===attributes.contentType})).map(formatVideoPlaylist),audioPlaylists=mergeDiscontiguousPlaylists(dashPlaylists.filter(function(_ref5){var attributes=_ref5.attributes;return"audio/mp4"===attributes.mimeType||"audio"===attributes.contentType})),vttPlaylists=dashPlaylists.filter(function(_ref6){var attributes=_ref6.attributes;return"text/vtt"===attributes.mimeType||"text"===attributes.contentType}),master={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(_mediaGroups={AUDIO:{},VIDEO:{}},_mediaGroups["CLOSED-CAPTIONS"]={},_mediaGroups.SUBTITLES={},_mediaGroups),uri:"",duration:duration,playlists:addSegmentInfoFromSidx(videoPlaylists,sidxMapping)};return minimumUpdatePeriod>=0&&(master.minimumUpdatePeriod=1e3*minimumUpdatePeriod),locations&&(master.locations=locations),"dynamic"===type&&(master.suggestedPresentationDelay=suggestedPresentationDelay),audioPlaylists.length&&(master.mediaGroups.AUDIO.audio=function(playlists,sidxMapping){var mainPlaylist;void 0===sidxMapping&&(sidxMapping={});var formattedPlaylists=playlists.reduce(function(a,playlist){var role=playlist.attributes.role&&playlist.attributes.role.value||"",language=playlist.attributes.lang||"",label="main";if(language){var roleLabel=role?" ("+role+")":"";label=""+playlist.attributes.lang+roleLabel}return a[label]&&a[label].playlists[0].attributes.BANDWIDTH>playlist.attributes.bandwidth?a:(a[label]={language:language,autoselect:!0,default:"main"===role,playlists:addSegmentInfoFromSidx([formatAudioPlaylist(playlist)],sidxMapping),uri:""},void 0===mainPlaylist&&"main"===role&&((mainPlaylist=playlist).default=!0),a)},{});mainPlaylist||(formattedPlaylists[Object.keys(formattedPlaylists)[0]].default=!0);return formattedPlaylists}(audioPlaylists,sidxMapping)),vttPlaylists.length&&(master.mediaGroups.SUBTITLES.subs=function(playlists,sidxMapping){return void 0===sidxMapping&&(sidxMapping={}),playlists.reduce(function(a,playlist){var label=playlist.attributes.lang||"text";return a[label]?a:(a[label]={language:label,default:!1,autoselect:!1,playlists:addSegmentInfoFromSidx([formatVttPlaylist(playlist)],sidxMapping),uri:""},a)},{})}(vttPlaylists,sidxMapping)),master},getLiveRValue=function(attributes,time,duration){var NOW=attributes.NOW,clientOffset=attributes.clientOffset,availabilityStartTime=attributes.availabilityStartTime,_attributes$timescale=attributes.timescale,timescale=void 0===_attributes$timescale?1:_attributes$timescale,_attributes$start=attributes.start,start=void 0===_attributes$start?0:_attributes$start,_attributes$minimumUp=attributes.minimumUpdatePeriod,periodDuration=(NOW+clientOffset)/1e3+(void 0===_attributes$minimumUp?0:_attributes$minimumUp)-(availabilityStartTime+start);return Math.ceil((periodDuration*timescale-time)/duration)},parseByTimeline=function(attributes,segmentTimeline){for(var _attributes$type=attributes.type,type=void 0===_attributes$type?"static":_attributes$type,_attributes$minimumUp2=attributes.minimumUpdatePeriod,minimumUpdatePeriod=void 0===_attributes$minimumUp2?0:_attributes$minimumUp2,_attributes$media=attributes.media,media=void 0===_attributes$media?"":_attributes$media,sourceDuration=attributes.sourceDuration,_attributes$timescale2=attributes.timescale,timescale=void 0===_attributes$timescale2?1:_attributes$timescale2,_attributes$startNumb=attributes.startNumber,startNumber=void 0===_attributes$startNumb?1:_attributes$startNumb,timeline=attributes.periodIndex,segments=[],time=-1,sIndex=0;sIndex<segmentTimeline.length;sIndex++){var S=segmentTimeline[sIndex],duration=S.d,repeat=S.r||0,segmentTime=S.t||0;time<0&&(time=segmentTime),segmentTime&&segmentTime>time&&(time=segmentTime);var count=void 0;if(repeat<0){var nextS=sIndex+1;count=nextS===segmentTimeline.length?"dynamic"===type&&minimumUpdatePeriod>0&&media.indexOf("$Number$")>0?getLiveRValue(attributes,time,duration):(sourceDuration*timescale-time)/duration:(segmentTimeline[nextS].t-time)/duration}else count=repeat+1;for(var end=startNumber+segments.length+count,number=startNumber+segments.length;number<end;)segments.push({number:number,duration:duration/timescale,time:time,timeline:timeline}),time+=duration,number++}return segments},identifierPattern=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,constructTemplateUrl=function(url,values){return url.replace(identifierPattern,function(values){return function(match,identifier,format,width){if("$$"===match)return"$";if(void 0===values[identifier])return match;var value=""+values[identifier];return"RepresentationID"===identifier?value:(width=format?parseInt(width,10):1,value.length>=width?value:""+new Array(width-value.length+1).join("0")+value)}}(values))},segmentsFromTemplate=function(attributes,segmentTimeline){var templateValues={RepresentationID:attributes.id,Bandwidth:attributes.bandwidth||0},_attributes$initializ=attributes.initialization,initialization=void 0===_attributes$initializ?{sourceURL:"",range:""}:_attributes$initializ,mapSegment=urlTypeToSegment({baseUrl:attributes.baseUrl,source:constructTemplateUrl(initialization.sourceURL,templateValues),range:initialization.range});return function(attributes,segmentTimeline){return attributes.duration||segmentTimeline?attributes.duration?parseByDuration(attributes):parseByTimeline(attributes,segmentTimeline):[{number:attributes.startNumber||1,duration:attributes.sourceDuration,time:0,timeline:attributes.periodIndex}]}(attributes,segmentTimeline).map(function(segment){templateValues.Number=segment.number,templateValues.Time=segment.time;var uri=constructTemplateUrl(attributes.media||"",templateValues);return{uri:uri,timeline:segment.timeline,duration:segment.duration,resolvedUri:resolveUrl(attributes.baseUrl||"",uri),map:mapSegment,number:segment.number}})},segmentsFromList=function(attributes,segmentTimeline){var duration=attributes.duration,_attributes$segmentUr=attributes.segmentUrls,segmentUrls=void 0===_attributes$segmentUr?[]:_attributes$segmentUr;if(!duration&&!segmentTimeline||duration&&segmentTimeline)throw new Error(errors_SEGMENT_TIME_UNSPECIFIED);var segmentTimeInfo,segmentUrlMap=segmentUrls.map(function(segmentUrlObject){return function(attributes,segmentUrl){var baseUrl=attributes.baseUrl,_attributes$initializ=attributes.initialization,initialization=void 0===_attributes$initializ?{}:_attributes$initializ,initSegment=urlTypeToSegment({baseUrl:baseUrl,source:initialization.sourceURL,range:initialization.range}),segment=urlTypeToSegment({baseUrl:baseUrl,source:segmentUrl.media,range:segmentUrl.mediaRange});return segment.map=initSegment,segment}(attributes,segmentUrlObject)});return duration&&(segmentTimeInfo=parseByDuration(attributes)),segmentTimeline&&(segmentTimeInfo=parseByTimeline(attributes,segmentTimeline)),segmentTimeInfo.map(function(segmentTime,index){if(segmentUrlMap[index]){var segment=segmentUrlMap[index];return segment.timeline=segmentTime.timeline,segment.duration=segmentTime.duration,segment.number=segmentTime.number,segment}}).filter(function(segment){return segment})},generateSegments=function(_ref){var segmentAttributes,segmentsFn,attributes=_ref.attributes,segmentInfo=_ref.segmentInfo;segmentInfo.template?(segmentsFn=segmentsFromTemplate,segmentAttributes=merge(attributes,segmentInfo.template)):segmentInfo.base?(segmentsFn=segmentsFromBase,segmentAttributes=merge(attributes,segmentInfo.base)):segmentInfo.list&&(segmentsFn=segmentsFromList,segmentAttributes=merge(attributes,segmentInfo.list));var segmentsInfo={attributes:attributes};if(!segmentsFn)return segmentsInfo;var segments=segmentsFn(segmentAttributes,segmentInfo.timeline);if(segmentAttributes.duration){var _segmentAttributes=segmentAttributes,duration=_segmentAttributes.duration,_segmentAttributes$ti=_segmentAttributes.timescale,timescale=void 0===_segmentAttributes$ti?1:_segmentAttributes$ti;segmentAttributes.duration=duration/timescale}else segments.length?segmentAttributes.duration=segments.reduce(function(max,segment){return Math.max(max,Math.ceil(segment.duration))},0):segmentAttributes.duration=0;return segmentsInfo.attributes=segmentAttributes,segmentsInfo.segments=segments,segmentInfo.base&&segmentAttributes.indexRange&&(segmentsInfo.sidx=segments[0],segmentsInfo.segments=[]),segmentsInfo},toPlaylists=function(representations){return representations.map(generateSegments)},findChildren=function(element,name){return from(element.childNodes).filter(function(_ref){return _ref.tagName===name})},getContent=function(element){return element.textContent.trim()},parseDuration=function(str){var match=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(str);if(!match)return 0;
vendor: 19,493 bytes, line 1
1var _match$slice=match.slice(1),year=_match$slice[0],month=_match$slice[1],day=_match$slice[2],hour=_match$slice[3],minute=_match$slice[4],second=_match$slice[5];return 31536e3*parseFloat(year||0)+2592e3*parseFloat(month||0)+86400*parseFloat(day||0)+3600*parseFloat(hour||0)+60*parseFloat(minute||0)+parseFloat(second||0)},parsers={mediaPresentationDuration:function(value){return parseDuration(value)},availabilityStartTime:function(value){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(str=value)&&(str+="Z"),Date.parse(str)/1e3;var str},minimumUpdatePeriod:function(value){return parseDuration(value)},suggestedPresentationDelay:function(value){return parseDuration(value)},type:function(value){return value},timeShiftBufferDepth:function(value){return parseDuration(value)},start:function(value){return parseDuration(value)},width:function(value){return parseInt(value,10)},height:function(value){return parseInt(value,10)},bandwidth:function(value){return parseInt(value,10)},startNumber:function(value){return parseInt(value,10)},timescale:function(value){return parseInt(value,10)},duration:function(value){var parsedValue=parseInt(value,10);return isNaN(parsedValue)?parseDuration(value):parsedValue},d:function(value){return parseInt(value,10)},t:function(value){return parseInt(value,10)},r:function(value){return parseInt(value,10)},DEFAULT:function(value){return value}},parseAttributes=function(el){return el&&el.attributes?from(el.attributes).reduce(function(a,e){var parseFn=parsers[e.name]||parsers.DEFAULT;return a[e.name]=parseFn(e.value),a},{}):{}},keySystemsMap={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},buildBaseUrls=function(referenceUrls,baseUrlElements){return baseUrlElements.length?flatten(referenceUrls.map(function(reference){return baseUrlElements.map(function(baseUrlElement){return resolveUrl(reference,getContent(baseUrlElement))})})):referenceUrls},getSegmentInformation=function(adaptationSet){var segmentTemplate=findChildren(adaptationSet,"SegmentTemplate")[0],segmentList=findChildren(adaptationSet,"SegmentList")[0],segmentUrls=segmentList&&findChildren(segmentList,"SegmentURL").map(function(s){return merge({tag:"SegmentURL"},parseAttributes(s))}),segmentBase=findChildren(adaptationSet,"SegmentBase")[0],segmentTimelineParentNode=segmentList||segmentTemplate,segmentTimeline=segmentTimelineParentNode&&findChildren(segmentTimelineParentNode,"SegmentTimeline")[0],segmentInitializationParentNode=segmentList||segmentBase||segmentTemplate,segmentInitialization=segmentInitializationParentNode&&findChildren(segmentInitializationParentNode,"Initialization")[0],template=segmentTemplate&&parseAttributes(segmentTemplate);template&&segmentInitialization?template.initialization=segmentInitialization&&parseAttributes(segmentInitialization):template&&template.initialization&&(template.initialization={sourceURL:template.initialization});var segmentInfo={template:template,timeline:segmentTimeline&&findChildren(segmentTimeline,"S").map(function(s){return parseAttributes(s)}),list:segmentList&&merge(parseAttributes(segmentList),{segmentUrls:segmentUrls,initialization:parseAttributes(segmentInitialization)}),base:segmentBase&&merge(parseAttributes(segmentBase),{initialization:parseAttributes(segmentInitialization)})};return Object.keys(segmentInfo).forEach(function(key){segmentInfo[key]||delete segmentInfo[key]}),segmentInfo},toRepresentations=function(periodAttributes,periodBaseUrls,periodSegmentInfo){return function(adaptationSet){var adaptationSetAttributes=parseAttributes(adaptationSet),adaptationSetBaseUrls=buildBaseUrls(periodBaseUrls,findChildren(adaptationSet,"BaseURL")),role=findChildren(adaptationSet,"Role")[0],roleAttributes={role:parseAttributes(role)},attrs=merge(periodAttributes,adaptationSetAttributes,roleAttributes),contentProtection=findChildren(adaptationSet,"ContentProtection").reduce(function(acc,node){var attributes=parseAttributes(node),keySystem=keySystemsMap[attributes.schemeIdUri];if(keySystem){acc[keySystem]={attributes:attributes};var psshNode=findChildren(node,"cenc:pssh")[0];if(psshNode){var pssh=getContent(psshNode),psshBuffer=pssh&&decodeB64ToUint8Array(pssh);acc[keySystem].pssh=psshBuffer}}return acc},{});Object.keys(contentProtection).length&&(attrs=merge(attrs,{contentProtection:contentProtection}));var segmentInfo=getSegmentInformation(adaptationSet),representations=findChildren(adaptationSet,"Representation"),adaptationSetSegmentInfo=merge(periodSegmentInfo,segmentInfo);return flatten(representations.map(function(adaptationSetAttributes,adaptationSetBaseUrls,adaptationSetSegmentInfo){return function(representation){var repBaseUrlElements=findChildren(representation,"BaseURL"),repBaseUrls=buildBaseUrls(adaptationSetBaseUrls,repBaseUrlElements),attributes=merge(adaptationSetAttributes,parseAttributes(representation)),representationSegmentInfo=getSegmentInformation(representation);return repBaseUrls.map(function(baseUrl){return{segmentInfo:merge(adaptationSetSegmentInfo,representationSegmentInfo),attributes:merge(attributes,{baseUrl:baseUrl})}})}}(attrs,adaptationSetBaseUrls,adaptationSetSegmentInfo)))}},toAdaptationSets=function(mpdAttributes,mpdBaseUrls){return function(period,index){var periodBaseUrls=buildBaseUrls(mpdBaseUrls,findChildren(period,"BaseURL")),periodAtt=parseAttributes(period),parsedPeriodId=parseInt(periodAtt.id,10),periodIndex=window.isNaN(parsedPeriodId)?index:parsedPeriodId,periodAttributes=merge(mpdAttributes,{periodIndex:periodIndex}),adaptationSets=findChildren(period,"AdaptationSet"),periodSegmentInfo=getSegmentInformation(period);return flatten(adaptationSets.map(toRepresentations(periodAttributes,periodBaseUrls,periodSegmentInfo)))}},inheritAttributes=function(mpd,options){void 0===options&&(options={});var _options=options,_options$manifestUri=_options.manifestUri,manifestUri=void 0===_options$manifestUri?"":_options$manifestUri,_options$NOW=_options.NOW,NOW=void 0===_options$NOW?Date.now():_options$NOW,_options$clientOffset=_options.clientOffset,clientOffset=void 0===_options$clientOffset?0:_options$clientOffset,periods=findChildren(mpd,"Period");if(!periods.length)throw new Error(errors_INVALID_NUMBER_OF_PERIOD);var locations=findChildren(mpd,"Location"),mpdAttributes=parseAttributes(mpd),mpdBaseUrls=buildBaseUrls([manifestUri],findChildren(mpd,"BaseURL"));return mpdAttributes.sourceDuration=mpdAttributes.mediaPresentationDuration||0,mpdAttributes.NOW=NOW,mpdAttributes.clientOffset=clientOffset,locations.length&&(mpdAttributes.locations=locations.map(getContent)),{locations:mpdAttributes.locations,representationInfo:flatten(periods.map(toAdaptationSets(mpdAttributes,mpdBaseUrls)))}},stringToMpdXml=function(manifestString){if(""===manifestString)throw new Error(errors_DASH_EMPTY_MANIFEST);var xml=(new xmldom.DOMParser).parseFromString(manifestString,"application/xml"),mpd=xml&&"MPD"===xml.documentElement.tagName?xml.documentElement:null;if(!mpd||mpd&&mpd.getElementsByTagName("parsererror").length>0)throw new Error(errors_DASH_INVALID_XML);return mpd};exports.VERSION="0.14.0",exports.inheritAttributes=inheritAttributes,exports.parse=function(manifestString,options){void 0===options&&(options={});var parsedManifestInfo=inheritAttributes(stringToMpdXml(manifestString),options),playlists=toPlaylists(parsedManifestInfo.representationInfo);return toM3u8(playlists,parsedManifestInfo.locations,options.sidxMapping)},exports.parseUTCTiming=function(manifestString){return function(mpd){var UTCTimingNode=findChildren(mpd,"UTCTiming")[0];if(!UTCTimingNode)return null;var attributes=parseAttributes(UTCTimingNode);switch(attributes.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":attributes.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":attributes.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":attributes.method="DIRECT",attributes.value=Date.parse(attributes.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(errors_UNSUPPORTED_UTC_TIMING_SCHEME)}return attributes}(stringToMpdXml(manifestString))},exports.stringToMpdXml=stringToMpdXml,exports.toM3u8=toM3u8,exports.toPlaylists=toPlaylists},{"@videojs/vhs-utils/dist/decode-b64-to-uint8-array":30,"@videojs/vhs-utils/dist/resolve-url":32,"global/window":42,xmldom:122}],51:[function(require,module,exports){"use strict";var ADTS_SAMPLING_FREQUENCIES=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],parseId3TagSize=function(header,byteIndex){var returnSize=header[byteIndex+6]<<21|header[byteIndex+7]<<14|header[byteIndex+8]<<7|header[byteIndex+9];return returnSize=returnSize>=0?returnSize:0,(16&header[byteIndex+5])>>4?returnSize+20:returnSize+10},getId3Offset=function(data,offset){return data.length-offset<10||data[offset]!=="I".charCodeAt(0)||data[offset+1]!=="D".charCodeAt(0)||data[offset+2]!=="3".charCodeAt(0)?offset:(offset+=parseId3TagSize(data,offset),getId3Offset(data,offset))},parseSyncSafeInteger=function(data){return data[0]<<21|data[1]<<14|data[2]<<7|data[3]};module.exports={isLikelyAacData:function(data){var offset=getId3Offset(data,0);return data.length>=offset+2&&255==(255&data[offset])&&240==(240&data[offset+1])&&16==(22&data[offset+1])},parseId3TagSize:parseId3TagSize,parseAdtsSize:function(header,byteIndex){var lowThree=(224&header[byteIndex+5])>>5,middle=header[byteIndex+4]<<3;return 6144&header[byteIndex+3]|middle|lowThree},parseType:function(header,byteIndex){return header[byteIndex]==="I".charCodeAt(0)&&header[byteIndex+1]==="D".charCodeAt(0)&&header[byteIndex+2]==="3".charCodeAt(0)?"timed-metadata":!0&header[byteIndex]&&240==(240&header[byteIndex+1])?"audio":null},parseSampleRate:function(packet){for(var i=0;i+5<packet.length;){if(255===packet[i]&&240==(246&packet[i+1]))return ADTS_SAMPLING_FREQUENCIES[(60&packet[i+2])>>>2];i++}return null},parseAacTimestamp:function(packet){var frameStart,frameSize,frame;frameStart=10,64&packet[5]&&(frameStart+=4,frameStart+=parseSyncSafeInteger(packet.subarray(10,14)));do{if((frameSize=parseSyncSafeInteger(packet.subarray(frameStart+4,frameStart+8)))<1)return null;if("PRIV"===String.fromCharCode(packet[frameStart],packet[frameStart+1],packet[frameStart+2],packet[frameStart+3])){frame=packet.subarray(frameStart+10,frameStart+frameSize+10);for(var i=0;i<frame.byteLength;i++)if(0===frame[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(bytes,start,end){var i,result="";for(i=start;i<end;i++)result+="%"+("00"+bytes[i].toString(16)).slice(-2);return result}(frame,0,i))){var d=frame.subarray(i+1),size=(1&d[3])<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;return size*=4,size+=3&d[7]}break}}frameStart+=10,frameStart+=frameSize}while(frameStart<packet.byteLength);return null}}},{}],52:[function(require,module,exports){"use strict";var StreamTypes=require("./stream-types.js"),parsePid=function(packet){var pid=31&packet[1];return pid<<=8,pid|=packet[2]},parsePayloadUnitStartIndicator=function(packet){return!!(64&packet[1])},parseAdaptionField=function(packet){var offset=0;return(48&packet[3])>>>4>1&&(offset+=packet[4]+1),offset},parseNalUnitType=function(type){switch(type){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};module.exports={parseType:function(packet,pmtPid){var pid=parsePid(packet);return 0===pid?"pat":pid===pmtPid?"pmt":pmtPid?"pes":null},parsePat:function(packet){var pusi=parsePayloadUnitStartIndicator(packet),offset=4+parseAdaptionField(packet);return pusi&&(offset+=packet[offset]+1),(31&packet[offset+10])<<8|packet[offset+11]},parsePmt:function(packet){var programMapTable={},pusi=parsePayloadUnitStartIndicator(packet),payloadOffset=4+parseAdaptionField(packet);if(pusi&&(payloadOffset+=packet[payloadOffset]+1),1&packet[payloadOffset+5]){var tableEnd;tableEnd=3+((15&packet[payloadOffset+1])<<8|packet[payloadOffset+2])-4;for(var offset=12+((15&packet[payloadOffset+10])<<8|packet[payloadOffset+11]);offset<tableEnd;){var i=payloadOffset+offset;programMapTable[(31&packet[i+1])<<8|packet[i+2]]=packet[i],offset+=5+((15&packet[i+3])<<8|packet[i+4])}return programMapTable}},parsePayloadUnitStartIndicator:parsePayloadUnitStartIndicator,parsePesType:function(packet,programMapTable){switch(programMapTable[parsePid(packet)]){case StreamTypes.H264_STREAM_TYPE:return"video";case StreamTypes.ADTS_STREAM_TYPE:return"audio";case StreamTypes.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(packet){if(!parsePayloadUnitStartIndicator(packet))return null;var offset=4+parseAdaptionField(packet);if(offset>=packet.byteLength)return null;var ptsDtsFlags,pes=null;return 192&(ptsDtsFlags=packet[offset+7])&&((pes={}).pts=(14&packet[offset+9])<<27|(255&packet[offset+10])<<20|(254&packet[offset+11])<<12|(255&packet[offset+12])<<5|(254&packet[offset+13])>>>3,pes.pts*=4,pes.pts+=(6&packet[offset+13])>>>1,pes.dts=pes.pts,64&ptsDtsFlags&&(pes.dts=(14&packet[offset+14])<<27|(255&packet[offset+15])<<20|(254&packet[offset+16])<<12|(255&packet[offset+17])<<5|(254&packet[offset+18])>>>3,pes.dts*=4,pes.dts+=(6&packet[offset+18])>>>1)),pes},videoPacketContainsKeyFrame:function(packet){for(var offset=4+parseAdaptionField(packet),frameBuffer=packet.subarray(offset),frameI=0,frameSyncPoint=0,foundKeyFrame=!1;frameSyncPoint<frameBuffer.byteLength-3;frameSyncPoint++)if(1===frameBuffer[frameSyncPoint+2]){frameI=frameSyncPoint+5;break}for(;frameI<frameBuffer.byteLength;)switch(frameBuffer[frameI]){case 0:if(0!==frameBuffer[frameI-1]){frameI+=2;break}if(0!==frameBuffer[frameI-2]){frameI++;break}frameSyncPoint+3!==frameI-2&&"slice_layer_without_partitioning_rbsp_idr"===parseNalUnitType(31&frameBuffer[frameSyncPoint+3])&&(foundKeyFrame=!0);do{frameI++}while(1!==frameBuffer[frameI]&&frameI<frameBuffer.length);frameSyncPoint=frameI-2,frameI+=3;break;case 1:if(0!==frameBuffer[frameI-1]||0!==frameBuffer[frameI-2]){frameI+=3;break}"slice_layer_without_partitioning_rbsp_idr"===parseNalUnitType(31&frameBuffer[frameSyncPoint+3])&&(foundKeyFrame=!0),frameSyncPoint=frameI-2,frameI+=3;break;default:frameI+=3}return frameBuffer=frameBuffer.subarray(frameSyncPoint),frameI-=frameSyncPoint,frameSyncPoint=0,frameBuffer&&frameBuffer.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===parseNalUnitType(31&frameBuffer[frameSyncPoint+3])&&(foundKeyFrame=!0),foundKeyFrame}}},{"./stream-types.js":53}],53:[function(require,module,exports){"use strict";module.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],54:[function(require,module,exports){"use strict";var Stream=require("../utils/stream"),handleRollover=function(value,reference){var direction=1;for(value>reference&&(direction=-1);Math.abs(reference-value)>4294967296;)value+=8589934592*direction;return value},TimestampRolloverStream=function(type){var lastDTS,referenceDTS;TimestampRolloverStream.prototype.init.call(this),this.type_=type||"shared",this.push=function(data){"shared"!==this.type_&&data.type!==this.type_||(void 0===referenceDTS&&(referenceDTS=data.dts),data.dts=handleRollover(data.dts,referenceDTS),data.pts=handleRollover(data.pts,referenceDTS),lastDTS=data.dts,this.trigger("data",data))},this.flush=function(){referenceDTS=lastDTS,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){referenceDTS=void 0,lastDTS=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};TimestampRolloverStream.prototype=new Stream,module.exports={TimestampRolloverStream:TimestampRolloverStream,handleRollover:handleRollover}},{"../utils/stream":66}],55:[function(require,module,exports){var toUnsigned=require("../utils/bin").toUnsigned,parseType=require("./parse-type.js"),findBox=function(data,path){var i,size,type,end,subresults,results=[];if(!path.length)return null;for(i=0;i<data.byteLength;)size=toUnsigned(data[i]<<24|data[i+1]<<16|data[i+2]<<8|data[i+3]),type=parseType(data.subarray(i+4,i+8)),end=size>1?i+size:data.byteLength,type===path[0]&&(1===path.length?results.push(data.subarray(i+8,end)):(subresults=findBox(data.subarray(i+8,end),path.slice(1))).length&&(results=results.concat(subresults))),i=end;return results};module.exports=findBox},{"../utils/bin":64,"./parse-type.js":56}],56:[function(require,module,exports){module.exports=function(buffer){var result="";return result+=String.fromCharCode(buffer[0]),result+=String.fromCharCode(buffer[1]),result+=String.fromCharCode(buffer[2]),result+=String.fromCharCode(buffer[3])}},{}],57:[function(require,module,exports){"use strict";var timescale,startTime,compositionStartTime,getVideoTrackIds,getTracks,getTimescaleFromMediaHeader,toUnsigned=require("../utils/bin").toUnsigned,toHexString=require("../utils/bin").toHexString,findBox=require("../mp4/find-box.js"),parseType=require("../mp4/parse-type.js"),parseTfhd=require("../tools/parse-tfhd.js"),parseTrun=require("../tools/parse-trun.js"),parseTfdt=require("../tools/parse-tfdt.js");timescale=function(init){return findBox(init,["moov","trak"]).reduce(function(result,trak){var tkhd,version,index,id,mdhd;return(tkhd=findBox(trak,["tkhd"])[0])?(version=tkhd[0],id=toUnsigned(tkhd[index=0===version?12:20]<<24|tkhd[index+1]<<16|tkhd[index+2]<<8|tkhd[index+3]),(mdhd=findBox(trak,["mdia","mdhd"])[0])?(index=0===(version=mdhd[0])?12:20,result[id]=toUnsigned(mdhd[index]<<24|mdhd[index+1]<<16|mdhd[index+2]<<8|mdhd[index+3]),result):null):null},{})},startTime=function(timescale,fragment){var trafs,baseTimes,result;return trafs=findBox(fragment,["moof","traf"]),baseTimes=[].concat.apply([],trafs.map(function(traf){return findBox(traf,["tfhd"]).map(function(tfhd){var id,scale;return id=toUnsigned(tfhd[4]<<24|tfhd[5]<<16|tfhd[6]<<8|tfhd[7]),scale=timescale[id]||9e4,(findBox(traf,["tfdt"]).map(function(tfdt){var version,result;return version=tfdt[0],result=toUnsigned(tfdt[4]<<24|tfdt[5]<<16|tfdt[6]<<8|tfdt[7]),1===version&&(result*=Math.pow(2,32),result+=toUnsigned(tfdt[8]<<24|tfdt[9]<<16|tfdt[10]<<8|tfdt[11])),result})[0]||1/0)/scale})})),result=Math.min.apply(null,baseTimes),isFinite(result)?result:0},compositionStartTime=function(timescales,fragment){var trackId,trafBoxes=findBox(fragment,["moof","traf"]),baseMediaDecodeTime=0,compositionTimeOffset=0;if(trafBoxes&&trafBoxes.length){var tfhd=findBox(trafBoxes[0],["tfhd"])[0],trun=findBox(trafBoxes[0],["trun"])[0],tfdt=findBox(trafBoxes[0],["tfdt"])[0];if(tfhd)trackId=parseTfhd(tfhd).trackId;if(tfdt)baseMediaDecodeTime=parseTfdt(tfdt).baseMediaDecodeTime;if(trun){var parsedTrun=parseTrun(trun);parsedTrun.samples&&parsedTrun.samples.length&&(compositionTimeOffset=parsedTrun.samples[0].compositionTimeOffset||0)}}return(baseMediaDecodeTime+compositionTimeOffset)/(timescales[trackId]||9e4)},getVideoTrackIds=function(init){var traks=findBox(init,["moov","trak"]),videoTrackIds=[];return traks.forEach(function(trak){var hdlrs=findBox(trak,["mdia","hdlr"]),tkhds=findBox(trak,["tkhd"]);
vendor: 5,935 bytes, line 1
1hdlrs.forEach(function(hdlr,index){var view,trackId,handlerType=parseType(hdlr.subarray(8,12)),tkhd=tkhds[index];"vide"===handlerType&&(trackId=0===(view=new DataView(tkhd.buffer,tkhd.byteOffset,tkhd.byteLength)).getUint8(0)?view.getUint32(12):view.getUint32(20),videoTrackIds.push(trackId))})}),videoTrackIds},getTimescaleFromMediaHeader=function(mdhd){var index=0===mdhd[0]?12:20;return toUnsigned(mdhd[index]<<24|mdhd[index+1]<<16|mdhd[index+2]<<8|mdhd[index+3])},getTracks=function(init){var traks=findBox(init,["moov","trak"]),tracks=[];return traks.forEach(function(trak){var view,tkhdVersion,track={},tkhd=findBox(trak,["tkhd"])[0];tkhd&&(tkhdVersion=(view=new DataView(tkhd.buffer,tkhd.byteOffset,tkhd.byteLength)).getUint8(0),track.id=0===tkhdVersion?view.getUint32(12):view.getUint32(20));var hdlr=findBox(trak,["mdia","hdlr"])[0];if(hdlr){var type=parseType(hdlr.subarray(8,12));track.type="vide"===type?"video":"soun"===type?"audio":type}var stsd=findBox(trak,["mdia","minf","stbl","stsd"])[0];if(stsd){var sampleDescriptions=stsd.subarray(8);track.codec=parseType(sampleDescriptions.subarray(4,8));var codecConfig,codecBox=findBox(sampleDescriptions,[track.codec])[0];codecBox&&(/^[a-z]vc[1-9]$/i.test(track.codec)?(codecConfig=codecBox.subarray(78),"avcC"===parseType(codecConfig.subarray(4,8))&&codecConfig.length>11?(track.codec+=".",track.codec+=toHexString(codecConfig[9]),track.codec+=toHexString(codecConfig[10]),track.codec+=toHexString(codecConfig[11])):track.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(track.codec)&&(codecConfig=codecBox.subarray(28),"esds"===parseType(codecConfig.subarray(4,8))&&codecConfig.length>20&&0!==codecConfig[19]?(track.codec+="."+toHexString(codecConfig[19]),track.codec+="."+toHexString(codecConfig[20]>>>2&63).replace(/^0/,"")):track.codec="mp4a.40.2"))}var mdhd=findBox(trak,["mdia","mdhd"])[0];mdhd&&(track.timescale=getTimescaleFromMediaHeader(mdhd)),tracks.push(track)}),tracks},module.exports={findBox:findBox,parseType:parseType,timescale:timescale,startTime:startTime,compositionStartTime:compositionStartTime,videoTrackIds:getVideoTrackIds,tracks:getTracks,getTimescaleFromMediaHeader:getTimescaleFromMediaHeader}},{"../mp4/find-box.js":55,"../mp4/parse-type.js":56,"../tools/parse-tfdt.js":60,"../tools/parse-tfhd.js":61,"../tools/parse-trun.js":62,"../utils/bin":64}],58:[function(require,module,exports){module.exports=function(flags){return{isLeading:(12&flags[0])>>>2,dependsOn:3&flags[0],isDependedOn:(192&flags[1])>>>6,hasRedundancy:(48&flags[1])>>>4,paddingValue:(14&flags[1])>>>1,isNonSyncSample:1&flags[1],degradationPriority:flags[2]<<8|flags[3]}}},{}],59:[function(require,module,exports){module.exports=function(data){var i,view=new DataView(data.buffer,data.byteOffset,data.byteLength),result={version:data[0],flags:new Uint8Array(data.subarray(1,4)),references:[],referenceId:view.getUint32(4),timescale:view.getUint32(8),earliestPresentationTime:view.getUint32(12),firstOffset:view.getUint32(16)},referenceCount=view.getUint16(22);for(i=24;referenceCount;i+=12,referenceCount--)result.references.push({referenceType:(128&data[i])>>>7,referencedSize:2147483647&view.getUint32(i),subsegmentDuration:view.getUint32(i+4),startsWithSap:!!(128&data[i+8]),sapType:(112&data[i+8])>>>4,sapDeltaTime:268435455&view.getUint32(i+8)});return result}},{}],60:[function(require,module,exports){var toUnsigned=require("../utils/bin").toUnsigned;module.exports=function(data){var result={version:data[0],flags:new Uint8Array(data.subarray(1,4)),baseMediaDecodeTime:toUnsigned(data[4]<<24|data[5]<<16|data[6]<<8|data[7])};return 1===result.version&&(result.baseMediaDecodeTime*=Math.pow(2,32),result.baseMediaDecodeTime+=toUnsigned(data[8]<<24|data[9]<<16|data[10]<<8|data[11])),result}},{"../utils/bin":64}],61:[function(require,module,exports){module.exports=function(data){var i,view=new DataView(data.buffer,data.byteOffset,data.byteLength),result={version:data[0],flags:new Uint8Array(data.subarray(1,4)),trackId:view.getUint32(4)},baseDataOffsetPresent=1&result.flags[2],sampleDescriptionIndexPresent=2&result.flags[2],defaultSampleDurationPresent=8&result.flags[2],defaultSampleSizePresent=16&result.flags[2],defaultSampleFlagsPresent=32&result.flags[2],durationIsEmpty=65536&result.flags[0],defaultBaseIsMoof=131072&result.flags[0];return i=8,baseDataOffsetPresent&&(i+=4,result.baseDataOffset=view.getUint32(12),i+=4),sampleDescriptionIndexPresent&&(result.sampleDescriptionIndex=view.getUint32(i),i+=4),defaultSampleDurationPresent&&(result.defaultSampleDuration=view.getUint32(i),i+=4),defaultSampleSizePresent&&(result.defaultSampleSize=view.getUint32(i),i+=4),defaultSampleFlagsPresent&&(result.defaultSampleFlags=view.getUint32(i)),durationIsEmpty&&(result.durationIsEmpty=!0),!baseDataOffsetPresent&&defaultBaseIsMoof&&(result.baseDataOffsetIsMoof=!0),result}},{}],62:[function(require,module,exports){var parseSampleFlags=require("./parse-sample-flags.js");module.exports=function(data){var sample,result={version:data[0],flags:new Uint8Array(data.subarray(1,4)),samples:[]},view=new DataView(data.buffer,data.byteOffset,data.byteLength),dataOffsetPresent=1&result.flags[2],firstSampleFlagsPresent=4&result.flags[2],sampleDurationPresent=1&result.flags[1],sampleSizePresent=2&result.flags[1],sampleFlagsPresent=4&result.flags[1],sampleCompositionTimeOffsetPresent=8&result.flags[1],sampleCount=view.getUint32(4),offset=8;for(dataOffsetPresent&&(result.dataOffset=view.getInt32(offset),offset+=4),firstSampleFlagsPresent&&sampleCount&&(sample={flags:parseSampleFlags(data.subarray(offset,offset+4))},offset+=4,sampleDurationPresent&&(sample.duration=view.getUint32(offset),offset+=4),sampleSizePresent&&(sample.size=view.getUint32(offset),offset+=4),sampleCompositionTimeOffsetPresent&&(1===result.version?sample.compositionTimeOffset=view.getInt32(offset):sample.compositionTimeOffset=view.getUint32(offset),offset+=4),result.samples.push(sample),sampleCount--);
vendor: 5,062 bytes, line 1
1sampleCount--;)sample={},sampleDurationPresent&&(sample.duration=view.getUint32(offset),offset+=4),sampleSizePresent&&(sample.size=view.getUint32(offset),offset+=4),sampleFlagsPresent&&(sample.flags=parseSampleFlags(data.subarray(offset,offset+4)),offset+=4),sampleCompositionTimeOffsetPresent&&(1===result.version?sample.compositionTimeOffset=view.getInt32(offset):sample.compositionTimeOffset=view.getUint32(offset),offset+=4),result.samples.push(sample);return result}},{"./parse-sample-flags.js":58}],63:[function(require,module,exports){"use strict";var StreamTypes=require("../m2ts/stream-types.js"),handleRollover=require("../m2ts/timestamp-rollover-stream.js").handleRollover,probe={};probe.ts=require("../m2ts/probe.js"),probe.aac=require("../aac/utils.js");var ONE_SECOND_IN_TS=require("../utils/clock").ONE_SECOND_IN_TS,parseAudioPes_=function(bytes,pmt,result){for(var packet,pesType,pusi,parsed,startIndex=0,endIndex=188,endLoop=!1;endIndex<=bytes.byteLength;)if(71!==bytes[startIndex]||71!==bytes[endIndex]&&endIndex!==bytes.byteLength)startIndex++,endIndex++;else{switch(packet=bytes.subarray(startIndex,endIndex),probe.ts.parseType(packet,pmt.pid)){case"pes":pesType=probe.ts.parsePesType(packet,pmt.table),pusi=probe.ts.parsePayloadUnitStartIndicator(packet),"audio"===pesType&&pusi&&(parsed=probe.ts.parsePesTime(packet))&&(parsed.type="audio",result.audio.push(parsed),endLoop=!0)}if(endLoop)break;startIndex+=188,endIndex+=188}for(startIndex=(endIndex=bytes.byteLength)-188,endLoop=!1;startIndex>=0;)if(71!==bytes[startIndex]||71!==bytes[endIndex]&&endIndex!==bytes.byteLength)startIndex--,endIndex--;else{switch(packet=bytes.subarray(startIndex,endIndex),probe.ts.parseType(packet,pmt.pid)){case"pes":pesType=probe.ts.parsePesType(packet,pmt.table),pusi=probe.ts.parsePayloadUnitStartIndicator(packet),"audio"===pesType&&pusi&&(parsed=probe.ts.parsePesTime(packet))&&(parsed.type="audio",result.audio.push(parsed),endLoop=!0)}if(endLoop)break;startIndex-=188,endIndex-=188}},parseVideoPes_=function(bytes,pmt,result){for(var packet,pesType,pusi,parsed,frame,i,pes,startIndex=0,endIndex=188,endLoop=!1,currentFrame={data:[],size:0};endIndex<bytes.byteLength;)if(71!==bytes[startIndex]||71!==bytes[endIndex])startIndex++,endIndex++;else{switch(packet=bytes.subarray(startIndex,endIndex),probe.ts.parseType(packet,pmt.pid)){case"pes":if(pesType=probe.ts.parsePesType(packet,pmt.table),pusi=probe.ts.parsePayloadUnitStartIndicator(packet),"video"===pesType&&(pusi&&!endLoop&&(parsed=probe.ts.parsePesTime(packet))&&(parsed.type="video",result.video.push(parsed),endLoop=!0),!result.firstKeyFrame)){if(pusi&&0!==currentFrame.size){for(frame=new Uint8Array(currentFrame.size),i=0;currentFrame.data.length;)pes=currentFrame.data.shift(),frame.set(pes,i),i+=pes.byteLength;if(probe.ts.videoPacketContainsKeyFrame(frame)){var firstKeyFrame=probe.ts.parsePesTime(frame);firstKeyFrame?(result.firstKeyFrame=firstKeyFrame,result.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}currentFrame.size=0}currentFrame.data.push(packet),currentFrame.size+=packet.byteLength}}if(endLoop&&result.firstKeyFrame)break;startIndex+=188,endIndex+=188}for(startIndex=(endIndex=bytes.byteLength)-188,endLoop=!1;startIndex>=0;)if(71!==bytes[startIndex]||71!==bytes[endIndex])startIndex--,endIndex--;else{switch(packet=bytes.subarray(startIndex,endIndex),probe.ts.parseType(packet,pmt.pid)){case"pes":pesType=probe.ts.parsePesType(packet,pmt.table),pusi=probe.ts.parsePayloadUnitStartIndicator(packet),"video"===pesType&&pusi&&(parsed=probe.ts.parsePesTime(packet))&&(parsed.type="video",result.video.push(parsed),endLoop=!0)}if(endLoop)break;startIndex-=188,endIndex-=188}},inspectTs_=function(bytes){var pmt={pid:null,table:null},result={};for(var pid in function(bytes,pmt){for(var packet,startIndex=0,endIndex=188;endIndex<bytes.byteLength;)if(71!==bytes[startIndex]||71!==bytes[endIndex])startIndex++,endIndex++;else{switch(packet=bytes.subarray(startIndex,endIndex),probe.ts.parseType(packet,pmt.pid)){case"pat":pmt.pid||(pmt.pid=probe.ts.parsePat(packet));break;case"pmt":pmt.table||(pmt.table=probe.ts.parsePmt(packet))}if(pmt.pid&&pmt.table)return;startIndex+=188,endIndex+=188}}(bytes,pmt),pmt.table){if(pmt.table.hasOwnProperty(pid))switch(pmt.table[pid]){case StreamTypes.H264_STREAM_TYPE:result.video=[],parseVideoPes_(bytes,pmt,result),0===result.video.length&&delete result.video;break;case StreamTypes.ADTS_STREAM_TYPE:result.audio=[],parseAudioPes_(bytes,pmt,result),0===result.audio.length&&delete result.audio}}return result};module.exports={inspect:function(bytes,baseTimestamp){var result;return(result=probe.aac.isLikelyAacData(bytes)?function(bytes){for(var packet,endLoop=!1,audioCount=0,sampleRate=null,timestamp=null,frameSize=0,byteIndex=0;bytes.length-byteIndex>=3;
1){switch(probe.aac.parseType(bytes,byteIndex)){case"timed-metadata":if(bytes.length-byteIndex<10){endLoop=!0;break}if((frameSize=probe.aac.parseId3TagSize(bytes,byteIndex))>bytes.length){endLoop=!0;break}null===timestamp&&(packet=bytes.subarray(byteIndex,byteIndex+frameSize),timestamp=probe.aac.parseAacTimestamp(packet)),byteIndex+=frameSize;break;case"audio":if(bytes.length-byteIndex<7){endLoop=!0;break}if((frameSize=probe.aac.parseAdtsSize(bytes,byteIndex))>bytes.length){endLoop=!0;break}null===sampleRate&&(packet=bytes.subarray(byteIndex,byteIndex+frameSize),sampleRate=probe.aac.parseSampleRate(packet)),audioCount++,byteIndex+=frameSize;break;default:byteIndex++}if(endLoop)return null}if(null===sampleRate||null===timestamp)return null;var audioTimescale=ONE_SECOND_IN_TS/sampleRate;return{audio:[{type:"audio",dts:timestamp,pts:timestamp},{type:"audio",dts:timestamp+1024*audioCount*audioTimescale,pts:timestamp+1024*audioCount*audioTimescale}]}}(bytes):inspectTs_(bytes))&&(result.audio||result.video)?(function(segmentInfo,baseTimestamp){if(segmentInfo.audio&&segmentInfo.audio.length){var audioBaseTimestamp=baseTimestamp;void 0===audioBaseTimestamp&&(audioBaseTimestamp=segmentInfo.audio[0].dts),segmentInfo.audio.forEach(function(info){info.dts=handleRollover(info.dts,audioBaseTimestamp),info.pts=handleRollover(info.pts,audioBaseTimestamp),info.dtsTime=info.dts/ONE_SECOND_IN_TS,info.ptsTime=info.pts/ONE_SECOND_IN_TS})}if(segmentInfo.video&&segmentInfo.video.length){var videoBaseTimestamp=baseTimestamp;if(void 0===videoBaseTimestamp&&(videoBaseTimestamp=segmentInfo.video[0].dts),segmentInfo.video.forEach(function(info){info.dts=handleRollover(info.dts,videoBaseTimestamp),info.pts=handleRollover(info.pts,videoBaseTimestamp),info.dtsTime=info.dts/ONE_SECOND_IN_TS,info.ptsTime=info.pts/ONE_SECOND_IN_TS}),segmentInfo.firstKeyFrame){var frame=segmentInfo.firstKeyFrame;frame.dts=handleRollover(frame.dts,videoBaseTimestamp),frame.pts=handleRollover(frame.pts,videoBaseTimestamp),frame.dtsTime=frame.dts/ONE_SECOND_IN_TS,frame.ptsTime=frame.dts/ONE_SECOND_IN_TS}}}(result,baseTimestamp),result):null},parseAudioPes_:parseAudioPes_}},{"../aac/utils.js":51,"../m2ts/probe.js":52,"../m2ts/stream-types.js":53,"../m2ts/timestamp-rollover-stream.js":54,"../utils/clock":65}],64:[function(require,module,exports){module.exports={toUnsigned:function(value){return value>>>0},toHexString:function(value){return("00"+value.toString(16)).slice(-2)}}},{}],65:[function(require,module,exports){var secondsToVideoTs,secondsToAudioTs,videoTsToSeconds,audioTsToSeconds,audioTsToVideoTs,videoTsToAudioTs,metadataTsToSeconds;secondsToVideoTs=function(seconds){return 9e4*seconds},secondsToAudioTs=function(seconds,sampleRate){return seconds*sampleRate},videoTsToSeconds=function(timestamp){return timestamp/9e4},audioTsToSeconds=function(timestamp,sampleRate){return timestamp/sampleRate},audioTsToVideoTs=function(timestamp,sampleRate){return secondsToVideoTs(audioTsToSeconds(timestamp,sampleRate))},videoTsToAudioTs=function(timestamp,sampleRate){return secondsToAudioTs(videoTsToSeconds(timestamp),sampleRate)},metadataTsToSeconds=function(timestamp,timelineStartPts,keepOriginalTimestamps){return videoTsToSeconds(keepOriginalTimestamps?timestamp:timestamp-timelineStartPts)},module.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:secondsToVideoTs,secondsToAudioTs:secondsToAudioTs,videoTsToSeconds:videoTsToSeconds,audioTsToSeconds:audioTsToSeconds,audioTsToVideoTs:audioTsToVideoTs,videoTsToAudioTs:videoTsToAudioTs,metadataTsToSeconds:metadataTsToSeconds}},{}],66:[function(require,module,exports){"use strict";var Stream=function(){this.init=function(){var listeners={};this.on=function(type,listener){listeners[type]||(listeners[type]=[]),listeners[type]=listeners[type].concat(listener)},this.off=function(type,listener){var index;return!!listeners[type]&&(index=listeners[type].indexOf(listener),listeners[type]=listeners[type].slice(),listeners[type].splice(index,1),index>-1)},this.trigger=function(type){var callbacks,i,length,args;if(callbacks=listeners[type])if(2===arguments.length)for(length=callbacks.length,i=0;i<length;++i)callbacks[i].call(this,arguments[1]);else{for(args=[],i=arguments.length,i=1;i<arguments.length;++i)args.push(arguments[i]);for(length=callbacks.length,i=0;i<length;++i)callbacks[i].apply(this,args)}},this.dispose=function(){listeners={}}}};Stream.prototype.pipe=function(destination){return this.on("data",function(data){destination.push(data)}),this.on("done",function(flushSource){destination.flush(flushSource)}),this.on("partialdone",function(flushSource){destination.partialFlush(flushSource)}),this.on("endedtimeline",function(flushSource){destination.endTimeline(flushSource)}),this.on("reset",function(flushSource){destination.reset(flushSource)}),destination},Stream.prototype.push=function(data){this.trigger("data",data)},Stream.prototype.flush=function(flushSource){this.trigger("done",flushSource)},Stream.prototype.partialFlush=function(flushSource){this.trigger("partialdone",flushSource)},Stream.prototype.endTimeline=function(flushSource){this.trigger("endedtimeline",flushSource)},Stream.prototype.reset=function(flushSource){this.trigger("reset",flushSource)},module.exports=Stream},{}],67:[function(require,module,exports){!function(root,factory){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=factory():"function"==typeof define&&define.amd?define([],factory):root.objectPath=factory()}(this,function(){"use strict";var toStr=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty;function isEmpty(value){if(!value)return!0;
vendor: 4,160 bytes, line 1
1if(isArray(value)&&0===value.length)return!0;for(var i in value)if(_hasOwnProperty.call(value,i))return!1;return!0}function toString(type){return toStr.call(type)}function isNumber(value){return"number"==typeof value||"[object Number]"===toString(value)}function isString(obj){return"string"==typeof obj||"[object String]"===toString(obj)}function isArray(obj){return"object"==typeof obj&&"number"==typeof obj.length&&"[object Array]"===toString(obj)}function getKey(key){var intKey=parseInt(key);return intKey.toString()===key?intKey:key}function set(obj,path,value,doNotReplace){if(isNumber(path)&&(path=[path]),isEmpty(path))return obj;if(isString(path))return set(obj,path.split("."),value,doNotReplace);var currentPath=getKey(path[0]);if(1===path.length){var oldVal=obj[currentPath];return void 0!==oldVal&&doNotReplace||(obj[currentPath]=value),oldVal}return void 0===obj[currentPath]&&(isNumber(currentPath)?obj[currentPath]=[]:obj[currentPath]={}),set(obj[currentPath],path.slice(1),value,doNotReplace)}var objectPath={ensureExists:function(obj,path,value){return set(obj,path,value,!0)},set:function(obj,path,value,doNotReplace){return set(obj,path,value,doNotReplace)},insert:function(obj,path,value,at){var arr=objectPath.get(obj,path);at=~~at,isArray(arr)||(arr=[],objectPath.set(obj,path,arr)),arr.splice(at,0,value)}};return objectPath.empty=function(obj,path){if(isEmpty(path))return obj;if(!isEmpty(obj)){var value,i;if(!(value=objectPath.get(obj,path)))return obj;if(isString(value))return objectPath.set(obj,path,"");if(function(obj){return"boolean"==typeof obj||"[object Boolean]"===toString(obj)}(value))return objectPath.set(obj,path,!1);if(isNumber(value))return objectPath.set(obj,path,0);if(isArray(value))value.length=0;else{if(!function(obj){return"object"==typeof obj&&"[object Object]"===toString(obj)}(value))return objectPath.set(obj,path,null);for(i in value)_hasOwnProperty.call(value,i)&&delete value[i]}}},objectPath.push=function(obj,path){var arr=objectPath.get(obj,path);isArray(arr)||(arr=[],objectPath.set(obj,path,arr)),arr.push.apply(arr,Array.prototype.slice.call(arguments,2))},objectPath.coalesce=function(obj,paths,defaultValue){for(var value,i=0,len=paths.length;i<len;i++)if(void 0!==(value=objectPath.get(obj,paths[i])))return value;return defaultValue},objectPath.get=function(obj,path,defaultValue){if(isNumber(path)&&(path=[path]),isEmpty(path))return obj;if(isEmpty(obj))return defaultValue;if(isString(path))return objectPath.get(obj,path.split("."),defaultValue);var currentPath=getKey(path[0]);return 1===path.length?void 0===obj[currentPath]?defaultValue:obj[currentPath]:objectPath.get(obj[currentPath],path.slice(1),defaultValue)},objectPath.del=function(obj,path){return function del(obj,path){if(isNumber(path)&&(path=[path]),!isEmpty(obj)){if(isEmpty(path))return obj;if(isString(path))return del(obj,path.split("."));var currentPath=getKey(path[0]),oldVal=obj[currentPath];if(1===path.length)void 0!==oldVal&&(isArray(obj)?obj.splice(currentPath,1):delete obj[currentPath]);else if(void 0!==obj[currentPath])return del(obj[currentPath],path.slice(1));return obj}}(obj,path)},objectPath})},{}],68:[function(require,module,exports){var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,
vendor: 4,300 bytes, line 1
1currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,function(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],69:[function(require,module,exports){"use strict";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("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i<len;++i){var kstr,vstr,k,v,x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq);idx>=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},{}],70:[function(require,module,exports){"use strict";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){return sep=sep||"&",eq=eq||"=",null===obj&&(obj=void 0),"object"==typeof obj?map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;return isArray(obj[k])?map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj)):""};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)};function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],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)Object.prototype.hasOwnProperty.call(obj,key)&&res.push(key);return res}},{}],71:[function(require,module,exports){"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode")},{"./decode":69,"./encode":70}],72:[function(require,module,exports){!function(factory){"use strict";"function"==typeof define&&define.amd?define(["jquery"],factory):"object"==typeof exports?module.exports=factory(require("jquery")):factory(jQuery)}(function($){"use strict";Number.isNaN=Number.isNaN||function(value){return"number"==typeof value&&value!=value};var input,pluginName="rangeslider",pluginIdentifier=0,hasInputRangeSupport=((input=document.createElement("input")).setAttribute("type","range"),"text"!==in
vendor: 6,063 bytes, line 1
1put.type),defaults={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},constants={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};function isHidden(element){return element&&(0===element.offsetWidth||0===element.offsetHeight||!1===element.open)}function getDimension(element,key){var hiddenParentNodes=function(element){for(var parents=[],node=element.parentNode;isHidden(node);)parents.push(node),node=node.parentNode;return parents}(element),hiddenParentNodesLength=hiddenParentNodes.length,inlineStyle=[],dimension=element[key];function toggleOpenProperty(element){void 0!==element.open&&(element.open=!element.open)}if(hiddenParentNodesLength){for(var i=0;i<hiddenParentNodesLength;i++)inlineStyle[i]=hiddenParentNodes[i].style.cssText,hiddenParentNodes[i].style.setProperty?hiddenParentNodes[i].style.setProperty("display","block","important"):hiddenParentNodes[i].style.cssText+=";display: block !important",hiddenParentNodes[i].style.height="0",hiddenParentNodes[i].style.overflow="hidden",hiddenParentNodes[i].style.visibility="hidden",toggleOpenProperty(hiddenParentNodes[i]);dimension=element[key];for(var j=0;j<hiddenParentNodesLength;j++)hiddenParentNodes[j].style.cssText=inlineStyle[j],toggleOpenProperty(hiddenParentNodes[j])}return dimension}function tryParseFloat(str,defaultValue){var value=parseFloat(str);return Number.isNaN(value)?defaultValue:value}function ucfirst(str){return str.charAt(0).toUpperCase()+str.substr(1)}function Plugin(element,options){if(this.$window=$(window),this.$document=$(document),this.$element=$(element),this.options=$.extend({},defaults,options),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=constants.orientation[this.orientation].dimension,this.DIRECTION=constants.orientation[this.orientation].direction,this.DIRECTION_STYLE=constants.orientation[this.orientation].directionStyle,this.COORDINATE=constants.orientation[this.orientation].coordinate,this.polyfill&&hasInputRangeSupport)return!1;this.identifier="js-"+pluginName+"-"+pluginIdentifier++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=$('<div class="'+this.options.fillClass+'" />'),this.$handle=$('<div class="'+this.options.handleClass+'" />'),this.$range=$('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=$.proxy(this.handleDown,this),this.handleMove=$.proxy(this.handleMove,this),this.handleEnd=$.proxy(this.handleEnd,this),this.init();var fn,debounceDuration,_this=this;this.$window.on("resize."+this.identifier,(fn=function(){!function(fn,wait){var args=Array.prototype.slice.call(arguments,2);setTimeout(function(){return fn.apply(null,args)},wait)}(function(){_this.update(!1,!1)},300)},debounceDuration=(debounceDuration=20)||100,function(){if(!fn.debouncing){var args=Array.prototype.slice.apply(arguments);fn.lastReturnVal=fn.apply(window,args),fn.debouncing=!0}return clearTimeout(fn.debounceTimeout),fn.debounceTimeout=setTimeout(function(){fn.debouncing=!1},debounceDuration),fn.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,data){if(!data||data.origin!==_this.identifier){var value=e.target.value,pos=_this.getPositionFromValue(value);_this.setPosition(pos)}})}return Plugin.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},Plugin.prototype.update=function(updateAttributes,triggerSlide){(updateAttributes=updateAttributes||!1)&&(this.min=tryParseFloat(this.$element[0].getAttribute("min"),0),this.max=tryParseFloat(this.$element[0].getAttribute("max"),100),this.value=tryParseFloat(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=tryParseFloat(this.$element[0].getAttribute("step"),1)),this.handleDimension=getDimension(this.$handle[0],"offset"+ucfirst(this.DIMENSION)),this.rangeDimension=getDimension(this.$range[0],"offset"+ucfirst(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,triggerSlide)},Plugin.prototype.handleDown=function(e){if(e.preventDefault(),!(e.button&&0!==e.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),(" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)>-1))){var pos=this.getRelativePosition(e),rangePos=this.$range[0].getBoundingClientRect()[this.DIRECTION],handlePos=this.getPositionFromNode(this.$handle[0])-rangePos,setPos="vertical"===this.orientation?this.maxHandlePos-(pos-this.grabPos):pos-this.grabPos;this.setPosition(setPos),pos>
1=handlePos&&pos<handlePos+this.handleDimension&&(this.grabPos=pos-handlePos)}},Plugin.prototype.handleMove=function(e){e.preventDefault();var pos=this.getRelativePosition(e),setPos="vertical"===this.orientation?this.maxHandlePos-(pos-this.grabPos):pos-this.grabPos;this.setPosition(setPos)},Plugin.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},Plugin.prototype.cap=function(pos,min,max){return pos<min?min:pos>max?max:pos},Plugin.prototype.setPosition=function(pos,triggerSlide){var value,newPos;void 0===triggerSlide&&(triggerSlide=!0),value=this.getValueFromPosition(this.cap(pos,0,this.maxHandlePos)),newPos=this.getPositionFromValue(value),this.$fill[0].style[this.DIMENSION]=newPos+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=newPos+"px",this.setValue(value),this.position=newPos,this.value=value,triggerSlide&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(newPos,value)},Plugin.prototype.getPositionFromNode=function(node){for(var i=0;null!==node;)i+=node.offsetLeft,node=node.offsetParent;return i},Plugin.prototype.getRelativePosition=function(e){var ucCoordinate=ucfirst(this.COORDINATE),rangePos=this.$range[0].getBoundingClientRect()[this.DIRECTION],pageCoordinate=0;return void 0!==e.originalEvent["client"+ucCoordinate]?pageCoordinate=e.originalEvent["client"+ucCoordinate]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+ucCoordinate]?pageCoordinate=e.originalEvent.touches[0]["client"+ucCoordinate]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(pageCoordinate=e.currentPoint[this.COORDINATE]),pageCoordinate-rangePos},Plugin.prototype.getPositionFromValue=function(value){var percentage;return percentage=(value-this.min)/(this.max-this.min),Number.isNaN(percentage)?0:percentage*this.maxHandlePos},Plugin.prototype.getValueFromPosition=function(pos){var percentage,value;return percentage=pos/(this.maxHandlePos||1),value=this.step*Math.round(percentage*(this.max-this.min)/this.step)+this.min,Number(value.toFixed(this.toFixed))},Plugin.prototype.setValue=function(value){value===this.value&&""!==this.$element[0].value||this.$element.val(value).trigger("input",{origin:this.identifier})},Plugin.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+pluginName),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},$.fn[pluginName]=function(options){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this=$(this),data=$this.data("plugin_"+pluginName);data||$this.data("plugin_"+pluginName,data=new Plugin(this,options)),"string"==typeof options&&data[options].apply(data,args)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"})},{jquery:46}],73:[function(require,module,exports){module.exports=function(arr,fn,initial){for(var idx=0,len=arr.length,curr=3==arguments.length?initial:arr[idx++];idx<len;)curr=fn.call(null,curr,arr[idx],++idx,arr);return curr}},{}],74:[function(require,module,exports){module.exports=function(obj,reviver){var json,error=null;try{json=JSON.parse(obj,reviver)}catch(err){error=err}return[error,json]}},{}],75:[function(require,module,exports){var sortBy,sort,type,objectPath=require("object-path");type=function(type){return function(arg){return typeof arg===type}},sort=function(property,map){var sortOrder=1,apply=map||function(_,value){return value};return"-"===property[0]&&(sortOrder=-1,property=property.substr(1)),function(a,b){var result,am=apply(property,objectPath.get(a,property)),bm=apply(property,objectPath.get(b,property));return am<bm&&(result=-1),am>bm&&(result=1),am===bm&&(result=0),result*sortOrder}},sortBy=function(){var args=Array.prototype.slice.call(arguments),properties=args.filter(type("string")),map=args.filter(type("function"))[0];return function(obj1,obj2){for(var numberOfProperties=properties.length,result=0,i=0;0===result&&i<numberOfProperties;)result=sort(properties[i],map)(obj1,obj2),i++;return result}},module.exports=sortBy},{"object-path":67}],76:[function(require,module,exports){var root,Emitter=require("emitter"),reduce=require("reduce"),requestBase=require("./request-base"),isObject=require("./is-object");function noop(){}function isHost(obj){switch({}.toString.call(obj)){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}root="undefined"!=typeof window?window:"undefined"!=typeof self?self:this;var request=module.exports=require("./request").bind(null,Request);request.getXHR=function(){if(!(!root.XMLHttpRequest||root.location&&"file:"==root.location.protocol&&root.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var trim="".trim?function(s){return s.trim()}:function(s){return s.replace(/(^\s*|\s*$)/g,"")};function serialize(obj){if(!isObject(obj))return obj;var pairs=[];for(var key in obj)null!=obj[key]&&pushEncodedKeyValuePair(pairs,key,obj[key]);return pairs.join("&")}function pushEncodedKeyValuePair(pairs,key,val){if(Array.isArray(val))return val.forEach(function(v){pushEncodedKeyValuePair(pairs,key,v)});pairs.push(encodeURIComponent(key)+"="+encodeURIComponent(val))}function parseString(str){for(var parts,obj={},pairs=str.split("&"),i=0,len=pairs.length;i<len;++i)parts=pairs[i].split("="),obj[decodeURIComponent(parts[0])]=decodeURIComponent(parts[1]);return obj}function isJSON(mime){return/[\/+]json\b/.test(mime)}function Response(req,options){options=options||{},this.req=req,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=function(str){var index,line,field,val,lines=str.split(/\r?\n/),fields={};lines.pop();for(var i=0,len=lines.length;i<len;++i)index=(line=lines[i]).indexOf(":"),field=line.slice(0,index).toLowerCase(),val=trim(line.slice(index+1)),fields[field]=val;return fields}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}
vendor: 10,189 bytes, line 1
1function Request(method,url){var self=this;this._query=this._query||[],this.method=method,this.url=url,this.header={},this._header={},this.on("end",function(){var err=null,res=null;try{res=new Response(self)}catch(e){return(err=new Error("Parser is unable to parse the response")).parse=!0,err.original=e,err.rawResponse=self.xhr&&self.xhr.responseText?self.xhr.responseText:null,err.statusCode=self.xhr&&self.xhr.status?self.xhr.status:null,self.callback(err)}if(self.emit("response",res),err)return self.callback(err,res);if(res.status>=200&&res.status<300)return self.callback(err,res);var new_err=new Error(res.statusText||"Unsuccessful HTTP response");new_err.original=err,new_err.response=res,new_err.status=res.status,self.callback(new_err,res)})}for(var key in request.serializeObject=serialize,request.parseString=parseString,request.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},request.serialize={"application/x-www-form-urlencoded":serialize,"application/json":JSON.stringify},request.parse={"application/x-www-form-urlencoded":parseString,"application/json":JSON.parse},Response.prototype.get=function(field){return this.header[field.toLowerCase()]},Response.prototype.setHeaderProperties=function(header){var ct=this.header["content-type"]||"";this.type=ct.split(/ *; */).shift();var obj=function(str){return reduce(str.split(/ *; */),function(obj,str){var parts=str.split(/ *= */),key=parts.shift(),val=parts.shift();return key&&val&&(obj[key]=val),obj},{})}(ct);for(var key in obj)this[key]=obj[key]},Response.prototype.parseBody=function(str){var parse=request.parse[this.type];return!parse&&isJSON(this.type)&&(parse=request.parse["application/json"]),parse&&str&&(str.length||str instanceof Object)?parse(str):null},Response.prototype.setStatusProperties=function(status){1223===status&&(status=204);var type=status/100|0;this.status=this.statusCode=status,this.statusType=type,this.info=1==type,this.ok=2==type,this.clientError=4==type,this.serverError=5==type,this.error=(4==type||5==type)&&this.toError(),this.accepted=202==status,this.noContent=204==status,this.badRequest=400==status,this.unauthorized=401==status,this.notAcceptable=406==status,this.notFound=404==status,this.forbidden=403==status},Response.prototype.toError=function(){var req=this.req,method=req.method,url=req.url,msg="cannot "+method+" "+url+" ("+this.status+")",err=new Error(msg);return err.status=this.status,err.method=method,err.url=url,err},request.Response=Response,Emitter(Request.prototype),requestBase)Request.prototype[key]=requestBase[key];function del(url,fn){var req=request("DELETE",url);return fn&&req.end(fn),req}Request.prototype.abort=function(){if(!this.aborted)return this.aborted=!0,this.xhr&&this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this},Request.prototype.type=function(type){return this.set("Content-Type",request.types[type]||type),this},Request.prototype.responseType=function(val){return this._responseType=val,this},Request.prototype.accept=function(type){return this.set("Accept",request.types[type]||type),this},Request.prototype.auth=function(user,pass,options){switch(options||(options={type:"basic"}),options.type){case"basic":var str=btoa(user+":"+pass);this.set("Authorization","Basic "+str);break;case"auto":this.username=user,this.password=pass}return this},Request.prototype.query=function(val){return"string"!=typeof val&&(val=serialize(val)),val&&this._query.push(val),this},Request.prototype.attach=function(field,file,filename){return this._getFormData().append(field,file,filename||file.name),this},Request.prototype._getFormData=function(){return this._formData||(this._formData=new root.FormData),this._formData},Request.prototype.send=function(data){var obj=isObject(data),type=this._header["content-type"];if(obj&&isObject(this._data))for(var key in data)this._data[key]=data[key];else"string"==typeof data?(type||this.type("form"),type=this._header["content-type"],this._data="application/x-www-form-urlencoded"==type?this._data?this._data+"&"+data:data:(this._data||"")+data):this._data=data;return!obj||isHost(data)?this:(type||this.type("json"),this)},Response.prototype.parse=function(fn){return root.console&&console.warn("Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0"),this.serialize(fn),this},Response.prototype.serialize=function(fn){return this._parser=fn,this},Request.prototype.callback=function(err,res){var fn=this._callback;this.clearTimeout(),fn(err,res)},Request.prototype.crossDomainError=function(){var err=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");err.crossDomain=!0,err.status=this.status,err.method=this.method,err.url=this.url,this.callback(err)},Request.prototype.timeoutError=function(){var timeout=this._timeout,err=new Error("timeout of "+timeout+"ms exceeded");err.timeout=timeout,this.callback(err)},Request.prototype.withCredentials=function(){return this._withCredentials=!0,this},Request.prototype.end=function(fn){var self=this,xhr=this.xhr=request.getXHR(),query=this._query.join("&"),timeout=this._timeout,data=this._formData||this._data;this._callback=fn||noop,xhr.onreadystatechange=function(){if(4==xhr.readyState){var status;try{status=xhr.status}catch(e){status=0}if(0==status){if(self.timedout)return self.timeoutError();if(self.aborted)return;return self.crossDomainError()}self.emit("end")}};var handleProgress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",self.emit("progress",e)};this.hasListeners("progress")&&(xhr.onprogress=handleProgress);try{xhr.upload&&this.hasListeners("progress")&&(xhr.upload.onprogress=handleProgress)}catch(e){}if(timeout&&!this._timer&&(this._timer=setTimeout(function(){self.timedout=!0,self.abort()},timeout)),query&&(query=request.serializeObject(query),this.url+=~this.url.indexOf("?")?"&"+query:"?"+query),this.username&&this.password?xhr.open(this.method,this.url,!0,this.username,this.password):xhr.open(this.method,this.url,!0),this._withCredentials&&(xhr.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof data&&!isHost(data)){var contentType=this._header["content-type"],serialize=this._parser||request.serialize[contentType?contentType.split(";")[0]:""];!serialize&&isJSON(contentType)&&(serialize=request.serialize["application/json"]),serialize&&(data=serialize(data))}for(var field in this.header)null!=this.header[field]&&xhr.setRequestHeader(field,this.header[field]);return this._responseType&&(xhr.responseType=this._responseType),this.emit("request",this),xhr.send(void 0!==data?data:null),this},request.Request=Request,request.get=function(url,data,fn){var req=request("GET",url);return"function"==typeof data&&(fn=data,data=null),data&&req.query(data),fn&&req.end(fn),req},request.head=function(url,data,fn){var req=request("HEAD",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.del=del,request.delete=del,request.patch=function(url,data,fn){var req=request("PATCH",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.post=function(url,data,fn){var req=request("POST",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req},request.put=function(url,data,fn){var req=request("PUT",url);return"function"==typeof data&&(fn=data,data=null),data&&req.send(data),fn&&req.end(fn),req}},{"./is-object":77,"./request":79,"./request-base":78,emitter:80,reduce:73}],77:[function(require,module,exports){module.exports=function(obj){return null!=obj&&"object"==typeof obj}},{}],78:[function(require,module,exports){var isObject=require("./is-object");exports.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},exports.parse=function(fn){return this._parser=fn,this},exports.timeout=function(ms){return this._timeout=ms,this},exports.then=function(fulfill,reject){return this.end(function(err,res){err?reject(err):fulfill(res)})},exports.use=function(fn){return fn(this),this},exports.get=function(field){return this._header[field.toLowerCase()]},exports.getHeader=exports.get,exports.set=function(field,val){if(isObject(field)){for(var key in field)this.set(key,field[key]);return this}return this._header[field.toLowerCase()]=val,this.header[field]=val,this},exports.unset=function(field){return delete this._header[field.toLowerCase()],delete this.header[field],this},exports.field=function(name,val){return this._getFormData().append(name,val),this}},{"./is-object":77}],79:[function(require,module,exports){module.exports=function(RequestConstructor,method,url){return"function"==typeof url?new RequestConstructor("GET",method).end(url):2==arguments.length?new RequestConstructor("GET",method):new RequestConstructor(method,url)}},{}],80:[function(require,module,exports){function Emitter(obj){if(obj)return function(obj){for(var key in Emitter.prototype)obj[key]=Emitter.prototype[key];return obj}(obj)}void 0!==module&&(module.exports=Emitter),Emitter.prototype.on=Emitter.prototype.addEventListener=function(event,fn){return this._callbacks=this._callbacks||{},(this._callbacks["$"+event]=this._callbacks["$"+event]||[]).push(fn),this},Emitter.prototype.once=function(event,fn){function on(){this.off(event,on),fn.apply(this,arguments)}return on.fn=fn,this.on(event,on),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(event,fn){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var cb,callbacks=this._callbacks["$"+event];if(!callbacks)return this;if(1==arguments.length)return delete this._callbacks["$"+event],this;for(var i=0;i<callbacks.length;i++)if((cb=callbacks[i])===fn||cb.fn===fn){callbacks.splice(i,1);break}return this},Emitter.prototype.emit=function(event){this._callbacks=this._callbacks||{};
1var args=[].slice.call(arguments,1),callbacks=this._callbacks["$"+event];if(callbacks)for(var i=0,len=(callbacks=callbacks.slice(0)).length;i<len;++i)callbacks[i].apply(this,args);return this},Emitter.prototype.listeners=function(event){return this._callbacks=this._callbacks||{},this._callbacks["$"+event]||[]},Emitter.prototype.hasListeners=function(event){return!!this.listeners(event).length}},{}],81:[function(require,module,exports){var root,URL_REGEX,FIRST_SEGMENT_REGEX,SLASH_DOT_REGEX,SLASH_DOT_DOT_REGEX,URLToolkit;root=this,URL_REGEX=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,FIRST_SEGMENT_REGEX=/^([^\/?#]*)(.*)$/,SLASH_DOT_REGEX=/(?:\/|^)\.(?=\/)/g,SLASH_DOT_DOT_REGEX=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,URLToolkit={buildAbsoluteURL:function(baseURL,relativeURL,opts){if(opts=opts||{},baseURL=baseURL.trim(),!(relativeURL=relativeURL.trim())){if(!opts.alwaysNormalize)return baseURL;var basePartsForNormalise=URLToolkit.parseURL(baseURL);if(!basePartsForNormalise)throw new Error("Error trying to parse base URL.");return basePartsForNormalise.path=URLToolkit.normalizePath(basePartsForNormalise.path),URLToolkit.buildURLFromParts(basePartsForNormalise)}var relativeParts=URLToolkit.parseURL(relativeURL);if(!relativeParts)throw new Error("Error trying to parse relative URL.");if(relativeParts.scheme)return opts.alwaysNormalize?(relativeParts.path=URLToolkit.normalizePath(relativeParts.path),URLToolkit.buildURLFromParts(relativeParts)):relativeURL;var baseParts=URLToolkit.parseURL(baseURL);if(!baseParts)throw new Error("Error trying to parse base URL.");if(!baseParts.netLoc&&baseParts.path&&"/"!==baseParts.path[0]){var pathParts=FIRST_SEGMENT_REGEX.exec(baseParts.path);baseParts.netLoc=pathParts[1],baseParts.path=pathParts[2]}baseParts.netLoc&&!baseParts.path&&(baseParts.path="/");var builtParts={scheme:baseParts.scheme,netLoc:relativeParts.netLoc,path:null,params:relativeParts.params,query:relativeParts.query,fragment:relativeParts.fragment};if(!relativeParts.netLoc&&(builtParts.netLoc=baseParts.netLoc,"/"!==relativeParts.path[0]))if(relativeParts.path){var baseURLPath=baseParts.path,newPath=baseURLPath.substring(0,baseURLPath.lastIndexOf("/")+1)+relativeParts.path;builtParts.path=URLToolkit.normalizePath(newPath)}else builtParts.path=baseParts.path,relativeParts.params||(builtParts.params=baseParts.params,relativeParts.query||(builtParts.query=baseParts.query));return null===builtParts.path&&(builtParts.path=opts.alwaysNormalize?URLToolkit.normalizePath(relativeParts.path):relativeParts.path),URLToolkit.buildURLFromParts(builtParts)},parseURL:function(url){var parts=URL_REGEX.exec(url);return parts?{scheme:parts[1]||"",netLoc:parts[2]||"",path:parts[3]||"",params:parts[4]||"",query:parts[5]||"",fragment:parts[6]||""}:null},normalizePath:function(path){for(path=path.split("").reverse().join("").replace(SLASH_DOT_REGEX,"");path.length!==(path=path.replace(SLASH_DOT_DOT_REGEX,"")).length;);return path.split("").reverse().join("")},buildURLFromParts:function(parts){return parts.scheme+parts.netLoc+parts.path+parts.params+parts.query+parts.fragment}},"object"==typeof exports&&"object"==typeof module?module.exports=URLToolkit:"function"==typeof define&&define.amd?define([],function(){return URLToolkit}):"object"==typeof exports?exports.URLToolkit=URLToolkit:root.URLToolkit=URLToolkit},{}],82:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],83:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],84:[function(require,module,exports){(function(process,global){(function(){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}i=1;for(var args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x){if("%%"===x)return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];i<len;x=args[++i])isNull(x)||!isObject(x)?str+=" "+x:str+=" "+inspect(x);return str},exports.deprecate=function(fn,msg){if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(!0===process.noDeprecation)return fn;var warned=!1;return function(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}};var debugEnviron,debugs={};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"�["+inspect.colors[style][0]+"m"+str+"�["+inspect.colors[style][1]+"m":str}
vendor: 5,679 bytes, line 1
1function stylizeNoColor(str,styleType){return str}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=function(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=function(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var output,base="",array=!1,braces=["{","}"];(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value))&&(base=" [Function"+(value.name?": "+value.name:"")+"]");return isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0!==keys.length||array&&0!=value.length?recurseTimes<0?isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special"):(ctx.seen.push(value),output=array?function(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i<l;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),function(output,base,braces){if(output.reduce(function(prev,cur){return 0,cur.indexOf("\n")>=0&&0,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}(output,base,braces)):braces[0]+base+braces[1]}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if((desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]}).get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1)).indexOf("\n")>-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n")):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}exports.debuglog=function(set){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),!debugs[set])if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol
1=function(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}exports.log=function(){var d,time;console.log("%s - %s",(d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":"),[d.getDate(),months[d.getMonth()],time].join(" ")),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}).call(this)}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":83,_process:68,inherits:82}],85:[function(require,module,exports){module.exports=require("./lib/VASTPlayer")},{"./lib/VASTPlayer":89}],86:[function(require,module,exports){"use strict";function proxy(event,source,target){source.on(event,function(){for(var args=[],length=arguments.length;length--;)args[length]=arguments[length];target.emit.apply(target,[event].concat(args))})}function init(source,target,events){events.forEach(function(event){target.listeners(event).length>0&&proxy(event,source,target)}),target.on("newListener",function(type){events.indexOf(type)>-1&&target.listeners(type).length<1&&proxy(type,source,target)})}function EventProxy(events){this.events=events.slice(),this.__private__={target:null,source:null}}EventProxy.prototype.from=function(source){return this.__private__.source=source,this.__private__.target&&init(source,this.__private__.target,this.events),this},EventProxy.prototype.to=function(target){return this.__private__.target=target,this.__private__.source&&init(this.__private__.source,target,this.events),this},module.exports=EventProxy},{}],87:[function(require,module,exports){"use strict";var VideoTracker=require("./VideoTracker"),inherits=require("util").inherits,EVENTS=require("./enums/HTML_MEDIA_EVENTS");function HTMLVideoTracker(video){var self=this;VideoTracker.call(this,Math.floor(video.duration||0)),this.video=video,[EVENTS.PLAYING,EVENTS.PAUSE,EVENTS.TIMEUPDATE].forEac
vendor: 18,570 bytes, line 1
1h(function(event){return video.addEventListener(event,function(){return self.tick()},!1)})}inherits(HTMLVideoTracker,VideoTracker),HTMLVideoTracker.prototype._getState=function(){return{playing:!this.video.paused,currentTime:this.video.currentTime}},module.exports=HTMLVideoTracker},{"./VideoTracker":91,"./enums/HTML_MEDIA_EVENTS":92,util:84}],88:[function(require,module,exports){"use strict";var EVENTS=require("./enums/VPAID_EVENTS");function identity(value){return value}function PixelReporter(pixels,mapper){this.pixels=pixels.reduce(function(pixels,item){return(pixels[item.event]||(pixels[item.event]=[])).push(item.uri),pixels},{}),this.__private__={mapper:mapper||identity}}PixelReporter.prototype.track=function(vpaid){var pixels=this.pixels,customMapper=this.__private__.mapper,lastVolume=vpaid.adVolume;function fireType(type,mapper,predicate){function pixelMapper(url){return customMapper((mapper||identity)(url))}return function(){predicate&&!predicate()||function(pixels,mapper){(pixels||[]).forEach(function(src){(new Image).src=mapper(src)})}(pixels[type],pixelMapper)}}vpaid.on(EVENTS.AdSkipped,fireType("skip")),vpaid.on(EVENTS.AdStarted,fireType("creativeView")),vpaid.on(EVENTS.AdVolumeChange,fireType("unmute",null,function(){return 0===lastVolume&&vpaid.adVolume>0})),vpaid.on(EVENTS.AdVolumeChange,fireType("mute",null,function(){return lastVolume>0&&0===vpaid.adVolume})),vpaid.on(EVENTS.AdImpression,fireType("impression")),vpaid.on(EVENTS.AdVideoStart,fireType("start")),vpaid.on(EVENTS.AdVideoFirstQuartile,fireType("firstQuartile")),vpaid.on(EVENTS.AdVideoMidpoint,fireType("midpoint")),vpaid.on(EVENTS.AdVideoThirdQuartile,fireType("thirdQuartile")),vpaid.on(EVENTS.AdVideoComplete,fireType("complete")),vpaid.on(EVENTS.AdClickThru,fireType("clickThrough")),vpaid.on(EVENTS.AdUserAcceptInvitation,fireType("acceptInvitationLinear")),vpaid.on(EVENTS.AdUserMinimize,fireType("collapse")),vpaid.on(EVENTS.AdUserClose,fireType("closeLinear")),vpaid.on(EVENTS.AdPaused,fireType("pause")),vpaid.on(EVENTS.AdPlaying,fireType("resume")),vpaid.on(EVENTS.AdError,fireType("error",function(pixel){return pixel.replace(/\[ERRORCODE\]/g,901)})),vpaid.on(EVENTS.AdVolumeChange,function(){lastVolume=vpaid.adVolume})},module.exports=PixelReporter},{"./enums/VPAID_EVENTS":94}],89:[function(require,module,exports){"use strict";var EventEmitter=require("events").EventEmitter,inherits=require("util").inherits,VAST=require("vastacular").VAST,JavaScriptVPAIDPlayer=require("./players/JavaScriptVPAID"),FlashVPAIDPlayer=require("./players/FlashVPAID"),HTMLVideoPlayer=require("./players/HTMLVideo"),MIME=require("./enums/MIME"),EVENTS=require("./enums/VPAID_EVENTS"),EventProxy=require("./EventProxy"),LiePromise=require("lie"),PixelReporter=require("./PixelReporter");function defaults(){var index,object,prop,value,result={},length=arguments.length;for(index=0;index<length;index++)for(prop in object=arguments[index]||{})value=object[prop],void 0===result[prop]&&(result[prop]=value),"object"==typeof value&&(result[prop]=defaults(result[prop],value));return result}function identity(value){return value}function getNotReadyError(){return new Error("VASTPlayer not ready.")}function proxy(method){return function(){var self=this,player=this.__private__.player;return this.ready?player[method].apply(player,arguments).then(function(){return self}):LiePromise.reject(getNotReadyError())}}function proxyProp(property){return{get:function(){if(!this.ready)throw getNotReadyError();return this.__private__.player[property]},set:function(value){if(!this.ready)throw getNotReadyError();return this.__private__.player[property]=value}}}function VASTPlayer(container,config){var self=this;EventEmitter.call(this),this.__private__={container:container,config:defaults(config,{vast:{resolveWrappers:!0,maxRedirects:5},tracking:{mapper:identity}}),vast:null,ready:!1,player:null},this.on(EVENTS.AdClickThru,function(url,id,playerHandles){var clickThrough=url||self.vast.get("ads[0].creatives[0].videoClicks.clickThrough");playerHandles&&clickThrough&&window.open(clickThrough)})}inherits(VASTPlayer,EventEmitter),Object.defineProperties(VASTPlayer.prototype,{container:{get:function(){return this.__private__.container}},config:{get:function(){return this.__private__.config}},vast:{get:function(){return this.__private__.vast}},ready:{get:function(){return this.__private__.ready}},adRemainingTime:proxyProp("adRemainingTime"),adDuration:proxyProp("adDuration"),adVolume:proxyProp("adVolume")}),VASTPlayer.prototype.load=function(uri){var self=this,config=this.config.vast;return VAST.fetch(uri,config).then(function(vast){var jsVPAIDFiles,swfVPAIDFiles,files,config=(jsVPAIDFiles=vast.filter("ads[0].creatives[0].mediaFiles",function(mediaFile){return(mediaFile.type===MIME.JAVASCRIPT||"application/x-javascript"===mediaFile.type)&&"VPAID"===mediaFile.apiFramework}),swfVPAIDFiles=vast.filter("ads[0].creatives[0].mediaFiles",function(mediaFile){return mediaFile.type===MIME.FLASH&&"VPAID"===mediaFile.apiFramework}),files=vast.filter("ads[0].creatives[0].mediaFiles",function(){return!0}),jsVPAIDFiles.length>0?{player:new JavaScriptVPAIDPlayer(self.container),mediaFiles:jsVPAIDFiles}:swfVPAIDFiles.length>0?{player:new FlashVPAIDPlayer(self.container,VASTPlayer.vpaidSWFLocation),mediaFiles:swfVPAIDFiles}:{player:new HTMLVideoPlayer(self.container),mediaFiles:files}),parameters=vast.get("ads[0].creatives[0].parameters"),pixels=[].concat(vast.map("ads[0].impressions",function(impression){return{event:"impression",uri:impression.uri}}),vast.map("ads[0].errors",function(uri){return{event:"error",uri:uri}}),vast.get("ads[0].creatives[0].trackingEvents"),vast.map("ads[0].creatives[0].videoClicks.clickTrackings",function(uri){return{event:"clickThrough",uri:uri}})),player=config.player,mediaFiles=config.mediaFiles,proxy=new EventProxy(EVENTS),reporter=new PixelReporter(pixels,self.config.tracking.mapper);return proxy.from(player).to(self),self.__private__.vast=vast,self.__private__.player=player,player.load(mediaFiles,parameters).then(function(){reporter.track(player)})}).then(function(){return self.__private__.ready=!0,self.emit("ready"),self}).catch(function(reason){throw self.emit("error",reason),reason})},VASTPlayer.prototype.startAd=proxy("startAd"),VASTPlayer.prototype.stopAd=proxy("stopAd"),VASTPlayer.prototype.pauseAd=proxy("pauseAd"),VASTPlayer.prototype.resumeAd=proxy("resumeAd"),VASTPlayer.vpaidSWFLocation="https://cdn.jsdelivr.net/npm/[email protected]/dist/vast-player--vpaid.swf",module.exports=VASTPlayer},{"./EventProxy":86,"./PixelReporter":88,"./enums/MIME":93,"./enums/VPAID_EVENTS":94,"./players/FlashVPAID":96,"./players/HTMLVideo":97,"./players/JavaScriptVPAID":98,events:39,lie:48,util:84,vastacular:102}],90:[function(require,module,exports){"use strict";function VPAIDVersion(versionString){var parts=versionString.split(".").map(parseFloat);this.string=versionString,this.major=parts[0],this.minor=parts[1],this.patch=parts[2],Object.freeze(this)}VPAIDVersion.prototype.toString=function(){return this.string},module.exports=VPAIDVersion},{}],91:[function(require,module,exports){"use strict";var EventEmitter=require("events").EventEmitter,inherits=require("util").inherits,EVENTS=require("./enums/VPAID_EVENTS");function fire(event,tracker){tracker.fired[event]||(tracker.emit(event),tracker.fired[event]=!0)}function VideoTracker(duration){EventEmitter.apply(this,arguments),this.duration=duration,this.seconds=Array.apply([],new Array(duration)).map(function(){return!1}),this.fired=[EVENTS.AdVideoStart,EVENTS.AdVideoFirstQuartile,EVENTS.AdVideoMidpoint,EVENTS.AdVideoThirdQuartile,EVENTS.AdVideoComplete].reduce(function(fired,event){return fired[event]=!1,fired},{})}inherits(VideoTracker,EventEmitter),VideoTracker.prototype.tick=function(){var seconds=this.seconds,state=this._getState(),index=Math.round(state.currentTime)-1,quartileIndices=[1,2,3,4].map(function(quartile){return Math.floor(this.duration/4*quartile)},this);function quartileViewed(quartile){var end=quartileIndices[quartile-1];return seconds.slice(0,end).every(function(second){return!0===second})}state.playing&&(fire(EVENTS.AdVideoStart,this),index>-1&&(this.seconds[index]=!0)),quartileViewed(1)&&fire(EVENTS.AdVideoFirstQuartile,this),quartileViewed(2)&&fire(EVENTS.AdVideoMidpoint,this),quartileViewed(3)&&fire(EVENTS.AdVideoThirdQuartile,this),quartileViewed(4)&&fire(EVENTS.AdVideoComplete,this)},module.exports=VideoTracker},{"./enums/VPAID_EVENTS":94,events:39,util:84}],92:[function(require,module,exports){"use strict";var HTML_MEDIA_EVENTS=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","interruptbegin","interruptend","loadeddata","loadedmetadata","loadstart","mozaudioavailable","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"];HTML_MEDIA_EVENTS.forEach(function(event){this[event.toUpperCase()]=event},HTML_MEDIA_EVENTS),Object.freeze(HTML_MEDIA_EVENTS),module.exports=HTML_MEDIA_EVENTS},{}],93:[function(require,module,exports){var MIME={JAVASCRIPT:"application/javascript",FLASH:"application/x-shockwave-flash"};Object.freeze(MIME),module.exports=MIME},{}],94:[function(require,module,exports){"use strict";var VPAID_EVENTS=["AdLoaded","AdStarted","AdStopped","AdSkipped","AdSkippableStateChange","AdSizeChange","AdLinearChange","AdDurationChange","AdExpandedChange","AdRemainingTimeChange","AdVolumeChange","AdImpression","AdVideoStart","AdVideoFirstQuartile","AdVideoMidpoint","AdVideoThirdQuartile","AdVideoComplete","AdClickThru","AdInteraction","AdUserAcceptInvitation","AdUserMinimize","AdUserClose","AdPaused","AdPlaying","AdLog","AdError"];VPAID_EVENTS.forEach(function(event){VPAID_EVENTS[event]=event}),Object.freeze(VPAID_EVENTS),module.exports=VPAID_EVENTS},{}],95:[function(require,module,exports){"use strict";var win=require("./window"),video=document.createElement("video"),MIME=require("./enums/MIME");exports.isDesktop=!/Android|Silk|Mobile|PlayBook/.test(win.navigator.userAgent),exports.canPlay=function(type){var mimeTypes=win.navigator.mimeTypes,ActiveXObject=win.ActiveXObject;switch(type){case MIME.FLASH:try{return new ActiveXObject("ShockwaveFlash.ShockwaveFlash")?2:0}catch(e){return mimeTypes&&mimeTypes[MIME.FLASH]?2:0}return 0;case MIME.JAVASCRIPT:case"application/x-javascript":return 2;default:if(video.canPlayType)switch(video.canPlayType(type)){case"probably":return 2;case"maybe":return 1;default:return 0}}return 0},Object.freeze(exports)},{"./enums/MIME":93,"./window":101}],96:[function(require,module,exports){"use strict";var VPAID=require("./VPAID"),inherits=require("util").inherits,LiePromise=require("lie"),uuid=require("../uuid"),querystring=require("querystring"),EVENTS=require("../enums/VPAID_EVENTS"),VPAIDVersion=require("../VPAIDVersion");function FlashVPAID(container,swfURI){VPAID.apply(this,arguments),this.swfURI=swfURI,this.object=null}inherits(FlashVPAID,VPAID),FlashVPAID.prototype.load=function(mediaFiles,parameters){var self=this,uri=mediaFiles[0].uri,bitrate=mediaFiles[0].bitrate;return new LiePromise(function(resolve,reject){var vpaid=document.createElement("object"),eventFnName="vast_player__"+uuid(20),flashvars=querystring.stringify({vpaidURI:uri,eventCallback:eventFnName});function cleanup(reason){self.container.removeChild(vpaid),self.api=null,self.object=null,delete window[eventFnName],reason&&reject(reason)}vpaid.type="application/x-shockwave-flash",vpaid.data=self.swfURI+"?"+flashvars,vpaid.style.display="block",vpaid.style.width="100%",vpaid.style.height="100%",vpaid.style.border="none",vpaid.style.opacity="0",vpaid.innerHTML=['<param name="movie" value="'+self.swfURI+'">','<param name="flashvars" value="'+flashvars+'">','<param name="quality" value="high">','<param name="play" value="false">','<param name="loop" value="false">','<param name="wmode" value="opaque">','<param name="scale" value="noscale">','<param name="salign" value="lt">','<param name="allowScriptAccess" value="always">'].join("\n"),self.object=vpaid,window[eventFnName]=function(event){switch(event.type){case EVENTS.AdClickThru:return self.emit(event.type,event.url,event.Id,event.playerHandles);case EVENTS.AdInteraction:case EVENTS.AdLog:return self.emit(event.type,event.Id);case EVENTS.AdError:return self.emit(event.type,event.message);default:return self.emit(event.type)}},self.once("VPAIDInterfaceReady",function(){var position=vpaid.getBoundingClientRect(),version=self.vpaidVersion=new VPAIDVersion(vpaid.handshakeVersion("2.0"));if(version.major>2)return reject(new Error("VPAID version "+version+" is not supported."));self.on("VPAIDInterfaceResize",function(){var position=vpaid.getBoundingClientRect();self.resizeAd(position.width,position.height,"normal")}),vpaid.initAd(position.width,position.height,"normal",bitrate,parameters,null)}),self.once(EVENTS.AdLoaded,function(){self.api=vpaid,vpaid.style.opacity="1",resolve(self)}),self.once(EVENTS.AdError,function(reason){cleanup(new Error(reason))}),self.once(EVENTS.AdStopped,cleanup),self.container.appendChild(vpaid)})},module.exports=FlashVPAID},{"../VPAIDVersion":90,"../enums/VPAID_EVENTS":94,"../uuid":100,"./VPAID":99,lie:48,querystring:71,util:84}],97:[function(require,module,exports){"use strict";var EventEmitter=require("events").EventEmitter,inherits=require("util").inherits,LiePromise=require("lie"),canPlay=require("../environment").canPlay,sortBy=require("sort-by"),VPAID_EVENTS=require("../enums/VPAID_EVENTS"),HTML_MEDIA_EVENTS=require("../enums/HTML_MEDIA_EVENTS"),HTMLVideoTracker=require("../HTMLVideoTracker"),EventProxy=require("../EventProxy");function on(video,event,handler){return video.addEventListener(event,handler,!1)}function once(video,event,handler){return on(video,event,function onevent(){return function(video,event,handler){video.removeEventListener(event,handler,!1)}(video,event,onevent),handler.apply(this,arguments)})}function method(implementation,promiseify){function getError(){return new Error("The <video> has not been loaded.")}return function(){if(!this.video){if(promiseify)return LiePromise.reject(getError());throw getError()}return implementation.apply(this,arguments)}}function HTMLVideo(container){this.container=container,this.video=null,this.__private__={hasPlayed:!1}}inherits(HTMLVideo,EventEmitter),Object.defineProperties(HTMLVideo.prototype,{adRemainingTime:{get:method(function(){return this.video.duration-this.video.currentTime})},adDuration:{get:method(function(){return this.video.duration})},adVolume:{get:method(function(){return this.video.volume}),set:method(function(volume){this.video.volume=volume})}}),HTMLVideo.prototype.load=function(mediaFiles){var self=this;return new LiePromise(function(resolve,reject){var video=document.createElement("video"),mediaFile=function(mediaFiles,dimensions){var width=dimensions.width,items=mediaFiles.map(function(mediaFile){return{mediaFile:mediaFile,playability:canPlay(mediaFile.type)}}).filter(function(config){return config.playability>0}).sort(sortBy("-playability","-mediaFile.bitrate")),distances=items.map(function(item){return Math.abs(width-item.mediaFile.width)}),item=items[distances.indexOf(Math.min.apply(Math,distances))];return!item||item.playability<1?null:item.mediaFile}(mediaFiles,self.container.getBoundingClientRect());if(!mediaFile)return reject(new Error("There are no playable <MediaFile>s."));video.setAttribute("webkit-playsinline",!0),video.src=mediaFile.uri,video.preload="auto",video.style.display="block",video.style.width="100%",video.style.height="100%",video.style.objectFit="contain",once(video,HTML_MEDIA_EVENTS.LOADEDMETADATA,function(){var tracker=new HTMLVideoTracker(video);new EventProxy(VPAID_EVENTS).from(tracker).to(self),self.video=video,resolve(self),self.emit(VPAID_EVENTS.AdLoaded),on(video,HTML_MEDIA_EVENTS.DURATIONCHANGE,function(){self.emit(VPAID_EVENTS.AdDurationChange)}),on(video,HTML_MEDIA_EVENTS.VOLUMECHANGE,function(){self.emit(VPAID_EVENTS.AdVolumeChange)})}),once(video,HTML_MEDIA_EVENTS.ERROR,function(){var error=video.error;self.emit(VPAID_EVENTS.AdError,error.message),reject(error)}),once(video,HTML_MEDIA_EVENTS.PLAYING,function(){self.__private__.hasPlayed=!0,self.emit(VPAID_EVENTS.AdImpression)}),once(video,HTML_MEDIA_EVENTS.ENDED,function(){self.stopAd()}),on(video,"click",function(){self.emit(VPAID_EVENTS.AdClickThru,null,null,!0)}),self.container.appendChild(video)})},HTMLVideo.prototype.startAd=method(function(){var self=this,video=this.video;return this.__private__.hasPlayed?LiePromise.reject(new Error("The ad has already been started.")):new LiePromise(function(resolve){return once(video,HTML_MEDIA_EVENTS.PLAYING,function(){resolve(self),self.emit(VPAID_EVENTS.AdStarted)}),video.play()})},!0),HTMLVideo.prototype.stopAd=method(function(){return this.container.removeChild(this.video),this.emit(VPAID_EVENTS.AdStopped),LiePromise.resolve(this)},!0),HTMLVideo.prototype.pauseAd=method(function(){var self=this,video=this.video;return this.video.paused?LiePromise.resolve(this):new LiePromise(function(resolve){return once(video,HTML_MEDIA_EVENTS.PAUSE,function(){resolve(self),self.emit(VPAID_EVENTS.AdPaused)}),video.pause()})},!0),HTMLVideo.prototype.resumeAd=method(function(){var self=this,video=this.video;return this.__private__.hasPlayed?this.video.paused?new LiePromise(function(resolve){return once(video,HTML_MEDIA_EVENTS.PLAY,function(){resolve(self),self.emit(VPAID_EVENTS.AdPlaying)}),video.play()}):LiePromise.resolve(this):LiePromise.reject(new Error("The ad has not been started yet."))},!0),module.exports=HTMLVideo},{"../EventProxy":86,"../HTMLVideoTracker":87,"../enums/HTML_MEDIA_EVENTS":92,"../enums/VPAID_EVENTS":94,"../environment":95,events:39,lie:48,"sort-by":75,util:84}],98:[function(require,module,exports){"use strict";var inherits=require("util").inherits,VPAID=require("./VPAID"),LiePromise=require("lie"),EVENTS=require("../enums/VPAID_EVENTS"),isDesktop=require("../environment").isDesktop,VPAIDVersion=require("../VPAIDVersion");function JavaScriptVPAID(){VPAID.apply(this,arguments),this.frame=null}inherits(JavaScriptVPAID,VPAID),JavaScriptVPAID.prototype.load=function(mediaFiles,parameters){var self=this,uri=mediaFiles[0].uri,bitrate=mediaFiles[0].bitrate;return new LiePromise(function(resolve,reject){var iframe=document.createElement("iframe"),script=document.createElement("script"),video=document.createElement("video");function cleanup(reason){self.container.removeChild(iframe),self.frame=null,self.api=null,reason&&reject(reason)}
1iframe.src="about:blank",iframe.style.width="100%",iframe.style.height="100%",iframe.style.display="block",iframe.style.opacity="0",iframe.style.border="none",video.setAttribute("webkit-playsinline","true"),video.style.display="block",video.style.width="100%",video.style.height="100%",video.style.objectFit="contain",self.container.appendChild(iframe),iframe.contentWindow.document.open(),iframe.contentWindow.document.close(),iframe.contentWindow.document.body.style.margin="0",self.frame=iframe,script.src=uri,script.onload=function(){var vpaid=iframe.contentWindow.getVPAIDAd(),position=iframe.getBoundingClientRect(),slot=iframe.contentWindow.document.body,version=self.vpaidVersion=new VPAIDVersion(vpaid.handshakeVersion("2.0"));if(version.major>2)return reject(new Error("VPAID version "+version+" is not supported."));iframe.contentWindow.addEventListener("resize",function(){var position=iframe.getBoundingClientRect();self.resizeAd(position.width,position.height,"normal")},!1),EVENTS.forEach(function(event){return vpaid.subscribe(function(){for(var args=new Array(arguments.length),length=arguments.length;length--;)args[length]=arguments[length];return self.emit.apply(self,[event].concat(args))},event)}),self.once(EVENTS.AdLoaded,function(){iframe.style.opacity="1",self.api=vpaid,resolve(self)}),self.once(EVENTS.AdError,function(reason){cleanup(new Error(reason))}),self.once(EVENTS.AdStopped,cleanup),vpaid.initAd(position.width,position.height,"normal",bitrate,{AdParameters:parameters},{slot:slot,videoSlot:video,videoSlotCanAutoPlay:isDesktop})},script.onerror=function(){cleanup(new Error("Failed to load MediaFile ["+uri+"]."))},iframe.contentWindow.document.body.appendChild(video),iframe.contentWindow.document.head.appendChild(script)})},module.exports=JavaScriptVPAID},{"../VPAIDVersion":90,"../enums/VPAID_EVENTS":94,"../environment":95,"./VPAID":99,lie:48,util:84}],99:[function(require,module,exports){"use strict";var inherits=require("util").inherits,EventEmitter=require("events").EventEmitter,LiePromise=require("lie"),EVENTS=require("../enums/VPAID_EVENTS");function proxy(method,event){return function(){var args=arguments,api=this.api,self=this;function getError(){return new Error("Ad has not been loaded.")}function call(){return api[method].apply(api,args)}if(!event){if(!api)throw getError();return call()}return new LiePromise(function(resolve,reject){return api?(self.once(event,function(){resolve(self)}),call()):reject(getError())})}}function VPAID(container){this.container=container,this.api=null,this.vpaidVersion=null}inherits(VPAID,EventEmitter),Object.defineProperties(VPAID.prototype,{adLinear:{get:proxy("getAdLinear")},adWidth:{get:proxy("getAdWidth")},adHeight:{get:proxy("getAdHeight")},adExpanded:{get:proxy("getAdExpanded")},adSkippableState:{get:proxy("getAdSkippableState")},adRemainingTime:{get:proxy("getAdRemainingTime")},adDuration:{get:proxy("getAdDuration")},adVolume:{get:proxy("getAdVolume"),set:proxy("setAdVolume")},adCompanions:{get:proxy("getAdCompanions")},adIcons:{get:proxy("getAdIcons")}}),VPAID.prototype.load=function(){throw new Error("VPAID subclass must implement load() method.")},VPAID.prototype.resizeAd=proxy("resizeAd",EVENTS.AdSizeChange),VPAID.prototype.startAd=proxy("startAd",EVENTS.AdStarted),VPAID.prototype.stopAd=proxy("stopAd",EVENTS.AdStopped),VPAID.prototype.pauseAd=proxy("pauseAd",EVENTS.AdPaused),VPAID.prototype.resumeAd=proxy("resumeAd",EVENTS.AdPlaying),VPAID.prototype.expandAd=proxy("expandAd",EVENTS.AdExpandedChange),VPAID.prototype.collapseAd=proxy("collapseAd",EVENTS.AdExpandedChange),VPAID.prototype.skipAd=proxy("skipAd",EVENTS.AdSkipped),module.exports=VPAID},{"../enums/VPAID_EVENTS":94,events:39,lie:48,util:84}],100:[function(require,module,exports){"use strict";var POSSIBILITIES="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",POSSIBILITIES_LENGTH=POSSIBILITIES.length;module.exports=function(length){for(var result="";length--;)result+=POSSIBILITIES.charAt(Math.floor(Math.random()*POSSIBILITIES_LENGTH));return result}},{}],101:[function(require,module,exports){module.exports=window},{}],102:[function(require,module,exports){exports.VAST=require("./lib/VAST")},{"./lib/VAST":103}],103:[function(require,module,exports){"use strict";var LiePromise=require("lie"),request=require("superagent"),copy=require("./utils/copy"),defaults=require("./utils/defaults"),extend=require("./utils/extend"),nodeifyPromise=require("./utils/nodeify_promise"),push=Array.prototype.push,xmlFromVast=require("./xml_from_vast"),adDefaults={inline:function(ad){defaults({description:null,survey:null},ad)},wrapper:function(){}},inlineDefaults={linear:function(creative){defaults({trackingEvents:[],parameters:null,videoClicks:null}
1,creative),(creative.mediaFiles||[]).forEach(function(mediaFile){defaults({id:null,bitrate:null,scalable:null,maintainAspectRatio:null,apiFramework:null},mediaFile)})},companions:function(creative){creative.companions.forEach(function(companion){defaults({expandedWidth:null,expandedHeight:null,apiFramework:null,trackingEvents:[],clickThrough:null,altText:null,parameters:null},companion)})},nonLinear:function(creative){defaults({trackingEvents:[]},creative),creative.ads.forEach(function(ad){defaults({id:null,expandedWidth:null,expandedHeight:null,scalable:null,maintainAspectRatio:null,minSuggestedDuration:null,apiFramework:null,clickThrough:null,parameters:null},ad)})}};function noop(){}function VAST(json){copy(json,this,!0),this.ads.forEach(function(ad){defaults({system:{version:null},errors:[]},ad),ad.creatives.forEach(function(creative){defaults({id:null,sequence:null,adID:null},creative),inlineDefaults[creative.type](creative)}),adDefaults[ad.type](ad)}),this.__private__={wrappers:[],inlines:[]}}Object.defineProperties(VAST.prototype,{wrappers:{get:function(){var wrappers=this.__private__.wrappers;return wrappers.length=0,push.apply(wrappers,this.filter("ads",function(ad){return"wrapper"===ad.type})),wrappers}},inlines:{get:function(){var inlines=this.__private__.inlines;return inlines.length=0,push.apply(inlines,this.filter("ads",function(ad){return"inline"===ad.type})),inlines}}}),VAST.prototype.get=function(prop){return((prop||"").match(/[^\[\]\.]+/g)||[]).reduce(function(result,part){return result?result[part]:void 0},this)},VAST.prototype.set=function(prop,value){var parts=function(){for(var match,regex=/[^\[\]\.]+/g,result=[];match=regex.exec(prop);)result.push({token:match[0],type:getType(match,match.index+match[0].length)});return result}(),last=parts.pop(),object=parts.reduce(function(object,part){return object[part.token]||(object[part.token]=new part.type)},this);function getType(match,index){switch(match.input.charAt(index)){case".":return Object;case"[":return Array;case"]":return getType(match,index+1);default:return null}}if(!prop)throw new Error("prop must be specified.");return object[last.token]=value},VAST.prototype.map=function(prop,mapper){var array=this.get(prop)||[],length=array.length,result=[];if(!(array instanceof Array))return result;for(var index=0;index<length;index++)result.push(mapper.call(this,array[index],index,array));return result},VAST.prototype.filter=function(prop,predicate){var array=this.get(prop)||[],length=array.length,result=[];if(!(array instanceof Array))return result;for(var index=0;index<length;index++)predicate.call(this,array[index],index,array)&&result.push(array[index]);return result},VAST.prototype.find=function(prop,predicate){var array=this.get(prop)||[],length=array.length;if(array instanceof Array)for(var index=0;index<length;index++)if(predicate.call(this,array[index],index,array))return array[index]},VAST.prototype.toPOJO=function(){var pojo=JSON.parse(JSON.stringify(this));return delete pojo.__private__,pojo},VAST.prototype.copy=function(){return new this.constructor(this.toPOJO())},VAST.prototype.resolveWrappers=function(){var maxRedirects=isNaN(arguments[0])?1/0:arguments[0],callback="function"==typeof arguments[0]?arguments[0]:arguments[1],VAST=this.constructor,vast=this;return 0===maxRedirects?LiePromise.reject(new Error("Too many redirects were made.")):nodeifyPromise(LiePromise.all(this.map("wrappers",function(wrapper){return LiePromise.resolve(request.get(wrapper.vastAdTagURI)).then(function(response){return{wrapper:wrapper,response:VAST.pojoFromXML(response.text).ads}})})).then(function(configs){var wrappers=configs.map(function(config){return config.wrapper}),responses=configs.map(function(config){return config.response});return new VAST(extend(vast.toPOJO(),{ads:vast.map("ads",function(ad){var wrapperIndex=wrappers.indexOf(ad),wrapper=wrappers[wrapperIndex],response=responses[wrapperIndex];return response?response.map(function(wrapper,ad){var creatives,wrapperCreativesByType={linear:(creatives=wrapper.creatives).filter(typeIs("linear")),companions:creatives.filter(typeIs("companions")),nonLinear:creatives.filter(typeIs("nonLinear"))};function typeIs(type){return function(creative){return creative.type===type}}return defaults(wrapper.impressions,ad.impressions),defaults(wrapper.errors,ad.errors),ad.creatives.forEac
1h(function(creative){defaults(wrapperCreativesByType[creative.type].shift()||{},creative)}),push.apply(ad.creatives,"wrapper"!==ad.type?[]:["linear","companions","nonLinear"].reduce(function(result,type){return result.concat(wrapperCreativesByType[type])},[])),ad}.bind(null,wrapper)):[ad]}).reduce(function(result,array){return result.concat(array)})}))}).then(function(result){return result.get("wrappers.length")>0?result.resolveWrappers(maxRedirects-1):result}),callback)},VAST.prototype.toXML=function(){var check=this.validate();if(!check.valid)throw new Error("VAST is invalid: "+check.reasons.join(", "));return xmlFromVast(this)},VAST.prototype.validate=function(){var vast=this,reasons=[],adValidators={inline:function(getAdProp){var creativeValidators={linear:function(getCreativeProp){makeAssertions(getCreativeProp,{exists:["duration"],atLeastOne:["mediaFiles"]})},companions:function(getCreativeProp){vast.get(getCreativeProp("companions")).forEach(function(companion,index){makeAssertions(function(prop){return getCreativeProp("companions["+index+"]."+prop)},{exists:[],atLeastOne:["resources"]})})},nonLinear:function(getCreativeProp){vast.get(getCreativeProp("ads")).forEach(function(ad,index){makeAssertions(function(prop){return getCreativeProp("ads["+index+"]."+prop)},{exists:[],atLeastOne:["resources"]})})}};makeAssertions(getAdProp,{exists:["title"],atLeastOne:["creatives"]}),vast.get(getAdProp("creatives")).forEach(function(creative,index){function getCreativeProp(prop){return getAdProp("creatives["+index+"]."+prop)}makeAssertions(getCreativeProp,{exists:["type"],atLeastOne:[]}),(creativeValidators[creative.type]||noop)(getCreativeProp)})},wrapper:function(getAdProp){makeAssertions(getAdProp,{exists:["vastAdTagURI"],atLeastOne:[]})}};function assert(truthy,reason){truthy||reasons.push(reason)}function assertExists(prop){assert(vast.get(prop),prop+" is required")}function assertAtLeastOneValue(prop){assert(vast.get(prop+".length")>0,prop+" must contain at least one value")}function makeAssertions(getter,types){types.exists.map(getter).forEach(assertExists),types.atLeastOne.map(getter).forEach(assertAtLeastOneValue)}return makeAssertions(function(prop){return prop},{exists:[],atLeastOne:["ads"]}),this.get("ads").forEach(function(ad,index){function getAdProp(prop){return"ads["+index+"]."+prop}makeAssertions(getAdProp,{exists:["type","system.name"],atLeastOne:["impressions"]}),(adValidators[ad.type]||noop)(getAdProp)}),{valid:0===reasons.length,reasons:0===reasons.length?null:reasons}},VAST.pojoFromXML=require("./pojo_from_xml"),VAST.fetch=function(uri){var options="object"==typeof arguments[1]&&arguments[1]||{},callback="function"==typeof arguments[2]?arguments[2]:arguments[1],VAST=this;return nodeifyPromise(LiePromise.resolve(request.get(uri).set(options.headers||{})).then(function(response){var vast=new VAST(VAST.pojoFromXML(response.text));return options.resolveWrappers?vast.resolveWrappers(options.maxRedirects):vast}),callback)},module.exports=VAST},{"./pojo_from_xml":104,"./utils/copy":106,"./utils/defaults":107,"./utils/extend":108,"./utils/nodeify_promise":109,"./xml_from_vast":116,lie:48,superagent:76}],104:[function(require,module,exports){"use strict";var parseXML=require("./utils/parse_xml"),timestampToSeconds=require("./utils/timestamp_to_seconds"),stringToBoolean=require("./utils/string_to_boolean"),extend=require("./utils/extend"),trimObject=require("./utils/trim_object"),numberify=require("./utils/numberify"),creativeParsers={linear:function(creative){var duration=single(creative.find("Duration")),events=creative.find("Tracking"),adParameters=single(creative.find("AdParameters")),videoClicks=creative.find("VideoClicks")[0],mediaFiles=creative.find("MediaFile");return{type:"linear",duration:timestampToSeconds(duration.value)||void 0,trackingEvents:events.map(function(event){return{event:event.attributes.event,uri:event.value}}),parameters:adParameters.value,videoClicks:videoClicks&&(clickThrough=single(videoClicks.find("ClickThrough")),trackings=videoClicks.find("ClickTracking"),customClicks=videoClicks.find("CustomClick"),{clickThrough:clickThrough.value,clickTrackings:trackings.map(function(tracking){return tracking.value}),customClicks:customClicks.map(function(click){return{id:click.attributes.id,uri:click.value}})}),mediaFiles:mediaFiles.map(function(mediaFile){var attrs=mediaFile.attributes;return{id:attrs.id,delivery:attrs.delivery,type:attrs.type,uri:mediaFile.value,bitrate:numberify(attrs.bitrate),width:numberify(attrs.width),height:numberify(attrs.height),scalable:stringToBoolean(attrs.scalable),maintainAspectRatio:stringToBoolean(attrs.maintainAspectRatio),apiFramework:attrs.apiFramework}})};var clickThrough,trackings,customClicks},companions:function(creative){return{type:"companions",companions:creative.find("Companion").map(function(companion){var events=companion.find("Tracking"),companionCl
1ickThrough=single(companion.find("CompanionClickThrough")),altText=single(companion.find("AltText")),adParameters=single(companion.find("AdParameters"));return{id:companion.attributes.id,width:numberify(companion.attributes.width),height:numberify(companion.attributes.height),expandedWidth:numberify(companion.attributes.expandedWidth),expandedHeight:numberify(companion.attributes.expandedHeight),apiFramework:companion.attributes.apiFramework,resources:parseResources(companion),trackingEvents:events.map(function(event){return{event:event.attributes.event,uri:event.value}}),clickThrough:companionClickThrough.value,altText:altText.value,parameters:adParameters.value}})}},nonLinear:function(creative){var ads=creative.find("NonLinear"),events=creative.find("Tracking");return{type:"nonLinear",ads:ads.map(function(ad){var nonLinearClickThrough=single(ad.find("NonLinearClickThrough")),adParameters=single(ad.find("AdParameters"));return{id:ad.attributes.id,width:numberify(ad.attributes.width),height:numberify(ad.attributes.height),expandedWidth:numberify(ad.attributes.expandedWidth),expandedHeight:numberify(ad.attributes.expandedHeight),scalable:stringToBoolean(ad.attributes.scalable),maintainAspectRatio:stringToBoolean(ad.attributes.maintainAspectRatio),minSuggestedDuration:timestampToSeconds(ad.attributes.minSuggestedDuration)||void 0,apiFramework:ad.attributes.apiFramework,resources:parseResources(ad),clickThrough:nonLinearClickThrough.value,parameters:adParameters.value}}),trackingEvents:events.map(function(event){return{event:event.attributes.event,uri:event.value}})}}},adParsers={inline:function(ad){var adTitle=single(ad.find("AdTitle")),description=single(ad.find("Description")),survey=single(ad.find("Survey"));return{type:"inline",title:adTitle.value,description:description.value,survey:survey.value}},wrapper:function(ad){return{type:"wrapper",vastAdTagURI:single(ad.find("VASTAdTagURI")).value}}};function single(collection){return collection[0]||{attributes:{}}}function parseResources(ad){return ad.find("StaticResource,IFrameResource,HTMLResource").map(function(resource){return{type:resource.tag.replace(/Resource$/,"").toLowerCase(),creativeType:resource.attributes.creativeType,data:resource.value}})}module.exports=function(xml){var $=parseXML(xml);if(!$("VAST")[0])throw new Error("["+xml+"] is not a valid VAST document.");return trimObject({version:single($("VAST")).attributes.version,ads:$("Ad").map(function(ad){var type=single(ad.find("Wrapper,InLine")).tag.toLowerCase(),adSystem=single(ad.find("AdSystem")),errors=ad.find("Error"),impressions=ad.find("Impression"),creatives=ad.find("Creative");return extend({id:ad.attributes.id,system:{name:adSystem.value,version:adSystem.attributes.version},errors:errors.map(function(error){return error.value}),impressions:impressions.map(function(impression){return{uri:impression.value,id:impression.attributes.id}}),creatives:creatives.map(function(creative){var type=function(){switch(single(creative.find("Linear,CompanionAds,NonLinearAds")).tag){case"Linear":return"linear";case"CompanionAds":return"companions";case"NonLinearAds":return"nonLinear"}}();return extend({id:creative.attributes.id,sequence:numberify(creative.attributes.sequence),adID:creative.attributes.AdID},creativeParsers[type](creative))})},adParsers[type](ad))})},!0)}},{"./utils/extend":108,"./utils/numberify":110,"./utils/parse_xml":111,"./utils/string_to_boolean":113,"./utils/timestamp_to_seconds":114,"./utils/trim_object":115}],105:[function(require,module,exports){"use strict";function existy(value){return null!=value}function escapeXML(string){return void 0!==string?String(string).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):""}function nodeValue(node){return node.cdata?(void 0!==(text=node.value)?function(text){for(var match,end,result=[],regex=/]]>/g,cursor=0;match=regex.exec(text);)end=match.index+2,result.push(match.input.substring(cursor,end)),cursor=end;return result.push(text.substring(cursor,text.length)),result}(String(text)):[""]).reduce(function(result,part){return result+"<![CDATA["+part+"]]>"}
vendor: 6,728 bytes, line 1
1,""):escapeXML(node.value);var text}module.exports=function(data,trim){return['<?xml version="1.0" encoding="UTF-8"?>'].concat(function compileNode(node,indentation,trim){var tag=node.tag,attributes=node.attributes||{},attributeNames=Object.keys(attributes),children=node.children||[],value=node.value,hasChildren=children.length>0,hasAttributes=attributeNames.every(function(attribute){return existy(attributes[attribute])})&&attributeNames.length>0,hasValue=existy(value)||hasChildren||hasAttributes,whitespace=function(amount){for(var result="";amount--;)result+=" ";return result}(indentation),openingTag="<"+tag+Object.keys(attributes).reduce(function(result,attribute){return trim&&!existy(attributes[attribute])?result:result+" "+attribute+'="'+escapeXML(attributes[attribute])+'"'},"")+">",closingTag="</"+tag+">";return!trim||hasValue||node.required?hasChildren?[whitespace+openingTag].concat(node.children.reduce(function(result,child){return result.concat(compileNode(child,indentation+4,trim))},[]),[whitespace+closingTag]):[whitespace+openingTag+nodeValue(node)+closingTag]:[]}(data,0,trim)).join("\n")}},{}],106:[function(require,module,exports){"use strict";var push=Array.prototype.push;function copy(object){var target="object"==typeof arguments[1]?arguments[1]:null,deep="boolean"==typeof arguments[1]?arguments[1]:arguments[2];return Object(object)!==object?object:object instanceof Array?function(array,_target_,deep){var target=_target_||[];return push.apply(target,deep?array.map(function(item){return copy(item,null,!0)}):array),target}(object,target,deep):function(object,target,deep){return Object.keys(object).reduce(function(result,key){return result[key]=deep?copy(object[key],null,!0):object[key],result},target||{})}(object,target,deep)}module.exports=copy},{}],107:[function(require,module,exports){"use strict";var push=Array.prototype.push;function isObject(value){return Object(value)===value}function isArray(value){return value instanceof Array}module.exports=function defaults(config,target){return[config,target].every(isArray)?(push.apply(target,config.filter(function(item){return target.indexOf(item)<0})),target):Object.keys(config).reduce(function(target,key){return[config[key],target[key]].every(isObject)&&defaults(config[key],target[key]),key in target||(target[key]=config[key]),target},target)}},{}],108:[function(require,module,exports){"use strict";module.exports=function(){return Array.prototype.slice.call(arguments).reduce(function(result,object){return Object.keys(object||{}).reduce(function(result,key){return result[key]=object[key],result},result)},{})}},{}],109:[function(require,module,exports){"use strict";module.exports=function(promise,callback){return"function"!=typeof callback?promise:(promise.then(function(value){callback(null,value)},function(reason){callback(reason)}),promise)}},{}],110:[function(require,module,exports){"use strict";module.exports=function(value){if(/string|number|boolean/.test(typeof value))return isNaN(value)?void 0:Number(value)}},{}],111:[function(require,module,exports){"use strict";var map=Array.prototype.map,filter=Array.prototype.filter,reduce=Array.prototype.reduce,parser=new DOMParser;function convertNode(node){var hasChildren=node.childElementCount>0;return{tag:node.tagName,value:hasChildren?null:node.textContent,attributes:reduce.call(node.attributes,function(result,attribute){return result[attribute.name]=attribute.value,result},{}),find:function(selector){return convertNodes(node.querySelectorAll(selector))},children:function(){return filter.call(node.childNodes,function(node){return node instanceof Element}).map(convertNode)}}}function convertNodes(nodes){return map.call(nodes,convertNode)}module.exports=function(xml){var doc=parser.parseFromString(xml,"application/xml");return function(selector){return convertNodes(doc.querySelectorAll(selector))}}},{}],112:[function(require,module,exports){"use strict";function pad(number){return(number>9?"":"0")+number.toString()}module.exports=function(seconds){return Number(seconds)!==seconds?null:[Math.floor(seconds/60/60),Math.floor(seconds/60%60),Math.floor(seconds%60%60)].map(pad).join(":")}},{}],113:[function(require,module,exports){"use strict";module.exports=function(string){switch((string||"").toLowerCase()){case"true":return!0;case"false":return!1}}},{}],114:[function(require,module,exports){"use strict";module.exports=function(timestamp){var parts=(timestamp||"").match(/^(\d\d):(\d\d):(\d\d)$/);return parts&&parts.slice(1,4).map(parseFloat).reduce(function(seconds,time,index){return seconds+time*Math.pow(60,Math.abs(index-2))},0)}},{}],115:[function(require,module,exports){"use strict";module.exports=function trimObject(object,deep){return Object(object)!==object?object:Object.keys(object).reduce(function(result,key){return deep&&object[key]instanceof Array?result[key]=object[key].filter(function(value){return void 0!==value}).map(function(value){return trimObject(value,!0)}):deep&&object[key]instanceof Object?result[key]=trimObject(object[key],!0):void 0!==object[key]&&(result[key]=object[key]),result},{})}},{}],116:[function(require,module,exports){"use strict";var secondsToTimestamp=require("./utils/seconds_to_timestamp"),compileXML=require("./utils/compile_xml"),creativeCompilers={linear:function(creative){return{tag:"Linear",children:[{tag:"Duration",value:secondsToTimestamp(creative.duration)},createTrackingEvents(creative.trackingEvents),createAdParameters(creative)].concat(creative.videoClicks?[{tag:"VideoClicks",children:[{tag:"ClickThrough",value:creative.videoClicks.clickThrough,cdata:!0}].concat(creative.videoClicks.clickTrackings.map(function(clickTracking){return{tag:"ClickTracking",value:clickTracking,cdata:!0}}),creative.videoClicks.customClicks.map(function(customClick){return{tag:"CustomClick",attributes:{id:customClick.id},value:customClick.uri,cdata:!0}}))}]:[],[{tag:"MediaFiles",children:creative.mediaFiles.map(function(mediaFile){return{tag:"MediaFile",attributes:{id:mediaFile.id,width:mediaFile.width,height:mediaFile.height,bitrate:mediaFile.bitrate,type:mediaFile.type,delivery:mediaFile.delivery,scalable:mediaFile.scalable,maintainAspectRatio:mediaFile.maintainAspectRatio,apiFramework:mediaFile.apiFramework},value:mediaFile.uri,cdata:!0}})}])}},companions:function(creative){return{tag:"CompanionAds",children:creative.companions.map(function(companion){return{tag:"Companion",attributes:{id:companion.id,width:companion.width,height:companion.height,expandedWidth:companion.expandedWidth,expandedHeight:companion.expandedHeight,apiFramework:companion.apiFramework},children:createResources(companion.resources).concat([createTrackingEvents(companion.trackingEvents),{tag:"CompanionCl
1ickThrough",value:companion.clickThrough,cdata:!0},{tag:"AltText",value:companion.altText},createAdParameters(companion)])}})}},nonLinear:function(creative){return{tag:"NonLinearAds",children:creative.ads.map(function(ad){return{tag:"NonLinear",attributes:{id:ad.id,width:ad.width,height:ad.height,expandedWidth:ad.expandedWidth,expandedHeight:ad.expandedHeight,scalable:ad.scalable,maintainAspectRatio:ad.maintainAspectRatio,minSuggestedDuration:secondsToTimestamp(ad.minSuggestedDuration),apiFramework:ad.apiFramework},children:createResources(ad.resources).concat([{tag:"NonLinearClickThrough",value:ad.clickThrough,cdata:!0},createAdParameters(ad)])}}).concat([createTrackingEvents(creative.trackingEvents)])}}};function createTrackingEvents(trackingEvents){return{tag:"TrackingEvents",children:trackingEvents.map(function(trackingEvent){return{tag:"Tracking",attributes:{event:trackingEvent.event},value:trackingEvent.uri,cdata:!0}})}}function createResources(resources){return resources.map(function(resource){return{tag:function(type){switch(resource.type){case"static":return"StaticResource";case"iframe":return"IFrameResource";case"html":return"HTMLResource"}}(),attributes:{creativeType:resource.creativeType},value:resource.data,cdata:!0}})}function createAdParameters(creative){return{tag:"AdParameters",value:creative.parameters}}module.exports=function(vast){return compileXML({tag:"VAST",attributes:{version:vast.get("version")},children:vast.map("ads",function(ad){return{tag:"Ad",attributes:{id:ad.id},children:[{tag:function(){switch(ad.type){case"inline":return"InLine";case"wrapper":return"Wrapper"}}(),children:[{tag:"AdSystem",attributes:{version:ad.system.version},value:ad.system.name},{tag:"AdTitle",value:ad.title},{tag:"Description",value:ad.description},{tag:"Survey",value:ad.survey,cdata:!0},{tag:"VASTAdTagURI",value:ad.vastAdTagURI,cdata:!0}].concat(ad.errors.map(function(error){return{tag:"Error",value:error,cdata:!0}}),ad.impressions.map(function(impression){return{tag:"Impression",value:impression.uri,cdata:!0,attributes:{id:impression.id}}}),[{tag:"Creatives",children:ad.creatives.map(function(creative){return{tag:"Creative",attributes:{id:creative.id,sequence:creative.sequence,AdID:creative.adID},children:[(type=creative.type,creativeCompilers[type](creative))]};var type}),required:!0}])}]}})},!0)}},{"./utils/compile_xml":105,"./utils/seconds_to_timestamp":112}],117:[function(require,module,exports){"use strict";function _interopDefault(ex){return ex&&"object"==typeof ex&&"default"in ex?ex.default:ex}var window$1=_interopDefault(require("global/window")),document=_interopDefault(require("global/document")),_extends=_interopDefault(require("@babel/runtime/helpers/extends")),_assertThisInitialized=_interopDefault(require("@babel/runtime/helpers/assertThisInitialized"));require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var _inheritsLoose=_interopDefault(require("@babel/runtime/helpers/inheritsLoose")),safeParseTuple=_interopDefault(require("safe-json-parse/tuple")),keycode=_interopDefault(require("keycode")),XHR=_interopDefault(require("@videojs/xhr")),vtt=_interopDefault(require("videojs-vtt.js")),_construct=_interopDefault(require("@babel/runtime/helpers/construct")),_inherits=_interopDefault(require("@babel/runtime/helpers/inherits")),_resolveUrl=_interopDefault(require("@videojs/vhs-utils/dist/resolve-url.js")),m3u8Parser=require("m3u8-parser"),mediaTypes_js=require("@videojs/vhs-utils/dist/media-types.js"),mpdParser=require("mpd-parser"),parseSidx=_interopDefault(require("mux.js/lib/tools/parse-sidx")),containers=require("@videojs/vhs-utils/dist/containers"),byteHelpers=require("@videojs/vhs-utils/dist/byte-helpers"),tsInspector=_interopDefault(require("mux.js/lib/tools/ts-inspector.js")),clock=require("mux.js/lib/utils/clock"),mp4probe=_interopDefault(require("mux.js/lib/mp4/probe")),codecs_js=require("@videojs/vhs-utils/dist/codecs.js"),version="7.10.2",history=[],LogByTypeFactory=function(name,log){return function(type,level,args){var lvl=log.levels[level],lvlRegExp=new RegExp("^("+lvl+")$");if("log"!==type&&args.unshift(type.toUpperCase()+":"),args.unshift(name+":"),history){history.push([].concat(args));var splice=history.length-1e3;history.splice(0,splice>0?splice:0)}if(window$1.console){var fn=window$1.console[type];fn||"debug"!==type||(fn=window$1.console.info||window$1.console.log),fn&&lvl&&lvlRegExp.test(type)&&fn[Array.isArray(args)?"apply":"call"](window$1.console,args)}}};var log=function createLogger(name){var logByType,level="info",log=function(){for(var _len=arguments.length,args=new Array(_len),_
vendor: 5,257 bytes, line 1
1key=0;_key<_len;_key++)args[_key]=arguments[_key];logByType("log",level,args)};return logByType=LogByTypeFactory(name,log),log.createLogger=function(subname){return createLogger(name+": "+subname)},log.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:level},log.level=function(lvl){if("string"==typeof lvl){if(!log.levels.hasOwnProperty(lvl))throw new Error('"'+lvl+'" in not a valid log level');level=lvl}return level},(log.history=function(){return history?[].concat(history):[]}).filter=function(fname){return(history||[]).filter(function(historyItem){return new RegExp(".*"+fname+".*").test(historyItem[0])})},log.history.clear=function(){history&&(history.length=0)},log.history.disable=function(){null!==history&&(history.length=0,history=null)},log.history.enable=function(){null===history&&(history=[])},log.error=function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return logByType("error",level,args)},log.warn=function(){for(var _len3=arguments.length,args=new Array(_len3),_key3=0;_key3<_len3;_key3++)args[_key3]=arguments[_key3];return logByType("warn",level,args)},log.debug=function(){for(var _len4=arguments.length,args=new Array(_len4),_key4=0;_key4<_len4;_key4++)args[_key4]=arguments[_key4];return logByType("debug",level,args)},log}("VIDEOJS"),createLogger$1=log.createLogger,toString=Object.prototype.toString,keys=function(object){return isObject(object)?Object.keys(object):[]};function each(object,fn){keys(object).forEach(function(key){return fn(object[key],key)})}function assign(target){for(var _len=arguments.length,sources=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)sources[_key-1]=arguments[_key];return Object.assign?_extends.apply(void 0,[target].concat(sources)):(sources.forEach(function(source){source&&each(source,function(value,key){target[key]=value})}),target)}function isObject(value){return!!value&&"object"==typeof value}function isPlain(value){return isObject(value)&&"[object Object]"===toString.call(value)&&value.constructor===Object}function computedStyle(el,prop){if(!el||!prop)return"";if("function"==typeof window$1.getComputedStyle){var computedStyleValue=window$1.getComputedStyle(el);return computedStyleValue?computedStyleValue.getPropertyValue(prop)||computedStyleValue[prop]:""}return""}function isNonBlankString(str){return"string"==typeof str&&Boolean(str.trim())}function throwIfWhitespace(str){if(str.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function isReal(){return document===window$1.document}function isEl(value){return isObject(value)&&1===value.nodeType}function isInFrame(){try{return window$1.parent!==window$1.self}catch(x){return!0}}function createQuerier(method){return function(selector,context){if(!isNonBlankString(selector))return document[method](null);isNonBlankString(context)&&(context=document.querySelector(context));var ctx=isEl(context)?context:document;return ctx[method]&&ctx[method](selector)}}function createEl(tagName,properties,attributes,content){void 0===tagName&&(tagName="div"),void 0===properties&&(properties={}),void 0===attributes&&(attributes={});var el=document.createElement(tagName);return Object.getOwnPropertyNames(properties).forEach(function(propName){var val=properties[propName];-1!==propName.indexOf("aria-")||"role"===propName||"type"===propName?(log.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+propName+" to "+val+"."),el.setAttribute(propName,val)):"textContent"===propName?textContent(el,val):el[propName]!==val&&(el[propName]=val)}),Object.getOwnPropertyNames(attributes).forEach(function(attrName){el.setAttribute(attrName,attributes[attrName])}),content&&appendContent(el,content),el}function textContent(el,text){return void 0===el.textContent?el.innerText=text:el.textContent=text,el}function prependTo(child,parent){parent.firstChild?parent.insertBefore(child,parent.firstChild):parent.appendChild(child)}function hasClass(element,classToCheck){return throwIfWhitespace(classToCheck),element.classList?element.classList.contains(classToCheck):(className=classToCheck,new RegExp("(^|\\s)"+className+"($|\\s)")).test(element.className);var className}function addClass(element,classToAdd){return element.classList?element.classList.add(classToAdd):hasClass(element,classToAdd)||(element.className=(element.className+" "+classToAdd).trim()),element}function removeClass(element,classToRemove){return element.classList?element.classList.remove(classToRemove):(throwIfWhitespace(classToRemove),element.className=element.className.split(/\s+/).filter(function(c){return c!==classToRemove}).join(" ")),element}function toggleClass(element,classToToggle,predicate){var has=hasClass(element,classToToggle);if("function"==typeof predicate&&(predicate=predicate(element,classToToggle)),"boolean"!=typeof predicate&&(predicate=!has),predicate!==has)return predicate?addClass(element,classToToggle):removeClass(element,classToToggle),element}function setAttributes(el,attributes){Object.getOwnPropertyNames(attributes).forEac
vendor: 14,725 bytes, line 1
1h(function(attrName){var attrValue=attributes[attrName];null==attrValue||!1===attrValue?el.removeAttribute(attrName):el.setAttribute(attrName,!0===attrValue?"":attrValue)})}function getAttributes(tag){var obj={},knownBooleans=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(tag&&tag.attributes&&tag.attributes.length>0)for(var attrs=tag.attributes,i=attrs.length-1;i>=0;i--){var attrName=attrs[i].name,attrVal=attrs[i].value;"boolean"!=typeof tag[attrName]&&-1===knownBooleans.indexOf(","+attrName+",")||(attrVal=null!==attrVal),obj[attrName]=attrVal}return obj}function getAttribute(el,attribute){return el.getAttribute(attribute)}function setAttribute(el,attribute,value){el.setAttribute(attribute,value)}function removeAttribute(el,attribute){el.removeAttribute(attribute)}function blockTextSelection(){document.body.focus(),document.onselectstart=function(){return!1}}function unblockTextSelection(){document.onselectstart=function(){return!0}}function getBoundingClientRect(el){if(el&&el.getBoundingClientRect&&el.parentNode){var rect=el.getBoundingClientRect(),result={};return["bottom","height","left","right","top","width"].forEach(function(k){void 0!==rect[k]&&(result[k]=rect[k])}),result.height||(result.height=parseFloat(computedStyle(el,"height"))),result.width||(result.width=parseFloat(computedStyle(el,"width"))),result}}function findPosition(el){if(!el||el&&!el.offsetParent)return{left:0,top:0,width:0,height:0};var width=el.offsetWidth,height=el.offsetHeight,left=0,top=0;do{left+=el.offsetLeft,top+=el.offsetTop,el=el.offsetParent}while(el);return{left:left,top:top,width:width,height:height}}function getPointerPosition(el,event){var position={},boxTarget=findPosition(event.target),box=findPosition(el),boxW=box.width,boxH=box.height,offsetY=event.offsetY-(box.top-boxTarget.top),offsetX=event.offsetX-(box.left-boxTarget.left);return event.changedTouches&&(offsetX=event.changedTouches[0].pageX-box.left,offsetY=event.changedTouches[0].pageY+box.top),position.y=1-Math.max(0,Math.min(1,offsetY/boxH)),position.x=Math.max(0,Math.min(1,offsetX/boxW)),position}function isTextNode(value){return isObject(value)&&3===value.nodeType}function emptyEl(el){for(;el.firstChild;)el.removeChild(el.firstChild);return el}function normalizeContent(content){return"function"==typeof content&&(content=content()),(Array.isArray(content)?content:[content]).map(function(value){return"function"==typeof value&&(value=value()),isEl(value)||isTextNode(value)?value:"string"==typeof value&&/\S/.test(value)?document.createTextNode(value):void 0}).filter(function(value){return value})}function appendContent(el,content){return normalizeContent(content).forEach(function(node){return el.appendChild(node)}),el}function insertContent(el,content){return appendContent(emptyEl(el),content)}function isSingleLeftClick(event){return void 0===event.button&&void 0===event.buttons||(0===event.button&&void 0===event.buttons||("mouseup"===event.type&&0===event.button&&0===event.buttons||0===event.button&&1===event.buttons))}var videojs,$=createQuerier("querySelector"),$$=createQuerier("querySelectorAll"),Dom=Object.freeze({__proto__:null,isReal:isReal,isEl:isEl,isInFrame:isInFrame,createEl:createEl,textContent:textContent,prependTo:prependTo,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,setAttributes:setAttributes,getAttributes:getAttributes,getAttribute:getAttribute,setAttribute:setAttribute,removeAttribute:removeAttribute,blockTextSelection:blockTextSelection,unblockTextSelection:unblockTextSelection,getBoundingClientRect:getBoundingClientRect,findPosition:findPosition,getPointerPosition:getPointerPosition,isTextNode:isTextNode,emptyEl:emptyEl,normalizeContent:normalizeContent,appendContent:appendContent,insertContent:insertContent,isSingleLeftClick:isSingleLeftClick,$:$,$$:$$}),_windowLoaded=!1,autoSetup=function(){if(isReal()&&!1!==videojs.options.autoSetup){var vids=Array.prototype.slice.call(document.getElementsByTagName("video")),audios=Array.prototype.slice.call(document.getElementsByTagName("audio")),divs=Array.prototype.slice.call(document.getElementsByTagName("video-js")),mediaEls=vids.concat(audios,divs);if(mediaEls&&mediaEls.length>0)for(var i=0,e=mediaEls.length;i<e;i++){var mediaEl=mediaEls[i];if(!mediaEl||!mediaEl.getAttribute){autoSetupTimeout(1);break}void 0===mediaEl.player&&null!==mediaEl.getAttribute("data-setup")&&videojs(mediaEl)}else _windowLoaded||autoSetupTimeout(1)}};function autoSetupTimeout(wait,vjs){vjs&&(videojs=vjs),window$1.setTimeout(autoSetup,wait)}function setWindowLoaded(){_windowLoaded=!0,window$1.removeEventListener("load",setWindowLoaded)}isReal()&&("complete"===document.readyState?setWindowLoaded():window$1.addEventListener("load",setWindowLoaded));var FakeWeakMap,createStyleElement=function(className){var style=document.createElement("style");return style.className=className,style},setTextContent=function(el,content){el.styleSheet?el.styleSheet.cssText=content:el.textContent=content},_guid=3;function newGUID(){return _guid++}window$1.WeakMap||(FakeWeakMap=function(){function FakeWeakMap(){this.vdata="vdata"+Math.floor(window$1.performance&&window$1.performance.now()||Date.now()),this.data={}}var _proto=FakeWeakMap.prototype;return _proto.set=function(key,value){var access=key[this.vdata]||newGUID();return key[this.vdata]||(key[this.vdata]=access),this.data[access]=value,this},_proto.get=function(key){var access=key[this.vdata];if(access)return this.data[access];log("We have no data for this element",key)},_proto.has=function(key){return key[this.vdata]in this.data},_proto.delete=function(key){var access=key[this.vdata];access&&(delete this.data[access],delete key[this.vdata])},FakeWeakMap}());var _supportsPassive,DomData=window$1.WeakMap?new WeakMap:new FakeWeakMap;function _cleanUpEvents(elem,type){if(DomData.has(elem)){var data=DomData.get(elem);0===data.handlers[type].length&&(delete data.handlers[type],elem.removeEventListener?elem.removeEventListener(type,data.dispatcher,!1):elem.detachEvent&&elem.detachEvent("on"+type,data.dispatcher)),Object.getOwnPropertyNames(data.handlers).length<=0&&(delete data.handlers,delete data.dispatcher,delete data.disabled),0===Object.getOwnPropertyNames(data).length&&DomData.delete(elem)}}function _handleMultipleEvents(fn,elem,types,callback){types.forEach(function(type){fn(elem,type,callback)})}function fixEvent(event){if(event.fixed_)return event;function returnTrue(){return!0}function returnFalse(){return!1}if(!event||!event.isPropagationStopped){var old=event||window$1.event;for(var key in event={},old)"layerX"!==key&&"layerY"!==key&&"keyLocation"!==key&&"webkitMovementX"!==key&&"webkitMovementY"!==key&&("returnValue"===key&&old.preventDefault||(event[key]=old[key]));if(event.target||(event.target=event.srcElement||document),event.relatedTarget||(event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement),event.preventDefault=function(){old.preventDefault&&old.preventDefault(),event.returnValue=!1,old.returnValue=!1,event.defaultPrevented=!0},event.defaultPrevented=!1,event.stopPropagation=function(){old.stopPropagation&&old.stopPropagation(),event.cancelBubble=!0,old.cancelBubble=!0,event.isPropagationStopped=returnTrue},event.isPropagationStopped=returnFalse,event.stopImmediatePropagation=function(){old.stopImmediatePropagation&&old.stopImmediatePropagation(),event.isImmediatePropagationStopped=returnTrue,event.stopPropagation()},event.isImmediatePropagationStopped=returnFalse,null!==event.clientX&&void 0!==event.clientX){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)}event.which=event.charCode||event.keyCode,null!==event.button&&void 0!==event.button&&(event.button=1&event.button?0:4&event.button?1:2&event.button?2:0)}return event.fixed_=!0,event}var supportsPassive=function(){if("boolean"!=typeof _supportsPassive){_supportsPassive=!1;try{var opts=Object.defineProperty({},"passive",{get:function(){_supportsPassive=!0}});window$1.addEventListener("test",null,opts),window$1.removeEventListener("test",null,opts)}catch(e){}}return _supportsPassive},passiveEvents=["touchstart","touchmove"];function on(elem,type,fn){if(Array.isArray(type))return _handleMultipleEvents(on,elem,type,fn);DomData.has(elem)||DomData.set(elem,{});var data=DomData.get(elem);if(data.handlers||(data.handlers={}),data.handlers[type]||(data.handlers[type]=[]),fn.guid||(fn.guid=newGUID()),data.handlers[type].push(fn),data.dispatcher||(data.disabled=!1,data.dispatcher=function(event,hash){if(!data.disabled){event=fixEvent(event);var handlers=data.handlers[event.type];if(handlers)for(var handlersCopy=handlers.slice(0),m=0,n=handlersCopy.length;m<n&&!event.isImmediatePropagationStopped();m++)try{handlersCopy[m].call(elem,event,hash)}catch(e){log.error(e)}}}),1===data.handlers[type].length)if(elem.addEventListener){var options=!1;supportsPassive()&&passiveEvents.indexOf(type)>-1&&(options={passive:!0}),elem.addEventListener(type,data.dispatcher,options)}else elem.attachEvent&&elem.attachEvent("on"+type,data.dispatcher)}function off(elem,type,fn){if(DomData.has(elem)){var data=DomData.get(elem);if(data.handlers){if(Array.isArray(type))return _handleMultipleEvents(off,elem,type,fn);var removeType=function(el,t){data.handlers[t]=[],_cleanUpEvents(el,t)};if(void 0!==type){var handlers=data.handlers[type];if(handlers)if(fn){if(fn.guid)for(var n=0;n<handlers.length;n++)handlers[n].guid===fn.guid&&handlers.splice(n--,1);_cleanUpEvents(elem,type)}else removeType(elem,type)}else for(var t in data.handlers)Object.prototype.hasOwnProperty.call(data.handlers||{},t)&&removeType(elem,t)}}}function trigger(elem,event,hash){var elemData=DomData.has(elem)?DomData.get(elem):{},parent=elem.parentNode||elem.ownerDocument;if("string"==typeof event?event={type:event,target:elem}:event.target||(event.target=elem),event=fixEvent(event),elemData.dispatcher&&elemData.dispatcher.call(elem,event,hash),parent&&!event.isPropagationStopped()&&!0===event.bubbles)trigger.call(null,parent,event,hash);else if(!parent&&!event.defaultPrevented&&event.target&&event.target[event.type]){DomData.has(event.target)||DomData.set(event.target,{});var targetData=DomData.get(event.target);event.target[event.type]&&(targetData.disabled=!0,"function"==typeof event.target[event.type]&&event.target[event.type](),targetData.disabled=!1)}return!event.defaultPrevented}function one(elem,type,fn){if(Array.isArray(type))return _handleMultipleEvents(one,elem,type,fn);var func=function func(){off(elem,type,func),fn.apply(this,arguments)};func.guid=fn.guid=fn.guid||newGUID(),on(elem,type,func)}function any(elem,type,fn){var func=function func(){off(elem,type,func),fn.apply(this,arguments)};func.guid=fn.guid=fn.guid||newGUID(),on(elem,type,func)}var EVENT_MAP,Events=Object.freeze({__proto__:null,fixEvent:fixEvent,on:on,off:off,trigger:trigger,one:one,any:any}),UPDATE_REFRESH_INTERVAL=30,bind=function(context,fn,uid){fn.guid||(fn.guid=newGUID());var bound=fn.bind(context);return bound.guid=uid?uid+"_"+fn.guid:fn.guid,bound},throttle=function(fn,wait){var last=window$1.performance.now();return function(){var now=window$1.performance.now();now-last>=wait&&(fn.apply(void 0,arguments),last=now)}},debounce=function(func,wait,immediate,context){var timeout;void 0===context&&(context=window$1);var debounced=function(){var self=this,args=arguments,_later=function(){timeout=null,_later=null,immediate||func.apply(self,args)};!timeout&&immediate&&func.apply(self,args),context.clearTimeout(timeout),timeout=context.setTimeout(_later,wait)};return debounced.cancel=function(){context.clearTimeout(timeout),timeout=null},debounced},EventTarget=function(){};EventTarget.prototype.allowedEvents_={},EventTarget.prototype.on=function(type,fn){var ael=this.addEventListener;this.addEventListener=function(){},on(this,type,fn),this.addEventListener=ael},EventTarget.prototype.addEventListener=EventTarget.prototype.on,EventTarget.prototype.off=function(type,fn){off(this,type,fn)},EventTarget.prototype.removeEventListener=EventTarget.prototype.off,EventTarget.prototype.one=function(type,fn){var ael=this.addEventListener;this.addEventListener=function(){},one(this,type,fn),this.addEventListener=ael},EventTarget.prototype.any=function(type,fn){var ael=this.addEventListener;this.addEventListener=function(){},any(this,type,fn),this.addEventListener=ael},EventTarget.prototype.trigger=function(event){var type=event.type||event;"string"==typeof event&&(event={type:type}),event=fixEvent(event),this.allowedEvents_[type]&&this["on"+type]&&this["on"+type](event),trigger(this,event)},EventTarget.prototype.dispatchEvent=EventTarget.prototype.trigger,EventTarget.prototype.queueTrigger=function(event){var _this=this;EVENT_MAP||(EVENT_MAP=new Map);var type=event.type||event,map=EVENT_MAP.get(this);map||(map=new Map,EVENT_MAP.set(this,map));var oldTimeout=map.get(type);map.delete(type),window$1.clearTimeout(oldTimeout);var timeout=window$1.setTimeout(function(){0===map.size&&(map=null,EVENT_MAP.delete(_this)),_this.trigger(event)},0);map.set(type,timeout)};var isEvented=function(object){return object instanceof EventTarget||!!object.eventBusEl_&&["on","one","off","trigger"].every(function(k){return"function"==typeof object[k]})},isValidEventType=function(type){return"string"==typeof type&&/\S/.test(type)||Array.isArray(type)&&!!type.length},validateTarget=function(target){if(!target.nodeName&&!isEvented(target))throw new Error("Invalid target; must be a DOM node or evented object.")},validateEventType=function(type){if(!isValidEventType(type))throw new Error("Invalid event type; must be a non-empty string or array.")},validateListener=function(listener){if("function"!=typeof listener)throw new Error("Invalid listener; must be a function.")},normalizeListenArgs=function(self,args){var target,type,listener,isTargetingSelf=args.length<3||args[0]===self||args[0]===self.eventBusEl_;return isTargetingSelf?(target=self.eventBusEl_,args.length>=3&&args.shift(),type=args[0],listener=args[1]):(target=args[0],type=args[1],listener=args[2]),validateTarget(target),validateEventType(type),validateListener(listener),{isTargetingSelf:isTargetingSelf,target:target,type:type,listener:listener=bind(self,listener)}},listen=function(target,method,type,listener){validateTarget(target),target.nodeName?Events[method](target,type,listener):target[method](type,listener)},EventedMixin={on:function(){for(var _this=this,_len=arguments.length,args=new Array(_len),_
vendor: 4,129 bytes, line 1
1key=0;_key<_len;_key++)args[_key]=arguments[_key];var _normalizeListenArgs=normalizeListenArgs(this,args),isTargetingSelf=_normalizeListenArgs.isTargetingSelf,target=_normalizeListenArgs.target,type=_normalizeListenArgs.type,listener=_normalizeListenArgs.listener;if(listen(target,"on",type,listener),!isTargetingSelf){var removeListenerOnDispose=function(){return _this.off(target,type,listener)};removeListenerOnDispose.guid=listener.guid;var removeRemoverOnTargetDispose=function(){return _this.off("dispose",removeListenerOnDispose)};removeRemoverOnTargetDispose.guid=listener.guid,listen(this,"on","dispose",removeListenerOnDispose),listen(target,"on","dispose",removeRemoverOnTargetDispose)}},one:function(){for(var _this2=this,_len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];var _normalizeListenArgs2=normalizeListenArgs(this,args),isTargetingSelf=_normalizeListenArgs2.isTargetingSelf,target=_normalizeListenArgs2.target,type=_normalizeListenArgs2.type,listener=_normalizeListenArgs2.listener;if(isTargetingSelf)listen(target,"one",type,listener);else{var wrapper=function wrapper(){_this2.off(target,type,wrapper);for(var _len3=arguments.length,largs=new Array(_len3),_key3=0;_key3<_len3;_key3++)largs[_key3]=arguments[_key3];listener.apply(null,largs)};wrapper.guid=listener.guid,listen(target,"one",type,wrapper)}},any:function(){for(var _this3=this,_len4=arguments.length,args=new Array(_len4),_key4=0;_key4<_len4;_key4++)args[_key4]=arguments[_key4];var _normalizeListenArgs3=normalizeListenArgs(this,args),isTargetingSelf=_normalizeListenArgs3.isTargetingSelf,target=_normalizeListenArgs3.target,type=_normalizeListenArgs3.type,listener=_normalizeListenArgs3.listener;if(isTargetingSelf)listen(target,"any",type,listener);else{var wrapper=function wrapper(){_this3.off(target,type,wrapper);for(var _len5=arguments.length,largs=new Array(_len5),_key5=0;_key5<_len5;_key5++)largs[_key5]=arguments[_key5];listener.apply(null,largs)};wrapper.guid=listener.guid,listen(target,"any",type,wrapper)}},off:function(targetOrType,typeOrListener,listener){if(!targetOrType||isValidEventType(targetOrType))off(this.eventBusEl_,targetOrType,typeOrListener);else{var target=targetOrType,type=typeOrListener;validateTarget(target),validateEventType(type),validateListener(listener),listener=bind(this,listener),this.off("dispose",listener),target.nodeName?(off(target,type,listener),off(target,"dispose",listener)):isEvented(target)&&(target.off(type,listener),target.off("dispose",listener))}},trigger:function(event,hash){return trigger(this.eventBusEl_,event,hash)}};function evented(target,options){void 0===options&&(options={});var eventBusKey=options.eventBusKey;if(eventBusKey){if(!target[eventBusKey].nodeName)throw new Error('The eventBusKey "'+eventBusKey+'" does not refer to an element.');target.eventBusEl_=target[eventBusKey]}else target.eventBusEl_=createEl("span",{className:"vjs-event-bus"});return assign(target,EventedMixin),target.eventedCallbacks&&target.eventedCallbacks.forEach(function(callback){callback()}),target.on("dispose",function(){target.off(),window$1.setTimeout(function(){target.eventBusEl_=null},0)}),target}var StatefulMixin={state:{},setState:function(stateUpdates){var changes,_this=this;return"function"==typeof stateUpdates&&(stateUpdates=stateUpdates()),each(stateUpdates,function(value,key){_this.state[key]!==value&&((changes=changes||{})[key]={from:_this.state[key],to:value}),_this.state[key]=value}),changes&&isEvented(this)&&this.trigger({changes:changes,type:"statechanged"}),changes}};function stateful(target,defaultState){return assign(target,StatefulMixin),target.state=assign({},target.state,defaultState),"function"==typeof target.handleStateChanged&&isEvented(target)&&target.on("statechanged",target.handleStateChanged),target}var toLowerCase=function(string){return"string"!=typeof string?string:string.replace(/./,function(w){return w.toLowerCase()})},toTitleCase=function(string){return"string"!=typeof string?string:string.replace(/./,function(w){return w.toUpperCase()})};function mergeOptions(){for(var result={}
vendor: 13,799 bytes, line 1
1,_len=arguments.length,sources=new Array(_len),_key=0;_key<_len;_key++)sources[_key]=arguments[_key];return sources.forEach(function(source){source&&each(source,function(value,key){isPlain(value)?(isPlain(result[key])||(result[key]={}),result[key]=mergeOptions(result[key],value)):result[key]=value})}),result}var MapSham=function(){function MapSham(){this.map_={}}var _proto=MapSham.prototype;return _proto.has=function(key){return key in this.map_},_proto.delete=function(key){var has=this.has(key);return delete this.map_[key],has},_proto.set=function(key,value){return this.set_[key]=value,this},_proto.forEach=function(callback,thisArg){for(var key in this.map_)callback.call(thisArg,this.map_[key],key,this)},MapSham}(),Map$1=window$1.Map?window$1.Map:MapSham,SetSham=function(){function SetSham(){this.set_={}}var _proto=SetSham.prototype;return _proto.has=function(key){return key in this.set_},_proto.delete=function(key){var has=this.has(key);return delete this.set_[key],has},_proto.add=function(key){return this.set_[key]=1,this},_proto.forEach=function(callback,thisArg){for(var key in this.set_)callback.call(thisArg,key,key,this)},SetSham}(),Set=window$1.Set?window$1.Set:SetSham,Component=function(){function Component(player,options,ready){if(!player&&this.play?this.player_=player=this:this.player_=player,this.isDisposed_=!1,this.parentComponent_=null,this.options_=mergeOptions({},this.options_),options=this.options_=mergeOptions(this.options_,options),this.id_=options.id||options.el&&options.el.id,!this.id_){var id=player&&player.id&&player.id()||"no_player";this.id_=id+"_component_"+newGUID()}this.name_=options.name||null,options.el?this.el_=options.el:!1!==options.createEl&&(this.el_=this.createEl()),!1!==options.evented&&evented(this,{eventBusKey:this.el_?"el_":null}),stateful(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map$1,this.clearingTimersOnDispose_=!1,!1!==options.initChildren&&this.initChildren(),this.ready(ready),!1!==options.reportTouchActivity&&this.enableTouchActivity()}var _proto=Component.prototype;return _proto.dispose=function(){if(!this.isDisposed_){if(this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),DomData.has(this.el_)&&DomData.delete(this.el_),this.el_=null),this.player_=null}},_proto.isDisposed=function(){return Boolean(this.isDisposed_)},_proto.player=function(){return this.player_},_proto.options=function(obj){return obj?(this.options_=mergeOptions(this.options_,obj),this.options_):this.options_},_proto.el=function(){return this.el_},_proto.createEl=function(tagName,properties,attributes){return createEl(tagName,properties,attributes)},_proto.localize=function(string,tokens,defaultValue){void 0===defaultValue&&(defaultValue=string);var code=this.player_.language&&this.player_.language(),languages=this.player_.languages&&this.player_.languages(),language=languages&&languages[code],primaryCode=code&&code.split("-")[0],primaryLang=languages&&languages[primaryCode],localizedString=defaultValue;return language&&language[string]?localizedString=language[string]:primaryLang&&primaryLang[string]&&(localizedString=primaryLang[string]),tokens&&(localizedString=localizedString.replace(/\{(\d+)\}/g,function(match,index){var value=tokens[index-1],ret=value;return void 0===value&&(ret=match),ret})),localizedString},_proto.contentEl=function(){return this.contentEl_||this.el_},_proto.id=function(){return this.id_},_proto.name=function(){return this.name_},_proto.children=function(){return this.children_},_proto.getChildById=function(id){return this.childIndex_[id]},_proto.getChild=function(name){if(name)return this.childNameIndex_[name]},_proto.getDescendant=function(){for(var _len=arguments.length,names=new Array(_len),_key=0;_key<_len;_key++)names[_key]=arguments[_key];names=names.reduce(function(acc,n){return acc.concat(n)},[]);for(var currentChild=this,i=0;i<names.length;i++)if(!(currentChild=currentChild.getChild(names[i]))||!currentChild.getChild)return;return currentChild},_proto.addChild=function(child,options,index){var component,componentName;if(void 0===options&&(options={}),void 0===index&&(index=this.children_.length),"string"==typeof child){componentName=toTitleCase(child);var componentClassName=options.componentClass||componentName;options.name=componentName;var ComponentClass=Component.getComponent(componentClassName);if(!ComponentClass)throw new Error("Component "+componentClassName+" does not exist");if("function"!=typeof ComponentClass)return null;component=new ComponentClass(this.player_||this,options)}else component=child;if(component.parentComponent_&&component.parentComponent_.removeChild(component),this.children_.splice(index,0,component),component.parentComponent_=this,"function"==typeof component.id&&(this.childIndex_[component.id()]=component),(componentName=componentName||component.name&&toTitleCase(component.name()))&&(this.childNameIndex_[componentName]=component,this.childNameIndex_[toLowerCase(componentName)]=component),"function"==typeof component.el&&component.el()){var refNode=null;this.children_[index+1]&&(this.children_[index+1].el_?refNode=this.children_[index+1].el_:isEl(this.children_[index+1])&&(refNode=this.children_[index+1])),this.contentEl().insertBefore(component.el(),refNode)}return component},_proto.removeChild=function(component){if("string"==typeof component&&(component=this.getChild(component)),component&&this.children_){for(var childFound=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===component){childFound=!0,this.children_.splice(i,1);break}if(childFound){component.parentComponent_=null,this.childIndex_[component.id()]=null,this.childNameIndex_[toTitleCase(component.name())]=null,this.childNameIndex_[toLowerCase(component.name())]=null;var compEl=component.el();compEl&&compEl.parentNode===this.contentEl()&&this.contentEl().removeChild(component.el())}}},_proto.initChildren=function(){var _this=this,children=this.options_.children;if(children){var workingChildren,parentOptions=this.options_,Tech=Component.getComponent("Tech");(workingChildren=Array.isArray(children)?children:Object.keys(children)).concat(Object.keys(this.options_).filter(function(child){return!workingChildren.some(function(wchild){return"string"==typeof wchild?child===wchild:child===wchild.name})})).map(function(child){var name,opts;return"string"==typeof child?opts=children[name=child]||_this.options_[name]||{}:(name=child.name,opts=child),{name:name,opts:opts}}).filter(function(child){var c=Component.getComponent(child.opts.componentClass||toTitleCase(child.name));return c&&!Tech.isTech(c)}).forEach(function(child){var name=child.name,opts=child.opts;if(void 0!==parentOptions[name]&&(opts=parentOptions[name]),!1!==opts){!0===opts&&(opts={}),opts.playerOptions=_this.options_.playerOptions;var newChild=_this.addChild(name,opts);newChild&&(_this[name]=newChild)}})}},_proto.buildCSSClass=function(){return""},_proto.ready=function(fn,sync){if(void 0===sync&&(sync=!1),fn)return this.isReady_?void(sync?fn.call(this):this.setTimeout(fn,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(fn))},_proto.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var readyQueue=this.readyQueue_;this.readyQueue_=[],readyQueue&&readyQueue.length>0&&readyQueue.forEach(function(fn){fn.call(this)},this),this.trigger("ready")},1)},_proto.$=function(selector,context){return $(selector,context||this.contentEl())},_proto.$$=function(selector,context){return $$(selector,context||this.contentEl())},_proto.hasClass=function(classToCheck){return hasClass(this.el_,classToCheck)},_proto.addClass=function(classToAdd){addClass(this.el_,classToAdd)},_proto.removeClass=function(classToRemove){removeClass(this.el_,classToRemove)},_proto.toggleClass=function(classToToggle,predicate){toggleClass(this.el_,classToToggle,predicate)},_proto.show=function(){this.removeClass("vjs-hidden")},_proto.hide=function(){this.addClass("vjs-hidden")},_proto.lockShowing=function(){this.addClass("vjs-lock-showing")},_proto.unlockShowing=function(){this.removeClass("vjs-lock-showing")},_proto.getAttribute=function(attribute){return getAttribute(this.el_,attribute)},_proto.setAttribute=function(attribute,value){setAttribute(this.el_,attribute,value)},_proto.removeAttribute=function(attribute){removeAttribute(this.el_,attribute)},_proto.width=function(num,skipListeners){return this.dimension("width",num,skipListeners)},_proto.height=function(num,skipListeners){return this.dimension("height",num,skipListeners)},_proto.dimensions=function(width,height){this.width(width,!0),this.height(height)},_proto.dimension=function(widthOrHeight,num,skipListeners){if(void 0!==num)return null!==num&&num==num||(num=0),-1!==(""+num).indexOf("%")||-1!==(""+num).indexOf("px")?this.el_.style[widthOrHeight]=num:this.el_.style[widthOrHeight]="auto"===num?"":num+"px",void(skipListeners||this.trigger("componentresize"));if(!this.el_)return 0;var val=this.el_.style[widthOrHeight],pxIndex=val.indexOf("px");return-1!==pxIndex?parseInt(val.slice(0,pxIndex),10):parseInt(this.el_["offset"+toTitleCase(widthOrHeight)],10)},_proto.currentDimension=function(widthOrHeight){var computedWidthOrHeight=0;if("width"!==widthOrHeight&&"height"!==widthOrHeight)throw new Error("currentDimension only accepts width or height value");if(computedWidthOrHeight=computedStyle(this.el_,widthOrHeight),0===(computedWidthOrHeight=parseFloat(computedWidthOrHeight))||isNaN(computedWidthOrHeight)){var rule="offset"+toTitleCase(widthOrHeight);computedWidthOrHeight=this.el_[rule]}return computedWidthOrHeight},_proto.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},_proto.currentWidth=function(){return this.currentDimension("width")},_proto.currentHeight=function(){return this.currentDimension("height")},_proto.focus=function(){this.el_.focus()},_proto.blur=function(){this.el_.blur()},_proto.handleKeyDown=function(event){this.player_&&(event.stopPropagation(),this.player_.handleKeyDown(event))},_proto.handleKeyPress=function(event){this.handleKeyDown(event)},_proto.emitTapEvents=function(){var couldBeTap,touchStart=0,firstTouch=null;this.on("touchstart",function(event){1===event.touches.length&&(firstTouch={pageX:event.touches[0].pageX,pageY:event.touches[0].pageY},touchStart=window$1.performance.now(),couldBeTap=!0)}),this.on("touchmove",function(event){if(event.touches.length>1)couldBeTap=!1;else if(firstTouch){var xdiff=event.touches[0].pageX-firstTouch.pageX,ydiff=event.touches[0].pageY-firstTouch.pageY;Math.sqrt(xdiff*xdiff+ydiff*ydiff)>10&&(couldBeTap=!1)}});var noTap=function(){couldBeTap=!1};this.on("touchleave",noTap),this.on("touchcancel",noTap),this.on("touchend",function(event){(firstTouch=null,!0===couldBeTap)&&(window$1.performance.now()-touchStart<200&&(event.preventDefault(),this.trigger("tap")))})},_proto.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var touchHolding,report=bind(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){report(),this.clearInterval(touchHolding),touchHolding=this.setInterval(report,250)});var touchEnd=function(event){report(),this.clearInterval(touchHolding)};this.on("touchmove",report),this.on("touchend",touchEnd),this.on("touchcancel",touchEnd)}},_proto.setTimeout=function(fn,timeout){var timeoutId,_this2=this;return fn=bind(this,fn),this.clearTimersOnDispose_(),timeoutId=window$1.setTimeout(function(){_this2.setTimeoutIds_.has(timeoutId)&&_this2.setTimeoutIds_.delete(timeoutId),fn()},timeout),this.setTimeoutIds_.add(timeoutId),timeoutId},_proto.clearTimeout=function(timeoutId){return this.setTimeoutIds_.has(timeoutId)&&(this.setTimeoutIds_.delete(timeoutId),window$1.clearTimeout(timeoutId)),timeoutId},_proto.setInterval=function(fn,interval){fn=bind(this,fn),this.clearTimersOnDispose_();var intervalId=window$1.setInterval(fn,interval);return this.setIntervalIds_.add(intervalId),intervalId},_proto.clearInterval=function(intervalId){return this.setIntervalIds_.has(intervalId)&&(this.setIntervalIds_.delete(intervalId),window$1.clearInterval(intervalId)),intervalId},_proto.requestAnimationFrame=function(fn){var id,_this3=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),fn=bind(this,fn),id=window$1.requestAnimationFrame(function(){_this3.rafIds_.has(id)&&_this3.rafIds_.delete(id),fn()}),this.rafIds_.add(id),id):this.setTimeout(fn,1e3/60)},_proto.requestNamedAnimationFrame=function(name,fn){var _this4=this;if(!this.namedRafs_.has(name)){this.clearTimersOnDispose_(),fn=bind(this,fn);var id=this.requestAnimationFrame(function(){fn(),_this4.namedRafs_.has(name)&&_this4.namedRafs_.delete(name)});return this.namedRafs_.set(name,id),name}},_proto.cancelNamedAnimationFrame=function(name){this.namedRafs_.has(name)&&(this.cancelAnimationFrame(this.namedRafs_.get(name)),this.namedRafs_.delete(name))},_proto.cancelAnimationFrame=function(id){return this.supportsRaf_?(this.rafIds_.has(id)&&(this.rafIds_.delete(id),window$1.cancelAnimationFrame(id)),id):this.clearTimeout(id)},_proto.clearTimersOnDispose_=function(){var _this5=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
1h(function(_ref){var idName=_ref[0],cancelName=_ref[1];_this5[idName].forEach(function(val,key){return _this5[cancelName](key)})}),_this5.clearingTimersOnDispose_=!1}))},Component.registerComponent=function(name,ComponentToRegister){if("string"!=typeof name||!name)throw new Error('Illegal component name, "'+name+'"; must be a non-empty string.');var reason,Tech=Component.getComponent("Tech"),isTech=Tech&&Tech.isTech(ComponentToRegister),isComp=Component===ComponentToRegister||Component.prototype.isPrototypeOf(ComponentToRegister.prototype);if(isTech||!isComp)throw reason=isTech?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+name+'"; '+reason+".");name=toTitleCase(name),Component.components_||(Component.components_={});var Player=Component.getComponent("Player");if("Player"===name&&Player&&Player.players){var players=Player.players,playerNames=Object.keys(players);if(players&&playerNames.length>0&&playerNames.map(function(pname){return players[pname]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return Component.components_[name]=ComponentToRegister,Component.components_[toLowerCase(name)]=ComponentToRegister,ComponentToRegister},Component.getComponent=function(name){if(name&&Component.components_)return Component.components_[name]},Component}();Component.prototype.supportsRaf_="function"==typeof window$1.requestAnimationFrame&&"function"==typeof window$1.cancelAnimationFrame,Component.registerComponent("Component",Component);var match,USER_AGENT=window$1.navigator&&window$1.navigator.userAgent||"",webkitVersionMap=/AppleWebKit\/([\d.]+)/i.exec(USER_AGENT),appleWebkitVersion=webkitVersionMap?parseFloat(webkitVersionMap.pop()):null,IS_IPOD=/iPod/i.test(USER_AGENT),IOS_VERSION=(match=USER_AGENT.match(/OS (\d+)_/i))&&match[1]?match[1]:null,IS_ANDROID=/Android/i.test(USER_AGENT),ANDROID_VERSION=function(){var match=USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!match)return null;var major=match[1]&&parseFloat(match[1]),minor=match[2]&&parseFloat(match[2]);return major&&minor?parseFloat(match[1]+"."+match[2]):major||null}(),IS_NATIVE_ANDROID=IS_ANDROID&&ANDROID_VERSION<5&&appleWebkitVersion<537,IS_FIREFOX=/Firefox/i.test(USER_AGENT),IS_EDGE=/Edg/i.test(USER_AGENT),IS_CHROME=!IS_EDGE&&(/Chrome/i.test(USER_AGENT)||/CriOS/i.test(USER_AGENT)),CHROME_VERSION=function(){var match=USER_AGENT.match(/(Chrome|CriOS)\/(\d+)/);return match&&match[2]?parseFloat(match[2]):null}(),IE_VERSION=function(){var result=/MSIE\s(\d+)\.\d/.exec(USER_AGENT),version=result&&parseFloat(result[1]);return!version&&/Trident\/7.0/i.test(USER_AGENT)&&/rv:11.0/.test(USER_AGENT)&&(version=11),version}(),IS_SAFARI=/Safari/i.test(USER_AGENT)&&!IS_CHROME&&!IS_ANDROID&&!IS_EDGE,IS_WINDOWS=/Windows/i.test(USER_AGENT),TOUCH_ENABLED=isReal()&&("ontouchstart"in window$1||window$1.navigator.maxTouchPoints||window$1.DocumentTouch&&window$1.document instanceof window$1.DocumentTouch),IS_IPAD=/iPad/i.test(USER_AGENT)||IS_SAFARI&&TOUCH_ENABLED&&
vendor: 16,036 bytes, line 1
1!/iPhone/i.test(USER_AGENT),IS_IPHONE=/iPhone/i.test(USER_AGENT)&&!IS_IPAD,IS_IOS=IS_IPHONE||IS_IPAD||IS_IPOD,IS_ANY_SAFARI=(IS_SAFARI||IS_IOS)&&!IS_CHROME,browser=Object.freeze({__proto__:null,IS_IPOD:IS_IPOD,IOS_VERSION:IOS_VERSION,IS_ANDROID:IS_ANDROID,ANDROID_VERSION:ANDROID_VERSION,IS_NATIVE_ANDROID:IS_NATIVE_ANDROID,IS_FIREFOX:IS_FIREFOX,IS_EDGE:IS_EDGE,IS_CHROME:IS_CHROME,CHROME_VERSION:CHROME_VERSION,IE_VERSION:IE_VERSION,IS_SAFARI:IS_SAFARI,IS_WINDOWS:IS_WINDOWS,TOUCH_ENABLED:TOUCH_ENABLED,IS_IPAD:IS_IPAD,IS_IPHONE:IS_IPHONE,IS_IOS:IS_IOS,IS_ANY_SAFARI:IS_ANY_SAFARI});function getRange(fnName,valueIndex,ranges,rangeIndex){return function(fnName,index,maxIndex){if("number"!=typeof index||index<0||index>maxIndex)throw new Error("Failed to execute '"+fnName+"' on 'TimeRanges': The index provided ("+index+") is non-numeric or out of bounds (0-"+maxIndex+").")}(fnName,rangeIndex,ranges.length-1),ranges[rangeIndex][valueIndex]}function createTimeRangesObj(ranges){return void 0===ranges||0===ranges.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:ranges.length,start:getRange.bind(null,"start",0,ranges),end:getRange.bind(null,"end",1,ranges)}}function createTimeRanges(start,end){return Array.isArray(start)?createTimeRangesObj(start):void 0===start||void 0===end?createTimeRangesObj():createTimeRangesObj([[start,end]])}function bufferedPercent(buffered,duration){var start,end,bufferedDuration=0;if(!duration)return 0;buffered&&buffered.length||(buffered=createTimeRanges(0,0));for(var i=0;i<buffered.length;i++)start=buffered.start(i),(end=buffered.end(i))>duration&&(end=duration),bufferedDuration+=end-start;return bufferedDuration/duration}for(var browserApi,FullscreenApi={prefixed:!0},apiMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],specApi=apiMap[0],i=0;i<apiMap.length;i++)if(apiMap[i][1]in document){browserApi=apiMap[i];break}if(browserApi){for(var _i=0;_i<browserApi.length;_i++)FullscreenApi[specApi[_i]]=browserApi[_i];FullscreenApi.prefixed=browserApi[0]!==specApi[0]}function MediaError(value){if(value instanceof MediaError)return value;"number"==typeof value?this.code=value:"string"==typeof value?this.message=value:isObject(value)&&("number"==typeof value.code&&(this.code=value.code),assign(this,value)),this.message||(this.message=MediaError.defaultMessages[this.code]||"")}MediaError.prototype.code=0,MediaError.prototype.message="",MediaError.prototype.status=null,MediaError.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],MediaError.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var errNum=0;errNum<MediaError.errorTypes.length;errNum++)MediaError[MediaError.errorTypes[errNum]]=errNum,MediaError.prototype[MediaError.errorTypes[errNum]]=errNum;function isPromise(value){return null!=value&&"function"==typeof value.then}function silencePromise(value){isPromise(value)&&value.then(null,function(e){})}var trackToJson_=function(track){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(acc,prop,i){return track[prop]&&(acc[prop]=track[prop]),acc},{cues:track.cues&&Array.prototype.map.call(track.cues,function(cue){return{startTime:cue.startTime,endTime:cue.endTime,text:cue.text,id:cue.id}})})},textTrackConverter_textTracksToJson=function(tech){var trackEls=tech.$$("track"),trackObjs=Array.prototype.map.call(trackEls,function(t){return t.track});return Array.prototype.map.call(trackEls,function(trackEl){var json=trackToJson_(trackEl.track);return trackEl.src&&(json.src=trackEl.src),json}).concat(Array.prototype.filter.call(tech.textTracks(),function(track){return-1===trackObjs.indexOf(track)}).map(trackToJson_))},textTrackConverter_jsonToTextTracks=function(json,tech){return json.forEach(function(track){var addedTrack=tech.addRemoteTextTrack(track).track;!track.src&&track.cues&&track.cues.forEach(function(cue){return addedTrack.addCue(cue)})}),tech.textTracks()},MODAL_CLASS_NAME="vjs-modal-dialog",ModalDialog=function(_Component){function ModalDialog(player,options){var _this;return(_this=_Component.call(this,player,options)||this).opened_=_this.hasBeenOpened_=_this.hasBeenFilled_=!1,_this.closeable(!_this.options_.uncloseable),_this.content(_this.options_.content),_this.contentEl_=createEl("div",{className:MODAL_CLASS_NAME+"-content"},{role:"document"}),_this.descEl_=createEl("p",{className:MODAL_CLASS_NAME+"-description vjs-control-text",id:_this.el().getAttribute("aria-describedby")}),textContent(_this.descEl_,_this.description()),_this.el_.appendChild(_this.descEl_),_this.el_.appendChild(_this.contentEl_),_this}_inheritsLoose(ModalDialog,_Component);var _proto=ModalDialog.prototype;return _proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},_proto.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,_Component.prototype.dispose.call(this)},_proto.buildCSSClass=function(){return MODAL_CLASS_NAME+" vjs-hidden "+_Component.prototype.buildCSSClass.call(this)},_proto.label=function(){return this.localize(this.options_.label||"Modal Window")},_proto.description=function(){var desc=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(desc+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),desc},_proto.open=function(){if(!this.opened_){var player=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!player.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&player.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=player.controls(),player.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},_proto.opened=function(value){return"boolean"==typeof value&&this[value?"open":"close"](),this.opened_},_proto.close=function(){if(this.opened_){var player=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&player.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&player.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},_proto.closeable=function(value){if("boolean"==typeof value){var closeable=this.closeable_=!!value,close=this.getChild("closeButton");if(closeable&&!close){var temp=this.contentEl_;this.contentEl_=this.el_,close=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=temp,this.on(close,"close",this.close)}!closeable&&close&&(this.off(close,"close",this.close),this.removeChild(close),close.dispose())}return this.closeable_},_proto.fill=function(){this.fillWith(this.content())},_proto.fillWith=function(content){var contentEl=this.contentEl(),parentEl=contentEl.parentNode,nextSiblingEl=contentEl.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,parentEl.removeChild(contentEl),this.empty(),insertContent(contentEl,content),this.trigger("modalfill"),nextSiblingEl?parentEl.insertBefore(contentEl,nextSiblingEl):parentEl.appendChild(contentEl);var closeButton=this.getChild("closeButton");closeButton&&parentEl.appendChild(closeButton.el_)},_proto.empty=function(){this.trigger("beforemodalempty"),emptyEl(this.contentEl()),this.trigger("modalempty")},_proto.content=function(value){return void 0!==value&&(this.content_=value),this.content_},_proto.conditionalFocus_=function(){var activeEl=document.activeElement,playerEl=this.player_.el_;this.previouslyActiveEl_=null,(playerEl.contains(activeEl)||playerEl===activeEl)&&(this.previouslyActiveEl_=activeEl,this.focus())},_proto.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},_proto.handleKeyDown=function(event){if(event.stopPropagation(),keycode.isEventKey(event,"Escape")&&this.closeable())return event.preventDefault(),void this.close();if(keycode.isEventKey(event,"Tab")){for(var focusIndex,focusableEls=this.focusableEls_(),activeEl=this.el_.querySelector(":focus"),i=0;i<focusableEls.length;i++)if(activeEl===focusableEls[i]){focusIndex=i;break}document.activeElement===this.el_&&(focusIndex=0),event.shiftKey&&0===focusIndex?(focusableEls[focusableEls.length-1].focus(),event.preventDefault()):event.shiftKey||focusIndex!==focusableEls.length-1||(focusableEls[0].focus(),event.preventDefault())}},_proto.focusableEls_=function(){var allChildren=this.el_.querySelectorAll("*");return Array.prototype.filter.call(allChildren,function(child){return(child instanceof window$1.HTMLAnchorElement||child instanceof window$1.HTMLAreaElement)&&child.hasAttribute("href")||(child instanceof window$1.HTMLInputElement||child instanceof window$1.HTMLSelectElement||child instanceof window$1.HTMLTextAreaElement||child instanceof window$1.HTMLButtonElement)&&!child.hasAttribute("disabled")||child instanceof window$1.HTMLIFrameElement||child instanceof window$1.HTMLObjectElement||child instanceof window$1.HTMLEmbedElement||child.hasAttribute("tabindex")&&-1!==child.getAttribute("tabindex")||child.hasAttribute("contenteditable")})},ModalDialog}(Component);ModalDialog.prototype.options_={pauseOnOpen:!0,temporary:!0},Component.registerComponent("ModalDialog",ModalDialog);var TrackList=function(_EventTarget){function TrackList(tracks){var _this;void 0===tracks&&(tracks=[]),(_this=_EventTarget.call(this)||this).tracks_=[],Object.defineProperty(_assertThisInitialized(_this),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<tracks.length;i++)_this.addTrack(tracks[i]);return _this}_inheritsLoose(TrackList,_EventTarget);var _proto=TrackList.prototype;return _proto.addTrack=function(track){var index=this.tracks_.length;""+index in this||Object.defineProperty(this,index,{get:function(){return this.tracks_[index]}}),-1===this.tracks_.indexOf(track)&&(this.tracks_.push(track),this.trigger({track:track,type:"addtrack",target:this}))},_proto.removeTrack=function(rtrack){for(var track,i=0,l=this.length;i<l;i++)if(this[i]===rtrack){(track=this[i]).off&&track.off(),this.tracks_.splice(i,1);break}track&&this.trigger({track:track,type:"removetrack",target:this})},_proto.getTrackById=function(id){for(var result=null,i=0,l=this.length;i<l;i++){var track=this[i];if(track.id===id){result=track;break}}return result},TrackList}(EventTarget);for(var event in TrackList.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},TrackList.prototype.allowedEvents_)TrackList.prototype["on"+event]=null;var disableOthers=function(list,track){for(var i=0;i<list.length;i++)Object.keys(list[i]).length&&track.id!==list[i].id&&(list[i].enabled=!1)},AudioTrackList=function(_TrackList){function AudioTrackList(tracks){var _this;void 0===tracks&&(tracks=[]);for(var i=tracks.length-1;i>=0;i--)if(tracks[i].enabled){disableOthers(tracks,tracks[i]);break}return(_this=_TrackList.call(this,tracks)||this).changing_=!1,_this}_inheritsLoose(AudioTrackList,_TrackList);var _proto=AudioTrackList.prototype;return _proto.addTrack=function(track){var _this2=this;track.enabled&&disableOthers(this,track),_TrackList.prototype.addTrack.call(this,track),track.addEventListener&&(track.enabledChange_=function(){_this2.changing_||(_this2.changing_=!0,disableOthers(_this2,track),_this2.changing_=!1,_this2.trigger("change"))},track.addEventListener("enabledchange",track.enabledChange_))},_proto.removeTrack=function(rtrack){_TrackList.prototype.removeTrack.call(this,rtrack),rtrack.removeEventListener&&rtrack.enabledChange_&&(rtrack.removeEventListener("enabledchange",rtrack.enabledChange_),rtrack.enabledChange_=null)},AudioTrackList}(TrackList),disableOthers$1=function(list,track){for(var i=0;i<list.length;i++)Object.keys(list[i]).length&&track.id!==list[i].id&&(list[i].selected=!1)},VideoTrackList=function(_TrackList){function VideoTrackList(tracks){var _this;void 0===tracks&&(tracks=[]);for(var i=tracks.length-1;i>=0;i--)if(tracks[i].selected){disableOthers$1(tracks,tracks[i]);break}return(_this=_TrackList.call(this,tracks)||this).changing_=!1,Object.defineProperty(_assertThisInitialized(_this),"selectedIndex",{get:function(){for(var _i=0;_i<this.length;_i++)if(this[_i].selected)return _i;return-1},set:function(){}}),_this}_inheritsLoose(VideoTrackList,_TrackList);var _proto=VideoTrackList.prototype;return _proto.addTrack=function(track){var _this2=this;track.selected&&disableOthers$1(this,track),_TrackList.prototype.addTrack.call(this,track),track.addEventListener&&(track.selectedChange_=function(){_this2.changing_||(_this2.changing_=!0,disableOthers$1(_this2,track),_this2.changing_=!1,_this2.trigger("change"))},track.addEventListener("selectedchange",track.selectedChange_))},_proto.removeTrack=function(rtrack){_TrackList.prototype.removeTrack.call(this,rtrack),rtrack.removeEventListener&&rtrack.selectedChange_&&(rtrack.removeEventListener("selectedchange",rtrack.selectedChange_),rtrack.selectedChange_=null)},VideoTrackList}(TrackList),TextTrackList=function(_TrackList){function TextTrackList(){return _TrackList.apply(this,arguments)||this}_inheritsLoose(TextTrackList,_TrackList);var _proto=TextTrackList.prototype;return _proto.addTrack=function(track){var _this=this;_TrackList.prototype.addTrack.call(this,track),this.queueChange_||(this.queueChange_=function(){return _this.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return _this.trigger("selectedlanguagechange")}),track.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(track.kind)&&track.addEventListener("modechange",this.triggerSelectedlanguagechange_)},_proto.removeTrack=function(rtrack){_TrackList.prototype.removeTrack.call(this,rtrack),rtrack.removeEventListener&&(this.queueChange_&&rtrack.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&rtrack.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},TextTrackList}(TrackList),HtmlTrackElementList=function(){function HtmlTrackElementList(trackElements){void 0===trackElements&&(trackElements=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var i=0,length=trackElements.length;i<length;i++)this.addTrackElement_(trackElements[i])}var _proto=HtmlTrackElementList.prototype;return _proto.addTrackElement_=function(trackElement){var index=this.trackElements_.length;""+index in this||Object.defineProperty(this,index,{get:function(){return this.trackElements_[index]}}),-1===this.trackElements_.indexOf(trackElement)&&this.trackElements_.pu
1sh(trackElement)},_proto.getTrackElementByTrack_=function(track){for(var trackElement_,i=0,length=this.trackElements_.length;i<length;i++)if(track===this.trackElements_[i].track){trackElement_=this.trackElements_[i];break}return trackElement_},_proto.removeTrackElement_=function(trackElement){for(var i=0,length=this.trackElements_.length;i<length;i++)if(trackElement===this.trackElements_[i]){this.trackElements_[i].track&&"function"==typeof this.trackElements_[i].track.off&&this.trackElements_[i].track.off(),"function"==typeof this.trackElements_[i].off&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}},HtmlTrackElementList}(),TextTrackCueList=function(){function TextTrackCueList(cues){TextTrackCueList.prototype.setCues_.call(this,cues),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var _proto=TextTrackCueList.prototype;return _proto.setCues_=function(cues){var oldLength=this.length||0,i=0,l=cues.length;this.cues_=cues,this.length_=cues.length;var defineProp=function(index){""+index in this||Object.defineProperty(this,""+index,{get:function(){return this.cues_[index]}})};if(oldLength<l)for(i=oldLength;i<l;i++)defineProp.call(this,i)},_proto.getCueById=function(id){for(var result=null,i=0,l=this.length;i<l;i++){var cue=this[i];if(cue.id===id){result=cue;break}}return result},TextTrackCueList}(),VideoTrackKind={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},AudioTrackKind={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},TextTrackKind={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},TextTrackMode={disabled:"disabled",hidden:"hidden",showing:"showing"},Track=function(_EventTarget){function Track(options){var _this;void 0===options&&(options={}),_this=_EventTarget.call(this)||this;var trackProps={id:options.id||"vjs_track_"+newGUID(),kind:options.kind||"",label:options.label||"",language:options.language||""},_loop=function(key){Object.defineProperty(_assertThisInitialized(_this),key,{get:function(){return trackProps[key]},set:function(){}})};for(var key in trackProps)_loop(key);return _this}return _inheritsLoose(Track,_EventTarget),Track}(EventTarget),parseUrl=function(url){var props=["protocol","hostname","port","pathname","search","hash","host"],a=document.createElement("a");a.href=url;var div,addToBody=""===a.host&&"file:"!==a.protocol;addToBody&&((div=document.createElement("div")).innerHTML='<a href="'+url+'"></a>',a=div.firstChild,div.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(div));for(var details={},i=0;i<props.length;i++)details[props[i]]=a[props[i]];return"http:"===details.protocol&&(details.host=details.host.replace(/:80$/,"")),"https:"===details.protocol&&(details.host=details.host.replace(/:443$/,"")),details.protocol||(details.protocol=window$1.location.protocol),addToBody&&document.body.removeChild(div),details},getAbsoluteURL=function(url){if(!url.match(/^https?:\/\//)){var div=document.createElement("div");div.innerHTML='<a href="'+url+'">x</a>',url=div.firstChild.href}return url},getFileExtension=function(path){if("string"==typeof path){var pathParts=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(path);if(pathParts)return pathParts.pop().toLowerCase()}return""},isCrossOrigin=function(url,winLoc){void 0===winLoc&&(winLoc=window$1.location);var urlInfo=parseUrl(url);return(":"===urlInfo.protocol?winLoc.protocol:urlInfo.protocol)+urlInfo.host!==winLoc.protocol+winLoc.host},Url=Object.freeze({__proto__:null,parseUrl:parseUrl,getAbsoluteURL:getAbsoluteURL,getFileExtension:getFileExtension,isCrossOrigin:isCrossOrigin}),parseCues=function(srcContent,track){var parser=new window$1.WebVTT.Parser(window$1,window$1.vttjs,window$1.WebVTT.StringDecoder()),errors=[];parser.oncue=function(cue){track.addCue(cue)},parser.onparsingerror=function(error){errors.push(error)},parser.onflush=function(){track.trigger({type:"loadeddata",target:track})},parser.parse(srcContent),errors.length>0&&(window$1.console&&window$1.console.groupCollapsed&&window$1.console.groupCollapsed("Text Track parsing errors for "+track.src),errors.forEac
vendor: 10,281 bytes, line 1
1h(function(error){return log.error(error)}),window$1.console&&window$1.console.groupEnd&&window$1.console.groupEnd()),parser.flush()},loadTrack=function(src,track){var opts={uri:src},crossOrigin=isCrossOrigin(src);crossOrigin&&(opts.cors=crossOrigin);var withCredentials="use-credentials"===track.tech_.crossOrigin();withCredentials&&(opts.withCredentials=withCredentials),XHR(opts,bind(this,function(err,response,responseBody){if(err)return log.error(err,response);track.loaded_=!0,"function"!=typeof window$1.WebVTT?track.tech_&&track.tech_.any(["vttjsloaded","vttjserror"],function(event){if("vttjserror"!==event.type)return parseCues(responseBody,track);log.error("vttjs failed to load, stopping trying to process "+track.src)}):parseCues(responseBody,track)}))},TextTrack=function(_Track){function TextTrack(options){var _this;if(void 0===options&&(options={}),!options.tech)throw new Error("A tech was not provided.");var settings=mergeOptions(options,{kind:TextTrackKind[options.kind]||"subtitles",language:options.language||options.srclang||""}),mode=TextTrackMode[settings.mode]||"disabled",default_=settings.default;"metadata"!==settings.kind&&"chapters"!==settings.kind||(mode="hidden"),(_this=_Track.call(this,settings)||this).tech_=settings.tech,_this.cues_=[],_this.activeCues_=[],_this.preload_=!1!==_this.tech_.preloadTextTracks;var cues=new TextTrackCueList(_this.cues_),activeCues=new TextTrackCueList(_this.activeCues_),changed=!1,timeupdateHandler=bind(_assertThisInitialized(_this),function(){this.activeCues=this.activeCues,changed&&(this.trigger("cuechange"),changed=!1)});return"disabled"!==mode&&_this.tech_.ready(function(){_this.tech_.on("timeupdate",timeupdateHandler)},!0),Object.defineProperties(_assertThisInitialized(_this),{default:{get:function(){return default_},set:function(){}},mode:{get:function(){return mode},set:function(newMode){var _this2=this;TextTrackMode[newMode]&&(mode=newMode,this.preload_||"disabled"===mode||0!==this.cues.length||loadTrack(this.src,this),"disabled"!==mode?this.tech_.ready(function(){_this2.tech_.on("timeupdate",timeupdateHandler)},!0):this.tech_.off("timeupdate",timeupdateHandler),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?cues:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return activeCues;for(var ct=this.tech_.currentTime(),active=[],i=0,l=this.cues.length;i<l;i++){var cue=this.cues[i];cue.startTime<=ct&&cue.endTime>=ct?active.push(cue):cue.startTime===cue.endTime&&cue.startTime<=ct&&cue.startTime+.5>=ct&&active.push(cue)}if(changed=!1,active.length!==this.activeCues_.length)changed=!0;else for(var _i=0;_i<active.length;_i++)-1===this.activeCues_.indexOf(active[_i])&&(changed=!0);return this.activeCues_=active,activeCues.setCues_(this.activeCues_),activeCues},set:function(){}}}),settings.src?(_this.src=settings.src,_this.preload_||(_this.loaded_=!0),(_this.preload_||default_||"subtitles"!==settings.kind&&"captions"!==settings.kind)&&loadTrack(_this.src,_assertThisInitialized(_this))):_this.loaded_=!0,_this}_inheritsLoose(TextTrack,_Track);var _proto=TextTrack.prototype;return _proto.addCue=function(originalCue){var cue=originalCue;if(window$1.vttjs&&!(originalCue instanceof window$1.vttjs.VTTCue)){for(var prop in cue=new window$1.vttjs.VTTCue(originalCue.startTime,originalCue.endTime,originalCue.text),originalCue)prop in cue||(cue[prop]=originalCue[prop]);cue.id=originalCue.id,cue.originalCue_=originalCue}for(var tracks=this.tech_.textTracks(),i=0;i<tracks.length;i++)tracks[i]!==this&&tracks[i].removeCue(cue);this.cues_.push(cue),this.cues.setCues_(this.cues_)},_proto.removeCue=function(_removeCue){for(var i=this.cues_.length;i--;){var cue=this.cues_[i];if(cue===_removeCue||cue.originalCue_&&cue.originalCue_===_removeCue){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}},TextTrack}(Track);TextTrack.prototype.allowedEvents_={cuechange:"cuechange"};var AudioTrack=function(_Track){function AudioTrack(options){var _this;void 0===options&&(options={});var settings=mergeOptions(options,{kind:AudioTrackKind[options.kind]||""});_this=_Track.call(this,settings)||this;var enabled=!1;return Object.defineProperty(_assertThisInitialized(_this),"enabled",{get:function(){return enabled},set:function(newEnabled){"boolean"==typeof newEnabled&&newEnabled!==enabled&&(enabled=newEnabled,this.trigger("enabledchange"))}}),settings.enabled&&(_this.enabled=settings.enabled),_this.loaded_=!0,_this}return _inheritsLoose(AudioTrack,_Track),AudioTrack}(Track),VideoTrack=function(_Track){function VideoTrack(options){var _this;void 0===options&&(options={});var settings=mergeOptions(options,{kind:VideoTrackKind[options.kind]||""});_this=_Track.call(this,settings)||this;var selected=!1;return Object.defineProperty(_assertThisInitialized(_this),"selected",{get:function(){return selected},set:function(newSelected){"boolean"==typeof newSelected&&newSelected!==selected&&(selected=newSelected,this.trigger("selectedchange"))}}),settings.selected&&(_this.selected=settings.selected),_this}return _inheritsLoose(VideoTrack,_Track),VideoTrack}(Track),NONE=0,LOADED=2,HTMLTrackElement=function(_EventTarget){function HTMLTrackElement(options){var _this,readyState;void 0===options&&(options={}),_this=_EventTarget.call(this)||this;var track=new TextTrack(options);return _this.kind=track.kind,_this.src=track.src,_this.srclang=track.language,_this.label=track.label,_this.default=track.default,Object.defineProperties(_assertThisInitialized(_this),{readyState:{get:function(){return readyState}},track:{get:function(){return track}}}),readyState=NONE,track.addEventListener("loadeddata",function(){readyState=LOADED,_this.trigger({type:"load",target:_assertThisInitialized(_this)})}),_this}return _inheritsLoose(HTMLTrackElement,_EventTarget),HTMLTrackElement}(EventTarget);HTMLTrackElement.prototype.allowedEvents_={load:"load"},HTMLTrackElement.NONE=NONE,HTMLTrackElement.LOADING=1,HTMLTrackElement.LOADED=LOADED,HTMLTrackElement.ERROR=3;var NORMAL={audio:{ListClass:AudioTrackList,TrackClass:AudioTrack,capitalName:"Audio"},video:{ListClass:VideoTrackList,TrackClass:VideoTrack,capitalName:"Video"},text:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:"Text"}};Object.keys(NORMAL).forEach(function(type){NORMAL[type].getterName=type+"Tracks",NORMAL[type].privateName=type+"Tracks_"});var REMOTE={remoteText:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:HtmlTrackElementList,TrackClass:HTMLTrackElement,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ALL=_extends({},NORMAL,REMOTE);REMOTE.names=Object.keys(REMOTE),NORMAL.names=Object.keys(NORMAL),ALL.names=[].concat(REMOTE.names).concat(NORMAL.names);var Tech=function(_Component){function Tech(options,ready){var _this;return void 0===options&&(options={}),void 0===ready&&(ready=function(){}),options.reportTouchActivity=!1,(_this=_Component.call(this,null,options,ready)||this).hasStarted_=!1,_this.on("playing",function(){this.hasStarted_=!0}),_this.on("loadstart",function(){this.hasStarted_=!1}),ALL.names.forEach(function(name){var props=ALL[name];options&&options[props.getterName]&&(_this[props.privateName]=options[props.getterName])}),_this.featuresProgressEvents||_this.manualProgressOn(),_this.featuresTimeupdateEvents||_this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(track){!1===options["native"+track+"Tracks"]&&(_this["featuresNative"+track+"Tracks"]=!1)}),!1===options.nativeCaptions||!1===options.nativeTextTracks?_this.featuresNativeTextTracks=!1:!0!==options.nativeCaptions&&!0!==options.nativeTextTracks||(_this.featuresNativeTextTracks=!0),_this.featuresNativeTextTracks||_this.emulateTextTracks(),_this.preloadTextTracks=!1!==options.preloadTextTracks,_this.autoRemoteTextTracks_=new ALL.text.ListClass,_this.initTrackListeners(),options.nativeControlsForTouch||_this.emitTapEvents(),_this.constructor&&(_this.name_=_this.constructor.name||"Unknown Tech"),_this}_inheritsLoose(Tech,_Component);var _proto=Tech.prototype;return _proto.triggerSourceset=function(src){var _this2=this;this.isReady_||this.one("ready",function(){return _this2.setTimeout(function(){return _this2.triggerSourceset(src)},1)}),this.trigger({src:src,type:"sourceset"})},_proto.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},_proto.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},_proto.trackProgress=function(event){this.stopTrackingProgress(),this.progressInterval=this.setInterval(bind(this,function(){var numBufferedPercent=this.bufferedPercent();this.bufferedPercent_!==numBufferedPercent&&this.trigger("progress"),this.bufferedPercent_=numBufferedPercent,1===numBufferedPercent&&this.stopTrackingProgress()}),500)},_proto.onDurationChange=function(event){this.duration_=this.duration()},_proto.buffered=function(){return createTimeRanges(0,0)},_proto.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration_)},_proto.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},_proto.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},_proto.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},_proto.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},_proto.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},_proto.dispose=function(){this.clearTracks(NORMAL.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),_Component.prototype.dispose.call(this)},_proto.clearTracks=function(types){var _this3=this;
vendor: 5,418 bytes, line 1
1(types=[].concat(types)).forEach(function(type){for(var list=_this3[type+"Tracks"]()||[],i=list.length;i--;){var track=list[i];"text"===type&&_this3.removeRemoteTextTrack(track),list.removeTrack(track)}})},_proto.cleanupAutoTextTracks=function(){for(var list=this.autoRemoteTextTracks_||[],i=list.length;i--;){var track=list[i];this.removeRemoteTextTrack(track)}},_proto.reset=function(){},_proto.crossOrigin=function(){},_proto.setCrossOrigin=function(){},_proto.error=function(err){return void 0!==err&&(this.error_=new MediaError(err),this.trigger("error")),this.error_},_proto.played=function(){return this.hasStarted_?createTimeRanges(0,0):createTimeRanges()},_proto.setScrubbing=function(){},_proto.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},_proto.initTrackListeners=function(){var _this4=this;NORMAL.names.forEach(function(name){var props=NORMAL[name],trackListChanges=function(){_this4.trigger(name+"trackchange")},tracks=_this4[props.getterName]();tracks.addEventListener("removetrack",trackListChanges),tracks.addEventListener("addtrack",trackListChanges),_this4.on("dispose",function(){tracks.removeEventListener("removetrack",trackListChanges),tracks.removeEventListener("addtrack",trackListChanges)})})},_proto.addWebVttScript_=function(){var _this5=this;if(!window$1.WebVTT)if(document.body.contains(this.el())){if(!this.options_["vtt.js"]&&isPlain(vtt)&&Object.keys(vtt).length>0)return void this.trigger("vttjsloaded");var script=document.createElement("script");script.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",script.onload=function(){_this5.trigger("vttjsloaded")},script.onerror=function(){_this5.trigger("vttjserror")},this.on("dispose",function(){script.onload=null,script.onerror=null}),window$1.WebVTT=!0,this.el().parentNode.appendChild(script)}else this.ready(this.addWebVttScript_)},_proto.emulateTextTracks=function(){var _this6=this,tracks=this.textTracks(),remoteTracks=this.remoteTextTracks(),handleAddTrack=function(e){return tracks.addTrack(e.track)},handleRemoveTrack=function(e){return tracks.removeTrack(e.track)};remoteTracks.on("addtrack",handleAddTrack),remoteTracks.on("removetrack",handleRemoveTrack),this.addWebVttScript_();var updateDisplay=function(){return _this6.trigger("texttrackchange")},textTracksChanges=function(){updateDisplay();for(var i=0;i<tracks.length;i++){var track=tracks[i];track.removeEventListener("cuechange",updateDisplay),"showing"===track.mode&&track.addEventListener("cuechange",updateDisplay)}};textTracksChanges(),tracks.addEventListener("change",textTracksChanges),tracks.addEventListener("addtrack",textTracksChanges),tracks.addEventListener("removetrack",textTracksChanges),this.on("dispose",function(){remoteTracks.off("addtrack",handleAddTrack),remoteTracks.off("removetrack",handleRemoveTrack),tracks.removeEventListener("change",textTracksChanges),tracks.removeEventListener("addtrack",textTracksChanges),tracks.removeEventListener("removetrack",textTracksChanges);for(var i=0;i<tracks.length;i++){tracks[i].removeEventListener("cuechange",updateDisplay)}})},_proto.addTextTrack=function(kind,label,language){if(!kind)throw new Error("TextTrack kind is required but was not provided");return function(self,kind,label,language,options){void 0===options&&(options={});var tracks=self.textTracks();options.kind=kind,label&&(options.label=label),language&&(options.language=language),options.tech=self;var track=new ALL.text.TrackClass(options);return tracks.addTrack(track),track}(this,kind,label,language)},_proto.createRemoteTextTrack=function(options){var track=mergeOptions(options,{tech:this});return new REMOTE.remoteTextEl.TrackClass(track)},_proto.addRemoteTextTrack=function(options,manualCleanup){var _this7=this;void 0===options&&(options={});var htmlTrackElement=this.createRemoteTextTrack(options);return!0!==manualCleanup&&!1!==manualCleanup&&(log.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),manualCleanup=!0),this.remoteTextTrackEls().addTrackElement_(htmlTrackElement),this.remoteTextTracks().addTrack(htmlTrackElement.track),!0!==manualCleanup&&this.ready(function(){return _this7.autoRemoteTextTracks_.addTrack(htmlTrackElement.track)}),htmlTrackElement},_proto.removeRemoteTextTrack=function(track){var trackElement=this.remoteTextTrackEls().getTrackElementByTrack_(track);this.remoteTextTrackEls().removeTrackElement_(trackElement),this.remoteTextTracks().removeTrack(track),this.autoRemoteTextTracks_.removeTrack(track)},_proto.getVideoPlaybackQuality=function(){return{}},_proto.requestPictureInPicture=function(){var PromiseClass=this.options_.Promise||window$1.Promise;if(PromiseClass)return PromiseClass.reject()},_proto.disablePictureInPicture=function(){return!0},_proto.setDisablePictureInPicture=function(){},_proto.setPoster=function(){},_proto.playsinline=function(){},_proto.setPlaysinline=function(){},_proto.overrideNativeAudioTracks=function(){},_proto.overrideNativeVideoTracks=function(){},_proto.canPlayType=function(){return""},Tech.canPlayType=function(){return""},Tech.canPlaySource=function(srcObj,options){return Tech.canPlayType(srcObj.type)},Tech.isTech=function(component){return component.prototype instanceof Tech||component instanceof Tech||component===Tech}
vendor: 45,869 bytes, line 1
1,Tech.registerTech=function(name,tech){if(Tech.techs_||(Tech.techs_={}),!Tech.isTech(tech))throw new Error("Tech "+name+" must be a Tech");if(!Tech.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Tech.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return name=toTitleCase(name),Tech.techs_[name]=tech,Tech.techs_[toLowerCase(name)]=tech,"Tech"!==name&&Tech.defaultTechOrder_.push(name),tech},Tech.getTech=function(name){if(name)return Tech.techs_&&Tech.techs_[name]?Tech.techs_[name]:(name=toTitleCase(name),window$1&&window$1.videojs&&window$1.videojs[name]?(log.warn("The "+name+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),window$1.videojs[name]):void 0)},Tech}(Component);ALL.names.forEach(function(name){var props=ALL[name];Tech.prototype[props.getterName]=function(){return this[props.privateName]=this[props.privateName]||new props.ListClass,this[props.privateName]}}),Tech.prototype.featuresVolumeControl=!0,Tech.prototype.featuresMuteControl=!0,Tech.prototype.featuresFullscreenResize=!1,Tech.prototype.featuresPlaybackRate=!1,Tech.prototype.featuresProgressEvents=!1,Tech.prototype.featuresSourceset=!1,Tech.prototype.featuresTimeupdateEvents=!1,Tech.prototype.featuresNativeTextTracks=!1,Tech.withSourceHandlers=function(_Tech){_Tech.registerSourceHandler=function(handler,index){var handlers=_Tech.sourceHandlers;handlers||(handlers=_Tech.sourceHandlers=[]),void 0===index&&(index=handlers.length),handlers.splice(index,0,handler)},_Tech.canPlayType=function(type){for(var can,handlers=_Tech.sourceHandlers||[],i=0;i<handlers.length;i++)if(can=handlers[i].canPlayType(type))return can;return""},_Tech.selectSourceHandler=function(source,options){for(var handlers=_Tech.sourceHandlers||[],i=0;i<handlers.length;i++)if(handlers[i].canHandleSource(source,options))return handlers[i];return null},_Tech.canPlaySource=function(srcObj,options){var sh=_Tech.selectSourceHandler(srcObj,options);return sh?sh.canHandleSource(srcObj,options):""};["seekable","seeking","duration"].forEach(function(fnName){var originalFn=this[fnName];"function"==typeof originalFn&&(this[fnName]=function(){return this.sourceHandler_&&this.sourceHandler_[fnName]?this.sourceHandler_[fnName].apply(this.sourceHandler_,arguments):originalFn.apply(this,arguments)})},_Tech.prototype),_Tech.prototype.setSource=function(source){var sh=_Tech.selectSourceHandler(source,this.options_);sh||(_Tech.nativeSourceHandler?sh=_Tech.nativeSourceHandler:log.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),sh!==_Tech.nativeSourceHandler&&(this.currentSource_=source),this.sourceHandler_=sh.handleSource(source,this,this.options_),this.one("dispose",this.disposeSourceHandler)},_Tech.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Component.registerComponent("Tech",Tech),Tech.registerTech("Tech",Tech),Tech.defaultTechOrder_=[];var middlewares={},middlewareInstances={},TERMINATOR={};function setSource(player,src,next){player.setTimeout(function(){return function setSourceHelper(src,middleware,next,player,acc,lastRun){void 0===src&&(src={});void 0===middleware&&(middleware=[]);void 0===acc&&(acc=[]);void 0===lastRun&&(lastRun=!1);var _middleware=middleware,mwFactory=_middleware[0],mwrest=_middleware.slice(1);if("string"==typeof mwFactory)setSourceHelper(src,middlewares[mwFactory],next,player,acc,lastRun);else if(mwFactory){var mw=function(player,mwFactory){var mws=middlewareInstances[player.id()],mw=null;if(null==mws)return mw=mwFactory(player),middlewareInstances[player.id()]=[[mwFactory,mw]],mw;for(var i=0;i<mws.length;i++){var _mws$i=mws[i],mwf=_mws$i[0],mwi=_mws$i[1];mwf===mwFactory&&(mw=mwi)}null===mw&&(mw=mwFactory(player),mws.push([mwFactory,mw]));return mw}(player,mwFactory);if(!mw.setSource)return acc.push(mw),setSourceHelper(src,mwrest,next,player,acc,lastRun);mw.setSource(assign({},src),function(err,_src){if(err)return setSourceHelper(src,mwrest,next,player,acc,lastRun);acc.push(mw),setSourceHelper(_src,src.type===_src.type?mwrest:middlewares[_src.type],next,player,acc,lastRun)})}else mwrest.length?setSourceHelper(src,mwrest,next,player,acc,lastRun):lastRun?next(src,acc):setSourceHelper(src,middlewares["*"],next,player,acc,!0)}(src,middlewares[src.type],next,player)},1)}function mediate(middleware,tech,method,arg){void 0===arg&&(arg=null);var callMethod="call"+toTitleCase(method),middlewareValue=middleware.reduce(middlewareIterator(callMethod),arg),terminated=middlewareValue===TERMINATOR,returnValue=terminated?null:tech[method](middlewareValue);return function(mws,method,value,terminated){for(var i=mws.length-1;i>=0;i--){var mw=mws[i];mw[method]&&mw[method](terminated,value)}}(middleware,method,returnValue,terminated),returnValue}var allowedGetters={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},allowedSetters={setCurrentTime:1,setMuted:1,setVolume:1},allowedMediators={play:1,pause:1};function middlewareIterator(method){return function(value,mw){return value===TERMINATOR?TERMINATOR:mw[method]?mw[method](value):value}}var MimetypesKind={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},getMimetype=function(src){void 0===src&&(src="");var ext=getFileExtension(src);return MimetypesKind[ext.toLowerCase()]||""};function fixSource(src){if(!src.type){var mimetype=getMimetype(src.src);mimetype&&(src.type=mimetype)}return src}var MediaLoader=function(_Component){function MediaLoader(player,options,ready){var _this,options_=mergeOptions({createEl:!1},options);if(_this=_Component.call(this,player,options_,ready)||this,options.playerOptions.sources&&0!==options.playerOptions.sources.length)player.src(options.playerOptions.sources);else for(var i=0,j=options.playerOptions.techOrder;i<j.length;i++){var techName=toTitleCase(j[i]),tech=Tech.getTech(techName);if(techName||(tech=Component.getComponent(techName)),tech&&tech.isSupported()){player.loadTech_(techName);break}}return _this}return _inheritsLoose(MediaLoader,_Component),MediaLoader}(Component);Component.registerComponent("MediaLoader",MediaLoader);var ClickableComponent=function(_Component){function ClickableComponent(player,options){var _this;return(_this=_Component.call(this,player,options)||this).emitTapEvents(),_this.enable(),_this}_inheritsLoose(ClickableComponent,_Component);var _proto=ClickableComponent.prototype;return _proto.createEl=function(tag,props,attributes){void 0===tag&&(tag="div"),void 0===props&&(props={}),void 0===attributes&&(attributes={}),props=assign({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},props),"button"===tag&&log.error("Creating a ClickableComponent with an HTML element of "+tag+" is not supported; use a Button instead."),attributes=assign({role:"button"},attributes),this.tabIndex_=props.tabIndex;var el=_Component.prototype.createEl.call(this,tag,props,attributes);return this.createControlTextEl(el),el},_proto.dispose=function(){this.controlTextEl_=null,_Component.prototype.dispose.call(this)},_proto.createControlTextEl=function(el){return this.controlTextEl_=createEl("span",{className:"vjs-control-text"},{"aria-live":"polite"}),el&&el.appendChild(this.controlTextEl_),this.controlText(this.controlText_,el),this.controlTextEl_},_proto.controlText=function(text,el){if(void 0===el&&(el=this.el()),void 0===text)return this.controlText_||"Need Text";var localizedText=this.localize(text);this.controlText_=text,textContent(this.controlTextEl_,localizedText),this.nonIconControl||el.setAttribute("title",localizedText)},_proto.buildCSSClass=function(){return"vjs-control vjs-button "+_Component.prototype.buildCSSClass.call(this)},_proto.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},_proto.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},_proto.handleClick=function(event){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},_proto.handleKeyDown=function(event){keycode.isEventKey(event,"Space")||keycode.isEventKey(event,"Enter")?(event.preventDefault(),event.stopPropagation(),this.trigger("click")):_Component.prototype.handleKeyDown.call(this,event)},ClickableComponent}(Component);Component.registerComponent("ClickableComponent",ClickableComponent);var PosterImage=function(_ClickableComponent){function PosterImage(player,options){var _this;return(_this=_ClickableComponent.call(this,player,options)||this).update(),player.on("posterchange",bind(_assertThisInitialized(_this),_this.update)),_this}_inheritsLoose(PosterImage,_ClickableComponent);var _proto=PosterImage.prototype;return _proto.dispose=function(){this.player().off("posterchange",this.update),_ClickableComponent.prototype.dispose.call(this)},_proto.createEl=function(){return createEl("div",{className:"vjs-poster",tabIndex:-1})},_proto.update=function(event){var url=this.player().poster();this.setSrc(url),url?this.show():this.hide()},_proto.setSrc=function(url){var backgroundImage="";url&&(backgroundImage='url("'+url+'")'),this.el_.style.backgroundImage=backgroundImage},_proto.handleClick=function(event){if(this.player_.controls()){var sourceIsEncrypted=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(IE_VERSION||IS_EDGE)&&sourceIsEncrypted||this.player_.tech(!0).focus(),this.player_.paused()?silencePromise(this.player_.play()):this.player_.pause()}},PosterImage}(ClickableComponent);Component.registerComponent("PosterImage",PosterImage);var fontMap={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function constructColor(color,opacity){var hex;if(4===color.length)hex=color[1]+color[1]+color[2]+color[2]+color[3]+color[3];else{if(7!==color.length)throw new Error("Invalid color code provided, "+color+"; must be formatted as e.g. #f0e or #f604e2.");hex=color.slice(1)}return"rgba("+parseInt(hex.slice(0,2),16)+","+parseInt(hex.slice(2,4),16)+","+parseInt(hex.slice(4,6),16)+","+opacity+")"}function tryUpdateStyle(el,style,rule){try{el.style[style]=rule}catch(e){return}}var TextTrackDisplay=function(_Component){function TextTrackDisplay(player,options,ready){var _this;_this=_Component.call(this,player,options,ready)||this;var updateDisplayHandler=bind(_assertThisInitialized(_this),_this.updateDisplay);return player.on("loadstart",bind(_assertThisInitialized(_this),_this.toggleDisplay)),player.on("texttrackchange",updateDisplayHandler),player.on("loadedmetadata",bind(_assertThisInitialized(_this),_this.preselectTrack)),player.ready(bind(_assertThisInitialized(_this),function(){if(player.tech_&&player.tech_.featuresNativeTextTracks)this.hide();else{player.on("fullscreenchange",updateDisplayHandler),player.on("playerresize",updateDisplayHandler),window$1.addEventListener("orientationchange",updateDisplayHandler),player.on("dispose",function(){return window$1.removeEventListener("orientationchange",updateDisplayHandler)});for(var tracks=this.options_.playerOptions.tracks||[],i=0;i<tracks.length;i++)this.player_.addRemoteTextTrack(tracks[i],!0);this.preselectTrack()}})),_this}_inheritsLoose(TextTrackDisplay,_Component);var _proto=TextTrackDisplay.prototype;return _proto.preselectTrack=function(){for(var firstDesc,firstCaptions,preferredTrack,modes={captions:1,subtitles:1},trackList=this.player_.textTracks(),userPref=this.player_.cache_.selectedLanguage,i=0;i<trackList.length;i++){var track=trackList[i];userPref&&userPref.enabled&&userPref.language&&userPref.language===track.language&&track.kind in modes?track.kind===userPref.kind?preferredTrack=track:preferredTrack||(preferredTrack=track):userPref&&!userPref.enabled?(preferredTrack=null,firstDesc=null,firstCaptions=null):track.default&&("descriptions"!==track.kind||firstDesc?track.kind in modes&&!firstCaptions&&(firstCaptions=track):firstDesc=track)}preferredTrack?preferredTrack.mode="showing":firstCaptions?firstCaptions.mode="showing":firstDesc&&(firstDesc.mode="showing")},_proto.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},_proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},_proto.clearDisplay=function(){"function"==typeof window$1.WebVTT&&window$1.WebVTT.processCues(window$1,[],this.el_)},_proto.updateDisplay=function(){var tracks=this.player_.textTracks(),allowMultipleShowingTracks=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),allowMultipleShowingTracks){for(var showingTracks=[],_i=0;_i<tracks.length;++_i){var track=tracks[_i];"showing"===track.mode&&showingTracks.push(track)}this.updateForTrack(showingTracks)}else{for(var descriptionsTrack=null,captionsSubtitlesTrack=null,i=tracks.length;i--;){var _track=tracks[i];"showing"===_track.mode&&("descriptions"===_track.kind?descriptionsTrack=_track:captionsSubtitlesTrack=_track)}captionsSubtitlesTrack?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(captionsSubtitlesTrack)):descriptionsTrack&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(descriptionsTrack))}},_proto.updateDisplayState=function(track){for(var overrides=this.player_.textTrackSettings.getValues(),cues=track.activeCues,i=cues.length;i--;){var cue=cues[i];if(cue){var cueDiv=cue.displayState;if(overrides.color&&(cueDiv.firstChild.style.color=overrides.color),overrides.textOpacity&&tryUpdateStyle(cueDiv.firstChild,"color",constructColor(overrides.color||"#fff",overrides.textOpacity)),overrides.backgroundColor&&(cueDiv.firstChild.style.backgroundColor=overrides.backgroundColor),overrides.backgroundOpacity&&tryUpdateStyle(cueDiv.firstChild,"backgroundColor",constructColor(overrides.backgroundColor||"#000",overrides.backgroundOpacity)),overrides.windowColor&&(overrides.windowOpacity?tryUpdateStyle(cueDiv,"backgroundColor",constructColor(overrides.windowColor,overrides.windowOpacity)):cueDiv.style.backgroundColor=overrides.windowColor),overrides.edgeStyle&&("dropshadow"===overrides.edgeStyle?cueDiv.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===overrides.edgeStyle?cueDiv.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===overrides.edgeStyle?cueDiv.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===overrides.edgeStyle&&(cueDiv.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),overrides.fontPercent&&1!==overrides.fontPercent){var fontSize=window$1.parseFloat(cueDiv.style.fontSize);cueDiv.style.fontSize=fontSize*overrides.fontPercent+"px",cueDiv.style.height="auto",cueDiv.style.top="auto"}overrides.fontFamily&&"default"!==overrides.fontFamily&&("small-caps"===overrides.fontFamily?cueDiv.firstChild.style.fontVariant="small-caps":cueDiv.firstChild.style.fontFamily=fontMap[overrides.fontFamily])}}},_proto.updateForTrack=function(tracks){if(Array.isArray(tracks)||(tracks=[tracks]),"function"==typeof window$1.WebVTT&&!tracks.every(function(track){return!track.activeCues})){for(var cues=[],i=0;i<tracks.length;++i)for(var track=tracks[i],j=0;j<track.activeCues.length;++j)cues.push(track.activeCues[j]);window$1.WebVTT.processCues(window$1,cues,this.el_);for(var _i2=0;_i2<tracks.length;++_i2){for(var _track2=tracks[_i2],_j=0;_j<_track2.activeCues.length;++_j){var cueEl=_track2.activeCues[_j].displayState;addClass(cueEl,"vjs-text-track-cue"),addClass(cueEl,"vjs-text-track-cue-"+(_track2.language?_track2.language:_i2))}this.player_.textTrackSettings&&this.updateDisplayState(_track2)}}},TextTrackDisplay}(Component);Component.registerComponent("TextTrackDisplay",TextTrackDisplay);var LoadingSpinner=function(_Component){function LoadingSpinner(){return _Component.apply(this,arguments)||this}return _inheritsLoose(LoadingSpinner,_Component),LoadingSpinner.prototype.createEl=function(){var isAudio=this.player_.isAudio(),playerType=this.localize(isAudio?"Audio Player":"Video Player"),controlText=createEl("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[playerType])}),el=_Component.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return el.appendChild(controlText),el},LoadingSpinner}(Component);Component.registerComponent("LoadingSpinner",LoadingSpinner);var Button=function(_ClickableComponent){function Button(){return _ClickableComponent.apply(this,arguments)||this}_inheritsLoose(Button,_ClickableComponent);var _proto=Button.prototype;return _proto.createEl=function(tag,props,attributes){void 0===props&&(props={}),void 0===attributes&&(attributes={}),props=assign({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},props),attributes=assign({type:"button"},attributes);var el=Component.prototype.createEl.call(this,"button",props,attributes);return this.createControlTextEl(el),el},_proto.addChild=function(child,options){void 0===options&&(options={});var className=this.constructor.name;return log.warn("Adding an actionable (user controllable) child to a Button ("+className+") is not supported; use a ClickableComponent instead."),Component.prototype.addChild.call(this,child,options)},_proto.enable=function(){_ClickableComponent.prototype.enable.call(this),this.el_.removeAttribute("disabled")},_proto.disable=function(){_ClickableComponent.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},_proto.handleKeyDown=function(event){keycode.isEventKey(event,"Space")||keycode.isEventKey(event,"Enter")?event.stopPropagation():_ClickableComponent.prototype.handleKeyDown.call(this,event)},Button}(ClickableComponent);Component.registerComponent("Button",Button);var BigPlayButton=function(_Button){function BigPlayButton(player,options){var _this;return(_this=_Button.call(this,player,options)||this).mouseused_=!1,_this.on("mousedown",_this.handleMouseDown),_this}_inheritsLoose(BigPlayButton,_Button);var _proto=BigPlayButton.prototype;return _proto.buildCSSClass=function(){return"vjs-big-play-button"},_proto.handleClick=function(event){var playPromise=this.player_.play();if(this.mouseused_&&event.clientX&&event.clientY){var sourceIsEncrypted=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return silencePromise(playPromise),void(!this.player_.tech(!0)||(IE_VERSION||IS_EDGE)&&sourceIsEncrypted||this.player_.tech(!0).focus())}var cb=this.player_.getChild("controlBar"),playToggle=cb&&cb.getChild("playToggle");if(playToggle){var playFocus=function(){return playToggle.focus()};isPromise(playPromise)?playPromise.then(playFocus,function(){}):this.setTimeout(playFocus,1)}else this.player_.tech(!0).focus()},_proto.handleKeyDown=function(event){this.mouseused_=!1,_Button.prototype.handleKeyDown.call(this,event)},_proto.handleMouseDown=function(event){this.mouseused_=!0},BigPlayButton}(Button);BigPlayButton.prototype.controlText_="Play Video",Component.registerComponent("BigPlayButton",BigPlayButton);var CloseButton=function(_Button){function CloseButton(player,options){var _this;return(_this=_Button.call(this,player,options)||this).controlText(options&&options.controlText||_this.localize("Close")),_this}_inheritsLoose(CloseButton,_Button);var _proto=CloseButton.prototype;return _proto.buildCSSClass=function(){return"vjs-close-button "+_Button.prototype.buildCSSClass.call(this)},_proto.handleClick=function(event){this.trigger({type:"close",bubbles:!1})},_proto.handleKeyDown=function(event){keycode.isEventKey(event,"Esc")?(event.preventDefault(),event.stopPropagation(),this.trigger("click")):_Button.prototype.handleKeyDown.call(this,event)},CloseButton}(Button);Component.registerComponent("CloseButton",CloseButton);var PlayToggle=function(_Button){function PlayToggle(player,options){var _this;return void 0===options&&(options={}),_this=_Button.call(this,player,options)||this,options.replay=void 0===options.replay||options.replay,_this.on(player,"play",_this.handlePlay),_this.on(player,"pause",_this.handlePause),options.replay&&_this.on(player,"ended",_this.handleEnded),_this}_inheritsLoose(PlayToggle,_Button);var _proto=PlayToggle.prototype;return _proto.buildCSSClass=function(){return"vjs-play-control "+_Button.prototype.buildCSSClass.call(this)},_proto.handleClick=function(event){this.player_.paused()?this.player_.play():this.player_.pause()},_proto.handleSeeked=function(event){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(event):this.handlePlay(event)},_proto.handlePlay=function(event){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},_proto.handlePause=function(event){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},_proto.handleEnded=function(event){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},PlayToggle}(Button);PlayToggle.prototype.controlText_="Play",Component.registerComponent("PlayToggle",PlayToggle);var defaultImplementation=function(seconds,guide){seconds=seconds<0?0:seconds;var s=Math.floor(seconds%60),m=Math.floor(seconds/60%60),h=Math.floor(seconds/3600),gm=Math.floor(guide/60%60),gh=Math.floor(guide/3600);return(isNaN(seconds)||seconds===1/0)&&(h=m=s="-"),(h=h>0||gh>0?h+":":"")+(m=((h||gm>=10)&&m<10?"0"+m:m)+":")+(s=s<10?"0"+s:s)},implementation=defaultImplementation;function formatTime(seconds,guide){return void 0===guide&&(guide=seconds),implementation(seconds,guide)}var TimeDisplay=function(_Component){function TimeDisplay(player,options){var _this;return(_this=_Component.call(this,player,options)||this).on(player,["timeupdate","ended"],_this.updateContent),_this.updateTextNode_(),_this}_inheritsLoose(TimeDisplay,_Component);var _proto=TimeDisplay.prototype;return _proto.createEl=function(){var className=this.buildCSSClass(),el=_Component.prototype.createEl.call(this,"div",{className:className+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+"Â </span>"});return this.contentEl_=createEl("span",{className:className+"-display"},{"aria-live":"off",role:"presentation"}),el.appendChild(this.contentEl_),el},_proto.dispose=function(){this.contentEl_=null,this.textNode_=null,_Component.prototype.dispose.call(this)},_proto.updateTextNode_=function(time){var _this2=this;void 0===time&&(time=0),time=formatTime(time),this.formattedTime_!==time&&(this.formattedTime_=time,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(_this2.contentEl_){var oldNode=_this2.textNode_;_this2.textNode_=document.createTextNode(_this2.formattedTime_),_this2.textNode_&&(oldNode?_this2.contentEl_.replaceChild(_this2.textNode_,oldNode):_this2.contentEl_.appendChild(_this2.textNode_))}}))},_proto.updateContent=function(event){},TimeDisplay}(Component);TimeDisplay.prototype.labelText_="Time",TimeDisplay.prototype.controlText_="Time",Component.registerComponent("TimeDisplay",TimeDisplay);var CurrentTimeDisplay=function(_TimeDisplay){function CurrentTimeDisplay(){return _TimeDisplay.apply(this,arguments)||this}_inheritsLoose(CurrentTimeDisplay,_TimeDisplay);var _proto=CurrentTimeDisplay.prototype;return _proto.buildCSSClass=function(){return"vjs-current-time"},_proto.updateContent=function(event){var time;time=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(time)},CurrentTimeDisplay}(TimeDisplay);CurrentTimeDisplay.prototype.labelText_="Current Time",CurrentTimeDisplay.prototype.controlText_="Current Time",Component.registerComponent("CurrentTimeDisplay",CurrentTimeDisplay);var DurationDisplay=function(_TimeDisplay){function DurationDisplay(player,options){var _this;return(_this=_TimeDisplay.call(this,player,options)||this).on(player,"durationchange",_this.updateContent),_this.on(player,"loadstart",_this.updateContent),_this.on(player,"loadedmetadata",_this.updateContent),_this}_inheritsLoose(DurationDisplay,_TimeDisplay);var _proto=DurationDisplay.prototype;return _proto.buildCSSClass=function(){return"vjs-duration"},_proto.updateContent=function(event){var duration=this.player_.duration();this.updateTextNode_(duration)},DurationDisplay}(TimeDisplay);DurationDisplay.prototype.labelText_="Duration",DurationDisplay.prototype.controlText_="Duration",Component.registerComponent("DurationDisplay",DurationDisplay);var TimeDivider=function(_Component){function TimeDivider(){return _Component.apply(this,arguments)||this}return _inheritsLoose(TimeDivider,_Component),TimeDivider.prototype.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},TimeDivider}(Component);Component.registerComponent("TimeDivider",TimeDivider);var RemainingTimeDisplay=function(_TimeDisplay){function RemainingTimeDisplay(player,options){var _this;return(_this=_TimeDisplay.call(this,player,options)||this).on(player,"durationchange",_this.updateContent),_this}_inheritsLoose(RemainingTimeDisplay,_TimeDisplay);var _proto=RemainingTimeDisplay.prototype;return _proto.buildCSSClass=function(){return"vjs-remaining-time"},_proto.createEl=function(){var el=_TimeDisplay.prototype.createEl.call(this);return el.insertBefore(createEl("span",{},{"aria-hidden":!0},"-"),this.contentEl_),el},_proto.updateContent=function(event){var time;"number"==typeof this.player_.duration()&&(time=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(time))},RemainingTimeDisplay}(TimeDisplay);RemainingTimeDisplay.prototype.labelText_="Remaining Time",RemainingTimeDisplay.prototype.controlText_="Remaining Time",Component.registerComponent("RemainingTimeDisplay",RemainingTimeDisplay);var LiveDisplay=function(_Component){function LiveDisplay(player,options){var _this;return(_this=_Component.call(this,player,options)||this).updateShowing(),_this.on(_this.player(),"durationchange",_this.updateShowing),_this}_inheritsLoose(LiveDisplay,_Component);var _proto=LiveDisplay.prototype;return _proto.createEl=function(){var el=_Component.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=createEl("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"Â </span>"+this.localize("LIVE")},{"aria-live":"off"}),el.appendChild(this.contentEl_),el},_proto.dispose=function(){this.contentEl_=null,_Component.prototype.dispose.call(this)},_proto.updateShowing=function(event){this.player().duration()===1/0?this.show():this.hide()},LiveDisplay}(Component);Component.registerComponent("LiveDisplay",LiveDisplay);var SeekToLive=function(_Button){function SeekToLive(player,options){var _this;return(_this=_Button.call(this,player,options)||this).updateLiveEdgeStatus(),_this.player_.liveTracker&&_this.on(_this.player_.liveTracker,"liveedgechange",_this.updateLiveEdgeStatus),_this}_inheritsLoose(SeekToLive,_Button);var _proto=SeekToLive.prototype;return _proto.createEl=function(){var el=_Button.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=createEl("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),el.appendChild(this.textEl_),el},_proto.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},_proto.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},_proto.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,_Button.prototype.dispose.call(this)},SeekToLive}(Button);SeekToLive.prototype.controlText_="Seek to live, currently playing live",Component.registerComponent("SeekToLive",SeekToLive);var clamp=function(number,min,max){return number=Number(number),Math.min(max,Math.max(min,isNaN(number)?min:number))},Slider=function(_Component){function Slider(player,options){var _this;return(_this=_Component.call(this,player,options)||this).bar=_this.getChild(_this.options_.barName),_this.vertical(!!_this.options_.vertical),_this.enable(),_this}_inheritsLoose(Slider,_Component);var _proto=Slider.prototype;return _proto.enabled=function(){return this.enabled_},_proto.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},_proto.disable=function(){if(this.enabled()){var doc=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(doc,"mousemove",this.handleMouseMove),this.off(doc,"mouseup",this.handleMouseUp),this.off(doc,"touchmove",this.handleMouseMove),this.off(doc,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},_proto.createEl=function(type,props,attributes){return void 0===props&&(props={}),void 0===attributes&&(attributes={}),props.className=props.className+" vjs-slider",props=assign({tabIndex:0},props),attributes=assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},attributes),_Component.prototype.createEl.call(this,type,props,attributes)},_proto.handleMouseDown=function(event){var doc=this.bar.el_.ownerDocument;"mousedown"===event.type&&event.preventDefault(),"touchstart"!==event.type||IS_CHROME||event.preventDefault(),blockTextSelection(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(doc,"mousemove",this.handleMouseMove),this.on(doc,"mouseup",this.handleMouseUp),this.on(doc,"touchmove",this.handleMouseMove),this.on(doc,"touchend",this.handleMouseUp),this.handleMouseMove(event)},_proto.handleMouseMove=function(event){},_proto.handleMouseUp=function(){var doc=this.bar.el_.ownerDocument;unblockTextSelection(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(doc,"mousemove",this.handleMouseMove),this.off(doc,"mouseup",this.handleMouseUp),this.off(doc,"touchmove",this.handleMouseMove),this.off(doc,"touchend",this.handleMouseUp),this.update()},_proto.update=function(){var _this2=this;if(this.el_&&this.bar){var progress=this.getProgress();return progress===this.progress_?progress:(this.progress_=progress,this.requestNamedAnimationFrame("Slider#update",function(){var sizeKey=_this2.vertical()?"height":"width";_this2.bar.el().style[sizeKey]=(100*progress).toFixed(2)+"%"}),progress)}},_proto.getProgress=function(){return Number(clamp(this.getPercent(),0,1).toFixed(4))},_proto.calculateDistance=function(event){var position=getPointerPosition(this.el_,event);return this.vertical()?position.y:position.x},_proto.handleKeyDown=function(event){keycode.isEventKey(event,"Left")||keycode.isEventKey(event,"Down")?(event.preventDefault(),event.stopPropagation(),this.stepBack()):keycode.isEventKey(event,"Right")||keycode.isEventKey(event,"Up")?(event.preventDefault(),event.stopPropagation(),this.stepForward()):_Component.prototype.handleKeyDown.call(this,event)},_proto.handleClick=function(event){event.stopPropagation(),event.preventDefault()},_proto.vertical=function(bool){if(void 0===bool)return this.vertical_||!1;this.vertical_=!!bool,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},Slider}(Component);Component.registerComponent("Slider",Slider);var percentify=function(time,end){return clamp(time/end*100,0,100).toFixed(2)+"%"},LoadProgressBar=function(_Component){function LoadProgressBar(player,options){var _this;return(_this=_Component.call(this,player,options)||this).partEls_=[],_this.on(player,"progress",_this.update),_this}_inheritsLoose(LoadProgressBar,_Component);var _proto=LoadProgressBar.prototype;return _proto.createEl=function(){var el=_Component.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),wrapper=createEl("span",{className:"vjs-control-text"}),loadedText=createEl("span",{textContent:this.localize("Loaded")}),separator=document.createTextNode(": ");return this.percentageEl_=createEl("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),el.appendChild(wrapper),wrapper.appendChild(loadedText),wrapper.appendChild(separator),wrapper.appendChild(this.percentageEl_),el},_proto.dispose=function(){this.partEls_=null,this.percentageEl_=null,_Component.prototype.dispose.call(this)},_proto.update=function(event){var _this2=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var liveTracker=_this2.player_.liveTracker,buffered=_this2.player_.buffered(),duration=liveTracker&&liveTracker.isLive()?liveTracker.seekableEnd():_this2.player_.duration(),bufferedEnd=_this2.player_.bufferedEnd(),children=_this2.partEls_,percent=percentify(bufferedEnd,duration);_this2.percent_!==percent&&(_this2.el_.style.width=percent,textContent(_this2.percentageEl_,percent),_this2.percent_=percent);for(var i=0;i<buffered.length;i++){var start=buffered.start(i),end=buffered.end(i),part=children[i];part||(part=_this2.el_.appendChild(createEl()),children[i]=part),part.dataset.start===start&&part.dataset.end===end||(part.dataset.start=start,part.dataset.end=end,part.style.left=percentify(start,bufferedEnd),part.style.width=percentify(end-start,bufferedEnd))}for(var _i=children.length;_i>buffered.length;_i--)_this2.el_.removeChild(children[_i-1]);children.length=buffered.length})},LoadProgressBar}(Component);Component.registerComponent("LoadProgressBar",LoadProgressBar);var TimeTooltip=function(_Component){function TimeTooltip(player,options){var _this;return(_this=_Component.call(this,player,options)||this).update=throttle(bind(_assertThisInitialized(_this),_this.update),UPDATE_REFRESH_INTERVAL),_this}_inheritsLoose(TimeTooltip,_Component);var _proto=TimeTooltip.prototype;return _proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},_proto.update=function(seekBarRect,seekBarPoint,content){var tooltipRect=findPosition(this.el_),playerRect=getBoundingClientRect(this.player_.el()),seekBarPointPx=seekBarRect.width*seekBarPoint;if(playerRect&&tooltipRect){var spaceLeftOfPoint=seekBarRect.left-playerRect.left+seekBarPointPx,spaceRightOfPoint=seekBarRect.width-seekBarPointPx+(playerRect.right-seekBarRect.right),pullTooltipBy=tooltipRect.width/2;spaceLeftOfPoint<pullTooltipBy?pullTooltipBy+=pullTooltipBy-spaceLeftOfPoint:spaceRightOfPoint<pullTooltipBy&&(pullTooltipBy=spaceRightOfPoint),pullTooltipBy<0?pullTooltipBy=0:pullTooltipBy>tooltipRect.width&&(pullTooltipBy=tooltipRect.width),this.el_.style.right="-"+pullTooltipBy+"px",this.write(content)}},_proto.write=function(content){textContent(this.el_,content)},_proto.updateTime=function(seekBarRect,seekBarPoint,time,cb){var _this2=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var content,duration=_this2.player_.duration();if(_this2.player_.liveTracker&&_this2.player_.liveTracker.isLive()){var liveWindow=_this2.player_.liveTracker.liveWindow(),secondsBehind=liveWindow-seekBarPoint*liveWindow;content=(secondsBehind<1?"":"-")+formatTime(secondsBehind,liveWindow)}else content=formatTime(time,duration);_this2.update(seekBarRect,seekBarPoint,content),cb&&cb()})},TimeTooltip}(Component);Component.registerComponent("TimeTooltip",TimeTooltip);var PlayProgressBar=function(_Component){function PlayProgressBar(player,options){var _this;return(_this=_Component.call(this,player,options)||this).update=throttle(bind(_assertThisInitialized(_this),_this.update),UPDATE_REFRESH_INTERVAL),_this}_inheritsLoose(PlayProgressBar,_Component);var _proto=PlayProgressBar.prototype;return _proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},_proto.update=function(seekBarRect,seekBarPoint){var timeTooltip=this.getChild("timeTooltip");if(timeTooltip){var time=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();timeTooltip.updateTime(seekBarRect,seekBarPoint,time)}},PlayProgressBar}(Component);PlayProgressBar.prototype.options_={children:[]},IS_IOS||IS_ANDROID||PlayProgressBar.prototype.options_.children.push("timeTooltip"),Component.registerComponent("PlayProgressBar",PlayProgressBar);var MouseTimeDisplay=function(_Component){function MouseTimeDisplay(player,options){var _this;return(_this=_Component.call(this,player,options)||this).update=throttle(bind(_assertThisInitialized(_this),_this.update),UPDATE_REFRESH_INTERVAL),_this}_inheritsLoose(MouseTimeDisplay,_Component);var _proto=MouseTimeDisplay.prototype;return _proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},_proto.update=function(seekBarRect,seekBarPoint){var _this2=this,time=seekBarPoint*this.player_.duration();this.getChild("timeTooltip").updateTime(seekBarRect,seekBarPoint,time,function(){_this2.el_.style.left=seekBarRect.width*seekBarPoint+"px"})},MouseTimeDisplay}(Component);MouseTimeDisplay.prototype.options_={children:["timeTooltip"]},Component.registerComponent("MouseTimeDisplay",MouseTimeDisplay);var SeekBar=function(_Slider){function SeekBar(player,options){var _this;return(_this=_Slider.call(this,player,options)||this).setEventHandlers_(),_this}_inheritsLoose(SeekBar,_Slider);var _proto=SeekBar.prototype;return _proto.setEventHandlers_=function(){this.update_=bind(this,this.update),this.update=throttle(this.update_,UPDATE_REFRESH_INTERVAL),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in document&&"visibilityState"in document&&this.on(document,"visibilitychange",this.toggleVisibility_)},_proto.toggleVisibility_=function(e){document.hidden?this.disableInterval_(e):(this.enableInterval_(),this.update())},_proto.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,UPDATE_REFRESH_INTERVAL))},_proto.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},_proto.createEl=function(){return _Slider.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},_proto.update=function(event){var _this2=this,percent=_Slider.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var currentTime=_this2.player_.ended()?_this2.player_.duration():_this2.getCurrentTime_(),liveTracker=_this2.player_.liveTracker,duration=_this2.player_.duration();liveTracker&&liveTracker.isLive()&&(duration=_this2.player_.liveTracker.liveCurrentTime()),_this2.percent_!==percent&&(_this2.el_.setAttribute("aria-valuenow",(100*percent).toFixed(2)),_this2.percent_=percent),_this2.currentTime_===currentTime&&_this2.duration_===duration||(_this2.el_.setAttribute("aria-valuetext",_this2.localize("progress bar timing: currentTime={1} duration={2}",[formatTime(currentTime,duration),formatTime(duration,duration)],"{1} of {2}")),_this2.currentTime_=currentTime,_this2.duration_=duration),_this2.bar&&_this2.bar.update(getBoundingClientRect(_this2.el()),_this2.getProgress())}),percent},_proto.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},_proto.getPercent=function(){var percent,currentTime=this.getCurrentTime_(),liveTracker=this.player_.liveTracker;return liveTracker&&liveTracker.isLive()?(percent=(currentTime-liveTracker.seekableStart())/liveTracker.liveWindow(),liveTracker.atLiveEdge()&&(percent=1)):percent=currentTime/this.player_.duration(),percent},_proto.handleMouseDown=function(event){isSingleLeftClick(event)&&(event.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),_Slider.prototype.handleMouseDown.call(this,event))},_proto.handleMouseMove=function(event){if(isSingleLeftClick(event)){var newTime,distance=this.calculateDistance(event),liveTracker=this.player_.liveTracker;if(liveTracker&&liveTracker.isLive()){if(distance>=.99)return void liveTracker.seekToLiveEdge();var seekableStart=liveTracker.seekableStart(),seekableEnd=liveTracker.liveCurrentTime();if((newTime=seekableStart+distance*liveTracker.liveWindow())>=seekableEnd&&(newTime=seekableEnd),newTime<=seekableStart&&(newTime=seekableStart+.1),newTime===1/0)return}else(newTime=distance*this.player_.duration())===this.player_.duration()&&(newTime-=.1);this.player_.currentTime(newTime)}},_proto.enable=function(){_Slider.prototype.enable.call(this);var mouseTimeDisplay=this.getChild("mouseTimeDisplay");mouseTimeDisplay&&mouseTimeDisplay.show()},_proto.disable=function(){_Slider.prototype.disable.call(this);var mouseTimeDisplay=this.getChild("mouseTimeDisplay");mouseTimeDisplay&&mouseTimeDisplay.hide()},_proto.handleMouseUp=function(event){_Slider.prototype.handleMouseUp.call(this,event),event&&event.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?silencePromise(this.player_.play()):this.update_()},_proto.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},_proto.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},_proto.handleAction=function(event){this.player_.paused()?this.player_.play():this.player_.pause()},_proto.handleKeyDown=function(event){if(keycode.isEventKey(event,"Space")||keycode.isEventKey(event,"Enter"))event.preventDefault(),event.stopPropagation(),this.handleAction(event);else if(keycode.isEventKey(event,"Home"))event.preventDefault(),event.stopPropagation(),this.player_.currentTime(0);else if(keycode.isEventKey(event,"End"))event.preventDefault(),event.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(keycode(event))){event.preventDefault(),event.stopPropagation();var gotoFraction=10*(keycode.codes[keycode(event)]-keycode.codes[0])/100;this.player_.currentTime(this.player_.duration()*gotoFraction)}else keycode.isEventKey(event,"PgDn")?(event.preventDefault(),event.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):keycode.isEventKey(event,"PgUp")?(event.preventDefault(),event.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):_Slider.prototype.handleKeyDown.call(this,event)},_proto.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in document&&"visibilityState"in document&&this.off(document,"visibilitychange",this.toggleVisibility_),_Slider.prototype.dispose.call(this)},SeekBar}(Slider);SeekBar.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},IS_IOS||IS_ANDROID||SeekBar.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Component.registerComponent("SeekBar",SeekBar);
vendor: 1,314 bytes, line 1
1var ProgressControl=function(_Component){function ProgressControl(player,options){var _this;return(_this=_Component.call(this,player,options)||this).handleMouseMove=throttle(bind(_assertThisInitialized(_this),_this.handleMouseMove),UPDATE_REFRESH_INTERVAL),_this.throttledHandleMouseSeek=throttle(bind(_assertThisInitialized(_this),_this.handleMouseSeek),UPDATE_REFRESH_INTERVAL),_this.enable(),_this}_inheritsLoose(ProgressControl,_Component);var _proto=ProgressControl.prototype;return _proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},_proto.handleMouseMove=function(event){var seekBar=this.getChild("seekBar");if(seekBar){var playProgressBar=seekBar.getChild("playProgressBar"),mouseTimeDisplay=seekBar.getChild("mouseTimeDisplay");if(playProgressBar||mouseTimeDisplay){var seekBarEl=seekBar.el(),seekBarRect=findPosition(seekBarEl),seekBarPoint=getPointerPosition(seekBarEl,event).x;seekBarPoint=clamp(seekBarPoint,0,1),mouseTimeDisplay&&mouseTimeDisplay.update(seekBarRect,seekBarPoint),playProgressBar&&playProgressBar.update(seekBarRect,seekBar.getProgress())}}},_proto.handleMouseSeek=function(event){var seekBar=this.getChild("seekBar");seekBar&&seekBar.handleMouseMove(event)},_proto.enabled=function(){return this.enabled_}
vendor: 16,787 bytes, line 1
1,_proto.disable=function(){this.children().forEach(function(child){return child.disable&&child.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},_proto.enable=function(){this.children().forEach(function(child){return child.enable&&child.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},_proto.handleMouseDown=function(event){var doc=this.el_.ownerDocument,seekBar=this.getChild("seekBar");seekBar&&seekBar.handleMouseDown(event),this.on(doc,"mousemove",this.throttledHandleMouseSeek),this.on(doc,"touchmove",this.throttledHandleMouseSeek),this.on(doc,"mouseup",this.handleMouseUp),this.on(doc,"touchend",this.handleMouseUp)},_proto.handleMouseUp=function(event){var doc=this.el_.ownerDocument,seekBar=this.getChild("seekBar");seekBar&&seekBar.handleMouseUp(event),this.off(doc,"mousemove",this.throttledHandleMouseSeek),this.off(doc,"touchmove",this.throttledHandleMouseSeek),this.off(doc,"mouseup",this.handleMouseUp),this.off(doc,"touchend",this.handleMouseUp)},ProgressControl}(Component);ProgressControl.prototype.options_={children:["seekBar"]},Component.registerComponent("ProgressControl",ProgressControl);var PictureInPictureToggle=function(_Button){function PictureInPictureToggle(player,options){var _this;return(_this=_Button.call(this,player,options)||this).on(player,["enterpictureinpicture","leavepictureinpicture"],_this.handlePictureInPictureChange),_this.on(player,["disablepictureinpicturechanged","loadedmetadata"],_this.handlePictureInPictureEnabledChange),_this.disable(),_this}_inheritsLoose(PictureInPictureToggle,_Button);var _proto=PictureInPictureToggle.prototype;return _proto.buildCSSClass=function(){return"vjs-picture-in-picture-control "+_Button.prototype.buildCSSClass.call(this)},_proto.handlePictureInPictureEnabledChange=function(){document.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},_proto.handlePictureInPictureChange=function(event){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},_proto.handleClick=function(event){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},PictureInPictureToggle}(Button);PictureInPictureToggle.prototype.controlText_="Picture-in-Picture",Component.registerComponent("PictureInPictureToggle",PictureInPictureToggle);var FullscreenToggle=function(_Button){function FullscreenToggle(player,options){var _this;return(_this=_Button.call(this,player,options)||this).on(player,"fullscreenchange",_this.handleFullscreenChange),!1===document[player.fsApi_.fullscreenEnabled]&&_this.disable(),_this}_inheritsLoose(FullscreenToggle,_Button);var _proto=FullscreenToggle.prototype;return _proto.buildCSSClass=function(){return"vjs-fullscreen-control "+_Button.prototype.buildCSSClass.call(this)},_proto.handleFullscreenChange=function(event){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},_proto.handleClick=function(event){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},FullscreenToggle}(Button);FullscreenToggle.prototype.controlText_="Fullscreen",Component.registerComponent("FullscreenToggle",FullscreenToggle);var checkVolumeSupport=function(self,player){player.tech_&&!player.tech_.featuresVolumeControl&&self.addClass("vjs-hidden"),self.on(player,"loadstart",function(){player.tech_.featuresVolumeControl?self.removeClass("vjs-hidden"):self.addClass("vjs-hidden")})},VolumeLevel=function(_Component){function VolumeLevel(){return _Component.apply(this,arguments)||this}return _inheritsLoose(VolumeLevel,_Component),VolumeLevel.prototype.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},VolumeLevel}(Component);Component.registerComponent("VolumeLevel",VolumeLevel);var VolumeBar=function(_Slider){function VolumeBar(player,options){var _this;return(_this=_Slider.call(this,player,options)||this).on("slideractive",_this.updateLastVolume_),_this.on(player,"volumechange",_this.updateARIAAttributes),player.ready(function(){return _this.updateARIAAttributes()}),_this}_inheritsLoose(VolumeBar,_Slider);var _proto=VolumeBar.prototype;return _proto.createEl=function(){return _Slider.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},_proto.handleMouseDown=function(event){isSingleLeftClick(event)&&_Slider.prototype.handleMouseDown.call(this,event)},_proto.handleMouseMove=function(event){isSingleLeftClick(event)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(event)))},_proto.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},_proto.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},_proto.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},_proto.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},_proto.updateARIAAttributes=function(event){var ariaValue=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",ariaValue),this.el_.setAttribute("aria-valuetext",ariaValue+"%")},_proto.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},_proto.updateLastVolume_=function(){var _this2=this,volumeBeforeDrag=this.player_.volume();this.one("sliderinactive",function(){0===_this2.player_.volume()&&_this2.player_.lastVolume_(volumeBeforeDrag)})},VolumeBar}(Slider);VolumeBar.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},VolumeBar.prototype.playerEvent="volumechange",Component.registerComponent("VolumeBar",VolumeBar);var VolumeControl=function(_Component){function VolumeControl(player,options){var _this;return void 0===options&&(options={}),options.vertical=options.vertical||!1,(void 0===options.volumeBar||isPlain(options.volumeBar))&&(options.volumeBar=options.volumeBar||{},options.volumeBar.vertical=options.vertical),_this=_Component.call(this,player,options)||this,checkVolumeSupport(_assertThisInitialized(_this),player),_this.throttledHandleMouseMove=throttle(bind(_assertThisInitialized(_this),_this.handleMouseMove),UPDATE_REFRESH_INTERVAL),_this.on("mousedown",_this.handleMouseDown),_this.on("touchstart",_this.handleMouseDown),_this.on(_this.volumeBar,["focus","slideractive"],function(){_this.volumeBar.addClass("vjs-slider-active"),_this.addClass("vjs-slider-active"),_this.trigger("slideractive")}),_this.on(_this.volumeBar,["blur","sliderinactive"],function(){_this.volumeBar.removeClass("vjs-slider-active"),_this.removeClass("vjs-slider-active"),_this.trigger("sliderinactive")}),_this}_inheritsLoose(VolumeControl,_Component);var _proto=VolumeControl.prototype;return _proto.createEl=function(){var orientationClass="vjs-volume-horizontal";return this.options_.vertical&&(orientationClass="vjs-volume-vertical"),_Component.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+orientationClass})},_proto.handleMouseDown=function(event){var doc=this.el_.ownerDocument;this.on(doc,"mousemove",this.throttledHandleMouseMove),this.on(doc,"touchmove",this.throttledHandleMouseMove),this.on(doc,"mouseup",this.handleMouseUp),this.on(doc,"touchend",this.handleMouseUp)},_proto.handleMouseUp=function(event){var doc=this.el_.ownerDocument;this.off(doc,"mousemove",this.throttledHandleMouseMove),this.off(doc,"touchmove",this.throttledHandleMouseMove),this.off(doc,"mouseup",this.handleMouseUp),this.off(doc,"touchend",this.handleMouseUp)},_proto.handleMouseMove=function(event){this.volumeBar.handleMouseMove(event)},VolumeControl}(Component);VolumeControl.prototype.options_={children:["volumeBar"]},Component.registerComponent("VolumeControl",VolumeControl);var checkMuteSupport=function(self,player){player.tech_&&!player.tech_.featuresMuteControl&&self.addClass("vjs-hidden"),self.on(player,"loadstart",function(){player.tech_.featuresMuteControl?self.removeClass("vjs-hidden"):self.addClass("vjs-hidden")})},MuteToggle=function(_Button){function MuteToggle(player,options){var _this;return _this=_Button.call(this,player,options)||this,checkMuteSupport(_assertThisInitialized(_this),player),_this.on(player,["loadstart","volumechange"],_this.update),_this}_inheritsLoose(MuteToggle,_Button);var _proto=MuteToggle.prototype;return _proto.buildCSSClass=function(){return"vjs-mute-control "+_Button.prototype.buildCSSClass.call(this)},_proto.handleClick=function(event){var vol=this.player_.volume(),lastVolume=this.player_.lastVolume_();if(0===vol){var volumeToSet=lastVolume<.1?.1:lastVolume;this.player_.volume(volumeToSet),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},_proto.update=function(event){this.updateIcon_(),this.updateControlText_()},_proto.updateIcon_=function(){var vol=this.player_.volume(),level=3;IS_IOS&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===vol||this.player_.muted()?level=0:vol<.33?level=1:vol<.67&&(level=2);for(var i=0;i<4;i++)removeClass(this.el_,"vjs-vol-"+i);addClass(this.el_,"vjs-vol-"+level)},_proto.updateControlText_=function(){var text=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==text&&this.controlText(text)},MuteToggle}(Button);MuteToggle.prototype.controlText_="Mute",Component.registerComponent("MuteToggle",MuteToggle);var VolumePanel=function(_Component){function VolumePanel(player,options){var _this;return void 0===options&&(options={}),void 0!==options.inline?options.inline=options.inline:options.inline=!0,(void 0===options.volumeControl||isPlain(options.volumeControl))&&(options.volumeControl=options.volumeControl||{},options.volumeControl.vertical=!options.inline),(_this=_Component.call(this,player,options)||this).on(player,["loadstart"],_this.volumePanelState_),_this.on(_this.muteToggle,"keyup",_this.handleKeyPress),_this.on(_this.volumeControl,"keyup",_this.handleVolumeControlKeyUp),_this.on("keydown",_this.handleKeyPress),_this.on("mouseover",_this.handleMouseOver),_this.on("mouseout",_this.handleMouseOut),_this.on(_this.volumeControl,["slideractive"],_this.sliderActive_),_this.on(_this.volumeControl,["sliderinactive"],_this.sliderInactive_),_this}_inheritsLoose(VolumePanel,_Component);var _proto=VolumePanel.prototype;return _proto.sliderActive_=function(){this.addClass("vjs-slider-active")},_proto.sliderInactive_=function(){this.removeClass("vjs-slider-active")},_proto.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},_proto.createEl=function(){var orientationClass="vjs-volume-panel-horizontal";return this.options_.inline||(orientationClass="vjs-volume-panel-vertical"),_Component.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+orientationClass})},_proto.dispose=function(){this.handleMouseOut(),_Component.prototype.dispose.call(this)},_proto.handleVolumeControlKeyUp=function(event){keycode.isEventKey(event,"Esc")&&this.muteToggle.focus()},_proto.handleMouseOver=function(event){this.addClass("vjs-hover"),on(document,"keyup",bind(this,this.handleKeyPress))},_proto.handleMouseOut=function(event){this.removeClass("vjs-hover"),off(document,"keyup",bind(this,this.handleKeyPress))},_proto.handleKeyPress=function(event){keycode.isEventKey(event,"Esc")&&this.handleMouseOut()},VolumePanel}(Component);VolumePanel.prototype.options_={children:["muteToggle","volumeControl"]},Component.registerComponent("VolumePanel",VolumePanel);var Menu=function(_Component){function Menu(player,options){var _this;return _this=_Component.call(this,player,options)||this,options&&(_this.menuButton_=options.menuButton),_this.focusedChild_=-1,_this.on("keydown",_this.handleKeyDown),_this.boundHandleBlur_=bind(_assertThisInitialized(_this),_this.handleBlur),_this.boundHandleTapClick_=bind(_assertThisInitialized(_this),_this.handleTapClick),_this}_inheritsLoose(Menu,_Component);var _proto=Menu.prototype;return _proto.addEventListenerForItem=function(component){component instanceof Component&&(this.on(component,"blur",this.boundHandleBlur_),this.on(component,["tap","click"],this.boundHandleTapClick_))},_proto.removeEventListenerForItem=function(component){component instanceof Component&&(this.off(component,"blur",this.boundHandleBlur_),this.off(component,["tap","click"],this.boundHandleTapClick_))},_proto.removeChild=function(component){"string"==typeof component&&(component=this.getChild(component)),this.removeEventListenerForItem(component),_Component.prototype.removeChild.call(this,component)},_proto.addItem=function(component){var childComponent=this.addChild(component);childComponent&&this.addEventListenerForItem(childComponent)},_proto.createEl=function(){var contentElType=this.options_.contentElType||"ul";this.contentEl_=createEl(contentElType,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var el=_Component.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return el.appendChild(this.contentEl_),on(el,"click",function(event){event.preventDefault(),event.stopImmediatePropagation()}),el},_proto.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,_Component.prototype.dispose.call(this)},_proto.handleBlur=function(event){var relatedTarget=event.relatedTarget||document.activeElement;if(!this.children().some(function(element){return element.el()===relatedTarget})){var btn=this.menuButton_;btn&&btn.buttonPressed_&&relatedTarget!==btn.el().firstChild&&btn.unpressButton()}},_proto.handleTapClick=function(event){if(this.menuButton_){this.menuButton_.unpressButton();var childComponents=this.children();if(!Array.isArray(childComponents))return;var foundComponent=childComponents.filter(function(component){return component.el()===event.target})[0];if(!foundComponent)return;"CaptionSettingsMenuItem"!==foundComponent.name()&&this.menuButton_.focus()}},_proto.handleKeyDown=function(event){keycode.isEventKey(event,"Left")||keycode.isEventKey(event,"Down")?(event.preventDefault(),event.stopPropagation(),this.stepForward()):(keycode.isEventKey(event,"Right")||keycode.isEventKey(event,"Up"))&&(event.preventDefault(),event.stopPropagation(),this.stepBack())},_proto.stepForward=function(){var stepChild=0;void 0!==this.focusedChild_&&(stepChild=this.focusedChild_+1),this.focus(stepChild)},_proto.stepBack=function(){var stepChild=0;void 0!==this.focusedChild_&&(stepChild=this.focusedChild_-1),this.focus(stepChild)},_proto.focus=function(item){void 0===item&&(item=0);var children=this.children().slice();children.length&&children[0].className&&/vjs-menu-title/.test(children[0].className)&&children.shift(),children.length>0&&(item<0?item=0:item>=children.length&&(item=children.length-1),this.focusedChild_=item,children[item].el_.focus())},Menu}(Component);Component.registerComponent("Menu",Menu);var MenuButton=function(_Component){function MenuButton(player,options){var _this;void 0===options&&(options={}),(_this=_Component.call(this,player,options)||this).menuButton_=new Button(player,options),_this.menuButton_.controlText(_this.controlText_),_this.menuButton_.el_.setAttribute("aria-haspopup","true");var buttonClass=Button.prototype.buildCSSClass();return _this.menuButton_.el_.className=_this.buildCSSClass()+" "+buttonClass,_this.menuButton_.removeClass("vjs-control"),_this.addChild(_this.menuButton_),_this.update(),_this.enabled_=!0,_this.on(_this.menuButton_,"tap",_this.handleClick),_this.on(_this.menuButton_,"click",_this.handleClick),_this.on(_this.menuButton_,"keydown",_this.handleKeyDown),_this.on(_this.menuButton_,"mouseenter",function(){_this.addClass("vjs-hover"),_this.menu.show(),on(document,"keyup",bind(_assertThisInitialized(_this),_this.handleMenuKeyUp))}),_this.on("mouseleave",_this.handleMouseLeave),_this.on("keydown",_this.handleSubmenuKeyDown),_this}_inheritsLoose(MenuButton,_Component);var _proto=MenuButton.prototype;return _proto.update=function(){var menu=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=menu,this.addChild(menu),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","fal
1se"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},_proto.createMenu=function(){var menu=new Menu(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var titleEl=createEl("li",{className:"vjs-menu-title",innerHTML:toTitleCase(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var titleComponent=new Component(this.player_,{el:titleEl});menu.addItem(titleComponent)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)menu.addItem(this.items[i]);return menu},_proto.createItems=function(){},_proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},_proto.buildWrapperCSSClass=function(){var menuButtonClass="vjs-menu-button";return!0===this.options_.inline?menuButtonClass+="-inline":menuButtonClass+="-popup","vjs-menu-button "+menuButtonClass+" "+Button.prototype.buildCSSClass()+" "+_Component.prototype.buildCSSClass.call(this)},_proto.buildCSSClass=function(){var menuButtonClass="vjs-menu-button";return!0===this.options_.inline?menuButtonClass+="-inline":menuButtonClass+="-popup","vjs-menu-button "+menuButtonClass+" "+_Component.prototype.buildCSSClass.call(this)},_proto.controlText=function(text,el){return void 0===el&&(el=this.menuButton_.el()),this.menuButton_.controlText(text,el)},_proto.dispose=function(){this.handleMouseLeave(),_Component.prototype.dispose.call(this)},_proto.handleClick=function(event){this.buttonPressed_?this.unpressButton():this.pressButton()},_proto.handleMouseLeave=function(event){this.removeClass("vjs-hover"),off(document,"keyup",bind(this,this.handleMenuKeyUp))},_proto.focus=function(){this.menuButton_.focus()},_proto.blur=function(){this.menuButton_.blur()},_proto.handleKeyDown=function(event){keycode.isEventKey(event,"Esc")||keycode.isEventKey(event,"Tab")?(this.buttonPressed_&&this.unpressButton(),keycode.isEventKey(event,"Tab")||(event.preventDefault(),this.menuButton_.focus())):(keycode.isEventKey(event,"Up")||keycode.isEventKey(event,"Down"))&&(this.buttonPressed_||(event.preventDefault(),this.pressButton()))},_proto.handleMenuKeyUp=function(event){(keycode.isEventKey(event,"Esc")||keycode.isEventKey(event,"Tab"))&&this.removeClass("vjs-hover")},_proto.handleSubmenuKeyPress=function(event){this.handleSubmenuKeyDown(event)},_proto.handleSubmenuKeyDown=function(event){(keycode.isEventKey(event,"Esc")||keycode.isEventKey(event,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),keycode.isEventKey(event,"Tab")||(event.preventDefault(),this.menuButton_.focus()))},_proto.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),IS_IOS&&isInFrame())return;this.menu.focus()}},_proto.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},_proto.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},_proto.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},MenuButton}(Component);Component.registerComponent("MenuButton",MenuButton);var TrackButton=function(_MenuButton){function TrackButton(player,options){var _this,tracks=options.tracks;if((_this=_MenuButton.call(this,player,options)||this).items.length<=1&&_this.hide(),!tracks)return _assertThisInitialized(_this);var updateHandler=bind(_assertThisInitialized(_this),_this.update);return tracks.addEventListener("removetrack",updateHandler),tracks.addEventListener("addtrack",updateHandler),_this.player_.on("ready",updateHandler),_this.player_.on("dispose",function(){tracks.removeEventListener("removetrack",updateHandler),tracks.removeEventListener("addtrack",updateHandler)}),_this}return _inheritsLoose(TrackButton,_MenuButton),TrackButton}(MenuButton);Component.registerComponent("TrackButton",TrackButton);var MenuKeys=["Tab","Esc","Up","Down","Right","Left"],MenuItem=function(_ClickableComponent){function MenuItem(player,options){var _this;return(_this=_ClickableComponent.call(this,player,options)||this).selectable=options.selectable,_this.isSelected_=options.selected||!1,_this.multiSelectable=options.multiSelectable,_this.selected(_this.isSelected_),_this.selectable?_this.multiSelectable?_this.el_.setAttribute("role","menuitemcheckbox"):_this.el_.setAttribute("role","menuitemradio"):_this.el_.setAttribute("role","menuitem"),_this}_inheritsLoose(MenuItem,_ClickableComponent);var _proto=MenuItem.prototype;return _proto.createEl=function(type,props,attrs){return this.nonIconControl
vendor: 5,900 bytes, line 1
1=!0,_ClickableComponent.prototype.createEl.call(this,"li",assign({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},props),attrs)},_proto.handleKeyDown=function(event){MenuKeys.some(function(key){return keycode.isEventKey(event,key)})||_ClickableComponent.prototype.handleKeyDown.call(this,event)},_proto.handleClick=function(event){this.selected(!0)},_proto.selected=function(_selected){this.selectable&&(_selected?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},MenuItem}(ClickableComponent);Component.registerComponent("MenuItem",MenuItem);var TextTrackMenuItem=function(_MenuItem){function TextTrackMenuItem(player,options){var _this,track=options.track,tracks=player.textTracks();options.label=track.label||track.language||"Unknown",options.selected="showing"===track.mode,(_this=_MenuItem.call(this,player,options)||this).track=track,_this.kinds=(options.kinds||[options.kind||_this.track.kind]).filter(Boolean);var event,changeHandler=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];_this.handleTracksChange.apply(_assertThisInitialized(_this),args)},selectedLanguageChangeHandler=function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];_this.handleSelectedLanguageChange.apply(_assertThisInitialized(_this),args)};(player.on(["loadstart","texttrackchange"],changeHandler),tracks.addEventListener("change",changeHandler),tracks.addEventListener("selectedlanguagechange",selectedLanguageChangeHandler),_this.on("dispose",function(){player.off(["loadstart","texttrackchange"],changeHandler),tracks.removeEventListener("change",changeHandler),tracks.removeEventListener("selectedlanguagechange",selectedLanguageChangeHandler)}),void 0===tracks.onchange)&&_this.on(["tap","click"],function(){if("object"!=typeof window$1.Event)try{event=new window$1.Event("change")}catch(err){}event||(event=document.createEvent("Event")).initEvent("change",!0,!0),tracks.dispatchEvent(event)});return _this.handleTracksChange(),_this}_inheritsLoose(TextTrackMenuItem,_MenuItem);var _proto=TextTrackMenuItem.prototype;return _proto.handleClick=function(event){var referenceTrack=this.track,tracks=this.player_.textTracks();if(_MenuItem.prototype.handleClick.call(this,event),tracks)for(var i=0;i<tracks.length;i++){var track=tracks[i];-1!==this.kinds.indexOf(track.kind)&&(track===referenceTrack?"showing"!==track.mode&&(track.mode="showing"):"disabled"!==track.mode&&(track.mode="disabled"))}},_proto.handleTracksChange=function(event){var shouldBeSelected="showing"===this.track.mode;shouldBeSelected!==this.isSelected_&&this.selected(shouldBeSelected)},_proto.handleSelectedLanguageChange=function(event){if("showing"===this.track.mode){var selectedLanguage=this.player_.cache_.selectedLanguage;if(selectedLanguage&&selectedLanguage.enabled&&selectedLanguage.language===this.track.language&&selectedLanguage.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},_proto.dispose=function(){this.track=null,_MenuItem.prototype.dispose.call(this)},TextTrackMenuItem}(MenuItem);Component.registerComponent("TextTrackMenuItem",TextTrackMenuItem);var OffTextTrackMenuItem=function(_TextTrackMenuItem){function OffTextTrackMenuItem(player,options){return options.track={player:player,kind:options.kind,kinds:options.kinds,default:!1,mode:"disabled"},options.kinds||(options.kinds=[options.kind]),options.label?options.track.label=options.label:options.track.label=options.kinds.join(" and ")+" off",options.selectable=!0,options.multiSelectable=!1,_TextTrackMenuItem.call(this,player,options)||this}_inheritsLoose(OffTextTrackMenuItem,_TextTrackMenuItem);var _proto=OffTextTrackMenuItem.prototype;return _proto.handleTracksChange=function(event){for(var tracks=this.player().textTracks(),shouldBeSelected=!0,i=0,l=tracks.length;i<l;i++){var track=tracks[i];if(this.options_.kinds.indexOf(track.kind)>-1&&"showing"===track.mode){shouldBeSelected=!1;break}}shouldBeSelected!==this.isSelected_&&this.selected(shouldBeSelected)},_proto.handleSelectedLanguageChange=function(event){for(var tracks=this.player().textTracks(),allHidden=!0,i=0,l=tracks.length;i<l;i++){var track=tracks[i];if(["captions","descriptions","subtitles"].indexOf(track.kind)>-1&&"showing"===track.mode){allHidden=!1;break}}allHidden&&(this.player_.cache_.selectedLanguage={enabled:!1})},OffTextTrackMenuItem}(TextTrackMenuItem);Component.registerComponent("OffTextTrackMenuItem",OffTextTrackMenuItem);var TextTrackButton=function(_TrackButton){function TextTrackButton(player,options){return void 0===options&&(options={}),options.tracks=player.textTracks(),_TrackButton.call(this,player,options)||this}return _inheritsLoose(TextTrackButton,_TrackButton),TextTrackButton.prototype.createItems=function(items,TrackMenuItem){var label;void 0===items&&(items=[]),void 0===TrackMenuItem&&(TrackMenuItem=TextTrackMenuItem),this.label_&&(label=this.label_+" off"),items.push(new OffTextTrackMenuItem(this.player_,{kinds:this.kinds_,kind:this.kind_,label:label})),this.hideThreshold_+=1;var tracks=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<tracks.length;i++){var track=tracks[i];if(this.kinds_.indexOf(track.kind)>-1){var item=new TrackMenuItem(this.player_,{track:track,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});item.addClass("vjs-"+track.kind+"-menu-item"),items.push(item)}}return items},TextTrackButton}(TrackButton);Component.registerComponent("TextTrackButton",TextTrackButton);
vendor: 21,780 bytes, line 1
1var ChaptersTrackMenuItem=function(_MenuItem){function ChaptersTrackMenuItem(player,options){var _this,track=options.track,cue=options.cue,currentTime=player.currentTime();return options.selectable=!0,options.multiSelectable=!1,options.label=cue.text,options.selected=cue.startTime<=currentTime&¤tTime<cue.endTime,(_this=_MenuItem.call(this,player,options)||this).track=track,_this.cue=cue,track.addEventListener("cuechange",bind(_assertThisInitialized(_this),_this.update)),_this}_inheritsLoose(ChaptersTrackMenuItem,_MenuItem);var _proto=ChaptersTrackMenuItem.prototype;return _proto.handleClick=function(event){_MenuItem.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},_proto.update=function(event){var cue=this.cue,currentTime=this.player_.currentTime();this.selected(cue.startTime<=currentTime&¤tTime<cue.endTime)},ChaptersTrackMenuItem}(MenuItem);Component.registerComponent("ChaptersTrackMenuItem",ChaptersTrackMenuItem);var ChaptersButton=function(_TextTrackButton){function ChaptersButton(player,options,ready){return _TextTrackButton.call(this,player,options,ready)||this}_inheritsLoose(ChaptersButton,_TextTrackButton);var _proto=ChaptersButton.prototype;return _proto.buildCSSClass=function(){return"vjs-chapters-button "+_TextTrackButton.prototype.buildCSSClass.call(this)},_proto.buildWrapperCSSClass=function(){return"vjs-chapters-button "+_TextTrackButton.prototype.buildWrapperCSSClass.call(this)},_proto.update=function(event){this.track_&&(!event||"addtrack"!==event.type&&"removetrack"!==event.type)||this.setTrack(this.findChaptersTrack()),_TextTrackButton.prototype.update.call(this)},_proto.setTrack=function(track){if(this.track_!==track){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var remoteTextTrackEl=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);remoteTextTrackEl&&remoteTextTrackEl.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=track,this.track_){this.track_.mode="hidden";var _remoteTextTrackEl=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);_remoteTextTrackEl&&_remoteTextTrackEl.addEventListener("load",this.updateHandler_)}}},_proto.findChaptersTrack=function(){for(var tracks=this.player_.textTracks()||[],i=tracks.length-1;i>=0;i--){var track=tracks[i];if(track.kind===this.kind_)return track}},_proto.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(toTitleCase(this.kind_))},_proto.createMenu=function(){return this.options_.title=this.getMenuCaption(),_TextTrackButton.prototype.createMenu.call(this)},_proto.createItems=function(){var items=[];if(!this.track_)return items;var cues=this.track_.cues;if(!cues)return items;for(var i=0,l=cues.length;i<l;i++){var cue=cues[i],mi=new ChaptersTrackMenuItem(this.player_,{track:this.track_,cue:cue});items.push(mi)}return items},ChaptersButton}(TextTrackButton);ChaptersButton.prototype.kind_="chapters",ChaptersButton.prototype.controlText_="Chapters",Component.registerComponent("ChaptersButton",ChaptersButton);var DescriptionsButton=function(_TextTrackButton){function DescriptionsButton(player,options,ready){var _this;_this=_TextTrackButton.call(this,player,options,ready)||this;var tracks=player.textTracks(),changeHandler=bind(_assertThisInitialized(_this),_this.handleTracksChange);return tracks.addEventListener("change",changeHandler),_this.on("dispose",function(){tracks.removeEventListener("change",changeHandler)}),_this}_inheritsLoose(DescriptionsButton,_TextTrackButton);var _proto=DescriptionsButton.prototype;return _proto.handleTracksChange=function(event){for(var tracks=this.player().textTracks(),disabled=!1,i=0,l=tracks.length;i<l;i++){var track=tracks[i];if(track.kind!==this.kind_&&"showing"===track.mode){disabled=!0;break}}disabled?this.disable():this.enable()},_proto.buildCSSClass=function(){return"vjs-descriptions-button "+_TextTrackButton.prototype.buildCSSClass.call(this)},_proto.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+_TextTrackButton.prototype.buildWrapperCSSClass.call(this)},DescriptionsButton}(TextTrackButton);DescriptionsButton.prototype.kind_="descriptions",DescriptionsButton.prototype.controlText_="Descriptions",Component.registerComponent("DescriptionsButton",DescriptionsButton);var SubtitlesButton=function(_TextTrackButton){function SubtitlesButton(player,options,ready){return _TextTrackButton.call(this,player,options,ready)||this}_inheritsLoose(SubtitlesButton,_TextTrackButton);var _proto=SubtitlesButton.prototype;return _proto.buildCSSClass=function(){return"vjs-subtitles-button "+_TextTrackButton.prototype.buildCSSClass.call(this)},_proto.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+_TextTrackButton.prototype.buildWrapperCSSClass.call(this)},SubtitlesButton}(TextTrackButton);SubtitlesButton.prototype.kind_="subtitles",SubtitlesButton.prototype.controlText_="Subtitles",Component.registerComponent("SubtitlesButton",SubtitlesButton);var CaptionSettingsMenuItem=function(_TextTrackMenuItem){function CaptionSettingsMenuItem(player,options){var _this;return options.track={player:player,kind:options.kind,label:options.kind+" settings",selectable:!1,default:!1,mode:"disabled"},options.selectable=!1,options.name="CaptionSettingsMenuItem",(_this=_TextTrackMenuItem.call(this,player,options)||this).addClass("vjs-texttrack-settings"),_this.controlText(", opens "+options.kind+" settings dialog"),_this}return _inheritsLoose(CaptionSettingsMenuItem,_TextTrackMenuItem),CaptionSettingsMenuItem.prototype.handleClick=function(event){this.player().getChild("textTrackSettings").open()},CaptionSettingsMenuItem}(TextTrackMenuItem);Component.registerComponent("CaptionSettingsMenuItem",CaptionSettingsMenuItem);var CaptionsButton=function(_TextTrackButton){function CaptionsButton(player,options,ready){return _TextTrackButton.call(this,player,options,ready)||this}_inheritsLoose(CaptionsButton,_TextTrackButton);var _proto=CaptionsButton.prototype;return _proto.buildCSSClass=function(){return"vjs-captions-button "+_TextTrackButton.prototype.buildCSSClass.call(this)},_proto.buildWrapperCSSClass=function(){return"vjs-captions-button "+_TextTrackButton.prototype.buildWrapperCSSClass.call(this)},_proto.createItems=function(){var items=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(items.push(new CaptionSettingsMenuItem(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),_TextTrackButton.prototype.createItems.call(this,items)},CaptionsButton}(TextTrackButton);CaptionsButton.prototype.kind_="captions",CaptionsButton.prototype.controlText_="Captions",Component.registerComponent("CaptionsButton",CaptionsButton);var SubsCapsMenuItem=function(_TextTrackMenuItem){function SubsCapsMenuItem(){return _TextTrackMenuItem.apply(this,arguments)||this}return _inheritsLoose(SubsCapsMenuItem,_TextTrackMenuItem),SubsCapsMenuItem.prototype.createEl=function(type,props,attrs){var innerHTML='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(innerHTML+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),innerHTML+="</span>",_TextTrackMenuItem.prototype.createEl.call(this,type,assign({innerHTML:innerHTML},props),attrs)},SubsCapsMenuItem}(TextTrackMenuItem);Component.registerComponent("SubsCapsMenuItem",SubsCapsMenuItem);var SubsCapsButton=function(_TextTrackButton){function SubsCapsButton(player,options){var _this;return void 0===options&&(options={}),(_this=_TextTrackButton.call(this,player,options)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(_this.player_.language_)>-1&&(_this.label_="captions"),_this.menuButton_.controlText(toTitleCase(_this.label_)),_this}_inheritsLoose(SubsCapsButton,_TextTrackButton);var _proto=SubsCapsButton.prototype;return _proto.buildCSSClass=function(){return"vjs-subs-caps-button "+_TextTrackButton.prototype.buildCSSClass.call(this)},_proto.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+_TextTrackButton.prototype.buildWrapperCSSClass.call(this)},_proto.createItems=function(){var items=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(items.push(new CaptionSettingsMenuItem(this.player_,{kind:this.label_})),this.hideThreshold_+=1),items=_TextTrackButton.prototype.createItems.call(this,items,SubsCapsMenuItem)},SubsCapsButton}(TextTrackButton);SubsCapsButton.prototype.kinds_=["captions","subtitles"],SubsCapsButton.prototype.controlText_="Subtitles",Component.registerComponent("SubsCapsButton",SubsCapsButton);var AudioTrackMenuItem=function(_MenuItem){function AudioTrackMenuItem(player,options){var _this,track=options.track,tracks=player.audioTracks();options.label=track.label||track.language||"Unknown",options.selected=track.enabled,(_this=_MenuItem.call(this,player,options)||this).track=track,_this.addClass("vjs-"+track.kind+"-menu-item");var changeHandler=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];_this.handleTracksChange.apply(_assertThisInitialized(_this),args)};return tracks.addEventListener("change",changeHandler),_this.on("dispose",function(){tracks.removeEventListener("change",changeHandler)}),_this}_inheritsLoose(AudioTrackMenuItem,_MenuItem);var _proto=AudioTrackMenuItem.prototype;return _proto.createEl=function(type,props,attrs){var innerHTML='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(innerHTML+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),innerHTML+="</span>",_MenuItem.prototype.createEl.call(this,type,assign({innerHTML:innerHTML},props),attrs)},_proto.handleClick=function(event){var tracks=this.player_.audioTracks();_MenuItem.prototype.handleClick.call(this,event);for(var i=0;i<tracks.length;i++){var track=tracks[i];track.enabled=track===this.track}},_proto.handleTracksChange=function(event){this.selected(this.track.enabled)},AudioTrackMenuItem}(MenuItem);Component.registerComponent("AudioTrackMenuItem",AudioTrackMenuItem);var AudioTrackButton=function(_TrackButton){function AudioTrackButton(player,options){return void 0===options&&(options={}),options.tracks=player.audioTracks(),_TrackButton.call(this,player,options)||this}_inheritsLoose(AudioTrackButton,_TrackButton);var _proto=AudioTrackButton.prototype;return _proto.buildCSSClass=function(){return"vjs-audio-button "+_TrackButton.prototype.buildCSSClass.call(this)},_proto.buildWrapperCSSClass=function(){return"vjs-audio-button "+_TrackButton.prototype.buildWrapperCSSClass.call(this)},_proto.createItems=function(items){void 0===items&&(items=[]),this.hideThreshold_=1;for(var tracks=this.player_.audioTracks(),i=0;i<tracks.length;i++){var track=tracks[i];items.push(new AudioTrackMenuItem(this.player_,{track:track,selectable:!0,multiSelectable:!1}))}return items},AudioTrackButton}(TrackButton);AudioTrackButton.prototype.controlText_="Audio Track",Component.registerComponent("AudioTrackButton",AudioTrackButton);var PlaybackRateMenuItem=function(_MenuItem){function PlaybackRateMenuItem(player,options){var _this,label=options.rate,rate=parseFloat(label,10);return options.label=label,options.selected=1===rate,options.selectable=!0,options.multiSelectable=!1,(_this=_MenuItem.call(this,player,options)||this).label=label,_this.rate=rate,_this.on(player,"ratechange",_this.update),_this}_inheritsLoose(PlaybackRateMenuItem,_MenuItem);var _proto=PlaybackRateMenuItem.prototype;return _proto.handleClick=function(event){_MenuItem.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},_proto.update=function(event){this.selected(this.player().playbackRate()===this.rate)},PlaybackRateMenuItem}(MenuItem);PlaybackRateMenuItem.prototype.contentElType="button",Component.registerComponent("PlaybackRateMenuItem",PlaybackRateMenuItem);var PlaybackRateMenuButton=function(_MenuButton){function PlaybackRateMenuButton(player,options){var _this;return(_this=_MenuButton.call(this,player,options)||this).updateVisibility(),_this.updateLabel(),_this.on(player,"loadstart",_this.updateVisibility),_this.on(player,"ratechange",_this.updateLabel),_this}_inheritsLoose(PlaybackRateMenuButton,_MenuButton);var _proto=PlaybackRateMenuButton.prototype;return _proto.createEl=function(){var el=_MenuButton.prototype.createEl.call(this);return this.labelEl_=createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),el.appendChild(this.labelEl_),el},_proto.dispose=function(){this.labelEl_=null,_MenuButton.prototype.dispose.call(this)},_proto.buildCSSClass=function(){return"vjs-playback-rate "+_MenuButton.prototype.buildCSSClass.call(this)},_proto.buildWrapperCSSClass=function(){return"vjs-playback-rate "+_MenuButton.prototype.buildWrapperCSSClass.call(this)},_proto.createMenu=function(){var menu=new Menu(this.player()),rates=this.playbackRates();if(rates)for(var i=rates.length-1;i>=0;i--)menu.addChild(new PlaybackRateMenuItem(this.player(),{rate:rates[i]+"x"}));return menu},_proto.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},_proto.handleClick=function(event){for(var currentRate=this.player().playbackRate(),rates=this.playbackRates(),newRate=rates[0],i=0;i<rates.length;i++)if(rates[i]>currentRate){newRate=rates[i];break}this.player().playbackRate(newRate)},_proto.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},_proto.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},_proto.updateVisibility=function(event){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},_proto.updateLabel=function(event){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},PlaybackRateMenuButton}(MenuButton);PlaybackRateMenuButton.prototype.controlText_="Playback Rate",Component.registerComponent("PlaybackRateMenuButton",PlaybackRateMenuButton);var Spacer=function(_Component){function Spacer(){return _Component.apply(this,arguments)||this}_inheritsLoose(Spacer,_Component);var _proto=Spacer.prototype;return _proto.buildCSSClass=function(){return"vjs-spacer "+_Component.prototype.buildCSSClass.call(this)},_proto.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},Spacer}(Component);Component.registerComponent("Spacer",Spacer);var CustomControlSpacer=function(_Spacer){function CustomControlSpacer(){return _Spacer.apply(this,arguments)||this}_inheritsLoose(CustomControlSpacer,_Spacer);var _proto=CustomControlSpacer.prototype;return _proto.buildCSSClass=function(){return"vjs-custom-control-spacer "+_Spacer.prototype.buildCSSClass.call(this)},_proto.createEl=function(){var el=_Spacer.prototype.createEl.call(this,{className:this.buildCSSClass()});return el.innerHTML="Â ",el},CustomControlSpacer}(Spacer);Component.registerComponent("CustomControlSpacer",CustomControlSpacer);var ControlBar=function(_Component){function ControlBar(){return _Component.apply(this,arguments)||this}return _inheritsLoose(ControlBar,_Component),ControlBar.prototype.createEl=function(){return _Component.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},ControlBar}(Component);ControlBar.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in document&&ControlBar.prototype.options_.children.splice(ControlBar.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Component.registerComponent("ControlBar",ControlBar);var ErrorDisplay=function(_ModalDialog){function ErrorDisplay(player,options){var _this;return(_this=_ModalDialog.call(this,player,options)||this).on(player,"error",_this.open),_this}_inheritsLoose(ErrorDisplay,_ModalDialog);var _proto=ErrorDisplay.prototype;return _proto.buildCSSClass=function(){return"vjs-error-display "+_ModalDialog.prototype.buildCSSClass.call(this)},_proto.content=function(){var error=this.player().error();return error?this.localize(error.message):""},ErrorDisplay}(ModalDialog);ErrorDisplay.prototype.options_=_extends({},ModalDialog.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Component.registerComponent("ErrorDisplay",ErrorDisplay);var COLOR_BLACK=["#000","Black"],COLOR_BLUE=["#00F","Blue"],COLOR_CYAN=["#0FF","Cyan"],COLOR_GREEN=["#0F0","Green"],COLOR_MAGENTA=["#F0F","Magenta"],COLOR_RED=["#F00","Red"],COLOR_WHITE=["#FFF","White"],COLOR_YELLOW=["#FF0","Yellow"],OPACITY_OPAQUE=["1","Opaque"],OPACITY_SEMI=["0.5","Semi-Transparent"],OPACITY_TRANS=["0","Transparent"],selectConfigs={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[COLOR_BLACK,COLOR_WHITE,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[OPACITY_OPAQUE,OPACITY_SEMI,OPACITY_TRANS]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[COLOR_WHITE,COLOR_BLACK,COLOR_RED,COLOR_GREEN,COLOR_BLUE,COLOR_YELLOW,COLOR_MAGENTA,COLOR_CYAN]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(v){return"1.00"===v?null:Number(v)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[OPACITY_OPAQUE,OPACITY_SEMI]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[OPACITY_TRANS,OPACITY_SEMI,OPACITY_OPAQUE]}};function parseOptionValue(value,parser){if(parser&&(value=parser(value)),value&&"none"!==value)return value}selectConfigs.windowColor.options=selectConfigs.backgroundColor.options;var TextTrackSettings=function(_ModalDialog){function TextTrackSettings(player,options){var _this;return options.temporary=!1,(_this=_ModalDialog.call(this,player,options)||this).updateDisplay=bind(_assertThisInitialized(_this),_this.updateDisplay),_this.fill(),_this.hasBeenOpened_=_this.hasBeenFilled_=!0,_this.endDialog=createEl("p",{className:"vjs-control-text",textContent:_this.localize("End of dialog window.")}),_this.el().appendChild(_this.endDialog),_this.setDefaults(),void 0===options.persistTextTrackSettings&&(_this.options_.persistTextTrackSettings=_this.options_.playerOptions.persistTextTrackSettings),_this.on(_this.$(".vjs-done-button"),"click",function(){_this.saveSettings(),_this.close()}),_this.on(_this.$(".vjs-default-button"),"click",function(){_this.setDefaults(),_this.updateDisplay()}),each(selectConfigs,function(config){_this.on(_this.$(config.selector),"change",_this.updateDisplay)}),_this.options_.persistTextTrackSettings&&_this.restoreSettings(),_this}_inheritsLoose(TextTrackSettings,_ModalDialog);var _proto=TextTrackSettings.prototype;return _proto.dispose=function(){this.endDialog=null,_ModalDialog.prototype.dispose.call(this)},_proto.createElSelect_=function(key,legendId,type){var _this2=this;void 0===legendId&&(legendId=""),void 0===type&&(type="label");var config=selectConfigs[key],id=config.id.replace("%s",this.id_),selectLabelledbyIds=[legendId,id].join(" ").trim();return["<"+type+' id="'+id+'" class="'+("label"===type?"vjs-label":"")+'">',this.localize(config.label),"</"+type+">",'<select aria-labelledby="'+selectLabelledbyIds+'">'].concat(config.options.map(function(o){var optionId=id+"-"+o[1].replace(/\W+/g,"");return['<option id="'+optionId+'" value="'+o[0]+'" ','aria-labelledby="'+selectLabelledbyIds+" "+optionId+'">',_this2.localize(o[1]),"</option>"].join("")})).concat("</select>").join("")},_proto.createElFgColor_=function(){var legendId="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+legendId+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",legendId),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",legendId),"</span>","</fieldset>"].join("")},_proto.createElBgColor_=function(){var legendId="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+legendId+'">
1',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",legendId),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",legendId),"</span>","</fieldset>"].join("")},_proto.createElWinColor_=function(){var legendId="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+legendId+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",legendId),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",legendId),"</span>","</fieldset>"].join("")},_proto.createElColors_=function(){return createEl("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},_proto.createElFont_=function(){return createEl("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},_proto.createElControls_=function(){var defaultsDescription=this.localize("restore all settings to the default values");return createEl("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+defaultsDescription+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+defaultsDescription+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},_proto.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},_proto.label=function(){return this.localize("Caption Settings Dialog")},_proto.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},_proto.buildCSSClass=function(){return _ModalDialog.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},_proto.getValues=function(){var object,fn,initial,_this3=this;return fn=function(accum,config,key){var el,parser,value=(el=_this3.$(config.selector),parser=config.parser,parseOptionValue(el.options[el.options.selectedIndex].value,parser));return void 0!==value&&(accum[key]=value),accum},void 0===(initial={})&&(initial=0),keys(object=selectConfigs).reduce(function(accum,key){return fn(accum,object[key],key)},initial)},_proto.setValues=function(values){var _this4=this;each(selectConfigs,function(config,key){!function(el,value,parser){if(value)for(var i=0;i<el.options.length;i++)if(parseOptionValue(el.options[i].value,parser)===value){el.selectedIndex=i;break}}(_this4.$(config.selector),values[key],config.parser)})},_proto.setDefaults=function(){var _this5=this;each(selectConfigs,function(config){var index=config.hasOwnProperty("default")?config.default:0;_this5.$(config.selector).selectedIndex=index})},_proto.restoreSettings=function(){var values;try{values=JSON.parse(window$1.localStorage.getItem("vjs-text-track-settings"))}catch(err){log.warn(err)}values&&this.setValues(values)},_proto.saveSettings=function(){if(this.options_.persistTextTrackSettings){var values=this.getValues();try{Object.keys(values).length?window$1.localStorage.setItem("vjs-text-track-settings",JSON.stringify(values)):window$1.localStorage.removeItem("vjs-text-track-settings")}catch(err){log.warn(err)}}},_proto.updateDisplay=function(){var ttDisplay=this.player_.getChild("textTrackDisplay");ttDisplay&&ttDisplay.updateDisplay()},_proto.conditionalBlur_=function(){this.previouslyActiveEl_=null;var cb=this.player_.controlBar,subsCapsBtn=cb&&cb.subsCapsButton,ccBtn=cb&&cb.captionsButton;subsCapsBtn?subsCapsBtn.focus():ccBtn&&ccBtn.focus()},TextTrackSettings}(ModalDialog);Component.registerComponent("TextTrackSettings",TextTrackSettings);var ResizeManager=function(_Component){function ResizeManager(player,options){var _this,RESIZE_OBSERVER_AVAILABLE=options.ResizeObserver||window$1.ResizeObserver;
vendor: 5,460 bytes, line 1
1null===options.ResizeObserver&&(RESIZE_OBSERVER_AVAILABLE=!1);var options_=mergeOptions({createEl:!RESIZE_OBSERVER_AVAILABLE,reportTouchActivity:!1},options);return(_this=_Component.call(this,player,options_)||this).ResizeObserver=options.ResizeObserver||window$1.ResizeObserver,_this.loadListener_=null,_this.resizeObserver_=null,_this.debouncedHandler_=debounce(function(){_this.resizeHandler()},100,!1,_assertThisInitialized(_this)),RESIZE_OBSERVER_AVAILABLE?(_this.resizeObserver_=new _this.ResizeObserver(_this.debouncedHandler_),_this.resizeObserver_.observe(player.el())):(_this.loadListener_=function(){if(_this.el_&&_this.el_.contentWindow){var debouncedHandler_=_this.debouncedHandler_,unloadListener_=_this.unloadListener_=function(){off(this,"resize",debouncedHandler_),off(this,"unload",unloadListener_),unloadListener_=null};on(_this.el_.contentWindow,"unload",unloadListener_),on(_this.el_.contentWindow,"resize",debouncedHandler_)}},_this.one("load",_this.loadListener_)),_this}_inheritsLoose(ResizeManager,_Component);var _proto=ResizeManager.prototype;return _proto.createEl=function(){return _Component.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},_proto.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},_proto.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,_Component.prototype.dispose.call(this)},ResizeManager}(Component);Component.registerComponent("ResizeManager",ResizeManager);var defaults={trackingThreshold:30,liveTolerance:15},LiveTracker=function(_Component){function LiveTracker(player,options){var _this,options_=mergeOptions(defaults,options,{createEl:!1});return(_this=_Component.call(this,player,options_)||this).reset_(),_this.on(_this.player_,"durationchange",_this.handleDurationchange),IE_VERSION&&"hidden"in document&&"visibilityState"in document&&_this.on(document,"visibilitychange",_this.handleVisibilityChange),_this}_inheritsLoose(LiveTracker,_Component);var _proto=LiveTracker.prototype;return _proto.handleVisibilityChange=function(){this.player_.duration()===1/0&&(document.hidden?this.stopTracking():this.startTracking())},_proto.trackLive_=function(){var seekable=this.player_.seekable();if(seekable&&seekable.length){var newTime=Number(window$1.performance.now().toFixed(4)),deltaTime=-1===this.lastTime_?0:(newTime-this.lastTime_)/1e3;this.lastTime_=newTime,this.pastSeekEnd_=this.pastSeekEnd()+deltaTime;var liveCurrentTime=this.liveCurrentTime(),currentTime=this.player_.currentTime(),isBehind=this.player_.paused()||this.seekedBehindLive_||Math.abs(liveCurrentTime-currentTime)>this.options_.liveTolerance;this.timeupdateSeen_&&liveCurrentTime!==1/0||(isBehind=!1),isBehind!==this.behindLiveEdge_&&(this.behindLiveEdge_=isBehind,this.trigger("liveedgechange"))}},_proto.handleDurationchange=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},_proto.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,UPDATE_REFRESH_INTERVAL),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},_proto.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},_proto.handleSeeked=function(){var timeDiff=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&timeDiff>2,this.skipNextSeeked_=!1,this.trackLive_()},_proto.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},_proto.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},_proto.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},_proto.seekableEnd=function(){for(var seekable=this.player_.seekable(),seekableEnds=[],i=seekable?seekable.length:0;i--;)seekableEnds.push(seekable.end(i));return seekableEnds.length?seekableEnds.sort()[seekableEnds.length-1]:1/0},_proto.seekableStart=function(){for(var seekable=this.player_.seekable(),seekableStarts=[],i=seekable?seekable.length:0;i--;)seekableStarts.push(seekable.start(i));return seekableStarts.length?seekableStarts.sort()[0]:0}
vendor: 7,989 bytes, line 1
1,_proto.liveWindow=function(){var liveCurrentTime=this.liveCurrentTime();return liveCurrentTime===1/0?1/0:liveCurrentTime-this.seekableStart()},_proto.isLive=function(){return this.isTracking()},_proto.atLiveEdge=function(){return!this.behindLiveEdge()},_proto.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},_proto.pastSeekEnd=function(){var seekableEnd=this.seekableEnd();return-1!==this.lastSeekEnd_&&seekableEnd!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=seekableEnd,this.pastSeekEnd_},_proto.behindLiveEdge=function(){return this.behindLiveEdge_},_proto.isTracking=function(){return"number"==typeof this.trackingInterval_},_proto.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},_proto.dispose=function(){this.off(document,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),_Component.prototype.dispose.call(this)},LiveTracker}(Component);Component.registerComponent("LiveTracker",LiveTracker);var canPlayType,sourcesetLoad=function(tech){var el=tech.el();if(el.hasAttribute("src"))return tech.triggerSourceset(el.src),!0;var sources=tech.$$("source"),srcUrls=[],src="";if(!sources.length)return!1;for(var i=0;i<sources.length;i++){var url=sources[i].src;url&&-1===srcUrls.indexOf(url)&&srcUrls.push(url)}return!!srcUrls.length&&(1===srcUrls.length&&(src=srcUrls[0]),tech.triggerSourceset(src),!0)},innerHTMLDescriptorPolyfill=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(v){var dummy=document.createElement(this.nodeName.toLowerCase());dummy.innerHTML=v;for(var docFrag=document.createDocumentFragment();dummy.childNodes.length;)docFrag.appendChild(dummy.childNodes[0]);return this.innerText="",window$1.Element.prototype.appendChild.call(this,docFrag),this.innerHTML}}),getDescriptor=function(priority,prop){for(var descriptor={},i=0;i<priority.length&&!((descriptor=Object.getOwnPropertyDescriptor(priority[i],prop))&&descriptor.set&&descriptor.get);i++);return descriptor.enumerable=!0,descriptor.configurable=!0,descriptor},firstSourceWatch=function(tech){var el=tech.el();if(!el.resetSourceWatch_){var old={},innerDescriptor=function(tech){return getDescriptor([tech.el(),window$1.HTMLMediaElement.prototype,window$1.Element.prototype,innerHTMLDescriptorPolyfill],"innerHTML")}(tech),appendWrapper=function(appendFn){return function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];var retval=appendFn.apply(el,args);return sourcesetLoad(tech),retval}};["append","appendChild","insertAdjacentHTML"].forEach(function(k){el[k]&&(old[k]=el[k],el[k]=appendWrapper(old[k]))}),Object.defineProperty(el,"innerHTML",mergeOptions(innerDescriptor,{set:appendWrapper(innerDescriptor.set)})),el.resetSourceWatch_=function(){el.resetSourceWatch_=null,Object.keys(old).forEach(function(k){el[k]=old[k]}),Object.defineProperty(el,"innerHTML",innerDescriptor)},tech.one("sourceset",el.resetSourceWatch_)}},srcDescriptorPolyfill=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?getAbsoluteURL(window$1.Element.prototype.getAttribute.call(this,"src")):""},set:function(v){return window$1.Element.prototype.setAttribute.call(this,"src",v),v}}),setupSourceset=function(tech){if(tech.featuresSourceset){var el=tech.el();if(!el.resetSourceset_){var srcDescriptor=function(tech){return getDescriptor([tech.el(),window$1.HTMLMediaElement.prototype,srcDescriptorPolyfill],"src")}(tech),oldSetAttribute=el.setAttribute,oldLoad=el.load;Object.defineProperty(el,"src",mergeOptions(srcDescriptor,{set:function(v){var retval=srcDescriptor.set.call(el,v);return tech.triggerSourceset(el.src),retval}})),el.setAttribute=function(n,v){var retval=oldSetAttribute.call(el,n,v);return/src/i.test(n)&&tech.triggerSourceset(el.src),retval},el.load=function(){var retval=oldLoad.call(el);return sourcesetLoad(tech)||(tech.triggerSourceset(""),firstSourceWatch(tech)),retval},el.currentSrc?tech.triggerSourceset(el.currentSrc):sourcesetLoad(tech)||firstSourceWatch(tech),el.resetSourceset_=function(){el.resetSourceset_=null,el.load=oldLoad,el.setAttribute=oldSetAttribute,Object.defineProperty(el,"src",srcDescriptor),el.resetSourceWatch_&&el.resetSourceWatch_()}}}},defineLazyProperty=function(obj,key,getValue,setter){void 0===setter&&(setter=!0);var set=function(value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,writable:!0})},options={configurable:!0,enumerable:!0,get:function(){var value=getValue();return set(value),value}};return setter&&(options.set=set),Object.defineProperty(obj,key,options)},Html5=function(_Tech){function Html5(options,ready){var _this;_this=_Tech.call(this,options,ready)||this;var source=options.source,crossoriginTracks=!1;if(source&&(_this.el_.currentSrc!==source.src||options.tag&&3===options.tag.initNetworkState_)?_this.setSource(source):_this.handleLateInit_(_this.el_),options.enableSourceset&&_this.setupSourcesetHandling_(),_this.el_.hasChildNodes()){for(var nodes=_this.el_.childNodes,nodesLength=nodes.length,removeNodes=[];nodesLength--;){var node=nodes[nodesLength];"track"===node.nodeName.toLowerCase()&&(_this.featuresNativeTextTracks?(_this.remoteTextTrackEls().addTrackElement_(node),_this.remoteTextTracks().addTrack(node.track),_this.textTracks().addTrack(node.track),crossoriginTracks||_this.el_.hasAttribute("crossorigin")||!isCrossOrigin(node.src)||(crossoriginTracks=!0)):removeNodes.push(node))}for(var i=0;i<removeNodes.length;i++)_this.el_.removeChild(removeNodes[i])}return _this.proxyNativeTracks_(),_this.featuresNativeTextTracks&&crossoriginTracks&&log.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),_this.restoreMetadataTracksInIOSNativePlayer_(),(TOUCH_ENABLED||IS_IPHONE||IS_NATIVE_ANDROID)&&!0===options.nativeControlsForTouch&&_this.setControls(!0),_this.proxyWebkitFullscreen_(),_this.triggerReady(),_this}_inheritsLoose(Html5,_Tech);var _proto=Html5.prototype;return _proto.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Html5.disposeMediaElement(this.el_),this.options_=null,_Tech.prototype.dispose.call(this)},_proto.setupSourcesetHandling_=function(){setupSourceset(this)},_proto.restoreMetadataTracksInIOSNativePlayer_=function(){var metadataTracksPreFullscreenState,textTracks=this.textTracks(),takeMetadataTrackSnapshot=function(){metadataTracksPreFullscreenState=[];for(var i=0;i<textTracks.length;i++){var track=textTracks[i];"metadata"===track.kind&&metadataTracksPreFullscreenState.push({track:track,storedMode:track.mode})}};takeMetadataTrackSnapshot(),textTracks.addEventListener("change",takeMetadataTrackSnapshot),this.on("dispose",function(){return textTracks.removeEventListener("change",takeMetadataTrackSnapshot)});var restoreTrackMode=function restoreTrackMode(){for(var i=0;i<metadataTracksPreFullscreenState.length;i++){var storedTrack=metadataTracksPreFullscreenState[i];"disabled"===storedTrack.track.mode&&storedTrack.track.mode!==storedTrack.storedMode&&(storedTrack.track.mode=storedTrack.storedMode)}textTracks.removeEventListener("change",restoreTrackMode)};this.on("webkitbeginfullscreen",function(){textTracks.removeEventListener("change",takeMetadataTrackSnapshot),textTracks.removeEventListener("change",restoreTrackMode),textTracks.addEventListener("change",restoreTrackMode)}),this.on("webkitendfullscreen",function(){textTracks.removeEventListener("change",takeMetadataTrackSnapshot),textTracks.addEventListener("change",takeMetadataTrackSnapshot),textTracks.removeEventListener("change",restoreTrackMode)})},_proto.overrideNative_=function(type,override){var _this2=this;if(override===this["featuresNative"+type+"Tracks"]){var lowerCaseType=type.toLowerCase();this[lowerCaseType+"TracksListeners_"]&&Object.keys(this[lowerCaseType+"TracksListeners_"]).forEac
vendor: 2,214 bytes, line 1
1h(function(eventName){_this2.el()[lowerCaseType+"Tracks"].removeEventListener(eventName,_this2[lowerCaseType+"TracksListeners_"][eventName])}),this["featuresNative"+type+"Tracks"]=!override,this[lowerCaseType+"TracksListeners_"]=null,this.proxyNativeTracksForType_(lowerCaseType)}},_proto.overrideNativeAudioTracks=function(override){this.overrideNative_("Audio",override)},_proto.overrideNativeVideoTracks=function(override){this.overrideNative_("Video",override)},_proto.proxyNativeTracksForType_=function(name){var _this3=this,props=NORMAL[name],elTracks=this.el()[props.getterName],techTracks=this[props.getterName]();if(this["featuresNative"+props.capitalName+"Tracks"]&&elTracks&&elTracks.addEventListener){var listeners={change:function(e){var event={type:"change",target:techTracks,currentTarget:techTracks,srcElement:techTracks};techTracks.trigger(event),"text"===name&&_this3[REMOTE.remoteText.getterName]().trigger(event)},addtrack:function(e){techTracks.addTrack(e.track)},removetrack:function(e){techTracks.removeTrack(e.track)}},removeOldTracks=function(){for(var removeTracks=[],i=0;i<techTracks.length;i++){for(var found=!1,j=0;j<elTracks.length;j++)if(elTracks[j]===techTracks[i]){found=!0;break}found||removeTracks.push(techTracks[i])}for(;removeTracks.length;)techTracks.removeTrack(removeTracks.shift())};this[props.getterName+"Listeners_"]=listeners,Object.keys(listeners).forEach(function(eventName){var listener=listeners[eventName];elTracks.addEventListener(eventName,listener),_this3.on("dispose",function(e){return elTracks.removeEventListener(eventName,listener)})}),this.on("loadstart",removeOldTracks),this.on("dispose",function(e){return _this3.off("loadstart",removeOldTracks)})}},_proto.proxyNativeTracks_=function(){var _this4=this;NORMAL.names.forEach(function(name){_this4.proxyNativeTracksForType_(name)})},_proto.createEl=function(){var el=this.options_.tag;if(!el||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(el){var clone=el.cloneNode(!0);el.parentNode&&el.parentNode.insertBefore(clone,el),Html5.disposeMediaElement(el),el=clone}else{el=document.createElement("video");var attributes=mergeOptions({},this.options_.tag&&getAttributes(this.options_.tag));
vendor: 6,204 bytes, line 1
1TOUCH_ENABLED&&!0===this.options_.nativeControlsForTouch||delete attributes.controls,setAttributes(el,assign(attributes,{id:this.options_.techId,class:"vjs-tech"}))}el.playerId=this.options_.playerId}void 0!==this.options_.preload&&setAttribute(el,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(el.disablePictureInPicture=this.options_.disablePictureInPicture);for(var settingsAttrs=["loop","muted","playsinline","autoplay"],i=0;i<settingsAttrs.length;i++){var attr=settingsAttrs[i],value=this.options_[attr];void 0!==value&&(value?setAttribute(el,attr,attr):removeAttribute(el,attr),el[attr]=value)}return el},_proto.handleLateInit_=function(el){if(0!==el.networkState&&3!==el.networkState){if(0===el.readyState){var loadstartFired=!1,setLoadstartFired=function(){loadstartFired=!0};this.on("loadstart",setLoadstartFired);var triggerLoadstart=function(){loadstartFired||this.trigger("loadstart")};return this.on("loadedmetadata",triggerLoadstart),void this.ready(function(){this.off("loadstart",setLoadstartFired),this.off("loadedmetadata",triggerLoadstart),loadstartFired||this.trigger("loadstart")})}var eventsToTrigger=["loadstart"];eventsToTrigger.push("loadedmetadata"),el.readyState>=2&&eventsToTrigger.push("loadeddata"),el.readyState>=3&&eventsToTrigger.push("canplay"),el.readyState>=4&&eventsToTrigger.push("canplaythrough"),this.ready(function(){eventsToTrigger.forEach(function(type){this.trigger(type)},this)})}},_proto.setScrubbing=function(isScrubbing){this.isScrubbing_=isScrubbing},_proto.setCurrentTime=function(seconds){try{this.isScrubbing_&&this.el_.fastSeek&&IS_ANY_SAFARI?this.el_.fastSeek(seconds):this.el_.currentTime=seconds}catch(e){log(e,"Video is not ready. (Video.js)")}},_proto.duration=function(){var _this5=this;if(this.el_.duration===1/0&&IS_ANDROID&&IS_CHROME&&0===this.el_.currentTime){return this.on("timeupdate",function checkProgress(){_this5.el_.currentTime>0&&(_this5.el_.duration===1/0&&_this5.trigger("durationchange"),_this5.off("timeupdate",checkProgress))}),NaN}return this.el_.duration||NaN},_proto.width=function(){return this.el_.offsetWidth},_proto.height=function(){return this.el_.offsetHeight},_proto.proxyWebkitFullscreen_=function(){var _this6=this;if("webkitDisplayingFullscreen"in this.el_){var endFn=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},beginFn=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",endFn),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",beginFn),this.on("dispose",function(){_this6.off("webkitbeginfullscreen",beginFn),_this6.off("webkitendfullscreen",endFn)})}},_proto.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var userAgent=window$1.navigator&&window$1.navigator.userAgent||"";if(/Android/.test(userAgent)||!/Chrome|Mac OS X 10.5/.test(userAgent))return!0}return!1},_proto.enterFullScreen=function(){var video=this.el_;if(video.paused&&video.networkState<=video.HAVE_METADATA)silencePromise(this.el_.play()),this.setTimeout(function(){video.pause();try{video.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{video.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},_proto.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},_proto.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},_proto.src=function(_src){if(void 0===_src)return this.el_.src;this.setSrc(_src)},_proto.reset=function(){Html5.resetMediaElement(this.el_)},_proto.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},_proto.setControls=function(val){this.el_.controls=!!val},_proto.addTextTrack=function(kind,label,language){return this.featuresNativeTextTracks?this.el_.addTextTrack(kind,label,language):_Tech.prototype.addTextTrack.call(this,kind,label,language)},_proto.createRemoteTextTrack=function(options){if(!this.featuresNativeTextTracks)return _Tech.prototype.createRemoteTextTrack.call(this,options);var htmlTrackElement=document.createElement("track");return options.kind&&(htmlTrackElement.kind=options.kind),options.label&&(htmlTrackElement.label=options.label),(options.language||options.srclang)&&(htmlTrackElement.srclang=options.language||options.srclang),options.default&&(htmlTrackElement.default=options.default),options.id&&(htmlTrackElement.id=options.id),options.src&&(htmlTrackElement.src=options.src),htmlTrackElement},_proto.addRemoteTextTrack=function(options,manualCleanup){var htmlTrackElement=_Tech.prototype.addRemoteTextTrack.call(this,options,manualCleanup);return this.featuresNativeTextTracks&&this.el().appendChild(htmlTrackElement),htmlTrackElement},_proto.removeRemoteTextTrack=function(track){if(_Tech.prototype.removeRemoteTextTrack.call(this,track),this.featuresNativeTextTracks)for(var tracks=this.$$("track"),i=tracks.length;i--;)track!==tracks[i]&&track!==tracks[i].track||this.el().removeChild(tracks[i])},_proto.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var videoPlaybackQuality={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(videoPlaybackQuality.droppedVideoFrames=this.el().webkitDroppedFrameCount,videoPlaybackQuality.totalVideoFrames=this.el().webkitDecodedFrameCount),window$1.performance&&"function"==typeof window$1.performance.now?videoPlaybackQuality.creationTime=window$1.performance.now():window$1.performance&&window$1.performance.timing&&"number"==typeof window$1.performance.timing.navigationStart&&(videoPlaybackQuality.creationTime=window$1.Date.now()-window$1.performance.timing.navigationStart),videoPlaybackQuality},Html5}(Tech);defineLazyProperty(Html5,"TEST_VID",function(){if(isReal()){var video=document.createElement("video"),track=document.createElement("track");return track.kind="captions",track.srclang="en",track.label="English",video.appendChild(track),video}}
vendor: 4,179 bytes, line 1
1),Html5.isSupported=function(){try{Html5.TEST_VID.volume=.5}catch(e){return!1}return!(!Html5.TEST_VID||!Html5.TEST_VID.canPlayType)},Html5.canPlayType=function(type){return Html5.TEST_VID.canPlayType(type)},Html5.canPlaySource=function(srcObj,options){return Html5.canPlayType(srcObj.type)},Html5.canControlVolume=function(){try{var volume=Html5.TEST_VID.volume;return Html5.TEST_VID.volume=volume/2+.1,volume!==Html5.TEST_VID.volume}catch(e){return!1}},Html5.canMuteVolume=function(){try{var muted=Html5.TEST_VID.muted;return Html5.TEST_VID.muted=!muted,Html5.TEST_VID.muted?setAttribute(Html5.TEST_VID,"muted","muted"):removeAttribute(Html5.TEST_VID,"muted"),muted!==Html5.TEST_VID.muted}catch(e){return!1}},Html5.canControlPlaybackRate=function(){if(IS_ANDROID&&IS_CHROME&&CHROME_VERSION<58)return!1;try{var playbackRate=Html5.TEST_VID.playbackRate;return Html5.TEST_VID.playbackRate=playbackRate/2+.1,playbackRate!==Html5.TEST_VID.playbackRate}catch(e){return!1}},Html5.canOverrideAttributes=function(){try{var noop=function(){};Object.defineProperty(document.createElement("video"),"src",{get:noop,set:noop}),Object.defineProperty(document.createElement("audio"),"src",{get:noop,set:noop}),Object.defineProperty(document.createElement("video"),"innerHTML",{get:noop,set:noop}),Object.defineProperty(document.createElement("audio"),"innerHTML",{get:noop,set:noop})}catch(e){return!1}return!0},Html5.supportsNativeTextTracks=function(){return IS_ANY_SAFARI||IS_IOS&&IS_CHROME},Html5.supportsNativeVideoTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.videoTracks)},Html5.supportsNativeAudioTracks=function(){return!(!Html5.TEST_VID||!Html5.TEST_VID.audioTracks)},Html5.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(_ref){var key=_ref[0],fn=_ref[1];defineLazyProperty(Html5.prototype,key,function(){return Html5[fn]()},!0)}),Html5.prototype.movingMediaElementInDOM=!IS_IOS,Html5.prototype.featuresFullscreenResize=!0,Html5.prototype.featuresProgressEvents=!0,Html5.prototype.featuresTimeupdateEvents=!0,Html5.patchCanPlayType=function(){ANDROID_VERSION>=4&&!IS_FIREFOX&&!IS_CHROME&&(canPlayType=Html5.TEST_VID&&Html5.TEST_VID.constructor.prototype.canPlayType,Html5.TEST_VID.constructor.prototype.canPlayType=function(type){return type&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(type)?"maybe":canPlayType.call(this,type)})},Html5.unpatchCanPlayType=function(){var r=Html5.TEST_VID.constructor.prototype.canPlayType;return canPlayType&&(Html5.TEST_VID.constructor.prototype.canPlayType=canPlayType),r},Html5.patchCanPlayType(),Html5.disposeMediaElement=function(el){if(el){for(el.parentNode&&el.parentNode.removeChild(el);el.hasChildNodes();)el.removeChild(el.firstChild);el.removeAttribute("src"),"function"==typeof el.load&&function(){try{el.load()}catch(e){}}()}},Html5.resetMediaElement=function(el){if(el){for(var sources=el.querySelectorAll("source"),i=sources.length;i--;)el.removeChild(sources[i]);el.removeAttribute("src"),"function"==typeof el.load&&function(){try{el.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(prop){Html5.prototype[prop]=function(){return this.el_[prop]||this.el_.hasAttribute(prop)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(prop){Html5.prototype["set"+toTitleCase(prop)]=function(v){this.el_[prop]=v,v?this.el_.setAttribute(prop,prop):this.el_.removeAttribute(prop)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","
1networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(prop){Html5.prototype[prop]=function(){return this.el_[prop]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(prop){Html5.prototype["set"+toTitleCase(prop)]=function(v){this.el_[prop]=v}}),["pause","load","play"].forEach(function(prop){Html5.prototype[prop]=function(){return this.el_[prop]()}}),Tech.withSourceHandlers(Html5),Html5.nativeSourceHandler={},Html5.nativeSourceHandler.canPlayType=function(type){try{return Html5.TEST_VID.canPlayType(type)}catch(e){return""}},Html5.nativeSourceHandler.canHandleSource=function(source,options){if(source.type)return Html5.nativeSourceHandler.canPlayType(source.type);if(source.src){var ext=getFileExtension(source.src);return Html5.nativeSourceHandler.canPlayType("video/"+ext)}return""},Html5.nativeSourceHandler.handleSource=function(source,tech,options){tech.setSrc(source.src)},Html5.nativeSourceHandler.dispose=function(){},Html5.registerSourceHandler(Html5.nativeSourceHandler),Tech.registerTech("Html5",Html5);var TECH_EVENTS_RETRIGGER=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],TECH_EVENTS_QUEUE={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},BREAKPOINT_ORDER=["tiny","xsmall","small","medium","large","xlarge","huge"],BREAKPOINT_CLASSES={};BREAKPOINT_ORDER.forEach(function(k){var v="x"===k.charAt(0)?"x-"+k.substring(1):k;BREAKPOINT_CLASSES[k]="vjs-layout-"+v});var DEFAULT_BREAKPOINTS={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Player=function(_Component){function Player(tag,options,ready){var _this;if(tag.id=tag.id||options.id||"vjs_video_"+newGUID(),(options=assign(Player.getTagSettings(tag),options)).initChildren=!1,options.createEl=!1,options.evented=!1,options.reportTouchActivity=!1,!options.language)if("function"==typeof tag.closest){var closest=tag.closest("[lang]");closest&&closest.getAttribute&&(options.language=closest.getAttribute("lang"))}else for(var element=tag;element&&1===element.nodeType;){if(getAttributes(element).hasOwnProperty("lang")){options.language=element.getAttribute("lang");break}element=element.parentNode}if((_this=_Component.call(this,null,options,ready)||this).boundDocumentFullscreenChange_=bind(_assertThisInitialized(_this),_this.documentFullscreenChange_),_this.boundFullWindowOnEscKey_=bind(_assertThisInitialized(_this),_this.fullWindowOnEscKey),_this.isFullscreen_=!1,_this.log=createLogger$1(_this.id_),_this.fsApi_=FullscreenApi,_this.isPosterFromTech_=!1,_this.queuedCallbacks_=[],_this.isReady_=!1,_this.hasStarted_=!1,_this.userActive_=!1,_this.debugEnabled_=!1,!_this.options_||!_this.options_.techOrder||!_this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(_this.tag=tag,_this.tagAttributes=tag&&getAttributes(tag),_this.language(_this.options_.language),options.languages){var languagesToLower={};Object.getOwnPropertyNames(options.languages).forEach(function(name){languagesToLower[name.toLowerCase()]=options.languages[name]}),_this.languages_=languagesToLower}else _this.languages_=Player.prototype.options_.languages;_this.resetCache_(),_this.poster_=options.poster||"",_this.controls_=!!options.controls,tag.controls=!1,tag.removeAttribute("controls"),_this.changingSrc_=!1,_this.playCallbacks_=[],_this.playTerminatedQueue_=[],tag.hasAttribute("autoplay")?_this.autoplay(!0):_this.autoplay(_this.options_.autoplay),options.plugins&&Object.keys(options.plugins).forEach(function(name){if("function"!=typeof _this[name])throw new Error('plugin "'+name+'" does not exist')}),_this.scrubbing_=!1,_this.el_=_this.createEl(),evented(_assertThisInitialized(_this),{eventBusKey:"el_"}),_this.fsApi_.requestFullscreen&&(on(document,_this.fsApi_.fullscreenchange,_this.boundDocumentFullscreenChange_),_this.on(_this.fsApi_.fullscreenchange,_this.boundDocumentFullscreenChange_)),_this.fluid_&&_this.on("playerreset",_this.updateStyleEl_);var playerOptionsCopy=mergeOptions(_this.options_);
vendor: 5,593 bytes, line 1
1options.plugins&&Object.keys(options.plugins).forEach(function(name){_this[name](options.plugins[name])}),options.debug&&_this.debug(!0),_this.options_.playerOptions=playerOptionsCopy,_this.middleware_=[],_this.initChildren(),_this.isAudio("audio"===tag.nodeName.toLowerCase()),_this.controls()?_this.addClass("vjs-controls-enabled"):_this.addClass("vjs-controls-disabled"),_this.el_.setAttribute("role","region"),_this.isAudio()?_this.el_.setAttribute("aria-label",_this.localize("Audio Player")):_this.el_.setAttribute("aria-label",_this.localize("Video Player")),_this.isAudio()&&_this.addClass("vjs-audio"),_this.flexNotSupported_()&&_this.addClass("vjs-no-flex"),TOUCH_ENABLED&&_this.addClass("vjs-touch-enabled"),IS_IOS||_this.addClass("vjs-workinghover"),Player.players[_this.id_]=_assertThisInitialized(_this);var majorVersion=version.split(".")[0];return _this.addClass("vjs-v"+majorVersion),_this.userActive(!0),_this.reportUserActivity(),_this.one("play",_this.listenForUserActivity_),_this.on("stageclick",_this.handleStageClick_),_this.on("keydown",_this.handleKeyDown),_this.breakpoints(_this.options_.breakpoints),_this.responsive(_this.options_.responsive),_this}_inheritsLoose(Player,_Component);var _proto=Player.prototype;return _proto.dispose=function(){var _this2=this;this.trigger("dispose"),this.off("dispose"),off(document,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),off(document,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Player.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),middlewareInstances[this.id()]=null,ALL.names.forEach(function(name){var props=ALL[name],list=_this2[props.getterName]();list&&list.off&&list.off()}),_Component.prototype.dispose.call(this)},_proto.createEl=function(){var el,tag=this.tag,playerElIngest=this.playerElIngest_=tag.parentNode&&tag.parentNode.hasAttribute&&tag.parentNode.hasAttribute("data-vjs-player"),divEmbed="video-js"===this.tag.tagName.toLowerCase();playerElIngest?el=this.el_=tag.parentNode:divEmbed||(el=this.el_=_Component.prototype.createEl.call(this,"div"));var attrs=getAttributes(tag);if(divEmbed){for(el=this.el_=tag,tag=this.tag=document.createElement("video");el.children.length;)tag.appendChild(el.firstChild);hasClass(el,"video-js")||addClass(el,"video-js"),el.appendChild(tag),playerElIngest=this.playerElIngest_=el,Object.keys(el).forEach(function(k){try{tag[k]=el[k]}catch(e){}})}if(tag.setAttribute("tabindex","-1"),attrs.tabindex="-1",(IE_VERSION||IS_CHROME&&IS_WINDOWS)&&(tag.setAttribute("role","application"),attrs.role="application"),tag.removeAttribute("width"),tag.removeAttribute("height"),"width"in attrs&&delete attrs.width,"height"in attrs&&delete attrs.height,Object.getOwnPropertyNames(attrs).forEach(function(attr){divEmbed&&"class"===attr||el.setAttribute(attr,attrs[attr]),divEmbed&&tag.setAttribute(attr,attrs[attr])}),tag.playerId=tag.id,tag.id+="_html5_api",tag.className="vjs-tech",tag.player=el.player=this,this.addClass("vjs-paused"),!0!==window$1.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=createStyleElement("vjs-styles-dimensions");var defaultsStyleEl=$(".vjs-styles-defaults"),head=$("head");head.insertBefore(this.styleEl_,defaultsStyleEl?defaultsStyleEl.nextSibling:head.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var links=tag.getElementsByTagName("a"),i=0;i<links.length;i++){var linkEl=links.item(i);addClass(linkEl,"vjs-hidden"),linkEl.setAttribute("hidden","hidden")}return tag.initNetworkState_=tag.networkState,tag.parentNode&&!playerElIngest&&tag.parentNode.insertBefore(el,tag),prependTo(tag,el),this.children_.unshift(tag),this.el_.setAttribute("lang",this.language_),this.el_=el,el},_proto.crossOrigin=function(value){if(!value)return this.techGet_("crossOrigin");"anonymous"===value||"use-credentials"===value?this.techCall_("setCrossOrigin",value):log.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+value+'"')},_proto.width=function(value){return this.dimension("width",value)},_proto.height=function(value){return this.dimension("height",value)},_proto.dimension=function(_dimension,value){var privDimension=_dimension+"_";if(void 0===value)return this[privDimension]||0;if(""===value||"auto"===value)return this[privDimension]=void 0,void this.updateStyleEl_();var parsedVal=parseFloat(value);isNaN(parsedVal)?log.error('Improper value "'+value+'" supplied for for '+_dimension):(this[privDimension]=parsedVal,this.updateStyleEl_())},_proto.fluid=function(bool){if(void 0===bool)return!!this.fluid_;var target,callback;this.fluid_=!!bool,isEvented(this)&&this.off("playerreset",this.updateStyleEl_),bool?(this.addClass("vjs-fluid"),this.fill(!1),isEvented(target=function(){this.on("playerreset",this.updateStyleEl_)})?callback():(target.eventedCallbacks||(target.eventedCallbacks=[]),target.eventedCallbacks.push(callback))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},_proto.fill=function(bool){if(void 0===bool)return!!this.fill_;this.fill_=!!bool,bool?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}
vendor: 4,810 bytes, line 1
1,_proto.aspectRatio=function(ratio){if(void 0===ratio)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(ratio))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=ratio,this.fluid(!0),this.updateStyleEl_()},_proto.updateStyleEl_=function(){if(!0!==window$1.VIDEOJS_NO_DYNAMIC_STYLE){var width,height,idClass,ratioParts=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),ratioMultiplier=ratioParts[1]/ratioParts[0];width=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/ratioMultiplier:this.videoWidth()||300,height=void 0!==this.height_?this.height_:width*ratioMultiplier,idClass=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(idClass),setTextContent(this.styleEl_,"\n ."+idClass+" {\n width: "+width+"px;\n height: "+height+"px;\n }\n\n ."+idClass+".vjs-fluid {\n padding-top: "+100*ratioMultiplier+"%;\n }\n ")}else{var _width="number"==typeof this.width_?this.width_:this.options_.width,_height="number"==typeof this.height_?this.height_:this.options_.height,techEl=this.tech_&&this.tech_.el();techEl&&(_width>=0&&(techEl.width=_width),_height>=0&&(techEl.height=_height))}},_proto.loadTech_=function(techName,source){var _this3=this;this.tech_&&this.unloadTech_();var titleTechName=toTitleCase(techName),camelTechName=techName.charAt(0).toLowerCase()+techName.slice(1);"Html5"!==titleTechName&&this.tag&&(Tech.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=titleTechName,this.isReady_=!1;var techOptions={source:source,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+camelTechName+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};ALL.names.forEach(function(name){var props=ALL[name];techOptions[props.getterName]=_this3[props.privateName]}),assign(techOptions,this.options_[titleTechName]),assign(techOptions,this.options_[camelTechName]),assign(techOptions,this.options_[techName.toLowerCase()]),this.tag&&(techOptions.tag=this.tag),source&&source.src===this.cache_.src&&this.cache_.currentTime>0&&(techOptions.startTime=this.cache_.currentTime);var TechClass=Tech.getTech(techName);if(!TechClass)throw new Error("No Tech named '"+titleTechName+"' exists! '"+titleTechName+"' should be registered using videojs.registerTech()'");this.tech_=new TechClass(techOptions),this.tech_.ready(bind(this,this.handleTechReady_),!0),textTrackConverter_jsonToTextTracks(this.textTracksJson_||[],this.tech_),TECH_EVENTS_RETRIGGER.forEach(function(event){_this3.on(_this3.tech_,event,_this3["handleTech"+toTitleCase(event)+"_"])}),Object.keys(TECH_EVENTS_QUEUE).forEach(function(event){_this3.on(_this3.tech_,event,function(eventObj){0===_this3.tech_.playbackRate()&&_this3.tech_.seeking()?_this3.queuedCallbacks_.push({callback:_this3["handleTech"+TECH_EVENTS_QUEUE[event]+"_"].bind(_this3),event:eventObj}):_this3["handleTech"+TECH_EVENTS_QUEUE[event]+"_"](eventObj)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControl
vendor: 6,472 bytes, line 1
1sListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===titleTechName&&this.tag||prependTo(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},_proto.unloadTech_=function(){var _this4=this;ALL.names.forEach(function(name){var props=ALL[name];_this4[props.privateName]=_this4[props.getterName]()}),this.textTracksJson_=textTrackConverter_textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},_proto.tech=function(safety){return void 0===safety&&log.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},_proto.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},_proto.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},_proto.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},_proto.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},_proto.manualAutoplay_=function(type){var _this5=this;if(this.tech_&&"string"==typeof type){var promise,muted=function(){var previouslyMuted=_this5.muted();_this5.muted(!0);var restoreMuted=function(){_this5.muted(previouslyMuted)};_this5.playTerminatedQueue_.push(restoreMuted);var mutedPromise=_this5.play();if(isPromise(mutedPromise))return mutedPromise.catch(restoreMuted)};if("any"===type&&!0!==this.muted()?isPromise(promise=this.play())&&(promise=promise.catch(muted)):promise="muted"===type&&!0!==this.muted()?muted():this.play(),isPromise(promise))return promise.then(function(){_this5.trigger({type:"autoplay-success",autoplay:type})}).catch(function(e){_this5.trigger({type:"autoplay-failure",autoplay:type})})}},_proto.updateSourceCaches_=function(srcObj){void 0===srcObj&&(srcObj="");var src=srcObj,type="";"string"!=typeof src&&(src=srcObj.src,type=srcObj.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],src&&!type&&(type=function(player,src){if(!src)return"";if(player.cache_.source.src===src&&player.cache_.source.type)return player.cache_.source.type;var matchingSources=player.cache_.sources.filter(function(s){return s.src===src});if(matchingSources.length)return matchingSources[0].type;for(var sources=player.$$("source"),i=0;i<sources.length;i++){var s=sources[i];if(s.type&&s.src&&s.src===src)return s.type}return getMimetype(src)}(this,src)),this.cache_.source=mergeOptions({},srcObj,{src:src,type:type});for(var matchingSources=this.cache_.sources.filter(function(s){return s.src&&s.src===src}),sourceElSources=[],sourceEls=this.$$("source"),matchingSourceEls=[],i=0;i<sourceEls.length;i++){var sourceObj=getAttributes(sourceEls[i]);sourceElSources.push(sourceObj),sourceObj.src&&sourceObj.src===src&&matchingSourceEls.push(sourceObj.src)}matchingSourceEls.length&&!matchingSources.length?this.cache_.sources=sourceElSources:matchingSources.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=src},_proto.handleTechSourceset_=function(event){var _this6=this;if(!this.changingSrc_){var updateSourceCaches=function(src){return _this6.updateSourceCaches_(src)},playerSrc=this.currentSource().src,eventSrc=event.src;playerSrc&&!/^blob:/.test(playerSrc)&&/^blob:/.test(eventSrc)&&(!this.lastSource_||this.lastSource_.tech!==eventSrc&&this.lastSource_.player!==playerSrc)&&(updateSourceCaches=function(){}),updateSourceCaches(eventSrc),event.src||this.tech_.any(["sourceset","loadstart"],function(e){if("sourceset"!==e.type){var techSrc=_this6.techGet("currentSrc");_this6.lastSource_.tech=techSrc,_this6.updateSourceCaches_(techSrc)}})}this.lastSource_={player:this.currentSource().src,tech:event.src},this.trigger({src:event.src,type:"sourceset"})},_proto.hasStarted=function(request){if(void 0===request)return this.hasStarted_;request!==this.hasStarted_&&(this.hasStarted_=request,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},_proto.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},_proto.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(queued){return queued.callback(queued.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},_proto.handleTechWaiting_=function(){var _this7=this;this.addClass("vjs-waiting"),this.trigger("waiting");var timeWhenWaiting=this.currentTime();this.on("timeupdate",function timeUpdateListener(){timeWhenWaiting!==_this7.currentTime()&&(_this7.removeClass("vjs-waiting"),_this7.off("timeupdate",timeUpdateListener))})},_proto.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},_proto.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},_proto.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},_proto.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},_proto.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},_proto.handleTechFirstPlay_=function(){this.options_.starttime&&(log.warn("Passing the `starttime` option to the player will be deprecated
1in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},_proto.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},_proto.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},_proto.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},_proto.handleTechClick_=function(event){isSingleLeftClick(event)&&this.controls_&&(this.paused()?silencePromise(this.play()):this.pause())},_proto.handleTechDoubleClick_=function(event){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(el){return el.contains(event.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,event):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},_proto.handleTechTap_=function(){this.userActive(!this.userActive())},_proto.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},_proto.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},_proto.handleTechTouchEnd_=function(event){event.preventDefault()},_proto.handleStageClick_=function(){this.reportUserActivity()},_proto.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},_proto.documentFullscreenChange_=function(e){var targetPlayer=e.target.player;if(!targetPlayer||targetPlayer===this){var el=this.el(),isFs=document[this.fsApi_.fullscreenElement]===el;!isFs&&el.matches?isFs=el.matches(":"+this.fsApi_.fullscreen):!isFs&&el.msMatchesSelector&&(isFs=el.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(isFs)}},_proto.handleTechFullscreenChange_=function(event,data){data&&(data.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(data.isFullscreen))},_proto.handleTechFullscreenError_=function(event,err){this.trigger("fullscreenerror",err)},_proto.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},_proto.handleTechEnterPictureInPicture_=function(event){this.isInPictureInPicture(!0)},_proto.handleTechLeavePictureInPicture_=function(event){this.isInPictureInPicture(!1)},_proto.handleTechError_=function(){var error=this.tech_.error();this.error(error)},_proto.handleTechTextData_=function(){var data=null;arguments.length>1&&(data=arguments[1]),this.trigger("textdata",data)},_proto.getCache=function(){return this.cache_},_proto.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},_proto.techCall_=function(method,arg){this.ready(function(){if(method in allowedSetters)return function(middleware,tech,method,arg){return tech[method](middleware.reduce(middlewareIterator(method),arg))}(this.middleware_,this.tech_,method,arg);if(method in allowedMediators)return mediate(this.middleware_,this.tech_,method,arg);try{this.tech_&&this.tech_[method](arg)}catch(e){throw log(e),e}},!0)},_proto.techGet_=function(method){if(this.tech_&&this.tech_.isReady_){if(method in allowedGetters)return function(middleware,tech,method){return middleware.reduceRight(middlewareIterator(method),tech[method]())}(this.middleware_,this.tech_,method);if(method in allowedMediators)return mediate(this.middleware_,this.tech_,method);try{return this.tech_[method]()}catch(e){if(void 0===this.tech_[method])throw log("Video.js: "+method+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw log("Video.js: "+method+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw log(e),e}}},_proto.play=function(){var _this8=this,PromiseClass=this.options_.Promise||window$1.Promise;return PromiseClass?new PromiseClass(function(resolve){_this8.play_(resolve)}):this.play_()},_proto.play_=function(callback){var _this9=this;void 0===callback&&(callback=silencePromise),this.playCallbacks_.push(callback);
vendor: 7,484 bytes, line 1
1var isSrcReady=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!isSrcReady)return this.waitToPlay_=function(e){_this9.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(isSrcReady||!IS_ANY_SAFARI&&!IS_IOS||this.load());var val=this.techGet_("play");null===val?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(val)},_proto.runPlayTerminatedQueue_=function(){var queue=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],queue.forEach(function(q){q()})},_proto.runPlayCallbacks_=function(val){var callbacks=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],callbacks.forEach(function(cb){cb(val)})},_proto.pause=function(){this.techCall_("pause")},_proto.paused=function(){return!1!==this.techGet_("paused")},_proto.played=function(){return this.techGet_("played")||createTimeRanges(0,0)},_proto.scrubbing=function(isScrubbing){if(void 0===isScrubbing)return this.scrubbing_;this.scrubbing_=!!isScrubbing,this.techCall_("setScrubbing",this.scrubbing_),isScrubbing?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},_proto.currentTime=function(seconds){return void 0!==seconds?(seconds<0&&(seconds=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",seconds),void(this.cache_.initTime=0)):(this.cache_.initTime=seconds,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},_proto.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},_proto.duration=function(seconds){if(void 0===seconds)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(seconds=parseFloat(seconds))<0&&(seconds=1/0),seconds!==this.cache_.duration&&(this.cache_.duration=seconds,seconds===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(seconds)||this.trigger("durationchange"))},_proto.remainingTime=function(){return this.duration()-this.currentTime()},_proto.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},_proto.buffered=function(){var buffered=this.techGet_("buffered");return buffered&&buffered.length||(buffered=createTimeRanges(0,0)),buffered},_proto.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration())},_proto.bufferedEnd=function(){var buffered=this.buffered(),duration=this.duration(),end=buffered.end(buffered.length-1);return end>duration&&(end=duration),end},_proto.volume=function(percentAsDecimal){var vol;return void 0!==percentAsDecimal?(vol=Math.max(0,Math.min(1,parseFloat(percentAsDecimal))),this.cache_.volume=vol,this.techCall_("setVolume",vol),void(vol>0&&this.lastVolume_(vol))):(vol=parseFloat(this.techGet_("volume")),isNaN(vol)?1:vol)},_proto.muted=function(_muted){if(void 0===_muted)return this.techGet_("muted")||!1;this.techCall_("setMuted",_muted)},_proto.defaultMuted=function(_defaultMuted){return void 0!==_defaultMuted?this.techCall_("setDefaultMuted",_defaultMuted):this.techGet_("defaultMuted")||!1},_proto.lastVolume_=function(percentAsDecimal){if(void 0===percentAsDecimal||0===percentAsDecimal)return this.cache_.lastVolume;this.cache_.lastVolume=percentAsDecimal},_proto.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},_proto.isFullscreen=function(isFS){if(void 0!==isFS){var oldValue=this.isFullscreen_;return this.isFullscreen_=Boolean(isFS),this.isFullscreen_!==oldValue&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},_proto.requestFullscreen=function(fullscreenOptions){var PromiseClass=this.options_.Promise||window$1.Promise;if(PromiseClass){var self=this;return new PromiseClass(function(resolve,reject){function offHandler(){self.off("fullscreenerror",errorHandler),self.off("fullscreenchange",changeHandler)}function changeHandler(){offHandler(),resolve()}function errorHandler(e,err){offHandler(),reject(err)}self.one("fullscreenchange",changeHandler),self.one("fullscreenerror",errorHandler);var promise=self.requestFullscreenHelper_(fullscreenOptions);if(promise)return promise.then(offHandler,offHandler),promise})}return this.requestFullscreenHelper_()},_proto.requestFullscreenHelper_=function(fullscreenOptions){var fsOptions,_this10=this;if(this.fsApi_.prefixed||(fsOptions=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==fullscreenOptions&&(fsOptions=fullscreenOptions)),this.fsApi_.requestFullscreen){var promise=this.el_[this.fsApi_.requestFullscreen](fsOptions);return promise&&promise.then(function(){return _this10.isFullscreen(!0)},function(){return _this10.isFullscreen(!1)}),promise}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},_proto.exitFullscreen=function(){var PromiseClass=this.options_.Promise||window$1.Promise;if(PromiseClass){var self=this;return new PromiseClass(function(resolve,reject){function offHandler(){self.off("fullscreenerror",errorHandler),self.off("fullscreenchange",changeHandler)}function changeHandler(){offHandler(),resolve()}function errorHandler(e,err){offHandler(),reject(err)}self.one("fullscreenchange",changeHandler),self.one("fullscreenerror",errorHandler);var promise=self.exitFullscreenHelper_();if(promise)return promise.then(offHandler,offHandler),promise})}return this.exitFullscreenHelper_()},_proto.exitFullscreenHelper_=function(){var _this11=this;if(this.fsApi_.requestFullscreen){var promise=document[this.fsApi_.exitFullscreen]();return promise&&promise.then(function(){return _this11.isFullscreen(!1)}),promise}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},_proto.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=document.documentElement.style.overflow,on(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow="hidden",addClass(document.body,"vjs-full-window"),this.trigger("enterFullWindow")},_proto.fullWindowOnEscKey=function(event){keycode.isEventKey(event,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},_proto.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,off(document,"keydown",this.boundFullWindowOnEscKey_),document.documentElement.style.overflow=this.docOrigOverflow,removeClass(document.body,"vjs-full-window"),this.trigger("exitFullWindow")},_proto.disablePictureInPicture=function(value){if(void 0===value)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",value),this.options_.disablePictureInPicture=value,this.trigger("disablepictureinpicturechanged")},_proto.isInPictureInPicture=function(isPiP){return void 0!==isPiP?(this.isInPictureInPicture_=!!isPiP,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},_proto.requestPictureInPicture=function(){if("pictureInPictureEnabled"in document&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},_proto.exitPictureInPicture=function(){if("pictureInPictureEnabled"in document)return document.exitPictureInPicture()},_proto.handleKeyDown=function(event){var userActions=this.options_.userActions;if(userActions&&userActions.hotkeys){(function(el){var tagName=el.tagName.toLowerCase();if(el.isContentEditable)return!0;
vendor: 16,496 bytes, line 1
1if("input"===tagName)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(el.type);return-1!==["textarea"].indexOf(tagName)})(this.el_.ownerDocument.activeElement)||("function"==typeof userActions.hotkeys?userActions.hotkeys.call(this,event):this.handleHotkeys(event))}},_proto.handleHotkeys=function(event){var hotkeys=this.options_.userActions?this.options_.userActions.hotkeys:{},_hotkeys$fullscreenKe=hotkeys.fullscreenKey,fullscreenKey=void 0===_hotkeys$fullscreenKe?function(keydownEvent){return keycode.isEventKey(keydownEvent,"f")}:_hotkeys$fullscreenKe,_hotkeys$muteKey=hotkeys.muteKey,muteKey=void 0===_hotkeys$muteKey?function(keydownEvent){return keycode.isEventKey(keydownEvent,"m")}:_hotkeys$muteKey,_hotkeys$playPauseKey=hotkeys.playPauseKey,playPauseKey=void 0===_hotkeys$playPauseKey?function(keydownEvent){return keycode.isEventKey(keydownEvent,"k")||keycode.isEventKey(keydownEvent,"Space")}:_hotkeys$playPauseKey;if(fullscreenKey.call(this,event)){event.preventDefault(),event.stopPropagation();var FSToggle=Component.getComponent("FullscreenToggle");!1!==document[this.fsApi_.fullscreenEnabled]&&FSToggle.prototype.handleClick.call(this,event)}else if(muteKey.call(this,event)){event.preventDefault(),event.stopPropagation(),Component.getComponent("MuteToggle").prototype.handleClick.call(this,event)}else if(playPauseKey.call(this,event)){event.preventDefault(),event.stopPropagation(),Component.getComponent("PlayToggle").prototype.handleClick.call(this,event)}},_proto.canPlayType=function(type){for(var can,i=0,j=this.options_.techOrder;i<j.length;i++){var techName=j[i],tech=Tech.getTech(techName);if(tech||(tech=Component.getComponent(techName)),tech){if(tech.isSupported()&&(can=tech.canPlayType(type)))return can}else log.error('The "'+techName+'" tech is undefined. Skipped browser support check for that tech.')}return""},_proto.selectSource=function(sources){var fn,_this12=this,techs=this.options_.techOrder.map(function(techName){return[techName,Tech.getTech(techName)]}).filter(function(_ref){var techName=_ref[0],tech=_ref[1];return tech?tech.isSupported():(log.error('The "'+techName+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),findFirstPassingTechSourcePair=function(outerArray,innerArray,tester){var found;return outerArray.some(function(outerChoice){return innerArray.some(function(innerChoice){if(found=tester(outerChoice,innerChoice))return!0})}),found},finder=function(_ref2,source){var techName=_ref2[0];if(_ref2[1].canPlaySource(source,_this12.options_[techName.toLowerCase()]))return{source:source,tech:techName}};return(this.options_.sourceOrder?findFirstPassingTechSourcePair(sources,techs,(fn=finder,function(a,b){return fn(b,a)})):findFirstPassingTechSourcePair(techs,sources,finder))||!1},_proto.src=function(source){var _this13=this;if(void 0===source)return this.cache_.src||"";var sources=function filterSource(src){if(Array.isArray(src)){var newsrc=[];src.forEach(function(srcobj){srcobj=filterSource(srcobj),Array.isArray(srcobj)?newsrc=newsrc.concat(srcobj):isObject(srcobj)&&newsrc.push(srcobj)}),src=newsrc}else src="string"==typeof src&&src.trim()?[fixSource({src:src})]:isObject(src)&&"string"==typeof src.src&&src.src&&src.src.trim()?[fixSource(src)]:[];return src}(source);sources.length?(this.changingSrc_=!0,this.cache_.sources=sources,this.updateSourceCaches_(sources[0]),setSource(this,sources[0],function(middlewareSource,mws){var middleware,tech;if(_this13.middleware_=mws,_this13.cache_.sources=sources,_this13.updateSourceCaches_(middlewareSource),_this13.src_(middlewareSource))return sources.length>1?_this13.src(sources.slice(1)):(_this13.changingSrc_=!1,_this13.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void _this13.triggerReady());middleware=mws,tech=_this13.tech_,middleware.forEach(function(mw){return mw.setTech&&mw.setTech(tech)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},_proto.src_=function(source){var str1,str2,_this14=this,sourceTech=this.selectSource([source]);return!sourceTech||(str1=sourceTech.tech,str2=this.techName_,toTitleCase(str1)!==toTitleCase(str2)?(this.changingSrc_=!0,this.loadTech_(sourceTech.tech,sourceTech.source),this.tech_.ready(function(){_this14.changingSrc_=!1}),!1):(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",source):this.techCall_("src",source.src),this.changingSrc_=!1},!0),!1))},_proto.load=function(){this.techCall_("load")},_proto.reset=function(){var _this15=this,PromiseClass=this.options_.Promise||window$1.Promise;this.paused()||!PromiseClass?this.doReset_():silencePromise(this.play().then(function(){return _this15.doReset_()}))},_proto.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),isEvented(this)&&this.trigger("playerreset")},_proto.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},_proto.resetProgressBar_=function(){this.currentTime(0);var _this$controlBar=this.controlBar,durationDisplay=_this$controlBar.durationDisplay,remainingTimeDisplay=_this$controlBar.remainingTimeDisplay;durationDisplay&&durationDisplay.updateContent(),remainingTimeDisplay&&remainingTimeDisplay.updateContent()},_proto.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},_proto.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},_proto.currentSources=function(){var source=this.currentSource(),sources=[];return 0!==Object.keys(source).length&&sources.push(source),this.cache_.sources||sources},_proto.currentSource=function(){return this.cache_.source||{}},_proto.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},_proto.currentType=function(){return this.currentSource()&&this.currentSource().type||""},_proto.preload=function(value){return void 0!==value?(this.techCall_("setPreload",value),void(this.options_.preload=value)):this.techGet_("preload")},_proto.autoplay=function(value){if(void 0===value)return this.options_.autoplay||!1;var techAutoplay;"string"==typeof value&&/(any|play|muted)/.test(value)?(this.options_.autoplay=value,this.manualAutoplay_(value),techAutoplay=!1):this.options_.autoplay=!!value,techAutoplay=void 0===techAutoplay?this.options_.autoplay:techAutoplay,this.tech_&&this.techCall_("setAutoplay",techAutoplay)},_proto.playsinline=function(value){return void 0!==value?(this.techCall_("setPlaysinline",value),this.options_.playsinline=value,this):this.techGet_("playsinline")},_proto.loop=function(value){return void 0!==value?(this.techCall_("setLoop",value),void(this.options_.loop=value)):this.techGet_("loop")},_proto.poster=function(src){if(void 0===src)return this.poster_;src||(src=""),src!==this.poster_&&(this.poster_=src,this.techCall_("setPoster",src),this.isPosterFromTech_=!1,this.trigger("posterchange"))},_proto.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var newPoster=this.tech_.poster()||"";newPoster!==this.poster_&&(this.poster_=newPoster,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},_proto.controls=function(bool){if(void 0===bool)return!!this.controls_;bool=!!bool,this.controls_!==bool&&(this.controls_=bool,this.usingNativeControls()&&this.techCall_("setControls",bool),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},_proto.usingNativeControls=function(bool){if(void 0===bool)return!!this.usingNativeControls_;bool=!!bool,this.usingNativeControls_!==bool&&(this.usingNativeControls_=bool,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},_proto.error=function(err){if(void 0===err)return this.error_||null;if(this.options_.suppressNotSupportedError&&err&&4===err.code){var triggerSuppressedError=function(){this.error(err)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],triggerSuppressedError),void this.one("loadstart",function(){this.off(["click","touchstart"],triggerSuppressedError)})}if(null===err)return this.error_=err,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new MediaError(err),this.addClass("vjs-error"),log.error("(CODE:"+this.error_.code+" "+MediaError.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},_proto.reportUserActivity=function(event){this.userActivity_=!0},_proto.userActive=function(bool){if(void 0===bool)return this.userActive_;if((bool=!!bool)!==this.userActive_){if(this.userActive_=bool,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},_proto.listenForUserActivity_=function(){var mouseInProgress,lastMoveX,lastMoveY,handleActivity=bind(this,this.reportUserActivity),handleMouseUpAndMouseLeave=function(event){handleActivity(),this.clearInterval(mouseInProgress)};this.on("mousedown",function(){handleActivity(),this.clearInterval(mouseInProgress),mouseInProgress=this.setInterval(handleActivity,250)}),this.on("mousemove",function(e){e.screenX===lastMoveX&&e.screenY===lastMoveY||(lastMoveX=e.screenX,lastMoveY=e.screenY,handleActivity())}),this.on("mouseup",handleMouseUpAndMouseLeave),this.on("mouseleave",handleMouseUpAndMouseLeave);var inactivityTimeout,controlBar=this.getChild("controlBar");!controlBar||IS_IOS||IS_ANDROID||(controlBar.on("mouseenter",function(event){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0}),controlBar.on("mouseleave",function(event){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",handleActivity),this.on("keyup",handleActivity),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(inactivityTimeout);var timeout=this.options_.inactivityTimeout;timeout<=0||(inactivityTimeout=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},timeout))}},250)},_proto.playbackRate=function(rate){if(void 0===rate)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",rate)},_proto.defaultPlaybackRate=function(rate){return void 0!==rate?this.techCall_("setDefaultPlaybackRate",rate):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},_proto.isAudio=function(bool){if(void 0===bool)return!!this.isAudio_;this.isAudio_=!!bool},_proto.addTextTrack=function(kind,label,language){if(this.tech_)return this.tech_.addTextTrack(kind,label,language)},_proto.addRemoteTextTrack=function(options,manualCleanup){if(this.tech_)return this.tech_.addRemoteTextTrack(options,manualCleanup)},_proto.removeRemoteTextTrack=function(obj){void 0===obj&&(obj={});var track=obj.track;if(track||(track=obj),this.tech_)return this.tech_.removeRemoteTextTrack(track)},_proto.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},_proto.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},_proto.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},_proto.language=function(code){if(void 0===code)return this.language_;this.language_=String(code).toLowerCase()},_proto.languages=function(){return mergeOptions(Player.prototype.options_.languages,this.languages_)},_proto.toJSON=function(){var options=mergeOptions(this.options_),tracks=options.tracks;options.tracks=[];for(var i=0;i<tracks.length;i++){var track=tracks[i];(track=mergeOptions(track)).player=void 0,options.tracks[i]=track}return options},_proto.createModal=function(content,options){var _this16=this;(options=options||{}).content=content||"";var modal=new ModalDialog(this,options);return this.addChild(modal),modal.on("dispose",function(){_this16.removeChild(modal)}),modal.open(),modal},_proto.updateCurrentBreakpoint_=function(){if(this.responsive())for(var currentBreakpoint=this.currentBreakpoint(),currentWidth=this.currentWidth(),i=0;i<BREAKPOINT_ORDER.length;i++){var candidateBreakpoint=BREAKPOINT_ORDER[i];if(currentWidth<=this.breakpoints_[candidateBreakpoint]){if(currentBreakpoint===candidateBreakpoint)return;currentBreakpoint&&this.removeClass(BREAKPOINT_CLASSES[currentBreakpoint]),this.addClass(BREAKPOINT_CLASSES[candidateBreakpoint]),this.breakpoint_=candidateBreakpoint;break}}},_proto.removeCurrentBreakpoint_=function(){var className=this.currentBreakpointClass();this.breakpoint_="",className&&this.removeClass(className)},_proto.breakpoints=function(_breakpoints){return void 0===_breakpoints?assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=assign({},DEFAULT_BREAKPOINTS,_breakpoints),this.updateCurrentBreakpoint_(),assign(this.breakpoints_))},_proto.responsive=function(value){return void 0===value?this.responsive_:(value=Boolean(value))!==this.responsive_?(this.responsive_=value,value?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),value):void 0},_proto.currentBreakpoint=function(){return this.breakpoint_},_proto.currentBreakpointClass=function(){return BREAKPOINT_CLASSES[this.breakpoint_]||""},_proto.loadMedia=function(media,ready){var _this17=this;if(media&&"object"==typeof media){this.reset(),this.cache_.media=mergeOptions(media);var _this$cache_$media=this.cache_.media,artwork=_this$cache_$media.artwork,poster=_this$cache_$media.poster,src=_this$cache_$media.src,textTracks=_this$cache_$media.textTracks;!artwork&&poster&&(this.cache_.media.artwork=[{src:poster,type:getMimetype(poster)}]),src&&this.src(src),poster&&this.poster(poster),Array.isArray(textTracks)&&textTracks.forEach(function(tt){return _this17.addRemoteTextTrack(tt,!1)}),this.ready(ready)}},_proto.getMedia=function(){if(!this.cache_.media){var poster=this.poster(),media={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(tt){return{kind:tt.kind,label:tt.label,language:tt.language,src:tt.src}})};return poster&&(media.poster=poster,media.artwork=[{src:media.poster,type:getMimetype(media.poster)}]),media}return mergeOptions(this.cache_.media)},Player.getTagSettings=function(tag){var baseOptions={sources:[],tracks:[]},tagOptions=getAttributes(tag),dataSetup=tagOptions["data-setup"];if(hasClass(tag,"vjs-fill")&&(tagOptions.fill=!0),hasClass(tag,"vjs-fluid")&&(tagOptions.fluid=!0),null!==dataSetup){var _safeParseTuple=safeParseTuple(dataSetup||"{}"),err=_safeParseTuple[0],data=_safeParseTuple[1];err&&log.error(err),assign(tagOptions,data)}if(assign(baseOptions,tagOptions),tag.hasChildNodes())for(var children=tag.childNodes,i=0,j=children.length;i<j;i++){var child=children[i],childName=child.nodeName.toLowerCase();"source"===childName?baseOptions.sources.push(getAttributes(child)):"track"===childName&&baseOptions.tracks.push(getAttributes(child))}return baseOptions},_proto.flexNotSupported_=function(){var elem=document.createElement("i");return!("flexBasis"in elem.style||"webkitFlexBasis"in elem.style||"mozFlexBasis"in elem.style||"msFlexBasis"in elem.style||"msFlexOrder"in elem.style)},_proto.debug=function(enabled){if(void 0===enabled)return this.debugEnabled_;enabled?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},Player}(Component);
vendor: 4,316 bytes, line 1
1ALL.names.forEach(function(name){var props=ALL[name];Player.prototype[props.getterName]=function(){return this.tech_?this.tech_[props.getterName]():(this[props.privateName]=this[props.privateName]||new props.ListClass,this[props.privateName])}}),Player.prototype.crossorigin=Player.prototype.crossOrigin,Player.players={};var navigator=window$1.navigator;Player.prototype.options_={techOrder:Tech.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:navigator&&(navigator.languages&&navigator.languages[0]||navigator.userLanguage||navigator.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(fn){Player.prototype[fn]=function(){return this.techGet_(fn)}}),TECH_EVENTS_RETRIGGER.forEach(function(event){Player.prototype["handleTech"+toTitleCase(event)+"_"]=function(){return this.trigger(event)}}),Component.registerComponent("Player",Player);var pluginStorage={},pluginExists=function(name){return pluginStorage.hasOwnProperty(name)},getPlugin=function(name){return pluginExists(name)?pluginStorage[name]:void 0},markPluginAsActive=function(player,name){player.activePlugins_=player.activePlugins_||{},player.activePlugins_[name]=!0},triggerSetupEvent=function(player,hash,before){var eventName=(before?"before":"")+"pluginsetup";player.trigger(eventName,hash),player.trigger(eventName+":"+hash.name,hash)},createPluginFactory=function(name,PluginSubClass){return PluginSubClass.prototype.name=name,function(){triggerSetupEvent(this,{name:name,plugin:PluginSubClass,instance:null},!0);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];var instance=_construct(PluginSubClass,[this].concat(args));return this[name]=function(){return instance},triggerSetupEvent(this,instance.getEventHash()),instance}},Plugin=function(){function Plugin(player){if(this.constructor===Plugin)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=player,this.log||(this.log=this.player.log.createLogger(this.name)),evented(this),delete this.trigger,stateful(this,this.constructor.defaultState),markPluginAsActive(player,this.name),this.dispose=bind(this,this.dispose),player.on("dispose",this.dispose)}var _proto=Plugin.prototype;return _proto.version=function(){return this.constructor.VERSION},_proto.getEventHash=function(hash){return void 0===hash&&(hash={}),hash.name=this.name,hash.plugin=this.constructor,hash.instance=this,hash},_proto.trigger=function(event,hash){return void 0===hash&&(hash={}),trigger(this.eventBusEl_,event,this.getEventHash(hash))},_proto.handleStateChanged=function(e){},_proto.dispose=function(){var name=this.name,player=this.player;this.trigger("dispose"),this.off(),player.off("dispose",this.dispose),player.activePlugins_[name]=!1,this.player=this.state=null,player[name]=createPluginFactory(name,pluginStorage[name])},Plugin.isBasic=function(plugin){var p="string"==typeof plugin?getPlugin(plugin):plugin;return"function"==typeof p&&!Plugin.prototype.isPrototypeOf(p.prototype)},Plugin.registerPlugin=function(name,plugin){if("string"!=typeof name)throw new Error('Illegal plugin name, "'+name+'", must be a string, was '+typeof name+".");if(pluginExists(name))log.warn('A plugin named "'+name+'" already exists. You may want to avoid re-registering plugins!');else if(Player.prototype.hasOwnProperty(name))throw new Error('Illegal plugin name, "'+name+'", cannot share a name with an existing player method!');if("function"!=typeof plugin)throw new Error('Illegal plugin for "'+name+'", must be a function, was '+typeof plugin+".");return pluginStorage[name]=plugin,"plugin"!==name&&(Plugin.isBasic(plugin)?Player.prototype[name]=function(name,plugin){var basicPluginWrapper=function(){triggerSetupEvent(this,{name:name,plugin:plugin,instance:null},!0);var instance=plugin.apply(this,arguments);return markPluginAsActive(this,name),triggerSetupEvent(this,{name:name,plugin:plugin,instance:instance}),instance};
vendor: 7,333 bytes, line 1
1return Object.keys(plugin).forEach(function(prop){basicPluginWrapper[prop]=plugin[prop]}),basicPluginWrapper}(name,plugin):Player.prototype[name]=createPluginFactory(name,plugin)),plugin},Plugin.deregisterPlugin=function(name){if("plugin"===name)throw new Error("Cannot de-register base plugin.");pluginExists(name)&&(delete pluginStorage[name],delete Player.prototype[name])},Plugin.getPlugins=function(names){var result;return void 0===names&&(names=Object.keys(pluginStorage)),names.forEach(function(name){var plugin=getPlugin(name);plugin&&((result=result||{})[name]=plugin)}),result},Plugin.getPluginVersion=function(name){var plugin=getPlugin(name);return plugin&&plugin.VERSION||""},Plugin}();Plugin.getPlugin=getPlugin,Plugin.BASE_PLUGIN_NAME="plugin",Plugin.registerPlugin("plugin",Plugin),Player.prototype.usingPlugin=function(name){return!!this.activePlugins_&&!0===this.activePlugins_[name]},Player.prototype.hasPlugin=function(name){return!!pluginExists(name)};var normalizeId=function(id){return 0===id.indexOf("#")?id.slice(1):id};function videojs$1(id,options,ready){var player=videojs$1.getPlayer(id);if(player)return options&&log.warn('Player "'+id+'" is already initialised. Options will not be applied.'),ready&&player.ready(ready),player;var el="string"==typeof id?$("#"+normalizeId(id)):id;if(!isEl(el))throw new TypeError("The element or ID supplied is not valid. (videojs)");el.ownerDocument.defaultView&&el.ownerDocument.body.contains(el)||log.warn("The element supplied is not included in the DOM"),options=options||{},videojs$1.hooks("beforesetup").forEach(function(hookFunction){var opts=hookFunction(el,mergeOptions(options));isObject(opts)&&!Array.isArray(opts)?options=mergeOptions(options,opts):log.error("please return an object in beforesetup hooks")});var PlayerComponent=Component.getComponent("Player");return player=new PlayerComponent(el,options,ready),videojs$1.hooks("setup").forEach(function(hookFunction){return hookFunction(player)}),player}if(videojs$1.hooks_={},videojs$1.hooks=function(type,fn){return videojs$1.hooks_[type]=videojs$1.hooks_[type]||[],fn&&(videojs$1.hooks_[type]=videojs$1.hooks_[type].concat(fn)),videojs$1.hooks_[type]},videojs$1.hook=function(type,fn){videojs$1.hooks(type,fn)},videojs$1.hookOnce=function(type,fn){videojs$1.hooks(type,[].concat(fn).map(function(original){return function wrapper(){return videojs$1.removeHook(type,wrapper),original.apply(void 0,arguments)}}))},videojs$1.removeHook=function(type,fn){var index=videojs$1.hooks(type).indexOf(fn);return!(index<=-1)&&(videojs$1.hooks_[type]=videojs$1.hooks_[type].slice(),videojs$1.hooks_[type].splice(index,1),!0)},!0!==window$1.VIDEOJS_NO_DYNAMIC_STYLE&&isReal()){var style=$(".vjs-styles-defaults");if(!style){style=createStyleElement("vjs-styles-defaults");var head=$("head");head&&head.insertBefore(style,head.firstChild),setTextContent(style,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}autoSetupTimeout(1,videojs$1),videojs$1.VERSION=version,videojs$1.options=Player.prototype.options_,videojs$1.getPlayers=function(){return Player.players},videojs$1.getPlayer=function(id){var tag,players=Player.players;if("string"==typeof id){var nId=normalizeId(id),player=players[nId];if(player)return player;tag=$("#"+nId)}else tag=id;if(isEl(tag)){var _tag=tag,_player=_tag.player,playerId=_tag.playerId;if(_player||players[playerId])return _player||players[playerId]}},videojs$1.getAllPlayers=function(){return Object.keys(Player.players).map(function(k){return Player.players[k]}).filter(Boolean)},videojs$1.players=Player.players,videojs$1.getComponent=Component.getComponent,videojs$1.registerComponent=function(name,comp){Tech.isTech(comp)&&log.warn("The "+name+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Component.registerComponent.call(Component,name,comp)},videojs$1.getTech=Tech.getTech,videojs$1.registerTech=Tech.registerTech,videojs$1.use=function(type,middleware){middlewares[type]=middlewares[type]||[],middlewares[type].push(middleware)},Object.defineProperty(videojs$1,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(videojs$1.middleware,"TERMINATOR",{value:TERMINATOR,writeable:!1,enumerable:!0}),videojs$1.browser=browser,videojs$1.TOUCH_ENABLED=TOUCH_ENABLED,videojs$1.extend=function(superClass,subClassMethods){void 0===subClassMethods&&(subClassMethods={});var subClass=function(){superClass.apply(this,arguments)},methods={};for(var name in"object"==typeof subClassMethods?(subClassMethods.constructor!==Object.prototype.constructor&&(subClass=subClassMethods.constructor),methods=subClassMethods):"function"==typeof subClassMethods&&(subClass=subClassMethods),_inherits(subClass,superClass),superClass&&(subClass.super_=superClass),methods)methods.hasOwnProperty(name)&&(subClass.prototype[name]=methods[name]);return subClass},videojs$1.mergeOptions=mergeOptions,videojs$1.bind=bind,videojs$1.registerPlugin=Plugin.registerPlugin,videojs$1.deregisterPlugin=Plugin.deregisterPlugin,videojs$1.plugin=function(name,plugin){return log.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Plugin.registerPlugin(name,plugin)},videojs$1.getPlugins=Plugin.getPlugins,videojs$1.getPlugin=Plugin.getPlugin,videojs$1.getPluginVersion=Plugin.getPluginVersion,videojs$1.addLanguage=function(code,data){var _mergeOptions;return code=(""+code).toLowerCase(),videojs$1.options.languages=mergeOptions(videojs$1.options.languages,((_mergeOptions={})[code]=data,_mergeOptions)),videojs$1.options.languages[code]},videojs$1.log=log,videojs$1.createLogger=createLogger$1,videojs$1.createTimeRange=videojs$1.createTimeRanges=createTimeRanges,videojs$1.formatTime=formatTime,videojs$1.setFormatTime=function(customImplementation){implementation=customImplementation},videojs$1.resetFormatTime=function(){implementation=defaultImplementation},videojs$1.parseUrl=parseUrl,videojs$1.isCrossOrigin=isCrossOrigin,videojs$1.EventTarget=EventTarget,videojs$1.on=on,videojs$1.one=one,videojs$1.off=off,videojs$1.trigger=trigger,videojs$1.xhr=XHR,videojs$1.TextTrack=TextTrack,videojs$1.AudioTrack=AudioTrack,videojs$1.VideoTrack=VideoTrack,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(k){videojs$1[k]=function(){return log.warn("videojs."+k+"() is deprecated; use videojs.dom."+k+"() instead"),Dom[k].apply(null,arguments)}}),videojs$1.computedStyle=computedStyle,videojs$1.dom=Dom,videojs$1.url=Url,videojs$1.defineLazyProperty=defineLazyProperty;var currentTransmux,resolveUrl=_resolveUrl,resolveManifestRedirect=function(handleManifestRedirect,url,req){return handleManifestRedirect&&req&&req.responseURL&&url!==req.responseURL?req.responseURL:url},log$1=videojs$1.log,createPlaylistID=function(index,uri){return index+"-"+uri},parseManifest=function(_ref){var manifestString=_ref.manifestString,_ref$customTagParsers=_ref.customTagParsers,customTagParsers=void 0===_ref$customTagParsers?[]:_ref$customTagParsers,_ref$customTagMappers=_ref.customTagMappers,customTagMappers=void 0===_ref$customTagMappers?[]:_ref$customTagMappers,parser=new m3u8Parser.Parser;
1return customTagParsers.forEach(function(customParser){return parser.addParser(customParser)}),customTagMappers.forEach(function(mapper){return parser.addTagMapper(mapper)}),parser.push(manifestString),parser.end(),parser.manifest},forEachMediaGroup=function(master,callback){["AUDIO","SUBTITLES"].forEach(function(mediaType){for(var groupKey in master.mediaGroups[mediaType])for(var labelKey in master.mediaGroups[mediaType][groupKey]){var mediaProperties=master.mediaGroups[mediaType][groupKey][labelKey];callback(mediaProperties,mediaType,groupKey,labelKey)}})},setupMediaPlaylist=function(_ref2){var playlist=_ref2.playlist,uri=_ref2.uri,id=_ref2.id;playlist.id=id,uri&&(playlist.uri=uri),playlist.attributes=playlist.attributes||{}},addPropertiesToMaster=function(master,uri){master.uri=uri;for(var i=0;i<master.playlists.length;i++)if(!master.playlists[i].uri){var phonyUri="placeholder-uri-"+i;master.playlists[i].uri=phonyUri}forEachMediaGroup(master,function(properties,mediaType,groupKey,labelKey){if(properties.playlists&&properties.playlists.length&&!properties.playlists[0].uri){var phonyUri="placeholder-uri-"+mediaType+"-"+groupKey+"-"+labelKey,id=createPlaylistID(0,phonyUri);properties.playlists[0].uri=phonyUri,properties.playlists[0].id=id,master.playlists[id]=properties.playlists[0],master.playlists[phonyUri]=properties.playlists[0]}}),function(master){for(var i=master.playlists.length;i--;){var playlist=master.playlists[i];setupMediaPlaylist({playlist:playlist,id:createPlaylistID(i,playlist.uri)}),playlist.resolvedUri=resolveUrl(master.uri,playlist.uri),master.playlists[playlist.id]=playlist,master.playlists[playlist.uri]=playlist,playlist.attributes.BANDWIDTH||log$1.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(master),function(master){forEachMediaGroup(master,function(properties){properties.uri&&(properties.resolvedUri=resolveUrl(master.uri,properties.uri))})}(master)},mergeOptions$1=videojs$1.mergeOptions,EventTarget$1=videojs$1.EventTarget,resolveSegmentUris=function(segment,baseUri){segment.resolvedUri||(segment.resolvedUri=resolveUrl(baseUri,segment.uri)),segment.key&&!segment.key.resolvedUri&&(segment.key.resolvedUri=resolveUrl(baseUri,segment.key.uri)),segment.map&&!segment.map.resolvedUri&&(segment.map.resolvedUri=resolveUrl(baseUri,segment.map.uri))},updateMaster=function(master,media){var result=mergeOptions$1(master,{}),playlist=result.playlists[media.id];if(!playlist)return null;if(playlist.segments&&media.segments&&playlist.segments.length===media.segments.length&&playlist.endList===media.endList&&playlist.mediaSequence===media.mediaSequence)return null;var mergedPlaylist=mergeOptions$1(playlist,media);playlist.segments&&(mergedPlaylist.segments=function(original,update,offset){var result=update.slice();offset=offset||0;for(var length=Math.min(original.length,update.length+offset),i=offset;i<length;i++)result[i-offset]=mergeOptions$1(original[i],result[i-offset]);return result}(playlist.segments,media.segments,media.mediaSequence-playlist.mediaSequence)),mergedPlaylist.segments.forEach(function(segment){resolveSegmentUris(segment,mergedPlaylist.resolvedUri)});for(var i=0;i<result.playlists.length;i++)result.playlists[i].id===media.id&&(result.playlists[i]=mergedPlaylist);return result.playlists[media.id]=mergedPlaylist,result.playlists[media.uri]=mergedPlaylist,result},refreshDelay=function(media,update){var lastSegment=media.segments[media.segments.length-1];return update&&lastSegment&&lastSegment.duration?1e3*lastSegment.duration:500*(media.targetDuration||10)},PlaylistLoader=function(_EventTarget){function PlaylistLoader(src,vhs,options){var _this;if(void 0===options&&(options={}),_this=_EventTarget.call(this)||this,!src)throw new Error("A non-empty playlist URL or object is required");var _options=options,_options$withCredenti=_options.withCredentials,withCredentials=void 0!==_options$withCredenti&&_options$withCredenti,_options$handleManife=_options.handleManifestRedirects,handleManifestRedirects=void 0!==_options$handleManife&&_options$handleManife;_this.src=src,_this.vhs_=vhs,_this.withCredentials=withCredentials,_this.handleManifestRedirects=handleManifestRedirects;var vhsOptions=vhs.options_;return _this.customTagParsers=vhsOptions&&vhsOptions.customTagParsers||[],_this.customTagMappers=vhsOptions&&vhsOptions.customTagMappers||[],_this.state="HAVE_NOTHING",_this.on("mediaupdatetimeout",function(){"HAVE_METADATA"===_this.state&&(_this.state="HAVE_CURRENT_METADATA",_this.request=_this.vhs_.xhr({uri:resolveUrl(_this.master.uri,_this.media().uri),withCredentials:_this.withCredentials},function(error,req){if(_this.request)return error?_this.playlistRequestError(_this.request,_this.media(),"HAVE_METADATA"):void _this.haveMetadata({playlistString:_this.request.responseText,url:_this.media().uri,id:_this.media().id})}))}),_this}_inheritsLoose(PlaylistLoader,_EventTarget);var _proto=PlaylistLoader.prototype;return _proto.playlistRequestError=function(xhr,playlist,startingState){var uri=playlist.uri,id=playlist.id;this.request=null,startingState&&(this.state=startingState),this.error={playlist:this.master.playlists[id],status:xhr.status,message:"HLS playlist request error at URL: "+uri+".",responseText:xhr.responseText,code:xhr.status>=500?4:2},this.trigger("error")},_proto.haveMetadata=function(_ref){var _this2=this,playlistString=_ref.playlistString,playlistOb
1ject=_ref.playlistObject,url=_ref.url,id=_ref.id;this.request=null,this.state="HAVE_METADATA";var playlist=playlistObject||parseManifest({manifestString:playlistString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});setupMediaPlaylist({playlist:playlist,uri:url,id:id});var update=updateMaster(this.master,playlist);this.targetDuration=playlist.targetDuration,update?(this.master=update,this.media_=this.master.playlists[id]):this.trigger("playlistunchanged"),this.media().endList||(window$1.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=window$1.setTimeout(function(){_this2.trigger("mediaupdatetimeout")},refreshDelay(this.media(),!!update))),this.trigger("loadedplaylist")},_proto.dispose=function(){this.trigger("dispose"),this.stopRequest(),window$1.clearTimeout(this.mediaUpdateTimeout),window$1.clearTimeout(this.finalRenditionTimeout),this.off()},_proto.stopRequest=function(){if(this.request){var oldRequest=this.request;this.request=null,oldRequest.onreadystatechange=null,oldRequest.abort()}},_proto.media=function(playlist,isFinalRendition){var _this3=this;if(!playlist)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof playlist){if(!this.master.playlists[playlist])throw new Error("Unknown playlist URI: "+playlist);playlist=this.master.playlists[playlist]}if(window$1.clearTimeout(this.finalRenditionTimeout),isFinalRendition){var delay=playlist.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=window$1.setTimeout(this.media.bind(this,playlist,!1),delay)}else{var startingState=this.state,mediaChange=!this.media_||playlist.id!==this.media_.id;if(this.master.playlists[playlist.id].endList||playlist.endList&&playlist.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=playlist,void(mediaChange&&(this.trigger("mediachanging"),"HAVE_MASTER"===startingState?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(mediaChange){if(this.state="SWITCHING_MEDIA",this.request){if(playlist.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:playlist.resolvedUri,withCredentials:this.withCredentials},function(error,req){if(_this3.request){if(playlist.resolvedUri=resolveManifestRedirect(_this3.handleManifestRedirects,playlist.resolvedUri,req),error)return _this3.playlistRequestError(_this3.request,playlist,startingState);_this3.haveMetadata({playlistString:req.responseText,url:playlist.uri,id:playlist.id}),"HAVE_MASTER"===startingState?_this3.trigger("loadedmetadata"):_this3.trigger("mediachange")}})}}},_proto.pause=function(){this.stopRequest(),window$1.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},_proto.load=function(isFinalRendition){var _this4=this;window$1.clearTimeout(this.mediaUpdateTimeout);var media=this.media();if(isFinalRendition){var delay=media?media.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=window$1.setTimeout(function(){return _this4.load()},delay)}else this.started?media&&!media.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},_proto.start=function(){var _this5=this;
1if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=window$1.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){_this5.setupInitialPlaylist(_this5.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(error,req){if(_this5.request){if(_this5.request=null,error)return _this5.error={status:req.status,message:"HLS playlist request error at URL: "+_this5.src+".",responseText:req.responseText,code:2},"HAVE_NOTHING"===_this5.state&&(_this5.started=!1),_this5.trigger("error");_this5.src=resolveManifestRedirect(_this5.handleManifestRedirects,_this5.src,req);var manifest=parseManifest({manifestString:req.responseText,customTagParsers:_this5.customTagParsers,customTagMappers:_this5.customTagMappers});_this5.setupInitialPlaylist(manifest)}})},_proto.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},_proto.setupInitialPlaylist=function(manifest){if(this.state="HAVE_MASTER",manifest.playlists)return this.master=manifest,addPropertiesToMaster(this.master,this.srcUri()),manifest.playlists.forEac
1h(function(playlist){playlist.segments&&playlist.segments.forEach(function(segment){resolveSegmentUris(segment,playlist.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var uri=this.srcUri()||window$1.location.href;this.master=function(media,uri){var id=createPlaylistID(0,uri),master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:window$1.location.href,resolvedUri:window$1.location.href,playlists:[{uri:uri,id:id,resolvedUri:uri,attributes:{}}]};return master.playlists[id]=master.playlists[0],master.playlists[uri]=master.playlists[0],master}(0,uri),this.haveMetadata({playlistObject:manifest,url:uri,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},PlaylistLoader}(EventTarget$1),filterRanges=function(timeRanges,predicate){var i,results=[];if(timeRanges&&timeRanges.length)for(i=0;i<timeRanges.length;i++)predicate(timeRanges.start(i),timeRanges.end(i))&&results.push([timeRanges.start(i),timeRanges.end(i)]);return videojs$1.createTimeRanges(results)},findRange=function(buffered,time){return filterRanges(buffered,function(start,end){return start-.1<=time&&end+.1>=time})},findNextRange=function(timeRanges,time){return filterRanges(timeRanges,function(start){return start-1/30>=time})},printableRange=function(range){var strArr=[];if(!range||!range.length)return"";for(var i=0;i<range.length;i++)strArr.push(range.start(i)+" => "+range.end(i));return strArr.join(", ")},timeRangesToArray=function(timeRanges){for(var timeRangesList=[],i=0;i<timeRanges.length;i++)timeRangesList.push({start:timeRanges.start(i),end:timeRanges.end(i)});return timeRangesList},createTimeRange=videojs$1.createTimeRange,intervalDuration=function(playlist,endSequence,expired){if(void 0===endSequence&&(endSequence=playlist.mediaSequence+playlist.segments.length),endSequence<playlist.mediaSequence)return 0;var backward=function(playlist,endSequence){var result=0,i=endSequence-playlist.mediaSequence,segment=playlist.segments[i];if(segment){if(void 0!==segment.start)return{result:segment.start,precise:!0};if(void 0!==segment.end)return{result:segment.end-segment.duration,precise:!0}}for(;i--;){if(void 0!==(segment=playlist.segments[i]).end)return{result:result+segment.end,precise:!0};if(result+=segment.duration,void 0!==segment.start)return{result:result+segment.start,precise:!0}}return{result:result,precise:!1}}(playlist,endSequence);if(backward.precise)return backward.result;var forward=function(playlist,endSequence){for(var segment,result=0,i=endSequence-playlist.mediaSequence;i<playlist.segments.length;i++){if(void 0!==(segment=playlist.segments[i]).start)return{result:segment.start-result,precise:!0};if(result+=segment.duration,void 0!==segment.end)return{result:segment.end-result,precise:!0}}return{result:-1,precise:!1}}(playlist,endSequence);return forward.precise?forward.result:backward.result+expired},duration=function(playlist,endSequence,expired){if(!playlist)return 0;if("number"!=typeof expired&&(expired=0),void 0===endSequence){if(playlist.totalDuration)return playlist.totalDuration;if(!playlist.endList)return window$1.Infinity}return intervalDuration(playlist,endSequence,expired)},sumDurations=function(playlist,startIndex,endIndex){var durations=0;if(startIndex>endIndex){var _ref=[endIndex,startIndex];startIndex=_ref[0],endIndex=_ref[1]}if(startIndex<0){for(var i=startIndex;i<Math.min(0,endIndex);i++)durations+=playlist.targetDuration;startIndex=0}for(var _i=startIndex;_i<endIndex;_i++)durations+=playlist.segments[_i].duration;return durations},safeLiveIndex=function(playlist,liveEdgePadding){if(!playlist.segments.length)return 0;var i=playlist.segments.length,lastSegmentDuration=playlist.segments[i-1].duration||playlist.targetDuration,safeDistance="number"==typeof liveEdgePadding?liveEdgePadding:lastSegmentDuration+2*playlist.targetDuration;if(0===safeDistance)return i;for(var distanceFromEnd=0;i--&&!((distanceFromEnd+=playlist.segments[i].duration)>=safeDistance););return Math.max(0,i)},playlistEnd=function(playlist,expired,useSafeLiveEnd,liveEdgePadding){if(!playlist||!playlist.segments)return null;if(playlist.endList)return duration(playlist);
vendor: 5,810 bytes, line 1
1if(null===expired)return null;expired=expired||0;var endSequence=useSafeLiveEnd?safeLiveIndex(playlist,liveEdgePadding):playlist.segments.length;return intervalDuration(playlist,playlist.mediaSequence+endSequence,expired)},isBlacklisted=function(playlist){return playlist.excludeUntil&&playlist.excludeUntil>Date.now()},isIncompatible=function(playlist){return playlist.excludeUntil&&playlist.excludeUntil===1/0},isEnabled=function(playlist){var blacklisted=isBlacklisted(playlist);return!playlist.disabled&&!blacklisted},hasAttribute=function(attr,playlist){return playlist.attributes&&playlist.attributes[attr]},isLowestEnabledRendition=function(master,media){if(1===master.playlists.length)return!0;var currentBandwidth=media.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===master.playlists.filter(function(playlist){return!!isEnabled(playlist)&&(playlist.attributes.BANDWIDTH||0)<currentBandwidth}).length},Playlist={duration:duration,seekable:function(playlist,expired,liveEdgePadding){var seekableStart=expired||0,seekableEnd=playlistEnd(playlist,expired,!0,liveEdgePadding);return null===seekableEnd?createTimeRange():createTimeRange(seekableStart,seekableEnd)},safeLiveIndex:safeLiveIndex,getMediaInfoForTime:function(playlist,currentTime,startIndex,startTime){var i,numSegments=playlist.segments.length,time=currentTime-startTime;if(time<0){if(startIndex>0)for(i=startIndex-1;i>=0;i--)if((time+=playlist.segments[i].duration+1/30)>0)return{mediaIndex:i,startTime:startTime-sumDurations(playlist,startIndex,i)};return{mediaIndex:0,startTime:currentTime}}if(startIndex<0){for(i=startIndex;i<0;i++)if((time-=playlist.targetDuration)<0)return{mediaIndex:0,startTime:currentTime};startIndex=0}for(i=startIndex;i<numSegments;i++)if((time-=playlist.segments[i].duration+1/30)<0)return{mediaIndex:i,startTime:startTime+sumDurations(playlist,startIndex,i)};return{mediaIndex:numSegments-1,startTime:currentTime}},isEnabled:isEnabled,isDisabled:function(playlist){return playlist.disabled},isBlacklisted:isBlacklisted,isIncompatible:isIncompatible,playlistEnd:playlistEnd,isAes:function(media){for(var i=0;i<media.segments.length;i++)if(media.segments[i].key)return!0;return!1},hasAttribute:hasAttribute,estimateSegmentRequestTime:function(segmentDuration,bandwidth,playlist,bytesReceived){return void 0===bytesReceived&&(bytesReceived=0),hasAttribute("BANDWIDTH",playlist)?(segmentDuration*playlist.attributes.BANDWIDTH-8*bytesReceived)/bandwidth:NaN},isLowestEnabledRendition:isLowestEnabledRendition},videojsXHR=videojs$1.xhr,mergeOptions$1$1=videojs$1.mergeOptions,callbackWrapper=function(request,error,response,callback){var reqResponse="arraybuffer"===request.responseType?request.response:request.responseText;!error&&reqResponse&&(request.responseTime=Date.now(),request.roundTripTime=request.responseTime-request.requestTime,request.bytesReceived=reqResponse.byteLength||reqResponse.length,request.bandwidth||(request.bandwidth=Math.floor(request.bytesReceived/request.roundTripTime*8*1e3))),response.headers&&(request.responseHeaders=response.headers),error&&"ETIMEDOUT"===error.code&&(request.timedout=!0),error||request.aborted||200===response.statusCode||206===response.statusCode||0===response.statusCode||(error=new Error("XHR Failed with a response of: "+(request&&(reqResponse||request.responseText)))),callback(error,request)},xhrFactory=function(){return function XhrFunction(options,callback){options=mergeOptions$1$1({timeout:45e3},options);var beforeRequest=XhrFunction.beforeRequest||videojs$1.Vhs.xhr.beforeRequest;if(beforeRequest&&"function"==typeof beforeRequest){var newOptions=beforeRequest(options);newOptions&&(options=newOptions)}var request=videojsXHR(options,function(error,response){return callbackWrapper(request,error,response,callback)}),originalAbort=request.abort;return request.abort=function(){return request.aborted=!0,originalAbort.apply(request,arguments)},request.uri=options.uri,request.requestTime=Date.now(),request}},segmentXhrHeaders=function(segment){var byterange,byterangeEnd,headers={};return segment.byterange&&(headers.Range=(byterange=segment.byterange,byterangeEnd=byterange.offset+byterange.length-1,"bytes="+byterange.offset+"-"+byterangeEnd)),headers},textRange=function(range,i){return range.start(i)+"-"+range.end(i)},formatHexString=function(e,i){var value=e.toString(16);return"00".substring(0,2-value.length)+value+(i%2?" ":"")},formatAsciiString=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},createTransferableMessage=function(message){var transferable={};return Object.keys(message).forEach(function(key){var value=message[key];ArrayBuffer.isView(value)?transferable[key]={bytes:value.buffer,byteOffset:value.byteOffset,byteLength:value.byteLength}:transferable[key]=value}),transferable},initSegmentId=function(initSegment){var byterange=initSegment.byterange||{length:1/0,offset:0};return[byterange.length,byterange.offset,initSegment.resolvedUri].join(",")},segmentKeyId=function(key){return key.resolvedUri},hexDump=function(data){for(var bytes=Array.prototype.slice.call(data),result="",j=0;j<bytes.length/16;j++)result+=bytes.slice(16*j,16*j+16).map(formatHexString).join("")+" "+bytes.slice(16*j,16*j+16).map(formatAsciiString).join("")+"\n";return result},utils=Object.freeze({__proto__:null,createTransferableMessage:createTransferableMessage,initSegmentId:initSegmentId,segmentKeyId:segmentKeyId,hexDump:hexDump,tagDump:function(_ref){var bytes=_ref.bytes;return hexDump(bytes)},textRanges:function(ranges){var i,result="";for(i=0;i<ranges.length;i++)result+=textRange(ranges,i)+" ";return result}}),getProgramTime=function(_ref){var playlist=_ref.playlist,_ref$time=_ref.time,time=void 0===_ref$time?void 0:_ref$time,callback=_ref.callback;if(!callback)throw new Error("getProgramTime: callback must be provided");
vendor: 3,951 bytes, line 1
1if(!playlist||void 0===time)return callback({message:"getProgramTime: playlist and time must be provided"});var matchedSegment=function(time,playlist){if(!playlist||!playlist.segments||0===playlist.segments.length)return null;for(var segment,segmentEnd=0,i=0;i<playlist.segments.length&&!(time<=(segmentEnd=(segment=playlist.segments[i]).videoTimingInfo?segment.videoTimingInfo.transmuxedPresentationEnd:segmentEnd+segment.duration));i++);var lastSegment=playlist.segments[playlist.segments.length-1];if(lastSegment.videoTimingInfo&&lastSegment.videoTimingInfo.transmuxedPresentationEnd<time)return null;if(time>segmentEnd){if(time>segmentEnd+.25*lastSegment.duration)return null;segment=lastSegment}return{segment:segment,estimatedStart:segment.videoTimingInfo?segment.videoTimingInfo.transmuxedPresentationStart:segmentEnd-segment.duration,type:segment.videoTimingInfo?"accurate":"estimate"}}(time,playlist);if(!matchedSegment)return callback({message:"valid programTime was not found"});if("estimate"===matchedSegment.type)return callback({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:matchedSegment.estimatedStart});var programTimeObject={mediaSeconds:time},programTime=function(playerTime,segment){if(!segment.dateTimeObject)return null;var transmuxerPrependedSeconds=segment.videoTimingInfo.transmuxerPrependedSeconds,offsetFromSegmentStart=playerTime-(segment.videoTimingInfo.transmuxedPresentationStart+transmuxerPrependedSeconds);return new Date(segment.dateTimeObject.getTime()+1e3*offsetFromSegmentStart)}(time,matchedSegment.segment);return programTime&&(programTimeObject.programDateTime=programTime.toISOString()),callback(null,programTimeObject)},seekToProgramTime=function seekToProgramTime(_ref2){var programTime=_ref2.programTime,playlist=_ref2.playlist,_ref2$retryCount=_ref2.retryCount,retryCount=void 0===_ref2$retryCount?2:_ref2$retryCount,seekTo=_ref2.seekTo,_ref2$pauseAfterSeek=_ref2.pauseAfterSeek,pauseAfterSeek=void 0===_ref2$pauseAfterSeek||_ref2$pauseAfterSeek,tech=_ref2.tech,callback=_ref2.callback;if(!callback)throw new Error("seekToProgramTime: callback must be provided");if(void 0===programTime||!playlist||!seekTo)return callback({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!playlist.endList&&!tech.hasStarted_)return callback({message:"player must be playing a live stream to start buffering"});if(!function(playlist){if(!playlist.segments||0===playlist.segments.length)return!1;for(var i=0;i<playlist.segments.length;i++)if(!playlist.segments[i].dateTimeObject)return!1;return!0}(playlist))return callback({message:"programDateTime tags must be provided in the manifest "+playlist.resolvedUri});var matchedSegment=function(programTime,playlist){var dateTimeObject;try{dateTimeObject=new Date(programTime)}catch(e){return null}if(!playlist||!playlist.segments||0===playlist.segments.length)return null;var segment=playlist.segments[0];if(dateTimeObject<segment.dateTimeObject)return null;for(var i=0;i<playlist.segments.length-1&&(segment=playlist.segments[i],!(dateTimeObject<playlist.segments[i+1].dateTimeObject));i++);var videoTimingInfo,lastSegment=playlist.segments[playlist.segments.length-1],lastSegmentStart=lastSegment.dateTimeObject,lastSegmentDuration=lastSegment.videoTimingInfo?(videoTimingInfo=lastSegment.videoTimingInfo).transmuxedPresentationEnd-videoTimingInfo.transmuxedPresentationStart-videoTimingInfo.transmuxerPrependedSeconds:lastSegment.duration+.25*lastSegment.duration;return dateTimeObject>new Date(lastSegmentStart.getTime()+1e3*lastSegmentDuration)?null:(dateTimeObject>lastSegmentStart&&(segment=lastSegment),{segment:segment,estimatedStart:segment.videoTimingInfo?segment.videoTimingInfo.transmuxedPresentationStart:Playlist.duration(playlist,playlist.mediaSequence+playlist.segments.indexOf(segment)),type:segment.videoTimingInfo?"accurate":"estimate"})}(programTime,playlist);
1if(!matchedSegment)return callback({message:programTime+" was not found in the stream"});var segment=matchedSegment.segment,mediaOffset=function(comparisonTimeStamp,programTime){var segmentDateTime,programDateTime;try{segmentDateTime=new Date(comparisonTimeStamp),programDateTime=new Date(programTime)}catch(e){}var segmentTimeEpoch=segmentDateTime.getTime();return(programDateTime.getTime()-segmentTimeEpoch)/1e3}(segment.dateTimeObject,programTime);if("estimate"===matchedSegment.type)return 0===retryCount?callback({message:programTime+" is not buffered yet. Try again"}):(seekTo(matchedSegment.estimatedStart+mediaOffset),void tech.one("seeked",function(){seekToProgramTime({programTime:programTime,playlist:playlist,retryCount:retryCount-1,seekTo:seekTo,pauseAfterSeek:pauseAfterSeek,tech:tech,callback:callback})}));var seekToTime=segment.start+mediaOffset;tech.one("seeked",function(){return callback(null,tech.currentTime())}),pauseAfterSeek&&tech.pause(),seekTo(seekToTime)},callbackOnCompleted=function(request,cb){if(4===request.readyState)return cb()},EventTarget$1$1=videojs$1.EventTarget,mergeOptions$2=videojs$1.mergeOptions,parseMasterXml=function(_ref){var masterXml=_ref.masterXml,srcUrl=_ref.srcUrl,clientOffset=_ref.clientOffset,sidxMapping=_ref.sidxMapping,master=mpdParser.parse(masterXml,{manifestUri:srcUrl,clientOffset:clientOffset,sidxMapping:sidxMapping});return addPropertiesToMaster(master,srcUrl),master},updateMaster$1=function(oldMaster,newMaster){for(var noChanges=!0,update=mergeOptions$2(oldMaster,{duration:newMaster.duration,minimumUpdatePeriod:newMaster.minimumUpdatePeriod}),i=0;i<newMaster.playlists.length;i++){var playlistUpdate=updateMaster(update,newMaster.playlists[i]);playlistUpdate&&(update=playlistUpdate,noChanges=!1)}return forEachMediaGroup(newMaster,function(properties,type,group,label){if(properties.playlists&&properties.playlists.length){var id=properties.playlists[0].id,_playlistUpdate=updateMaster(update,properties.playlists[0]);_playlistUpdate&&((update=_playlistUpdate).mediaGroups[type][group][label].playlists[0]=update.playlists[id],noChanges=!1)}}),newMaster.minimumUpdatePeriod!==oldMaster.minimumUpdatePeriod&&(noChanges=!1),noChanges?null:update},generateSidxKey=function(sidxInfo){var sidxByteRangeEnd=sidxInfo.byterange.offset+sidxInfo.byterange.length-1;return sidxInfo.uri+"-"+sidxInfo.byterange.offset+"-"+sidxByteRangeEnd},compareSidxEntry=function(playlists,oldSidxMapping){var a,b,newSidxMapping={};for(var id in playlists){var currentSidxInfo=playlists[id].sidx;if(currentSidxInfo){var key=generateSidxKey(currentSidxInfo);if(!oldSidxMapping[key])break;var savedSidxInfo=oldSidxMapping[key].sidxInfo;a=savedSidxInfo,b=currentSidxInfo,(Boolean(!a.map&&!b.map)||Boolean(a.map&&b.map&&a.map.byterange.offset===b.map.byterange.offset&&a.map.byterange.length===b.map.byterange.length))&&a.uri===b.uri&&a.byterange.offset===b.byterange.offset&&a.byterange.length===b.byterange.length&&(newSidxMapping[key]=oldSidxMapping[key])}}return newSidxMapping},requestSidx_=function(loader,sidxRange,playlist,xhr,options,finishProcessingFn){var sidxInfo={uri:resolveManifestRedirect(options.handleManifestRedirects,sidxRange.resolvedUri),byterange:sidxRange.byterange,playlist:playlist},sidxRequestOptions=videojs$1.mergeOptions(sidxInfo,{responseType:"arraybuffer",headers:segmentXhrHeaders(sidxInfo)});return function(uri,xhr,cb){var id3Offset,bytes=[],finished=!1,endRequestAndCallback=function(err,req,type,_bytes){return req.abort(),finished=!0,cb(err,req,type,_bytes)},progressListener=function(error,request){if(!finished){if(error)return endRequestAndCallback(error,request,"",bytes);var newPart=request.responseText.substring(bytes&&bytes.byteLength||0,request.responseText.length);if(bytes=byteHelpers.concatTypedArrays(bytes,byteHelpers.stringToBytes(newPart,!0)),id3Offset=id3Offset||containers.getId3Offset(bytes),bytes.length<10||id3Offset&&bytes.length<id3Offset+2)return callbackOnCompleted(request,function(){return endRequestAndCallback(error,request,"",bytes)});var type=containers.detectContainerForBytes(bytes);return"ts"===type&&bytes.length<188?callbackOnCompleted(request,function(){return endRequestAndCallback(error,request,"",bytes)}):!type&&bytes.length<376?callbackOnCompleted(request,function(){return endRequestAndCallback(error,request,"",bytes)}):endRequestAndCallback(null,request,type,bytes)}},request=xhr({uri:uri,beforeSend:function(request){request.overrideMimeType("text/plain;
1 charset=x-user-defined"),request.addEventListener("progress",function(_ref){return _ref.total,_ref.loaded,callbackWrapper(request,null,{statusCode:request.status},progressListener)})}},function(error,response){return callbackWrapper(request,error,response,progressListener)});return request}(sidxInfo.uri,xhr,function(err,request,container,bytes){if(err)return finishProcessingFn(err,request);if(!container||"mp4"!==container)return finishProcessingFn({status:request.status,message:"Unsupported "+(container||"unknown")+" container type for sidx segment at URL: "+sidxInfo.uri,response:"",playlist:playlist,internal:!0,blacklistDuration:1/0,code:2},request);var _sidxInfo$byterange=sidxInfo.byterange,offset=_sidxInfo$byterange.offset,length=_sidxInfo$byterange.length;if(bytes.length>=length+offset)return finishProcessingFn(err,{response:bytes.subarray(offset,offset+length),status:request.status,uri:request.uri});loader.request=xhr(sidxRequestOptions,finishProcessingFn)})},DashPlaylistLoader=function(_EventTarget){function DashPlaylistLoader(srcUrlOrPlaylist,vhs,options,masterPlaylistLoader){var _this;void 0===options&&(options={}),_this=_EventTarget.call(this)||this;var _options=options,_options$withCredenti=_options.withCredentials,withCredentials=void 0!==_options$withCredenti&&_options$withCredenti,_options$handleManife=_options.handleManifestRedirects,handleManifestRedirects=void 0!==_options$handleManife&&_options$handleManife;if(_this.vhs_=vhs,_this.withCredentials=withCredentials,_this.handleManifestRedirects=handleManifestRedirects,!srcUrlOrPlaylist)throw new Error("A non-empty playlist URL or object is required");return _this.on("minimumUpdatePeriod",function(){_this.refreshXml_()}),_this.on("mediaupdatetimeout",function(){_this.refreshMedia_(_this.media().id)}),_this.state="HAVE_NOTHING",_this.loadedPlaylists_={},"string"==typeof srcUrlOrPlaylist?(_this.srcUrl=srcUrlOrPlaylist,_this.sidxMapping_={},_assertThisInitialized(_this)):(_this.setupChildLoader(masterPlaylistLoader,srcUrlOrPlaylist),_this)}_inheritsLoose(DashPlaylistLoader,_EventTarget);var _proto=DashPlaylistLoader.prototype;return _proto.setupChildLoader=function(masterPlaylistLoader,playlist){this.masterPlaylistLoader_=masterPlaylistLoader,this.childPlaylist_=playlist},_proto.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},window$1.clearTimeout(this.minimumUpdatePeriodTimeout_),window$1.clearTimeout(this.mediaRequest_),window$1.clearTimeout(this.mediaUpdateTimeout),this.off()},_proto.hasPendingRequest=function(){return this.request||this.mediaRequest_},_proto.stopRequest=function(){if(this.request){var oldRequest=this.request;this.request=null,oldRequest.onreadystatechange=null,oldRequest.abort()}},_proto.sidxRequestFinished_=function(playlist,master,startingState,doneFn){var _this2=this;return function(err,request){if(_this2.request){if(_this2.request=null,err)return _this2.error="object"==typeof err?err:{status:request.status,message:"DASH playlist request error at URL: "+playlist.uri,response:request.response,code:2},startingState&&(_this2.state=startingState),void _this2.trigger("error");var bytes=byteHelpers.toUint8(request.response),sidx=parseSidx(bytes.subarray(8));return doneFn(master,sidx)}}},_proto.media=function(playlist){var _this3=this;if(!playlist)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var startingState=this.state;if("string"==typeof playlist){if(!this.master.playlists[playlist])throw new Error("Unknown playlist URI: "+playlist);playlist=this.master.playlists[playlist]}var mediaChange=!this.media_||playlist.id!==this.media_.id;if(mediaChange&&this.loadedPlaylists_[playlist.id]&&this.loadedPlaylists_[playlist.id].endList)return this.state="HAVE_METADATA",this.media_=playlist,void(mediaChange&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(mediaChange)if(this.media_&&this.trigger("mediachanging"),playlist.sidx){var oldMaster,sidxMapping;this.masterPlaylistLoader_?(oldMaster=this.masterPlaylistLoader_.master,sidxMapping=this.masterPlaylistLoader_.sidxMapping_):(oldMaster=this.master,sidxMapping=this.sidxMapping_);var sidxKey=generateSidxKey(playlist.sidx);sidxMapping[sidxKey]={sidxInfo:playlist.sidx},this.request=requestSidx_(this,playlist.sidx,playlist,this.vhs_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(playlist,oldMaster,startingState,function(newMaster,sidx){if(!newMaster||!sidx)throw new Error("failed to request sidx");sidxMapping[sidxKey].sidx=sidx,_this3.haveMetadata({startingState:startingState,playlist:newMaster.playlists[playlist.id]})}))}else this.mediaRequest_=window$1.setTimeout(this.haveMetadata.bind(this,{startingState:startingState,playlist:playlist}),0)},_proto.haveMetadata=function(_ref2){var startingState=_ref2.startingState,playlist=_ref2.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[playlist.id]=playlist,this.mediaRequest_=null,this.refreshMedia_(playlist.id),"HAVE_MASTER"===startingState?this.trigger("loadedmetadata"):this.trigger("mediachange")},_proto.pause=function(){this.stopRequest(),window$1.clearTimeout(this.mediaUpdateTimeout),window$1.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)},_proto.load=function(isFinalRendition){var _this4=this;window$1.clearTimeout(this.mediaUpdateTimeout),window$1.clearTimeout(this.minimumUpdatePeriodTimeout_);var media=this.media();if(isFinalRendition){var delay=media?media.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=window$1.setTimeout(function(){return _this4.load()},delay)}else this.started?media&&!media.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},_proto.start=function(){var _this5=this;this.started=!0,this.masterPlaylistLoader_?this.mediaRequest_=window$1.setTimeout(this.haveMaster_.bind(this),0):this.request=this.vhs_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(error,req){if(_this5.request){if(_this5.request=null,error)return _this5.error={status:req.status,message:"DASH playlist request error at URL: "+_this5.srcUrl,responseText:req.responseText,code:2},"HAVE_NOTHING"===_this5.state&&(_this5.started=!1),_this5.trigger("error");_this5.masterXml_=req.responseText,req.responseHeaders&&req.responseHeaders.date?_this5.masterLoaded_=Date.parse(req.responseHeaders.date):_this5.masterLoaded_=Date.now(),_this5.srcUrl=resolveManifestRedirect(_this5.handleManifestRedirects,_this5.srcUrl,req),_this5.syncClientServerClock_(_this5.onClientServerClockSync_.bind(_this5))}})}
1,_proto.syncClientServerClock_=function(done){var _this6=this,utcTiming=mpdParser.parseUTCTiming(this.masterXml_);return null===utcTiming?(this.clientOffset_=this.masterLoaded_-Date.now(),done()):"DIRECT"===utcTiming.method?(this.clientOffset_=utcTiming.value-Date.now(),done()):void(this.request=this.vhs_.xhr({uri:resolveUrl(this.srcUrl,utcTiming.value),method:utcTiming.method,withCredentials:this.withCredentials},function(error,req){if(_this6.request){if(error)return _this6.clientOffset_=_this6.masterLoaded_-Date.now(),done();var serverTime;serverTime="HEAD"===utcTiming.method?req.responseHeaders&&req.responseHeaders.date?Date.parse(req.responseHeaders.date):_this6.masterLoaded_:Date.parse(req.responseText),_this6.clientOffset_=serverTime-Date.now(),done()}}))},_proto.haveMaster_=function(){this.state="HAVE_MASTER",this.mediaRequest_=null,this.masterPlaylistLoader_?this.media_||this.media(this.childPlaylist_):(this.updateMainManifest_(parseMasterXml({masterXml:this.masterXml_,srcUrl:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_})),this.trigger("loadedplaylist"))},_proto.updateMinimumUpdatePeriodTimeout_=function(){var _this7=this;window$1.clearTimeout(this.minimumUpdatePeriodTimeout_);var createMUPTimeout=function(mup){_this7.minimumUpdatePeriodTimeout_=window$1.setTimeout(function(){_this7.trigger("minimumUpdatePeriod")},mup)},minimumUpdatePeriod=this.master&&this.master.minimumUpdatePeriod;minimumUpdatePeriod>0?createMUPTimeout(minimumUpdatePeriod):0===minimumUpdatePeriod&&(this.media()?createMUPTimeout(1e3*this.media().targetDuration):this.one("loadedplaylist",function(){createMUPTimeout(1e3*_this7.media().targetDuration)}))},_proto.onClientServerClockSync_=function(){this.haveMaster_(),this.hasPendingRequest()||this.media_||this.media(this.master.playlists[0]),this.updateMinimumUpdatePeriodTimeout_()},_proto.updateMainManifest_=function(updatedManifest){if(this.master=updatedManifest,this.master.locations&&this.master.locations.length){var location=this.master.locations[0];location!==this.srcUrl&&(this.srcUrl=location)}},_proto.refreshXml_=function(){var _this8=this;this.request=this.vhs_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(error,req){if(_this8.request){if(_this8.request=null,error)return _this8.error={status:req.status,message:"DASH playlist request error at URL: "+_this8.srcUrl,responseText:req.responseText,code:2},"HAVE_NOTHING"===_this8.state&&(_this8.started=!1),_this8.trigger("error");_this8.masterXml_=req.responseText,_this8.sidxMapping_=function(masterXml,srcUrl,clientOffset,oldSidxMapping){var master=mpdParser.parse(masterXml,{manifestUri:srcUrl,clientOffset:clientOffset}),mediaGroupSidx=compareSidxEntry(master.playlists,oldSidxMapping);return forEachMediaGroup(master,function(properties,mediaType,groupKey,labelKey){if(properties.playlists&&properties.playlists.length){var playlists=properties.playlists;mediaGroupSidx=mergeOptions$2(mediaGroupSidx,compareSidxEntry(playlists,oldSidxMapping))}}),mediaGroupSidx}(_this8.masterXml_,_this8.srcUrl,_this8.clientOffset_,_this8.sidxMapping_);var master=parseMasterXml({masterXml:_this8.masterXml_,srcUrl:_this8.srcUrl,clientOffset:_this8.clientOffset_,sidxMapping:_this8.sidxMapping_}),updatedMaster=updateMaster$1(_this8.master,master),currentSidxInfo=_this8.media().sidx;if(updatedMaster)if(currentSidxInfo){var sidxKey=generateSidxKey(currentSidxInfo);if(!_this8.sidxMapping_[sidxKey]){var playlist=_this8.media();_this8.request=requestSidx_(_this8,playlist.sidx,playlist,_this8.vhs_.xhr,{handleManifestRedirects:_this8.handleManifestRedirects},_this8.sidxRequestFinished_(playlist,master,_this8.state,function(newMaster,sidx){if(!newMaster||!sidx)throw new Error("failed to request sidx on minimumUpdatePeriod");_this8.sidxMapping_[sidxKey].sidx=sidx,_this8.updateMinimumUpdatePeriodTimeout_(),_this8.refreshMedia_(_this8.media().id)}))}}else _this8.updateMainManifest_(updatedMaster),_this8.media_&&(_this8.media_=_this8.master.playlists[_this8.media_.id]);_this8.updateMinimumUpdatePeriodTimeout_()}})},_proto.refreshMedia_=function(mediaID){var oldMaster,newMaster,_this9=this;if(!mediaID)throw new Error("refreshMedia_ must take a media id");this.masterPlaylistLoader_?(oldMaster=this.masterPlaylistLoader_.master,newMaster=parseMasterXml({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_})):(oldMaster=this.master,newMaster=parseMasterXml({masterXml:this.masterXml_,srcUrl:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_}));var updatedMaster=updateMaster$1(oldMaster,newMaster);updatedMaster?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=updatedMaster:this.master=updatedMaster,this.media_=updatedMaster.playlists[mediaID]):(this.media_=oldMaster.playlists[mediaID],this.trigger("playlistunchanged")),this.media().endList||(this.mediaUpdateTimeout=window$1.setTimeout(function(){_this9.trigger("mediaupdatetimeout")},refreshDelay(this.media(),!!updatedMaster))),this.trigger("loadedplaylist")},DashPlaylistLoader}(EventTarget$1$1),Config={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},stringToArrayBuffer=function(string){for(var view=new Uint8Array(new ArrayBuffer(string.length)),i=0;i<string.length;i++)view[i]=string.charCodeAt(i);return view.buffer},transmuxQueue=[],processTransmux=function(_ref2){var transmuxer=_ref2.transmuxer,bytes=_ref2.bytes,audioAppendStart=_ref2.audioAppendStart,gopsToAlignWith=_ref2.gopsToAlignWith,isPartial=_ref2.isPartial,remux=_ref2.remux,onData=_ref2.onData,onTrackInfo=_ref2.onTrackInfo,onAudioTimingInfo=_ref2.onAudioTimingInfo,onVideoTimingInfo=_ref2.onVideoTimingInfo,onVideoSegmentTimingInfo=_ref2.onVideoSegmentTimingInfo,onId3=_ref2.onId3,onCaptions=_ref2.onCaptions,onDone=_ref2.onDone,transmuxedData={isPartial:isPartial,buffer:[]};if(transmuxer.onmessage=function(event){currentTransmux&&("data"===event.data.action&&function(event,transmuxedData,callback){var _event$data$segment=event.data.segment,type=_event$data$segment.type,initSegment=_event$data$segment.initSegment,captions=_event$data$segment.captions,captionStream
1s=_event$data$segment.captionStreams,metadata=_event$data$segment.metadata,videoFrameDtsTime=_event$data$segment.videoFrameDtsTime,videoFramePtsTime=_event$data$segment.videoFramePtsTime;transmuxedData.buffer.push({captions:captions,captionStreams:captionStreams,metadata:metadata});var boxes=event.data.segment.boxes||{data:event.data.segment.data},result={type:type,data:new Uint8Array(boxes.data,boxes.data.byteOffset,boxes.data.byteLength),initSegment:new Uint8Array(initSegment.data,initSegment.byteOffset,initSegment.byteLength)};void 0!==videoFrameDtsTime&&(result.videoFrameDtsTime=videoFrameDtsTime),void 0!==videoFramePtsTime&&(result.videoFramePtsTime=videoFramePtsTime),callback(result)}(event,transmuxedData,onData),"trackinfo"===event.data.action&&onTrackInfo(event.data.trackInfo),"gopInfo"===event.data.action&&function(event,transmuxedData){transmuxedData.gopInfo=event.data.gopInfo}(event,transmuxedData),"audioTimingInfo"===event.data.action&&onAudioTimingInfo(event.data.audioTimingInfo),"videoTimingInfo"===event.data.action&&onVideoTimingInfo(event.data.videoTimingInfo),"videoSegmentTimingInfo"===event.data.action&&onVideoSegmentTimingInfo(event.data.videoSegmentTimingInfo),"id3Frame"===event.data.action&&onId3([event.data.id3Frame],event.data.id3Frame.dispatchType),"caption"===event.data.action&&onCaptions(event.data.caption),"transmuxed"===event.data.type&&(transmuxer.onmessage=null,function(_ref){var transmuxedData=_ref.transmuxedData,callback=_ref.callback;transmuxedData.buffer=[],callback(transmuxedData)}({transmuxedData:transmuxedData,callback:onDone}),dequeue()))},audioAppendStart&&transmuxer.postMessage({action:"setAudioAppendStart",appendStart:audioAppendStart}),Array.isArray(gopsToAlignWith)&&transmuxer.postMessage({action:"alignGopsWith",gopsToAlignWith:gopsToAlignWith}),void 0!==remux&&transmuxer.postMessage({action:"setRemux",remux:remux}),bytes.byteLength){var buffer=bytes instanceof ArrayBuffer?bytes:bytes.buffer,byteOffset=bytes instanceof ArrayBuffer?0:bytes.byteOffset;transmuxer.postMessage({action:"push",data:buffer,byteOffset:byteOffset,byteLength:bytes.byteLength},[buffer])}transmuxer.postMessage({action:isPartial?"partialFlush":"flush"})},dequeue=function(){currentTransmux=null,transmuxQueue.length&&("function"==typeof(currentTransmux=transmuxQueue.shift())?currentTransmux():processTransmux(currentTransmux))},processAction=function(transmuxer,action){transmuxer.postMessage({action:action}),dequeue()},enqueueAction=function(action,transmuxer){if(!currentTransmux)return currentTransmux=action,void processAction(transmuxer,action);transmuxQueue.push(processAction.bind(null,transmuxer,action))},transmux=function(options){if(!currentTransmux)return currentTransmux=options,void processTransmux(options);transmuxQueue.push(options)},segmentTransmuxer_reset=function(transmuxer){enqueueAction("reset",transmuxer)},segmentTransmuxer_dispose=function(){currentTransmux=null,transmuxQueue.length=0},segmentTransmuxer_endTimeline=function(transmuxer){enqueueAction("endTimeline",transmuxer)},REQUEST_ERRORS_FAILURE=2,REQUEST_ERRORS_TIMEOUT=-101,REQUEST_ERRORS_ABORTED=-102,abortAll=function(activeXhrs){activeXhrs.forEach(function(xhr){xhr.abort()})},handleErrors=function(error,request){return request.timedout?{status:request.status,message:"HLS request timed-out at URL: "+request.uri,code:REQUEST_ERRORS_TIMEOUT,xhr:request}:request.aborted?{status:request.status,message:"HLS request aborted at URL: "+request.uri,code:REQUEST_ERRORS_ABORTED,xhr:request}:error?{status:request.status,message:"HLS request errored at URL: "+request.uri,code:REQUEST_ERRORS_FAILURE,xhr:request}:null},transmuxAndNotify=function(_ref3){var segment=_ref3.segment,bytes=_ref3.bytes,isPartial=_ref3.isPartial,trackInfoFn=_ref3.trackInfoFn,timingInfoFn=_ref3.timingInfoFn,videoSegmentTimingInfoFn=_ref3.videoSegmentTimingInfoFn,id3Fn=_ref3.id3Fn,captionsFn=_ref3.captionsFn,dataFn=_ref3.dataFn,doneFn=_ref3.doneFn,fmp4Tracks=segment.map&&segment.map.tracks||{},isMuxed=Boolean(fmp4Tracks.audio&&fmp4Tracks.video),audioStartFn=timingInfoFn.bind(null,segment,"audio","start"),audioEndFn=timingInfoFn.bind(null,segment,"audio","end"),videoStartFn=timingInfoFn.bind(null,segment,"video","start"),videoEndFn=timingInfoFn.bind(null,segment,"video","end");if(!isPartial&&!segment.lastReachedChar){var probeResult=function(bytes,baseStartTime){var timeInfo=tsInspector.inspect(bytes,baseStartTime*clock.ONE_SECOND_IN_TS);if(!timeInfo)return null;var result={hasVideo:timeInfo.video&&2===timeInfo.video.length||!1,hasAudio:timeInfo.audio&&2===timeInfo.audio.length||!1};return result.hasVideo&&(result.videoStart=timeInfo.video[0].ptsTime),result.hasAudio&&(result.audioStart=timeInfo.audio[0].ptsTime),result}(bytes,segment.baseStartTime);probeResult&&(trackInfoFn(segment,{hasAudio:probeResult.hasAudio,hasVideo:probeResult.hasVideo,isMuxed:isMuxed}),trackInfoFn=null,probeResult.hasAudio&&!isMuxed&&audioStartFn(probeResult.audioStart),probeResult.hasVideo&&videoStartFn(probeResult.videoStart),audioStartFn=null,videoStartFn=null)}transmux({bytes:bytes,transmuxer:segment.transmuxer,audioAppendStart:segment.audioAppendStart,gopsToAlignWith:segment.gopsToAlignWith,isPartial:isPartial,remux:isMuxed,onData:function(result){result.type="combined"===result.type?"video":result.type,dataFn(segment,result)},onTrackInfo:function(trackInfo){trackInfoFn&&(isMuxed&&(trackInfo.isMuxed=!0),trackInfoFn(segment,trackInfo))},onAudioTimingInfo:function(audioTimingInfo){audioStartFn&&void 0!==audioTimingInfo.start&&(audioStartFn(audioTimingInfo.start),audioStartFn=null),audioEndFn&&void 0!==audioTimingInfo.end&&audioEndFn(audioTimingInfo.end)},onVideoTimingInfo:function(videoTimingInfo){videoStartFn&&void 0!==videoTimingInfo.start&&(videoStartFn(videoTimingInfo.start),videoStartFn=null),videoEndFn&&void 0!==videoTimingInfo.end&&videoEndFn(videoTimingInfo.end)},onVideoSegmentTimingInfo:function(videoSegmentTimingInfo){videoSegmentTimingInfoFn(videoSegmentTimingInfo)},onId3:function(id3Frames,dispatchType){id3Fn(segment,id3Frames,dispatchType)},onCaptions:function(captions){captionsFn(segment,[captions])},onDone:function(result){doneFn&&!isPartial&&(result.type="combined"===result.type?"video":result.type,doneFn(null,segment,result))}})},handleSegmentBytes=function(_ref4){var segment=_ref4.segment,bytes=_ref4.bytes,isPartial=_ref4.isPartial,trackInfoFn=_ref4.trackInfoFn,timingInfoFn=_ref4.timingInfoFn,videoSegmentTimingInfoFn=_ref4.videoSegmentTimingInfoFn,id3Fn=_ref4.id3Fn,captionsFn=_ref4.captionsFn,dataFn=_ref4.dataFn,doneFn=_ref4.doneFn,bytesAsUint8Array=new Uint8Array(bytes);if(containers.isLikelyFmp4MediaSegment(bytesAsUint8Array)){segment.isFmp4=!0;var tracks=segment.map.tracks,trackInfo={isFmp4:!0,hasVideo:!!tracks.video,hasAudio:!!tracks.audio};tracks.audio&&tracks.audio.codec&&"enca"!==tracks.audio.codec&&(trackInfo.audioCodec=tracks.audio.codec),tracks.video&&tracks.video.codec&&"encv"!==tracks.video.codec&&(trackInfo.videoCodec=tracks.video.codec),tracks.video&&tracks.audio&&(trackInfo.isMuxed=!0),trackInfoFn(segment,trackInfo);var timingInfo=mp4probe.startTime(segment.map.timescales,bytesAsUint8Array);trackInfo.hasAudio&&!trackInfo.isMuxed&&timingInfoFn(segment,"audio","start",timingInfo),trackInfo.hasVideo&&timingInfoFn(segment,"video","start",timingInfo);var finishLoading=function(captions){dataFn(segment,{data:bytes,type:trackInfo.hasAudio&&!trackInfo.isMuxed?"audio":"video"}),captions&&captions.length&&captionsFn(segment,captions),doneFn(null,segment,{})};if(!tracks.video||!bytes.byteLength||!segment.transmuxer)return void finishLoading();var buffer=bytes instanceof ArrayBuffer?bytes:bytes.buffer,byteOffset=bytes instanceof ArrayBuffer?0:bytes.byteOffset;return segment.transmuxer.addEventListener("message",function listenForCaptions(event){if("mp4Captions"===event.data.action){segment.transmuxer.removeEventListener("message",listenForCaptions);var data=event.data.data;segment.bytes=bytes=new Uint8Array(data,data.byteOffset||0,data.byteLength),finishLoading(event.data.captions)}}),void segment.transmuxer.postMessage({action:"pushMp4Captions",timescales:segment.map.timescales,trackIds:[tracks.video.id],data:buffer,byteOffset:byteOffset,byteLength:bytes.byteLength},[buffer])}if(segment.transmuxer){if(void 0===segment.container&&(segment.container=containers.detectContainerForBytes(bytesAsUint8Array)),"ts"!==segment.container&&"aac"!==segment.container)return trackInfoFn(segment,{hasAudio:!1,hasVideo:!1}),void doneFn(null,segment,{});transmuxAndNotify({segment:segment,bytes:bytes,isPartial:isPartial,trackInfoFn:trackInfoFn,timingInfoFn:timingInfoFn,videoSegmentTimingInfoFn:videoSegmentTimingInfoFn,id3Fn:id3Fn,captionsFn:captionsFn,dataFn:dataFn,doneFn:doneFn})}else doneFn(null,segment,{})},waitForCompletion=function(_ref6){var activeXhrs=_ref6.activeXhrs,decryptionWorker=_ref6.decryptionWorker,trackInfoFn=_ref6.trackInfoFn,timingInfoFn=_ref6.timingInfoFn,videoSegmentTimingInfoFn=_ref6.videoSegmentTimingInfoFn,id3Fn=_ref6.id3Fn,captionsFn=_ref6.captionsFn,dataFn=_ref6.dataFn,doneFn=_ref6.doneFn,count=0,didError=!1;return function(error,segment){if(!didError){if(error)return didError=!0,abortAll(activeXhrs),doneFn(error,segment);if((count+=1)===activeXhrs.length){if(segment.endOfAllRequests=Date.now(),segment.encryptedBytes)return function(_ref5){var keyBytes,decryptionWorker=_ref5.decryptionWorker,segment=_ref5.segment,trackInfoFn=_ref5.trackInfoFn,timingInfoFn=_ref5.timingInfoFn,videoSegmentTimingInfoFn=_ref5.videoSegmentTimingInfoFn,id3Fn=_ref5.id3Fn,captionsFn=_ref5.captionsFn,dataFn=_ref5.dataFn,doneFn=_ref5.doneFn;decryptionWorker.addEventListener("message",function decryptionHandler(event){if(event.data.source===segment.requestId){decryptionWorker.removeEventListener("message",decryptionHandler);var decrypted=event.data.decrypted;segment.bytes=new Uint8Array(decrypted.bytes,decrypted.byteOffset,decrypted.byteLength),handleSegmentBytes({segment:segment,bytes:segment.bytes,isPartial:!1,trackInfoFn:trackInfoFn,timingInfoFn:timingInfoFn,videoSegmentTimingInfoFn:videoSegmentTimingInfoFn,id3Fn:id3Fn,captionsFn:captionsFn,dataFn:dataFn,doneFn:doneFn})}}),keyBytes=segment.key.bytes.slice?segment.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(segment.key.bytes)),decryptionWorker.postMessage(createTransferableMessage({source:segment.requestId,encrypted:segment.encryptedBytes,key:keyBytes,iv:segment.key.iv}),[segment.encryptedBytes.buffer,keyBytes.buffer])}({decryptionWorker:decryptionWorker,segment:segment,trackInfoFn:trackInfoFn,timingInfoFn:timingInfoFn,videoSegmentTimingInfoFn:videoSegmentTimingInfoFn,id3Fn:id3Fn,captionsFn:captionsFn,dataFn:dataFn,doneFn:doneFn});handleSegmentBytes({segment:segment,bytes:segment.bytes,isPartial:!1,trackInfoFn:trackInfoFn,timingInfoFn:timingInfoFn,videoSegmentTimingInfoFn:videoSegmentTimingInfoFn,id3Fn:id3Fn,captionsFn:captionsFn,dataFn:dataFn,doneFn:doneFn})}}}},handleProgress=function(_ref8){var segment=_ref8.segment,progressFn=_ref8.progressFn,trackInfoFn=_ref8.trackInfoFn,timingInfoFn=_ref8.timingInfoFn,videoSegmentTimingInfoFn=_ref8.videoSegmentTimingInfoFn,id3Fn=_ref8.id3Fn,captionsFn=_ref8.captionsFn,dataFn=_ref8.dataFn,handlePartialData=_ref8.handlePartialData;return function(event){var request=event.target;if(!request.aborted){if(handlePartialData&&!segment.key&&request.responseText&&request.responseText.length>=8){var newBytes=stringToArrayBuffer(request.responseText.substring(segment.lastReachedChar||0));!segment.lastReachedChar&&containers.isLikelyFmp4MediaSegment(new
1Uint8Array(newBytes))||(segment.lastReachedChar=request.responseText.length,handleSegmentBytes({segment:segment,bytes:newBytes,isPartial:!0,trackInfoFn:trackInfoFn,timingInfoFn:timingInfoFn,videoSegmentTimingInfoFn:videoSegmentTimingInfoFn,id3Fn:id3Fn,captionsFn:captionsFn,dataFn:dataFn}))}return segment.stats=videojs$1.mergeOptions(segment.stats,function(progressEvent){var request=progressEvent.target,stats={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-request.requestTime||0};return stats.bytesReceived=progressEvent.loaded,stats.bandwidth=Math.floor(stats.bytesReceived/stats.roundTripTime*8*1e3),stats}(event)),!segment.stats.firstBytesReceivedAt&&segment.stats.bytesReceived&&(segment.stats.firstBytesReceivedAt=Date.now()),progressFn(event,segment)}}},mediaSegmentRequest=function(_ref9){var xhr=_ref9.xhr,xhrOptions=_ref9.xhrOptions,decryptionWorker=_ref9.decryptionWorker,segment=_ref9.segment,abortFn=_ref9.abortFn,progressFn=_ref9.progressFn,trackInfoFn=_ref9.trackInfoFn,timingInfoFn=_ref9.timingInfoFn,videoSegmentTimingInfoFn=_ref9.videoSegmentTimingInfoFn,id3Fn=_ref9.id3Fn,captionsFn=_ref9.captionsFn,dataFn=_ref9.dataFn,doneFn=_ref9.doneFn,handlePartialData=_ref9.handlePartialData,activeXhrs=[],finishProcessingFn=waitForCompletion({activeXhrs:activeXhrs,decryptionWorker:decryptionWorker,trackInfoFn:trackInfoFn,timingInfoFn:timingInfoFn,videoSegmentTimingInfoFn:videoSegmentTimingInfoFn,id3Fn:id3Fn,captionsFn:captionsFn,dataFn:dataFn,doneFn:doneFn});if(segment.key&&!segment.key.bytes){var keyXhr=xhr(videojs$1.mergeOptions(xhrOptions,{uri:segment.key.resolvedUri,responseType:"arraybuffer"}),function(segment,finishProcessingFn){return function(error,request){var response=request.response,errorObj=handleErrors(error,request);if(errorObj)return finishProcessingFn(errorObj,segment);if(16!==response.byteLength)return finishProcessingFn({status:request.status,message:"Invalid HLS key at URL: "+request.uri,code:REQUEST_ERRORS_FAILURE,xhr:request},segment);var view=new DataView(response);return segment.key.bytes=new Uint32Array([view.getUint32(0),view.getUint32(4),view.getUint32(8),view.getUint32(12)]),finishProcessingFn(null,segment)}}(segment,finishProcessingFn));activeXhrs.push(keyXhr)}if(segment.map&&!segment.map.bytes){var initSegmentXhr=xhr(videojs$1.mergeOptions(xhrOptions,{uri:segment.map.resolvedUri,responseType:"arraybuffer",headers:segmentXhrHeaders(segment.map)}),function(_ref){var segment=_ref.segment,finishProcessingFn=_ref.finishProcessingFn;return function(error,request){var response=request.response,errorObj=handleErrors(error,request);if(errorObj)return finishProcessingFn(errorObj,segment);if(0===response.byteLength)return finishProcessingFn({status:request.status,message:"Empty HLS segment content at URL: "+request.uri,code:REQUEST_ERRORS_FAILURE,xhr:request},segment);segment.map.bytes=new Uint8Array(request.response);var type=containers.detectContainerForBytes(segment.map.bytes);return"mp4"!==type?finishProcessingFn({status:request.status,message:"Found unsupported "+(type||"unknown")+" container for initialization segment at URL: "+request.uri,code:REQUEST_ERRORS_FAILURE,internal:!0,xhr:request},segment):(mp4probe.tracks(segment.map.bytes).forEach(function(track){segment.map.tracks=segment.map.tracks||{},segment.map.tracks[track.type]||(segment.map.tracks[track.type]=track,track.id&&track.timescale&&(segment.map.timescales=segment.map.timescales||{},segment.map.timescales[track.id]=track.timescale))}),finishProcessingFn(null,segment))}}({segment:segment,finishProcessingFn:finishProcessingFn}));activeXhrs.push(initSegmentXhr)}var segmentRequestOptions=videojs$1.mergeOptions(xhrOptions,{uri:segment.resolvedUri,responseType:"arraybuffer",headers:segmentXhrHeaders(segment)});handlePartialData&&(segmentRequestOptions.responseType="text",segmentRequestOptions.beforeSend=function(xhrObject){xhrObject.overrideMimeType("text/plain; charset=x-user-defined")});var segmentXhr=xhr(segmentRequestOptions,function(_ref2){var segment=_ref2.segment,finishProcessingFn=_ref2.finishProcessingFn,responseType=_ref2.responseType;return function(error,request){var response=request.response,errorObj=handleErrors(error,request);if(errorObj)return finishProcessingFn(errorObj,segment);var newBytes="arraybuffer"!==responseType&&request.responseText?str
1ingToArrayBuffer(request.responseText.substring(segment.lastReachedChar||0)):request.response;return 0===response.byteLength?finishProcessingFn({status:request.status,message:"Empty HLS segment content at URL: "+request.uri,code:REQUEST_ERRORS_FAILURE,xhr:request},segment):(segment.stats=function(request){return{bandwidth:request.bandwidth,bytesReceived:request.bytesReceived||0,roundTripTime:request.roundTripTime||0}}(request),segment.key?segment.encryptedBytes=new Uint8Array(newBytes):segment.bytes=new Uint8Array(newBytes),finishProcessingFn(null,segment))}}({segment:segment,finishProcessingFn:finishProcessingFn,responseType:segmentRequestOptions.responseType}));segmentXhr.addEventListener("progress",handleProgress({segment:segment,progressFn:progressFn,trackInfoFn:trackInfoFn,timingInfoFn:timingInfoFn,videoSegmentTimingInfoFn:videoSegmentTimingInfoFn,id3Fn:id3Fn,captionsFn:captionsFn,dataFn:dataFn,handlePartialData:handlePartialData})),activeXhrs.push(segmentXhr);var loadendState={};return activeXhrs.forEach(function(activeXhr){activeXhr.addEventListener("loadend",function(_ref7){var loadendState=_ref7.loadendState,abortFn=_ref7.abortFn;return function(event){event.target.aborted&&abortFn&&!loadendState.calledAbortFn&&(abortFn(),loadendState.calledAbortFn=!0)}}({loadendState:loadendState,abortFn:abortFn}))}),function(){return abortAll(activeXhrs)}},win="undefined"!=typeof window?window:{},TARGET="undefined"==typeof Symbol?"__target":Symbol(),SCRIPT_TYPE="application/javascript",BlobBuilder=win.BlobBuilder||win.WebKitBlobBuilder||win.MozBlobBuilder||win.MSBlobBuilder,URL=win.URL||win.webkitURL||URL&&URL.msURL,Worker=win.Worker;function shimWorker(filename,fn){return function(forceFallback){var o=this;if(!fn)return new Worker(filename);if(Worker&&!forceFallback){var objURL=createSourceObject(fn.toString().replace(/^function.+?{/,"").slice(0,-1));return this[TARGET]=new Worker(objURL),function(worker,objURL){if(!worker||!objURL)return;var term=worker.terminate;worker.objURL=objURL,worker.terminate=function(){worker.objURL&&URL.revokeObjectURL(worker.objURL),term.call(worker)}}(this[TARGET],objURL),this[TARGET]}var selfShim={postMessage:function(m){o.onmessage&&setTimeout(function(){o.onmessage({data:m,target:selfShim})})}};fn.call(selfShim),this.postMessage=function(m){setTimeout(function(){selfShim.onmessage({data:m,target:o})})},this.isThisThread=!0}}if(Worker){var testWorker,objURL=createSourceObject("self.onmessage = function () {}"),testArray=new Uint8Array(1);try{(testWorker=new Worker(objURL)).postMessage(testArray,[testArray.buffer])}catch(e){Worker=null}finally{URL.revokeObjectURL(objURL),testWorker&&testWorker.terminate()}}function createSourceObject(str){try{return URL.createObjectURL(new Blob([str],{type:SCRIPT_TYPE}))}catch(e){var blob=new BlobBuilder;return blob.append(str),URL.createObjectURL(blob.getBlob(type))}}var TransmuxWorker=new shimWorker("./transmuxer-worker.worker.js",function(window,document){var self=this;!function(){var Stream=function(){this.init=function(){var listeners={};this.on=function(type,listener){listeners[type]||(listeners[type]=[]),listeners[type]=listeners[type].concat(listener)},this.off=function(type,listener){var index;return!!listeners[type]&&(index=listeners[type].indexOf(listener),listeners[type]=listeners[type].slice(),listeners[type].splice(index,1),index>-1)},this.trigger=function(type){var callbacks,i,length,args;if(callbacks=listeners[type])if(2===arguments.length)for(length=callbacks.length,i=0;i<length;++i)callbacks[i].call(this,arguments[1]);else{for(args=[],i=arguments.length,i=1;i<arguments.length;++i)args.push(arguments[i]);for(length=callbacks.length,i=0;i<length;++i)callbacks[i].apply(this,args)}},this.dispose=function(){listeners={}}}};Stream.prototype.pipe=function(destination){return this.on("data",function(data){destination.push(data)}),this.on("done",function(flushSource){destination.flush(flushSource)}),this.on("partialdone",function(flushSource){destination.partialFlush(flushSource)}),this.on("endedtimeline",function(flushSource){destination.endTimeline(flushSource)}),this.on("reset",function(flushSource){destination.reset(flushSource)}),destination},Stream.prototype.push=function(data){this.trigger("data",data)},Stream.prototype.flush=function(flushSource){this.trigger("done",flushSource)},Stream.prototype.partialFlush=function(flushSource){this.trigger("partialdone",flushSource)},Stream.prototype.endTimeline=function(flushSource){this.trigger("endedtimeline",flushSource)},Stream.prototype.reset=function(flushSource){this.trigger("reset",flushSource)};var box,dinf,esds,ftyp,mfhd,minf,moof,moov,mvex,mvhd,trak,tkhd,mdia,mdhd,hdlr,sdtp,stbl,stsd,traf,trex,trun,types,MAJOR_BRAND,MINOR_VERSION,AVC1_BRAND,VIDEO_HDLR,AUDIO_HDLR,HDLR_TYPES,VMHD,SMHD,DREF,STCO,STSC,STSZ,STTS,videoSample,audioSample,audioTrun,videoTrun,trunHeader,stream=Stream,UINT32_MAX=Math.pow(2,32)-1;!function(){var i;if(types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(i in types)types.hasOwnProperty(i)&&(types[i]=[i.charCo
vendor: 9,241 bytes, line 1
1deAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]);MAJOR_BRAND=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),AVC1_BRAND=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),MINOR_VERSION=new Uint8Array([0,0,0,1]),VIDEO_HDLR=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]),AUDIO_HDLR=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]),HDLR_TYPES={video:VIDEO_HDLR,audio:AUDIO_HDLR},DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),STCO=new Uint8Array([0,0,0,0,0,0,0,0]),STSC=STCO,STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),STTS=STCO,VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),box=function(type){var i,result,payload=[],size=0;for(i=1;i<arguments.length;i++)payload.push(arguments[i]);for(i=payload.length;i--;)size+=payload[i].byteLength;for(result=new Uint8Array(size+8),new DataView(result.buffer,result.byteOffset,result.byteLength).setUint32(0,result.byteLength),result.set(type,4),i=0,size=8;i<payload.length;i++)result.set(payload[i],size),size+=payload[i].byteLength;return result},dinf=function(){return box(types.dinf,box(types.dref,DREF))},esds=function(track){return box(types.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,track.audioobjecttype<<3|track.samplingfrequencyindex>>>1,track.samplingfrequencyindex<<7|track.channelcount<<3,6,1,2]))},hdlr=function(type){return box(types.hdlr,HDLR_TYPES[type])},mdhd=function(track){var result=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,track.duration>>>24&255,track.duration>>>16&255,track.duration>>>8&255,255&track.duration,85,196,0,0]);return track.samplerate&&(result[12]=track.samplerate>>>24&255,result[13]=track.samplerate>>>16&255,result[14]=track.samplerate>>>8&255,result[15]=255&track.samplerate),box(types.mdhd,result)},mdia=function(track){return box(types.mdia,mdhd(track),hdlr(track.type),minf(track))},mfhd=function(sequenceNumber){return box(types.mfhd,new Uint8Array([0,0,0,0,(4278190080&sequenceNumber)>>24,(16711680&sequenceNumber)>>16,(65280&sequenceNumber)>>8,255&sequenceNumber]))},minf=function(track){return box(types.minf,"video"===track.type?box(types.vmhd,VMHD):box(types.smhd,SMHD),dinf(),stbl(track))},moof=function(sequenceNumber,tracks){for(var trackFragments=[],i=tracks.length;i--;)trackFragments[i]=traf(tracks[i]);return box.apply(null,[types.moof,mfhd(sequenceNumber)].concat(trackFragments))},moov=function(tracks){for(var i=tracks.length,boxes=[];i--;)boxes[i]=trak(tracks[i]);return box.apply(null,[types.moov,mvhd(4294967295)].concat(boxes).concat(mvex(tracks)))},mvex=function(tracks){for(var i=tracks.length,boxes=[];i--;)boxes[i]=trex(tracks[i]);return box.apply(null,[types.mvex].concat(boxes))},mvhd=function(duration){var bytes=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&duration)>>24,(16711680&duration)>>16,(65280&duration)>>8,255&duration,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 box(types.mvhd,bytes)},sdtp=function(track){var flags,i,samples=track.samples||[],bytes=new Uint8Array(4+samples.length);for(i=0;i<samples.length;i++)flags=samples[i].flags,bytes[i+4]=flags.dependsOn<<4|flags.isDependedOn<<2|flags.hasRedundancy;return box(types.sdtp,bytes)},stbl=function(track){return box(types.stbl,stsd(track),box(types.stts,STTS),box(types.stsc,STSC),box(types.stsz,STSZ),box(types.stco,STCO))},stsd=function(track){return box(types.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===track.type?videoSample(track):audioSample(track))},videoSample=function(track){var i,avc1Box,sps=track.sps||[],pps=track.pps||[],sequenceParameterSets=[],pictureParameterSets=[];for(i=0;i<sps.length;i++)sequenceParameterSets.push((65280&sps[i].byteLength)>>>8),sequenceParameterSets.push(255&sps[i].byteLength),sequenceParameterSets=sequenceParameterSets.concat(Array.prototype.slice.call(sps[i]));for(i=0;i<pps.length;i++)pictureParameterSets.push((65280&pps[i].byteLength)>>>8),pictureParameterSets.push(255&pps[i].byteLength),pictureParameterSets=pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));if(avc1Box=[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,(65280&track.width)>>8,255&track.width,(65280&track.height)>>8,255&track.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),box(types.avcC,new Uint8Array([1,track.profileIdc,track.profileCompatibility,track.levelIdc,255].concat([sps.length],sequenceParameterSets,[pps.length],pictureParameterSets))),box(types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],track.sarRatio){var hSpacing=track.sarRatio[0],vSpacing=track.sarRatio[1];avc1Box.push(box(types.pasp,new Uint8Array([(4278190080&hSpacing)>>24,(16711680&hSpacing)>>16,(65280&hSpacing)>>8,255&hSpacing,(4278190080&vSpacing)>>24,(16711680&vSpacing)>>16,(65280&vSpacing)>>8,255&vSpacing])))}return box.apply(null,avc1Box)},audioSample=function(track){return box(types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&track.channelcount)>>8,255&track.channelcount,(65280&track.samplesize)>>8,255&track.samplesize,0,0,0,0,(65280&track.samplerate)>>8,255&track.samplerate,0,0]),esds(track))},tkhd=function(track){var result=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&track.id)>>24,(16711680&track.id)>>16,(65280&track.id)>>8,255&track.id,0,0,0,0,(4278190080&track.duration)>>24,(16711680&track.duration)>>16,(65280&track.duration)>>8,255&track.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&track.width)>>8,255&track.width,0,0,(65280&track.height)>>8,255&track.height,0,0]);return box(types.tkhd,result)},traf=function(track){var trackFragmentHeader,trackFragmentDecodeTime,trackFragmentRun,sampleDependencyTable,upperWordBaseMediaDecodeTime,lowerWordBaseMediaDecodeTime;return trackFragmentHeader=box(types.tfhd,new Uint8Array([0,0,0,58,(4278190080&track.id)>>24,(16711680&track.id)>>16,(65280&track.id)>>8,255&track.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),upperWordBaseMediaDecodeTime=Math.floor(track.baseMediaDecodeTime/(UINT32_MAX+1)),lowerWordBaseMediaDecodeTime=Math.floor(track.baseMediaDecodeTime%(UINT32_MAX+1)),trackFragmentDecodeTime=box(types.tfdt,new Uint8Array([1,0,0,0,upperWordBaseMediaDecodeTime>>>24&255,upperWordBaseMediaDecodeTime>>>16&255,upperWordBaseMediaDecodeTime>>>8&255,255&upperWordBaseMediaDecodeTime,lowerWordBaseMediaDecodeTime>>>24&255,lowerWordBaseMediaDecodeTime>>>16&255,lowerWordBaseMediaDecodeTime>>>8&255,255&lowerWordBaseMediaDecodeTime])),92,"audio"===track.type?(trackFragmentRun=trun(track,92),box(types.traf,trackFragmentHeader,trackFragmentDecodeTime,trackFragmentRun)):(sampleDependencyTable=sdtp(track),trackFragmentRun=trun(track,sampleDependencyTable.length+92),box(types.traf,trackFragmentHeader,trackFragmentDecodeTime,trackFragmentRun,sampleDependencyTable))},trak=function(track){return track.duration=track.duration||4294967295,box(types.trak,tkhd(track),mdia(track))},trex=function(track){var result=new Uint8Array([0,0,0,0,(4278190080&track.id)>>24,(16711680&track.id)>>16,(65280&track.id)>>8,255&track.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==track.type&&(result[result.length-1]=0),box(types.trex,result)},trunHeader=function(samples,offset){var durationPresent=0,sizePresent=0,flagsPresent=0,compositionTimeOffset=0;return samples.length&&(void 0!==samples[0].duration&&(durationPresent=1),void 0!==samples[0].size&&(sizePresent=2),void 0!==samples[0].flags&&(flagsPresent=4),void 0!==samples[0].compositionTimeOffset&&(compositionTimeOffset=8)),[0,0,durationPresent|sizePresent|flagsPresent|compositionTimeOffset,1,(4278190080&samples.length)>>>24,(16711680&samples.length)>>>16,(65280&samples.length)>>>8,255&samples.length,(4278190080&offset)>>>24,(16711680&offset)>>>16,(65280&offset)>>>8,255&offset]},videoTrun=function(track,offset){var bytesOffest,bytes,header,samples,sample,i;for(offset+=20+16*(samples=track.samples||[]).length,header=trunHeader(samples,offset),(bytes=new Uint8Array(header.length+16*samples.length)).set(header),bytesOffest=header.length,i=0;i<samples.length;i++)sample=samples[i],bytes[bytesOffest++]=(4278190080&sample.duration)>>>24,bytes[bytesOffest++]=(16711680&sample.duration)>>>16,bytes[bytesOffest++]=(65280&sample.duration)>>>8,bytes[bytesOffest++]=255&sample.duration,bytes[bytesOffest++]=(4278190080&sample.size)>>>24,bytes[bytesOffest++]=(16711680&sample.size)>>>16,bytes[bytesOffest++]=(65280&sample.size)>>>8,bytes[bytesOffest++]=255&sample.size,bytes[bytesOffest++]=sample.flags.isLeading<<2|sample.flags.dependsOn,bytes[bytesOffest++]=sample.flags.isDependedOn<<6|sample.flags.hasRedundancy<<4|sample.flags.paddingValue<<1|sample.flags.isNonSyncSample,bytes[bytesOffest++]=61440&sample.flags.degradationPriority,bytes[bytesOffest++]=15&sample.flags.degradationPriority,b
vendor: 1,783 bytes, line 1
1ytes[bytesOffest++]=(4278190080&sample.compositionTimeOffset)>>>24,bytes[bytesOffest++]=(16711680&sample.compositionTimeOffset)>>>16,bytes[bytesOffest++]=(65280&sample.compositionTimeOffset)>>>8,bytes[bytesOffest++]=255&sample.compositionTimeOffset;return box(types.trun,bytes)},audioTrun=function(track,offset){var bytes,bytesOffest,header,samples,sample,i;for(offset+=20+8*(samples=track.samples||[]).length,header=trunHeader(samples,offset),(bytes=new Uint8Array(header.length+8*samples.length)).set(header),bytesOffest=header.length,i=0;i<samples.length;i++)sample=samples[i],bytes[bytesOffest++]=(4278190080&sample.duration)>>>24,bytes[bytesOffest++]=(16711680&sample.duration)>>>16,bytes[bytesOffest++]=(65280&sample.duration)>>>8,bytes[bytesOffest++]=255&sample.duration,bytes[bytesOffest++]=(4278190080&sample.size)>>>24,bytes[bytesOffest++]=(16711680&sample.size)>>>16,bytes[bytesOffest++]=(65280&sample.size)>>>8,bytes[bytesOffest++]=255&sample.size;return box(types.trun,bytes)},trun=function(track,offset){return"audio"===track.type?audioTrun(track,offset):videoTrun(track,offset)};ftyp=function(){return box(types.ftyp,MAJOR_BRAND,MINOR_VERSION,MAJOR_BRAND,AVC1_BRAND)};var silence,secondsToVideoTs,secondsToAudioTs,videoTsToSeconds,audioTsToSeconds,audioTsToVideoTs,videoTsToAudioTs,metadataTsToSeconds,mp4Generator_mdat=function(data){return box(types.mdat,data)},mp4Generator_moof=moof,mp4Generator_initSegment=function(tracks){var result,fileType=ftyp(),movie=moov(tracks);return(result=new Uint8Array(fileType.byteLength+movie.byteLength)).set(fileType),result.set(movie,fileType.byteLength),result},sampleForFrame=function(frame,dataOffset){var sample={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};
vendor: 4,178 bytes, line 1
1return sample.dataOffset=dataOffset,sample.compositionTimeOffset=frame.pts-frame.dts,sample.duration=frame.duration,sample.size=4*frame.length,sample.size+=frame.byteLength,frame.keyFrame&&(sample.flags.dependsOn=2,sample.flags.isNonSyncSample=0),sample},frameUtils_groupNalsIntoFrames=function(nalUnits){var i,currentNal,currentFrame=[],frames=[];for(frames.byteLength=0,frames.nalCount=0,frames.duration=0,currentFrame.byteLength=0,i=0;i<nalUnits.length;i++)"access_unit_delimiter_rbsp"===(currentNal=nalUnits[i]).nalUnitType?(currentFrame.length&&(currentFrame.duration=currentNal.dts-currentFrame.dts,frames.byteLength+=currentFrame.byteLength,frames.nalCount+=currentFrame.length,frames.duration+=currentFrame.duration,frames.push(currentFrame)),(currentFrame=[currentNal]).byteLength=currentNal.data.byteLength,currentFrame.pts=currentNal.pts,currentFrame.dts=currentNal.dts):("slice_layer_without_partitioning_rbsp_idr"===currentNal.nalUnitType&&(currentFrame.keyFrame=!0),currentFrame.duration=currentNal.dts-currentFrame.dts,currentFrame.byteLength+=currentNal.data.byteLength,currentFrame.push(currentNal));return frames.length&&(!currentFrame.duration||currentFrame.duration<=0)&&(currentFrame.duration=frames[frames.length-1].duration),frames.byteLength+=currentFrame.byteLength,frames.nalCount+=currentFrame.length,frames.duration+=currentFrame.duration,frames.push(currentFrame),frames},frameUtils_groupFramesIntoGops=function(frames){var i,currentFrame,currentGop=[],gops=[];for(currentGop.byteLength=0,currentGop.nalCount=0,currentGop.duration=0,currentGop.pts=frames[0].pts,currentGop.dts=frames[0].dts,gops.byteLength=0,gops.nalCount=0,gops.duration=0,gops.pts=frames[0].pts,gops.dts=frames[0].dts,i=0;i<frames.length;i++)(currentFrame=frames[i]).keyFrame?(currentGop.length&&(gops.push(currentGop),gops.byteLength+=currentGop.byteLength,gops.nalCount+=currentGop.nalCount,gops.duration+=currentGop.duration),(currentGop=[currentFrame]).nalCount=currentFrame.length,currentGop.byteLength=currentFrame.byteLength,currentGop.pts=currentFrame.pts,currentGop.dts=currentFrame.dts,currentGop.duration=currentFrame.duration):(currentGop.duration+=currentFrame.duration,currentGop.nalCount+=currentFrame.length,currentGop.byteLength+=currentFrame.byteLength,currentGop.push(currentFrame));return gops.length&¤tGop.duration<=0&&(currentGop.duration=gops[gops.length-1].duration),gops.byteLength+=currentGop.byteLength,gops.nalCount+=currentGop.nalCount,gops.duration+=currentGop.duration,gops.push(currentGop),gops},frameUtils_extendFirstKeyFrame=function(gops){var currentGop;return!gops[0][0].keyFrame&&gops.length>1&&(currentGop=gops.shift(),gops.byteLength-=currentGop.byteLength,gops.nalCount-=currentGop.nalCount,gops[0][0].dts=currentGop.dts,gops[0][0].pts=currentGop.pts,gops[0][0].duration+=currentGop.duration),gops},frameUtils_generateSampleTable=function(gops,baseDataOffset){var h,i,sample,currentGop,currentFrame,dataOffset=baseDataOffset||0,samples=[];for(h=0;h<gops.length;h++)for(currentGop=gops[h],i=0;i<currentGop.length;i++)currentFrame=currentGop[i],dataOffset+=(sample=sampleForFrame(currentFrame,dataOffset)).size,samples.push(sample);return samples},frameUtils_concatenateNalData=function(gops){var h,i,j,currentGop,currentFrame,currentNal,dataOffset=0,nalsByteLength=gops.byteLength,numberOfNals=gops.nalCount,data=new Uint8Array(nalsByteLength+4*numberOfNals),view=new DataView(data.buffer);for(h=0;h<gops.length;h++)for(currentGop=gops[h],i=0;i<currentGop.length;i++)for(currentFrame=currentGop[i],j=0;j<currentFrame.length;j++)currentNal=currentFrame[j],view.setUint32(dataOffset,currentNal.data.byteLength),dataOffset+=4,data.set(currentNal.data,dataOffset),dataOffset+=currentNal.data.byteLength;return data},frameUtils_generateSampleTableForFrame=function(frame,baseDataOffset){var sample,samples=[];return sample=sampleForFrame(frame,baseDataOffset||0),samples.push(sample),samples},frameUtils_concatenateNalDataForFrame=function(frame){var i,currentNal,dataOffset=0,nalsByteLength=frame.byteLength,numberOfNals=frame.length,data=new Uint8Array(nalsByteLength+4*numberOfNals),view=new DataView(data.buffer);for(i=0;i<frame.length;
vendor: 6,143 bytes, line 1
1i++)currentNal=frame[i],view.setUint32(dataOffset,currentNal.data.byteLength),dataOffset+=4,data.set(currentNal.data,dataOffset),dataOffset+=currentNal.data.byteLength;return data},highPrefix=[33,16,5,32,164,27],lowPrefix=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],zeroFill=function(count){for(var a=[];count--;)a.push(0);return a},silence_1=function(){if(!silence){var coneOfSilence={96000:[highPrefix,[227,64],zeroFill(154),[56]],88200:[highPrefix,[231],zeroFill(170),[56]],64000:[highPrefix,[248,192],zeroFill(240),[56]],48000:[highPrefix,[255,192],zeroFill(268),[55,148,128],zeroFill(54),[112]],44100:[highPrefix,[255,192],zeroFill(268),[55,163,128],zeroFill(84),[112]],32000:[highPrefix,[255,192],zeroFill(268),[55,234],zeroFill(226),[112]],24000:[highPrefix,[255,192],zeroFill(268),[55,255,128],zeroFill(268),[111,112],zeroFill(126),[224]],16000:[highPrefix,[255,192],zeroFill(268),[55,255,128],zeroFill(268),[111,255],zeroFill(269),[223,108],zeroFill(195),[1,192]],12000:[lowPrefix,zeroFill(268),[3,127,248],zeroFill(268),[6,255,240],zeroFill(268),[13,255,224],zeroFill(268),[27,253,128],zeroFill(259),[56]],11025:[lowPrefix,zeroFill(268),[3,127,248],zeroFill(268),[6,255,240],zeroFill(268),[13,255,224],zeroFill(268),[27,255,192],zeroFill(268),[55,175,128],zeroFill(108),[112]],8000:[lowPrefix,zeroFill(268),[3,121,16],zeroFill(47),[7]]};metaTable=coneOfSilence,silence=Object.keys(metaTable).reduce(function(obj,key){return obj[key]=new Uint8Array(metaTable[key].reduce(function(arr,part){return arr.concat(part)},[])),obj},{})}var metaTable;return silence};audioTsToVideoTs=function(timestamp,sampleRate){return secondsToVideoTs(audioTsToSeconds(timestamp,sampleRate))},videoTsToAudioTs=function(timestamp,sampleRate){return secondsToAudioTs(videoTsToSeconds(timestamp),sampleRate)},metadataTsToSeconds=function(timestamp,timelineStartPts,keepOriginalTimestamps){return videoTsToSeconds(keepOriginalTimestamps?timestamp:timestamp-timelineStartPts)};var clock_ONE_SECOND_IN_TS=9e4,clock_videoTsToSeconds=(secondsToAudioTs=function(seconds,sampleRate){return seconds*sampleRate},videoTsToSeconds=function(timestamp){return timestamp/9e4}),clock_audioTsToVideoTs=(audioTsToSeconds=function(timestamp,sampleRate){return timestamp/sampleRate},audioTsToVideoTs),clock_videoTsToAudioTs=videoTsToAudioTs,clock_metadataTsToSeconds=metadataTsToSeconds,clock_2=secondsToVideoTs=function(seconds){return 9e4*seconds},clock_4=clock_videoTsToSeconds,audioFrameUtils_prefixWithSilence=function(track,frames,audioAppendStartTs,videoBaseMediaDecodeTime){var baseMediaDecodeTimeTs,frameDuration,silentFrame,i,firstFrame,audioGapDuration=0,audioFillFrameCount=0,audioFillDuration=0;if(frames.length&&(baseMediaDecodeTimeTs=clock_audioTsToVideoTs(track.baseMediaDecodeTime,track.samplerate),frameDuration=Math.ceil(clock_ONE_SECOND_IN_TS/(track.samplerate/1024)),audioAppendStartTs&&videoBaseMediaDecodeTime&&(audioGapDuration=baseMediaDecodeTimeTs-Math.max(audioAppendStartTs,videoBaseMediaDecodeTime),audioFillDuration=(audioFillFrameCount=Math.floor(audioGapDuration/frameDuration))*frameDuration),!(audioFillFrameCount<1||audioFillDuration>clock_ONE_SECOND_IN_TS/2))){for((silentFrame=silence_1()[track.samplerate])||(silentFrame=frames[0].data),i=0;i<audioFillFrameCount;i++)firstFrame=frames[0],frames.splice(0,0,{data:silentFrame,dts:firstFrame.dts-frameDuration,pts:firstFrame.pts-frameDuration});track.baseMediaDecodeTime-=Math.floor(clock_videoTsToAudioTs(audioFillDuration,track.samplerate))}},audioFrameUtils_trimAdtsFramesByEarliestDts=function(adtsFrames,track,earliestAllowedDts){return track.minSegmentDts>=earliestAllowedDts?adtsFrames:(track.minSegmentDts=1/0,adtsFrames.filter(function(currentFrame){return currentFrame.dts>=earliestAllowedDts&&(track.minSegmentDts=Math.min(track.minSegmentDts,currentFrame.dts),track.minSegmentPts=track.minSegmentDts,!0)}))},audioFrameUtils_generateSampleTable=function(frames){var i,currentFrame,samples=[];for(i=0;i<frames.length;i++)currentFrame=frames[i],samples.push({size:currentFrame.data.byteLength,duration:1024});return samples},audioFrameUtils_concatenateFrameData=function(frames){var i,currentFrame,dataOffset=0,data=new Uint8Array(function(array){var i,sum=0;for(i=0;i<array.length;i++)sum+=array[i].data.byteLength;return sum}(frames));for(i=0;i<frames.length;i++)currentFrame=frames[i],data.set(currentFrame.data,dataOffset),dataOffset+=currentFrame.data.byteLength;return data},ONE_SECOND_IN_TS$1=clock_ONE_SECOND_IN_TS,trackDecodeInfo_clearDtsInfo=function(track){delete track.minSegmentDts,delete track.maxSegmentDts,delete track.minSegmentPts,delete track.maxSegmentPts},trackDecodeInfo_calculateTrackBaseMediaDecodeTime=function(track,keepOriginalTimestamps){var baseMediaDecodeTime,minSegmentDts=track.minSegmentDts;return keepOriginalTimestamps||(minSegmentDts-=track.timelineStartInfo.dts),baseMediaDecodeTime=track.timelineStartInfo.baseMediaDecodeTime,baseMediaDecodeTime+=minSegmentDts,baseMediaDecodeTime=Math.max(0,baseMediaDecodeTime),"audio"===track.type&&(baseMediaDecodeTime*=track.samplerate/ONE_SECOND_IN_TS$1,baseMediaDecodeTime=Math.floor(baseMediaDecodeTime)),baseMediaDecodeTime},trackDecodeInfo_collectDtsInfo=function(track,data){"number"==typeof data.pts&&(void 0===track.timelineStartInfo.pts&&(track.timelineStartInfo.pts=data.pts),void 0===track.minSegmentPts?track.minSegmentPts=data.pts:track.minSegmentPts=Math.min(track.minSegmentPts,data.pts),void 0===track.maxSegmentPts?track.maxSegmentPts=data.pts:track.maxSegmentPts=Math.max(track.maxSegmentPts,data.pts)),"number"==typeof data.dts&&(void 0===track.timelineStartInfo.dts&&(track.timelineStartInfo.dts=data.dts),void 0===track.minSegmentDts?track.minSegmentDts=data.dts:track.minSegmentDts=Math.min(track.minSegmentDts,data.dts),void 0===track.maxSegmentDts?track.maxSegmentDts=data.dts:track.maxSegmentDts=Math.max(track.maxSegmentDts,data.dts))},captionPacketParser_parseSei=function(bytes){for(var i=0,result={payloadType:-1,payloadSize:0},payloadType=0,payloadSize=0;i<bytes.byteLength&&128!==bytes[i];){for(;255===bytes[i];)payloadType+=255,i++;for(payloadType+=bytes[i++];255===bytes[i];
vendor: 21,009 bytes, line 1
1)payloadSize+=255,i++;if(payloadSize+=bytes[i++],!result.payload&&4===payloadType){if("GA94"===String.fromCharCode(bytes[i+3],bytes[i+4],bytes[i+5],bytes[i+6])){result.payloadType=payloadType,result.payloadSize=payloadSize,result.payload=bytes.subarray(i,i+payloadSize);break}result.payload=void 0}i+=payloadSize,payloadType=0,payloadSize=0}return result},captionPacketParser_parseUserData=function(sei){return 181!==sei.payload[0]?null:49!=(sei.payload[1]<<8|sei.payload[2])?null:"GA94"!==String.fromCharCode(sei.payload[3],sei.payload[4],sei.payload[5],sei.payload[6])?null:3!==sei.payload[7]?null:sei.payload.subarray(8,sei.payload.length-1)},captionPacketParser_parseCaptionPackets=function(pts,userData){var i,count,offset,data,results=[];if(!(64&userData[0]))return results;for(count=31&userData[0],i=0;i<count;i++)data={type:3&userData[2+(offset=3*i)],pts:pts},4&userData[offset+2]&&(data.ccData=userData[offset+3]<<8|userData[offset+4],results.push(data));return results},captionPacketParser_discardEmulationPreventionBytes=function(data){for(var newLength,newData,length=data.byteLength,emulationPreventionBytesPositions=[],i=1;i<length-2;)0===data[i]&&0===data[i+1]&&3===data[i+2]?(emulationPreventionBytesPositions.push(i+2),i+=2):i++;if(0===emulationPreventionBytesPositions.length)return data;newLength=length-emulationPreventionBytesPositions.length,newData=new Uint8Array(newLength);var sourceIndex=0;for(i=0;i<newLength;sourceIndex++,i++)sourceIndex===emulationPreventionBytesPositions[0]&&(sourceIndex++,emulationPreventionBytesPositions.shift()),newData[i]=data[sourceIndex];return newData},captionPacketParser_USER_DATA_REGISTERED_ITU_T_T35=4,CaptionStream=function CaptionStream(){CaptionStream.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Cea608Stream(0,0),new Cea608Stream(0,1),new Cea608Stream(1,0),new Cea608Stream(1,1)],this.reset(),this.ccStreams_.forEach(function(cc){cc.on("data",this.trigger.bind(this,"data")),cc.on("partialdone",this.trigger.bind(this,"partialdone")),cc.on("done",this.trigger.bind(this,"done"))},this)};(CaptionStream.prototype=new stream).push=function(event){var sei,userData,newCaptionPackets;if("sei_rbsp"===event.nalUnitType&&(sei=captionPacketParser_parseSei(event.escapedRBSP)).payloadType===captionPacketParser_USER_DATA_REGISTERED_ITU_T_T35&&(userData=captionPacketParser_parseUserData(sei)))if(event.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(event.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));newCaptionPackets=captionPacketParser_parseCaptionPackets(event.pts,userData),this.captionPackets_=this.captionPackets_.concat(newCaptionPackets),this.latestDts_!==event.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=event.dts}},CaptionStream.prototype.flushCCStreams=function(flushType){this.ccStreams_.forEach(function(cc){return"flush"===flushType?cc.flush():cc.partialFlush()},this)},CaptionStream.prototype.flushStream=function(flushType){this.captionPackets_.length?(this.captionPackets_.forEach(function(elem,idx){elem.presortIndex=idx}),this.captionPackets_.sort(function(a,b){return a.pts===b.pts?a.presortIndex-b.presortIndex:a.pts-b.pts}),this.captionPackets_.forEach(function(packet){packet.type<2&&this.dispatchCea608Packet(packet)},this),this.captionPackets_.length=0,this.flushCCStreams(flushType)):this.flushCCStreams(flushType)},CaptionStream.prototype.flush=function(){return this.flushStream("flush")},CaptionStream.prototype.partialFlush=function(){return this.flushStream("partialFlush")},CaptionStream.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(ccStream){ccStream.reset()})},CaptionStream.prototype.dispatchCea608Packet=function(packet){this.setsTextOrXDSActive(packet)?this.activeCea608Channel_[packet.type]=null:this.setsChannel1Active(packet)?this.activeCea608Channel_[packet.type]=0:this.setsChannel2Active(packet)&&(this.activeCea608Channel_[packet.type]=1),null!==this.activeCea608Channel_[packet.type]&&this.ccStreams_[(packet.type<<1)+this.activeCea608Channel_[packet.type]].push(packet)},CaptionStream.prototype.setsChannel1Active=function(packet){return 4096==(30720&packet.ccData)},CaptionStream.prototype.setsChannel2Active=function(packet){return 6144==(30720&packet.ccData)},CaptionStream.prototype.setsTextOrXDSActive=function(packet){return 256==(28928&packet.ccData)||4138==(30974&packet.ccData)||6186==(30974&packet.ccData)};var CHARACTER_TRANSLATION={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},getCharFromCode=function(code){return null===code?"":(code=CHARACTER_TRANSLATION[code]||code,String.fromCharCode(code))},ROWS=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],createDisplayBuffer=function(){for(var result=[],i=15;i--;)result.push("");return result},Cea608Stream=function Cea608Stream(field,dataChannel){Cea608Stream.prototype.init.call(this),this.field_=field||0,this.dataChannel_=dataChannel||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(packet){var data,swap,char0,char1,text;if((data=32639&packet.ccData)!==this.lastControlCode_){if(4096==(61440&data)?this.lastControlCode_=data:data!==this.PADDING_&&(this.lastControlCode_=null),char0=data>>>8,char1=255&data,data!==this.PADDING_)if(data===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(data===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(packet.pts),this.flushDisplayed(packet.pts),swap=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=swap,this.startPts_=packet.pts;else if(data===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(packet.pts);else if(data===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(packet.pts);else if(data===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(packet.pts);else if(data===this.CARRIAGE_RETURN_)this.clearFormatting(packet.pts),this.flushDisplayed(packet.pts),this.shiftRowsUp_(),this.startPts_=packet.pts;else if(data===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(data===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(packet.pts),this.displayed_=createDisplayBuffer();else if(data===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=createDisplayBuffer();else if(data===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(packet.pts),this.displayed_=createDisplayBuffer()),this.mode_="paintOn",this.startPts_=packet.pts;else if(this.isSpecialCharacter(char0,char1))text=getCharFromCode((char0=(3&char0)<<8)|char1),this[this.mode_](packet.pts,text),this.column_++;else if(this.isExtCharacter(char0,char1))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),text=getCharFromCode((char0=(3&char0)<<8)|char1),this[this.mode_](packet.pts,text),this.column_++;else if(this.isMidRowCode(char0,char1))this.clearFormatting(packet.pts),this[this.mode_](packet.pts," "),this.column_++,14==(14&char1)&&this.addFormatting(packet.pts,["i"]),1==(1&char1)&&this.addFormatting(packet.pts,["u"]);else if(this.isOffsetControlCode(char0,char1))this.column_+=3&char1;else if(this.isPAC(char0,char1)){var row=ROWS.indexOf(7968&data);"rollUp"===this.mode_&&(row-this.rollUpRows_+1<0&&(row=this.rollUpRows_-1),this.setRollUp(packet.pts,row)),row!==this.row_&&(this.clearFormatting(packet.pts),this.row_=row),1&char1&&-1===this.formatting_.indexOf("u")&&this.addFormatting(packet.pts,["u"]),16==(16&data)&&(this.column_=4*((14&data)>>1)),this.isColorPAC(char1)&&14==(14&char1)&&this.addFormatting(packet.pts,["i"])}else this.isNormalChar(char0)&&(0===char1&&(char1=null),text=getCharFromCode(char0),text+=getCharFromCode(char1),this[this.mode_](packet.pts,text),this.column_+=text.length)}else this.lastControlCode_=null}};Cea608Stream.prototype=new stream,Cea608Stream.prototype.flushDisplayed=function(pts){var content=this.displayed_.map(function(row){try{return row.trim()}catch(e){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");content.length&&this.trigger("data",{startPts:this.startPts_,endPts:pts,text:content,stream:this.name_})},Cea608Stream.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=createDisplayBuffer(),this.nonDisplayed_=createDisplayBuffer(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Cea608Stream.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Cea608Stream.prototype.isSpecialCharacter=function(char0,char1){return char0===this.EXT_&&char1>=48&&char1<=63},Cea608Stream.prototype.isExtCharacter=function(char0,char1){return(char0===this.EXT_+1||char0===this.EXT_+2)&&char1>=32&&char1<=63},Cea608Stream.prototype.isMidRowCode=function(char0,char1){return char0===this.EXT_&&char1>=32&&char1<=47},Cea608Stream.prototype.isOffsetControlCode=function(char0,char1){return char0===this.OFFSET_&&char1>=33&&char1<=35},Cea608Stream.prototype.isPAC=function(char0,char1){return char0>=this.BASE_&&char0<this.BASE_+8&&char1>=64&&char1<=127},Cea608Stream.prototype.isColorPAC=function(char1){return char1>=64&&char1<=79||char1>=96&&char1<=127},Cea608Stream.prototype.isNormalChar=function(_char){return _char>=32&&_char<=127},Cea608Stream.prototype.setRollUp=function(pts,newBaseRow){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(pts),this.nonDisplayed_=createDisplayBuffer(),this.displayed_=createDisplayBuffer()),void 0!==newBaseRow&&newBaseRow!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[newBaseRow-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===newBaseRow&&(newBaseRow=this.row_),this.topRow_=newBaseRow-this.rollUpRows_+1},Cea608Stream.prototype.addFormatting=function(pts,format){this.formatting_=this.formatting_.concat(format);var text=format.reduce(function(text,format){return text+"<"+format+">"},"");this[this.mode_](pts,text)},Cea608Stream.prototype.clearFormatting=function(pts){if(this.formatting_.length){var text=this.formatting_.reverse().reduce(function(text,format){return text+"</"+format+">"},"");this.formatting_=[],this[this.mode_](pts,text)}},Cea608Stream.prototype.popOn=function(pts,text){var baseRow=this.nonDisplayed_[this.row_];baseRow+=text,this.nonDisplayed_[this.row_]=baseRow},Cea608Stream.prototype.rollUp=function(pts,text){var baseRow=this.displayed_[this.row_];baseRow+=text,this.displayed_[this.row_]=baseRow},Cea608Stream.prototype.shiftRowsUp_=function(){var i;for(i=0;i<this.topRow_;i++)this.displayed_[i]="";for(i=this.row_+1;i<15;i++)this.displayed_[i]="";for(i=this.topRow_;i<this.row_;i++)this.displayed_[i]=this.displayed_[i+1];this.displayed_[this.row_]=""},Cea608Stream.prototype.paintOn=function(pts,text){var baseRow=this.displayed_[this.row_];baseRow+=text,this.displayed_[this.row_]=baseRow};var captionStream={CaptionStream:CaptionStream,Cea608Stream:Cea608Stream},streamTypes={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},handleRollover=function(value,reference){var direction=1;for(value>reference&&(direction=-1);Math.abs(reference-value)>4294967296;)value+=8589934592*direction;return value},TimestampRolloverStream=function TimestampRolloverStream(type){var lastDTS,referenceDTS;TimestampRolloverStream.prototype.init.call(this),this.type_=type||"shared",this.push=function(data){"shared"!==this.type_&&data.type!==this.type_||(void 0===referenceDTS&&(referenceDTS=data.dts),data.dts=handleRollover(data.dts,referenceDTS),data.pts=handleRollover(data.pts,referenceDTS),lastDTS=data.dts,this.trigger("data",data))},this.flush=function(){referenceDTS=lastDTS,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){referenceDTS=void 0,lastDTS=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};TimestampRolloverStream.prototype=new stream;var _MetadataStream,timestampRolloverStream_TimestampRolloverStream=TimestampRolloverStream,percentEncode=function(bytes,start,end){var i,result="";for(i=start;i<end;i++)result+="%"+("00"+bytes[i].toString(16)).slice(-2);return result},parseUtf8=function(bytes,start,end){return decodeURIComponent(percentEncode(bytes,start,end))},parseSyncSafeInteger=function(data){return data[0]<<21|data[1]<<14|data[2]<<7|data[3]},tagParsers={TXXX:function(tag){var i;if(3===tag.data[0]){for(i=1;i<tag.data.length;i++)if(0===tag.data[i]){tag.description=parseUtf8(tag.data,1,i),tag.value=parseUtf8(tag.data,i+1,tag.data.length).replace(/\0*$/,"");break}tag.data=tag.value}},WXXX:function(tag){var i;if(3===tag.data[0])for(i=1;i<tag.data.length;i++)if(0===tag.data[i]){tag.description=parseUtf8(tag.data,1,i),tag.url=parseUtf8(tag.data,i+1,tag.data.length);break}},PRIV:function(tag){var i,bytes;for(i=0;i<tag.data.length;i++)if(0===tag.data[i]){tag.owner=(bytes=tag.data,unescape(percentEncode(bytes,0,i)));break}tag.privateData=tag.data.subarray(i+1),tag.data=tag.privateData}};(_MetadataStream=function(options){var i,settings={debug:!(!options||!options.debug),descriptor:options&&options.descriptor},tagSize=0,buffer=[],bufferSize=0;if(_MetadataStream.prototype.init.call(this),this.dispatchType=streamTypes.METADATA_STREAM_TYPE.toString(16),settings.descriptor)for(i=0;i<settings.descriptor.length;i++)this.dispatchType+=("00"+settings.descriptor[i].toString(16)).slice(-2);this.push=function(chunk){var tag,frameStart,frameSize,frame,i;if("timed-metadata"===chunk.type)if(chunk.dataAlignmentIndicator&&(bufferSize=0,buffer.length=0),0===buffer.length&&(chunk.data.length<10||chunk.data[0]!=="I".charCodeAt(0)||chunk.data[1]!=="D".charCodeAt(0)||chunk.data[2]!=="3".charCodeAt(0)))settings.debug&&console.log("Skipping unrecognized metadata packet");else if(buffer.push(chunk),bufferSize+=chunk.data.byteLength,1===buffer.length&&(tagSize=parseSyncSafeInteger(chunk.data.subarray(6,10)),tagSize+=10),!(bufferSize<tagSize)){for(tag={data:new Uint8Array(tagSize),frames:[],pts:buffer[0].pts,dts:buffer[0].dts},i=0;i<tagSize;)tag.data.set(buffer[0].data.subarray(0,tagSize-i),i),i+=buffer[0].data.byteLength,bufferSize-=buffer[0].data.byteLength,buffer.shift();frameStart=10,64&tag.data[5]&&(frameStart+=4,frameStart+=parseSyncSafeInteger(tag.data.subarray(10,14)),tagSize-=parseSyncSafeInteger(tag.data.subarray(16,20)));do{if((frameSize=parseSyncSafeInteger(tag.data.subarray(frameStart+4,frameStart+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((frame={id:String.fromCharCode(tag.data[frameStart],tag.data[frameStart+1],tag.data[frameStart+2],tag.data[frameStart+3]),data:tag.data.subarray(frameStart+10,frameStart+frameSize+10)}).key=frame.id,tagParsers[frame.id]&&(tagParsers[frame.id](frame),"com.apple.streaming.transportStreamTimestamp"===frame.owner)){var d=frame.data,size=(1&d[3])<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;size*=4,size+=3&d[7],frame.timeStamp=size,void 0===tag.pts&&void 0===tag.dts&&(tag.pts=frame.timeStamp,tag.dts=frame.timeStamp),this.trigger("timestamp",frame)}tag.frames.push(frame),frameStart+=10,frameStart+=frameSize}while(frameStart<tagSize);this.trigger("data",tag)}}}).prototype=new stream;var _TransportPacketStream,_TransportParseStream,_ElementaryStream,metadataStream=_MetadataStream,TimestampRolloverStream$1=timestampRolloverStream_TimestampRolloverStream;(_TransportPacketStream=function(){var buffer=new Uint8Array(188),bytesInBuffer=0;_TransportPacketStream.prototype.init.call(this),this.push=function(bytes){var everything,startIndex=0,endIndex=188;for(bytesInBuffer?((everything=new Uint8Array(bytes.byteLength+bytesInBuffer)).set(buffer.subarray(0,bytesInBuffer)),everything.set(bytes,bytesInBuffer),bytesInBuffer=0):everything=bytes;endIndex<everything.byteLength;)71!==everything[startIndex]||71!==everything[endIndex]?(startIndex++,endIndex++):(this.trigger("data",everything.subarray(startIndex,endIndex)),startIndex+=188,endIndex+=188);startIndex<everything.byteLength&&(buffer.set(everything.subarray(startIndex),0),bytesInBuffer=everything.byteLength-startIndex)},this.flush=function(){188===bytesInBuffer&&71===buffer[0]&&(this.trigger("data",buffer),bytesInBuffer=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){bytesInBuffer=0,this.trigger("reset")}}).prototype=new stream,(_TransportParseStream=function(){var parsePsi,parsePat,parsePmt,self;_TransportParseStream.prototype.init.call(this),self=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,parsePsi=function(payload,psi){var offset=0;psi.payloadUnitStartIndicator&&(offset+=payload[offset]+1),"pat"===psi.type?parsePat(payload.subarray(offset),psi):parsePmt(payload.subarray(offset),psi)},parsePat=function(payload,pat){pat.section_number=payload[7],pat.last_section_number=payload[8],self.pmtPid=(31&payload[10])<<8|payload[11],pat.pmtPid=self.pmtPid},parsePmt=function(payload,pmt){var tableEnd,offset;if(1&payload[5]){for(self.programMapTable={video:null,audio:null,"timed-metadata":{}},tableEnd=3+((15&payload[1])<<8|payload[2])-4,offset=12+((15&payload[10])<<8|payload[11]);offset<tableEnd;){var streamType=payload[offset],pid=(31&payload[offset+1])<<8|payload[offset+2];streamType===streamTypes.H264_STREAM_TYPE&&null===self.programMapTable.video?self.programMapTable.video=pid:streamType===streamTypes.ADTS_STREAM_TYPE&&null===self.programMapTable.audio?self.programMapTable.audio=pid:streamType===streamTypes.METADATA_STREAM_TYPE&&(self.programMapTable["timed-metadata"][pid]=streamType),offset+=5+((15&payload[offset+3])<<8|payload[offset+4])}pmt.programMapTable=self.programMapTable}},this.push=function(packet){var result={},offset=4;if(result.payloadUnitStartIndicator=!!(64&packet[1]),result.pid=31&packet[1],result.pid<<=8,result.pid|=packet[2],(48&packet[3])>>>4>1&&(offset+=packet[offset]+1),0===result.pid)result.type="pat",parsePsi(packet.subarray(offset),result),this.trigger("data",result);else if(result.pid===this.pmtPid)for(result.type="pmt",parsePsi(packet.subarray(offset),result),this.trigger("data",result);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([packet,offset,result]):this.processPes_(packet,offset,result)},this.processPes_=function(packet,offset,result){result.pid===this.programMapTable.video?result.streamType=streamTypes.H264_STREAM_TYPE:result.pid===this.programMapTable.audio?result.streamType=streamTypes.ADTS_STREAM_TYPE:result.streamType=this.programMapTable["timed-metadata"][result.pid],result.type="pes",result.data=packet.subarray(offset),this.trigger("data",result)}}).prototype=new stream,_TransportParseStream.STREAM_TYPES={h264:27,adts:15},(_ElementaryStream=function(){var programMapTable,self=this,video={data:[],size:0},audio={data:[],size:0},timedMetadata={data:[],size:0},flushStream=function(stream,type,forceFlush){var packetFlushable,fragment,packetData=new Uint8Array(stream.size),event={type:type},i=0,offset=0;if(stream.data.length&&!(stream.size<9)){for(event.trackId=stream.data[0].pid,i=0;i<stream.data.length;i++)fragment=stream.data[i],packetData.set(fragment.data,offset),offset+=fragment.data.byteLength;var payload,pes,ptsDtsFlags;payload=packetData,(pes=event).packetLength=6+(payload[4]<<8|payload[5]),pes.dataAlignmentIndicator=0!=(4&payload[6]),192&(ptsDtsFlags=payload[7])&&
vendor: 7,365 bytes, line 1
1(pes.pts=(14&payload[9])<<27|(255&payload[10])<<20|(254&payload[11])<<12|(255&payload[12])<<5|(254&payload[13])>>>3,pes.pts*=4,pes.pts+=(6&payload[13])>>>1,pes.dts=pes.pts,64&ptsDtsFlags&&(pes.dts=(14&payload[14])<<27|(255&payload[15])<<20|(254&payload[16])<<12|(255&payload[17])<<5|(254&payload[18])>>>3,pes.dts*=4,pes.dts+=(6&payload[18])>>>1)),pes.data=payload.subarray(9+payload[8]),packetFlushable="video"===type||event.packetLength<=stream.size,(forceFlush||packetFlushable)&&(stream.size=0,stream.data.length=0),packetFlushable&&self.trigger("data",event)}};_ElementaryStream.prototype.init.call(this),this.push=function(data){({pat:function(){},pes:function(){var stream,streamType;switch(data.streamType){case streamTypes.H264_STREAM_TYPE:stream=video,streamType="video";break;case streamTypes.ADTS_STREAM_TYPE:stream=audio,streamType="audio";break;case streamTypes.METADATA_STREAM_TYPE:stream=timedMetadata,streamType="timed-metadata";break;default:return}data.payloadUnitStartIndicator&&flushStream(stream,streamType,!0),stream.data.push(data),stream.size+=data.data.byteLength},pmt:function(){var event={type:"metadata",tracks:[]};null!==(programMapTable=data.programMapTable).video&&event.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+programMapTable.video,codec:"avc",type:"video"}),null!==programMapTable.audio&&event.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+programMapTable.audio,codec:"adts",type:"audio"}),self.trigger("data",event)}})[data.type]()},this.reset=function(){video.size=0,video.data.length=0,audio.size=0,audio.data.length=0,this.trigger("reset")},this.flushStreams_=function(){flushStream(video,"video"),flushStream(audio,"audio"),flushStream(timedMetadata,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new stream;var m2ts={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:_TransportPacketStream,TransportParseStream:_TransportParseStream,ElementaryStream:_ElementaryStream,TimestampRolloverStream:TimestampRolloverStream$1,CaptionStream:captionStream.CaptionStream,Cea608Stream:captionStream.Cea608Stream,MetadataStream:metadataStream};for(var type in streamTypes)streamTypes.hasOwnProperty(type)&&(m2ts[type]=streamTypes[type]);var _AdtsStream,m2ts_1=m2ts,ONE_SECOND_IN_TS$2=clock_ONE_SECOND_IN_TS,ADTS_SAMPLING_FREQUENCIES=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(_AdtsStream=function(handlePartialSegments){var buffer,frameNum=0;_AdtsStream.prototype.init.call(this),this.push=function(packet){var frameLength,protectionSkipBytes,frameEnd,oldBuffer,sampleCount,adtsFrameDuration,i=0;if(handlePartialSegments||(frameNum=0),"audio"===packet.type)for(buffer?(oldBuffer=buffer,(buffer=new Uint8Array(oldBuffer.byteLength+packet.data.byteLength)).set(oldBuffer),buffer.set(packet.data,oldBuffer.byteLength)):buffer=packet.data;i+5<buffer.length;)if(255===buffer[i]&&240==(246&buffer[i+1])){if(protectionSkipBytes=2*(1&~buffer[i+1]),frameLength=(3&buffer[i+3])<<11|buffer[i+4]<<3|(224&buffer[i+5])>>5,adtsFrameDuration=(sampleCount=1024*(1+(3&buffer[i+6])))*ONE_SECOND_IN_TS$2/ADTS_SAMPLING_FREQUENCIES[(60&buffer[i+2])>>>2],frameEnd=i+frameLength,buffer.byteLength<frameEnd)return;if(this.trigger("data",{pts:packet.pts+frameNum*adtsFrameDuration,dts:packet.dts+frameNum*adtsFrameDuration,sampleCount:sampleCount,audioobjecttype:1+(buffer[i+2]>>>6&3),channelcount:(1&buffer[i+2])<<2|(192&buffer[i+3])>>>6,samplerate:ADTS_SAMPLING_FREQUENCIES[(60&buffer[i+2])>>>2],samplingfrequencyindex:(60&buffer[i+2])>>>2,samplesize:16,data:buffer.subarray(i+7+protectionSkipBytes,frameEnd)}),frameNum++,buffer.byteLength===frameEnd)return void(buffer=void 0);buffer=buffer.subarray(frameEnd)}else i++},this.flush=function(){frameNum=0,this.trigger("done")},this.reset=function(){buffer=void 0,this.trigger("reset")},this.endTimeline=function(){buffer=void 0,this.trigger("endedtimeline")}}).prototype=new stream;var _H264Stream,_NalByteStream,PROFILES_WITH_OPTIONAL_SPS_DATA,adts=_AdtsStream,expGolomb=function(workingData){var workingBytesAvailable=workingData.byteLength,workingWord=0,workingBitsAvailable=0;this.length=function(){return 8*workingBytesAvailable},this.bitsAvailable=function(){return 8*workingBytesAvailable+workingBitsAvailable},this.loadWord=function(){var position=workingData.byteLength-workingBytesAvailable,workingBytes=new Uint8Array(4),availableBytes=Math.min(4,workingBytesAvailable);if(0===availableBytes)throw new Error("no bytes available");workingBytes.set(workingData.subarray(position,position+availableBytes)),workingWord=new DataView(workingBytes.buffer).getUint32(0),workingBitsAvailable=8*availableBytes,workingBytesAvailable-=availableBytes},this.skipBits=function(count){var skipBytes;workingBitsAvailable>count?(workingWord<<=count,workingBitsAvailable-=count):(count-=workingBitsAvailable,count-=8*(skipBytes=Math.floor(count/8)),workingBytesAvailable-=skipBytes,this.loadWord(),workingWord<<=count,workingBitsAvailable-=count)},this.readBits=function(size){var bits=Math.min(workingBitsAvailable,size),valu=workingWord>>>32-bits;return(workingBitsAvailable-=bits)>0?workingWord<<=bits:workingBytesAvailable>0&&this.loadWord(),(bits=size-bits)>0?valu<<bits|this.readBits(bits):valu},this.skipLeadingZeros=function(){var leadingZeroCount;for(leadingZeroCount=0;leadingZeroCount<workingBitsAvailable;++leadingZeroCount)if(0!=(workingWord&2147483648>>>leadingZeroCount))return workingWord<<=leadingZeroCount,workingBitsAvailable-=leadingZeroCount,leadingZeroCount;return this.loadWord(),leadingZeroCount+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var clz=this.skipLeadingZeros();return this.readBits(clz+1)-1},this.readExpGolomb=function(){var valu=this.readUnsignedExpGolomb();return 1&valu?1+valu>>>1:-1*(valu>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(_NalByteStream=function(){var i,buffer,syncPoint=0;_NalByteStream.prototype.init.call(this),this.push=function(data){var swapBuffer;buffer?((swapBuffer=new Uint8Array(buffer.byteLength+data.data.byteLength)).set(buffer),swapBuffer.set(data.data,buffer.byteLength),buffer=swapBuffer):buffer=data.data;for(var len=buffer.byteLength;syncPoint<len-3;syncPoint++)if(1===buffer[syncPoint+2]){i=syncPoint+5;break}for(;i<len;)switch(buffer[i]){case 0:if(0!==buffer[i-1]){i+=2;break}if(0!==buffer[i-2]){i++;break}syncPoint+3!==i-2&&this.trigger("data",buffer.subarray(syncPoint+3,i-2));do{i++}while(1!==buffer[i]&&i<len);syncPoint=i-2,i+=3;break;case 1:if(0!==buffer[i-1]||0!==buffer[i-2]){i+=3;break}this.trigger("data",buffer.subarray(syncPoint+3,i-2)),syncPoint=i-2,i+=3;break;default:i+=3}buffer=buffer.subarray(syncPoint),i-=syncPoint,syncPoint=0},this.reset=function(){buffer=null,syncPoint=0,this.trigger("reset")},this.flush=function(){buffer&&buffer.byteLength>3&&this.trigger("data",buffer.subarray(syncPoint+3)),buffer=null,syncPoint=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new stream,PROFILES_WITH_OPTIONAL_SPS_DATA={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0}
vendor: 5,752 bytes, line 1
1,(_H264Stream=function(){var self,trackId,currentPts,currentDts,discardEmulationPreventionBytes,readSequenceParameterSet,skipScalingList,nalByteStream=new _NalByteStream;_H264Stream.prototype.init.call(this),self=this,this.push=function(packet){"video"===packet.type&&(trackId=packet.trackId,currentPts=packet.pts,currentDts=packet.dts,nalByteStream.push(packet))},nalByteStream.on("data",function(data){var event={trackId:trackId,pts:currentPts,dts:currentDts,data:data};switch(31&data[0]){case 5:event.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:event.nalUnitType="sei_rbsp",event.escapedRBSP=discardEmulationPreventionBytes(data.subarray(1));break;case 7:event.nalUnitType="seq_parameter_set_rbsp",event.escapedRBSP=discardEmulationPreventionBytes(data.subarray(1)),event.config=readSequenceParameterSet(event.escapedRBSP);break;case 8:event.nalUnitType="pic_parameter_set_rbsp";break;case 9:event.nalUnitType="access_unit_delimiter_rbsp"}self.trigger("data",event)}),nalByteStream.on("done",function(){self.trigger("done")}),nalByteStream.on("partialdone",function(){self.trigger("partialdone")}),nalByteStream.on("reset",function(){self.trigger("reset")}),nalByteStream.on("endedtimeline",function(){self.trigger("endedtimeline")}),this.flush=function(){nalByteStream.flush()},this.partialFlush=function(){nalByteStream.partialFlush()},this.reset=function(){nalByteStream.reset()},this.endTimeline=function(){nalByteStream.endTimeline()},skipScalingList=function(count,expGolombDecoder){var j,lastScale=8,nextScale=8;for(j=0;j<count;j++)0!==nextScale&&(nextScale=(lastScale+expGolombDecoder.readExpGolomb()+256)%256),lastScale=0===nextScale?lastScale:nextScale},discardEmulationPreventionBytes=function(data){for(var newLength,newData,length=data.byteLength,emulationPreventionBytesPositions=[],i=1;i<length-2;)0===data[i]&&0===data[i+1]&&3===data[i+2]?(emulationPreventionBytesPositions.push(i+2),i+=2):i++;if(0===emulationPreventionBytesPositions.length)return data;newLength=length-emulationPreventionBytesPositions.length,newData=new Uint8Array(newLength);var sourceIndex=0;for(i=0;i<newLength;sourceIndex++,i++)sourceIndex===emulationPreventionBytesPositions[0]&&(sourceIndex++,emulationPreventionBytesPositions.shift()),newData[i]=data[sourceIndex];return newData},readSequenceParameterSet=function(data){var expGolombDecoder,profileIdc,levelIdc,profileCompatibility,chromaFormatIdc,picOrderCntType,numRefFramesInPicOrderCntCycle,picWidthInMbsMinus1,picHeightInMapUnitsMinus1,frameMbsOnlyFlag,scalingListCount,sarRatio,i,frameCropLeftOffset=0,frameCropRightOffset=0,frameCropTopOffset=0,frameCropBottomOffset=0,sarScale=1;if(profileIdc=(expGolombDecoder=new expGolomb(data)).readUnsignedByte(),profileCompatibility=expGolombDecoder.readUnsignedByte(),levelIdc=expGolombDecoder.readUnsignedByte(),expGolombDecoder.skipUnsignedExpGolomb(),PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]&&(3===(chromaFormatIdc=expGolombDecoder.readUnsignedExpGolomb())&&expGolombDecoder.skipBits(1),expGolombDecoder.skipUnsignedExpGolomb(),expGolombDecoder.skipUnsignedExpGolomb(),expGolombDecoder.skipBits(1),expGolombDecoder.readBoolean()))for(scalingListCount=3!==chromaFormatIdc?8:12,i=0;i<scalingListCount;i++)expGolombDecoder.readBoolean()&&skipScalingList(i<6?16:64,expGolombDecoder);if(expGolombDecoder.skipUnsignedExpGolomb(),0===(picOrderCntType=expGolombDecoder.readUnsignedExpGolomb()))expGolombDecoder.readUnsignedExpGolomb();else if(1===picOrderCntType)for(expGolombDecoder.skipBits(1),expGolombDecoder.skipExpGolomb(),expGolombDecoder.skipExpGolomb(),numRefFramesInPicOrderCntCycle=expGolombDecoder.readUnsignedExpGolomb(),i=0;i<numRefFramesInPicOrderCntCycle;i++)expGolombDecoder.skipExpGolomb();if(expGolombDecoder.skipUnsignedExpGolomb(),expGolombDecoder.skipBits(1),picWidthInMbsMinus1=expGolombDecoder.readUnsignedExpGolomb(),picHeightInMapUnitsMinus1=expGolombDecoder.readUnsignedExpGolomb(),0===(frameMbsOnlyFlag=expGolombDecoder.readBits(1))&&expGolombDecoder.skipBits(1),expGolombDecoder.skipBits(1),expGolombDecoder.readBoolean()&&(frameCropLeftOffset=expGolombDecoder.readUnsignedExpGolomb(),frameCropRightOffset=expGolombDecoder.readUnsignedExpGolomb(),frameCropTopOffset=expGolombDecoder.readUnsignedExpGolomb(),frameCropBottomOffset=expGolombDecoder.readUnsignedExpGolomb()),expGolombDecoder.readBoolean()&&expGolombDecoder.readBoolean()){switch(expGolombDecoder.readUnsignedByte()){case 1:sarRatio=[1,1];break;case 2:sarRatio=[12,11];break;case 3:sarRatio=[10,11];break;case 4:sarRatio=[16,11];break;case 5:sarRatio=[40,33];break;case 6:sarRatio=[24,11];break;case 7:sarRatio=[20,11];break;case 8:sarRatio=[32,11];break;case 9:sarRatio=[80,33];break;case 10:sarRatio=[18,11];break;case 11:sarRatio=[15,11];break;case 12:sarRatio=[64,33];break;case 13:sarRatio=[160,99];break;case 14:sarRatio=[4,3];break;case 15:sarRatio=[3,2];break;case 16:sarRatio=[2,1];break;case 255:sarRatio=[expGolombDecoder.readUnsignedByte()<<8|expGolombDecoder.readUnsignedByte(),expGolombDecoder.readUnsignedByte()<<8|expGolombDecoder.readUnsignedByte()]}sarRatio&&(sarScale=sarRatio[0]/sarRatio[1])}return{profileIdc:profileIdc,levelIdc:levelIdc,profileCompatibility:profileCompatibility,width:Math.ceil((16*(picWidthInMbsMinus1+1)-2*frameCropLeftOffset-2*frameCropRightOffset)*sarScale),height:(2-frameMbsOnlyFlag)*(picHeightInMapUnitsMinus1+1)*16-2*frameCropTopOffset-2*frameCropBottomOffset,sarRatio:sarRatio}}}).prototype=new stream;var _AacStream,h264={H264Stream:_H264Stream,NalByteStream:_NalByteStream},parseId3TagSize=function(header,byteIndex){var returnSize=header[byteIndex+6]<<21|header[byteIndex+7]<<14|header[byteIndex+8]<<7|header[byteIndex+9];return returnSize=returnSize>=0?returnSize:0,(16&header[byteIndex+5])>>
vendor: 14,269 bytes, line 1
14?returnSize+20:returnSize+10},utils_isLikelyAacData=function(data){var offset=function getId3Offset(data,offset){return data.length-offset<10||data[offset]!=="I".charCodeAt(0)||data[offset+1]!=="D".charCodeAt(0)||data[offset+2]!=="3".charCodeAt(0)?offset:getId3Offset(data,offset+=parseId3TagSize(data,offset))}(data,0);return data.length>=offset+2&&255==(255&data[offset])&&240==(240&data[offset+1])&&16==(22&data[offset+1])},utils_parseId3TagSize=parseId3TagSize,utils_parseAdtsSize=function(header,byteIndex){var lowThree=(224&header[byteIndex+5])>>5,middle=header[byteIndex+4]<<3;return 6144&header[byteIndex+3]|middle|lowThree};(_AacStream=function(){var everything=new Uint8Array,timeStamp=0;_AacStream.prototype.init.call(this),this.setTimestamp=function(timestamp){timeStamp=timestamp},this.push=function(bytes){var bytesLeft,chunk,packet,tempLength,frameSize=0,byteIndex=0;for(everything.length?(tempLength=everything.length,(everything=new Uint8Array(bytes.byteLength+tempLength)).set(everything.subarray(0,tempLength)),everything.set(bytes,tempLength)):everything=bytes;everything.length-byteIndex>=3;)if(everything[byteIndex]!=="I".charCodeAt(0)||everything[byteIndex+1]!=="D".charCodeAt(0)||everything[byteIndex+2]!=="3".charCodeAt(0))if(255!=(255&everything[byteIndex])||240!=(240&everything[byteIndex+1]))byteIndex++;else{if(everything.length-byteIndex<7)break;if(byteIndex+(frameSize=utils_parseAdtsSize(everything,byteIndex))>everything.length)break;packet={type:"audio",data:everything.subarray(byteIndex,byteIndex+frameSize),pts:timeStamp,dts:timeStamp},this.trigger("data",packet),byteIndex+=frameSize}else{if(everything.length-byteIndex<10)break;if(byteIndex+(frameSize=utils_parseId3TagSize(everything,byteIndex))>everything.length)break;chunk={type:"timed-metadata",data:everything.subarray(byteIndex,byteIndex+frameSize)},this.trigger("data",chunk),byteIndex+=frameSize}bytesLeft=everything.length-byteIndex,everything=bytesLeft>0?everything.subarray(byteIndex):new Uint8Array},this.reset=function(){everything=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){everything=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new stream;var _VideoSegmentStream,_AudioSegmentStream,_Transmuxer,_CoalesceStream,aac=_AacStream,audioProperties=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],videoProperties=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],H264Stream$1=h264.H264Stream,isLikelyAacData$1=utils_isLikelyAacData,ONE_SECOND_IN_TS$3=clock_ONE_SECOND_IN_TS,arrayEquals=function(a,b){var i;if(a.length!==b.length)return!1;for(i=0;i<a.length;i++)if(a[i]!==b[i])return!1;return!0},generateVideoSegmentTimingInfo=function(baseMediaDecodeTime,startDts,startPts,endDts,endPts,prependedContentDuration){return{start:{dts:baseMediaDecodeTime,pts:baseMediaDecodeTime+(startPts-startDts)},end:{dts:baseMediaDecodeTime+(endDts-startDts),pts:baseMediaDecodeTime+(endPts-startPts)},prependedContentDuration:prependedContentDuration,baseMediaDecodeTime:baseMediaDecodeTime}};(_AudioSegmentStream=function(track,options){var adtsFrames=[],sequenceNumber=0,earliestAllowedDts=0,audioAppendStartTs=0,videoBaseMediaDecodeTime=1/0;options=options||{},_AudioSegmentStream.prototype.init.call(this),this.push=function(data){trackDecodeInfo_collectDtsInfo(track,data),track&&audioProperties.forEach(function(prop){track[prop]=data[prop]}),adtsFrames.push(data)},this.setEarliestDts=function(earliestDts){earliestAllowedDts=earliestDts},this.setVideoBaseMediaDecodeTime=function(baseMediaDecodeTime){videoBaseMediaDecodeTime=baseMediaDecodeTime},this.setAudioAppendStart=function(timestamp){audioAppendStartTs=timestamp},this.flush=function(){var frames,moof,mdat,boxes,frameDuration;0!==adtsFrames.length?(frames=audioFrameUtils_trimAdtsFramesByEarliestDts(adtsFrames,track,earliestAllowedDts),track.baseMediaDecodeTime=trackDecodeInfo_calculateTrackBaseMediaDecodeTime(track,options.keepOriginalTimestamps),audioFrameUtils_prefixWithSilence(track,frames,audioAppendStartTs,videoBaseMediaDecodeTime),track.samples=audioFrameUtils_generateSampleTable(frames),mdat=mp4Generator_mdat(audioFrameUtils_concatenateFrameData(frames)),adtsFrames=[],moof=mp4Generator_moof(sequenceNumber,[track]),boxes=new Uint8Array(moof.byteLength+mdat.byteLength),sequenceNumber++,boxes.set(moof),boxes.set(mdat,moof.byteLength),trackDecodeInfo_clearDtsInfo(track),frameDuration=Math.ceil(1024*ONE_SECOND_IN_TS$3/track.samplerate),frames.length&&this.trigger("timingInfo",{start:frames[0].pts,end:frames[0].pts+frames.length*frameDuration}),this.trigger("data",{track:track,boxes:boxes}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){trackDecodeInfo_clearDtsInfo(track),adtsFrames=[],this.trigger("reset")}}).prototype=new stream,(_VideoSegmentStream=function(track,options){var config,pps,sequenceNumber=0,nalUnits=[],gopsToAlignWith=[];options=options||{},_VideoSegmentStream.prototype.init.call(this),delete track.minPTS,this.gopCache_=[],this.push=function(nalUnit){trackDecodeInfo_collectDtsInfo(track,nalUnit),"seq_parameter_set_rbsp"!==nalUnit.nalUnitType||config||(config=nalUnit.config,track.sps=[nalUnit.data],videoProperties.forEach(function(prop){track[prop]=config[prop]},this)),"pic_parameter_set_rbsp"!==nalUnit.nalUnitType||pps||(pps=nalUnit.data,track.pps=[nalUnit.data]),nalUnits.push(nalUnit)},this.flush=function(){for(var frames,gopForFusion,gops,moof,mdat,boxes,firstGop,lastGop,prependedContentDuration=0;nalUnits.length&&"access_unit_delimiter_rbsp"!==nalUnits[0].nalUnitType;)nalUnits.shift();if(0===nalUnits.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(frames=frameUtils_groupNalsIntoFrames(nalUnits),(gops=frameUtils_groupFramesIntoGops(frames))[0][0].keyFrame||((gopForFusion=this.getGopForFusion_(nalUnits[0],track))?(prependedContentDuration=gopForFusion.duration,gops.unshift(gopForFusion),gops.byteLength+=gopForFusion.byteLength,gops.nalCount+=gopForFusion.nalCount,gops.pts=gopForFusion.pts,gops.dts=gopForFusion.dts,gops.duration+=gopForFusion.duration):gops=frameUtils_extendFirstKeyFrame(gops)),gopsToAlignWith.length){var alignedGops;if(!(alignedGops=options.alignGopsAtEnd?this.alignGopsAtEnd_(gops):this.alignGopsAtStart_(gops)))return this.gopCache_.unshift({gop:gops.pop(),pps:track.pps,sps:track.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),nalUnits=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");trackDecodeInfo_clearDtsInfo(track),gops=alignedGops}trackDecodeInfo_collectDtsInfo(track,gops),track.samples=frameUtils_generateSampleTable(gops),mdat=mp4Generator_mdat(frameUtils_concatenateNalData(gops)),track.baseMediaDecodeTime=trackDecodeInfo_calculateTrackBaseMediaDecodeTime(track,options.keepOriginalTimestamps),this.trigger("processedGopsInfo",gops.map(function(gop){return{pts:gop.pts,dts:gop.dts,byteLength:gop.byteLength}})),firstGop=gops[0],lastGop=gops[gops.length-1],this.trigger("segmentTimingInfo",generateVideoSegmentTimingInfo(track.baseMediaDecodeTime,firstGop.dts,firstGop.pts,lastGop.dts+lastGop.duration,lastGop.pts+lastGop.duration,prependedContentDuration)),this.trigger("timingInfo",{start:gops[0].pts,end:gops[gops.length-1].pts+gops[gops.length-1].duration}),this.gopCache_.unshift({gop:gops.pop(),pps:track.pps,sps:track.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),nalUnits=[],this.trigger("baseMediaDecodeTime",track.baseMediaDecodeTime),this.trigger("timelineStartInfo",track.timelineStartInfo),moof=mp4Generator_moof(sequenceNumber,[track]),boxes=new Uint8Array(moof.byteLength+mdat.byteLength),sequenceNumber++,boxes.set(moof),boxes.set(mdat,moof.byteLength),this.trigger("data",{track:track,boxes:boxes}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),nalUnits=[],this.gopCache_.length=0,gopsToAlignWith.length=0,this.trigger("reset")},this.resetStream_=function(){trackDecodeInfo_clearDtsInfo(track),config=void 0,pps=void 0},this.getGopForFusion_=function(nalUnit){var dtsDistance,nearestGopObj,currentGop,currentGopObj,i,nearestDistance=1/0;for(i=0;i<this.gopCache_.length;i++)currentGop=(currentGopObj=this.gopCache_[i]).gop,track.pps&&arrayEquals(track.pps[0],currentGopObj.pps[0])&&track.sps&&arrayEquals(track.sps[0],currentGopObj.sps[0])&&(currentGop.dts<track.timelineStartInfo.dts||(dtsDistance=nalUnit.dts-currentGop.dts-currentGop.duration)>=-1e4&&dtsDistance<=45e3&&(!nearestGopObj||nearestDistance>dtsDistance)&&(nearestGopObj=currentGopObj,nearestDistance=dtsDistance));return nearestGopObj?nearestGopObj.gop:null},this.alignGopsAtStart_=function(gops){var alignIndex,gopIndex,align,gop,byteLength,nalCount,duration,alignedGops;for(byteLength=gops.byteLength,nalCount=gops.nalCount,duration=gops.duration,alignIndex=gopIndex=0;alignIndex<gopsToAlignWith.length&&gopIndex<gops.length&&(align=gopsToAlignWith[alignIndex],gop=gops[gopIndex],align.pts!==gop.pts);)gop.pts>align.pts?alignIndex++:(gopIndex++,byteLength-=gop.byteLength,nalCount-=gop.nalCount,duration-=gop.duration);return 0===gopIndex?gops:gopIndex===gops.length?null:((alignedGops=gops.slice(gopIndex)).byteLength=byteLength,alignedGops.duration=duration,alignedGops.nalCount=nalCount,alignedGops.pts=alignedGops[0].pts,alignedGops.dts=alignedGops[0].dts,alignedGops)},this.alignGopsAtEnd_=function(gops){var alignIndex,gopIndex,align,gop,alignEndIndex,matchFound,trimIndex;for(alignIndex=gopsToAlignWith.length-1,gopIndex=gops.length-1,alignEndIndex=null,matchFound=!1;alignIndex>=0&&gopIndex>=0;){if(align=gopsToAlignWith[alignIndex],gop=gops[gopIndex],align.pts===gop.pts){matchFound=!0;break}align.pts>gop.pts?alignIndex--:(alignIndex===gopsToAlignWith.length-1&&(alignEndIndex=gopIndex),gopIndex--)}if(!matchFound&&null===alignEndIndex)return null;if(0===(trimIndex=matchFound?gopIndex:alignEndIndex))return gops;var alignedGops=gops.slice(trimIndex),metadata=alignedGops.reduce(function(total,gop){return total.byteLength+=gop.byteLength,total.duration+=gop.duration,total.nalCount+=gop.nalCount,total},{byteLength:0,duration:0,nalCount:0});return alignedGops.byteLength=metadata.byteLength,alignedGops.duration=metadata.duration,alignedGops.nalCount=metadata.nalCount,alignedGops.pts=alignedGops[0].pts,alignedGops.dts=alignedGops[0].dts,alignedGops},this.alignGopsWith=function(newGopsToAlignWith){gopsToAlignWith=newGopsToAlignWith}}).prototype=new stream,(_CoalesceStream=function(options,metadataStream){this.numberOfTracks=0,this.metadataStream=metadataStream,void 0!==(options=options||{}).remux?this.remuxTracks=!!options.remux:this.remuxTracks=!0,"boolean"==typeof options.keepOriginalTimestamps?this.keepOriginalTimestamps=options.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,_CoalesceStream.prototype.init.call(this),this.push=function(output){return output.text?this.pendingCaptions.push(output):output.frames?this.pendingMetadata.push(output):(this.pendingTracks.push(output.track),this.pendingBytes+=output.boxes.byteLength,"video"===output.track.type&&(this.videoTrack=output.track,this.pendingBoxes.push(output.boxes)),void("audio"===output.track.type&&(this.audioTrack=output.track,this.pendingBoxes.unshift(output.boxes))))}}).prototype=new stream,_CoalesceStream.prototype.flush=function(flushSource){var caption,id3,initSegment,i,offset=0,event={captions:[],captionStreams:{},metadata:[],info:{}},timelineStartPts=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==flushSource&&"AudioSegmentStream"!==flushSource)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(timelineStartPts=this.videoTrack.timelineStartInfo.pts,videoProperties.forEach(function(prop){event.info[prop]=this.videoTrack[prop]},this)):this.audioTrack&&(timelineStartPts=this.audioTrack.timelineStartInfo.pts,audioProperties.forEach(function(prop){event.info[prop]=this.audioTrack[prop]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?event.type=this.pendingTracks[0].type:event.type="combined",this.emittedTracks+=this.pendingTracks.length,initSegment=mp4Generator_initSegment(this.pendingTracks),event.initSegment=new Uint8Array(initSegment.byteLength),event.initSegment.set(initSegment),event.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)event.data.set(this.pendingBoxes[i],offset),offset+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(caption=this.pendingCaptions[i]).startTime=clock_metadataTsToSeconds(caption.startPts,timelineStartPts,this.keepOriginalTimestamps),caption.endTime=clock_metadataTsToSeconds(caption.endPts,timelineStartPts,this.keepOriginalTimestamps),event.captionStreams[caption.stream]=!0,event.captions.push(caption);for(i=0;i<this.pendingMetadata.length;i++)(id3=this.pendingMetadata[i]).cueTime=clock_metadataTsToSeconds(id3.pts,timelineStartPts,this.keepOriginalTimestamps),event.metadata.push(id3);for(event.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",event),i=0;i<event.captions.length;i++)caption=event.captions[i],this.trigger("caption",caption);for(i=0;i<event.metadata.length;i++)id3=event.metadata[i],this.trigger("id3Frame",id3)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},_CoalesceStream.prototype.setRemux=function(val){this.remuxTracks=val},(_Transmuxer=function(options){var videoTrack,audioTrack,self=this,hasFlushed=!0;_Transmuxer.prototype.init.call(this),options=options||{},this.baseMediaDecodeTime=options.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var pipeline={};this.transmuxPipeline_=pipeline,pipeline.type="aac",pipeline.metadataStream=new m2ts_1.MetadataStream,pipeline.aacStream
vendor: 6,909 bytes, line 1
1=new aac,pipeline.audioTimestampRolloverStream=new m2ts_1.TimestampRolloverStream("audio"),pipeline.timedMetadataTimestampRolloverStream=new m2ts_1.TimestampRolloverStream("timed-metadata"),pipeline.adtsStream=new adts,pipeline.coalesceStream=new _CoalesceStream(options,pipeline.metadataStream),pipeline.headOfPipeline=pipeline.aacStream,pipeline.aacStream.pipe(pipeline.audioTimestampRolloverStream).pipe(pipeline.adtsStream),pipeline.aacStream.pipe(pipeline.timedMetadataTimestampRolloverStream).pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream),pipeline.metadataStream.on("timestamp",function(frame){pipeline.aacStream.setTimestamp(frame.timeStamp)}),pipeline.aacStream.on("data",function(data){"timed-metadata"!==data.type&&"audio"!==data.type||pipeline.audioSegmentStream||(audioTrack=audioTrack||{timelineStartInfo:{baseMediaDecodeTime:self.baseMediaDecodeTime},codec:"adts",type:"audio"},pipeline.coalesceStream.numberOfTracks++,pipeline.audioSegmentStream=new _AudioSegmentStream(audioTrack,options),pipeline.audioSegmentStream.on("timingInfo",self.trigger.bind(self,"audioTimingInfo")),pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream),self.trigger("trackinfo",{hasAudio:!!audioTrack,hasVideo:!!videoTrack}))}),pipeline.coalesceStream.on("data",this.trigger.bind(this,"data")),pipeline.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var pipeline={};this.transmuxPipeline_=pipeline,pipeline.type="ts",pipeline.metadataStream=new m2ts_1.MetadataStream,pipeline.packetStream=new m2ts_1.TransportPacketStream,pipeline.parseStream=new m2ts_1.TransportParseStream,pipeline.elementaryStream=new m2ts_1.ElementaryStream,pipeline.timestampRolloverStream=new m2ts_1.TimestampRolloverStream,pipeline.adtsStream=new adts,pipeline.h264Stream=new H264Stream$1,pipeline.captionStream=new m2ts_1.CaptionStream,pipeline.coalesceStream=new _CoalesceStream(options,pipeline.metadataStream),pipeline.headOfPipeline=pipeline.packetStream,pipeline.packetStream.pipe(pipeline.parseStream).pipe(pipeline.elementaryStream).pipe(pipeline.timestampRolloverStream),pipeline.timestampRolloverStream.pipe(pipeline.h264Stream),pipeline.timestampRolloverStream.pipe(pipeline.adtsStream),pipeline.timestampRolloverStream.pipe(pipeline.metadataStream).pipe(pipeline.coalesceStream),pipeline.h264Stream.pipe(pipeline.captionStream).pipe(pipeline.coalesceStream),pipeline.elementaryStream.on("data",function(data){var i;if("metadata"===data.type){for(i=data.tracks.length;i--;)videoTrack||"video"!==data.tracks[i].type?audioTrack||"audio"!==data.tracks[i].type||((audioTrack=data.tracks[i]).timelineStartInfo.baseMediaDecodeTime=self.baseMediaDecodeTime):(videoTrack=data.tracks[i]).timelineStartInfo.baseMediaDecodeTime=self.baseMediaDecodeTime;videoTrack&&!pipeline.videoSegmentStream&&(pipeline.coalesceStream.numberOfTracks++,pipeline.videoSegmentStream=new _VideoSegmentStream(videoTrack,options),pipeline.videoSegmentStream.on("timelineStartInfo",function(timelineStartInfo){audioTrack&&!options.keepOriginalTimestamps&&(audioTrack.timelineStartInfo=timelineStartInfo,pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts-self.baseMediaDecodeTime))}),pipeline.videoSegmentStream.on("processedGopsInfo",self.trigger.bind(self,"gopInfo")),pipeline.videoSegmentStream.on("segmentTimingInfo",self.trigger.bind(self,"videoSegmentTimingInfo")),pipeline.videoSegmentStream.on("baseMediaDecodeTime",function(baseMediaDecodeTime){audioTrack&&pipeline.audioSegmentStream.setVideoBaseMediaDecodeTime(baseMediaDecodeTime)}),pipeline.videoSegmentStream.on("timingInfo",self.trigger.bind(self,"videoTimingInfo")),pipeline.h264Stream.pipe(pipeline.videoSegmentStream).pipe(pipeline.coalesceStream)),audioTrack&&!pipeline.audioSegmentStream&&(pipeline.coalesceStream.numberOfTracks++,pipeline.audioSegmentStream=new _AudioSegmentStream(audioTrack,options),pipeline.audioSegmentStream.on("timingInfo",self.trigger.bind(self,"audioTimingInfo")),pipeline.adtsStream.pipe(pipeline.audioSegmentStream).pipe(pipeline.coalesceStream)),self.trigger("trackinfo",{hasAudio:!!audioTrack,hasVideo:!!videoTrack})}}),pipeline.coalesceStream.on("data",this.trigger.bind(this,"data")),pipeline.coalesceStream.on("id3Frame",function(id3Frame){id3Frame.dispatchType=pipeline.metadataStream.dispatchType,self.trigger("id3Frame",id3Frame)}),pipeline.coalesceStream.on("caption",this.trigger.bind(this,"caption")),pipeline.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(baseMediaDecodeTime){var pipeline=this.transmuxPipeline_;options.keepOriginalTimestamps||(this.baseMediaDecodeTime=baseMediaDecodeTime),audioTrack&&(audioTrack.timelineStartInfo.dts=void 0,audioTrack.timelineStartInfo.pts=void 0,trackDecodeInfo_clearDtsInfo(audioTrack),pipeline.audioTimestampRolloverStream&&pipeline.audioTimestampRolloverStream.discontinuity()),videoTrack&&(pipeline.videoSegmentStream&&(pipeline.videoSegmentStream.gopCache_=[]),videoTrack.timelineStartInfo.dts=void 0,videoTrack.timelineStartInfo.pts=void 0,trackDecodeInfo_clearDtsInfo(videoTrack),pipeline.captionStream.reset()),pipeline.timestampRolloverStream&&pipeline.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(timestamp){audioTrack&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(timestamp)},this.setRemux=function(val){var pipeline=this.transmuxPipeline_;options.remux=val,pipeline&&pipeline.coalesceStream&&pipeline.coalesceStream.setRemux(val)},this.alignGopsWith=function(gopsToAlignWith){videoTrack&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(gopsToAlignWith)},this.push=function(data){if(hasFlushed){var isAac=isLikelyAacData$1(data);isAac&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():isAac||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),hasFlushed=!1}this.transmuxPipeline_.headOfPipeline.push(data)},this.flush=function(){hasFlushed=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new stream;var transmuxer_1={Transmuxer:_Transmuxer,VideoSegmentStream:_VideoSegmentStream,AudioSegmentStream:_AudioSegmentStream,AUDIO_PROPERTIES:audioProperties,VIDEO_PROPERTIES:videoProperties,generateVideoSegmentTimingInfo:generateVideoSegmentTimingInfo}.Transmuxer,codecs={Adts:adts,h264:h264},ONE_SECOND_IN_TS$4=clock_ONE_SECOND_IN_TS,AudioSegmentStream$1=function AudioSegmentStream$1(track,options){var adtsFrames=[],sequenceNumber=0,earliestAllowedDts=0,audioAppendStartTs=0,videoBaseMediaDecodeTime=1/0,segmentStartPts=null,
vendor: 4,797 bytes, line 1
1segmentEndPts=null;options=options||{},AudioSegmentStream$1.prototype.init.call(this),this.push=function(data){trackDecodeInfo_collectDtsInfo(track,data),track&&audioProperties.forEach(function(prop){track[prop]=data[prop]}),adtsFrames.push(data)},this.setEarliestDts=function(earliestDts){earliestAllowedDts=earliestDts},this.setVideoBaseMediaDecodeTime=function(baseMediaDecodeTime){videoBaseMediaDecodeTime=baseMediaDecodeTime},this.setAudioAppendStart=function(timestamp){audioAppendStartTs=timestamp},this.processFrames_=function(){var frames,moof,mdat,boxes,timingInfo;0!==adtsFrames.length&&0!==(frames=audioFrameUtils_trimAdtsFramesByEarliestDts(adtsFrames,track,earliestAllowedDts)).length&&(track.baseMediaDecodeTime=trackDecodeInfo_calculateTrackBaseMediaDecodeTime(track,options.keepOriginalTimestamps),audioFrameUtils_prefixWithSilence(track,frames,audioAppendStartTs,videoBaseMediaDecodeTime),track.samples=audioFrameUtils_generateSampleTable(frames),mdat=mp4Generator_mdat(audioFrameUtils_concatenateFrameData(frames)),adtsFrames=[],moof=mp4Generator_moof(sequenceNumber,[track]),sequenceNumber++,track.initSegment=mp4Generator_initSegment([track]),(boxes=new Uint8Array(moof.byteLength+mdat.byteLength)).set(moof),boxes.set(mdat,moof.byteLength),trackDecodeInfo_clearDtsInfo(track),null===segmentStartPts&&(segmentEndPts=segmentStartPts=frames[0].pts),segmentEndPts+=frames.length*(1024*ONE_SECOND_IN_TS$4/track.samplerate),timingInfo={start:segmentStartPts},this.trigger("timingInfo",timingInfo),this.trigger("data",{track:track,boxes:boxes}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:segmentStartPts,end:segmentEndPts}),this.resetTiming_(),this.trigger("done","AudioSegmentStream")},this.partialFlush=function(){this.processFrames_(),this.trigger("partialdone","AudioSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","AudioSegmentStream")},this.resetTiming_=function(){trackDecodeInfo_clearDtsInfo(track),segmentStartPts=null,segmentEndPts=null},this.reset=function(){this.resetTiming_(),adtsFrames=[],this.trigger("reset")}};AudioSegmentStream$1.prototype=new stream;var audioSegmentStream=AudioSegmentStream$1,VideoSegmentStream$1=function VideoSegmentStream$1(track,options){var config,pps,gops,sequenceNumber=0,nalUnits=[],frameCache=[],segmentStartPts=null,segmentEndPts=null,ensureNextFrameIsKeyFrame=!0;options=options||{},VideoSegmentStream$1.prototype.init.call(this),this.push=function(nalUnit){trackDecodeInfo_collectDtsInfo(track,nalUnit),void 0===track.timelineStartInfo.dts&&(track.timelineStartInfo.dts=nalUnit.dts),"seq_parameter_set_rbsp"!==nalUnit.nalUnitType||config||(config=nalUnit.config,track.sps=[nalUnit.data],videoProperties.forEach(function(prop){track[prop]=config[prop]},this)),"pic_parameter_set_rbsp"!==nalUnit.nalUnitType||pps||(pps=nalUnit.data,track.pps=[nalUnit.data]),nalUnits.push(nalUnit)},this.processNals_=function(cacheLastFrame){var i;for(nalUnits=frameCache.concat(nalUnits);nalUnits.length&&"access_unit_delimiter_rbsp"!==nalUnits[0].nalUnitType;)nalUnits.shift();if(0!==nalUnits.length){var frames=frameUtils_groupNalsIntoFrames(nalUnits);if(frames.length)if(frameCache=frames[frames.length-1],cacheLastFrame&&(frames.pop(),frames.duration-=frameCache.duration,frames.nalCount-=frameCache.length,frames.byteLength-=frameCache.byteLength),frames.length){if(this.trigger("timelineStartInfo",track.timelineStartInfo),ensureNextFrameIsKeyFrame){if(!(gops=frameUtils_groupFramesIntoGops(frames))[0][0].keyFrame){if(!(gops=frameUtils_extendFirstKeyFrame(gops))[0][0].keyFrame)return nalUnits=[].concat.apply([],frames).concat(frameCache),void(frameCache=[]);(frames=[].concat.apply([],gops)).duration=gops.duration}ensureNextFrameIsKeyFrame=!1}for(null===segmentStartPts&&(segmentStartPts=frames[0].pts,segmentEndPts=segmentStartPts),segmentEndPts+=frames.duration,this.trigger("timingInfo",{start:segmentStartPts,end:segmentEndPts}),i=0;i<frames.length;i++){var frame=frames[i];track.samples=frameUtils_generateSampleTableForFrame(frame);var mdat=mp4Generator_mdat(frameUtils_concatenateNalDataForFrame(frame));trackDecodeInfo_clearDtsInfo(track),trackDecodeInfo_collectDtsInfo(track,frame),track.baseMediaDecodeTime=trackDecodeInfo_calculateTrackBaseMediaDecodeTime(track,options.keepOriginalTimestamps);var moof=mp4Generator_moof(sequenceNumber,[track]);sequenceNumber++,track.initSegment=mp4Generator_initSegment([track]);var boxes=new Uint8Array(moof.byteLength+mdat.byteLength);boxes.set(moof),boxes.set(mdat,moof.byteLength),this.trigger("data",{track:track,boxes:boxes,sequence:sequenceNumber,videoFrameDts:frame.dts,videoFramePts:frame.pts})}nalUnits=[]}else nalUnits=[]}},this.resetTimingAndConfig_=function(){config=void 0,pps=void 0,segmentStartPts=null,
1segmentEndPts=null},this.partialFlush=function(){this.processNals_(!0),this.trigger("partialdone","VideoSegmentStream")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger("done","VideoSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","VideoSegmentStream")},this.reset=function(){this.resetTimingAndConfig_(),frameCache=[],nalUnits=[],ensureNextFrameIsKeyFrame=!0,this.trigger("reset")}};VideoSegmentStream$1.prototype=new stream;var videoSegmentStream=VideoSegmentStream$1,isLikelyAacData$2=utils_isLikelyAacData,createPipeline=function(object){return object.prototype=new stream,object.prototype.init.call(object),object},setupPipelineListeners=function(pipeline,transmuxer){pipeline.on("data",transmuxer.trigger.bind(transmuxer,"data")),pipeline.on("done",transmuxer.trigger.bind(transmuxer,"done")),pipeline.on("partialdone",transmuxer.trigger.bind(transmuxer,"partialdone")),pipeline.on("endedtimeline",transmuxer.trigger.bind(transmuxer,"endedtimeline")),pipeline.on("audioTimingInfo",transmuxer.trigger.bind(transmuxer,"audioTimingInfo")),pipeline.on("videoTimingInfo",transmuxer.trigger.bind(transmuxer,"videoTimingInfo")),pipeline.on("trackinfo",transmuxer.trigger.bind(transmuxer,"trackinfo")),pipeline.on("id3Frame",function(event){event.dispatchType=pipeline.metadataStream.dispatchType,event.cueTime=clock_videoTsToSeconds(event.pts),transmuxer.trigger("id3Frame",event)}),pipeline.on("caption",function(event){transmuxer.trigger("caption",event)})},Transmuxer$1=function Transmuxer$1(options){var pipeline=null,hasFlushed=!0;options=options||{},Transmuxer$1.prototype.init.call(this),options.baseMediaDecodeTime=options.baseMediaDecodeTime||0,this.push=function(bytes){if(hasFlushed){var isAac=isLikelyAacData$2(bytes);!isAac||pipeline&&"aac"===pipeline.type?isAac||pipeline&&"ts"===pipeline.type||(pipeline=function(options){var pipeline={type:"ts",tracks:{audio:null,video:null},packet:new m2ts_1.TransportPacketStream,parse:new m2ts_1.TransportParseStream,elementary:new m2ts_1.ElementaryStream,timestampRollover:new m2ts_1.TimestampRolloverStream,adts:new codecs.Adts,h264:new codecs.h264.H264Stream,captionStream:new m2ts_1.CaptionStream,metadataStream:new m2ts_1.MetadataStream};return pipeline.headOfPipeline=pipeline.packet,pipeline.packet.pipe(pipeline.parse).pipe(pipeline.elementary).pipe(pipeline.timestampRollover),pipeline.timestampRollover.pipe(pipeline.h264),pipeline.h264.pipe(pipeline.captionStream),pipeline.timestampRollover.pipe(pipeline.metadataStream),pipeline.timestampRollover.pipe(pipeline.adts),pipeline.elementary.on("data",function(data){if("metadata"===data.type){for(var i=0;i<data.tracks.length;i++)pipeline.tracks[data.tracks[i].type]||(pipeline.tracks[data.tracks[i].type]=data.tracks[i],pipeline.tracks[data.tracks[i].type].timelineStartInfo.baseMediaDecodeTime=options.baseMediaDecodeTime);pipeline.tracks.video&&!pipeline.videoSegmentStream&&(pipeline.videoSegmentStream=new videoSegmentStream(pipeline.tracks.video,options),pipeline.videoSegmentStream.on("timelineStartInfo",function(timelineStartInfo){pipeline.tracks.audio&&!options.keepOriginalTimestamps&&pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts-options.baseMediaDecodeTime)}),pipeline.videoSegmentStream.on("timingInfo",pipeline.trigger.bind(pipeline,"videoTimingInfo")),pipeline.videoSegmentStream.on("data",function(data){pipeline.trigger("data",{type:"video",data:data})}),pipeline.videoSegmentStream.on("done",pipeline.trigger.bind(pipeline,"done")),pipeline.videoSegmentStream.on("partialdone",pipeline.trigger.bind(pipeline,"partialdone")),pipeline.videoSegmentStream.on("endedtimeline",pipeline.trigger.bind(pipeline,"endedtimeline")),pipeline.h264.pipe(pipeline.videoSegmentStream)),pipeline.tracks.audio&&!pipeline.audioSegmentStream&&(pipeline.audioSegmentStream=new audioSegmentStream(pipeline.tracks.audio,options),pipeline.audioSegmentStream.on("data",function(data){pipeline.trigger("data",{type:"audio",data:data})}),pipeline.audioSegmentStream.on("done",pipeline.trigger.bind(pipeline,"done")),pipeline.audioSegmentStream.on("partialdone",pipeline.trigger.bind(pipeline,"partialdone")),pipeline.audioSegmentStream.on("endedtimeline",pipeline.trigger.bind(pipeline,"endedtimeline")),pipeline.audioSegmentStream.on("timingInfo",pipeline.trigger.bind(pipeline,"audioTimingInfo")),pipeline.adts.pipe(pipeline.audioSegmentStream)),pipeline.trigger("trackinfo",{hasAudio:!!pipeline.tracks.audio,hasVideo:!!pipeline.tracks.video})}}),pipeline.captionStream.on("data",function(caption){var timelineStartPts;timelineStartPts=pipeline.tracks.video&&pipeline.tracks.video.timelineStartInfo.pts||0,caption.startTime=clock_metadataTsToSeconds(caption.startPts,timelineStartPts,options.keepOriginalTimestamps),caption.endTime=clock_metadataTsToSeconds(caption.endPts,timelineStartPts,options.keepOriginalTimestamps),pipeline.trigger("caption",caption)}),(pipeline=createPipeline(pipeline)).metadataStream.on("data",pipeline.trigger.bind(pipeline,"id3Frame")),pipeline}(options),setupPipelineListeners(pipeline,this)):(pipeline=function(options){var pipeline={type:"aac",tracks:{audio:null},metadataStream:new m2ts_1.MetadataStream,aacStream:new aac,audioR
vendor: 5,467 bytes, line 1
1ollover:new m2ts_1.TimestampRolloverStream("audio"),timedMetadataRollover:new m2ts_1.TimestampRolloverStream("timed-metadata"),adtsStream:new adts(!0)};return pipeline.headOfPipeline=pipeline.aacStream,pipeline.aacStream.pipe(pipeline.audioRollover).pipe(pipeline.adtsStream),pipeline.aacStream.pipe(pipeline.timedMetadataRollover).pipe(pipeline.metadataStream),pipeline.metadataStream.on("timestamp",function(frame){pipeline.aacStream.setTimestamp(frame.timeStamp)}),pipeline.aacStream.on("data",function(data){"timed-metadata"!==data.type&&"audio"!==data.type||pipeline.audioSegmentStream||(pipeline.tracks.audio=pipeline.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:options.baseMediaDecodeTime},codec:"adts",type:"audio"},pipeline.audioSegmentStream=new audioSegmentStream(pipeline.tracks.audio,options),pipeline.audioSegmentStream.on("data",function(data){pipeline.trigger("data",{type:"audio",data:data})}),pipeline.audioSegmentStream.on("partialdone",pipeline.trigger.bind(pipeline,"partialdone")),pipeline.audioSegmentStream.on("done",pipeline.trigger.bind(pipeline,"done")),pipeline.audioSegmentStream.on("endedtimeline",pipeline.trigger.bind(pipeline,"endedtimeline")),pipeline.audioSegmentStream.on("timingInfo",pipeline.trigger.bind(pipeline,"audioTimingInfo")),pipeline.adtsStream.pipe(pipeline.audioSegmentStream),pipeline.trigger("trackinfo",{hasAudio:!!pipeline.tracks.audio,hasVideo:!!pipeline.tracks.video}))}),(pipeline=createPipeline(pipeline)).metadataStream.on("data",pipeline.trigger.bind(pipeline,"id3Frame")),pipeline}(options),setupPipelineListeners(pipeline,this)),hasFlushed=!1}pipeline.headOfPipeline.push(bytes)},this.flush=function(){pipeline&&(hasFlushed=!0,pipeline.headOfPipeline.flush())},this.partialFlush=function(){pipeline&&pipeline.headOfPipeline.partialFlush()},this.endTimeline=function(){pipeline&&pipeline.headOfPipeline.endTimeline()},this.reset=function(){pipeline&&pipeline.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(baseMediaDecodeTime){options.keepOriginalTimestamps||(options.baseMediaDecodeTime=baseMediaDecodeTime),pipeline&&(pipeline.tracks.audio&&(pipeline.tracks.audio.timelineStartInfo.dts=void 0,pipeline.tracks.audio.timelineStartInfo.pts=void 0,trackDecodeInfo_clearDtsInfo(pipeline.tracks.audio),pipeline.audioRollover&&pipeline.audioRollover.discontinuity()),pipeline.tracks.video&&(pipeline.videoSegmentStream&&(pipeline.videoSegmentStream.gopCache_=[]),pipeline.tracks.video.timelineStartInfo.dts=void 0,pipeline.tracks.video.timelineStartInfo.pts=void 0,trackDecodeInfo_clearDtsInfo(pipeline.tracks.video)),pipeline.timestampRollover&&pipeline.timestampRollover.discontinuity())},this.setRemux=function(val){options.remux=val,pipeline&&pipeline.coalesceStream&&pipeline.coalesceStream.setRemux(val)},this.setAudioAppendStart=function(audioAppendStart){pipeline&&pipeline.tracks.audio&&pipeline.audioSegmentStream&&pipeline.audioSegmentStream.setAudioAppendStart(audioAppendStart)},this.alignGopsWith=function(gopsToAlignWith){}};Transmuxer$1.prototype=new stream;var transmuxer$1=Transmuxer$1,bin_toUnsigned=function(value){return value>>>0},parseType_1=function(buffer){var result="";return result+=String.fromCharCode(buffer[0]),result+=String.fromCharCode(buffer[1]),result+=String.fromCharCode(buffer[2]),result+=String.fromCharCode(buffer[3])},toUnsigned$1=bin_toUnsigned,findBox_1=function findBox(data,path){var i,size,type,end,subresults,results=[];if(!path.length)return null;for(i=0;i<data.byteLength;)size=toUnsigned$1(data[i]<<24|data[i+1]<<16|data[i+2]<<8|data[i+3]),type=parseType_1(data.subarray(i+4,i+8)),end=size>1?i+size:data.byteLength,type===path[0]&&(1===path.length?results.push(data.subarray(i+8,end)):(subresults=findBox(data.subarray(i+8,end),path.slice(1))).length&&(results=results.concat(subresults))),i=end;return results},toUnsigned$2=bin_toUnsigned,parseTfdt=function(data){var result={version:data[0],flags:new Uint8Array(data.subarray(1,4)),baseMediaDecodeTime:toUnsigned$2(data[4]<<24|data[5]<<16|data[6]<<8|data[7])};return 1===result.version&&(result.baseMediaDecodeTime*=Math.pow(2,32),result.baseMediaDecodeTime+=toUnsigned$2(data[8]<<24|data[9]<<16|data[10]<<8|data[11])),result},parseSampleFlags_1=function(flags){return{isLeading:(12&flags[0])>>>2,dependsOn:3&flags[0],isDependedOn:(192&flags[1])>>>6,hasRedundancy:(48&flags[1])>>>4,paddingValue:(14&flags[1])>>>1,isNonSyncSample:1&flags[1],degradationPriority:flags[2]<<8|flags[3]}},parseTrun=function(data){var sample,result={version:data[0],flags:new Uint8Array(data.subarray(1,4)),samples:[]},view=new DataView(data.buffer,data.byteOffset,data.byteLength),dataOffsetPresent=1&result.flags[2],firstSampleFlagsPresent=4&result.flags[2],sampleDurationPresent=1&result.flags[1],sampleSizePresent=2&result.flags[1],sampleFlagsPresent=4&result.flags[1],sampleCompositionTimeOffsetPresent=8&result.flags[1],sampleCount=view.getUint32(4),offset=8;for(dataOffsetPresent&&(result.dataOffset=view.getInt32(offset),offset+=4),firstSampleFlagsPresent&&sampleCount&&(sample={flags:parseSampleFlags_1(data.subarray(offset,offset+4))},offset+=4,sampleDurationPresent&&(sample.duration=view.getUint32(offset),offset+=4),sampleSizePresent&&(sample.size=view.getUint32(offset),offset+=4),sampleCompositionTimeOffsetPresent&&(1===result.version?sample.compositionTimeOffset=view.getInt32(offset):sample.compositionTimeOffset=view.getUint32(offset),offset+=4),result.samples.push(sample),sampleCount--);
vendor: 4,236 bytes, line 1
1sampleCount--;)sample={},sampleDurationPresent&&(sample.duration=view.getUint32(offset),offset+=4),sampleSizePresent&&(sample.size=view.getUint32(offset),offset+=4),sampleFlagsPresent&&(sample.flags=parseSampleFlags_1(data.subarray(offset,offset+4)),offset+=4),sampleCompositionTimeOffsetPresent&&(1===result.version?sample.compositionTimeOffset=view.getInt32(offset):sample.compositionTimeOffset=view.getUint32(offset),offset+=4),result.samples.push(sample);return result},parseTfhd=function(data){var i,view=new DataView(data.buffer,data.byteOffset,data.byteLength),result={version:data[0],flags:new Uint8Array(data.subarray(1,4)),trackId:view.getUint32(4)},baseDataOffsetPresent=1&result.flags[2],sampleDescriptionIndexPresent=2&result.flags[2],defaultSampleDurationPresent=8&result.flags[2],defaultSampleSizePresent=16&result.flags[2],defaultSampleFlagsPresent=32&result.flags[2],durationIsEmpty=65536&result.flags[0],defaultBaseIsMoof=131072&result.flags[0];return i=8,baseDataOffsetPresent&&(i+=4,result.baseDataOffset=view.getUint32(12),i+=4),sampleDescriptionIndexPresent&&(result.sampleDescriptionIndex=view.getUint32(i),i+=4),defaultSampleDurationPresent&&(result.defaultSampleDuration=view.getUint32(i),i+=4),defaultSampleSizePresent&&(result.defaultSampleSize=view.getUint32(i),i+=4),defaultSampleFlagsPresent&&(result.defaultSampleFlags=view.getUint32(i)),durationIsEmpty&&(result.durationIsEmpty=!0),!baseDataOffsetPresent&&defaultBaseIsMoof&&(result.baseDataOffsetIsMoof=!0),result},discardEmulationPreventionBytes$1=captionPacketParser_discardEmulationPreventionBytes,CaptionStream$1=captionStream.CaptionStream,mapToSample=function(offset,samples){for(var approximateOffset=offset,i=0;i<samples.length;i++){var sample=samples[i];if(approximateOffset<sample.size)return sample;approximateOffset-=sample.size}return null},parseCaptionNals=function(segment,videoTrackId){var trafs=findBox_1(segment,["moof","traf"]),mdats=findBox_1(segment,["mdat"]),captionNals={},mdatTrafPairs=[];return mdats.forEach(function(mdat,index){var matchingTraf=trafs[index];mdatTrafPairs.push({mdat:mdat,traf:matchingTraf})}),mdatTrafPairs.forEach(function(pair){var seiNals,mdat=pair.mdat,traf=pair.traf,tfhd=findBox_1(traf,["tfhd"]),headerInfo=parseTfhd(tfhd[0]),trackId=headerInfo.trackId,tfdt=findBox_1(traf,["tfdt"]),baseMediaDecodeTime=tfdt.length>0?parseTfdt(tfdt[0]).baseMediaDecodeTime:0,truns=findBox_1(traf,["trun"]);videoTrackId===trackId&&truns.length>0&&(seiNals=function(avcStream,samples,trackId){var seiNal,i,length,lastMatchedSample,avcView=new DataView(avcStream.buffer,avcStream.byteOffset,avcStream.byteLength),result=[];for(i=0;i+4<avcStream.length;i+=length)if(length=avcView.getUint32(i),i+=4,!(length<=0))switch(31&avcStream[i]){case 6:var data=avcStream.subarray(i+1,i+1+length),matchingSample=mapToSample(i,samples);if(seiNal={nalUnitType:"sei_rbsp",size:length,data:data,escapedRBSP:discardEmulationPreventionBytes$1(data),trackId:trackId},matchingSample)seiNal.pts=matchingSample.pts,seiNal.dts=matchingSample.dts,lastMatchedSample=matchingSample;else{if(!lastMatchedSample){console.log("We've encountered a nal unit without data. See mux.js#233.");break}seiNal.pts=lastMatchedSample.pts,seiNal.dts=lastMatchedSample.dts}result.push(seiNal)}return result}(mdat,function(truns,baseMediaDecodeTime,tfhd){var currentDts=baseMediaDecodeTime,defaultSampleDuration=tfhd.defaultSampleDuration||0,defaultSampleSize=tfhd.defaultSampleSize||0,trackId=tfhd.trackId,allSamples=[];return truns.forEach(function(trun){var samples=parseTrun(trun).samples;samples.forEach(function(sample){void 0===sample.duration&&(sample.duration=defaultSampleDuration),void 0===sample.size&&(sample.size=defaultSampleSize),sample.trackId=trackId,sample.dts=currentDts,void 0===sample.compositionTimeOffset&&(sample.compositionTimeOffset=0),sample.pts=currentDts+sample.compositionTimeOffset,currentDts+=sample.duration}),allSamples=allSamples.concat(samples)}),allSamples}(truns,baseMediaDecodeTime,headerInfo),trackId),captionNals[trackId]||(captionNals[trackId]=[]),captionNals[trackId]=captionNals[trackId].concat(seiNals))}),captionNals},captionParser=function(){var captionStream,segmentCache,trackId,timescale,parsedCaptions,parsingParti
1al,isInitialized=!1;this.isInitialized=function(){return isInitialized},this.init=function(options){captionStream=new CaptionStream$1,isInitialized=!0,parsingPartial=!!options&&options.isPartial,captionStream.on("data",function(event){event.startTime=event.startPts/timescale,event.endTime=event.endPts/timescale,parsedCaptions.captions.push(event),parsedCaptions.captionStreams[event.stream]=!0})},this.isNewInit=function(videoTrackIds,timescales){return!(videoTrackIds&&0===videoTrackIds.length||timescales&&"object"==typeof timescales&&0===Object.keys(timescales).length||trackId===videoTrackIds[0]&×cale===timescales[trackId])},this.parse=function(segment,videoTrackIds,timescales){var parsedData;if(!this.isInitialized())return null;if(!videoTrackIds||!timescales)return null;if(this.isNewInit(videoTrackIds,timescales))trackId=videoTrackIds[0],timescale=timescales[trackId];else if(null===trackId||!timescale)return segmentCache.push(segment),null;for(;segmentCache.length>0;){var cachedSegment=segmentCache.shift();this.parse(cachedSegment,videoTrackIds,timescales)}return null!==(parsedData=function(segment,trackId,timescale){return null===trackId?null:{seiNals:parseCaptionNals(segment,trackId)[trackId],timescale:timescale}}(segment,trackId,timescale))&&parsedData.seiNals?(this.pushNals(parsedData.seiNals),this.flushStream(),parsedCaptions):null},this.pushNals=function(nals){if(!this.isInitialized()||!nals||0===nals.length)return null;nals.forEach(function(nal){captionStream.push(nal)})},this.flushStream=function(){if(!this.isInitialized())return null;parsingPartial?captionStream.partialFlush():captionStream.flush()},this.clearParsedCaptions=function(){parsedCaptions.captions=[],parsedCaptions.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;captionStream.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){segmentCache=[],trackId=null,timescale=null,parsedCaptions?this.clearParsedCaptions():parsedCaptions={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},typeFromStreamString=function(streamString){return"AudioSegmentStream"===streamString?"audio":"VideoSegmentStream"===streamString?"video":""},MessageHandlers=function(){function MessageHandlers(self,options){this.options=options||{},this.self=self,this.init()}var _proto=MessageHandlers.prototype;return _proto.init=function(){var self,transmuxer;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new transmuxer$1(this.options):new transmuxer_1(this.options),this.options.handlePartialData?(self=this.self,(transmuxer=this.transmuxer).on("data",function(event){var initSegment={data:event.data.track.initSegment.buffer,byteOffset:event.data.track.initSegment.byteOffset,byteLength:event.data.track.initSegment.byteLength},segment={boxes:{data:event.data.boxes.buffer,byteOffset:event.data.boxes.byteOffset,byteLength:event.data.boxes.byteLength},initSegment:initSegment,type:event.type,sequence:event.data.sequence};void 0!==event.data.videoFrameDts&&(segment.videoFrameDtsTime=clock_4(event.data.videoFrameDts)),void 0!==event.data.videoFramePts&&(segment.videoFramePtsTime=clock_4(event.data.videoFramePts)),self.postMessage({action:"data",segment:segment},[segment.boxes.data,segment.initSegment.data])}),transmuxer.on("id3Frame",function(id3Frame){self.postMessage({action:"id3Frame",id3Frame:id3Frame})}),transmuxer.on("caption",function(caption){self.postMessage({action:"caption",caption:caption})}),transmuxer.on("done",function(data){self.postMessage({action:"done",type:typeFromStreamString(data)})}),transmuxer.on("partialdone",function(data){self.postMessage({action:"partialdone",type:typeFromStreamString(data)})}),transmuxer.on("endedsegment",function(data){self.postMessage({action:"endedSegment",type:typeFromStreamString(data)})}),transmuxer.on("trackinfo",function(trackInfo){self.postMessage({action:"trackinfo",trackInfo:trackInfo})}),transmuxer.on("audioTimingInfo",function(audioTimingInfo){if(null!==audioTimingInfo.start){var timingInfoInSeconds={start:clock_4(audioTimingInfo.start)};audioTimingInfo.end&&(timingInfoInSeconds.end=clock_4(audioTimingInfo.end)),self.postMessage({action:"audioTimingInfo",audioTimingInfo:timingInfoInSeconds})}else self.postMessage({action:"audioTimingInfo",audioTimingInfo:audioTimingInfo})}),transmuxer.on("videoTimingInfo",function(videoTimingInfo){var timingInfoInSeconds={start:clock_4(videoTimingInfo.start)};videoTimingInfo.end&&(timingInfoInSeconds.end=clock_4(videoTimingInfo.end)),self.postMessage({action:"videoTimingInfo",videoTimingInfo:timingInfoInSeconds})})):function(self,transmuxer){transmuxer.on("data",function(segment){var initArray=segment.initSegment;segment.initSegment={data:initArray.buffer,byteOffset:initArray.byteOffset,byteLength:initArray.byteLength};var typedArray=segment.data;segment.data=typedArray.buffer,self.postMessage({action:"data",segment:segment,byteOffset:typedArray.byteOffset,byteLength:typedArray.byteLength},[segment.data])}),transmuxer.on("done",function(data){self.postMessage({action:"done"})}),transmuxer.on("gopInfo",function(gopInfo){self.postMessage({action:"gopInfo",gopInfo:gopInfo})}),transmuxer.on("videoSegmentTimingInfo",function(timingInfo){var videoSegmentTimingInfo={start:{decode:clock_4(timingInfo.start.dts),presentation:clock_4(timingInfo.start.pts)},end:{decode:clock_4(timingInfo.end.dts),presentation:clock_4(timingInfo.end.pts)},baseMediaDecodeTime:clock_4(timingInfo.baseMediaDecodeTime)};timingInfo.prependedContentDuration&&(videoSegmentTimingInfo.prependedContentDuration=clock_4(timingInfo.prependedContentDuration)),self.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:videoSegmentTimingInfo})}),transmuxer.on("id3Frame",function(id3Frame){self.postMessage({action:"id3Frame",id3Frame:id3Frame})}),transmuxer.on("caption",function(caption){self.postMessage({action:"caption",caption:caption})}),transmuxer.on("trackinfo",function(trackInfo){self.postMessage({action:"trackinfo",trackInfo:trackInfo})}),transmuxer.on("audioTimingInfo",function(audioTimingInfo){self.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:clock_4(audioTimingInfo.start),end:clock_4(audioTimingInfo.end)}})}),transmuxer.on("videoTimingInfo",function(videoTimingInfo){self.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:clock_4(videoTimingInfo.start),end:clock_4(videoTimingInfo.end)}})})}(this.self,this.transmuxer)},_proto.pushMp4Captions=function(data){this.captionParser||(this.captionParser=new captionParser,this.captionParser.init());var segment=new Uint8Array(data.data,data.byteOffset,data.byteLength),parsed=this.captionParser.parse(segment,data.trackIds,data.timescales);this.self.postMessage({action:"mp4Captions",captions:parsed&&parsed.captions||[],data:segment.buffer},[segment.buffer])},_proto.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},_proto.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},_proto.push=function(data){var segment=new Uint8Array(data.data,data.byteOffset,data.byteLength);this.transmuxer.push(segment)},_proto.reset=function(){this.transmuxer.reset()},_proto.setTimestampOffset=function(data){var timestampOffset=data.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(clock_2(timestampOffset)))},_proto.setAudioAppendStart=function(data){this.transmuxer.setAudioAppendStart(Math.ceil(clock_2(data.appendStart)))},_proto.setRemux=function(data){this.transmuxer.setRemux(data.remux)},_proto.flush=function(data){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},_proto.partialFlush=function(data){this.transmuxer.partialFlush(),self.postMessage({action:"partialdone",type:"transmuxed"})},_proto.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},_proto.alignGopsWith=function(data){this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice())},MessageHandlers}();new function(self){self.onmessage=function(event){"init"===event.data.action&&event.data.options?this.messageHandlers=new MessageHandlers(self,event.data.options):(this.messageHandlers||(this.messageHandlers=new MessageHandlers(self)),event.data&&event.data.action&&"init"!==event.data.action&&this.messageHandlers[event.data.action]&&this.messageHandlers[event.data.action](event.data))}}(self)}()}),isMaat=function(master,media){var mediaAttributes=media.attributes||{};return master&&master.mediaGroups&&master.mediaGroups.AUDIO&&mediaAttributes.AUDIO&&master.mediaGroups.AUDIO[mediaAttributes.AUDIO]},codecsForPlaylist=function(master,media){var mediaAttributes=media.attributes||{},codecInfo=function(media){var mediaAttributes=media.attributes||{};if(mediaAttributes.CODECS)return codecs_js.parseCodecs(mediaAttributes.CODECS)}(media)||{};if(isMaat(master,media)&&!codecInfo.audio&&!function(master,media){if(!isMaat(master,media))return!0;var mediaAttributes=media.attributes||{},audioGroup=master.mediaGroups.AUDIO[mediaAttributes.AUDIO];for(var groupId in audioGroup)if(!audioGroup[groupId].uri&&!audioGroup[groupId].playlists)return!0;return!1}(master,media)){var defaultCodecs=codecs_js.codecsFromDefault(master,mediaAttributes.AUDIO);defaultCodecs&&(codecInfo.audio=defaultCodecs.audio)}var codecs={};return codecInfo.video&&(codecs.video=codecs_js.translateLegacyCodec(""+codecInfo.video.type+codecInfo.video.details)),codecInfo.audio&&(codecs.audio=codecs_js.translateLegacyCodec(""+codecInfo.audio.type+codecInfo.audio.details)),codecs},logger=function(source){return videojs$1.log.debug?videojs$1.log.debug.bind(videojs$1,"VHS:",source+" >"):function(){}},logFn=logger("PlaylistSelector"),representationToString=function(representation){if(representation&&representation.playlist){var playlist=representation.playlist;return JSON.stringify({id:playlist.id,bandwidth:representation.bandwidth,width:representation.width,height:representation.height,codecs:playlist.attributes&&playlist.attributes.CODECS||""})}},safeGetComputedStyle=function(el,property){if(!el)return"";var result=window$1.getComputedStyle(el);return result?result[property]:""},stableSort=function(array,sortFn){var newArray=array.slice();array.sort(function(left,right){var cmp=sortFn(left,right);return 0===cmp?newArray.indexOf(left)-newArray.indexOf(right):cmp})},comparePlaylistBandwidth=function(left,right){var leftBandwidth,r
1ightBandwidth;return left.attributes.BANDWIDTH&&(leftBandwidth=left.attributes.BANDWIDTH),leftBandwidth=leftBandwidth||window$1.Number.MAX_VALUE,right.attributes.BANDWIDTH&&(rightBandwidth=right.attributes.BANDWIDTH),leftBandwidth-(rightBandwidth=rightBandwidth||window$1.Number.MAX_VALUE)},addMetadata=function(_ref2){var inbandTextTracks=_ref2.inbandTextTracks,metadataArray=_ref2.metadataArray,timestampOffset=_ref2.timestampOffset,videoDuration=_ref2.videoDuration;if(metadataArray){var Cue=window$1.WebKitDataCue||window$1.VTTCue,metadataTrack=inbandTextTracks.metadataTrack_;if(metadataTrack&&(metadataArray.forEach(function(metadata){var time=metadata.cueTime+timestampOffset;!("number"!=typeof time||window$1.isNaN(time)||time<0)&&time<1/0&&metadata.frames.forEach(function(frame){var cue=new Cue(time,time,frame.value||frame.url||frame.data||"");cue.frame=frame,cue.value=frame,function(cue){Object.defineProperties(cue.frame,{id:{get:function(){return videojs$1.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),cue.value.key}},value:{get:function(){return videojs$1.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),cue.value.data}},privateData:{get:function(){return videojs$1.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),cue.value.data}}})}(cue),metadataTrack.addCue(cue)})}),metadataTrack.cues&&metadataTrack.cues.length)){for(var cues=metadataTrack.cues,cuesArray=[],i=0;i<cues.length;i++)cues[i]&&cuesArray.push(cues[i]);var cuesGroupedByStartTime=cuesArray.reduce(function(obj,cue){var timeSlot=obj[cue.startTime]||[];return timeSlot.push(cue),obj[cue.startTime]=timeSlot,obj},{}),sortedStartTimes=Object.keys(cuesGroupedByStartTime).sort(function(a,b){return Number(a)-Number(b)});sortedStartTimes.forEach(function(startTime,idx){var cueGroup=cuesGroupedByStartTime[startTime],nextTime=Number(sortedStartTimes[idx+1])||videoDuration;cueGroup.forEach(function(cue){cue.endTime=nextTime})})}}},removeCuesFromTrack=function(start,end,track){var i,cue;if(track&&track.cues)for(i=track.cues.length;i--;)(cue=track.cues[i]).startTime>=start&&cue.endTime<=end&&track.removeCue(cue)},finite=function(num){return"number"==typeof num&&isFinite(num)},timingInfoPropertyForMedia=function(mediaType){return mediaType+"TimingInfo"},timestampOffsetForSegment=function(_ref){var segmentTimeline=_ref.segmentTimeline,currentTimeline=_ref.currentTimeline,startOfSegment=_ref.startOfSegment,buffered=_ref.buffered;return _ref.overrideCheck||segmentTimeline!==currentTimeline?buffered.length?buffered.end(buffered.length-1):startOfSegment:null},shouldWaitForTimelineChange=function(_ref2){var timelineChangeController=_ref2.timelineChangeController,currentTimeline=_ref2.currentTimeline,segmentTimeline=_ref2.segmentTimeline,loaderType=_ref2.loaderType,audioDisabled=_ref2.audioDisabled;if(currentTimeline===segmentTimeline)return!1;if("audio"===loaderType){var lastMainTimelineChange=timelineChangeController.lastTimelineChange({type:"main"});return!lastMainTimelineChange||lastMainTimelineChange.to!==segmentTimeline}if("main"===loaderType&&audioDisabled){var pendingAudioTimelineChange=timelineChangeController.pendingTimelineChange({type:"audio"});return!pendingAudioTimelineChange||pendingAudioTimelineChange.to!==segmentTimeline}return!1},SegmentLoader=function(_videojs$EventTarget){function SegmentLoader(settings,options){var _this;if(_this=_videojs$EventTarget.call(this)||this,!settings)throw new TypeError("Initialization settings are required");if("function"!=typeof settings.currentTime)throw new TypeError("No currentTime getter specified");if(!settings.mediaSource)throw new TypeError("No MediaSource specified");return _this.bandwidth=settings.bandwidth,_this.throughput={rate:0,count:0},_this.roundTrip=NaN,_this.resetStats_(),_this.mediaIndex=null,_this.hasPlayed_=settings.hasPlayed,_this.currentTime_=settings.currentTime,_this.seekable_=settings.seekable,_this.seeking_=settings.seeking,_this.duration_=settings.duration,_this.mediaSource_=settings.mediaSource,_this.vhs_=settings.vhs,_this.loaderType_=settings.loaderType,_this.currentMediaInfo_=void 0,_this.startingMediaInfo_=void 0,_this.segmentMetadataTrack_=settings.segmentMetadataTrack,_this.goalBufferLength_=settings.goalBufferLength,_this.sourceType_=settings.sourceType,_this.sourceUpdater_=settings.sourceUpdater,_this.inbandTextTracks_=settings.inbandTextTracks,_this.state_="INIT",_this.handlePartialData_=settings.handlePartialData,_this.timelineChangeController_=settings.timelineChangeController,_this.shouldSaveSegmentTimingInfo_=!0,_this.checkBufferTimeout_=null,_this.error_=void 0,_this.currentTimeline_=-1,_this.pendingSegment_=null,_this.xhrOptions_=null,_this.pendingSegments_=[],_this.audioDisabled_=!1,_this.isPendingTimestampOffset_=!1,_this.gopBuffer_=[],_this.timeMapping_=0,_this.safeAppend_=videojs$1.browser.IE_VERSION>=11,_this.appendInitSegment_={audio:!0,video:!0},_this.playlistOfLastInitSegment_={audio:null,video:null},_this.callQueue_=[],_this.loadQueue_=[],_this.metadataQueue_={id3:[],caption:[]},_this.activeInitSegmentId_=null,_this.initSegments_={},_this.cacheEncryptionKeys_=settings.cacheEncryptionKeys,_this.keyCache_={},_this.decrypter_=settings.decrypter,_this.syncController_=settings.syncController,_this.syncPoint_={segmentIndex:0,time:0},_this.transmuxer_=_this.createTransmuxer_(),_this.triggerSyncInfoUpdate_=function(){return _this.trigger("syncinfoupdate")},_this.syncController_.on("syncinfoupdate",_this.triggerSyncInfoUpdate_),_this.mediaSource_.addEventListener("sourceopen",function(){_this.isEndOfStream_
1()||(_this.ended_=!1)}),_this.fetchAtBuffer_=!1,_this.logger_=logger("SegmentLoader["+_this.loaderType_+"]"),Object.defineProperty(_assertThisInitialized(_this),"state",{get:function(){return this.state_},set:function(newState){newState!==this.state_&&(this.logger_(this.state_+" -> "+newState),this.state_=newState,this.trigger("statechange"))}}),_this.sourceUpdater_.on("ready",function(){_this.hasEnoughInfoToAppend_()&&_this.processCallQueue_()}),"main"===_this.loaderType_&&_this.timelineChangeController_.on("pendingtimelinechange",function(){_this.hasEnoughInfoToAppend_()&&_this.processCallQueue_()}),"audio"===_this.loaderType_&&_this.timelineChangeController_.on("timelinechange",function(){_this.hasEnoughInfoToLoad_()&&_this.processLoadQueue_(),_this.hasEnoughInfoToAppend_()&&_this.processCallQueue_()}),_this}_inheritsLoose(SegmentLoader,_videojs$EventTarget);var _proto=SegmentLoader.prototype;return _proto.createTransmuxer_=function(){var transmuxer=new TransmuxWorker;return transmuxer.postMessage({action:"init",options:{remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_}}),transmuxer},_proto.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},_proto.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&(this.transmuxer_.terminate(),segmentTransmuxer_dispose()),this.resetStats_(),this.checkBufferTimeout_&&window$1.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},_proto.setAudio=function(enable){this.audioDisabled_=!enable,enable?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},_proto.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},_proto.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_)},_proto.checkForAbort_=function(requestId){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==requestId:(this.state="READY",!0)},_proto.error=function(_error){return void 0!==_error&&(this.logger_("error occurred:",_error),this.error_=_error),this.pendingSegment_=null,this.error_},_proto.endOfStream=function(){this.ended_=!0,this.transmuxer_&&segmentTransmuxer_reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},_proto.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return videojs$1.createTimeRanges();if("main"===this.loaderType_){var _this$startingMediaIn=this.startingMediaInfo_,hasAudio=_this$startingMediaIn.hasAudio,hasVideo=_this$startingMediaIn.hasVideo,isMuxed=_this$startingMediaIn.isMuxed;if(hasVideo&&hasAudio&&!this.audioDisabled_&&!isMuxed)return this.sourceUpdater_.buffered();if(hasVideo)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},_proto.initSegmentForMap=function(map,set){if(void 0===set&&(set=!1),!map)return null;var id=initSegmentId(map),storedMap=this.initSegments_[id];return set&&!storedMap&&map.bytes&&(this.initSegments_[id]=storedMap={resolvedUri:map.resolvedUri,byterange:map.byterange,bytes:map.bytes,tracks:map.tracks,timescales:map.timescales}),storedMap||map},_proto.segmentKey=function(key,set){if(void 0===set&&(set=!1),!key)return null;var id=segmentKeyId(key),storedKey=this.keyCache_[id];this.cacheEncryptionKeys_&&set&&!storedKey&&key.bytes&&(this.keyCache_[id]=storedKey={resolvedUri:key.resolvedUri,bytes:key.bytes});var result={resolvedUri:(storedKey||key).resolvedUri};return storedKey&&(result.bytes=storedKey.bytes),result},_proto.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},_proto.load=function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},_proto.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},_proto.playlist=function(newPlaylist,options){if(void 0===options&&(options={}),newPlaylist){var oldPlaylist=this.playlist_,segmentInfo=this.pendingSegment_;this.playlist_=newPlaylist,this.xhrOptions_=options,"INIT"===this.state&&(newPlaylist.syncInfo={mediaSequence:newPlaylist.mediaSequence,time:0});var oldId=null;if(oldPlaylist&&(oldPlaylist.id?oldId=oldPlaylist.id:oldPlaylist.uri&&(oldId=oldPlaylist.uri)),this.logger_("playlist update ["+oldId+" => "+(newPlaylist.id||newPlaylist.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!oldPlaylist||oldPlaylist.uri!==newPlaylist.uri)return(null!==this.mediaIndex||this.handlePartialData_)&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var mediaSequenceDiff=newPlaylist.mediaSequence-oldPlaylist.mediaSequence;this.logger_("live window shift ["+mediaSequenceDiff+"]"),null!==this.mediaIndex&&(this.mediaIndex-=mediaSequenceDiff),segmentInfo&&(segmentInfo.mediaIndex-=mediaSequenceDiff,segmentInfo.mediaIndex>=0&&(segmentInfo.segment=newPlaylist.segments[segmentInfo.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(oldPlaylist,newPlaylist)}},_proto.pause=function(){this.checkBufferTimeout_&&(window$1.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},_proto.paused=function(){return null===this.checkBufferTimeout_},_proto.resetEverything=function(done){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,done),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},_proto.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},_proto.resyncLoader=function(){this.transmuxer_&&segmentTransmuxer_reset(this.transmuxer_),this.mediaIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},_proto.remove=function(start,end,done){if(void 0===done&&(done=function(){}),end===1/0&&(end=this.duration_()),this.sourceUpdater_&&this.currentMediaInfo_){var removesRemaining=1,removeFinished=function(){0===--removesRemaining&&done()};for(var track in this.audioDisabled_||(removesRemaining++,this.sourceUpdater_.removeAudio(start,end,removeFinished)),"main"===this.loaderType_&&this.currentMediaInfo_&&this.currentMediaInfo_.hasVideo&&(this.gopBuffer_=function(buffer,start,end,mapping){for(var startPts=Math.ceil((start-mapping)*clock.ONE_SECOND_IN_TS),endPts=Math.ceil((end-mapping)*clock.ONE_SECOND_IN_TS),updatedBuffer=buffer.slice(),i=buffer.length;i--&&!(buffer[i].pts<=endPts););
1if(-1===i)return updatedBuffer;for(var j=i+1;j--&&!(buffer[j].pts<=startPts););return j=Math.max(j,0),updatedBuffer.splice(j,i-j+1),updatedBuffer}(this.gopBuffer_,start,end,this.timeMapping_),removesRemaining++,this.sourceUpdater_.removeVideo(start,end,removeFinished)),this.inbandTextTracks_)removeCuesFromTrack(start,end,this.inbandTextTracks_[track]);removeCuesFromTrack(start,end,this.segmentMetadataTrack_),removeFinished()}},_proto.monitorBuffer_=function(){this.checkBufferTimeout_&&window$1.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window$1.setTimeout(this.monitorBufferTick_.bind(this),1)},_proto.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&window$1.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=window$1.setTimeout(this.monitorBufferTick_.bind(this),500)},_proto.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var buffered=this.buffered_(),segmentInfo=this.checkBuffer_(buffered,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);segmentInfo&&(segmentInfo.timestampOffset=timestampOffsetForSegment({segmentTimeline:segmentInfo.timeline,currentTimeline:this.currentTimeline_,startOfSegment:segmentInfo.startOfSegment,buffered:buffered,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,"number"==typeof segmentInfo.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:segmentInfo.timeline}),this.loadSegment_(segmentInfo))}},_proto.isEndOfStream_=function(mediaIndex,playlist){if(void 0===mediaIndex&&(mediaIndex=this.mediaIndex),void 0===playlist&&(playlist=this.playlist_),!playlist||!this.mediaSource_)return!1;var appendedLastSegment=mediaIndex+1===playlist.segments.length;return playlist.endList&&"open"===this.mediaSource_.readyState&&appendedLastSegment},_proto.checkBuffer_=function(buffered,playlist,currentMediaIndex,hasPlayed,currentTime,syncPoint){var lastBufferedEnd=0;buffered.length&&(lastBufferedEnd=buffered.end(buffered.length-1));var bufferedTime=Math.max(0,lastBufferedEnd-currentTime);if(!playlist.segments.length)return null;if(bufferedTime>=this.goalBufferLength_())return null;if(!hasPlayed&&bufferedTime>=1)return null;var startOfSegment,nextMediaIndex=null,isSyncRequest=!1;if(null===syncPoint)nextMediaIndex=this.getSyncSegmentCandidate_(playlist),isSyncRequest=!0;else if(null!==currentMediaIndex){var segment=playlist.segments[currentMediaIndex];startOfSegment=segment&&segment.end?segment.end:lastBufferedEnd,nextMediaIndex=currentMediaIndex+1}else if(this.fetchAtBuffer_){var mediaSourceInfo=Playlist.getMediaInfoForTime(playlist,lastBufferedEnd,syncPoint.segmentIndex,syncPoint.time);nextMediaIndex=mediaSourceInfo.mediaIndex,startOfSegment=mediaSourceInfo.startTime}else{var _mediaSourceInfo=Playlist.getMediaInfoForTime(playlist,currentTime,syncPoint.segmentIndex,syncPoint.time);nextMediaIndex=_mediaSourceInfo.mediaIndex,startOfSegment=_mediaSourceInfo.startTime}var segmentInfo=this.generateSegmentInfo_(playlist,nextMediaIndex,startOfSegment,isSyncRequest);return!segmentInfo||this.mediaSource_&&this.playlist_&&segmentInfo.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_("checkBuffer_ returning "+segmentInfo.uri,{segmentInfo:segmentInfo,playlist:playlist,currentMediaIndex:currentMediaIndex,nextMediaIndex:nextMediaIndex,startOfSegment:startOfSegment,isSyncRequest:isSyncRequest}),segmentInfo)},_proto.getSyncSegmentCandidate_=function(playlist){var _this2=this;if(-1===this.currentTimeline_)return 0;var segmentIndexArray=playlist.segments.map(function(s,i){return{timeline:s.timeline,segmentIndex:i}}).filter(function(s){return s.timeline===_this2.currentTimeline_});return segmentIndexArray.length?segmentIndexArray[Math.min(segmentIndexArray.length-1,1)].segmentIndex:Math.max(playlist.segments.length-1,0)},_proto.generateSegmentInfo_=function(playlist,mediaIndex,startOfSegment,isSyncRequest){if(mediaIndex<0||mediaIndex>=playlist.segments.length)return null;var audioAppendStart,gopsToAlignWith,segment=playlist.segments[mediaIndex],audioBuffered=this.sourceUpdater_.audio
1Buffered(),videoBuffered=this.sourceUpdater_.videoBuffered();return audioBuffered.length&&(audioAppendStart=audioBuffered.end(audioBuffered.length-1)-this.sourceUpdater_.audioTimestampOffset()),videoBuffered.length&&(gopsToAlignWith=function(buffer,currentTime,mapping){if(null==currentTime||!buffer.length)return[];var i,currentTimePts=Math.ceil((currentTime-mapping+3)*clock.ONE_SECOND_IN_TS);for(i=0;i<buffer.length&&!(buffer[i].pts>currentTimePts);i++);return buffer.slice(i)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:segment.resolvedUri,mediaIndex:mediaIndex,isSyncRequest:isSyncRequest,startOfSegment:startOfSegment,playlist:playlist,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:segment.timeline,duration:segment.duration,segment:segment,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:audioAppendStart,gopsToAlignWith:gopsToAlignWith}},_proto.abortRequestEarly_=function(stats){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(stats.firstBytesReceivedAt||Date.now())<1e3)return!1;var currentTime=this.currentTime_(),measuredBandwidth=stats.bandwidth,segmentDuration=this.pendingSegment_.duration,requestTimeRemaining=Playlist.estimateSegmentRequestTime(segmentDuration,measuredBandwidth,this.playlist_,stats.bytesReceived),timeUntilRebuffer$1=function(buffered,currentTime,playbackRate){return void 0===playbackRate&&(playbackRate=1),((buffered.length?buffered.end(buffered.length-1):0)-currentTime)/playbackRate}(this.buffered_(),currentTime,this.vhs_.tech_.playbackRate())-1;if(requestTimeRemaining<=timeUntilRebuffer$1)return!1;var switchCandidate=function(settings){var master=settings.master,currentTime=settings.currentTime,bandwidth=settings.bandwidth,duration=settings.duration,segmentDuration=settings.segmentDuration,timeUntilRebuffer=settings.timeUntilRebuffer,currentTimeline=settings.currentTimeline,syncController=settings.syncController,compatiblePlaylists=master.playlists.filter(function(playlist){return!Playlist.isIncompatible(playlist)}),enabledPlaylists=compatiblePlaylists.filter(Playlist.isEnabled);enabledPlaylists.length||(enabledPlaylists=compatiblePlaylists.filter(function(playlist){return!Playlist.isDisabled(playlist)}));var rebufferingEstimates=enabledPlaylists.filter(Playlist.hasAttribute.bind(null,"BANDWIDTH")).map(function(playlist){var numRequests=syncController.getSyncPoint(playlist,duration,currentTimeline,currentTime)?1:2;return{playlist:playlist,rebufferingImpact:Playlist.estimateSegmentRequestTime(segmentDuration,bandwidth,playlist)*numRequests-timeUntilRebuffer}}),noRebufferingPlaylists=rebufferingEstimates.filter(function(estimate){return estimate.rebufferingImpact<=0});return stableSort(noRebufferingPlaylists,function(a,b){return comparePlaylistBandwidth(b.playlist,a.playlist)}),noRebufferingPlaylists.length?noRebufferingPlaylists[0]:(stableSort(rebufferingEstimates,function(a,b){return a.rebufferingImpact-b.rebufferingImpact}),rebufferingEstimates[0]||null)}({master:this.vhs_.playlists.master,currentTime:currentTime,bandwidth:measuredBandwidth,duration:this.duration_(),segmentDuration:segmentDuration,timeUntilRebuffer:timeUntilRebuffer$1,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(switchCandidate){var timeSavedBySwitching=requestTimeRemaining-timeUntilRebuffer$1-switchCandidate.rebufferingImpact,minimumTimeSaving=.5;return timeUntilRebuffer$1<=1/30&&(minimumTimeSaving=1),!switchCandidate.playlist||switchCandidate.playlist.uri===this.playlist_.uri||timeSavedBySwitching<minimumTimeSaving?!1:(this.bandwidth=switchCandidate.playlist.attributes.BANDWIDTH*Config.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}},_proto.handleAbort_=function(){this.mediaRequestsAborted+=1},_proto.handleProgress_=function(event,simpleSegment){this.checkForAbort_(simpleSegment.requestId)||this.abortRequestEarly_(simpleSegment.stats)||this.trigger("progress")},_proto.handleTrackInfo_=function(simpleSegment,trackInfo){this.checkForAbort_(simpleSegment.requestId)||this.abortRequestEarly_(simpleSegment.stats)||this.checkForIllegalMediaSwitch(trackInfo)||(trackInfo=trackInfo||{}
vendor: 1,998 bytes, line 1
1,function(a,b){if(!a&&!b||!a&&b||a&&!b)return!1;if(a===b)return!0;var akeys=Object.keys(a).sort(),bkeys=Object.keys(b).sort();if(akeys.length!==bkeys.length)return!1;for(var i=0;i<akeys.length;i++){var key=akeys[i];if(key!==bkeys[i])return!1;if(a[key]!==b[key])return!1}return!0}(this.currentMediaInfo_,trackInfo)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=trackInfo,this.currentMediaInfo_=trackInfo,this.logger_("trackinfo update",trackInfo),this.trigger("trackinfo")),this.checkForAbort_(simpleSegment.requestId)||this.abortRequestEarly_(simpleSegment.stats)||(this.pendingSegment_.trackInfo=trackInfo,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},_proto.handleTimingInfo_=function(simpleSegment,mediaType,timeType,time){if(!this.checkForAbort_(simpleSegment.requestId)&&!this.abortRequestEarly_(simpleSegment.stats)){var segmentInfo=this.pendingSegment_,timingInfoProperty=timingInfoPropertyForMedia(mediaType);segmentInfo[timingInfoProperty]=segmentInfo[timingInfoProperty]||{},segmentInfo[timingInfoProperty][timeType]=time,this.logger_("timinginfo: "+mediaType+" - "+timeType+" - "+time),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},_proto.handleCaptions_=function(simpleSegment,captionData){var _this3=this;if(!this.checkForAbort_(simpleSegment.requestId)&&!this.abortRequestEarly_(simpleSegment.stats))if(0!==captionData.length)if(this.pendingSegment_.hasAppendedData_){var timestampOffset=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),captionTracks={};captionData.forEach(function(caption){captionTracks[caption.stream]=captionTracks[caption.stream]||{startTime:1/0,captions:[],endTime:0};var captionTrack=captionTracks[caption.stream];captionTrack.startTime=Math.min(captionTrack.startTime,caption.startTime+timestampOffset),captionTrack.endTime=Math.max(captionTrack.endTime,caption.endTime+timestampOffset),captionTrack.captions.push(caption)}
1),Object.keys(captionTracks).forEach(function(trackName){var _captionTracks$trackN=captionTracks[trackName],startTime=_captionTracks$trackN.startTime,endTime=_captionTracks$trackN.endTime,captions=_captionTracks$trackN.captions,inbandTextTracks=_this3.inbandTextTracks_;_this3.logger_("adding cues from "+startTime+" -> "+endTime+" for "+trackName),function(inbandTextTracks,tech,captionStream){if(!inbandTextTracks[captionStream]){tech.trigger({type:"usage",name:"vhs-608"}),tech.trigger({type:"usage",name:"hls-608"});var track=tech.textTracks().getTrackById(captionStream);inbandTextTracks[captionStream]=track||tech.addRemoteTextTrack({kind:"captions",id:captionStream,label:captionStream},!1).track}}(inbandTextTracks,_this3.vhs_.tech_,trackName),removeCuesFromTrack(startTime,endTime,inbandTextTracks[trackName]),function(_ref){var inbandTextTracks=_ref.inbandTextTracks,captionArray=_ref.captionArray,timestampOffset=_ref.timestampOffset;if(captionArray){var Cue=window$1.WebKitDataCue||window$1.VTTCue;captionArray.forEach(function(caption){var track=caption.stream;inbandTextTracks[track].addCue(new Cue(caption.startTime+timestampOffset,caption.endTime+timestampOffset,caption.text))})}}({captionArray:captions,inbandTextTracks:inbandTextTracks,timestampOffset:timestampOffset})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,simpleSegment,captionData));else this.logger_("SegmentLoader received no captions from a caption event")},_proto.handleId3_=function(simpleSegment,id3Frames,dispatchType){if(!this.checkForAbort_(simpleSegment.requestId)&&!this.abortRequestEarly_(simpleSegment.stats))if(this.pendingSegment_.hasAppendedData_){var timestampOffset=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(inbandTextTracks,dispatchType,tech){inbandTextTracks.metadataTrack_||(inbandTextTracks.metadataTrack_=tech.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,inbandTextTracks.metadataTrack_.inBandMetadataTrackDispatchType=dispatchType)}(this.inbandTextTracks_,dispatchType,this.vhs_.tech_),addMetadata({inbandTextTracks:this.inbandTextTracks_,metadataArray:id3Frames,timestampOffset:timestampOffset,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,simpleSegment,id3Frames,dispatchType))},_proto.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(fn){return fn()}),this.metadataQueue_.caption.forEach(function(fn){return fn()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},_proto.processCallQueue_=function(){var callQueue=this.callQueue_;this.callQueue_=[],callQueue.forEach(function(fun){return fun()})},_proto.processLoadQueue_=function(){var loadQueue=this.loadQueue_;this.loadQueue_=[],loadQueue.forEach(function(fun){return fun()})},_proto.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var segmentInfo=this.pendingSegment_;return!!segmentInfo&&(!this.currentMediaInfo_||!shouldWaitForTimelineChange({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:segmentInfo.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},_proto.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;var segmentInfo=this.pendingSegment_;if(!segmentInfo||!segmentInfo.trackInfo)return!1;if(!this.handlePartialData_){var _this$currentMediaInf=this.currentMediaInfo_,hasAudio=_this$currentMediaInf.hasAudio,hasVideo=_this$currentMediaInf.hasVideo,isMuxed=_this$currentMediaInf.isMuxed;if(hasVideo&&!segmentInfo.videoTimingInfo)return!1;if(hasAudio&&!this.audioDisabled_&&!isMuxed&&!segmentInfo.audioTimingInfo)return!1}return!shouldWaitForTimelineChange({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:segmentInfo.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},_proto.handleData_=function(simpleSegment,result){if(!this.checkForAbort_(simpleSegment.requestId)&&!this.abortRequestEarly_(simpleSegment.stats))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var segmentInfo=this.pendingSegment_;if(this.setTimeMapping_(segmentInfo.timeline),this.updateMediaSecondsLoaded_(segmentInfo.segment),"closed"!==this.mediaSource_.readyState){if(simpleSegment.map&&(simpleSegment.map=this.initSegmentForMap(simpleSegment.map,!0),segmentInfo.segment.map=simpleSegment.map),simpleSegment.key&&this.segmentKey(simpleSegment.key,!0),segmentInfo.isFmp4=simpleSegment.isFmp4,segmentInfo.timingInfo=segmentInfo.timingInfo||{},segmentInfo.isFmp4)this.trigger("fmp4"),segmentInfo.timingInfo.start=segmentInfo[timingInfoPropertyForMedia(result.type)].start;else{var firstVideoFrameTimeForData,useVideoTimingInfo="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;useVideoTimingInfo&&(firstVideoFrameTimeForData=this.handlePartialData_?result.videoFramePtsTime:segmentInfo.videoTimingInfo.start),segmentInfo.timingInfo.start=this.trueSegmentStart_({currentStart:segmentInfo.timingInfo.start,playlist:segmentInfo.playlist,mediaIndex:segmentInfo.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:useVideoTimingInfo,first
1VideoFrameTimeForData:firstVideoFrameTimeForData,videoTimingInfo:segmentInfo.videoTimingInfo,audioTimingInfo:segmentInfo.audioTimingInfo})}this.updateAppendInitSegmentStatus(segmentInfo,result.type),this.updateSourceBufferTimestampOffset_(segmentInfo),segmentInfo.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(segmentInfo,result)}}else this.callQueue_.push(this.handleData_.bind(this,simpleSegment,result))},_proto.updateAppendInitSegmentStatus=function(segmentInfo,type){"main"!==this.loaderType_||"number"!=typeof segmentInfo.timestampOffset||segmentInfo.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[type]!==segmentInfo.playlist&&(this.appendInitSegment_[type]=!0)},_proto.getInitSegmentAndUpdateState_=function(_ref3){var type=_ref3.type,initSegment=_ref3.initSegment,map=_ref3.map,playlist=_ref3.playlist;if(map){var id=initSegmentId(map);if(this.activeInitSegmentId_===id)return null;initSegment=this.initSegmentForMap(map,!0).bytes,this.activeInitSegmentId_=id}return initSegment&&this.appendInitSegment_[type]?(this.playlistOfLastInitSegment_[type]=playlist,this.appendInitSegment_[type]=!!map,this.activeInitSegmentId_=null,initSegment):null},_proto.appendToSourceBuffer_=function(_ref4){var _this4=this,segmentInfo=_ref4.segmentInfo,type=_ref4.type,initSegment=_ref4.initSegment,data=_ref4.data,segments=[data],byteLength=data.byteLength;initSegment&&(segments.unshift(initSegment),byteLength+=initSegment.byteLength);var segmentObj,tempBuffer,offset,bytes=(offset=0,(segmentObj={bytes:byteLength,segments:segments}).bytes&&(tempBuffer=new Uint8Array(segmentObj.bytes),segmentObj.segments.forEach(function(segment){tempBuffer.set(segment,offset),offset+=segment.byteLength})),tempBuffer);this.sourceUpdater_.appendBuffer({segmentInfo:segmentInfo,type:type,bytes:bytes},function(error){error&&(_this4.error(type+" append of "+bytes.length+"b failed for segment #"+segmentInfo.mediaIndex+" in playlist "+segmentInfo.playlist.id),_this4.trigger("appenderror"))})},_proto.handleVideoSegmentTimingInfo_=function(requestId,videoSegmentTimingInfo){if(this.pendingSegment_&&requestId===this.pendingSegment_.requestId){var segment=this.pendingSegment_.segment;segment.videoTimingInfo||(segment.videoTimingInfo={}),segment.videoTimingInfo.transmuxerPrependedSeconds=videoSegmentTimingInfo.prependedContentDuration||0,segment.videoTimingInfo.transmuxedPresentationStart=videoSegmentTimingInfo.start.presentation,segment.videoTimingInfo.transmuxedPresentationEnd=videoSegmentTimingInfo.end.presentation,segment.videoTimingInfo.baseMediaDecodeTime=videoSegmentTimingInfo.baseMediaDecodeTime}},_proto.appendData_=function(segmentInfo,result){var type=result.type,data=result.data;if(data&&data.byteLength&&("audio"!==type||!this.audioDisabled_)){var initSegment=this.getInitSegmentAndUpdateState_({type:type,initSegment:result.initSegment,playlist:segmentInfo.playlist,map:segmentInfo.isFmp4?segmentInfo.segment.map:null});this.appendToSourceBuffer_({segmentInfo:segmentInfo,type:type,initSegment:initSegment,data:data})}},_proto.loadSegment_=function(segmentInfo){var _this5=this;this.state="WAITING",this.pendingSegment_=segmentInfo,this.trimBackBuffer_(segmentInfo),"number"==typeof segmentInfo.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(segmentInfo):this.loadQueue_.push(function(){var buffered=_this5.buffered_();"number"==typeof segmentInfo.timestampOffset&&(segmentInfo.timestampOffset=timestampOffsetForSegment({segmentTimeline:segmentInfo.timeline,currentTimeline:_this5.currentTimeline_,startOfSegment:segmentInfo.startOfSegment,buffered:buffered,overrideCheck:!0})),delete segmentInfo.audioAppendStart;var audioBuffered=_this5.sourceUpdater_.audioBuffered();audioBuffered.length&&(segmentInfo.audioAppendStart=audioBuffered.end(audioBuffered.length-1)-_this5.sourceUpdater_.audioTimestampOffset()),_this5.updateTransmuxerAndRequestSegment_(segmentInfo)})},_proto.updateTransmuxerAndRequestSegment_=function(segmentInfo){this.shouldUpdateTransmuxerTimestampOffset_(segmentInfo.timestampOffset)&&(this.gopBuffer_.length=0,segmentInfo.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:segmentInfo.timestampOffset}));var simpleSegment=this.createSimplifiedSegmentObj_(segmentInfo);segmentInfo.abortRequests=mediaSegmentRequest({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:simpleSegment,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.b
vendor: 3,240 bytes, line 1
1ind(this),videoSegmentTimingInfoFn:this.handleVideoSegmentTimingInfo_.bind(this,segmentInfo.requestId),captionsFn:this.handleCaptions_.bind(this),id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},_proto.trimBackBuffer_=function(segmentInfo){var removeToTime=function(seekable,currentTime,targetDuration){var trimTime=currentTime-Config.BACK_BUFFER_LENGTH;seekable.length&&(trimTime=Math.max(trimTime,seekable.start(0)));var maxTrimTime=currentTime-targetDuration;return Math.min(maxTrimTime,trimTime)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);removeToTime>0&&this.remove(0,removeToTime)},_proto.createSimplifiedSegmentObj_=function(segmentInfo){var segment=segmentInfo.segment,simpleSegment={resolvedUri:segment.resolvedUri,byterange:segment.byterange,requestId:segmentInfo.requestId,transmuxer:segmentInfo.transmuxer,audioAppendStart:segmentInfo.audioAppendStart,gopsToAlignWith:segmentInfo.gopsToAlignWith},previousSegment=segmentInfo.playlist.segments[segmentInfo.mediaIndex];if(previousSegment&&previousSegment.end&&previousSegment.timeline===segment.timeline&&(simpleSegment.baseStartTime=previousSegment.end+segmentInfo.timestampOffset),segment.key){var iv=segment.key.iv||new Uint32Array([0,0,0,segmentInfo.mediaIndex+segmentInfo.playlist.mediaSequence]);simpleSegment.key=this.segmentKey(segment.key),simpleSegment.key.iv=iv}return segment.map&&(simpleSegment.map=this.initSegmentForMap(segment.map)),simpleSegment},_proto.saveTransferStats_=function(stats){this.mediaRequests+=1,stats&&(this.mediaBytesTransferred+=stats.bytesReceived,this.mediaTransferDuration+=stats.roundTripTime)},_proto.saveBandwidthRelatedStats_=function(stats){this.bandwidth=stats.bandwidth,this.roundTrip=stats.roundTripTime,this.pendingSegment_.byteLength=stats.bytesReceived},_proto.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},_proto.segmentRequestFinished_=function(error,simpleSegment,result){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,error,simpleSegment,result));else if(this.saveTransferStats_(simpleSegment.stats),this.pendingSegment_&&simpleSegment.requestId===this.pendingSegment_.requestId){if(error){if(this.pendingSegment_=null,this.state="READY",error.code===REQUEST_ERRORS_ABORTED)return;return this.pause(),error.code===REQUEST_ERRORS_TIMEOUT?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(error),void this.trigger("error"))}this.saveBandwidthRelatedStats_(simpleSegment.stats);var segmentInfo=this.pendingSegment_;segmentInfo.endOfAllRequests=simpleSegment.endOfAllRequests,result.gopInfo&&(this.gopBuffer_=function(buffer,gops,replace){if(!gops.length)return buffer;if(replace)return gops.slice();for(var start=gops[0].pts,i=0;i<buffer.length&&!(buffer[i].pts>=start);i++);return buffer.slice(0,i).concat(gops)}(this.gopBuffer_,result.gopInfo,this.safeAppend_)),this.state="APPENDING";var isEndOfStream=this.isEndOfStream_(segmentInfo.mediaIndex,segmentInfo.playlist),isWalkingForward=null!==this.mediaIndex,isDiscontinuity=segmentInfo.timeline!==this.currentTimeline_&&segmentInfo.timeline>0;
1!segmentInfo.isFmp4&&(isEndOfStream||isWalkingForward&&isDiscontinuity)&&segmentTransmuxer_endTimeline(this.transmuxer_),this.trigger("appending"),this.waitForAppendsToComplete_(segmentInfo)}},_proto.setTimeMapping_=function(timeline){var timelineMapping=this.syncController_.mappingForTimeline(timeline);null!==timelineMapping&&(this.timeMapping_=timelineMapping)},_proto.updateMediaSecondsLoaded_=function(segment){"number"==typeof segment.start&&"number"==typeof segment.end?this.mediaSecondsLoaded+=segment.end-segment.start:this.mediaSecondsLoaded+=segment.duration},_proto.shouldUpdateTransmuxerTimestampOffset_=function(timestampOffset){return null!==timestampOffset&&("main"===this.loaderType_&×tampOffset!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&×tampOffset!==this.sourceUpdater_.audioTimestampOffset())},_proto.trueSegmentStart_=function(_ref5){var currentStart=_ref5.currentStart,playlist=_ref5.playlist,mediaIndex=_ref5.mediaIndex,firstVideoFrameTimeForData=_ref5.firstVideoFrameTimeForData,currentVideoTimestampOffset=_ref5.currentVideoTimestampOffset,useVideoTimingInfo=_ref5.useVideoTimingInfo,videoTimingInfo=_ref5.videoTimingInfo,audioTimingInfo=_ref5.audioTimingInfo;if(void 0!==currentStart)return currentStart;if(!useVideoTimingInfo)return audioTimingInfo.start;var previousSegment=playlist.segments[mediaIndex-1];return 0!==mediaIndex&&previousSegment&&void 0!==previousSegment.start&&previousSegment.end===firstVideoFrameTimeForData+currentVideoTimestampOffset?videoTimingInfo.start:firstVideoFrameTimeForData},_proto.waitForAppendsToComplete_=function(segmentInfo){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var _this$currentMediaInf2=this.currentMediaInfo_,hasAudio=_this$currentMediaInf2.hasAudio,hasVideo=_this$currentMediaInf2.hasVideo,isMuxed=_this$currentMediaInf2.isMuxed,waitForVideo="main"===this.loaderType_&&hasVideo,waitForAudio=!this.audioDisabled_&&hasAudio&&!isMuxed;if(segmentInfo.waitingOnAppends=0,!segmentInfo.hasAppendedData_)return segmentInfo.timingInfo||"number"!=typeof segmentInfo.timestampOffset||(this.isPendingTimestampOffset_=!0),segmentInfo.timingInfo={start:0},segmentInfo.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(segmentInfo),this.processMetadataQueue_()),void this.checkAppendsDone_(segmentInfo);waitForVideo&&segmentInfo.waitingOnAppends++,waitForAudio&&segmentInfo.waitingOnAppends++,waitForVideo&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,segmentInfo)),waitForAudio&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,segmentInfo))},_proto.checkAppendsDone_=function(segmentInfo){this.checkForAbort_(segmentInfo.requestId)||(segmentInfo.waitingOnAppends--,0===segmentInfo.waitingOnAppends&&this.handleAppendsDone_())},_proto.checkForIllegalMediaSwitch=function(trackInfo){var illegalMediaSwitchError=function(loaderType,startingMedia,trackInfo){return"main"===loaderType&&startingMedia&&trackInfo?trackInfo.hasAudio||trackInfo.hasVideo?startingMedia.hasVideo&&!trackInfo.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!startingMedia.hasVideo&&trackInfo.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,trackInfo);return!!illegalMediaSwitchError&&(this.error({message:illegalMediaSwitchError,blacklistDuration:1/0}),this.trigger("error"),!0)},_proto.updateSourceBufferTimestampOffset_=function(segmentInfo){if(null!==segmentInfo.timestampOffset&&"number"==typeof segmentInfo.timingInfo.start&&!segmentInfo.changedTimestampOffset&&"main"===this.loaderType_){var didChange=!1;segmentInfo.timestampOffset-=segmentInfo.timingInfo.start,segmentInfo.changedTimestampOffset=!0,segmentInfo.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(segmentInfo.timestampOffset),didChange=!0),segmentInfo.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(segmentInfo.timestampOffset),didChange=!0),didChange&&this.trigger("timestampoffset")}},_proto.updateTimingInfoEnd_=function(segmentInfo){segmentInfo.timingInfo=segmentInfo.timingInfo||{};var prioritizedTimingInfo="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&segmentInfo.videoTimingInfo?segmentInfo.videoTimingInfo:segmentInfo.audioTimingInfo;prioritizedTimingInfo&&(segmentInfo.timingInfo.end="number"==typeof prioritizedTimingInfo.end?prioritizedTimingInfo.end:prioritizedTimingInfo.start+segmentInfo.duration)},_proto.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var segmentInfo=this.pendingSegment_;if(this.updateTimingInfoEnd_(segmentInfo),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:segmentInfo,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_(function(segmentInfo){var _segmentInfo$segment=segmentInfo.segment,start=_segmentInfo$segment.start,end=_segmentInfo$segment.end,_segmentInfo$playlist=segmentInfo.playlist,seq=_segmentInfo$playlist.mediaSequence,id=_segmentInfo$playlist.id,_segmentInfo$playlist2=_segmentInfo$playlist.segments,segments=void 0===_segmentInfo$playlist2?[]:_segmentInfo$playlist2,index=segmentInfo.mediaIndex,timeline=segmentInfo.timeline;return["appending ["+index+"] of ["+seq+", "+(seq+segments.length)+"] from playlist ["+id+"]","["+start+" => "+end+"] in timeline ["+timeline+"]"].join(" ")}(segmentInfo)),this.recordThroughput_(segmentInfo),this.pendingSegment_=null,this.state="READY",segmentInfo.isSyncRequest)this.trigger("syncinfoupdate");else{this.addSegmentMetadataCue_(segmentInfo),this.fetchAtBuffer_=!0,this.currentTimeline_!==segmentInfo.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:segmentInfo.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:segmentInfo.timeline})),this.currentTimeline_=segmentInfo.timeline,this.trigger("syncinfoupdate");var segment=segmentInfo.segment;if(segment.end&&this.currentTime_()-segment.end>3*segmentInfo.playlist.targetDuration)this.resetEverything();else null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=segmentInfo.mediaIndex,this.isEndOfStream_
vendor: 13,951 bytes, line 1
1(segmentInfo.mediaIndex,segmentInfo.playlist)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_()}},_proto.recordThroughput_=function(segmentInfo){var rate=this.throughput.rate,segmentProcessingTime=Date.now()-segmentInfo.endOfAllRequests+1,segmentProcessingThroughput=Math.floor(segmentInfo.byteLength/segmentProcessingTime*8*1e3);this.throughput.rate+=(segmentProcessingThroughput-rate)/++this.throughput.count},_proto.addSegmentMetadataCue_=function(segmentInfo){if(this.segmentMetadataTrack_){var segment=segmentInfo.segment,start=segment.start,end=segment.end;if(finite(start)&&finite(end)){removeCuesFromTrack(start,end,this.segmentMetadataTrack_);var Cue=window$1.WebKitDataCue||window$1.VTTCue,value={custom:segment.custom,dateTimeObject:segment.dateTimeObject,dateTimeString:segment.dateTimeString,bandwidth:segmentInfo.playlist.attributes.BANDWIDTH,resolution:segmentInfo.playlist.attributes.RESOLUTION,codecs:segmentInfo.playlist.attributes.CODECS,byteLength:segmentInfo.byteLength,uri:segmentInfo.uri,timeline:segmentInfo.timeline,playlist:segmentInfo.playlist.id,start:start,end:end},cue=new Cue(start,end,JSON.stringify(value));cue.value=value,this.segmentMetadataTrack_.addCue(cue)}}},SegmentLoader}(videojs$1.EventTarget);function noop(){}var Vhs,toTitleCase$1=function(string){return"string"!=typeof string?string:string.replace(/./,function(w){return w.toUpperCase()})},bufferTypes=["video","audio"],_updating=function(type,sourceUpdater){var sourceBuffer=sourceUpdater[type+"Buffer"];return sourceBuffer&&sourceBuffer.updating||sourceUpdater.queuePending[type]},shiftQueue=function shiftQueue(type,sourceUpdater){if(0!==sourceUpdater.queue.length){var queueIndex=0,queueEntry=sourceUpdater.queue[queueIndex];if("mediaSource"!==queueEntry.type){if("mediaSource"!==type&&sourceUpdater.started_&&"closed"!==sourceUpdater.mediaSource.readyState&&!_updating(type,sourceUpdater)){if(queueEntry.type!==type){if(null===(queueIndex=function(type,queue){for(var i=0;i<queue.length;i++){var queueEntry=queue[i];if("mediaSource"===queueEntry.type)return null;if(queueEntry.type===type)return i}return null}(type,sourceUpdater.queue)))return;queueEntry=sourceUpdater.queue[queueIndex]}sourceUpdater.queue.splice(queueIndex,1),queueEntry.action(type,sourceUpdater),queueEntry.doneFn?sourceUpdater.queuePending[type]=queueEntry:shiftQueue(type,sourceUpdater)}}else sourceUpdater.updating()||"closed"===sourceUpdater.mediaSource.readyState||(sourceUpdater.queue.shift(),queueEntry.action(sourceUpdater),queueEntry.doneFn&&queueEntry.doneFn(),shiftQueue("audio",sourceUpdater),shiftQueue("video",sourceUpdater))}},cleanupBuffer=function(type,sourceUpdater){var buffer=sourceUpdater[type+"Buffer"],titleType=toTitleCase$1(type);buffer&&(buffer.removeEventListener("updateend",sourceUpdater["on"+titleType+"UpdateEnd_"]),buffer.removeEventListener("error",sourceUpdater["on"+titleType+"Error_"]),sourceUpdater.codecs[type]=null,sourceUpdater[type+"Buffer"]=null)},inSourceBuffers=function(mediaSource,sourceBuffer){return mediaSource&&sourceBuffer&&-1!==Array.prototype.indexOf.call(mediaSource.sourceBuffers,sourceBuffer)},actions_appendBuffer=function(bytes,segmentInfo){return function(type,sourceUpdater){var sourceBuffer=sourceUpdater[type+"Buffer"];inSourceBuffers(sourceUpdater.mediaSource,sourceBuffer)&&(sourceUpdater.logger_("Appending segment "+segmentInfo.mediaIndex+"'s "+bytes.length+" bytes to "+type+"Buffer"),sourceBuffer.appendBuffer(bytes))}},actions_remove=function(start,end){return function(type,sourceUpdater){var sourceBuffer=sourceUpdater[type+"Buffer"];inSourceBuffers(sourceUpdater.mediaSource,sourceBuffer)&&(sourceUpdater.logger_("Removing "+start+" to "+end+" from "+type+"Buffer"),sourceBuffer.remove(start,end))}},actions_timestampOffset=function(offset){return function(type,sourceUpdater){var sourceBuffer=sourceUpdater[type+"Buffer"];inSourceBuffers(sourceUpdater.mediaSource,sourceBuffer)&&(sourceUpdater.logger_("Setting "+type+"timestampOffset to "+offset),sourceBuffer.timestampOffset=offset)}},actions_callback=function(_callback){return function(type,sourceUpdater){_callback()}},actions_endOfStream=function(error){return function(sourceUpdater){if("open"===sourceUpdater.mediaSource.readyState){sourceUpdater.logger_("Calling mediaSource endOfStream("+(error||"")+")");try{sourceUpdater.mediaSource.endOfStream(error)}catch(e){videojs$1.log.warn("Failed to call media source endOfStream",e)}}}},actions_duration=function(_duration){return function(sourceUpdater){sourceUpdater.logger_("Setting mediaSource duration to "+_duration);try{sourceUpdater.mediaSource.duration=_duration}catch(e){videojs$1.log.warn("Failed to set media source duration",e)}}},actions_abort=function(){return function(type,sourceUpdater){if("open"===sourceUpdater.mediaSource.readyState){var sourceBuffer=sourceUpdater[type+"Buffer"];if(inSourceBuffers(sourceUpdater.mediaSource,sourceBuffer)){sourceUpdater.logger_("calling abort on "+type+"Buffer");try{sourceBuffer.abort()}catch(e){videojs$1.log.warn("Failed to abort on "+type+"Buffer",e)}}}}},actions_addSourceBuffer=function(type,codec){return function(sourceUpdater){var titleType=toTitleCase$1(type),mime=codecs_js.getMimeForCodec(codec);sourceUpdater.logger_("Adding "+type+"Buffer with codec "+codec+" to mediaSource");var sourceBuffer=sourceUpdater.mediaSource.addSourceBuffer(mime);sourceBuffer.addEventListener("updateend",sourceUpdater["on"+titleType+"UpdateEnd_"]),sourceBuffer.addEventListener("error",sourceUpdater["on"+titleType+"Error_"]),sourceUpdater.codecs[type]=codec,sourceUpdater[type+"Buffer"]=sourceBuffer}},actions_removeSourceBuffer=function(type){return function(sourceUpdater){var sourceBuffer=sourceUpdater[type+"Buffer"];if(cleanupBuffer(type,sourceUpdater),inSourceBuffers(sourceUpdater.mediaSource,sourceBuffer)){sourceUpdater.logger_("Removing "+type+"Buffer with codec "+sourceUpdater.codecs[type]+" from mediaSource");try{sourceUpdater.mediaSource.removeSourceBuffer(sourceBuffer)}catch(e){videojs$1.log.warn("Failed to removeSourceBuffer "+type+"Buffer",e)}}}},actions_changeType=function(codec){return function(type,sourceUpdater){var sourceBuffer=sourceUpdater[type+"Buffer"],mime=codecs_js.getMimeForCodec(codec);inSourceBuffers(sourceUpdater.mediaSource,sourceBuffer)&&sourceUpdater.codecs[type]!==codec&&(sourceUpdater.logger_("changing "+type+"Buffer codec from "+sourceUpdater.codecs[type]+" to "+codec),sourceBuffer.changeType(mime),sourceUpdater.codecs[type]=codec)}},pushQueue=function(_ref){var type=_ref.type,sourceUpdater=_ref.sourceUpdater,action=_ref.action,doneFn=_ref.doneFn,name=_ref.name;sourceUpdater.queue.push({type:type,action:action,doneFn:doneFn,name:name}),shiftQueue(type,sourceUpdater)},onUpdateend=function(type,sourceUpdater){return function(e){if(sourceUpdater.queuePending[type]){var doneFn=sourceUpdater.queuePending[type].doneFn;sourceUpdater.queuePending[type]=null,doneFn&&doneFn(sourceUpdater[type+"Error_"])}shiftQueue(type,sourceUpdater)}},SourceUpdater=function(_videojs$EventTarget){function SourceUpdater(mediaSource){var _this;return(_this=_videojs$EventTarget.call(this)||this).mediaSource=mediaSource,_this.sourceopenListener_=function(){return shiftQueue("mediaSource",_assertThisInitialized(_this))},_this.mediaSource.addEventListener("sourceopen",_this.sourceopenListener_),_this.logger_=logger("SourceUpdater"),_this.audioTimestampOffset_=0,_this.videoTimestampOffset_=0,_this.queue=[],_this.queuePending={audio:null,video:null},_this.delayedAudioAppendQueue_=[],_this.videoAppendQueued_=!1,_this.codecs={},_this.onVideoUpdateEnd_=onUpdateend("video",_assertThisInitialized(_this)),_this.onAudioUpdateEnd_=onUpdateend("audio",_assertThisInitialized(_this)),_this.onVideoError_=function(e){_this.videoError_=e},_this.onAudioError_=function(e){_this.audioError_=e},_this.started_=!1,_this}_inheritsLoose(SourceUpdater,_videojs$EventTarget);var _proto=SourceUpdater.prototype;return _proto.ready=function(){return this.started_},_proto.createSourceBuffers=function(codecs){this.ready()||(this.addOrChangeSourceBuffers(codecs),this.started_=!0,this.trigger("ready"))},_proto.addSourceBuffer=function(type,codec){pushQueue({type:"mediaSource",sourceUpdater:this,action:actions_addSourceBuffer(type,codec),name:"addSourceBuffer"})},_proto.abort=function(type){pushQueue({type:type,sourceUpdater:this,action:actions_abort(type),name:"abort"})},_proto.removeSourceBuffer=function(type){this.canRemoveSourceBuffer()?pushQueue({type:"mediaSource",sourceUpdater:this,action:actions_removeSourceBuffer(type),name:"removeSourceBuffer"}):videojs$1.log.error("removeSourceBuffer is not supported!")},_proto.canRemoveSourceBuffer=function(){return!videojs$1.browser.IE_VERSION&&window$1.MediaSource&&window$1.MediaSource.prototype&&"function"==typeof window$1.MediaSource.prototype.removeSourceBuffer},SourceUpdater.canChangeType=function(){return window$1.SourceBuffer&&window$1.SourceBuffer.prototype&&"function"==typeof window$1.SourceBuffer.prototype.changeType},_proto.canChangeType=function(){return this.constructor.canChangeType()},_proto.changeType=function(type,codec){this.canChangeType()?pushQueue({type:type,sourceUpdater:this,action:actions_changeType(codec),name:"changeType"}):videojs$1.log.error("changeType is not supported!")},_proto.addOrChangeSourceBuffers=function(codecs){var _this2=this;if(!codecs||"object"!=typeof codecs||0===Object.keys(codecs).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(codecs).forEach(function(type){var codec=codecs[type];if(!_this2.ready())return _this2.addSourceBuffer(type,codec);_this2.canChangeType()&&_this2.changeType(type,codec)})},_proto.appendBuffer=function(options,doneFn){var _this3=this,segmentInfo=options.segmentInfo,type=options.type,bytes=options.bytes;if(this.processedAppend_=!0,"audio"===type&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([options,doneFn]),void this.logger_("delayed audio append of "+bytes.length+" until video append");if(pushQueue({type:type,sourceUpdater:this,action:actions_appendBuffer(bytes,segmentInfo||{mediaIndex:-1}),doneFn:doneFn,name:"appendBuffer"}),"video"===type){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var queue=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+queue.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,queue.forEach(function(que){_this3.appendBuffer.apply(_this3,que)})}},_proto.audioBuffered=function(){return inSourceBuffers(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:videojs$1.createTimeRange()},_proto.videoBuffered=function(){return inSourceBuffers(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:videojs$1.createTimeRange()},_proto.buffered=function(){var video=inSourceBuffers(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,audio=inSourceBuffers(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return audio&&!video?this.audioBuffered():video&&!audio?this.videoBuffered():function(bufferA,bufferB){var start=null,end=null,arity=0,extents=[],ranges=[];if(!(bufferA&&bufferA.length&&bufferB&&bufferB.length))return videojs$1.createTimeRange();for(var count=bufferA.length;count--;)extents.push({time:bufferA.start(count),type:"start"}),extents.push({time:bufferA.end(count),type:"end"});for(count=bufferB.length;count--;)extents.push({time:bufferB.start(count),type:"start"}),extents.push({time:bufferB.end(count),type:"end"});for(extents.sort(function(a,b){return a.time-b.time}),count=0;count<extents.length;count++)"start"===extents[count].type?2==++arity&&(start=extents[count].time):"end"===extents[count].type&&1==--arity&&(end=extents[count].time),null!==start&&null!==end&&(ranges.push([start,end]),start=null,end=null);return videojs$1.createTimeRanges(ranges)}(this.audioBuffered(),this.videoBuffered())},_proto.setDuration=function(duration,doneFn){void 0===doneFn&&(doneFn=noop),pushQueue({type:"mediaSource",sourceUpdater:this,action:actions_duration(duration),name:"duration",doneFn:doneFn})},_proto.endOfStream=function(error,doneFn){void 0===error&&(error=null),void 0===doneFn&&(doneFn=noop),"string"!=typeof error&&(error=void 0),pushQueue({type:"mediaSource",sourceUpdater:this,action:actions_endOfStream(error),name:"endOfStream",doneFn:doneFn})},_proto.removeAudio=function(start,end,done){void 0===done&&(done=noop),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?pushQueue({type:"audio",sourceUpdater:this,action:actions_remove(start,end),doneFn:done,name:"remove"}):done()},_proto.removeVideo=function(start,end,done){void 0===done&&(done=noop),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?pushQueue({type:"video",sourceUpdater:this,action:actions_remove(start,end),doneFn:done,name:"remove"}):done()},_proto.updating=function(){return!(!_updating("audio",this)&&!_updating("video",this))},_proto.audioTimestampOffset=function(offset){return void 0!==offset&&this.audioBuffer&&this.audioTimestampOffset_!==offset&&(pushQueue({type:"audio",sourceUpdater:this,action:actions_timestampOffset(offset),name:"timestampOffset"}),this.audioTimestampOffset_=offset),this.audioTimestampOffset_},_proto.videoTimestampOffset=function(offset){return void 0!==offset&&this.videoBuffer&&this.videoTimestampOffset!==offset&&(pushQueue({type:"video",sourceUpdater:this,action:actions_timestampOffset(offset),name:"timestampOffset"}),this.videoTimestampOffset_=offset),this.videoTimestampOffset_},_proto.audioQueueCallback=function(callback){this.audioBuffer&&pushQueue({type:"audio",sourceUpdater:this,action:actions_callback(callback),name:"callback"})},_proto.videoQueueCallback=function(callback){this.videoBuffer&&pushQueue({type:"video",sourceUpdater:this,action:actions_callback(callback),name:"callback"})},_proto.dispose=function(){var _this4=this;
1this.trigger("dispose"),bufferTypes.forEach(function(type){_this4.abort(type),_this4.canRemoveSourceBuffer()?_this4.removeSourceBuffer(type):_this4[type+"QueueCallback"](function(){return cleanupBuffer(type,_this4)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},SourceUpdater}(videojs$1.EventTarget),uint8ToUtf8=function(uintArray){return decodeURIComponent(escape(String.fromCharCode.apply(null,uintArray)))},VTT_LINE_TERMINATORS=new Uint8Array("\n\n".split("").map(function(_char2){return _char2.charCodeAt(0)})),VTTSegmentLoader=function(_SegmentLoader){function VTTSegmentLoader(settings,options){var _this;return void 0===options&&(options={}),(_this=_SegmentLoader.call(this,settings,options)||this).handlePartialData_=!1,_this.mediaSource_=null,_this.subtitlesTrack_=null,_this.loaderType_="subtitle",_this.featuresNativeTextTracks_=settings.featuresNativeTextTracks,_this.shouldSaveSegmentTimingInfo_=!1,_this}_inheritsLoose(VTTSegmentLoader,_SegmentLoader);var _proto=VTTSegmentLoader.prototype;return _proto.createTransmuxer_=function(){return null},_proto.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return videojs$1.createTimeRanges();var cues=this.subtitlesTrack_.cues,start=cues[0].startTime,end=cues[cues.length-1].startTime;return videojs$1.createTimeRanges([[start,end]])},_proto.initSegmentForMap=function(map,set){if(void 0===set&&(set=!1),!map)return null;var id=initSegmentId(map),storedMap=this.initSegments_[id];if(set&&!storedMap&&map.bytes){var combinedByteLength=VTT_LINE_TERMINATORS.byteLength+map.bytes.byteLength,combinedSegment=new Uint8Array(combinedByteLength);combinedSegment.set(map.bytes),combinedSegment.set(VTT_LINE_TERMINATORS,map.bytes.byteLength),this.initSegments_[id]=storedMap={resolvedUri:map.resolvedUri,byterange:map.byterange,bytes:combinedSegment}}return storedMap||map},_proto.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},_proto.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},_proto.track=function(_track){return void 0===_track?this.subtitlesTrack_:(this.subtitlesTrack_=_track,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)},_proto.remove=function(start,end){removeCuesFromTrack(start,end,this.subtitlesTrack_)},_proto.fillBuffer_=function(){var _this2=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var segmentInfo=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(segmentInfo=this.skipEmptySegments_(segmentInfo)){if(null===this.syncController_.timestampOffsetForTimeline(segmentInfo.timeline)){return this.syncController_.one("timestampoffset",function(){_this2.state="READY",_this2.paused()||_this2.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(segmentInfo)}},_proto.skipEmptySegments_=function(segmentInfo){for(;segmentInfo&&segmentInfo.segment.empty;)segmentInfo=this.generateSegmentInfo_(segmentInfo.playlist,segmentInfo.mediaIndex+1,segmentInfo.startOfSegment+segmentInfo.duration,segmentInfo.isSyncRequest);return segmentInfo},_proto.stopForError=function(error){this.error(error),this.state="READY",this.pause(),this.trigger("error")},_proto.segmentRequestFinished_=function(error,simpleSegment,result){var _this3=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(simpleSegment.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(error)return error.code===REQUEST_ERRORS_TIMEOUT&&this.handleTimeout_(),error.code===REQUEST_ERRORS_ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(error);this.saveBandwidthRelatedStats_(simpleSegment.stats),this.state="APPENDING",this.trigger("appending");var segmentInfo=this.pendingSegment_,segment=segmentInfo.segment;if(segment.map&&(segment.map.bytes=simpleSegment.map.bytes),segmentInfo.bytes=simpleSegment.bytes,"function"!=typeof window$1.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var loadHandler,errorHandler=function(){_this3.subtitlesTrack_.tech_.off("vttjsloaded",loadHandler),_this3.stopForError({message:"Error loading vtt.js"})};return loadHandler=function(){_this3.subtitlesTrack_.tech_.off("vttjserror",errorHandler),_this3.segmentRequestFinished_(error,simpleSegment,result)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",loadHandler),void this.subtitlesTrack_.tech_.one("vttjserror",errorHandler)}segment.requested=!0;try{this.parseVTTCues_(segmentInfo)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(segmentInfo,this.syncController_.timelines[segmentInfo.timeline],this.playlist_),segmentInfo.cues.length?segmentInfo.timingInfo={start:segmentInfo.cues[0].startTime,end:segmentInfo.cues[segmentInfo.cues.length-1].endTime}:segmentInfo.timingInfo={start:segmentInfo.startOfSegment,end:segmentInfo.startOfSegment+segmentInfo.duration},segmentInfo.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");segmentInfo.byteLength=segmentInfo.bytes.byteLength,this.mediaSecondsLoaded+=segment.duration,segmentInfo.cues.forEac
1h(function(cue){_this3.remove(cue.startTime,cue.endTime),_this3.subtitlesTrack_.addCue(_this3.featuresNativeTextTracks_?new window$1.VTTCue(cue.startTime,cue.endTime,cue.text):cue)}),this.handleAppendsDone_()}else this.state="READY"},_proto.handleData_=function(){},_proto.updateTimingInfoEnd_=function(){},_proto.parseVTTCues_=function(segmentInfo){var decoder,decodeBytesToString=!1;"function"==typeof window$1.TextDecoder?decoder=new window$1.TextDecoder("utf8"):(decoder=window$1.WebVTT.StringDecoder(),decodeBytesToString=!0);var parser=new window$1.WebVTT.Parser(window$1,window$1.vttjs,decoder);if(segmentInfo.cues=[],segmentInfo.timestampmap={MPEGTS:0,LOCAL:0},parser.oncue=segmentInfo.cues.push.bind(segmentInfo.cues),parser.ontimestampmap=function(map){segmentInfo.timestampmap=map},parser.onparsingerror=function(error){videojs$1.log.warn("Error encountered when parsing cues: "+error.message)},segmentInfo.segment.map){var mapData=segmentInfo.segment.map.bytes;decodeBytesToString&&(mapData=uint8ToUtf8(mapData)),parser.parse(mapData)}var segmentData=segmentInfo.bytes;decodeBytesToString&&(segmentData=uint8ToUtf8(segmentData)),parser.parse(segmentData),parser.flush()},_proto.updateTimeMapping_=function(segmentInfo,mappingObj,playlist){var segment=segmentInfo.segment;if(mappingObj)if(segmentInfo.cues.length){var timestampmap=segmentInfo.timestampmap,diff=timestampmap.MPEGTS/clock.ONE_SECOND_IN_TS-timestampmap.LOCAL+mappingObj.mapping;if(segmentInfo.cues.forEach(function(cue){cue.startTime+=diff,cue.endTime+=diff}),!playlist.syncInfo){var firstStart=segmentInfo.cues[0].startTime,lastStart=segmentInfo.cues[segmentInfo.cues.length-1].startTime;playlist.syncInfo={mediaSequence:playlist.mediaSequence+segmentInfo.mediaIndex,time:Math.min(firstStart,lastStart-segment.duration)}}}else segment.empty=!0},VTTSegmentLoader}(SegmentLoader),findAdCue=function(track,mediaTime){for(var cues=track.cues,i=0;i<cues.length;i++){var cue=cues[i];if(mediaTime>=cue.adStartTime&&mediaTime<=cue.adEndTime)return cue}return null},syncPointStrategies=[{name:"VOD",run:function(syncController,playlist,duration,currentTimeline,currentTime){if(duration!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(syncController,playlist,duration,currentTimeline,currentTime){if(!syncController.datetimeToDisplayTime)return null;var segments=playlist.segments||[],syncPoint=null,lastDistance=null;currentTime=currentTime||0;for(var i=0;i<segments.length;i++){var segment=segments[i];if(segment.dateTimeObject){var segmentStart=segment.dateTimeObject.getTime()/1e3+syncController.datetimeToDisplayTime,distance=Math.abs(currentTime-segmentStart);if(null!==lastDistance&&(0===distance||lastDistance<distance))break;lastDistance=distance,syncPoint={time:segmentStart,segmentIndex:i}}}return syncPoint}},{name:"Segment",run:function(syncController,playlist,duration,currentTimeline,currentTime){var segments=playlist.segments||[],syncPoint=null,lastDistance=null;currentTime=currentTime||0;for(var i=0;i<segments.length;i++){var segment=segments[i];if(segment.timeline===currentTimeline&&void 0!==segment.start){var distance=Math.abs(currentTime-segment.start);if(null!==lastDistance&&lastDistance<distance)break;(!syncPoint||null===lastDistance||lastDistance>=distance)&&(lastDistance=distance,syncPoint={time:segment.start,segmentIndex:i})}}return syncPoint}},{name:"Discontinuity",run:function(syncController,playlist,duration,currentTimeline,currentTime){var syncPoint=null;if(currentTime=currentTime||0,playlist.discontinuityStarts&&playlist.discontinuityStarts.length)for(var lastDistance=null,i=0;i<playlist.discontinuityStarts.length;i++){var segmentIndex=playlist.discontinuityStarts[i],discontinuity=playlist.discontinuitySequence+i+1,discontinuitySync=syncController.discontinuities[discontinuity];if(discontinuitySync){var distance=Math.abs(currentTime-discontinuitySync.time);if(null!==lastDistance&&lastDistance<distance)break;(!syncPoint||null===lastDistance||lastDistance>=distance)&&(lastDistance=distance,syncPoint={time:discontinuitySync.time,segmentIndex:segmentIndex})}}return syncPoint}},{name:"Playlist",run:function(syncController,playlist,duration,currentTimeline,currentTime){return playlist.syncInfo?{time:playlist.syncInfo.time,segmentIndex:playlist.syncInfo.mediaSequence-playlist.mediaSequence}:null}}],SyncController=function(_videojs$EventTarget){function SyncController(options){var _this;return(_this=_videojs$EventTarget.call(this)||this).timelines=[],_this.discontinuities=[],_this.datetimeToDisplayTime=null,_this.logger_=logger("SyncController"),_this}_inheritsLoose(SyncController,_videojs$EventTarget);var _proto=SyncController.prototype;return _proto.getSyncPoint=function(playlist,duration,currentTimeline,currentTime){var syncPoints=this.runStrategies_(playlist,duration,currentTimeline,currentTime);return syncPoints.length?this.selectSyncPoint_(syncPoints,{key:"time",value:currentTime}):null},_proto.getExpiredTime=function(playlist,duration){if(!playlist||!playlist.segments)return null;var syncPoints=this.runStrategies_(playlist,duration,playlist.discontinuitySequence,0);if(!syncPoints.length)return null;var syncPoint=this.selectSyncPoint_(syncPoints,{key:"segmentIndex",value:0});return syncPoint.segmentIndex>0&&(syncPoint.time*=-1),Math.abs(syncPoint.time+sumDurations(playlist,syncPoint.segmentIndex,0))},_proto.runStrategies_=function(playlist,duration,currentTimeline,currentTime){for(var syncPoints=[],i=0;i<syncPointStrategies.length;i++){var strategy=syncPointStrategies[i],syncPoint=strategy.run(this,playlist,duration,currentTimeline,currentTime);syncPoint&&(syncPoint.strategy=strategy.name,syncPoints.push({strategy:strategy.name,syncPoint:syncPoint}))}return syncPoints},_proto.selectSyncPoint_=function(syncPoints,target){for(var bestSyncPoint=syncPoints[0].syncPoint,bestDistance=Math.abs(syncPoints[0].syncPoint[target.key]-target.value),bestStrategy=syncPoints[0].strategy,i=1;i<syncPoints.length;i++){var newDistance=Math.abs(syncPoints[i].syncPoint[target.key]-target.value);newDistance<bestDistance&&(bestDistance=newDistance,bestSyncPoint=syncPoints[i].syncPoint,bestStrategy=syncPoints[i].strategy)}return this.logger_("syncPoint for ["+target.key+": "+target.value+"] chosen with strategy ["+bestStrategy+"]: [time:"+bestSyncPoint.time+", segmentIndex:"+bestSyncPoint.segmentIndex+"]"),bestSyncPoint},_proto.saveExpiredSegmentInfo=function(oldPlaylist,newPlaylist){for(var i=newPlaylist.mediaSequence-oldPlaylist.mediaSequence-1;i>=0;i--){var lastRemovedSegment=oldPlaylist.segments[i];if(lastRemovedSegment&&void 0!==lastRemovedSegment.start){newPlaylist.syncInfo={mediaSequence:oldPlaylist.mediaSequence+i,time:lastRemovedSegment.start}
1,this.logger_("playlist refresh sync: [time:"+newPlaylist.syncInfo.time+", mediaSequence: "+newPlaylist.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},_proto.setDateTimeMapping=function(playlist){if(!this.datetimeToDisplayTime&&playlist.segments&&playlist.segments.length&&playlist.segments[0].dateTimeObject){var playlistTimestamp=playlist.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-playlistTimestamp}},_proto.saveSegmentTimingInfo=function(_ref){var segmentInfo=_ref.segmentInfo,shouldSaveTimelineMapping=_ref.shouldSaveTimelineMapping;this.calculateSegmentTimeMapping_(segmentInfo,segmentInfo.timingInfo,shouldSaveTimelineMapping)&&(this.saveDiscontinuitySyncInfo_(segmentInfo),segmentInfo.playlist.syncInfo||(segmentInfo.playlist.syncInfo={mediaSequence:segmentInfo.playlist.mediaSequence+segmentInfo.mediaIndex,time:segmentInfo.segment.start}))},_proto.timestampOffsetForTimeline=function(timeline){return void 0===this.timelines[timeline]?null:this.timelines[timeline].time},_proto.mappingForTimeline=function(timeline){return void 0===this.timelines[timeline]?null:this.timelines[timeline].mapping},_proto.calculateSegmentTimeMapping_=function(segmentInfo,timingInfo,shouldSaveTimelineMapping){var segment=segmentInfo.segment,mappingObj=this.timelines[segmentInfo.timeline];if(null!==segmentInfo.timestampOffset)mappingObj={time:segmentInfo.startOfSegment,mapping:segmentInfo.startOfSegment-timingInfo.start},shouldSaveTimelineMapping&&(this.timelines[segmentInfo.timeline]=mappingObj,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+segmentInfo.timeline+": [time: "+mappingObj.time+"] [mapping: "+mappingObj.mapping+"]")),segment.start=segmentInfo.startOfSegment,segment.end=timingInfo.end+mappingObj.mapping;else{if(!mappingObj)return!1;segment.start=timingInfo.start+mappingObj.mapping,segment.end=timingInfo.end+mappingObj.mapping}return!0},_proto.saveDiscontinuitySyncInfo_=function(segmentInfo){var playlist=segmentInfo.playlist,segment=segmentInfo.segment;if(segment.discontinuity)this.discontinuities[segment.timeline]={time:segment.start,accuracy:0};else if(playlist.discontinuityStarts&&playlist.discontinuityStarts.length)for(var i=0;i<playlist.discontinuityStarts.length;i++){var segmentIndex=playlist.discontinuityStarts[i],discontinuity=playlist.discontinuitySequence+i+1,mediaIndexDiff=segmentIndex-segmentInfo.mediaIndex,accuracy=Math.abs(mediaIndexDiff);if(!this.discontinuities[discontinuity]||this.discontinuities[discontinuity].accuracy>accuracy){var time=void 0;time=mediaIndexDiff<0?segment.start-sumDurations(playlist,segmentInfo.mediaIndex,segmentIndex):segment.end+sumDurations(playlist,segmentInfo.mediaIndex+1,segmentIndex),this.discontinuities[discontinuity]={time:time,accuracy:accuracy}}}},_proto.dispose=function(){this.trigger("dispose"),this.off()},SyncController}(videojs$1.EventTarget),TimelineChangeController=function(_videojs$EventTarget){function TimelineChangeController(){var _this;return(_this=_videojs$EventTarget.call(this)||this).pendingTimelineChanges_={},_this.lastTimelineChanges_={},_this}_inheritsLoose(TimelineChangeController,_videojs$EventTarget);var _proto=TimelineChangeController.prototype;return _proto.clearPendingTimelineChange=function(type){this.pendingTimelineChanges_[type]=null,this.trigger("pendingtimelinechange")},_proto.pendingTimelineChange=function(_ref){var type=_ref.type,from=_ref.from,to=_ref.to;return"number"==typeof from&&"number"==typeof to&&(this.pendingTimelineChanges_[type]={type:type,from:from,to:to},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[type]},_proto.lastTimelineChange=function(_ref2){var type=_ref2.type,from=_ref2.from,to=_ref2.to;return"number"==typeof from&&"number"==typeof to&&(this.lastTimelineChanges_[type]={type:type,from:from,to:to},delete this.pendingTimelineChanges_[type],this.trigger("timelinechange")),this.lastTimelineChanges_[type]},_proto.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},TimelineChangeController}(videojs$1.EventTarget),Decrypter=new shimWorker("./decrypter-worker.worker.js",function(window,document){var self=this;!function(){function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}var createClass=function(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor};var inheritsLoose=function(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass},stream=function(){function Stream(){this.listeners={}}var _proto=Stream.prototype;return _proto.on=function(type,listener){this.listeners[type]||(this.listeners[type]=[]),this.listeners[type].push(listener)},_proto.off=function(type,listener){if(!this.listeners[type])return!1;var index=this.listeners[type].indexOf(listener);return this.listeners[type]=this.listeners[type].slice(0),this.listeners[type].splice(index,1),index>-1}
vendor: 4,903 bytes, line 1
1,_proto.trigger=function(type){var callbacks=this.listeners[type];if(callbacks)if(2===arguments.length)for(var length=callbacks.length,i=0;i<length;++i)callbacks[i].call(this,arguments[1]);else for(var args=Array.prototype.slice.call(arguments,1),_length=callbacks.length,_i=0;_i<_length;++_i)callbacks[_i].apply(this,args)},_proto.dispose=function(){this.listeners={}},_proto.pipe=function(destination){this.on("data",function(data){destination.push(data)})},Stream}();var precompute=function(){var i,x,xInv,x2,x4,s,tEnc,tDec,tables=[[[],[],[],[],[]],[[],[],[],[],[]]],encTable=tables[0],decTable=tables[1],sbox=encTable[4],sboxInv=decTable[4],d=[],th=[];for(i=0;i<256;i++)th[(d[i]=i<<1^283*(i>>7))^i]=i;for(x=xInv=0;!sbox[x];x^=x2||1,xInv=th[xInv]||1)for(s=(s=xInv^xInv<<1^xInv<<2^xInv<<3^xInv<<4)>>8^255&s^99,sbox[x]=s,sboxInv[s]=x,tDec=16843009*d[x4=d[x2=d[x]]]^65537*x4^257*x2^16843008*x,tEnc=257*d[s]^16843008*s,i=0;i<4;i++)encTable[i][x]=tEnc=tEnc<<24^tEnc>>>8,decTable[i][s]=tDec=tDec<<24^tDec>>>8;for(i=0;i<5;i++)encTable[i]=encTable[i].slice(0),decTable[i]=decTable[i].slice(0);return tables},aesTables=null,AES=function(){function AES(key){var i,j,tmp;aesTables||(aesTables=precompute()),this._tables=[[aesTables[0][0].slice(),aesTables[0][1].slice(),aesTables[0][2].slice(),aesTables[0][3].slice(),aesTables[0][4].slice()],[aesTables[1][0].slice(),aesTables[1][1].slice(),aesTables[1][2].slice(),aesTables[1][3].slice(),aesTables[1][4].slice()]];var sbox=this._tables[0][4],decTable=this._tables[1],keyLen=key.length,rcon=1;if(4!==keyLen&&6!==keyLen&&8!==keyLen)throw new Error("Invalid aes key size");var encKey=key.slice(0),decKey=[];for(this._key=[encKey,decKey],i=keyLen;i<4*keyLen+28;i++)tmp=encKey[i-1],(i%keyLen==0||8===keyLen&&i%keyLen==4)&&(tmp=sbox[tmp>>>24]<<24^sbox[tmp>>16&255]<<16^sbox[tmp>>8&255]<<8^sbox[255&tmp],i%keyLen==0&&(tmp=tmp<<8^tmp>>>24^rcon<<24,rcon=rcon<<1^283*(rcon>>7))),encKey[i]=encKey[i-keyLen]^tmp;for(j=0;i;j++,i--)tmp=encKey[3&j?i:i-4],decKey[j]=i<=4||j<4?tmp:decTable[0][sbox[tmp>>>24]]^decTable[1][sbox[tmp>>16&255]]^decTable[2][sbox[tmp>>8&255]]^decTable[3][sbox[255&tmp]]}return AES.prototype.decrypt=function(encrypted0,encrypted1,encrypted2,encrypted3,out,offset){var a2,b2,c2,i,key=this._key[1],a=encrypted0^key[0],b=encrypted3^key[1],c=encrypted2^key[2],d=encrypted1^key[3],nInnerRounds=key.length/4-2,kIndex=4,table=this._tables[1],table0=table[0],table1=table[1],table2=table[2],table3=table[3],sbox=table[4];for(i=0;i<nInnerRounds;i++)a2=table0[a>>>24]^table1[b>>16&255]^table2[c>>8&255]^table3[255&d]^key[kIndex],b2=table0[b>>>24]^table1[c>>16&255]^table2[d>>8&255]^table3[255&a]^key[kIndex+1],c2=table0[c>>>24]^table1[d>>16&255]^table2[a>>8&255]^table3[255&b]^key[kIndex+2],d=table0[d>>>24]^table1[a>>16&255]^table2[b>>8&255]^table3[255&c]^key[kIndex+3],kIndex+=4,a=a2,b=b2,c=c2;for(i=0;i<4;i++)out[(3&-i)+offset]=sbox[a>>>24]<<24^sbox[b>>16&255]<<16^sbox[c>>8&255]<<8^sbox[255&d]^key[kIndex++],a2=a,a=b,b=c,c=d,d=a2},AES}(),AsyncStream=function(_Stream){function AsyncStream(){var _this;return(_this=_Stream.call(this,stream)||this).jobs=[],_this.delay=1,_this.timeout_=null,_this}inheritsLoose(AsyncStream,_Stream);var _proto=AsyncStream.prototype;return _proto.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},_proto.push=function(job){this.jobs.push(job),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},AsyncStream}(stream),ntoh=function(word){return word<<24|(65280&word)<<8|(16711680&word)>>8|word>>>24},Decrypter=function(){function Decrypter(encrypted,key,initVector,done){var step=Decrypter.STEP,encrypted32=new Int32Array(encrypted.buffer),decrypted=new Uint8Array(encrypted.byteLength),i=0;for(this.asyncStream_=new AsyncStream,this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i,i+step),key,initVector,decrypted)),i=step;i<encrypted32.length;i+=step)initVector=new Uint32Array([ntoh(encrypted32[i-4]),ntoh(encrypted32[i-3]),ntoh(encrypted32[i-2]),ntoh(encrypted32[i-1])]),this.asyncStream_.push(this.decryptChunk_(encrypted32.subarray(i,i+step),key,initVector,decrypted));this.asyncStream_.push(function(){var padded;done(null,(padded=decrypted).subarray(0,padded.byteLength-padded[padded.byteLength-1]))})}return Decrypter.prototype.decryptChunk_=function(encrypted,key,initVector,decrypted){return function(){var bytes=function(encrypted,key,initVector){var init0,init1,init2,init3,encrypted0,encrypted1,encrypted2,encrypted3,wordIx,encrypted32=new Int32Array(encrypted.buffer,encrypted.byteOffset,encrypted.byteLength>>2),decipher=new AES(Array.prototype.slice.call(key)),decrypted=new Uint8Array(encrypted.byteLength),decrypted32=new Int32Array(decrypted.buffer);for(init0=initVector[0],init1=initVector[1],init2=initVector[2],init3=initVector[3],wordIx=0;wordIx<encrypted32.length;
vendor: 4,475 bytes, line 1
1wordIx+=4)encrypted0=ntoh(encrypted32[wordIx]),encrypted1=ntoh(encrypted32[wordIx+1]),encrypted2=ntoh(encrypted32[wordIx+2]),encrypted3=ntoh(encrypted32[wordIx+3]),decipher.decrypt(encrypted0,encrypted1,encrypted2,encrypted3,decrypted32,wordIx),decrypted32[wordIx]=ntoh(decrypted32[wordIx]^init0),decrypted32[wordIx+1]=ntoh(decrypted32[wordIx+1]^init1),decrypted32[wordIx+2]=ntoh(decrypted32[wordIx+2]^init2),decrypted32[wordIx+3]=ntoh(decrypted32[wordIx+3]^init3),init0=encrypted0,init1=encrypted1,init2=encrypted2,init3=encrypted3;return decrypted}(encrypted,key,initVector);decrypted.set(bytes,encrypted.byteOffset)}},createClass(Decrypter,null,[{key:"STEP",get:function(){return 32e3}}]),Decrypter}();new function(self){self.onmessage=function(event){var data=event.data,encrypted=new Uint8Array(data.encrypted.bytes,data.encrypted.byteOffset,data.encrypted.byteLength),key=new Uint32Array(data.key.bytes,data.key.byteOffset,data.key.byteLength/4),iv=new Uint32Array(data.iv.bytes,data.iv.byteOffset,data.iv.byteLength/4);new Decrypter(encrypted,key,iv,function(err,bytes){var message,transferable;self.postMessage((message={source:data.source,decrypted:bytes},transferable={},Object.keys(message).forEach(function(key){var value=message[key];ArrayBuffer.isView(value)?transferable[key]={bytes:value.buffer,byteOffset:value.byteOffset,byteLength:value.byteLength}:transferable[key]=value}),transferable),[bytes.buffer])})}}(self)}()}),audioTrackKind_=function(properties){var kind=properties.default?"main":"alternative";return properties.characteristics&&properties.characteristics.indexOf("public.accessibility.describes-video")>=0&&(kind="main-desc"),kind},stopLoaders=function(segmentLoader,mediaType){segmentLoader.abort(),segmentLoader.pause(),mediaType&&mediaType.activePlaylistLoader&&(mediaType.activePlaylistLoader.pause(),mediaType.activePlaylistLoader=null)},startLoaders=function(playlistLoader,mediaType){mediaType.activePlaylistLoader=playlistLoader,playlistLoader.load()},onError={AUDIO:function(type,settings){return function(){var segmentLoader=settings.segmentLoaders[type],mediaType=settings.mediaTypes[type],blacklistCurrentPlaylist=settings.blacklistCurrentPlaylist;stopLoaders(segmentLoader,mediaType);var activeTrack=mediaType.activeTrack(),activeGroup=mediaType.activeGroup(),id=(activeGroup.filter(function(group){return group.default})[0]||activeGroup[0]).id,defaultTrack=mediaType.tracks[id];if(activeTrack!==defaultTrack){for(var trackId in videojs$1.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),mediaType.tracks)mediaType.tracks[trackId].enabled=mediaType.tracks[trackId]===defaultTrack;mediaType.onTrackChanged()}else blacklistCurrentPlaylist({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(type,settings){return function(){var segmentLoader=settings.segmentLoaders[type],mediaType=settings.mediaTypes[type];videojs$1.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),stopLoaders(segmentLoader,mediaType);var track=mediaType.activeTrack();track&&(track.mode="disabled"),mediaType.onTrackChanged()}}},setupListeners={AUDIO:function(type,playlistLoader,settings){if(playlistLoader){var tech=settings.tech,requestOptions=settings.requestOptions,segmentLoader=settings.segmentLoaders[type];playlistLoader.on("loadedmetadata",function(){var media=playlistLoader.media();segmentLoader.playlist(media,requestOptions),(!tech.paused()||media.endList&&"none"!==tech.preload())&&segmentLoader.load()}),playlistLoader.on("loadedplaylist",function(){segmentLoader.playlist(playlistLoader.media(),requestOptions),tech.paused()||segmentLoader.load()}),playlistLoader.on("error",onError[type](type,settings))}},SUBTITLES:function(type,playlistLoader,settings){var tech=settings.tech,requestOptions=settings.requestOptions,segmentLoader=settings.segmentLoaders[type],mediaType=settings.mediaTypes[type];playlistLoader.on("loadedmetadata",function(){var media=playlistLoader.media();segmentLoader.playlist(media,requestOptions),segmentLoader.track(mediaType.activeTrack()),(!tech.paused()||media.endList&&"none"!==tech.preload())&&segmentLoader.load()}),playlistLoader.on("loadedplaylist",function(){segmentLoader.playlist(playlistLoader.media(),requestOptions),tech.paused()||segmentLoader.load()}),playlistLoader.on("error",onError[type](type,settings))}},initialize={AUDIO:function(type,settings){var vhs=settings.vhs,sourceType=sett
1ings.sourceType,segmentLoader=settings.segmentLoaders[type],requestOptions=settings.requestOptions,_settings$master=settings.master,mediaGroups=_settings$master.mediaGroups,playlists=_settings$master.playlists,_settings$mediaTypes$=settings.mediaTypes[type],groups=_settings$mediaTypes$.groups,tracks=_settings$mediaTypes$.tracks,masterPlaylistLoader=settings.masterPlaylistLoader;mediaGroups[type]&&0!==Object.keys(mediaGroups[type]).length||(mediaGroups[type]={main:{default:{default:!0}}});var _loop=function(groupId){groups[groupId]||(groups[groupId]=[]);var groupPlaylists=playlists.filter(function(playlist){return playlist.attributes[type]===groupId}),_loop2=function(variantLabel){var properties=mediaGroups[type][groupId][variantLabel];groupPlaylists.filter(function(playlist){return playlist.resolvedUri===properties.resolvedUri}).length&&delete properties.resolvedUri;var playlistLoader=void 0;if(playlistLoader="vhs-json"===sourceType&&properties.playlists?new PlaylistLoader(properties.playlists[0],vhs,requestOptions):properties.resolvedUri?new PlaylistLoader(properties.resolvedUri,vhs,requestOptions):properties.playlists&&"dash"===sourceType?new DashPlaylistLoader(properties.playlists[0],vhs,requestOptions,masterPlaylistLoader):null,properties=videojs$1.mergeOptions({id:variantLabel,playlistLoader:playlistLoader},properties),setupListeners[type](type,properties.playlistLoader,settings),groups[groupId].push(properties),void 0===tracks[variantLabel]){var track=new videojs$1.AudioTrack({id:variantLabel,kind:audioTrackKind_(properties),enabled:!1,language:properties.language,default:properties.default,label:variantLabel});tracks[variantLabel]=track}};for(var variantLabel in mediaGroups[type][groupId])_loop2(variantLabel)};for(var groupId in mediaGroups[type])_loop(groupId);segmentLoader.on("error",onError[type](type,settings))},SUBTITLES:function(type,settings){var tech=settings.tech,vhs=settings.vhs,sourceType=settings.sourceType,segmentLoader=settings.segmentLoaders[type],requestOptions=settings.requestOptions,mediaGroups=settings.master.mediaGroups,_settings$mediaTypes$2=settings.mediaTypes[type],groups=_settings$mediaTypes$2.groups,tracks=_settings$mediaTypes$2.tracks,masterPlaylistLoader=settings.masterPlaylistLoader;for(var groupId in mediaGroups[type])for(var variantLabel in groups[groupId]||(groups[groupId]=[]),mediaGroups[type][groupId])if(!mediaGroups[type][groupId][variantLabel].forced){var properties=mediaGroups[type][groupId][variantLabel],playlistLoader=void 0;if("hls"===sourceType?playlistLoader=new PlaylistLoader(properties.resolvedUri,vhs,requestOptions):"dash"===sourceType?playlistLoader=new DashPlaylistLoader(properties.playlists[0],vhs,requestOptions,masterPlaylistLoader):"vhs-json"===sourceType&&(playlistLoader=new PlaylistLoader(properties.playlists?properties.playlists[0]:properties.resolvedUri,vhs,requestOptions)),properties=videojs$1.mergeOptions({id:variantLabel,playlistLoader:playlistLoader},properties),setupListeners[type](type,properties.playlistLoader,settings),groups[groupId].push(properties),void 0===tracks[variantLabel]){var track=tech.addRemoteTextTrack({id:variantLabel,kind:"subtitles",default:properties.default&&properties.autoselect,language:properties.language,label:variantLabel},!1).track;tracks[variantLabel]=track}}segmentLoader.on("error",onError[type](type,settings))},"CLOSED-CAPTIONS":function(type,settings){var tech=settings.tech,mediaGroups=settings.master.mediaGroups,_settings$mediaTypes$3=settings.mediaTypes[type],groups=_settings$mediaTypes$3.groups,tracks=_settings$mediaTypes$3.tracks;for(var groupId in mediaGroups[type])for(var variantLabel in groups[groupId]||(groups[groupId]=[]),mediaGroups[type][groupId]){var properties=mediaGroups[type][groupId][variantLabel];if(properties.instreamId.match(/CC\d/)&&(groups[groupId].push(videojs$1.mergeOptions({id:variantLabel},properties)),void 0===tracks[variantLabel])){var track=tech.addRemoteTextTrack({id:properties.instreamId,
1kind:"captions",default:properties.default&&properties.autoselect,language:properties.language,label:variantLabel},!1).track;tracks[variantLabel]=track}}}},activeTrack={AUDIO:function(type,settings){return function(){var tracks=settings.mediaTypes[type].tracks;for(var id in tracks)if(tracks[id].enabled)return tracks[id];return null}},SUBTITLES:function(type,settings){return function(){var tracks=settings.mediaTypes[type].tracks;for(var id in tracks)if("showing"===tracks[id].mode||"hidden"===tracks[id].mode)return tracks[id];return null}}},setupMediaGroups=function(settings){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(type){initialize[type](type,settings)});var mediaTypes=settings.mediaTypes,masterPlaylistLoader=settings.masterPlaylistLoader,tech=settings.tech,vhs=settings.vhs;["AUDIO","SUBTITLES"].forEach(function(type){mediaTypes[type].activeGroup=function(type,settings){return function(track){var masterPlaylistLoader=settings.masterPlaylistLoader,groups=settings.mediaTypes[type].groups,media=masterPlaylistLoader.media();if(!media)return null;var variants=null;return media.attributes[type]&&(variants=groups[media.attributes[type]]),variants=variants||groups.main,void 0===track?variants:null===track?null:variants.filter(function(props){return props.id===track.id})[0]||null}}(type,settings),mediaTypes[type].activeTrack=activeTrack[type](type,settings),mediaTypes[type].onGroupChanged=function(type,settings){return function(){var _settings$segmentLoad=settings.segmentLoaders,segmentLoader=_settings$segmentLoad[type],mainSegmentLoader=_settings$segmentLoad.main,mediaType=settings.mediaTypes[type],activeTrack=mediaType.activeTrack(),activeGroup=mediaType.activeGroup(activeTrack),previousActiveLoader=mediaType.activePlaylistLoader;stopLoaders(segmentLoader,mediaType),activeGroup&&(activeGroup.playlistLoader?(segmentLoader.resyncLoader(),startLoaders(activeGroup.playlistLoader,mediaType)):previousActiveLoader&&mainSegmentLoader.resetEverything())}}(type,settings),mediaTypes[type].onGroupChanging=function(type,settings){return function(){var segmentLoader=settings.segmentLoaders[type];segmentLoader.abort(),segmentLoader.pause()}}(type,settings),mediaTypes[type].onTrackChanged=function(type,settings){return function(){var _settings$segmentLoad2=settings.segmentLoaders,segmentLoader=_settings$segmentLoad2[type],mainSegmentLoader=_settings$segmentLoad2.main,mediaType=settings.mediaTypes[type],activeTrack=mediaType.activeTrack(),activeGroup=mediaType.activeGroup(activeTrack),previousActiveLoader=mediaType.activePlaylistLoader;if(stopLoaders(segmentLoader,mediaType),activeGroup){if("AUDIO"===type){if(!activeGroup.playlistLoader)return mainSegmentLoader.setAudio(!0),void mainSegmentLoader.resetEverything();segmentLoader.setAudio(!0),mainSegmentLoader.setAudio(!1)}previousActiveLoader!==activeGroup.playlistLoader?(segmentLoader.track&&segmentLoader.track(activeTrack),segmentLoader.resetEverything(),startLoaders(activeGroup.playlistLoader,mediaType)):startLoaders(activeGroup.playlistLoader,mediaType)}}}(type,settings)});var audioGroup=mediaTypes.AUDIO.activeGroup();if(audioGroup){var groupId=(audioGroup.filter(function(group){return group.default})[0]||audioGroup[0]).id;mediaTypes.AUDIO.tracks[groupId].enabled=!0,mediaTypes.AUDIO.onTrackChanged()}masterPlaylistLoader.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(type){return mediaTypes[type].onGroupChanged()})}),masterPlaylistLoader.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(type){return mediaTypes[type].onGroupChanging()})});var onAudioTrackChanged=function(){mediaTypes.AUDIO.onTrackChanged(),tech.trigger({type:"usage",name:"vhs-audio-change"}),tech.trigger({type:"usage",name:"hls-audio-change"})};for(var id in tech.audioTracks().addEventListener("change",onAudioTrackChanged),tech.remoteTextTracks().addEventListener("change",mediaTypes.SUBTITLES.onTrackChanged),vhs.on("dispose",function(){tech.audioTracks().removeEventListener("change",onAudioTrackChanged),tech.remoteTextTracks().removeEventListener("change",mediaTypes.SUBTITLES.onTrackChanged)}),tech.clearTracks("audio"),mediaTypes.AUDIO.tracks)tech.audioTracks().addTrack(mediaTypes.AUDIO.tracks[id])},createMediaTypes=function(){var mediaTypes={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(type){mediaTypes[type]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:noop,activeTrack:noop,onGroupChanged:noop,onTrackChanged:noop}}),mediaTypes},loaderStats=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],sumLoaderStat=function(stat){return this.audioSegmentLoader_[stat]+this.mainSegmentLoader_[stat]},MasterPlaylistController=function(_videojs$EventTarget){function MasterPlaylistController(options){var _this;_this=_videojs$EventTarget.call(this)||this;var src=options.src,handleManifestRedirects=options.handleManifestRedirects,withCredentials=options.withCredentials,tech=options.tech,bandwidth=options.bandwidth,externVhs=options.externVhs,useCueTags=options.useCueTags,blacklistDuration=options.blackl
vendor: 3,237 bytes, line 1
1istDuration,enableLowInitialPlaylist=options.enableLowInitialPlaylist,sourceType=options.sourceType,cacheEncryptionKeys=options.cacheEncryptionKeys,handlePartialData=options.handlePartialData;if(!src)throw new Error("A non-empty playlist URL or JSON manifest string is required");Vhs=externVhs,_this.withCredentials=withCredentials,_this.tech_=tech,_this.vhs_=tech.vhs,_this.sourceType_=sourceType,_this.useCueTags_=useCueTags,_this.blacklistDuration=blacklistDuration,_this.enableLowInitialPlaylist=enableLowInitialPlaylist,_this.useCueTags_&&(_this.cueTagsTrack_=_this.tech_.addTextTrack("metadata","ad-cues"),_this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),_this.requestOptions_={withCredentials:withCredentials,handleManifestRedirects:handleManifestRedirects,timeout:null},_this.on("error",_this.pauseLoading),_this.mediaTypes_=createMediaTypes(),_this.mediaSource=new window$1.MediaSource,_this.handleDurationChange_=_this.handleDurationChange_.bind(_assertThisInitialized(_this)),_this.handleSourceOpen_=_this.handleSourceOpen_.bind(_assertThisInitialized(_this)),_this.handleSourceEnded_=_this.handleSourceEnded_.bind(_assertThisInitialized(_this)),_this.mediaSource.addEventListener("durationchange",_this.handleDurationChange_),_this.mediaSource.addEventListener("sourceopen",_this.handleSourceOpen_),_this.mediaSource.addEventListener("sourceended",_this.handleSourceEnded_),_this.seekable_=videojs$1.createTimeRanges(),_this.hasPlayed_=!1,_this.syncController_=new SyncController(options),_this.segmentMetadataTrack_=tech.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,_this.decrypter_=new Decrypter,_this.sourceUpdater_=new SourceUpdater(_this.mediaSource),_this.inbandTextTracks_={},_this.timelineChangeController_=new TimelineChangeController;var segmentLoaderSettings={vhs:_this.vhs_,mediaSource:_this.mediaSource,currentTime:_this.tech_.currentTime.bind(_this.tech_),seekable:function(){return _this.seekable()},seeking:function(){return _this.tech_.seeking()},duration:function(){return _this.duration()},hasPlayed:function(){return _this.hasPlayed_},goalBufferLength:function(){return _this.goalBufferLength()},bandwidth:bandwidth,syncController:_this.syncController_,decrypter:_this.decrypter_,sourceType:_this.sourceType_,inbandTextTracks:_this.inbandTextTracks_,cacheEncryptionKeys:cacheEncryptionKeys,handlePartialData:handlePartialData,sourceUpdater:_this.sourceUpdater_,timelineChangeController:_this.timelineChangeController_};return _this.masterPlaylistLoader_="dash"===_this.sourceType_?new DashPlaylistLoader(src,_this.vhs_,_this.requestOptions_):new PlaylistLoader(src,_this.vhs_,_this.requestOptions_),_this.setupMasterPlaylistLoaderListeners_(),_this.mainSegmentLoader_=new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings,{segmentMetadataTrack:_this.segmentMetadataTrack_,loaderType:"main"}),options),_this.audioSegmentLoader_=new SegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings,{loaderType:"audio"}),options),_this.subtitleSegmentLoader_=new VTTSegmentLoader(videojs$1.mergeOptions(segmentLoaderSettings,{loaderType:"vtt",featuresNativeTextTracks:_this.tech_.featuresNativeTextTracks}),options),_this.setupSegmentLoaderListeners_(),loaderStats.forEac
1h(function(stat){_this[stat+"_"]=sumLoaderStat.bind(_assertThisInitialized(_this),stat)}),_this.logger_=logger("MPC"),_this.triggeredFmp4Usage=!1,_this.masterPlaylistLoader_.load(),_this}_inheritsLoose(MasterPlaylistController,_videojs$EventTarget);var _proto=MasterPlaylistController.prototype;return _proto.setupMasterPlaylistLoaderListeners_=function(){var _this2=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var media=_this2.masterPlaylistLoader_.media(),requestTimeout=1.5*media.targetDuration*1e3;isLowestEnabledRendition(_this2.masterPlaylistLoader_.master,_this2.masterPlaylistLoader_.media())?_this2.requestOptions_.timeout=0:_this2.requestOptions_.timeout=requestTimeout,media.endList&&"none"!==_this2.tech_.preload()&&(_this2.mainSegmentLoader_.playlist(media,_this2.requestOptions_),_this2.mainSegmentLoader_.load()),setupMediaGroups({sourceType:_this2.sourceType_,segmentLoaders:{AUDIO:_this2.audioSegmentLoader_,SUBTITLES:_this2.subtitleSegmentLoader_,main:_this2.mainSegmentLoader_},tech:_this2.tech_,requestOptions:_this2.requestOptions_,masterPlaylistLoader:_this2.masterPlaylistLoader_,vhs:_this2.vhs_,master:_this2.master(),mediaTypes:_this2.mediaTypes_,blacklistCurrentPlaylist:_this2.blacklistCurrentPlaylist.bind(_this2)}),_this2.triggerPresenceUsage_(_this2.master(),media),_this2.setupFirstPlay(),!_this2.mediaTypes_.AUDIO.activePlaylistLoader||_this2.mediaTypes_.AUDIO.activePlaylistLoader.media()?_this2.trigger("selectedinitialmedia"):_this2.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){_this2.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var updatedPlaylist=_this2.masterPlaylistLoader_.media();if(!updatedPlaylist){var selectedMedia;if(_this2.excludeUnsupportedVariants_(),_this2.enableLowInitialPlaylist&&(selectedMedia=_this2.selectInitialPlaylist()),selectedMedia||(selectedMedia=_this2.selectPlaylist()),_this2.initialMedia_=selectedMedia,_this2.masterPlaylistLoader_.media(_this2.initialMedia_),!("vhs-json"===_this2.sourceType_&&_this2.initialMedia_.segments))return;updatedPlaylist=_this2.initialMedia_}_this2.handleUpdatedMediaPlaylist(updatedPlaylist)}),this.masterPlaylistLoader_.on("error",function(){_this2.blacklistCurrentPlaylist(_this2.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){_this2.mainSegmentLoader_.abort(),_this2.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var media=_this2.masterPlaylistLoader_.media(),requestTimeout=1.5*media.targetDuration*1e3;isLowestEnabledRendition(_this2.masterPlaylistLoader_.master,_this2.masterPlaylistLoader_.media())?_this2.requestOptions_.timeout=0:_this2.requestOptions_.timeout=requestTimeout,_this2.mainSegmentLoader_.playlist(media,_this2.requestOptions_),_this2.mainSegmentLoader_.load(),_this2.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var updatedPlaylist=_this2.masterPlaylistLoader_.media();_this2.stuckAtPlaylistEnd_(updatedPlaylist)&&(_this2.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),_this2.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){_this2.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),_this2.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){_this2.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),_this2.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},_proto.handleUpdatedMediaPlaylist=function(updatedPlaylist){this.useCueTags_&&this.updateAdCues_(updatedPlaylist),this.mainSegmentLoader_.playlist(updatedPlaylist,this.requestOptions_),this.updateDuration(!updatedPlaylist.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},_proto.triggerPresenceUsage_=function(master,media){var mediaGroups=master.mediaGroups||{},defaultDemuxed=!0,audioGroupKeys=Object.keys(mediaGroups.AUDIO);for(var mediaGroup in mediaGroups.AUDIO)for(var label in mediaGroups.AUDIO[mediaGroup]){mediaGroups.AUDIO[mediaGroup][label].uri||(defaultDemuxed=!1)}defaultDemuxed&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(mediaGroups.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Vhs.Playlist.isAes(media)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),audioGroupKeys.length&&Object.keys(mediaGroups.AUDIO[audioGroupKeys[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},_proto.setupSegmentLoaderListeners_=function(){var _this3=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var nextPlaylist=_this3.selectPlaylist(),currentPlaylist=_this3.masterPlaylistLoader_.media(),buffered=_this3.tech_.buffered();(function(_ref){var currentPlaylist=_ref.currentPlaylist,nextPlaylist=_ref.nextPlaylist,forwardBuffer=_ref.forwardBuffer,bufferLowWaterLine=_ref.bufferLowWaterLine,duration=_ref.duration;_ref.log;return nextPlaylist?!currentPlaylist.endList||duration<Config.MAX_BUFFER_LOW_WATER_LINE||nextPlaylist.attributes.BANDWIDTH<currentPlaylist.attributes.BANDWIDTH||forwardBuffer>
1=bufferLowWaterLine:(videojs$1.log.warn("We received no playlist to switch to. Please check your stream."),!1)})({currentPlaylist:currentPlaylist,nextPlaylist:nextPlaylist,forwardBuffer:buffered.length?buffered.end(buffered.length-1)-_this3.tech_.currentTime():0,bufferLowWaterLine:_this3.bufferLowWaterLine(),duration:_this3.duration(),log:_this3.logger_})&&_this3.masterPlaylistLoader_.media(nextPlaylist),_this3.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){_this3.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){_this3.blacklistCurrentPlaylist(_this3.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){_this3.error=_this3.mainSegmentLoader_.error_,_this3.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){_this3.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){_this3.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),_this3.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){_this3.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){_this3.error=_this3.audioSegmentLoader_.error_,_this3.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){_this3.logger_("main segment loader ended"),_this3.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){_this3.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)});var updateCodecs=function(){if(!_this3.sourceUpdater_.ready())return _this3.tryToCreateSourceBuffers_();var codecs=_this3.getCodecsOrExclude_();codecs&&_this3.sourceUpdater_.addOrChangeSourceBuffers(codecs)};this.mainSegmentLoader_.on("trackinfo",updateCodecs),this.audioSegmentLoader_.on("trackinfo",updateCodecs),this.mainSegmentLoader_.on("fmp4",function(){_this3.triggeredFmp4Usage||(_this3.tech_.trigger({type:"usage",name:"vhs-fmp4"}),_this3.tech_.trigger({type:"usage",name:"hls-fmp4"}),_this3.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){_this3.triggeredFmp4Usage||(_this3.tech_.trigger({type:"usage",name:"vhs-fmp4"}),_this3.tech_.trigger({type:"usage",name:"hls-fmp4"}),_this3.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){_this3.logger_("audioSegmentLoader ended"),_this3.onEndOfStream()})},_proto.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},_proto.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},_proto.smoothQualityChange_=function(media){void 0===media&&(media=this.selectPlaylist()),media!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(media),this.mainSegmentLoader_.resetLoader())},_proto.fastQualityChange_=function(media){var _this4=this;void 0===media&&(media=this.selectPlaylist()),media!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(media),this.mainSegmentLoader_.resetEverything(function(){videojs$1.browser.IE_VERSION||videojs$1.browser.IS_EDGE?_this4.tech_.setCurrentTime(_this4.tech_.currentTime()+.04):_this4.tech_.setCurrentTime(_this4.tech_.currentTime())}))},_proto.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var seekable=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<seekable.start(0)?this.tech_.setCurrentTime(seekable.end(seekable.length-1)):void 0}},_proto.setupFirstPlay=function(){var _this5=this,media=this.masterPlaylistLoader_.media();if(!media||this.tech_.paused()||this.hasPlayed_)return!1;if(!media.endList){var seekable=this.seekable();if(!seekable.length)return!1;if(videojs$1.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){_this5.trigger("firstplay"),_this5.tech_.setCurrentTime(seekable.end(0)),_this5.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(seekable.end(0))}return this.hasPlayed_=!0,this.load(),!0},_proto.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var playProm
1ise=this.tech_.play();void 0!==playPromise&&"function"==typeof playPromise.then&&playPromise.then(null,function(e){})}this.trigger("sourceopen")},_proto.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var cues=this.inbandTextTracks_.metadataTrack_.cues;if(cues&&cues.length){var duration=this.duration();cues[cues.length-1].endTime=isNaN(duration)||Math.abs(duration)===1/0?Number.MAX_VALUE:duration}}},_proto.handleDurationChange_=function(){this.tech_.trigger("durationchange")},_proto.onEndOfStream=function(){var isEndOfStream=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(isEndOfStream=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?isEndOfStream&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),isEndOfStream&&this.sourceUpdater_.endOfStream()},_proto.stuckAtPlaylistEnd_=function(playlist){if(!this.seekable().length)return!1;var expired=this.syncController_.getExpiredTime(playlist,this.duration());if(null===expired)return!1;var absolutePlaylistEnd=Vhs.Playlist.playlistEnd(playlist,expired),currentTime=this.tech_.currentTime(),buffered=this.tech_.buffered();if(!buffered.length)return absolutePlaylistEnd-currentTime<=.1;var bufferedEnd=buffered.end(buffered.length-1);return bufferedEnd-currentTime<=.1&&absolutePlaylistEnd-bufferedEnd<=.1},_proto.blacklistCurrentPlaylist=function(error,blacklistDuration){void 0===error&&(error={});var currentPlaylist=error.playlist||this.masterPlaylistLoader_.media();if(blacklistDuration=blacklistDuration||error.blacklistDuration||this.blackl
vendor: 6,383 bytes, line 1
1istDuration,!currentPlaylist)return this.error=error,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var playlists=this.masterPlaylistLoader_.master.playlists,enabledPlaylists=playlists.filter(isEnabled),isFinalRendition=1===enabledPlaylists.length&&enabledPlaylists[0]===currentPlaylist;if(1===playlists.length&&blacklistDuration!==1/0)return videojs$1.log.warn("Problem encountered with playlist "+currentPlaylist.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(isFinalRendition);if(isFinalRendition){var reincluded=!1;playlists.forEach(function(playlist){if(playlist!==currentPlaylist){var excludeUntil=playlist.excludeUntil;void 0!==excludeUntil&&excludeUntil!==1/0&&(reincluded=!0,delete playlist.excludeUntil)}}),reincluded&&(videojs$1.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}currentPlaylist.excludeUntil=Date.now()+1e3*blacklistDuration,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var nextPlaylist=this.selectPlaylist();if(!nextPlaylist)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var logFn=error.internal?this.logger_:videojs$1.log.warn,errorMessage=error.message?" "+error.message:"";return logFn((error.internal?"Internal problem":"Problem")+" encountered with playlist "+currentPlaylist.id+"."+errorMessage+" Switching to playlist "+nextPlaylist.id+"."),nextPlaylist.attributes.AUDIO!==currentPlaylist.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),nextPlaylist.attributes.SUBTITLES!==currentPlaylist.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]),this.masterPlaylistLoader_.media(nextPlaylist,isFinalRendition)},_proto.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"])},_proto.delegateLoaders_=function(filter,fnNames){var _this6=this,loaders=[],dontFilterPlaylist="all"===filter;(dontFilterPlaylist||"main"===filter)&&loaders.push(this.masterPlaylistLoader_);var mediaTypes=[];(dontFilterPlaylist||"audio"===filter)&&mediaTypes.push("AUDIO"),(dontFilterPlaylist||"subtitle"===filter)&&(mediaTypes.push("CLOSED-CAPTIONS"),mediaTypes.push("SUBTITLES")),mediaTypes.forEach(function(mediaType){var loader=_this6.mediaTypes_[mediaType]&&_this6.mediaTypes_[mediaType].activePlaylistLoader;loader&&loaders.push(loader)}),["main","audio","subtitle"].forEach(function(name){var loader=_this6[name+"SegmentLoader_"];!loader||filter!==name&&"all"!==filter||loaders.push(loader)}),loaders.forEach(function(loader){return fnNames.forEach(function(fnName){"function"==typeof loader[fnName]&&loader[fnName]()})})},_proto.setCurrentTime=function(currentTime){var buffered=findRange(this.tech_.buffered(),currentTime);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?buffered&&buffered.length?currentTime:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},_proto.duration=function(){if(!this.masterPlaylistLoader_)return 0;var media=this.masterPlaylistLoader_.media();return media?media.endList?this.mediaSource?this.mediaSource.duration:Vhs.Playlist.duration(media):1/0:0},_proto.seekable=function(){return this.seekable_},_proto.onSyncInfoUpdate_=function(){var audioSeekable;if(this.masterPlaylistLoader_){var media=this.masterPlaylistLoader_.media();if(media){var expired=this.syncController_.getExpiredTime(media,this.duration());if(null!==expired){var suggestedPresentationDelay=this.masterPlaylistLoader_.master.suggestedPresentationDelay,mainSeekable=Vhs.Playlist.seekable(media,expired,suggestedPresentationDelay);if(0!==mainSeekable.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(media=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(expired=this.syncController_.getExpiredTime(media,this.duration())))return;if(0===(audioSeekable=Vhs.Playlist.seekable(media,expired,suggestedPresentationDelay)).length)return}var oldEnd,oldStart;this.seekable_&&this.seekable_.length&&(oldEnd=this.seekable_.end(0),oldStart=this.seekable_.start(0)),audioSeekable?audioSeekable.start(0)>mainSeekable.end(0)||mainSeekable.start(0)>audioSeekable.end(0)?this.seekable_=mainSeekable:this.seekable_=videojs$1.createTimeRanges([[audioSeekable.start(0)>mainSeekable.start(0)?audioSeekable.start(0):mainSeekable.start(0),audioSeekable.end(0)<mainSeekable.end(0)?audioSeekable.end(0):mainSeekable.end(0)]]):this.seekable_=mainSeekable,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===oldEnd&&this.seekable_.start(0)===oldStart||(this.logger_("seekable updated ["+printableRange(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},_proto.updateDuration=function(isLive){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,isLive),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(isLive){var seekable=this.seekable();if(!seekable.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<seekable.end(seekable.length-1))&&this.sourceUpdater_.setDuration(seekable.end(seekable.length-1))}else{var buffered=this.tech_.buffered(),duration=Vhs.Playlist.duration(this.masterPlaylistLoader_.media());buffered.length>0&&(duration=Math.max(duration,buffered.end(buffered.length-1))),this.mediaSource.duration!==duration&&this.sourceUpdater_.setDuration(duration)}},_proto.dispose=function(){var _this7=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(type){var groups=_this7.mediaTypes_[type].groups;
1for(var id in groups)groups[id].forEach(function(group){group.playlistLoader&&group.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},_proto.master=function(){return this.masterPlaylistLoader_.master},_proto.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},_proto.areMediaTypesKnown_=function(){var usingAudioLoader=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||usingAudioLoader&&!this.audioSegmentLoader_.currentMediaInfo_)},_proto.getCodecsOrExclude_=function(){var _this8=this,media={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};media.video=media.main;var playlistCodecs=codecsForPlaylist(this.master(),this.media()),codecs={},usingAudioLoader=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(media.main.hasVideo&&(codecs.video=playlistCodecs.video||media.main.videoCodec||codecs_js.DEFAULT_VIDEO_CODEC),media.main.isMuxed&&(codecs.video+=","+(playlistCodecs.audio||media.main.audioCodec||codecs_js.DEFAULT_AUDIO_CODEC)),(media.main.hasAudio&&!media.main.isMuxed||media.audio.hasAudio||usingAudioLoader)&&(codecs.audio=playlistCodecs.audio||media.main.audioCodec||media.audio.audioCodec||codecs_js.DEFAULT_AUDIO_CODEC,media.audio.isFmp4=media.main.hasAudio&&!media.main.isMuxed?media.main.isFmp4:media.audio.isFmp4),codecs.audio||codecs.video){var unsupportedAudio,unsupportedCodecs={};if(["video","audio"].forEach(function(type){if(codecs.hasOwnProperty(type)&&(isFmp4=media[type].isFmp4,codec=codecs[type],!(isFmp4?codecs_js.browserSupportsCodec(codec):codecs_js.muxerSupportsCodec(codec)))){var supporter=media[type].isFmp4?"browser":"muxer";unsupportedCodecs[supporter]=unsupportedCodecs[supporter]||[],unsupportedCodecs[supporter].push(codecs[type]),"audio"===type&&(unsupportedAudio=supporter)}var isFmp4,codec}),usingAudioLoader&&unsupportedAudio&&this.media().attributes.AUDIO){var audioGroup=this.media().attributes.AUDIO;
1this.master().playlists.forEach(function(variant){(variant.attributes&&variant.attributes.AUDIO)===audioGroup&&variant!==_this8.media()&&(variant.excludeUntil=1/0)}),this.logger_("excluding audio group "+audioGroup+" as "+unsupportedAudio+' does not support codec(s): "'+codecs.audio+'"')}if(!Object.keys(unsupportedCodecs).length){if(this.sourceUpdater_.ready()&&!this.sourceUpdater_.canChangeType()){var switchMessages=[];if(["video","audio"].forEach(function(type){var newCodec=(codecs_js.parseCodecs(_this8.sourceUpdater_.codecs[type]||"")[type]||{}).type,oldCodec=(codecs_js.parseCodecs(codecs[type]||"")[type]||{}).type;newCodec&&oldCodec&&newCodec.toLowerCase()!==oldCodec.toLowerCase()&&switchMessages.push('"'+_this8.sourceUpdater_.codecs[type]+'" -> "'+codecs[type]+'"')}),switchMessages.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+switchMessages.join(", ")+".",blacklistDuration:1/0,internal:!0})}return codecs}var message=Object.keys(unsupportedCodecs).reduce(function(acc,supporter){return acc&&(acc+=", "),acc+=supporter+' does not support codec(s): "'+unsupportedCodecs[supporter].join(",")+'"'},"")+".";
1this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:message,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},_proto.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.ready()&&this.areMediaTypesKnown_()){var codecs=this.getCodecsOrExclude_();if(codecs){this.sourceUpdater_.createSourceBuffers(codecs);var codecString=[codecs.video,codecs.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(codecString)}}},_proto.excludeUnsupportedVariants_=function(){var _this9=this;this.master().playlists.forEach(function(variant){var codecs=codecsForPlaylist(_this9.master,variant);!codecs.audio||codecs_js.muxerSupportsCodec(codecs.audio)||codecs_js.browserSupportsCodec(codecs.audio)||(variant.excludeUntil=1/0),!codecs.video||codecs_js.muxerSupportsCodec(codecs.video)||codecs_js.browserSupportsCodec(codecs.video)||(variant.excludeUntil=1/0)})},_proto.excludeIncompatibleVariants_=function(codecString){var _this10=this,codecs=codecs_js.parseCodecs(codecString),codecCount=Object.keys(codecs).length;
1this.master().playlists.forEach(function(variant){if(variant.excludeUntil!==1/0){var variantCodecs={},variantCodecCount=2,blacklistReasons=[],variantCodecStrings=codecsForPlaylist(_this10.masterPlaylistLoader_.master,variant);if(variantCodecStrings.audio||variantCodecStrings.video){var variantCodecString=[variantCodecStrings.video,variantCodecStrings.audio].filter(Boolean).join(",");variantCodecs=codecs_js.parseCodecs(variantCodecString),variantCodecCount=Object.keys(variantCodecs).length}variantCodecCount!==codecCount&&(blacklistReasons.push('codec count "'+variantCodecCount+'" !== "'+codecCount+'"'),variant.excludeUntil=1/0),_this10.sourceUpdater_.canChangeType()||(variantCodecs.video&&codecs.video&&variantCodecs.video.type.toLowerCase()!==codecs.video.type.toLowerCase()&&(blacklistReasons.push('video codec "'+variantCodecs.video.type+'" !== "'+codecs.video.type+'"'),variant.excludeUntil=1/0),variantCodecs.audio&&codecs.audio&&variantCodecs.audio.type.toLowerCase()!==codecs.audio.type.toLowerCase()&&(variant.excludeUntil=1/0,blacklistReasons.push('audio codec "'+variantCodecs.audio.type+'" !== "'+codecs.audio.type+'"'))),blacklistReasons.length&&_this10.logger_("blacklisting "+variant.id+": "+blacklistReasons.join(" && "))}})},_proto.updateAdCues_=function(media){var offset=0,seekable=this.seekable();seekable.length&&(offset=seekable.start(0)),function(media,track,offset){if(void 0===offset&&(offset=0),media.segments)for(var cue,mediaTime=offset,i=0;i<media.segments.length;i++){var segment=media.segments[i];if(cue||(cue=findAdCue(track,mediaTime+segment.duration/2)),cue){if("cueIn"in segment){cue.endTime=mediaTime,cue.adEndTime=mediaTime,mediaTime+=segment.duration,cue=null;continue}if(mediaTime<cue.endTime){mediaTime+=segment.duration;continue}cue.endTime+=segment.duration}else if("cueOut"in segment&&((cue=new window$1.VTTCue(mediaTime,mediaTime+segment.duration,segment.cueOut)).adStartTime=mediaTime,cue.adEndTime=mediaTime+parseFloat(segment.cueOut),track.addCue(cue)),"cueOutCont"in segment){var _segment$cueOutCont$s=segment.cueOutCont.split("/").map(parseFloat),adOffset=_segment$cueOutCont$s[0],adTotal=_segment$cueOutCont$s[1];(cue=new window$1.VTTCue(mediaTime,mediaTime+segment.duration,"")).adStartTime=mediaTime-adOffset,cue.adEndTime=cue.adStartTime+adTotal,track.addCue(cue)}mediaTime+=segment.duration}}(media,this.cueTagsTrack_,offset)},_proto.goalBufferLength=function(){var currentTime=this.tech_.currentTime(),initial=Config.GOAL_BUFFER_LENGTH,rate=Config.GOAL_BUFFER_LENGTH_RATE,max=Math.max(initial,Config.MAX_GOAL_BUFFER_LENGTH);return Math.min(initial+currentTime*rate,max)},_proto.bufferLowWaterLine=function(){var currentTime=this.tech_.currentTime(),initial=Config.BUFFER_LOW_WATER_LINE,rate=Config.BUFFER_LOW_WATER_LINE_RATE,max=Math.max(initial,Config.MAX_BUFFER_LOW_WATER_LINE);return Math.min(initial+currentTime*rate,max)},MasterPlaylistController}(videojs$1.EventTarget),Representation=function(vhsHandler,playlist,id){var loader,playlistID,changePlaylistFn,mpc=vhsHandler.masterPlaylistController_,qualityChangeFunction=mpc[(vhsHandler.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(mpc);if(playlist.attributes.RESOLUTION){var resolution=playlist.attributes.RESOLUTION;this.width=resolution.width,this.height=resolution.height}this.bandwidth=playlist.attributes.BANDWIDTH,this.codecs=codecsForPlaylist(mpc.master(),playlist),this.playlist=playlist,this.id=id,this.enabled=(loader=vhsHandler.playlists,playlistID=playlist.id,changePlaylistFn=qualityChangeFunction,function(enable){var playlist=loader.master.playlists[playlistID],incompatible=isIncompatible(playlist),currentlyEnabled=isEnabled(playlist);return void 0===enable?currentlyEnabled:(enable?delete playlist.disabled:playlist.disabled=!0,enable===currentlyEnabled||incompatible||(changePlaylistFn(),enable?loader.trigger("renditionenabled"):loader.trigger("renditiondisabled")),enable)})},timerCancelEvents=["seeking","seeked","pause","playing","error"],PlaybackWatcher=function(){function PlaybackWatcher(options){var _this=this;this.masterPlaylistController_=options.masterPlaylistController,this.tech_=options.tech,this.seekable=options.seekable,this.allowSeeksWithinUnsafeLiveWindow=options.allowSeeksWithinUnsafeLiveWindow,this.media=options.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=logger("PlaybackWatcher"),this.logger_("initialize");var canPlayHandler=function(){return _this.monitorCurrentTime_()},waitingHandler=function(){return _this.techWaiting_()},cancelTimerHandler=function(){return _this.cancelTimer_()},fixesBadSeeksHandler=function(){return _this.fixesBadSeeks_()},mpc=this.masterPlaylistController_,loaderTypes=["main","subtitle","audio"],loaderChecks={};
vendor: 10,993 bytes, line 1
1loaderTypes.forEach(function(type){loaderChecks[type]={reset:function(){return _this.resetSegmentDownloads_(type)},updateend:function(){return _this.checkSegmentDownloads_(type)}},mpc[type+"SegmentLoader_"].on("appendsdone",loaderChecks[type].updateend),mpc[type+"SegmentLoader_"].on("playlistupdate",loaderChecks[type].reset),_this.tech_.on(["seeked","seeking"],loaderChecks[type].reset)}),this.tech_.on("seekablechanged",fixesBadSeeksHandler),this.tech_.on("waiting",waitingHandler),this.tech_.on(timerCancelEvents,cancelTimerHandler),this.tech_.on("canplay",canPlayHandler),this.dispose=function(){_this.logger_("dispose"),_this.tech_.off("seekablechanged",fixesBadSeeksHandler),_this.tech_.off("waiting",waitingHandler),_this.tech_.off(timerCancelEvents,cancelTimerHandler),_this.tech_.off("canplay",canPlayHandler),loaderTypes.forEach(function(type){mpc[type+"SegmentLoader_"].off("appendsdone",loaderChecks[type].updateend),mpc[type+"SegmentLoader_"].off("playlistupdate",loaderChecks[type].reset),_this.tech_.off(["seeked","seeking"],loaderChecks[type].reset)}),_this.checkCurrentTimeTimeout_&&window$1.clearTimeout(_this.checkCurrentTimeTimeout_),_this.cancelTimer_()}}var _proto=PlaybackWatcher.prototype;return _proto.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&window$1.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=window$1.setTimeout(this.monitorCurrentTime_.bind(this),250)},_proto.resetSegmentDownloads_=function(type){var loader=this.masterPlaylistController_[type+"SegmentLoader_"];this[type+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+type+" loader"),this[type+"StalledDownloads_"]=0,this[type+"Buffered_"]=loader.buffered_()},_proto.checkSegmentDownloads_=function(type){var mpc=this.masterPlaylistController_,loader=mpc[type+"SegmentLoader_"],buffered=loader.buffered_(),isBufferedDifferent=function(a,b){if(a===b)return!1;if(!a&&b||!b&&a)return!0;if(a.length!==b.length)return!0;for(var i=0;i<a.length;i++)if(a.start(i)!==b.start(i)||a.end(i)!==b.end(i))return!0;return!1}(this[type+"Buffered_"],buffered);this[type+"Buffered_"]=buffered,isBufferedDifferent?this.resetSegmentDownloads_(type):(this[type+"StalledDownloads_"]++,this.logger_("found #"+this[type+"StalledDownloads_"]+" "+type+" appends that did not increase buffer (possible stalled download)",{playlistId:loader.playlist_&&loader.playlist_.id,buffered:timeRangesToArray(buffered)}),this[type+"StalledDownloads_"]<10||(this.logger_(type+" loader stalled download exclusion"),this.resetSegmentDownloads_(type),this.tech_.trigger({type:"usage",name:"vhs-"+type+"-download-exclusion"}),"subtitle"!==type&&mpc.blacklistCurrentPlaylist({message:"Excessive "+type+" segment downloading detected."},1/0)))},_proto.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var currentTime=this.tech_.currentTime(),buffered=this.tech_.buffered();if(this.lastRecordedTime===currentTime&&(!buffered.length||currentTime+.1>=buffered.end(buffered.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&¤tTime===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):currentTime===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=currentTime)}},_proto.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},_proto.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var seekTo,seekable=this.seekable(),currentTime=this.tech_.currentTime();this.afterSeekableWindow_(seekable,currentTime,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(seekTo=seekable.end(seekable.length-1));if(this.beforeSeekableWindow_(seekable,currentTime)){var seekableStart=seekable.start(0);seekTo=seekableStart+(seekableStart===seekable.end(0)?0:.1)}if(void 0!==seekTo)return this.logger_("Trying to seek outside of seekable at time "+currentTime+" with seekable range "+printableRange(seekable)+". Seeking to "+seekTo+"."),this.tech_.setCurrentTime(seekTo),!0;var buffered=this.tech_.buffered();return!!function(_ref){var buffered=_ref.buffered,targetDuration=_ref.targetDuration,currentTime=_ref.currentTime;return!(!buffered.length||buffered.end(0)-buffered.start(0)<2*targetDuration||currentTime>buffered.start(0)||!(buffered.start(0)-currentTime<targetDuration))}({buffered:buffered,targetDuration:this.media().targetDuration,currentTime:currentTime})&&(seekTo=buffered.start(0)+.1,this.logger_("Buffered region starts ("+buffered.start(0)+") just beyond seek point ("+currentTime+"). Seeking to "+seekTo+"."),this.tech_.setCurrentTime(seekTo),!0)},_proto.waiting_=function(){if(!this.techWaiting_()){var currentTime=this.tech_.currentTime(),buffered=this.tech_.buffered(),currentRange=findRange(buffered,currentTime);return currentRange.length&¤tTime+3<=currentRange.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(currentTime),this.logger_("Stopped at "+currentTime+" while inside a buffered region ["+currentRange.start(0)+" -> "+currentRange.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},_proto.techWaiting_=function(){var seekable=this.seekable(),currentTime=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(seekable,currentTime)){var livePoint=seekable.end(seekable.length-1);return this.logger_("Fell out of live window at time "+currentTime+". Seeking to live point (seekable end) "+livePoint),this.cancelTimer_(),this.tech_.setCurrentTime(livePoint),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var sourceUpdater=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,buffered=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:sourceUpdater.audioBuffered(),videoBuffered:sourceUpdater.videoBuffered(),currentTime:currentTime}))return this.cancelTimer_(),this.tech_.setCurrentTime(currentTime),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var nextRange=findNextRange(buffered,currentTime);if(nextRange.length>0){var difference=nextRange.start(0)-currentTime;return this.logger_("Stopped at "+currentTime+", setting timer for "+difference+", seeking to "+nextRange.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*difference,currentTime),!0}return!1},_proto.afterSeekableWindow_=function(seekable,currentTime,playlist,allowSeeksWithinUnsafeLiveWindow){if(void 0===allowSeeksWithinUnsafeLiveWindow&&(allowSeeksWithinUnsafeLiveWindow=!1),!seekable.length)return!1;var allowedEnd=seekable.end(seekable.length-1)+.1;return!playlist.endList&&allowSeeksWithinUnsafeLiveWindow&&(allowedEnd=seekable.end(seekable.length-1)+3*playlist.targetDuration),currentTime>allowedEnd},_proto.beforeSeekableWindow_=function(seekable,currentTime){return!!(seekable.length&&seekable.start(0)>0&¤tTime<seekable.start(0)-.1)},_proto.videoUnderflow_=function(_ref2){var videoBuffered=_ref2.videoBuffered,audioBuffered=_ref2.audioBuffered,currentTime=_ref2.currentTime;if(videoBuffered){var gap;if(videoBuffered.length&&audioBuffered.length){var lastVideoRange=findRange(videoBuffered,currentTime-3),videoRange=findRange(videoBuffered,currentTime),audioRange=findRange(audioBuffered,currentTime);audioRange.length&&!videoRange.length&&lastVideoRange.length&&(gap={start:lastVideoRange.end(0),end:audioRange.end(0)})}else{findNextRange(videoBuffered,currentTime).length||(gap=this.gapFromVideoUnderflow_(videoBuffered,currentTime))}return!!gap&&(this.logger_("Encountered a gap in video from "+gap.start+" to "+gap.end+". Seeking to current time "+currentTime),!0)}},_proto.skipTheGap_=function(scheduledCurrentTime){var buffered=this.tech_.buffered(),currentTime=this.tech_.currentTime(),nextRange=findNextRange(buffered,currentTime);this.cancelTimer_(),0!==nextRange.length&¤tTime===scheduledCurrentTime&&(this.logger_("skipTheGap_:","currentTime:",currentTime,"scheduled currentTime:",scheduledCurrentTime,"nextRange start:",nextRange.start(0)),this.tech_.setCurrentTime(nextRange.start(0)+1/30),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},_proto.gapFromVideoUnderflow_=function(buffered,currentTime){for(var gaps=function(buffered){if(buffered.length<2)return videojs$1.createTimeRanges();for(var ranges=[],i=1;i<buffered.length;i++){var start=buffered.end(i-1),end=buffered.start(i);ranges.push([start,end])}return videojs$1.createTimeRanges(ranges)}(buffered),i=0;i<gaps.length;i++){var start=gaps.start(i),end=gaps.end(i);if(currentTime-start<4&¤tTime-start>2)return{start:start,end:end}}return null},PlaybackWatcher}(),defaultOptions={errorInterval:30,getSource:function(next){return next(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},reloadSourceOnError=function(options){!function initPlugin(player,options){var lastCalled=0,seekTo=0,localOptions=videojs$1.mergeOptions(defaultOptions,options);player.ready(function(){player.trigger({type:"usage",name:"vhs-error-reload-initialized"}),player.trigger({type:"usage",name:"hls-error-reload-initialized"})});var loadedMetadataHandler=function(){seekTo&&player.currentTime(seekTo)},setSource=function(sourceObj){null!=sourceObj&&(seekTo=player.duration()!==1/0&&player.currentTime()||0,player.one("loadedmetadata",loadedMetadataHandler),player.src(sourceObj),player.trigger({type:"usage",name:"vhs-error-reload"}),player.trigger({type:"usage",name:"hls-error-reload"}),player.play())},errorHandler=function(){return Date.now()-lastCalled<1e3*localOptions.errorInterval?(player.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void player.trigger({type:"usage",name:"hls-error-reload-canceled"})):localOptions.getSource&&"function"==typeof localOptions.getSource?(lastCalled=Date.now(),localOptions.getSource.call(player,setSource)):void videojs$1.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},cleanupEvents=function cleanupEvents(){player.off("loadedmetadata",loadedMetadataHandler),player.off("error",errorHandler),player.off("dispose",cleanupEvents)};player.on("error",errorHandler),player.on("dispose",cleanupEvents),player.reloadSourceOnError=function(newOptions){cleanupEvents(),initPlugin(player,newOptions)}}(this,options)},Vhs$1={PlaylistLoader:PlaylistLoader,Playlist:Playlist,utils:utils,STANDARD_PLAYLIST_SELECTOR:function(){var pixelRatio=this.useDevicePixelRatio&&window$1.devicePixelRatio||1;
1return function(master,playerBandwidth,playerWidth,playerHeight,limitRenditionByPlayerDimensions){var options={bandwidth:playerBandwidth,width:playerWidth,height:playerHeight,limitRenditionByPlayerDimensions:limitRenditionByPlayerDimensions},sortedPlaylistReps=master.playlists.map(function(playlist){var width=playlist.attributes.RESOLUTION&&playlist.attributes.RESOLUTION.width,height=playlist.attributes.RESOLUTION&&playlist.attributes.RESOLUTION.height;return{bandwidth:playlist.attributes.BANDWIDTH||window$1.Number.MAX_VALUE,width:width,height:height,playlist:playlist}});stableSort(sortedPlaylistReps,function(left,right){return left.bandwidth-right.bandwidth});var enabledPlaylistReps=(sortedPlaylistReps=sortedPlaylistReps.filter(function(rep){return!Playlist.isIncompatible(rep.playlist)})).filter(function(rep){return Playlist.isEnabled(rep.playlist)});enabledPlaylistReps.length||(enabledPlaylistReps=sortedPlaylistReps.filter(function(rep){return!Playlist.isDisabled(rep.playlist)}));var bandwidthPlaylistReps=enabledPlaylistReps.filter(function(rep){return rep.bandwidth*Config.BANDWIDTH_VARIANCE<playerBandwidth}),highestRemainingBandwidthRep=bandwidthPlaylistReps[bandwidthPlaylistReps.length-1],bandwidthBestRep=bandwidthPlaylistReps.filter(function(rep){return rep.bandwidth===highestRemainingBandwidthRep.bandwidth})[0];if(!1===limitRenditionByPlayerDimensions){var _chosenRep=bandwidthBestRep||enabledPlaylistReps[0]||sortedPlaylistReps[0];if(_chosenRep&&_chosenRep.playlist){var type="sortedPlaylistReps";return bandwidthBestRep&&(type="bandwidthBestRep"),enabledPlaylistReps[0]&&(type="enabledPlaylistReps"),logFn("choosing "+representationToString(_chosenRep)+" using "+type+" with options",options),_chosenRep.playlist}return logFn("could not choose a playlist with options",options),null}var haveResolution=bandwidthPlaylistReps.filter(function(rep){return rep.width&&rep.height});stableSort(haveResolution,function(left,right){return left.width-right.width});var resolutionBestRepList=haveResolution.filter(function(rep){return rep.width===playerWidth&&rep.height===playerHeight});highestRemainingBandwidthRep=resolutionBestRepList[resolutionBestRepList.length-1];var resolutionPlusOneList,resolutionPlusOneSmallest,resolutionPlusOneRep,resolutionBestRep=resolutionBestRepList.filter(function(rep){return rep.bandwidth===highestRemainingBandwidthRep.bandwidth})[0];resolutionBestRep||(resolutionPlusOneSmallest=(resolutionPlusOneList=haveResolution.filter(function(rep){return rep.width>playerWidth||rep.height>playerHeight})).filter(function(rep){return rep.width===resolutionPlusOneList[0].width&&rep.height===resolutionPlusOneList[0].height}),highestRemainingBandwidthRep=resolutionPlusOneSmallest[resolutionPlusOneSmallest.length-1],resolutionPlusOneRep=resolutionPlusOneSmallest.filter(function(rep){return rep.bandwidth===highestRemainingBandwidthRep.bandwidth})[0]);var chosenRep=resolutionPlusOneRep||resolutionBestRep||bandwidthBestRep||enabledPlaylistReps[0]||sortedPlaylistReps[0];
1if(chosenRep&&chosenRep.playlist){var _type="sortedPlaylistReps";return resolutionPlusOneRep?_type="resolutionPlusOneRep":resolutionBestRep?_type="resolutionBestRep":bandwidthBestRep?_type="bandwidthBestRep":enabledPlaylistReps[0]&&(_type="enabledPlaylistReps"),logFn("choosing "+representationToString(chosenRep)+" using "+_type+" with options",options),chosenRep.playlist}return logFn("could not choose a playlist with options",options),null}(this.playlists.master,this.systemBandwidth,parseInt(safeGetComputedStyle(this.tech_.el(),"width"),10)*pixelRatio,parseInt(safeGetComputedStyle(this.tech_.el(),"height"),10)*pixelRatio,this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var _this=this,playlists=this.playlists.master.playlists.filter(Playlist.isEnabled);return stableSort(playlists,function(a,b){return comparePlaylistBandwidth(a,b)}),playlists.filter(function(playlist){return!!codecsForPlaylist(_this.playlists.master,playlist).video})[0]||null},comparePlaylistBandwidth:comparePlaylistBandwidth,comparePlaylistResolution:function(left,right){var leftWidth,rightWidth;return left.attributes.RESOLUTION&&left.attributes.RESOLUTION.width&&(leftWidth=left.attributes.RESOLUTION.width),leftWidth=leftWidth||window$1.Number.MAX_VALUE,right.attributes.RESOLUTION&&right.attributes.RESOLUTION.width&&(rightWidth=right.attributes.RESOLUTION.width),leftWidth===(rightWidth=rightWidth||window$1.Number.MAX_VALUE)&&left.attributes.BANDWIDTH&&right.attributes.BANDWIDTH?left.attributes.BANDWIDTH-right.attributes.BANDWIDTH:leftWidth-rightWidth},xhr:xhrFactory()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","BACK_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(prop){Object.defineProperty(Vhs$1,prop,{get:function(){return videojs$1.log.warn("using Vhs."+prop+" is UNSAFE be sure you know what you are doing"),Config[prop]},set:function(value){videojs$1.log.warn("using Vhs."+prop+" is UNSAFE be sure you know what you are doing"),"number"!=typeof value||value<0?videojs$1.log.warn("value of Vhs."+prop+" must be greater than or equal to 0"):Config[prop]=value}})});var handleVhsMediaChange=function(qualityLevels,playlistLoader){for(var newPlaylist=playlistLoader.media(),selectedIndex=-1,i=0;i<qualityLevels.length;i++)if(qualityLevels[i].id===newPlaylist.id){selectedIndex=i;break}qualityLevels.selectedIndex_=selectedIndex,qualityLevels.trigger({selectedIndex:selectedIndex,type:"change"})};Vhs$1.canPlaySource=function(){return videojs$1.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var setupEmeOptions=function(_ref){var player=_ref.player,sourceKeySystems=_ref.sourceKeySystems,media=_ref.media,audioMedia=_ref.audioMedia,mainPlaylists=_ref.mainPlaylists,sourceOptions=function(keySystemOptions,videoPlaylist,audioPlaylist){if(!keySystemOptions)return keySystemOptions;var codecs={video:videoPlaylist&&videoPlaylist.attributes&&videoPlaylist.attributes.CODECS,audio:audioPlaylist&&audioPlaylist.attributes&&audioPlaylist.attributes.CODECS};!codecs.audio&&codecs.video&&codecs.video.split(",").length>1&&codecs.video.split(",").forEach(function(codec){codec=codec.trim(),codecs_js.isAudioCodec(codec)?codecs.audio=codec:codecs_js.isVideoCodec(codec)&&(codecs.video=codec)});var videoContentType=codecs.video?'video/mp4;codecs="'+codecs.video+'"':null,audioContentType=codecs.audio?'audio/mp4;codecs="'+codecs.audio+'"':null,keySystemContentTypes={};for(var keySystem in keySystemOptions)keySystemContentTypes[keySystem]={audioContentType:audioContentType,videoContentType:videoContentType},videoPlaylist.contentProtection&&videoPlaylist.contentProtection[keySystem]&&videoPlaylist.contentProtection[keySystem].pssh&&(keySystemContentTypes[keySystem].pssh=videoPlaylist.contentProtection[keySystem].pssh),"string"==typeof keySystemOptions[keySystem]&&(keySystemContentTypes[keySystem].url=keySystemOptions[keySystem]);return videojs$1.mergeOptions(keySystemOptions,keySystemContentTypes)}(sourceKeySystems,media,audioMedia);sourceOptions&&(player.currentSource().keySystems=sourceOptions,!sourceOptions||player.eme?11!==videojs$1.browser.IE_VERSION&&player.eme.initializeMediaKeys&&function(playlists,keySystems){return playlists.reduce(function(keySystemsArr,playlist){if(!playlist.contentProtection)return keySystemsArr;var keySystemsOptions=keySystems.reduce(function(keySystemsObj,keySystem){var keySystemOptions=playlist.contentProtection[keySystem];return keySystemOptions&&keySystemOptions.pssh&&(keySystemsObj[keySystem]={pssh:keySystemOptions.pssh}),keySystemsObj},{});return Object.keys(keySystemsOptions).length&&keySystemsArr.push(keySystemsOptions),keySystemsArr},[])}
1(audioMedia?mainPlaylists.concat([audioMedia]):mainPlaylists,Object.keys(sourceKeySystems)).forEach(function(keySystemsOptions){player.eme.initializeMediaKeys({keySystems:keySystemsOptions})}):videojs$1.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"))},getVhsLocalStorage=function(){if(!window$1.localStorage)return null;var storedObject=window$1.localStorage.getItem("videojs-vhs");if(!storedObject)return null;try{return JSON.parse(storedObject)}catch(e){return null}};Vhs$1.supportsNativeHls=function(){if(!document||!document.createElement)return!1;var video=document.createElement("video");if(!videojs$1.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(canItPlay){return/maybe|probably/i.test(video.canPlayType(canItPlay))})}(),Vhs$1.supportsNativeDash=!!(document&&document.createElement&&videojs$1.getTech("Html5").isSupported())&&/maybe|probably/i.test(document.createElement("video").canPlayType("application/dash+xml")),Vhs$1.supportsTypeNatively=function(type){return"hls"===type?Vhs$1.supportsNativeHls:"dash"===type&&Vhs$1.supportsNativeDash},Vhs$1.isSupported=function(){return videojs$1.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var VhsHandler=function(_Component){function VhsHandler(source,tech,options){var _this;if(_this=_Component.call(this,tech,videojs$1.mergeOptions(options.hls,options.vhs))||this,options.hls&&Object.keys(options.hls).length&&videojs$1.log.warn("Using hls options is deprecated. Use vhs instead."),tech.options_&&tech.options_.playerId){var _player=videojs$1(tech.options_.playerId);_player.hasOwnProperty("hls")||Object.defineProperty(_player,"hls",{get:function(){return videojs$1.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),tech.trigger({type:"usage",name:"hls-player-access"}),_assertThisInitialized(_this)},configurable:!0}),_player.hasOwnProperty("vhs")||Object.defineProperty(_player,"vhs",{get:function(){return videojs$1.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),tech.trigger({type:"usage",name:"vhs-player-access"}),_assertThisInitialized(_this)},configurable:!0}),_player.hasOwnProperty("dash")||Object.defineProperty(_player,"dash",{get:function(){return videojs$1.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),_assertThisInitialized(_this)},configurable:!0}),_this.player_=_player}if(_this.tech_=tech,_this.source_=source,_this.stats={},_this.ignoreNextSeekingEvent_=!1,_this.setOptions_(),_this.options_.overrideNative&&tech.overrideNativeAudioTracks&&tech.overrideNativeVideoTracks)tech.overrideNativeAudioTracks(!0),tech.overrideNativeVideoTracks(!0);else if(_this.options_.overrideNative&&(tech.featuresNativeVideoTracks||tech.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return _this.on(document,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(event){var fullscreenElement=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;fullscreenElement&&fullscreenElement.contains(_this.tech_.el())&&_this.masterPlaylistController_.smoothQualityChange_()}),_this.on(_this.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),_this.on(_this.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),_this.on(_this.tech_,"play",_this.play),_this}_inheritsLoose(VhsHandler,_Component);var _proto=VhsHandler.prototype;return _proto.setOptions_=function(){var _this2=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var storedObject=getVhsLocalStorage();storedObject&&storedObject.bandwidth&&(this.options_.bandwidth=storedObject.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),storedObject&&storedObject.throughput&&(this.options_.throughput=storedObject.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Config.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Config.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData"].forEach(function(option){void 0!==_this2.source_[option]&&(_this2.options_[option]=_this2.source_[option])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},_proto.src=function(_src,type){var dataUri,_this3=this;_src&&(this.setOptions_(),this.options_.src=0===(dataUri=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(dataUri.substring(dataUri.indexOf(",")+1)):dataUri,this.options_.tech=this.tech_,this.options_.externVhs=Vhs$1,this.options_.sourceType=mediaTypes_js.simpleTypeFromSourceType(type),this.options_.seekTo=function(time){_this3.tech_.setCurrentTime(time)},this.masterPlaylistController_=new MasterPlaylistController(this.options_),this.playbackWatcher_=new PlaybackWatcher(videojs$1.mergeOptions(this.options_,{seekable:function(){return _this3.seekable()},media:function(){return _this3.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_})),this.masterPlaylistController_.on("error",function(){var player=videojs$1.players[_this3.tech_.options_.playerId],error=_this3.masterPlaylistController_.error;"object"!=typeof error||error.code?"string"==typeof error&&(error={message:error,code:3}):error.code=3,player.error(error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Vhs$1.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Vhs$1.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(selectPlaylist){this.masterPlaylistController_.selectPlaylist=selectPlaylist.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(throughput){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=throughput,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth}
1,set:function(bandwidth){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=bandwidth,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var invThroughput,invBandwidth=1/(this.bandwidth||1);return invThroughput=this.throughput>0?1/this.throughput:0,Math.floor(1/(invBandwidth+invThroughput))},set:function(){videojs$1.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return _this3.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return _this3.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return _this3.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return _this3.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return _this3.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return _this3.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return _this3.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return _this3.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return timeRangesToArray(_this3.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return _this3.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return _this3.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return _this3.tech_.name_},enumerable:!0},duration:{get:function(){return _this3.tech_.duration()},enumerable:!0},master:{get:function(){return _this3.playlists.master},enumerable:!0},playerDimensions:{get:function(){return _this3.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return timeRangesToArray(_this3.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return _this3.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){_this3.options_.useBandwidthFromLocalStorage&&function(options){if(!window$1.localStorage)return!1;var objectToStore=getVhsLocalStorage();objectToStore=objectToStore?videojs$1.mergeOptions(objectToStore,options):options;try{window$1.localStorage.setItem("videojs-vhs",JSON.stringify(objectToStore))}catch(e){return!1}}({bandwidth:_this3.bandwidth,throughput:Math.round(_this3.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var vhsHandler,playlists;playlists=(vhsHandler=_this3).playlists,vhsHandler.representations=function(){return playlists&&playlists.master&&playlists.master.playlists?playlists.master.playlists.filter(function(media){return!isIncompatible(media)}).map(function(e,i){return new Representation(vhsHandler,e,e.id)}):[]}}),this.masterPlaylistController_.sourceUpdater_.on("ready",function(){var audioPlaylistLoader=_this3.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;setupEmeOptions({player:_this3.player_,sourceKeySystems:_this3.source_.keySystems,media:_this3.playlists.media(),audioMedia:audioPlaylistLoader&&audioPlaylistLoader.media(),mainPlaylists:_this3.playlists.master.playlists})}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=window$1.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_)))},_proto.setupQualityLevels_=function(){var _this4=this,player=videojs$1.players[this.tech_.options_.playerId];
vendor: 4,244 bytes, line 1
1player&&player.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=player.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var qualityLevels,vhs;qualityLevels=_this4.qualityLevels_,(vhs=_this4).representations().forEach(function(rep){qualityLevels.addQualityLevel(rep)}),handleVhsMediaChange(qualityLevels,vhs.playlists)}),this.playlists.on("mediachange",function(){handleVhsMediaChange(_this4.qualityLevels_,_this4.playlists)}))},VhsHandler.version=function(){return{"@videojs/http-streaming":"2.2.4","mux.js":"5.6.7","mpd-parser":"0.14.0","m3u8-parser":"4.5.0","aes-decrypter":"3.1.0"}},_proto.version=function(){return this.constructor.version()},_proto.canChangeType=function(){return SourceUpdater.canChangeType()},_proto.play=function(){this.masterPlaylistController_.play()},_proto.setCurrentTime=function(currentTime){this.masterPlaylistController_.setCurrentTime(currentTime)},_proto.duration=function(){return this.masterPlaylistController_.duration()},_proto.seekable=function(){return this.masterPlaylistController_.seekable()},_proto.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&window$1.URL.revokeObjectURL&&(window$1.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),_Component.prototype.dispose.call(this)},_proto.convertToProgramTime=function(time,callback){return getProgramTime({playlist:this.masterPlaylistController_.media(),time:time,callback:callback})},_proto.seekToProgramTime=function(programTime,callback,pauseAfterSeek,retryCount){return void 0===pauseAfterSeek&&(pauseAfterSeek=!0),void 0===retryCount&&(retryCount=2),seekToProgramTime({programTime:programTime,playlist:this.masterPlaylistController_.media(),retryCount:retryCount,pauseAfterSeek:pauseAfterSeek,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:callback})},VhsHandler}(videojs$1.getComponent("Component")),VhsSourceHandler={name:"videojs-http-streaming",VERSION:"2.2.4",canHandleSource:function(srcObj,options){void 0===options&&(options={});var localOptions=videojs$1.mergeOptions(videojs$1.options,options);return VhsSourceHandler.canPlayType(srcObj.type,localOptions)},handleSource:function(source,tech,options){void 0===options&&(options={});var localOptions=videojs$1.mergeOptions(videojs$1.options,options);return tech.vhs=new VhsHandler(source,tech,localOptions),videojs$1.hasOwnProperty("hls")||Object.defineProperty(tech,"hls",{get:function(){return videojs$1.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),tech.vhs},configurable:!0}),tech.vhs.xhr=xhrFactory(),tech.vhs.src(source.src,source.type),tech.vhs},canPlayType:function(type,options){void 0===options&&(options={});var _videojs$mergeOptions2=videojs$1.mergeOptions(videojs$1.options,options).vhs.overrideNative,overrideNative=void 0===_videojs$mergeOptions2?!videojs$1.browser.IS_ANY_SAFARI:_videojs$mergeOptions2,supportedType=mediaTypes_js.simpleTypeFromSourceType(type);return supportedType&&(!Vhs$1.supportsTypeNatively(supportedType)||overrideNative)?"maybe":""}};codecs_js.browserSupportsCodec("avc1.4d400d,mp4a.40.2")&&videojs$1.getTech("Html5").registerSourceHandler(VhsSourceHandler,0),videojs$1.VhsHandler=VhsHandler,Object.defineProperty(videojs$1,"HlsHandler",{get:function(){return videojs$1.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),VhsHandler},configurable:!0}),videojs$1.VhsSourceHandler=VhsSourceHandler,Object.defineProperty(videojs$1,"HlsSourceHandler",{get:function(){return videojs$1.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),VhsSourceHandler},configurable:!0}),videojs$1.Vhs=Vhs$1,Object.defineProperty(videojs$1,"Hls",{get:function(){return videojs$1.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Vhs$1},configurable:!0}),videojs$1.use||(videojs$1.registerComponent("Hls",Vhs$1),videojs$1.registerComponent("
1Vhs",Vhs$1)),videojs$1.options.vhs=videojs$1.options.vhs||{},videojs$1.options.hls=videojs$1.options.hls||{},videojs$1.registerPlugin?videojs$1.registerPlugin("reloadSourceOnError",reloadSourceOnError):videojs$1.plugin("reloadSourceOnError",reloadSourceOnError),module.exports=videojs$1},{"@babel/runtime/helpers/assertThisInitialized":17,"@babel/runtime/helpers/construct":18,"@babel/runtime/helpers/extends":19,"@babel/runtime/helpers/getPrototypeOf":20,"@babel/runtime/helpers/inherits":21,"@babel/runtime/helpers/inheritsLoose":22,"@babel/runtime/helpers/possibleConstructorReturn":24,"@videojs/vhs-utils/dist/byte-helpers":27,"@videojs/vhs-utils/dist/codecs.js":28,"@videojs/vhs-utils/dist/containers":29,"@videojs/vhs-utils/dist/media-types.js":31,"@videojs/vhs-utils/dist/resolve-url.js":32,"@videojs/xhr":34,"global/document":41,"global/window":42,keycode:47,"m3u8-parser":49,"mpd-parser":50,"mux.js/lib/mp4/probe":57,"mux.js/lib/tools/parse-sidx":59,"mux.js/lib/tools/ts-inspector.js":63,"mux.js/lib/utils/clock":65,"safe-json-parse/tuple":74,"videojs-vtt.js":118}],118:[function(require,module,exports){var window=require("global/window"),vttjs=module.exports={WebVTT:require("./vtt.js"),VTTCue:require("./vttcue.js"),VTTRegion:require("./vttregion.js")};window.vttjs=vttjs,window.WebVTT=vttjs.WebVTT;var cueShim=vttjs.VTTCue,regionShim=vttjs.VTTRegion,nativeVTTCue=window.VTTCue,nativeVTTRegion=window.VTTRegion;vttjs.shim=function(){window.VTTCue=cueShim,window.VTTRegion=regionShim},vttjs.restore=function(){window.VTTCue=nativeVTTCue,window.VTTRegion=nativeVTTRegion},window.VTTCue||vttjs.shim()},{"./vtt.js":119,"./vttcue.js":120,"./vttregion.js":121,"global/window":42}],119:[function(require,module,exports){var document=require("global/document"),_objCreate=Object.create||function(){function F(){}return function(o){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return F.prototype=o,new F}}();function ParsingError(errorData,message){this.name="ParsingError",this.code=errorData.code,this.message=message||errorData.message}function parseTimeStamp(input){function computeSeconds(h,m,s,f){return 3600*(0|h)+60*(0|m)+(0|s)+(0|f)/1e3}var m=input.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return m?m[3]?computeSeconds(m[1],m[2],m[3].replace(":",""),m[4]):m[1]>59?computeSeconds(m[1],m[2],0,m[4]):computeSeconds(0,m[1],m[2],m[4]):null}function Settings(){this.values=_objCreate(null)}function parseOptions(input,callback,keyValueDelim,groupDelim){var groups=groupDelim?input.split(groupDelim):[input];for(var i in groups)if("string"==typeof groups[i]){var kv=groups[i].split(keyValueDelim);if(2===kv.length)callback(kv[0],kv[1])}}function parseCue(input,cue,regionList){var oInput=input;function consumeTimeStamp(){var ts=parseTimeStamp(input);if(null===ts)throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed timestamp: "+oInput);return input=input.replace(/^[^\sa-zA-Z-]+/,""),ts}function skipWhitespace(){input=input.replace(/^\s+/,"")}if(skipWhitespace(),cue.startTime=consumeTimeStamp(),skipWhitespace(),"--\x3e"!==input.substr(0,3))throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+oInput);input=input.substr(3),skipWhitespace(),cue.endTime=consumeTimeStamp(),skipWhitespace(),function(input,cue){var settings=new Settings;parseOptions(input,function(k,v){switch(k){case"region":for(var i=regionList.length-1;i>=0;i--)if(regionList[i].id===v){settings.set(k,regionList[i].region);break}break;case"vertical":settings.alt(k,v,["rl","lr"]);break;case"line":var vals=v.split(","),vals0=vals[0];settings.integer(k,vals0),settings.percent(k,vals0)&&settings.set("snapToLines",!1),settings.alt(k,vals0,["auto"]),2===vals.length&&settings.alt("lineAlign",vals[1],["start","center","end"]);break;case"position":vals=v.split(","),settings.percent(k,vals[0]),2===vals.length&&settings.alt("positionAlign",vals[1],["start","center","end"]);break;case"size":settings.percent(k,v);break;case"align":settings.alt(k,v,["start","center","end","left","right"])}},/:/,/\s/),cue.region=settings.get("region",null),cue.vertical=sett
vendor: 11,203 bytes, line 1
1ings.get("vertical","");try{cue.line=settings.get("line","auto")}catch(e){}cue.lineAlign=settings.get("lineAlign","start"),cue.snapToLines=settings.get("snapToLines",!0),cue.size=settings.get("size",100);try{cue.align=settings.get("align","center")}catch(e){cue.align=settings.get("align","middle")}try{cue.position=settings.get("position","auto")}catch(e){cue.position=settings.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},cue.align)}cue.positionAlign=settings.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},cue.align)}(input,cue)}ParsingError.prototype=_objCreate(Error.prototype),ParsingError.prototype.constructor=ParsingError,ParsingError.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Settings.prototype={set:function(k,v){this.get(k)||""===v||(this.values[k]=v)},get:function(k,dflt,defaultKey){return defaultKey?this.has(k)?this.values[k]:dflt[defaultKey]:this.has(k)?this.values[k]:dflt},has:function(k){return k in this.values},alt:function(k,v,a){for(var n=0;n<a.length;++n)if(v===a[n]){this.set(k,v);break}},integer:function(k,v){/^-?\d+$/.test(v)&&this.set(k,parseInt(v,10))},percent:function(k,v){return!!(v.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(v=parseFloat(v))>=0&&v<=100)&&(this.set(k,v),!0)}};var TEXTAREA_ELEMENT=document.createElement("textarea"),TAG_NAME={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},DEFAULT_COLOR_CLASS={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},TAG_ANNOTATION={v:"title",lang:"lang"},NEEDS_PARENT={rt:"ruby"};function parseContent(window,input){function nextToken(){if(!input)return null;var result,m=input.match(/^([^<]*)(<[^>]*>?)?/);return result=m[1]?m[1]:m[2],input=input.substr(result.length),result}function shouldAdd(current,element){return!NEEDS_PARENT[element.localName]||NEEDS_PARENT[element.localName]===current.localName}function createElement(type,annotation){var tagName=TAG_NAME[type];if(!tagName)return null;var element=window.document.createElement(tagName),name=TAG_ANNOTATION[type];return name&&annotation&&(element[name]=annotation.trim()),element}for(var t,s,rootDiv=window.document.createElement("div"),current=rootDiv,tagStack=[];null!==(t=nextToken());)if("<"!==t[0])current.appendChild(window.document.createTextNode((s=t,TEXTAREA_ELEMENT.innerHTML=s,s=TEXTAREA_ELEMENT.textContent,TEXTAREA_ELEMENT.textContent="",s)));else{if("/"===t[1]){tagStack.length&&tagStack[tagStack.length-1]===t.substr(2).replace(">","")&&(tagStack.pop(),current=current.parentNode);continue}var node,ts=parseTimeStamp(t.substr(1,t.length-2));if(ts){node=window.document.createProcessingInstruction("timestamp",ts),current.appendChild(node);continue}var m=t.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!m)continue;if(!(node=createElement(m[1],m[3])))continue;if(!shouldAdd(current,node))continue;if(m[2]){var classes=m[2].split(".");classes.forEach(function(cl){var bgColor=/^bg_/.test(cl),colorName=bgColor?cl.slice(3):cl;if(DEFAULT_COLOR_CLASS.hasOwnProperty(colorName)){var propName=bgColor?"background-color":"color",propValue=DEFAULT_COLOR_CLASS[colorName];node.style[propName]=propValue}}),node.className=classes.join(" ")}tagStack.push(m[1]),current.appendChild(node),current=node}return rootDiv}var strongRTLRanges=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function isStrongRTLChar(charCode){for(var i=0;i<strongRTLRanges.length;i++){var currentRange=strongRTLRanges[i];if(charCode>=currentRange[0]&&charCode<=currentRange[1])return!0}return!1}function determineBidi(cueDiv){var nodeStack=[],text="";if(!cueDiv||!cueDiv.childNodes)return"ltr";function pushNodes(nodeStack,node){for(var i=node.childNodes.length-1;i>=0;i--)nodeStack.push(node.childNodes[i])}function nextTextNode(nodeStack){if(!nodeStack||!nodeStack.length)return null;var node=nodeStack.pop(),text=node.textContent||node.innerText;if(text){var m=text.match(/^.*(\n|\r)/);return m?(nodeStack.length=0,m[0]):text}return"ruby"===node.tagName?nextTextNode(nodeStack):node.childNodes?(pushNodes(nodeStack,node),nextTextNode(nodeStack)):void 0}for(pushNodes(nodeStack,cueDiv);text=nextTextNode(nodeStack);)for(var i=0;i<text.length;i++)if(isStrongRTLChar(text.charCodeAt(i)))return"rtl";return"ltr"}function StyleBox(){}function CueStyleBox(window,cue,styleOptions){StyleBox.call(this),this.cue=cue,this.cueDiv=parseContent(window,cue.text);var styles={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===cue.vertical?"horizontal-tb":"lr"===cue.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(styles,this.cueDiv),this.div=window.document.createElement("div"),styles={direction:determineBidi(this.cueDiv),writingMode:""===cue.vertical?"horizontal-tb":"lr"===cue.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===cue.align?"center":cue.align,font:styleOptions.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(styles),this.div.appendChild(this.cueDiv);var textPos=0;switch(cue.positionAlign){case"start":textPos=cue.position;break;case"center":textPos=cue.position-cue.size/2;break;case"end":textPos=cue.position-cue.size}""===cue.vertical?this.applyStyles({left:this.formatStyle(textPos,"%"),width:this.formatStyle(cue.size,"%")}):this.applyStyles({top:this.formatStyle(textPos,"%"),height:this.formatStyle(cue.size,"%")}),this.move=function(box){this.applyStyles({top:this.formatStyle(box.top,"px"),bottom:this.formatStyle(box.bottom,"px"),left:this.formatStyle(box.left,"px"),right:this.formatStyle(box.right,"px"),height:this.formatStyle(box.height,"px"),width:this.formatStyle(box.width,"px")})}}function BoxPosition(obj){var lh,height,width,top;if(obj.div){height=obj.div.offsetHeight,width=obj.div.offsetWidth,top=obj.div.offsetTop;var rects=(rects=obj.div.childNodes)&&(rects=rects[0])&&rects.getClientRects&&rects.getClientRects();obj=obj.div.getBoundingClientRect(),lh=rects?Math.max(rects[0]&&rects[0].height||0,obj.height/rects.length):0}this.left=obj.left,this.right=obj.right,this.top=obj.top||top,this.height=obj.height||height,this.bottom=obj.bottom||top+(obj.height||height),this.width=obj.width||width,this.lineHeight=void 0!==lh?lh:obj.lineHeight}function moveBoxToLinePosition(window,styleBox,containerBox,boxPositions){var boxPosition=new BoxPosition(styleBox),cue=styleBox.cue,linePos=function(cue){if("number"==typeof cue.line&&(cue.snapToLines||cue.line>=0&&cue.line<=100))return cue.line;if(!cue.track||!cue.track.textTrackList||!cue.track.textTrackList.mediaElement)return-1;for(var track=cue.track,trackList=track.textTrackList,count=0,i=0;i<trackList.length&&trackList[i]!==track;i++)"showing"===trackList[i].mode&&count++;return-1*++count}(cue),axis=[];if(cue.snapToLines){var size;switch(cue.vertical){case"":axis=["+y","-y"],size="height";break;case"rl":axis=["+x","-x"],size="width";break;case"lr":axis=["-x","+x"],size="width"}var step=boxPosition.lineHeight,position=step*Math.round(linePos),maxPosition=containerBox[size]+step,initialAxis=axis[0];Math.abs(position)>maxPosition&&(position=position<0?-1:1,position*=Math.ceil(maxPosition/step)*step),linePos<0&&(position+=""===cue.vertical?containerBox.height:containerBox.width,axis=axis.reverse()),boxPosition.move(initialAxis,position)}else{var calculatedPercentage=boxPosition.lineHeight/containerBox.height*100;switch(cue.lineAlign){case"center":linePos-=calculatedPercentage/2;break;case"end":linePos-=calculatedPercentage}switch(cue.vertical){case"":styleBox.applyStyles({top:styleBox.formatStyle(linePos,"%")});break;case"rl":styleBox.applyStyles({left:styleBox.formatStyle(linePos,"%")});break;case"lr":styleBox.applyStyles({right:styleBox.formatStyle(linePos,"%")})}axis=["+y","-x","+x","-y"],boxPosition=new BoxPosition(styleBox)}var bestPosition=function(b,axis){for(var bestPosition,specifiedPosition=new BoxPosition(b),percentage=1,i=0;i<axis.length;i++){for(;b.overlapsOppositeAxis(containerBox,axis[i])||b.within(containerBox)&&b.overlapsAny(boxPositions);)b.move(axis[i]);if(b.within(containerBox))return b;var p=b.intersectPercentage(containerBox);percentage>p&&(bestPosition=new BoxPosition(b),percentage=p),b=new BoxPosition(specifiedPosition)}return bestPosition||specifiedPosition}(boxPosition,axis);styleBox.move(bestPosition.toCSSCompatValues(containerBox))}function WebVTT(){}StyleBox.prototype.applyStyles=function(styles,div){for(var prop in div=div||this.div,styles)styles.hasOwnProperty(prop)&&(div.style[prop]=styles[prop])},StyleBox.prototype.formatStyle=function(val,unit){return 0===val?0:val+unit},CueStyleBox.prototype=_objCreate(StyleBox.prototype),CueStyleBox.prototype.constructor=CueStyleBox,BoxPosition.prototype.move=function(axis,toMove){switch(toMove=void 0!==toMove?toMove:this.lineHeight,axis){case"+x":this.left+=toMove,this.right+=toMove;break;case"-x":this.left-=toMove,this.right-=toMove;break;case"+y":this.top+=toMove,this.bottom+=toMove;break;case"-y":this.top-=toMove,this.bottom-=toMove}},BoxPosition.prototype.overlaps=function(b2){return this.left<b2.right&&this.right>b2.left&&this.top<b2.bottom&&this.bottom>b2.top},BoxPosition.prototype.overlapsAny=function(boxes){for(var i=0;i<boxes.length;i++)if(this.overlaps(boxes[i]))return!0;return!1},BoxPosition.prototype.within=function(container){return this.top>=container.top&&this.bottom<=container.bottom&&this.left>=container.left&&this.right<=container.right},BoxPosition.prototype.overlapsOppositeAxis=function(container,axis){switch(a
vendor: 4,895 bytes, line 1
1xis){case"+x":return this.left<container.left;case"-x":return this.right>container.right;case"+y":return this.top<container.top;case"-y":return this.bottom>container.bottom}},BoxPosition.prototype.intersectPercentage=function(b2){return Math.max(0,Math.min(this.right,b2.right)-Math.max(this.left,b2.left))*Math.max(0,Math.min(this.bottom,b2.bottom)-Math.max(this.top,b2.top))/(this.height*this.width)},BoxPosition.prototype.toCSSCompatValues=function(reference){return{top:this.top-reference.top,bottom:reference.bottom-this.bottom,left:this.left-reference.left,right:reference.right-this.right,height:this.height,width:this.width}},BoxPosition.getSimpleBoxPosition=function(obj){var height=obj.div?obj.div.offsetHeight:obj.tagName?obj.offsetHeight:0,width=obj.div?obj.div.offsetWidth:obj.tagName?obj.offsetWidth:0,top=obj.div?obj.div.offsetTop:obj.tagName?obj.offsetTop:0;return{left:(obj=obj.div?obj.div.getBoundingClientRect():obj.tagName?obj.getBoundingClientRect():obj).left,right:obj.right,top:obj.top||top,height:obj.height||height,bottom:obj.bottom||top+(obj.height||height),width:obj.width||width}},WebVTT.StringDecoder=function(){return{decode:function(data){if(!data)return"";if("string"!=typeof data)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(data))}}},WebVTT.convertCueToDOMTree=function(window,cuetext){return window&&cuetext?parseContent(window,cuetext):null};WebVTT.processCues=function(window,cues,overlay){if(!window||!cues||!overlay)return null;for(;overlay.firstChild;)overlay.removeChild(overlay.firstChild);var paddedOverlay=window.document.createElement("div");if(paddedOverlay.style.position="absolute",paddedOverlay.style.left="0",paddedOverlay.style.right="0",paddedOverlay.style.top="0",paddedOverlay.style.bottom="0",paddedOverlay.style.margin="1.5%",overlay.appendChild(paddedOverlay),function(cues){for(var i=0;i<cues.length;i++)if(cues[i].hasBeenReset||!cues[i].displayState)return!0;return!1}(cues)){var boxPositions=[],containerBox=BoxPosition.getSimpleBoxPosition(paddedOverlay),styleOptions={font:Math.round(.05*containerBox.height*100)/100+"px sans-serif"};!function(){for(var styleBox,cue,i=0;i<cues.length;i++)cue=cues[i],styleBox=new CueStyleBox(window,cue,styleOptions),paddedOverlay.appendChild(styleBox.div),moveBoxToLinePosition(0,styleBox,containerBox,boxPositions),cue.displayState=styleBox.div,boxPositions.push(BoxPosition.getSimpleBoxPosition(styleBox))}()}else for(var i=0;i<cues.length;i++)paddedOverlay.appendChild(cues[i].displayState)},WebVTT.Parser=function(window,vttjs,decoder){decoder||(decoder=vttjs,vttjs={}),vttjs||(vttjs={}),this.window=window,this.vttjs=vttjs,this.state="INITIAL",this.buffer="",this.decoder=decoder||new TextDecoder("utf8"),this.regionList=[]},WebVTT.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof ParsingError))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(data){var self=this;function collectNextLine(){for(var buffer=self.buffer,pos=0;pos<buffer.length&&"\r"!==buffer[pos]&&"\n"!==buffer[pos];)++pos;var line=buffer.substr(0,pos);return"\r"===buffer[pos]&&++pos,"\n"===buffer[pos]&&++pos,self.buffer=buffer.substr(pos),line}function parseHeader(input){input.match(/X-TIMESTAMP-MAP/)?parseOptions(input,function(k,v){switch(k){case"X-TIMESTAMP-MAP":input=v,settings=new Settings,parseOptions(input,function(k,v){switch(k){case"MPEGT":settings.integer(k+"S",v);break;case"LOCA":settings.set(k+"L",parseTimeStamp(v))}},/[^\d]:/,/,/),self.ontimestampmap&&self.ontimestampmap({MPEGTS:settings.get("MPEGTS"),LOCAL:settings.get("LOCAL")})}var input,settings},/=/):parseOptions(input,function(k,v){switch(k){case"Region":!function(input){var settings=new Settings;if(parseOptions(input,function(k,v){switch(k){case"id":settings.set(k,v);break;case"width":settings.percent(k,v);break;case"lines":settings.integer(k,v);break;case"regionanchor":case"viewportanchor":var xy=v.split(",");if(2!==xy.length)break;var anchor=new Settings;if(anchor.percent("x",xy[0]),anchor.percent("y",xy[1]),!anchor.has("x")||!anchor.has("y"))break;settings.set(k+"X",anchor.get("x")),settings.set(k+"Y",anchor.get("y"));break;case"scroll":settings.alt(k,v,["up"])}},/=/,/\s/),settings.has("id")){var region=new(self.vttjs.VTTRegion||self.window.VTTRegion);region.width=settings.get("width",100),region.lines=settings.get("lines",3),region.regionAnchorX=settings.get("regionanchorX",0),region.regionAnchorY=settings.get("regionanchorY",100),region.viewportAnchorX=settings.get("viewportanchorX",0),region.viewportAnchorY=settings.get("viewportanchorY",100),region.scroll=settings.get("scroll",""),self.onregion&&self.onregion(region),self.regionList.push({id:settings.get("id"),region:region})}}(v)}},/:/)}data&&(self.buffer+=self.decoder.decode(data,{stream:!0}));try{var line;if("INITIAL"===self.state){if(!/\r\n|\n/.test(self.buffer))return this;
vendor: 4,376 bytes, line 1
1var m=(line=collectNextLine()).match(/^WEBVTT([ \t].*)?$/);if(!m||!m[0])throw new ParsingError(ParsingError.Errors.BadSignature);self.state="HEADER"}for(var alreadyCollectedLine=!1;self.buffer;){if(!/\r\n|\n/.test(self.buffer))return this;switch(alreadyCollectedLine?alreadyCollectedLine=!1:line=collectNextLine(),self.state){case"HEADER":/:/.test(line)?parseHeader(line):line||(self.state="ID");continue;case"NOTE":line||(self.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(line)){self.state="NOTE";break}if(!line)continue;self.cue=new(self.vttjs.VTTCue||self.window.VTTCue)(0,0,"");try{self.cue.align="center"}catch(e){self.cue.align="middle"}if(self.state="CUE",-1===line.indexOf("--\x3e")){self.cue.id=line;continue}case"CUE":try{parseCue(line,self.cue,self.regionList)}catch(e){self.reportOrThrowError(e),self.cue=null,self.state="BADCUE";continue}self.state="CUETEXT";continue;case"CUETEXT":var hasSubstring=-1!==line.indexOf("--\x3e");if(!line||hasSubstring&&(alreadyCollectedLine=!0)){self.oncue&&self.oncue(self.cue),self.cue=null,self.state="ID";continue}self.cue.text&&(self.cue.text+="\n"),self.cue.text+=line.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":line||(self.state="ID");continue}}}catch(e){self.reportOrThrowError(e),"CUETEXT"===self.state&&self.cue&&self.oncue&&self.oncue(self.cue),self.cue=null,self.state="INITIAL"===self.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new ParsingError(ParsingError.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},module.exports=WebVTT},{"global/document":41}],120:[function(require,module,exports){var autoKeyword="auto",directionSetting={"":1,lr:1,rl:1},alignSetting={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function findAlignSetting(value){return"string"==typeof value&&(!!alignSetting[value.toLowerCase()]&&value.toLowerCase())}function VTTCue(startTime,endTime,text){this.hasBeenReset=!1;var _id="",_pauseOnExit=!1,_startTime=startTime,_endTime=endTime,_text=text,_region=null,_vertical="",_snapToLines=!0,_line="auto",_lineAlign="start",_position="auto",_positionAlign="auto",_size=100,_align="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return _id},set:function(value){_id=""+value}},pauseOnExit:{enumerable:!0,get:function(){return _pauseOnExit},set:function(value){_pauseOnExit=!!value}},startTime:{enumerable:!0,get:function(){return _startTime},set:function(value){if("number"!=typeof value)throw new TypeError("Start time must be set to a number.");_startTime=value,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return _endTime},set:function(value){if("number"!=typeof value)throw new TypeError("End time must be set to a number.");_endTime=value,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return _text},set:function(value){_text=""+value,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return _region},set:function(value){_region=value,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return _vertical},set:function(value){var setting=function(value){return"string"==typeof value&&!!directionSetting[value.toLowerCase()]&&value.toLowerCase()}(value);if(!1===setting)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");_vertical=setting,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return _snapToLines},set:function(value){_snapToLines=!!value,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return _line},set:function(value){if("number"!=typeof value&&value!==autoKeyword)throw new SyntaxError("Line: an invalid number or illegal string was specified.");_line=value,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return _lineAlign},set:function(value){var setting=findAlignSetting(value);setting?(_lineAlign=setting,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return _position},set:function(value){if(value<0||value>100)throw new Error("Position must be between 0 and 100.");_position=value,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return _positionAlign}
vendor: 4,446 bytes, line 1
1,set:function(value){var setting=findAlignSetting(value);setting?(_positionAlign=setting,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return _size},set:function(value){if(value<0||value>100)throw new Error("Size must be between 0 and 100.");_size=value,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return _align},set:function(value){var setting=findAlignSetting(value);if(!setting)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");_align=setting,this.hasBeenReset=!0}}}),this.displayState=void 0}VTTCue.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},module.exports=VTTCue},{}],121:[function(require,module,exports){var scrollSetting={"":!0,up:!0};function isValidPercentValue(value){return"number"==typeof value&&value>=0&&value<=100}module.exports=function(){var _width=100,_lines=3,_regionAnchorX=0,_regionAnchorY=100,_viewportAnchorX=0,_viewportAnchorY=100,_scroll="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return _width},set:function(value){if(!isValidPercentValue(value))throw new Error("Width must be between 0 and 100.");_width=value}},lines:{enumerable:!0,get:function(){return _lines},set:function(value){if("number"!=typeof value)throw new TypeError("Lines must be set to a number.");_lines=value}},regionAnchorY:{enumerable:!0,get:function(){return _regionAnchorY},set:function(value){if(!isValidPercentValue(value))throw new Error("RegionAnchorX must be between 0 and 100.");_regionAnchorY=value}},regionAnchorX:{enumerable:!0,get:function(){return _regionAnchorX},set:function(value){if(!isValidPercentValue(value))throw new Error("RegionAnchorY must be between 0 and 100.");_regionAnchorX=value}},viewportAnchorY:{enumerable:!0,get:function(){return _viewportAnchorY},set:function(value){if(!isValidPercentValue(value))throw new Error("ViewportAnchorY must be between 0 and 100.");_viewportAnchorY=value}},viewportAnchorX:{enumerable:!0,get:function(){return _viewportAnchorX},set:function(value){if(!isValidPercentValue(value))throw new Error("ViewportAnchorX must be between 0 and 100.");_viewportAnchorX=value}},scroll:{enumerable:!0,get:function(){return _scroll},set:function(value){var setting=function(value){return"string"==typeof value&&!!scrollSetting[value.toLowerCase()]&&value.toLowerCase()}(value);!1===setting?console.warn("Scroll: an invalid or illegal string was specified."):_scroll=setting}}})}},{}],122:[function(require,module,exports){function DOMParser(options){this.options=options||{locator:{}}}function DOMHandler(){this.cdata=!1}function position(locator,node){node.lineNumber=locator.lineNumber,node.columnNumber=locator.columnNumber}function _locator(l){if(l)return"\n@"+(l.systemId||"")+"#[line:"+l.lineNumber+",col:"+l.columnNumber+"]"}function _toString(chars,start,length){return"string"==typeof chars?chars.substr(start,length):chars.length>=start+length||start?new java.lang.String(chars,start,length)+"":chars}function appendElement(hander,node){hander.currentElement?hander.currentElement.appendChild(node):hander.doc.appendChild(node)}DOMParser.prototype.parseFromString=function(source,mimeType){var options=this.options,sax=new XMLReader,domBuilder=options.domBuilder||new DOMHandler,errorHandler=options.errorHandler,locator=options.locator,defaultNSMap=options.xmlns||{},entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return locator&&domBuilder.setDocumentLocator(locator),sax.errorHandler=function(errorImpl,domBuilder,locator){if(!errorImpl){if(domBuilder instanceof DOMHandler)return domBuilder;errorImpl=domBuilder}var errorHandler={},isCallback=errorImpl instanceof Function;function build(key){var fn=errorImpl[key];!fn&&isCallback&&(fn=2==errorImpl.length?function(msg){errorImpl(key,msg)}:errorImpl),errorHandler[key]=fn&&function(msg){fn("[xmldom "+key+"]\t"+msg+_locator(locator))}||function(){}}return locator=locator||{},build("warning"),build("error"),build("fatalError"),errorHandler}(errorHandler,domBuilder,locator),sax.domBuilder=options.domBuilder||domBuilder,/\/x?html?$/.test(mimeType)&&(entityMap.nbsp=" ",entityMap.copy="©",defaultNSMap[""]="http://www.w3.org/1999/xhtml"),defaultNSMap.xml=defaultNSMap.xml||"http://www.w3.org/XML/1998/namespace",source?sax.parse(source,defaultNSMap,entityMap):sax.errorHandler.error("invalid doc source"),domBuilder.doc}
vendor: 20,871 bytes, line 1
1,DOMHandler.prototype={startDocument:function(){this.doc=(new DOMImplementation).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(namespaceURI,localName,qName,attrs){var doc=this.doc,el=doc.createElementNS(namespaceURI,qName||localName),len=attrs.length;appendElement(this,el),this.currentElement=el,this.locator&&position(this.locator,el);for(var i=0;i<len;i++){namespaceURI=attrs.getURI(i);var value=attrs.getValue(i),attr=(qName=attrs.getQName(i),doc.createAttributeNS(namespaceURI,qName));this.locator&&position(attrs.getLocator(i),attr),attr.value=attr.nodeValue=value,el.setAttributeNode(attr)}},endElement:function(namespaceURI,localName,qName){var current=this.currentElement;current.tagName;this.currentElement=current.parentNode},startPrefixMapping:function(prefix,uri){},endPrefixMapping:function(prefix){},processingInstruction:function(target,data){var ins=this.doc.createProcessingInstruction(target,data);this.locator&&position(this.locator,ins),appendElement(this,ins)},ignorableWhitespace:function(ch,start,length){},characters:function(chars,start,length){if(chars=_toString.apply(this,arguments)){if(this.cdata)var charNode=this.doc.createCDATASection(chars);else charNode=this.doc.createTextNode(chars);this.currentElement?this.currentElement.appendChild(charNode):/^\s*$/.test(chars)&&this.doc.appendChild(charNode),this.locator&&position(this.locator,charNode)}},skippedEntity:function(name){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(locator){(this.locator=locator)&&(locator.lineNumber=0)},comment:function(chars,start,length){chars=_toString.apply(this,arguments);var comm=this.doc.createComment(chars);this.locator&&position(this.locator,comm),appendElement(this,comm)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(name,publicId,systemId){var impl=this.doc.implementation;if(impl&&impl.createDocumentType){var dt=impl.createDocumentType(name,publicId,systemId);this.locator&&position(this.locator,dt),appendElement(this,dt)}},warning:function(error){console.warn("[xmldom warning]\t"+error,_locator(this.locator))},error:function(error){console.error("[xmldom error]\t"+error,_locator(this.locator))},fatalError:function(error){throw console.error("[xmldom fatalError]\t"+error,_locator(this.locator)),error}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){DOMHandler.prototype[key]=function(){return null}});var XMLReader=require("./sax").XMLReader,DOMImplementation=exports.DOMImplementation=require("./dom").DOMImplementation;exports.XMLSerializer=require("./dom").XMLSerializer,exports.DOMParser=DOMParser},{"./dom":123,"./sax":124}],123:[function(require,module,exports){function copy(src,dest){for(var p in src)dest[p]=src[p]}function _extends(Class,Super){var pt=Class.prototype;if(Object.create){var ppt=Object.create(Super.prototype);pt.__proto__=ppt}if(!(pt instanceof Super)){function t(){}t.prototype=Super.prototype,copy(pt,t=new t),Class.prototype=pt=t}pt.constructor!=Class&&("function"!=typeof Class&&console.error("unknow Class:"+Class),pt.constructor=Class)}var htmlns="http://www.w3.org/1999/xhtml",NodeType={},ELEMENT_NODE=NodeType.ELEMENT_NODE=1,ATTRIBUTE_NODE=NodeType.ATTRIBUTE_NODE=2,TEXT_NODE=NodeType.TEXT_NODE=3,CDATA_SECTION_NODE=NodeType.CDATA_SECTION_NODE=4,ENTITY_REFERENCE_NODE=NodeType.ENTITY_REFERENCE_NODE=5,ENTITY_NODE=NodeType.ENTITY_NODE=6,PROCESSING_INSTRUCTION_NODE=NodeType.PROCESSING_INSTRUCTION_NODE=7,COMMENT_NODE=NodeType.COMMENT_NODE=8,DOCUMENT_NODE=NodeType.DOCUMENT_NODE=9,DOCUMENT_TYPE_NODE=NodeType.DOCUMENT_TYPE_NODE=10,DOCUMENT_FRAGMENT_NODE=NodeType.DOCUMENT_FRAGMENT_NODE=11,NOTATION_NODE=NodeType.NOTATION_NODE=12,ExceptionCode={},ExceptionMessage={},HIERARCHY_REQUEST_ERR=(ExceptionCode.INDEX_SIZE_ERR=(ExceptionMessage[1]="Index size error",1),ExceptionCode.DOMSTRING_SIZE_ERR=(ExceptionMessage[2]="DOMString size error",2),ExceptionCode.HIERARCHY_REQUEST_ERR=(ExceptionMessage[3]="Hierarchy request error",3)),NOT_FOUND_ERR=(ExceptionCode.WRONG_DOCUMENT_ERR=(ExceptionMessage[4]="Wrong document",4),ExceptionCode.INVALID_CHARACTER_ERR=(ExceptionMessage[5]="Invalid character",5),ExceptionCode.NO_DATA_ALLOWED_ERR=(ExceptionMessage[6]="No data allowed",6),ExceptionCode.NO_MODIFICATION_ALLOWED_ERR=(ExceptionMessage[7]="No modification allowed",7),ExceptionCode.NOT_FOUND_ERR=(ExceptionMessage[8]="Not found",8)),INUSE_ATTRIBUTE_ERR=(ExceptionCode.NOT_SUPPORTED_ERR=(ExceptionMessage[9]="Not supported",9),ExceptionCode.INUSE_ATTRIBUTE_ERR=(ExceptionMessage[10]="Attribute in use",10));ExceptionCode.INVALID_STATE_ERR=(ExceptionMessage[11]="Invalid state",11),ExceptionCode.SYNTAX_ERR=(ExceptionMessage[12]="Syntax error",12),ExceptionCode.INVALID_MODIFICATION_ERR=(ExceptionMessage[13]="Invalid modification",13),ExceptionCode.NAMESPACE_ERR=(ExceptionMessage[14]="Invalid namespace",14),ExceptionCode.INVALID_ACCESS_ERR=(ExceptionMessage[15]="Invalid access",15);function DOMException(code,message){if(message instanceof Error)var error=message;else error=this,Error.call(this,ExceptionMessage[code]),this.message=ExceptionMessage[code],Error.captureStackTrace&&Error.captureStackTrace(this,DOMException);return error.code=code,message&&(this.message=this.message+": "+message),error}function NodeList(){}function LiveNodeList(node,refresh){this._node=node,this._refresh=refresh,_updateLiveList(this)}function _updateLiveList(list){var inc=list._node._inc||list._node.ownerDocument._inc;if(list._inc!=inc){var ls=list._refresh(list._node);__set__(list,"length",ls.length),copy(ls,list),list._inc=inc}}function NamedNodeMap(){}function _findNodeIndex(list,node){for(var i=list.length;i--;)if(list[i]===node)return i}function _addNamedNode(el,list,newAttr,oldAttr){if(oldAttr?list[_findNodeIndex(list,oldAttr)]=newAttr:list[list.length++]=newAttr,el){newAttr.ownerElement=el;var doc=el.ownerDocument;doc&&(oldAttr&&_onRemoveAttribute(doc,el,oldAttr),function(doc,el,newAttr){doc&&doc._inc++,"http://www.w3.org/2000/xmlns/"==newAttr.namespaceURI&&(el._nsMap[newAttr.prefix?newAttr.localName:""]=newAttr.value)}(doc,el,newAttr))}}function _removeNamedNode(el,list,attr){var i=_findNodeIndex(list,attr);if(!(i>=0))throw DOMException(NOT_FOUND_ERR,new Error(el.tagName+"@"+attr));for(var lastIndex=list.length-1;i<lastIndex;)list[i]=list[++i];if(list.length=lastIndex,el){var doc=el.ownerDocument;doc&&(_onRemoveAttribute(doc,el,attr),attr.ownerElement=null)}}function DOMImplementation(features){if(this._features={},features)for(var feature in features)this._features=features[feature]}function Node(){}function _xmlEncoder(c){return("<"==c?"<":">"==c&&">")||"&"==c&&"&"||'"'==c&&"""||"&#"+c.charCodeAt()+";"}function _visitNode(node,callback){if(callback(node))return!0;if(node=node.firstChild)do{if(_visitNode(node,callback))return!0}while(node=node.nextSibling)}function Document(){}function _onRemoveAttribute(doc,el,newAttr,remove){doc&&doc._inc++,"http://www.w3.org/2000/xmlns/"==newAttr.namespaceURI&&delete el._nsMap[newAttr.prefix?newAttr.localName:""]}function _onUpdateChild(doc,el,newChild){if(doc&&doc._inc){doc._inc++;var cs=el.childNodes;if(newChild)cs[cs.length++]=newChild;else{for(var child=el.firstChild,i=0;child;)cs[i++]=child,child=child.nextSibling;cs.length=i}}}function _removeChild(parentNode,child){var previous=child.previousSibling,next=child.nextSibling;return previous?previous.nextSibling=next:parentNode.firstChild=next,next?next.previousSibling=previous:parentNode.lastChild=previous,_onUpdateChild(parentNode.ownerDocument,parentNode),child}function _insertBefore(parentNode,newChild,nextChild){var cp=newChild.parentNode;if(cp&&cp.removeChild(newChild),newChild.nodeType===DOCUMENT_FRAGMENT_NODE){var newFirst=newChild.firstChild;if(null==newFirst)return newChild;var newLast=newChild.lastChild}else newFirst=newLast=newChild;var pre=nextChild?nextChild.previousSibling:parentNode.lastChild;newFirst.previousSibling=pre,newLast.nextSibling=nextChild,pre?pre.nextSibling=newFirst:parentNode.firstChild=newFirst,null==nextChild?parentNode.lastChild=newLast:nextChild.previousSibling=newLast;do{newFirst.parentNode=parentNode}while(newFirst!==newLast&&(newFirst=newFirst.nextSibling));return _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode),newChild.nodeType==DOCUMENT_FRAGMENT_NODE&&(newChild.firstChild=newChild.lastChild=null),newChild}function Element(){this._nsMap={}}function Attr(){}function CharacterData(){}function Text(){}function Comment(){}function CDATASection(){}function DocumentType(){}function Notation(){}function Entity(){}function EntityReference(){}function DocumentFragment(){}function ProcessingInstruction(){}function XMLSerializer(){}function nodeSerializeToString(isHtml,nodeFilter){var buf=[],refNode=9==this.nodeType?this.documentElement:this,prefix=refNode.prefix,uri=refNode.namespaceURI;if(uri&&null==prefix&&null==(prefix=refNode.lookupPrefix(uri)))var visibleNamespaces=[{namespace:uri,prefix:null}];return serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces),buf.join("")}function needNamespaceDefine(node,isHTML,visibleNamespaces){var prefix=node.prefix||"",uri=node.namespaceURI;if(!prefix&&!uri)return!1;if("xml"===prefix&&"http://www.w3.org/XML/1998/namespace"===uri||"http://www.w3.org/2000/xmlns/"==uri)return!1;for(var i=visibleNamespaces.length;i--;){var ns=visibleNamespaces[i];if(ns.prefix==prefix)return ns.namespace!=uri}return!0}function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){if(nodeFilter){if(!(node=nodeFilter(node)))return;if("string"==typeof node)return void buf.push(node)}switch(node.nodeType){case ELEMENT_NODE:visibleNamespaces||(visibleNamespaces=[]);visibleNamespaces.length;var attrs=node.attributes,len=attrs.length,child=node.firstChild,nodeName=node.tagName;isHTML=htmlns===node.namespaceURI||isHTML,buf.push("<",nodeName);for(var i=0;i<len;i++){"xmlns"==(attr=attrs.item(i)).prefix?visibleNamespaces.push({prefix:attr.localName,namespace:attr.value}):"xmlns"==attr.nodeName&&visibleNamespaces.push({prefix:"",namespace:attr.value})}for(i=0;i<len;i++){var attr;if(needNamespaceDefine(attr=attrs.item(i),0,visibleNamespaces)){var prefix=attr.prefix||"",uri=attr.namespaceURI,ns=prefix?" xmlns:"+prefix:" xmlns";buf.push(ns,'="',uri,'"'),visibleNamespaces.push({prefix:prefix,namespace:uri})}serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces)}if(needNamespaceDefine(node,0,visibleNamespaces)){prefix=node.prefix||"",uri=node.namespaceURI,ns=prefix?" xmlns:"+prefix:" xmlns";buf.push(ns,'="',uri,'"'),visibleNamespaces.push({prefix:prefix,namespace:uri})}if(child||isHTML&&!/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){if(buf.push(">"),isHTML&&/^script$/i.test(nodeName))for(;child;)child.data?buf.push(child.data):serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces),child=child.nextSibling;else for(;child;)serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces),child=child.nextSibling;buf.push("</",nodeName,">")}else buf.push("/>");return;case DOCUMENT_NODE:case DOCUMENT_FRAGMENT_NODE:for(child=node.firstChild;child;)serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces),child=child.nextSibling;return;case ATTRIBUTE_NODE:return buf.push(" ",node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');case TEXT_NODE:return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));case CDATA_SECTION_NODE:return buf.push("<![CDATA[",node.data,"]]>");case COMMENT_NODE:return buf.push("\x3c!--",node.data,"--\x3e");case DOCUMENT_TYPE_NODE:var pubid=node.publicId,sysid=node.systemId;if(buf.push("<!DOCTYPE ",node.name),pubid)buf.push(' PUBLIC "',pubid),sysid&&"."!=sysid&&buf.push('" "',sysid),buf.push('">');else if(sysid&&"."!=sysid)buf.push(' SYSTEM "',sysid,'">');else{var sub=node.internalSubset;sub&&buf.push(" [",sub,"]"),buf.push(">")}return;case PROCESSING_INSTRUCTION_NODE:return buf.push("<?",node.target," ",node.data,"?>");case ENTITY_REFERENCE_NODE:return buf.push("&",node.nodeName,";");default:buf.push("??",node.nodeName)}}function __set__(object,key,value){object[key]=value}DOMException.prototype=Error.prototype,copy(ExceptionCode,DOMException),NodeList.prototype={length:0,item:function(index){return this[index]||null},toString:function(isHTML,nodeFilter){for(var buf=[],i=0;i<this.length;i++)serializeToString(this[i],buf,isHTML,nodeFilter);return buf.join("")}},LiveNodeList.prototype.item=function(i){return _updateLiveList(this),this[i]},_extends(LiveNodeList,NodeList),NamedNodeMap.prototype={length:0,item:NodeList.prototype.item,getNamedItem:function(key){for(var i=this.length;i--;){var attr=this[i];if(attr.nodeName==key)return attr}},setNamedItem:function(attr){var el=attr.ownerElement;if(el&&el!=this._ownerElement)throw new DOMException(INUSE_ATTRIBUTE_ERR);var oldAttr=this.getNamedItem(attr.nodeName);return _addNamedNode(this._ownerElement,this,attr,oldAttr),oldAttr},setNamedItemNS:function(attr){var oldAttr,el=attr.ownerElement;if(el&&el!=this._ownerElement)throw new DOMException(INUSE_ATTRIBUTE_ERR);return oldAttr=this.getNamedItemNS(attr.namespaceURI,attr.localName),_addNamedNode(this._ownerElement,this,attr,oldAttr),oldAttr},removeNamedItem:function(key){var attr=this.getNamedItem(key);return _removeNamedNode(this._ownerElement,this,attr),attr},removeNamedItemNS:function(namespaceURI,localName){var attr=this.getNamedItemNS(namespaceURI,localName);return _removeNamedNode(this._ownerElement,this,attr),attr},getNamedItemNS:function(namespaceURI,localName){for(var i=this.length;i--;){var node=this[i];if(node.localName==localName&&node.namespaceURI==namespaceURI)return node}return null}},DOMImplementation.prototype={hasFeature:function(feature,version){var versions=this._features[feature.toLowerCase()];return!(!versions||version&&!(version in versions))},createDocument:function(namespaceURI,qualifiedName,doctype){var doc=new Document;if(doc.implementation=this,doc.childNodes=new NodeList,doc.doctype=doctype,doctype&&doc.appendChild(doctype),qualifiedName){var root=doc.createElementNS(namespaceURI,qualifiedName);doc.appendChild(root)}return doc},createDocumentType:function(qualifiedName,publicId,systemId){var node=new DocumentType;return node.name=qualifiedName,node.nodeName=qualifiedName,node.publicId=publicId,node.systemId=systemId,node}},Node.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(newChild,refChild){return _insertBefore(this,newChild,refChild)},replaceChild:function(newChild,oldChild){this.insertBefore(newChild,oldChild),oldChild&&this.removeChild(oldChild)},removeChild:function(oldChild){return _removeChild(this,oldChild)},appendChild:function(newChild){return this.insertBefore(newChild,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(deep){return function cloneNode(doc,node,deep){var node2=new node.constructor;for(var n in node){var v=node[n];"object"!=typeof v&&v!=node2[n]&&(node2[n]=v)}node.childNodes&&(node2.childNodes=new NodeList);node2.ownerDocument=doc;switch(node2.nodeType){case ELEMENT_NODE:var attrs=node.attributes,attrs2=node2.attributes=new NamedNodeMap,len=attrs.length;attrs2._ownerElement=node2;for(var i=0;i<len;i++)node2.setAttributeNode(cloneNode(doc,attrs.item(i),!0));break;case ATTRIBUTE_NODE:deep=!0}if(deep)for(var child=node.firstChild;child;)node2.appendChild(cloneNode(doc,child,deep)),child=child.nextSibling;return node2}(this.ownerDocument||this,this,deep)},normalize:function(){for(var child=this.firstChild;child;){var next=child.nextSibling;next&&next.nodeType==TEXT_NODE&&child.nodeType==TEXT_NODE?(this.removeChild(next),child.appendData(next.data)):(child.normalize(),child=next)}},isSupported:function(feature,version){return this.ownerDocument.implementation.hasFeature(feature,version)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(namespaceURI){for(var el=this;el;){var map=el._nsMap;if(map)for(var n in map)if(map[n]==namespaceURI)return n;el=el.nodeType==ATTRIBUTE_NODE?el.ownerDocument:el.parentNode}return null},lookupNamespaceURI:function(prefix){for(var el=this;el;){var map=el._nsMap;if(map&&prefix in map)return map[prefix];el=el.nodeType==ATTRIBUTE_NODE?el.ownerDocument:el.parentNode}return null},isDefaultNamespace:function(namespaceURI){return null==this.lookupPrefix(namespaceURI)}},copy(NodeType,Node),copy(NodeType,Node.prototype),Document.prototype={nodeName:"#document",nodeType:DOCUMENT_NODE,doctype:null,documentElement:null,_inc:1,insertBefore:function(newChild,refChild){if(newChild.nodeType==DOCUMENT_FRAGMENT_NODE){for(var child=newChild.firstChild;child;){var next=child.nextSibling;this.insertBefore(child,refChild),child=next}return newChild}return null==this.documentElement&&newChild.nodeType==ELEMENT_NODE&&(this.documentElement=newChild),_insertBefore(this,newChild,refChild),newChild.ownerDocument=this,newChild},removeChild:function(oldChild){return this.documentElement==oldChild&&(this.documentElement=null),_removeChild(this,oldChild)},importNode:function(importedNode,deep){return function importNode(doc,node,deep){var node2;switch(node.nodeType){case ELEMENT_NODE:(node2=node.cloneNode(!1)).ownerDocument=doc;case DOCUMENT_FRAGMENT_NODE:break;case ATTRIBUTE_NODE:deep=!0}node2||(node2=node.cloneNode(!1));node2.ownerDocument=doc;node2.parentNode=null;if(deep)for(var child=node.firstChild;child;)node2.appendChild(importNode(doc,child,deep)),child=child.nextSibling;return node2}(this,importedNode,deep)},getElementById:function(id){var rtv=null;return _visitNode(this.documentElement,function(node){if(node.nodeType==ELEMENT_NODE&&node.getAttribute("id")==id)return rtv=node,!0}),rtv},createElement:function(tagName){var node=new Element;return node.ownerDocument=this,node.nodeName=tagName,node.tagName=tagName,node.childNodes=new NodeList,(node.attributes=new NamedNodeMap)._ownerElement=node,node},createDocumentFragment:function(){var node=new DocumentFragment;return node.ownerDocument=this,node.childNodes=new NodeList,node},createTextNode:function(data){var node=new Text;return node.ownerDocument=this,node.appendData(data),node},createComment:function(data){var node=new Comment;return node.ownerDocument=this,node.appendData(data),node},createCDATASection:function(data){var node=new CDATASection;return node.ownerDocument=this,node.appendData(data),node},createProcessingInstruction:function(target,data){var node=new ProcessingInstruction;return node.ownerDocument=this,node.tagName=node.target=target,node.nodeValue=node.data=data,node},createAttribute:function(name){var node=new Attr;return node.ownerDocument=this,node.name=name,node.nodeName=name,node.localName=name,node.specified=!0,node},createEntityReference:function(name){var node=new EntityReference;return node.ownerDocument=this,node.nodeName=name,node},createElementNS:function(namespaceURI,qualifiedName){var node=new Element,pl=qualifiedName.split(":"),attrs=node.attributes=new NamedNodeMap;return node.childNodes=new NodeList,node.ownerDocument=this,node.nodeName=qualifiedName,node.tagName=qualifiedName,node.namespaceURI=namespaceURI,2==pl.length?(node.prefix=pl[0],node.localName=pl[1]):node.localName=qualifiedName,attrs._ownerElement=node,node},createAttributeNS:function(namespaceURI,qualifiedName){var node=new Attr,pl=qualifiedName.split(":");return node.ownerDocument=this,node.nodeName=qualifiedName,node.name=qualifiedName,node.namespaceURI=namespaceURI,node.specified=!0,2==pl.length?(node.prefix=pl[0],node.localName=pl[1]):node.localName=qualifiedName,node}},_extends(Document,Node),Element.prototype={nodeType:ELEMENT_NODE,hasAttribute:function(name){return null!=this.getAttributeNode(name)},getAttribute:function(name){var attr=this.getAttributeNode(name);return attr&&attr.value||""},getAttributeNode:function(name){return this.attributes.getNamedItem(name)},setAttribute:function(name,value){var attr=this.ownerDocument.createAttribute(name);attr.value=attr.nodeValue=""+value,this.setAttributeNode(attr)},removeAttribute:function(name){var attr=this.getAttributeNode(name);attr&&this.removeAttributeNode(attr)},appendChild:function(newChild){return newChild.nodeType===DOCUMENT_FRAGMENT_NODE?this.insertBefore(newChild,null):function(parentNode,newChild){var cp=newChild.parentNode;if(cp){var pre=parentNode.lastChild;cp.removeChild(newChild),pre=parentNode.lastChild}return pre=parentNode.lastChild,newChild.parentNode=parentNode,newChild.previousSibling=pre,newChild.nextSibling=null,pre?pre.nextSibling=newChild:parentNode.firstChild=newChild,parentNode.lastChild=newChild,_onUp
vendor: 4,734 bytes, line 1
1dateChild(parentNode.ownerDocument,parentNode,newChild),newChild}(this,newChild)},setAttributeNode:function(newAttr){return this.attributes.setNamedItem(newAttr)},setAttributeNodeNS:function(newAttr){return this.attributes.setNamedItemNS(newAttr)},removeAttributeNode:function(oldAttr){return this.attributes.removeNamedItem(oldAttr.nodeName)},removeAttributeNS:function(namespaceURI,localName){var old=this.getAttributeNodeNS(namespaceURI,localName);old&&this.removeAttributeNode(old)},hasAttributeNS:function(namespaceURI,localName){return null!=this.getAttributeNodeNS(namespaceURI,localName)},getAttributeNS:function(namespaceURI,localName){var attr=this.getAttributeNodeNS(namespaceURI,localName);return attr&&attr.value||""},setAttributeNS:function(namespaceURI,qualifiedName,value){var attr=this.ownerDocument.createAttributeNS(namespaceURI,qualifiedName);attr.value=attr.nodeValue=""+value,this.setAttributeNode(attr)},getAttributeNodeNS:function(namespaceURI,localName){return this.attributes.getNamedItemNS(namespaceURI,localName)},getElementsByTagName:function(tagName){return new LiveNodeList(this,function(base){var ls=[];return _visitNode(base,function(node){node===base||node.nodeType!=ELEMENT_NODE||"*"!==tagName&&node.tagName!=tagName||ls.push(node)}),ls})},getElementsByTagNameNS:function(namespaceURI,localName){return new LiveNodeList(this,function(base){var ls=[];return _visitNode(base,function(node){node===base||node.nodeType!==ELEMENT_NODE||"*"!==namespaceURI&&node.namespaceURI!==namespaceURI||"*"!==localName&&node.localName!=localName||ls.push(node)}),ls})}},Document.prototype.getElementsByTagName=Element.prototype.getElementsByTagName,Document.prototype.getElementsByTagNameNS=Element.prototype.getElementsByTagNameNS,_extends(Element,Node),Attr.prototype.nodeType=ATTRIBUTE_NODE,_extends(Attr,Node),CharacterData.prototype={data:"",substringData:function(offset,count){return this.data.substring(offset,offset+count)},appendData:function(text){text=this.data+text,this.nodeValue=this.data=text,this.length=text.length},insertData:function(offset,text){this.replaceData(offset,0,text)},appendChild:function(newChild){throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])},deleteData:function(offset,count){this.replaceData(offset,count,"")},replaceData:function(offset,count,text){text=this.data.substring(0,offset)+text+this.data.substring(offset+count),this.nodeValue=this.data=text,this.length=text.length}},_extends(CharacterData,Node),Text.prototype={nodeName:"#text",nodeType:TEXT_NODE,splitText:function(offset){var text=this.data,newText=text.substring(offset);text=text.substring(0,offset),this.data=this.nodeValue=text,this.length=text.length;var newNode=this.ownerDocument.createTextNode(newText);return this.parentNode&&this.parentNode.insertBefore(newNode,this.nextSibling),newNode}},_extends(Text,CharacterData),Comment.prototype={nodeName:"#comment",nodeType:COMMENT_NODE},_extends(Comment,CharacterData),CDATASection.prototype={nodeName:"#cdata-section",nodeType:CDATA_SECTION_NODE},_extends(CDATASection,CharacterData),DocumentType.prototype.nodeType=DOCUMENT_TYPE_NODE,_extends(DocumentType,Node),Notation.prototype.nodeType=NOTATION_NODE,_extends(Notation,Node),Entity.prototype.nodeType=ENTITY_NODE,_extends(Entity,Node),EntityReference.prototype.nodeType=ENTITY_REFERENCE_NODE,_extends(EntityReference,Node),DocumentFragment.prototype.nodeName="#document-fragment",DocumentFragment.prototype.nodeType=DOCUMENT_FRAGMENT_NODE,_extends(DocumentFragment,Node),ProcessingInstruction.prototype.nodeType=PROCESSING_INSTRUCTION_NODE,_extends(ProcessingInstruction,Node),XMLSerializer.prototype.serializeToString=function(node,isHtml,nodeFilter){return nodeSerializeToString.call(node,isHtml,nodeFilter)},Node.prototype.toString=nodeSerializeToString;try{if(Object.defineProperty){Object.defineProperty(LiveNodeList.prototype,"length",{get:function(){return _updateLiveList(this),this.$$length}}),Object.defineProperty(Node.prototype,"textContent",{get:function(){return function getTextContent(node){switch(node.nodeType){case ELEMENT_NODE:case DOCUMENT_FRAGMENT_NODE:var buf=[];for(node=node.firstChild;node;)7!==node.nodeType&&8!==node.nodeType&&buf.push(getTextContent(node)),node=node.nextSibling;return buf.join("");default:return node.nodeValue}}(this)},set:function(data){switch(this.nodeType){case ELEMENT_NODE:case DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(data||String(data))&&this.appendChild(this.ownerDocument.createTextNode(data));break;default:this.data=data,this.value=data,this.nodeValue=data}}}),__set__=function(object,key,value){object["$$"+key]=value}}}catch(e){}exports.DOMImplementation=DOMImplementation,exports.XMLSerializer
vendor: 5,425 bytes, line 1
1=XMLSerializer},{}],124:[function(require,module,exports){var nameStartChar=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,nameChar=new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),tagNamePattern=new RegExp("^"+nameStartChar.source+nameChar.source+"*(?::"+nameStartChar.source+nameChar.source+"*)?$"),S_TAG=0,S_ATTR=1,S_ATTR_SPACE=2,S_EQ=3,S_ATTR_NOQUOT_VALUE=4,S_ATTR_END=5,S_TAG_SPACE=6,S_TAG_CLOSE=7;function XMLReader(){}function copyLocator(f,t){return t.lineNumber=f.lineNumber,t.columnNumber=f.columnNumber,t}function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){for(var attrName,p=++start,s=S_TAG;;){var c=source.charAt(p);switch(c){case"=":if(s===S_ATTR)attrName=source.slice(start,p),s=S_EQ;else{if(s!==S_ATTR_SPACE)throw new Error("attribute equal must after attrName");s=S_EQ}break;case"'":case'"':if(s===S_EQ||s===S_ATTR){if(s===S_ATTR&&(errorHandler.warning('attribute value must after "="'),attrName=source.slice(start,p)),start=p+1,!((p=source.indexOf(c,start))>0))throw new Error("attribute value no end '"+c+"' match");value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer),el.add(attrName,value,start-1),s=S_ATTR_END}else{if(s!=S_ATTR_NOQUOT_VALUE)throw new Error('attribute value must after "="');value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer),el.add(attrName,value,start),errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+")!!"),start=p+1,s=S_ATTR_END}break;case"/":switch(s){case S_TAG:el.setTagName(source.slice(start,p));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:s=S_TAG_CLOSE,el.closed=!0;case S_ATTR_NOQUOT_VALUE:case S_ATTR:case S_ATTR_SPACE:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return errorHandler.error("unexpected end of input"),s==S_TAG&&el.setTagName(source.slice(start,p)),p;case">":switch(s){case S_TAG:el.setTagName(source.slice(start,p));case S_ATTR_END:case S_TAG_SPACE:case S_TAG_CLOSE:break;case S_ATTR_NOQUOT_VALUE:case S_ATTR:"/"===(value=source.slice(start,p)).slice(-1)&&(el.closed=!0,value=value.slice(0,-1));case S_ATTR_SPACE:s===S_ATTR_SPACE&&(value=attrName),s==S_ATTR_NOQUOT_VALUE?(errorHandler.warning('attribute "'+value+'" missed quot(")!!'),el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)):("http://www.w3.org/1999/xhtml"===currentNSMap[""]&&value.match(/^(?:disabled|checked|selected)$/i)||errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!'),el.add(value,value,start));break;case S_EQ:throw new Error("attribute value missed!!")}return p;case"Â":c=" ";default:if(c<=" ")switch(s){case S_TAG:el.setTagName(source.slice(start,p)),s=S_TAG_SPACE;break;case S_ATTR:attrName=source.slice(start,p),s=S_ATTR_SPACE;break;case S_ATTR_NOQUOT_VALUE:var value=source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);errorHandler.warning('attribute "'+value+'" missed quot(")!!'),el.add(attrName,value,start);case S_ATTR_END:s=S_TAG_SPACE}else switch(s){case S_ATTR_SPACE:el.tagName;"http://www.w3.org/1999/xhtml"===currentNSMap[""]&&attrName.match(/^(?:disabled|checked|selected)$/i)||errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!'),el.add(attrName,attrName,start),start=p,s=S_ATTR;break;case S_ATTR_END:errorHandler.warning('attribute space is required"'+attrName+'"!!');case S_TAG_SPACE:s=S_ATTR,start=p;break;case S_EQ:s=S_ATTR_NOQUOT_VALUE,start=p;break;case S_TAG_CLOSE:throw new Error("elements closed character '/' and '>' must be connected to")}}p++}}function appendElement(el,domBuilder,currentNSMap){for(var tagName=el.tagName,localNSMap=null,i=el.length;i--;){var a=el[i],qName=a.qName,value=a.value;if((nsp=qName.indexOf(":"))>0)var prefix=a.prefix=qName.slice(0,nsp),localName=qName.slice(nsp+1),nsPrefix="xmlns"===prefix&&localName;else localName=qName,prefix=null,nsPrefix="xmlns"===qName&&"";a.localName=localName,!1!==nsPrefix&&(null==localNSMap&&(localNSMap={},_copy(currentNSMap,currentNSMap={})),currentNSMap[nsPrefix]=localNSMap[nsPrefix]=value,a.uri="http://www.w3.org/2000/xmlns/",domBuilder.startPrefixMapping(nsPrefix,value))}for(i=el.length;i--;){(prefix=(a=el[i]).prefix)&&("xml"===prefix&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==prefix&&(a.uri=currentNSMap[prefix||""]))}var nsp;(nsp=tagName.indexOf(":"))>0?(prefix=el.prefix=tagName.slice(0,nsp),localName=el.localName=tagName.slice(nsp+1)):(prefix=null,localName=el.localName=tagName);var ns=el.uri=currentNSMap[prefix||""];if(domBuilder.startElement(ns,localName,tagName,el),!el.closed)return el.currentNSMap=currentNSMap,el.localNSMap=localNSMap,!0;if(domBuilder.endElement(ns,localName,tagName),localNSMap)for(prefix in localNSMap)domBuilder.endPrefixMapping(prefix)}function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){if(/^(?:script|textarea)$/i.test(tagName)){var elEndStart=source.indexOf("</"+tagName+">",elStartEnd),text=source.substring(elStartEnd+1,elEndStart);if(/[&<]/.test(text))return/^script$/i.test(tagName)?(domBuilder.characters(text,0,text.length),elEndStart):(text=text.replace(/&#?\w+;/g,entityReplacer),domBuilder.characters(text,0,text.length),elEndStart)}return elStartEnd+1}function fixSelfClosed(source,elStartEnd,tagName,closeMap){var pos=closeMap[tagName];
vendor: 6,025 bytes, line 1
1return null==pos&&((pos=source.lastIndexOf("</"+tagName+">"))<elStartEnd&&(pos=source.lastIndexOf("</"+tagName)),closeMap[tagName]=pos),pos<elStartEnd}function _copy(source,target){for(var n in source)target[n]=source[n]}function parseDCC(source,start,domBuilder,errorHandler){switch(source.charAt(start+2)){case"-":return"-"===source.charAt(start+3)?(end=source.indexOf("--\x3e",start+4))>start?(domBuilder.comment(source,start+4,end-start-4),end+3):(errorHandler.error("Unclosed comment"),-1):-1;default:if("CDATA["==source.substr(start+3,6)){var end=source.indexOf("]]>",start+9);return domBuilder.startCDATA(),domBuilder.characters(source,start+9,end-start-9),domBuilder.endCDATA(),end+3}var matchs=function(source,start){var match,buf=[],reg=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;reg.lastIndex=start,reg.exec(source);for(;match=reg.exec(source);)if(buf.push(match),match[1])return buf}(source,start),len=matchs.length;if(len>1&&/!doctype/i.test(matchs[0][0])){var name=matchs[1][0],pubid=len>3&&/^public$/i.test(matchs[2][0])&&matchs[3][0],sysid=len>4&&matchs[4][0],lastMatch=matchs[len-1];return domBuilder.startDTD(name,pubid&&pubid.replace(/^(['"])(.*?)\1$/,"$2"),sysid&&sysid.replace(/^(['"])(.*?)\1$/,"$2")),domBuilder.endDTD(),lastMatch.index+lastMatch[0].length}}return-1}function parseInstruction(source,start,domBuilder){var end=source.indexOf("?>",start);if(end){var match=source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(match){match[0].length;return domBuilder.processingInstruction(match[1],match[2]),end+2}return-1}return-1}function ElementAttributes(source){}function _set_proto_(thiz,parent){return thiz.__proto__=parent,thiz}XMLReader.prototype={parse:function(source,defaultNSMap,entityMap){var domBuilder=this.domBuilder;domBuilder.startDocument(),_copy(defaultNSMap,defaultNSMap={}),function(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){function entityReplacer(a){var k=a.slice(1,-1);return k in entityMap?entityMap[k]:"#"===k.charAt(0)?function(code){if(code>65535){var surrogate1=55296+((code-=65536)>>10),surrogate2=56320+(1023&code);return String.fromCharCode(surrogate1,surrogate2)}return String.fromCharCode(code)}(parseInt(k.substr(1).replace("x","0x"))):(errorHandler.error("entity not found:"+a),a)}function appendText(end){if(end>start){var xt=source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);locator&&position(start),domBuilder.characters(xt,0,end-start),start=end}}function position(p,m){for(;p>=lineEnd&&(m=linePattern.exec(source));)lineStart=m.index,lineEnd=lineStart+m[0].length,locator.lineNumber++;locator.columnNumber=p-lineStart+1}var lineStart=0,lineEnd=0,linePattern=/.*(?:\r\n?|\n)|.*$/g,locator=domBuilder.locator,parseStack=[{currentNSMap:defaultNSMapCopy}],closeMap={},start=0;for(;;){try{var tagStart=source.indexOf("<",start);if(tagStart<0){if(!source.substr(start).match(/^\s*$/)){var doc=domBuilder.doc,text=doc.createTextNode(source.substr(start));doc.appendChild(text),domBuilder.currentElement=text}return}switch(tagStart>start&&appendText(tagStart),source.charAt(tagStart+1)){case"/":var end=source.indexOf(">",tagStart+3),tagName=source.substring(tagStart+2,end),config=parseStack.pop();end<0?(tagName=source.substring(tagStart+2).replace(/[\s<].*/,""),errorHandler.error("end tag name: "+tagName+" is not complete:"+config.tagName),end=tagStart+1+tagName.length):tagName.match(/\s</)&&(tagName=tagName.replace(/[\s<].*/,""),errorHandler.error("end tag name: "+tagName+" maybe not complete"),end=tagStart+1+tagName.length);var localNSMap=config.localNSMap,endMatch=config.tagName==tagName,endIgnoreCaseMach=endMatch||config.tagName&&config.tagName.toLowerCase()==tagName.toLowerCase();if(endIgnoreCaseMach){if(domBuilder.endElement(config.uri,config.localName,tagName),localNSMap)for(var prefix in localNSMap)domBuilder.endPrefixMapping(prefix);endMatch||errorHandler.fatalError("end tag name: "+tagName+" is not match the current start tagName:"+config.tagName)}else parseStack.push(config);end++;break;case"?":locator&&position(tagStart),end=parseInstruction(source,tagStart,domBuilder);break;case"!":locator&&position(tagStart),end=parseDCC(source,tagStart,domBuilder,errorHandler);break;default:locator&&position(tagStart);var el=new ElementAttributes,currentNSMap=parseStack[parseStack.length-1].currentNSMap,end=parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler),len=el.length;if(!el.closed&&fixSelfClosed(source,end,el.tagName,closeMap)&&(el.closed=!0,entityMap.nbsp||errorHandler.warning("unclosed xml attribute")),locator&&len){for(var locator2=copyLocator(locator,{}),i=0;i<len;i++){var a=el[i];position(a.offset),a.locator=copyLocator(locator,{})}domBuilder.locator=locator2,appendElement(el,domBuilder,currentNSMap)&&parseStack.push(el),domBuilder.locator=locator}else appendElement(el,domBuilder,currentNSMap)&&parseStack.push(el);"http://www.w3.org/1999/xhtml"!==el.uri||el.closed?end++:end=parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)}}catch(e){errorHandler.error("element parse error: "+e),end=-1}end>start?start=end:appendText(Math.max(tagStart,start)+1)}}(source,defaultNSMap,entityMap,domBuilder,this.errorHandler),domBuilder.endDocument()}},ElementAttributes.prototype={setTagName:function(tagName){if(!tagNamePattern.test(tagName))throw new Error("invalid tagName:"+tagName);this.tagName=tagName},add:function(qName,value,offset){if(!tagNamePattern.test(qName))throw new Error("invalid attribute:"+qName);this[this.length++]={qName:qName,value:value,offset:offset}},length:0,getLocalName:function(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}},_set_proto_({},_set_proto_.prototype)instanceof _set_proto_||(_set_proto_=function(thiz,parent){function p(){}for(parent in p.prototype=parent,p=new p,thiz)p[parent]=thiz[parent];return p}),exports.XMLReader=XMLReader},{}]},{},[1]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.