tcplayer.js 5.3.1 → 5.3.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.TCPlayer=e()}(this,function(){function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function each(t,e){keys(t).forEach(function(n){return e(t[n],n)})}function reduce(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;return keys(t).reduce(function(n,r){return e(n,t[r],r)},n)}function assign(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[t].concat(n)):(n.forEach(function(e){e&&each(e,function(e,n){t[n]=e})}),t)}function isObject$1(t){return!!t&&"object"===(void 0===t?"undefined":_typeof(t))}function isPlain(t){return isObject$1(t)&&"[object Object]"===toString.call(t)&&t.constructor===Object}function isFunction(t){return"function"==typeof t&&"number"!=typeof t.nodeType}function clean(t){return t.replace(/\n\r?\s*/g,"")}function computedStyle(t,e){if(!t||!e)return"";if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(t);return n?n[e]:""}return t.currentStyle[e]||""}function isNonBlankString(t){return"string"==typeof t&&/\S/.test(t)}function throwIfWhitespace(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function classRegExp(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function isReal(){return document_1===window_1.document&&"undefined"!=typeof document_1.createElement}function isEl(t){return isObject$1(t)&&1===t.nodeType}function isInFrame(){try{return window_1.parent!==window_1.self}catch(t){return!0}}function createQuerier(t){return function(e,n){if(!isNonBlankString(e))return document_1[t](null);isNonBlankString(n)&&(n=document_1.querySelector(n));var r=isEl(n)?n:document_1;return r[t]&&r[t](e)}}function createEl(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"div",e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},r=arguments[3],i=document_1.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(log$2.warn(tsml(_templateObject,t,n)),i.setAttribute(t,n)):"textContent"===t?textContent(i,n):i[t]=n}),Object.getOwnPropertyNames(n).forEach(function(t){i.setAttribute(t,n[t])}),r&&appendContent(i,r),i}function textContent(t,e){return"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e,t}function prependTo(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function hasClass(t,e){return throwIfWhitespace(e),t.classList?t.classList.contains(e):classRegExp(e).test(t.className)}function addClass(t,e){return t.classList?t.classList.add(e):hasClass(t,e)||(t.className=(t.className+" "+e).trim()),t}function removeClass(t,e){return t.classList?t.classList.remove(e):(throwIfWhitespace(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function toggleClass(t,e,n){var r=hasClass(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?addClass(t,e):removeClass(t,e),t}function setAttributes(t,e){Object.getOwnPropertyNames(e).forEach(function(n){var r=e[n];null===r||void 0===r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)})}function getAttributes(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof t[i]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),e[i]=o}return e}function getAttribute(t,e){return t.getAttribute(e)}function setAttribute(t,e,n){t.setAttribute(e,n)}function removeAttribute(t,e){t.removeAttribute(e)}function blockTextSelection(){document_1.body.focus(),document_1.onselectstart=function(){return!1}}function unblockTextSelection(){document_1.onselectstart=function(){return!0}}function getBoundingClientRect(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(t){e[t]!==undefined&&(n[t]=e[t])}),n.height||(n.height=parseFloat(computedStyle(t,"height"))),n.width||(n.width=parseFloat(computedStyle(t,"width"))),n}}function findPosition(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=document_1.documentElement,r=document_1.body,i=n.clientLeft||r.clientLeft||0,o=window_1.pageXOffset||r.scrollLeft,s=e.left+o-i,a=n.clientTop||r.clientTop||0,l=window_1.pageYOffset||r.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function getPointerPosition(t,e,n){var r={},i=findPosition(t),o=t.offsetWidth,s=t.offsetHeight,a=i.top,l=i.left,c=e.pageY,u=e.pageX;if(e.changedTouches&&(u=e.changedTouches[0].pageX,c=e.changedTouches[0].pageY),n){var h=[c,u];u=h[0],c=h[1]}return r.y=Math.max(0,Math.min(1,(a-c+s)/s)),r.x=Math.max(0,Math.min(1,(u-l)/o)),r}function isTextNode(t){return isObject$1(t)&&3===t.nodeType}function emptyEl(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function normalizeContent(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),isEl(t)||isTextNode(t)?t:"string"==typeof t&&/\S/.test(t)?document_1.createTextNode(t):void 0}).filter(function(t){return t})}function appendContent(t,e){return normalizeContent(e).forEach(function(e){return t.appendChild(e)}),t}function insertContent(t,e){return appendContent(emptyEl(t),e)}function isSingleLeftClick(t){return t.button===undefined&&t.buttons===undefined||(0===t.button&&t.buttons===undefined||(9===IE_VERSION||0===t.button&&1===t.buttons))}function newGUID(){return _guid++}function getData(t){var e=t[elIdAttr];return e||(e=t[elIdAttr]=newGUID()),elData[e]||(elData[e]={}),elData[e]}function hasData(t){var e=t[elIdAttr];return!!e&&!!Object.getOwnPropertyNames(elData[e]).length}function removeData(t){var e=t[elIdAttr];if(e){delete elData[e];try{delete t[elIdAttr]}catch(n){t.removeAttribute?t.removeAttribute(elIdAttr):t[elIdAttr]=null}}}function _cleanUpEvents(t,e){var n=getData(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&removeData(t)}function _handleMultipleEvents(t,e,n,r){n.forEach(function(n){t(e,n,r)})}function fixEvent(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||window_1.event;t={};for(var i in r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(t[i]=r[i]));if(t.target||(t.target=t.srcElement||document_1),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&t.clientX!==undefined){var o=document_1.documentElement,s=document_1.body;t.pageX=t.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&t.button!==undefined&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}function on(t,e,n){if(Array.isArray(e))return _handleMultipleEvents(on,t,e,n);var r=getData(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=newGUID()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=fixEvent(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),s=0,a=o.length;s<a&&(!e.isImmediatePropagationStopped||!e.isImmediatePropagationStopped());s++)try{o[s].call(t,e,n)}catch(l){log$2.error(l)}}}),1===r.handlers[e].length)if(t.addEventListener){var i=!1;_supportsPassive&&passiveEvents.indexOf(e)>-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function off(t,e,n){if(hasData(t)){var r=getData(t);if(r.handlers){if(Array.isArray(e))return _handleMultipleEvents(off,t,e,n);var i=function(t,e){r.handlers[e]=[],_cleanUpEvents(t,e)};if(e!==undefined){var o=r.handlers[e];if(o){if(!n)return void i(t,e);if(n.guid)for(var s=0;s<o.length;s++)o[s].guid===n.guid&&o.splice(s--,1);_cleanUpEvents(t,e)}}else for(var a in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},a)&&i(t,a)}}}function trigger(t,e,n){var r=hasData(t)?getData(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e&&(e={type:e,target:t}),e=fixEvent(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)trigger.call(null,i,e,n);else if(!i&&!e.defaultPrevented){var o=getData(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function one(t,e,n){if(Array.isArray(e))return _handleMultipleEvents(one,t,e,n);var r=function i(){off(t,e,i),n.apply(this,arguments)};r.guid=n.guid=n.guid||newGUID(),on(t,e,r)}function autoSetupTimeout(t,e){e&&(videojs$2=e),window_1.setTimeout(autoSetup,t)}function evented(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=createEl("span",{className:"vjs-event-bus"});return assign(t,EventedMixin),t.on("dispose",function(){t.off(),window_1.setTimeout(function(){t.eventBusEl_=null},0)}),t}function stateful(t,e){return assign(t,StatefulMixin),t.state=assign({},t.state,e),"function"==typeof t.handleStateChanged&&isEvented(t)&&t.on("statechanged",t.handleStateChanged),t}function toTitleCase(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function titleCaseEquals(t,e){return toTitleCase(t)===toTitleCase(e)}function mergeOptions(){for(var t={},e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(function(e){e&&each(e,function(e,n){if(!isPlain(e))return void(t[n]=e);isPlain(t[n])||(t[n]={}),t[n]=mergeOptions(t[n],e)})}),t}function extend(){var t,e,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"===(void 0===s?"undefined":_typeof(s))||isFunction(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],r=t[e],s!==r&&(c&&r&&(isPlain(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&isPlain(n)?n:{},s[e]=extend(c,o,r)):r!==undefined&&(s[e]=r));return s}function getRawTag(t){var e=hasOwnProperty.call(t,symToStringTag$1),n=t[symToStringTag$1];try{t[symToStringTag$1]=undefined;var r=!0}catch(o){}var i=nativeObjectToString.call(t);return r&&(e?t[symToStringTag$1]=n:delete t[symToStringTag$1]),i}function objectToString(t){return nativeObjectToString$1.call(t)}function baseGetTag(t){return null==t?t===undefined?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?_getRawTag(t):_objectToString(t)}function isObjectLike(t){return null!=t&&"object"==typeof t}function isSymbol(t){return"symbol"==typeof t||isObjectLike_1(t)&&_baseGetTag(t)==symbolTag}function isKey(t,e){if(isArray_1(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!isSymbol_1(t))||(reIsPlainProp.test(t)||!reIsDeepProp.test(t)||null!=e&&t in Object(e))}function isObject$2(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function isFunction$1(t){if(!isObject_1(t))return!1;var e=_baseGetTag(t);return e==funcTag||e==genTag||e==asyncTag||e==proxyTag}function isMasked(t){return!!maskSrcKey&&maskSrcKey in t}function toSource(t){if(null!=t){try{return funcToString$1.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function baseIsNative(t){return!(!isObject_1(t)||_isMasked(t))&&(isFunction_1(t)?reIsNative:reIsHostCtor).test(_toSource(t))}function getValue(t,e){return null==t?undefined:t[e]}function getNative(t,e){var n=_getValue(t,e);return _baseIsNative(n)?n:undefined}function hashClear(){this.__data__=_nativeCreate?_nativeCreate(null):{},this.size=0}function hashDelete(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function hashGet(t){var e=this.__data__;if(_nativeCreate){var n=e[t];return n===HASH_UNDEFINED?undefined:n}return hasOwnProperty$2.call(e,t)?e[t]:undefined}function hashHas(t){var e=this.__data__;return _nativeCreate?e[t]!==undefined:hasOwnProperty$3.call(e,t)}function hashSet(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=_nativeCreate&&e===undefined?HASH_UNDEFINED$1:e,this}function Hash(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(t,e){return t===e||t!==t&&e!==e}function assocIndexOf(t,e){for(var n=t.length;n--;)if(eq_1(t[n][0],e))return n;return-1}function listCacheDelete(t){var e=this.__data__,n=_assocIndexOf(e,t);return!(n<0)&&(n==e.length-1?e.pop():splice.call(e,n,1),--this.size,!0)}function listCacheGet(t){var e=this.__data__,n=_assocIndexOf(e,t);return n<0?undefined:e[n][1]}function listCacheHas(t){return _assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,e){var n=this.__data__,r=_assocIndexOf(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ListCache(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function mapCacheClear(){this.size=0,this.__data__={hash:new _Hash,map:new(_Map||_ListCache),string:new _Hash}}function isKeyable(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function getMapData(t,e){var n=t.__data__;return _isKeyable(e)?n["string"==typeof e?"string":"hash"]:n.map}function mapCacheDelete(t){var e=_getMapData(this,t)["delete"](t);return this.size-=e?1:0,e}function mapCacheGet(t){return _getMapData(this,t).get(t)}function mapCacheHas(t){return _getMapData(this,t).has(t)}function mapCacheSet(t,e){var n=_getMapData(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function MapCache(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function memoize(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(FUNC_ERROR_TEXT);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(memoize.Cache||_MapCache),n}function memoizeCapped(t){var e=memoize_1(t,function(t){return n.size===MAX_MEMOIZE_SIZE&&n.clear(),t}),n=e.cache;return e}function arrayMap(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function baseToString(t){if("string"==typeof t)return t;if(isArray_1(t))return _arrayMap(t,baseToString)+"";if(isSymbol_1(t))return symbolToString?symbolToString.call(t):"";var e=t+"";return"0"==e&&1/t==-INFINITY?"-0":e}function toString$1(t){return null==t?"":_baseToString(t)}function castPath(t,e){return isArray_1(t)?t:_isKey(t,e)?[t]:_stringToPath(toString_1(t))}function toKey(t){if("string"==typeof t||isSymbol_1(t))return t;var e=t+"";return"0"==e&&1/t==-INFINITY$1?"-0":e}function baseGet(t,e){e=_castPath(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[_toKey(e[n++])];return n&&n==r?t:undefined}function get$1(t,e,n){var r=null==t?undefined:_baseGet(t,e);return r===undefined?n:r}function getParams(t,e){var n=e.split("?")[1];if(n){var r=new RegExp("(^|&)"+t+"=([^&]*)(&|$)","i"),i=n.match(r);return null!=i?decodeURIComponent(i[2]):null}}function guid(){function t(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}function unifyProtocol(t){t=t.replace(/^(http|https):/,"");var e=window.location.protocol;return"http:"!=e&&"https:"!=e&&(e="https:"),t=e+t}function convertProtocol(t){var e=[];if(t.indexOf(".sdp")>-1)t=t.replace(".sdp",".flv"),e.push(t.replace(".sdp",".m3u8"));else{var n=t.replace("webrtc://","https://").replace("?",".flv?");-1===n.indexOf("?")&&-1===n.indexOf(".flv")&&(n+=".flv"),hlsSrc=t.replace("webrtc://","https://").replace("?",".m3u8?"),-1===hlsSrc.indexOf("?")&&-1===hlsSrc.indexOf(".m3u8")&&(hlsSrc+=".m3u8"),e.push(hlsSrc)}return e}function replaceHost(t,e){var n=/^http(s)?:\/\/(.*?)\//,r=t.match(n);return t.replace(r[2],e)}function getViewportSize(){var t=document,e=t.documentElement,n=t.body;return{width:e&&e.clientWidth||n&&n.offsetWidth||window.innerWidth||0,height:e&&e.clientHeight||n&&n.offsetHeight||window.innerHeight||0}}function getTimeStamp(){return(new Date).getTime()}function getTimeStampBySecond(){return Date.parse(new Date)/1e3}function loadCssText(t,e){var n=document.getElementById(t);if(n)n.innerHTML=e;else{var r=document.createElement("style");r.id=t,r.type="text/css",r.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(r)}}function releaseCssText(t){var e=document.getElementById(t);e&&e.remove()}function loadScript(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined&&arguments[3],i=document.createElement("script");if(i.onload=i.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||("function"==typeof e&&e(),i.onload=i.onreadystatechange=null,i.parentNode&&!r&&i.parentNode.removeChild(i))},i.onerror=function(t){e(!0)},n)for(var o in n)if(n.hasOwnProperty(o)){var s=n[o];null===s?i.removeAttribute(s):i.setAttribute(o,s)}i.src=t,document.getElementsByTagName("head")[0].appendChild(i)}function serializeParams(t){var e=[],n=function(t,n){n="function"==typeof n?n():n,n=null===n?"":n===undefined?"":n,e[e.length]=encodeURIComponent(t)+"="+encodeURIComponent(n)};return function r(t,i){var o=void 0,s=void 0,a=void 0;if(t)if(Array.isArray(i))for(o=0,s=i.length;o<s;o++)r(t+"["+("object"===_typeof(i[o])&&i[o]?o:"")+"]",i[o]);else if("[object Object]"===String(i))for(a in i)r(t+"["+a+"]",i[a]);else n(t,i);else if(Array.isArray(i))for(o=0,s=i.length;o<s;o++)n(i[o].name,i[o].value);else for(a in i)r(a,i[a]);return e}("",t).join("&")}function encodeHTML(t){return t.length?String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/\'/g,"&#39;").replace(/\//g,"&#x2F;"):""}function isWebrtcUrl(t){return/webrtc:\/\//.test(t)||/\.sdp/.test(t)}function getperformance(){return window.performance||window.msPerformance||window.webkitPerformance||{}}function arrangeWebrtcSource(t,e){var n=getParams("tabr_bitrates",t),r=getParams("tabr_start_bitrate",t),i="auto"===getParams("tabr_control",t);t=t.replace("&tabr_control=auto","");var o=[],s=[];if(n&&r){if(s=n.split(",").map(function(n){var i,s=e.webrtcConfig.abrLabels[n]||n;return o.push(s),i={},i[s]=[{src:t.replace("tabr_start_bitrate="+r,"tabr_start_bitrate="+n)}],i}),i){var a;s.push((a={},a[e.webrtcConfig.abrLabels.auto||"AUTO"]=[{src:t+"&tabr_control=auto"}],a)),o.push(e.webrtcConfig.abrLabels.auto||"AUTO")}var l={};s.forEach(function(t){for(var e in t)l[e]=t[e]}),e.showOrder=o,e.defaultRes=i?e.webrtcConfig.abrLabels.auto||"AUTO":e.webrtcConfig.abrLabels[r]||r||o[0];var c={};o.forEach(function(t){c[t]=e.webrtcConfig.abrLabels[t]||t}),e.labels=c,e.label=c,e.sources=[],e.multiResolution={sources:l}}}function rangeCheck(t,e,n){if("number"!=typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function getRange(t,e,n,r){return rangeCheck(t,r,n.length-1),n[r][e]}function createTimeRangesObj(t){return t===undefined||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:getRange.bind(null,"start",0,t),end:getRange.bind(null,"end",1,t)}}function createTimeRanges(t,e){return Array.isArray(t)?createTimeRangesObj(t):t===undefined||e===undefined?createTimeRangesObj():createTimeRangesObj([[t,e]])}function bufferedPercent(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=createTimeRanges(0,0));for(var o=0;o<t.length;o++)r=t.start(o),i=t.end(o),i>e&&(i=e),n+=i-r;return n/e}function MediaError(t){if(t instanceof MediaError)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:isObject$1(t)&&("number"==typeof t.code&&(this.code=t.code),assign(this,t)),this.message||(this.message=MediaError.defaultMessages[this.code]||"")}function SafeParseTuple(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(i){r=i}return[r,n]}function isPromise(t){return t!==undefined&&"function"==typeof t.then}function silencePromise(t){isPromise(t)&&t.then(null,function(t){})}function isFunction$3(t){if(!t)return!1;var e=toString$3.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}function extend$1(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)hasOwnProperty$4.call(n,r)&&(t[r]=n[r])}return t}function forEachArray(t,e){for(var n=0;n<t.length;n++)e(t[n])}function isEmpty(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function initParams(t,e,n){var r=t;return isFunction_1$2(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=immutable(e,{uri:t}),r.callback=n,r}function createXHR(t,e,n){return e=initParams(t,e,n),_createXHR(e)}function _createXHR(t){function e(){4===a.readyState&&setTimeout(i,0)}function n(){var t=undefined;if(t=a.response?a.response:a.responseText||getXml(a),y)try{t=JSON.parse(t)}catch(e){}return t}function r(t){return clearTimeout(u),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,v)}function i(){if(!c){var e;clearTimeout(u),e=t.useXDR&&a.status===undefined?200:1223===a.status?204:a.status;var r=v,i=null;return 0!==e?(r={body:n(),statusCode:e,method:p,headers:{},url:h,rawRequest:a},a.getAllResponseHeaders&&(r.headers=parseHeaders(a.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),s(i,r,r.body)}}if("undefined"==typeof t.callback)throw new Error("callback argument missing");var o=!1,s=function(e,n,r){o||(o=!0,t.callback(e,n,r))},a=t.xhr||null;a||(a=t.cors||t.useXDR?new createXHR.XDomainRequest:new createXHR.XMLHttpRequest);var l,c,u,h=a.url=t.uri||t.url,p=a.method=t.method||"GET",d=t.body||t.data,f=a.headers=t.headers||{},g=!!t.sync,y=!1,v={body:undefined,headers:{},statusCode:0,method:p,url:h,rawRequest:a};if("json"in t&&!1!==t.json&&(y=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),d=JSON.stringify(!0===t.json?d:t.json))),a.onreadystatechange=e,a.onload=i,a.onerror=r,a.onprogress=function(){},a.onabort=function(){c=!0},a.ontimeout=r,a.open(p,h,!g,t.username,t.password),g||(a.withCredentials=!!t.withCredentials),!g&&t.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,a.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}},t.timeout)),a.setRequestHeader)for(l in f)f.hasOwnProperty(l)&&a.setRequestHeader(l,f[l]);else if(t.headers&&!isEmpty(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(a.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(a),a.send(d||null),a}function getXml(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}function noop(){}function ParsingError(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function parseTimeStamp(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function Settings(){this.values=_objCreate(null)}function parseOptions(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var s=i[o].split(n);if(2===s.length){var a=s[0],l=s[1];e(a,l)}}}function parseCue(t,e,n){function r(){var e=parseTimeStamp(t);if(null===e)throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function i(){t=t.replace(/^\s+/,"")}var o=t;if(i(),e.startTime=r(),i(),"--\x3e"!==t.substr(0,3))throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);t=t.substr(3),i(),e.endTime=r(),i(),function(t,e){var r=new Settings;parseOptions(t,function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),s=o[0];r.integer(t,s),r.percent(t,s)&&r.set("snapToLines",!1),r.alt(t,s,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical",""),e.line=r.get("line","auto"),e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align","middle"),e.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}(t,e)}function parseContent(t,e){function n(t){return ESCAPE[t]}for(var r,i=t.document.createElement("div"),o=i,s=[];null!==(r=function(){if(!e)return null;var t=e.match(/^([^<]*)(<[^>]+>?)?/);return function(t){return e=e.substr(t.length),t}(t[1]?t[1]:t[2])}());)if("<"!==r[0])o.appendChild(t.document.createTextNode(function(t){for(;c=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(c[0],n);return t}(r)));else{if("/"===r[1]){s.length&&s[s.length-1]===r.substr(2).replace(">","")&&(s.pop(),o=o.parentNode);continue}var a,l=parseTimeStamp(r.substr(1,r.length-2));if(l){a=t.document.createProcessingInstruction("timestamp",l),o.appendChild(a);continue}var c=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!c)continue;if(!(a=function(e,n){var r=TAG_NAME[e];if(!r)return null;var i=t.document.createElement(r);i.localName=r;var o=TAG_ANNOTATION[e];return o&&n&&(i[o]=n.trim()),i}(c[1],c[3])))continue;if(!function(t,e){return!NEEDS_PARENT[e.localName]||NEEDS_PARENT[e.localName]===t.localName}(o,a))continue;c[2]&&(a.className=c[2].substr(1).replace("."," ")),s.push(c[1]),o.appendChild(a),o=a}return i}function isStrongRTLChar(t){for(var e=0;e<strongRTLRanges.length;e++){var n=strongRTLRanges[e];if(t>=n[0]&&t<=n[1])return!0}return!1}function determineBidi(t){function e(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function n(t){if(!t||!t.length)return null;var r=t.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):i}return"ruby"===r.tagName?n(t):r.childNodes?(e(t,r),n(t)):void 0}var r,i=[],o="";if(!t||!t.childNodes)return"ltr";for(e(i,t);o=n(i);)for(var s=0;s<o.length;s++)if(r=o.charCodeAt(s),isStrongRTLChar(r))return"rtl";return"ltr"}function computeLinePos(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;i<n.length&&n[i]!==e;i++)"showing"===n[i].mode&&r++;return-1*++r}function StyleBox(){}function CueStyleBox(t,e,n){var r=/MSIE\s8\.0/.test(navigator.userAgent),i="rgba(255, 255, 255, 1)",o="rgba(0, 0, 0, 0.8)";r&&(i="rgb(255, 255, 255)",o="rgb(0, 0, 0)"),StyleBox.call(this),this.cue=e,this.cueDiv=parseContent(t,e.text);var s={color:i,backgroundColor:o,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(s.writingMode=""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",s.unicodeBidi="plaintext"),this.applyStyles(s,this.cueDiv),this.div=t.document.createElement("div"),s={textAlign:"middle"===e.align?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(s.direction=determineBidi(this.cueDiv),s.writingMode=""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(s),this.div.appendChild(this.cueDiv);var a=0;switch(e.positionAlign){case"start":a=e.position;break;case"middle":a=e.position-e.size/2;break;case"end":a=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(a,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(a,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function BoxPosition(t){var e,n,r,i,o=/MSIE\s8\.0/.test(navigator.userAgent);if(t.div){n=t.div.offsetHeight,r=t.div.offsetWidth,i=t.div.offsetTop;var s=(s=t.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();t=t.div.getBoundingClientRect(),e=s?Math.max(s[0]&&s[0].height||0,t.height/s.length):0}this.left=t.left,this.right=t.right,this.top=t.top||i,this.height=t.height||n,this.bottom=t.bottom||i+(t.height||n),this.width=t.width||r,this.lineHeight=e!==undefined?e:t.lineHeight,o&&!this.lineHeight&&(this.lineHeight=13)}function moveBoxToLinePosition(t,e,n,r){var i=new BoxPosition(e),o=e.cue,s=computeLinePos(o),a=[];if(o.snapToLines){var l;switch(o.vertical){case"":a=["+y","-y"],l="height";break;case"rl":a=["+x","-x"],l="width";break;case"lr":a=["-x","+x"],l="width"}var c=i.lineHeight,u=c*Math.round(s),h=n[l]+c,p=a[0];Math.abs(u)>h&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),s<0&&(u+=""===o.vertical?n.height:n.width,a=a.reverse()),i.move(p,u)}else{var d=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":s-=d/2;break;case"end":s-=d}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(s,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(s,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(s,"%")})}a=["+y","-x","+x","-y"],i=new BoxPosition(e)}var f=function(t,e){for(var i,o=new BoxPosition(t),s=1,a=0;a<e.length;a++){for(;t.overlapsOppositeAxis(n,e[a])||t.within(n)&&t.overlapsAny(r);)t.move(e[a]);if(t.within(n))return t;var l=t.intersectPercentage(n);s>l&&(i=new BoxPosition(t),s=l),t=new BoxPosition(o)}return i||o}(i,a);e.move(f.toCSSCompatValues(n))}function WebVTT$1(){}function findDirectionSetting(t){return"string"==typeof t&&(!!directionSetting[t.toLowerCase()]&&t.toLowerCase())}function findAlignSetting(t){return"string"==typeof t&&(!!alignSetting[t.toLowerCase()]&&t.toLowerCase())}function extend$2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function VTTCue(t,e,n){var r=this,i=/MSIE\s8\.0/.test(navigator.userAgent),o={};i?r=document.createElement("custom"):o.enumerable=!0,r.hasBeenReset=!1
2
- ;var s="",a=!1,l=t,c=e,u=n,h=null,p="",d=!0,f="auto",g="start",y=50,v="middle",m=50,_="middle";if(Object.defineProperty(r,"id",extend$2({},o,{get:function(){return s},set:function(t){s=""+t}})),Object.defineProperty(r,"pauseOnExit",extend$2({},o,{get:function(){return a},set:function(t){a=!!t}})),Object.defineProperty(r,"startTime",extend$2({},o,{get:function(){return l},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");l=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",extend$2({},o,{get:function(){return c},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");c=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",extend$2({},o,{get:function(){return u},set:function(t){u=""+t,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",extend$2({},o,{get:function(){return h},set:function(t){h=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",extend$2({},o,{get:function(){return p},set:function(t){var e=findDirectionSetting(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",extend$2({},o,{get:function(){return d},set:function(t){d=!!t,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",extend$2({},o,{get:function(){return f},set:function(t){if("number"!=typeof t&&t!==autoKeyword)throw new SyntaxError("An invalid number or illegal string was specified.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",extend$2({},o,{get:function(){return g},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",extend$2({},o,{get:function(){return y},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",extend$2({},o,{get:function(){return v},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",extend$2({},o,{get:function(){return m},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",extend$2({},o,{get:function(){return _},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");_=e,this.hasBeenReset=!0}})),r.displayState=undefined,i)return r}function findScrollSetting(t){return"string"==typeof t&&(!!scrollSetting[t.toLowerCase()]&&t.toLowerCase())}function isValidPercentValue(t){return"number"==typeof t&&t>=0&&t<=100}function VTTRegion(){var t=100,e=3,n=0,r=100,i=0,o=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!isValidPercentValue(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorX must be between 0 and 100.");i=t}},scroll:{enumerable:!0,get:function(){return s},set:function(t){var e=findScrollSetting(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");s=e}}})}function createTrackHelper(t,e,n,r){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new ALL.text.TrackClass(i);return o.addTrack(s),s}function use(t,e){middlewares[t]=middlewares[t]||[],middlewares[t].push(e)}function setSource(t,e,n){t.setTimeout(function(){return setSourceHelper(e,middlewares[e.type],n,t)},1)}function setTech(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}function get$3(t,e,n){return t.reduceRight(middlewareIterator(n),e[n]())}function set$1(t,e,n,r){return e[n](t.reduce(middlewareIterator(n),r))}function middlewareIterator(t){return function(e,n){return n[t]?n[t](e):e}}function setSourceHelper(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],r=arguments[3],i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[],o=arguments.length>5&&arguments[5]!==undefined&&arguments[5],s=e[0],a=e.slice(1);if("string"==typeof s)setSourceHelper(t,middlewares[s],n,r,i,o);else if(s){var l=s(r);l.setSource(assign({},t),function(e,s){if(e)return setSourceHelper(t,a,n,r,i,o);i.push(l),setSourceHelper(s,t.type===s.type?a:middlewares[s.type],n,r,i,o)})}else a.length?setSourceHelper(t,a,n,r,i,o):o?n(t,i):setSourceHelper(t,middlewares["*"],n,r,i,!0)}function constructColor(t,e){return"rgba("+parseInt(t[1]+t[1],16)+","+parseInt(t[2]+t[2],16)+","+parseInt(t[3]+t[3],16)+","+e+")"}function tryUpdateStyle(t,e,n){try{t.style[e]=n}catch(r){return}}function formatTime(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===Infinity)&&(i=r=n="-"),i=i>0||s>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n}function formatDate(t,e){if(!t)return"";var n=new Date(t),r=n.getFullYear(),i=n.getMonth()+1,o=n.getDate(),s=n.getHours(),a=n.getMinutes();n.getSeconds();return r+"/"+i+"/"+o+" "+s+":"+(a<10?"0"+a:a)}function parseOptionValue(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function getSelectedOptionValue(t,e){return parseOptionValue(t.options[t.options.selectedIndex].value,e)}function setSelectedOption(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(parseOptionValue(t.options[r].value,n)===e){t.selectedIndex=r;break}}function videojs(t,e,n){var r=void 0;if("string"==typeof t){var i=videojs.getPlayers();if(0===t.indexOf("#")&&(t=t.slice(1)),i[t])return e&&log$2.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&i[t].ready(n),i[t];r=$("#"+t)}else r=t;if(!r||!r.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(r.player||Player.players[r.playerId])return r.player||Player.players[r.playerId];isEl(r)&&!document_1.body.contains(r)&&log$2.warn("The element supplied is not included in the DOM"),e=e||{},videojs.hooks("beforesetup").forEach(function(t){var n=t(r,mergeOptions(e));if(!isObject$1(n)||Array.isArray(n))return void log$2.error("please return an object in beforesetup hooks");e=mergeOptions(e,n)});var o=Component.getComponent("Player"),s=new o(r,e,n);return videojs.hooks("setup").forEach(function(t){return t(s)}),s}function toObject(t){if(null===t||t===undefined)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function shouldUseNative(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}function decodeComponents(t,e){try{return decodeURIComponent(t.join(""))}catch(i){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],decodeComponents(n),decodeComponents(r))}function decode(t){try{return decodeURIComponent(t)}catch(r){for(var e=t.match(singleMatcher),n=1;n<e.length;n++)t=decodeComponents(e,n).join(""),e=t.match(singleMatcher);return t}}function customDecodeURIComponent(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=multiMatcher.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(a){var r=decode(n[0]);r!==n[0]&&(e[n[0]]=r)}n=multiMatcher.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),o=0;o<i.length;o++){var s=i[o];t=t.replace(new RegExp(s,"g"),e[s])}return t}function encoderForArrayFormat(t){switch(t.arrayFormat){case"index":return function(e,n,r){return null===n?[encode(e,t),"[",r,"]"].join(""):[encode(e,t),"[",encode(r,t),"]=",encode(n,t)].join("")};case"bracket":return function(e,n){return null===n?encode(e,t):[encode(e,t),"[]=",encode(n,t)].join("")};default:return function(e,n){return null===n?encode(e,t):[encode(e,t),"=",encode(n,t)].join("")}}}function parserForArrayFormat(t){var e;switch(t.arrayFormat){case"index":return function(t,n,r){if(e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),!e)return void(r[t]=n);r[t]===undefined&&(r[t]={}),r[t][e[1]]=n};case"bracket":return function(t,n,r){return e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?r[t]===undefined?void(r[t]=[n]):void(r[t]=[].concat(r[t],n)):void(r[t]=n)};default:return function(t,e,n){if(n[t]===undefined)return void(n[t]=e);n[t]=[].concat(n[t],e)}}}function encode(t,e){return e.encode?e.strict?strictUriEncode(t):encodeURIComponent(t):t}function keysSorter(t){return Array.isArray(t)?t.sort():"object"==typeof t?keysSorter(Object.keys(t)).sort(function(t,e){return Number(t)-Number(e)}).map(function(e){return t[e]}):t}function extract(t){var e=t.indexOf("?");return-1===e?"":t.slice(e+1)}function parse(t,e){e=objectAssign({arrayFormat:"none"},e);var n=parserForArrayFormat(e),r=Object.create(null);return"string"!=typeof t?r:(t=t.trim().replace(/^[?#&]/,""))?(t.split("&").forEach(function(t){var e=t.replace(/\+/g," ").split("="),i=e.shift(),o=e.length>0?e.join("="):undefined;o=o===undefined?null:decodeUriComponent(o),n(decodeUriComponent(i),o,r)}),Object.keys(r).sort().reduce(function(t,e){var n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=keysSorter(n):t[e]=n,t},Object.create(null))):r}function jsonp(t,e,n){function r(){c.parentNode&&c.parentNode.removeChild(c),window[a]="",u&&clearTimeout(u)}function i(){window[a]&&r()}"function"==typeof e&&(n=e,e={}),e||(e={});var o,s=e.prefix||"__jp",a=e.name||s+count++,l=e.funcKey||"callback";o="object"==_typeof(e.param)?queryString.stringify(e.param):e.param;var c,u,h=null!=e.timeout?e.timeout:6e3,p=encodeURIComponent,d=document.getElementsByTagName("script")[0]||document.head;return h&&(u=setTimeout(function(){r(),n&&n(new Error("Timeout"))},h)),window[a]=function(t){r(),n&&n(null,t)},t+=(~t.indexOf("?")?"&":"?")+o+"&"+l+"="+p(a),t=t.replace("?&","?"),c=document.createElement("script"),c.setAttribute("src",t),c.setAttribute("async",!0),c.onload=function(t){},c.onreadystatechange=function(){"loaded"===this.readyState&&window[a]&&(r(),n&&n(new Error("ServerError")))},c.onerror=function(t){r(),n&&n(new Error("ServerError"))},d.parentNode.insertBefore(c,d),i}function mountHlsProvider(t){if(videojs.browser.IS_IOS&&videojs.browser.IS_MQQ||videojs.browser.IS_UC)return!1;if(videojs.browser.IS_ENABLED_MSE||videojs.browser.IS_SIMULATOR||t)try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(HlsSourceHandler,0)}catch(n){}}function handlePlaybackMetadataLoaded(t,e){function n(t){return"dash-audio-"+t}function r(t,e){return t.find(function(t){return n(t.index)===e.id})}var i=t.dash.mediaPlayer,o=i.getTracksFor("audio"),s=t.audioTracks();s.length&&e.clearTracks(["audio"]);var a=i.getCurrentTrackFor("audio");o.forEach(function(t){var e=t.lang;t.roles&&t.roles.length&&(e+=" ("+t.roles.join(", ")+")"),s.addTrack(new videojs.AudioTrack({enabled:t===a,id:n(t.index),kind:t.kind||"main",label:e,language:t.lang}))});var l=function(){for(var t=0;t<s.length;t++){var e=s[t];if(e.enabled){var n=r(o,e);i.setCurrentTrack(n)}else;}};s.addEventListener("change",l),t.dash.mediaPlayer.on(window.dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,function(){s.removeEventListener("change",l)})}function setupAudioTracks(t,e){t.dash.mediaPlayer.on(window.dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED,handlePlaybackMetadataLoaded.bind(null,t,e))}function find(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n]}function attachDashTextTracksToVideojs(t,e,n){function r(){for(var e=t.dash.mediaPlayer,r=t.textTracks(),o=-1,s=0;s<r.length;s+=1)!function(t){var e=r[t];if("showing"===e.mode){var s=find(i,function(t){return t.textTrack===e}),a=s?s.dashTrack:null;a&&(o=n.indexOf(a))}}(s);o!==e.getCurrentTextTrackIndex()&&e.setTextTrack(o)}var i=[],o=n.map(function(t){return{dashTrack:t,trackConfig:{label:t.lang,language:t.lang,srclang:t.lang,kind:t.kind}}}).map(function(e){var n=e.trackConfig,r=e.dashTrack,o=t.addRemoteTextTrack(n,!1);return i.push({textTrack:o.track,dashTrack:r}),o});return t.textTracks().on("change",r),t.dash.mediaPlayer.on(window_1.dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,function(){t.textTracks().off("change",r)}),r(),o}function setupTextTracks(t,e,n){function r(){o.forEach(t.removeRemoteTextTrack.bind(t)),o=[]}function i(a){var l=(a.index,a.tracks);s.off(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i),r(),l.length&&(o=attachDashTextTracksToVideojs(t,e,l,n))}window_1.VTTCue&&!/\[native code\]/.test(window_1.VTTCue.toString())&&(window_1.VTTCue=!1);var o=[];if(e.featuresNativeTextTracks)return void videojs.log.error("You must pass {html: {nativeCaptions: false}} in the videojs constructor to use text tracks in videojs-contrib-dash");var s=t.dash.mediaPlayer;s.on(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i),s.on(window_1.dashjs.MediaPlayer.events.CAN_PLAY,function(){s.off(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i)})}function mountDashProvider(t){(window_1.MediaSource||t)&&videojs.getTech("Html5").registerSourceHandler(videojs.DashSourceHandler(),0)}function getTemplate(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"fill",n=t,r="draw-"+e;return['<svg height="100%" width="100%" viewBox="0 0 484 348">\n <path class="'+r+'" transform="translate(4 4)" d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"/>\n <path transform="translate(4 4)" d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z" style="fill:#fff ;"/>\n </svg>','<svg height="100%" width="100%" viewBox="0 0 476 340">\n <path class="'+r+'" d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"/>\n <path d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z" style="fill:#fff ;"/>\n </svg>','<svg height="100%" width="100%" viewBox="0 14 96 68">\n <path class="'+r+'" d="M96,44.3v7.3c-0.1,7.7-1,15.5-1,15.5s-0.9,6.6-3.8,9.5c-3.6,3.8-7.7,3.8-9.6,4c-13.4,1-33.5,0.9-33.5,0.9 c-0.8,0-25-0.2-32.5-0.9c-2.1-0.4-6.9-0.3-10.6-4.1c-2.9-2.9-3.8-9.5-3.8-9.5s-1-7.7-1.1-15.5v-7.3c0.2-7.8,1.1-15.5,1.1-15.5 s0.9-6.6,3.8-9.5c3.6-3.8,7.7-3.8,9.6-4.1c13.4-1,33.5-0.9,33.5-0.9s20.1-0.1,33.5,0.9c1.9,0.2,5.9,0.2,9.6,4.1 c2.9,2.9,3.8,9.5,3.8,9.5S95.9,36.6,96,44.3z M38.3,61.4L64,47.9L38.3,34.4V61.4z"/>\n <polygon points="64,47.9 38.3,61.4 38.3,34.4" fill="#fff"/>\n </svg>'][n]}function trimmedEndIndex(t){for(var e=t.length;e--&&reWhitespace.test(t.charAt(e)););return e}function baseTrim(t){return t?t.slice(0,_trimmedEndIndex(t)+1).replace(reTrimStart,""):t}function toNumber(t){if("number"==typeof t)return t;if(isSymbol_1(t))return NAN;if(isObject_1(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=isObject_1(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=_baseTrim(t);var n=reIsBinary.test(t);return n||reIsOctal.test(t)?freeParseInt(t.slice(2),n?2:8):reIsBadHex.test(t)?NAN:+t}function debounce(t,e,n){function r(e){var n=p,r=d;return p=d=undefined,m=e,g=t.apply(r,n)}function i(t){return m=t,y=setTimeout(a,e),_?r(t):g}function o(t){var n=t-v,r=t-m,i=e-n;return b?nativeMin(i,f-r):i}function s(t){var n=t-v,r=t-m;return v===undefined||n>=e||n<0||b&&r>=f}function a(){var t=now_1();if(s(t))return l(t);y=setTimeout(a,o(t))}function l(t){return y=undefined,T&&p?r(t):(p=d=undefined,g)}function c(){y!==undefined&&clearTimeout(y),m=0,p=v=d=y=undefined}function u(){return y===undefined?g:l(now_1())}function h(){var t=now_1(),n=s(t);if(p=arguments,d=this,v=t,n){if(y===undefined)return i(v);if(b)return clearTimeout(y),y=setTimeout(a,e),r(v)}return y===undefined&&(y=setTimeout(a,e)),g}var p,d,f,g,y,v,m=0,_=!1,b=!1,T=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$2);return e=toNumber_1(e)||0,isObject_1(n)&&(_=!!n.leading,b="maxWait"in n,f=b?nativeMax(toNumber_1(n.maxWait)||0,e):f,T="trailing"in n?!!n.trailing:T),h.cancel=c,h.flush=u,h}function throttle$1(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$1);return isObject_1(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),debounce_1(t,e,{leading:r,maxWait:e,trailing:i})}function baseAssignValue(t,e,n){"__proto__"==e&&_defineProperty?_defineProperty(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function assignValue(t,e,n){var r=t[e];hasOwnProperty$6.call(t,e)&&eq_1(r,n)&&(n!==undefined||e in t)||_baseAssignValue(t,e,n)}function baseIsArguments(t){return isObjectLike_1(t)&&_baseGetTag(t)==argsTag$1}function stubFalse(){return!1}function isLength(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER$1}function baseIsTypedArray(t){return isObjectLike_1(t)&&isLength_1(t.length)&&!!typedArrayTags[_baseGetTag(t)]}function baseUnary(t){return function(e){return t(e)}}function overArg(t,e){return function(n){return t(e(n))}}function baseIsMap(t){return isObjectLike_1(t)&&_getTag(t)==mapTag$4}function baseIsSet(t){return isObjectLike_1(t)&&_getTag(t)==setTag$4}function mountFlvProvider(t){if(videojs.browser.IS_IOS&&videojs.browser.IS_MQQ)return!1;if(!videojs.browser.IS_TBS&&!videojs.browser.IS_MQQB&&(!IS_IOS||!videojs.browser.IS_SAFARI)&&!videojs.browser.IE_VERSION||t)try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(FlvSourceHandler,0)}catch(n){}}function mountWebRTCProvider(t){if(!videojs.browser.isWebRTCSupported())return!1;try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(sourceHandler,0)}catch(n){}}function FlashRtmpDecorator(t){return t.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},t.streamFromParts=function(t,e){return t+"&"+e},t.streamToParts=function(t){var e={connection:"",stream:""};if(!t)return e;var n=t.search(/&(?!\w+=)/),r=void 0;return-1!==n?r=n+1:0===(n=r=t.lastIndexOf("/")+1)&&(n=r=t.length),e.connection=t.substring(0,n),e.stream=t.substring(r,t.length),e},t.isStreamingType=function(e){return e in t.streamingFormats},t.RTMP_RE=/^rtmp[set]?:\/\//i,t.isStreamingSrc=function(e){return t.RTMP_RE.test(e)},t.rtmpSourceHandler={},t.rtmpSourceHandler.canPlayType=function(e){return t.isStreamingType(e)?"maybe":""},t.rtmpSourceHandler.canHandleSource=function(e,n){var r=t.rtmpSourceHandler.canPlayType(e.type);return r||(t.isStreamingSrc(e.src)?"maybe":"")},t.rtmpSourceHandler.handleSource=function(e,n,r){var i=t.streamToParts(e.src);n.setRtmpConnection(i.connection),n.setRtmpStream(i.stream)},t.registerSourceHandler(t.rtmpSourceHandler),t}function _createSetter(t){var e=t.charAt(0).toUpperCase()+t.slice(1);_api["set"+e]=function(e){return this.el_.vjs_setProperty(t,e)}}function _createGetter(t){_api[t]=function(){return this.el_.vjs_getProperty(t)}}function TCPlayer(t,e,n){var r={str_ext_content:JSON.stringify(e)};reportLog(r);var i=void 0,o=(new Date).getTime(),s=videojs.dom;if("string"==typeof t)i=document.querySelector("#"+t);else{if(!t||!t.nodeName)throw new TypeError("The ID or element supplied is not valid.");i=t}if("video"!=i.nodeName.toLowerCase()&&"audio"!=i.nodeName.toLowerCase())throw new TypeError("The element type must be <video>.");s.hasClass(i,"tcplayer")||s.addClass(i,"tcplayer"),s.hasClass(i,"video-js")||s.addClass(i,"video-js"),videojs.browser.IE_VERSION&&(i.style.width||i.offsetWidth&&300!==i.offsetWidth)&&(window_1.VIDEOJS_NO_DYNAMIC_STYLE=!0);var a={controls:!0,language:"zh-CN",playbackRates:[.5,1,1.25,1.5,2],controlBar:{volumePanel:{inline:"video"!=i.nodeName.toLowerCase()},cssFullscreenToggle:!1,fullscreenToggle:"video"==i.nodeName.toLowerCase(),QualitySwitcherMenuButton:!0,pictureInPictureToggle:!1},plugins:{Skin:"",QualitySwitcher:{},MultiResolution:{},Errors:{},Reporter:{},ContextMenu:{},LevelSwitch:{},VttThumbnail:{},PlayerMetrics:{}},webrtcConfig:{enableAbr:!0,abrLabels:{}}};e.plugins&&e.plugins.Dvr&&(a.plugins.LiveDvr=e.plugins.Dvr),e=videojs.mergeOptions(a,e),e.webrtcConfig.enableAbr&&(isWebrtcUrl(e.sources)&&e.sources&&"string"==typeof e.sources&&arrangeWebrtcSource(e.sources,e),e.sources&&Array.isArray(e.sources)&&e.sources[0]&&e.sources[0].src&&isWebrtcUrl(e.sources[0].src)&&arrangeWebrtcSource(e.sources[0].src,e)),"exitPictureInPicture"in document||(e.controlBar.pictureInPictureToggle=!1),log("player initializing",e),videojs.getComponent("player").prototype.options_.children.splice(1,0,"logoImage");var l=videojs(t,e,n);return l.PlayerMetrics(e).setTimingData({initStart:o}),log("player initialized",e),l}var version="5.3.1",commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},win;win="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};var window_1=win,empty={},empty$1=(Object.freeze||Object)({"default":empty}),minDoc=empty$1&&empty||empty$1,topLevel=void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:{},doccy;"undefined"!=typeof document?doccy=document:(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"])||(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"]=minDoc);var document_1=doccy,USER_AGENT=window_1.navigator&&window_1.navigator.userAgent||"",VENDOR=window_1.navigator&&window_1.navigator.vendor||"",webkitVersionMap=/AppleWebKit\/([\d.]+)/i.exec(USER_AGENT),appleWebkitVersion=webkitVersionMap?parseFloat(webkitVersionMap.pop()):null,IS_IPAD=/iPad/i.test(USER_AGENT),IS_IPHONE=/iPhone/i.test(USER_AGENT)&&!IS_IPAD,IS_IPOD=/iPod/i.test(USER_AGENT),IS_IOS=IS_IPHONE||IS_IPAD||IS_IPOD,IOS_VERSION=function(){var t=USER_AGENT.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),IOS_VERSION_ARRAY=function(){var t=USER_AGENT.match(/OS (\d+)_(\d+)_?(\d+)?/i);return t&&[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||"0",10)]||[]}(),IS_ANDROID=/Android/i.test(USER_AGENT),ANDROID_VERSION=function(){var t=USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),IS_TBS=/TBS\/\d+/i.test(USER_AGENT),TBS_VERSION=function(){var t=USER_AGENT.match(/TBS\/(\d+)/i);if(t&&t[1])return t[1]}(),IS_MQQB=!IS_TBS&&/MQQBrowser\/\d+/i.test(USER_AGENT),IS_QQB=!IS_TBS&&/ QQBrowser\/\d+/i.test(USER_AGENT),IS_PC_WECHAT=/windowswechat/i.test(USER_AGENT),IS_WECHAT=/(micromessenger|webbrowser)/i.test(USER_AGENT),IS_MQQ=/ QQ\/\d+/i.test(USER_AGENT)||/MQQBrowser\/\d+/i.test(USER_AGENT),IS_OLD_ANDROID=IS_ANDROID&&/webkit/i.test(USER_AGENT)&&ANDROID_VERSION<2.3,IS_NATIVE_ANDROID=IS_ANDROID&&ANDROID_VERSION<5&&appleWebkitVersion<537,IS_FIREFOX=/Firefox/i.test(USER_AGENT),IS_EDGE=/Edge/i.test(USER_AGENT),IS_EDG=/Edg/i.test(USER_AGENT),IS_EDGA=/EdgA/i.test(USER_AGENT),EDG_VERSION=IS_EDG&&function(){var t=USER_AGENT.match(/Edg\/(\d+)/);return t&&t[1]?parseFloat(t[1]):null}(),EDGA_VERSION=IS_EDGA&&function(){var t=USER_AGENT.match(/EdgA\/(\d+)/);return t&&t[1]?parseFloat(t[1]):null}(),IS_CHROME=function(){return!(IS_EDGE||!/Chrome/i.test(USER_AGENT))||!(!/Safari/i.test(USER_AGENT)||!/CriOS/i.test(USER_AGENT))}()&&!IS_WECHAT&&!IS_MQQB&&!IS_QQB,CHROME_VERSION=function(){var t=USER_AGENT.match(/Chrome\/(\d+)/),e=USER_AGENT.match(/CriOS\/(\d+)/);return t&&t[1]?parseFloat(t[1]):e&&e[1]?parseFloat(e[1]):null}(),IS_IE8=/MSIE\s8\.0/.test(USER_AGENT),IE_VERSION=function(){var t=/MSIE\s(\d+)\.\d/.exec(USER_AGENT),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(USER_AGENT)&&/rv:11.0/.test(USER_AGENT)&&(e=11),e}(),IS_SAFARI=/Safari/i.test(USER_AGENT)&&!IS_CHROME&&!IS_ANDROID&&!IS_EDGE&&!IS_MQQB&&!IS_QQB&&!IS_PC_WECHAT,IS_ANY_SAFARI=IS_SAFARI||IS_IOS,IS_SIMULATOR=IS_SAFARI&&"Google Inc."===VENDOR,IS_UC=/UCBrowser\/(\d+)\./i.test(USER_AGENT),IS_QUARK=/Quark\/(\d+)\./i.test(USER_AGENT),TOUCH_ENABLED=isReal()&&("ontouchstart"in window_1||window_1.DocumentTouch&&window_1.document instanceof window_1.DocumentTouch),BACKGROUND_SIZE_SUPPORTED=isReal()&&"backgroundSize"in window_1.document.createElement("video").style,IS_WIN=/Windows/i.test(USER_AGENT),IS_MAC=/MAC OS X/i.test(USER_AGENT),WIN_VER=function(){return/Windows NT ([.\w]+)/.test(USER_AGENT),RegExp.$1}(),MAC_VER=function(){return/Mac OS X (\w+)/.test(USER_AGENT),RegExp.$1}(),QQ_VER=function(){return/QQBrowser\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),EDGE_VER=function(){return/Edge\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),SAFARI_VER=function(){return/Version\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),FIREFOX_VER=function(){return/Firefox\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),CHROME_VER=function(){return/Chrome\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),IS_HUAWEI=/HUAWEI|honor|HMA/i.test(USER_AGENT),IS_XIAOMI=/HM|RedMi|Mi/i.test(USER_AGENT)&&!IS_HUAWEI,IS_OPPO=/OPPO/i.test(USER_AGENT),IS_VIVO=/VIVO/i.test(USER_AGENT),IS_SX=/GT-|SM-|SCH-/i.test(USER_AGENT),IS_ONE=/ONE/i.test(USER_AGENT),IS_CP=/Coolpad/i.test(USER_AGENT),IS_ZX=/ZTE/i.test(USER_AGENT),isWebRTCAPISupported=function(){return["RTCPeerConnection","webkitRTCPeerConnection","RTCIceGatherer"].filter(function(t){return t in window_1}).length>0},isWebRTCSupported=function(){return!IS_UC&&!IS_EDGE&&(!(IS_EDG&&EDG_VERSION<80&&IS_EDGA&&EDGA_VERSION<80)&&(!(IS_FIREFOX&&FIREFOX_VER<56)&&(!(!IS_TBS&&IS_SAFARI&&IS_IOS&&(0===IOS_VERSION_ARRAY.length||IOS_VERSION_ARRAY[0]<11||11===IOS_VERSION_ARRAY[0]&&IOS_VERSION_ARRAY[1]<1||11===IOS_VERSION_ARRAY[0]&&1===IOS_VERSION_ARRAY[1]&&IOS_VERSION_ARRAY[2]<2))&&(!IS_QUARK&&isWebRTCAPISupported()))))},IS_ENABLED_MSE=function(){var t=window_1.MediaSource=window_1.MediaSource||window_1.WebKitMediaSource,e=window_1.SourceBuffer=window_1.SourceBuffer||window_1.WebKitSourceBuffer,n=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return IS_IOS?undefined:n&&r}(),browser=(Object.freeze||Object)({USER_AGENT:USER_AGENT,IS_IPAD:IS_IPAD,IS_IPHONE:IS_IPHONE,IS_IPOD:IS_IPOD,IS_IOS:IS_IOS,IOS_VERSION:IOS_VERSION,IOS_VERSION_ARRAY:IOS_VERSION_ARRAY,IS_ANDROID:IS_ANDROID,ANDROID_VERSION:ANDROID_VERSION,IS_TBS:IS_TBS,TBS_VERSION:TBS_VERSION,IS_MQQB:IS_MQQB,IS_QQB:IS_QQB,IS_PC_WECHAT:IS_PC_WECHAT,IS_WECHAT:IS_WECHAT,IS_MQQ:IS_MQQ,IS_OLD_ANDROID:IS_OLD_ANDROID,IS_NATIVE_ANDROID:IS_NATIVE_ANDROID,IS_FIREFOX:IS_FIREFOX,IS_EDGE:IS_EDGE,IS_EDG:IS_EDG,IS_EDGA:IS_EDGA,EDG_VERSION:EDG_VERSION,EDGA_VERSION:EDGA_VERSION,IS_CHROME:IS_CHROME,CHROME_VERSION:CHROME_VERSION,IS_IE8:IS_IE8,IE_VERSION:IE_VERSION,IS_SAFARI:IS_SAFARI,IS_ANY_SAFARI:IS_ANY_SAFARI,IS_SIMULATOR:IS_SIMULATOR,IS_UC:IS_UC,IS_QUARK:IS_QUARK,TOUCH_ENABLED:TOUCH_ENABLED,BACKGROUND_SIZE_SUPPORTED:BACKGROUND_SIZE_SUPPORTED,IS_WIN:IS_WIN,IS_MAC:IS_MAC,WIN_VER:WIN_VER,MAC_VER:MAC_VER,QQ_VER:QQ_VER,EDGE_VER:EDGE_VER,SAFARI_VER:SAFARI_VER,FIREFOX_VER:FIREFOX_VER,CHROME_VER:CHROME_VER,IS_HUAWEI:IS_HUAWEI,IS_XIAOMI:IS_XIAOMI,IS_OPPO:IS_OPPO,IS_VIVO:IS_VIVO,IS_SX:IS_SX,IS_ONE:IS_ONE,IS_CP:IS_CP,IS_ZX:IS_ZX,isWebRTCAPISupported:isWebRTCAPISupported,isWebRTCSupported:isWebRTCSupported,IS_ENABLED_MSE:IS_ENABLED_MSE}),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),inherits=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},possibleConstructorReturn=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},taggedTemplateLiteralLoose=function(t,e){return t.raw=e,t},toString=Object.prototype.toString,keys=function(t){return isObject$1(t)?Object.keys(t):[]},log$1=void 0,level="info",history=[],logByType=function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!!IE_VERSION&&IE_VERSION<11,r=log$1.levels[level],i=new RegExp("^("+r+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),history&&history.push([].concat(e)),(log$1.enableLog||"log"!=t)&&(e.unshift("TCPlayer:"),window_1.console)){var o=window_1.console[t];o||"debug"!==t||(o=window_1.console.info||window_1.console.log),o&&r&&i.test(t)&&(n&&(e=e.map(function(t){if(isObject$1(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)}).join(" ")),o.apply?o[Array.isArray(e)?"apply":"call"](window_1.console,e):o(e))}};log$1=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];logByType("log",e)},log$1.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:level},log$1.level=function(t){if("string"==typeof t){if(!log$1.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');level=t}return level},log$1.history=function(){return history?[].concat(history):[]},log$1.history.clear=function(){history&&(history.length=0)},log$1.history.disable=function(){null!==history&&(history.length=0,history=null)},log$1.history.enable=function(){null===history&&(history=[])},log$1.enableLog=!1,log$1.error=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return logByType("error",e)},log$1.warn=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return logByType("warn",e)},log$1.debug=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return logByType("debug",e)};var log$2=log$1,tsml=function(t){for(var e="",n=0;n<arguments.length;n++)e+=clean(t[n])+(arguments[n+1]||"");return e},_templateObject=taggedTemplateLiteralLoose(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),$=createQuerier("querySelector"),$$=createQuerier("querySelectorAll"),Dom=(Object.freeze||Object)({isReal:isReal,isEl:isEl,isInFrame:isInFrame,createEl:createEl,textContent:textContent,
3
- 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,$:$,$$:$$}),_guid=1,elData={},elIdAttr="vdata"+(new Date).getTime(),_supportsPassive=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){_supportsPassive=!0}});window_1.addEventListener("test",null,t),window_1.removeEventListener("test",null,t)}catch(e){}}();var passiveEvents=["touchstart","touchmove"],Events=(Object.freeze||Object)({fixEvent:fixEvent,on:on,off:off,trigger:trigger,one:one}),_windowLoaded=!1,videojs$2=void 0,autoSetup=function(){if(isReal()){var t=document_1.getElementsByTagName("video"),e=document_1.getElementsByTagName("audio"),n=document_1.getElementsByTagName("video-js"),r=[];if(t&&t.length>0)for(var i=0,o=t.length;i<o;i++)r.push(t[i]);if(e&&e.length>0)for(var s=0,a=e.length;s<a;s++)r.push(e[s]);if(n&&n.length>0)for(var l=0,c=n.length;l<c;l++)r.push(n[l]);if(r&&r.length>0)for(var u=0,h=r.length;u<h;u++){var p=r[u];if(!p||!p.getAttribute){autoSetupTimeout(1);break}if(p.player===undefined){var d=p.getAttribute("data-setup");null!==d&&videojs$2(p)}}else _windowLoaded||autoSetupTimeout(1)}};isReal()&&"complete"===document_1.readyState?_windowLoaded=!0:one(window_1,"load",function(){_windowLoaded=!0});var createStyleElement=function(t){var e=document_1.createElement("style");return e.className=t,e},setTextContent=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},bind=function(t,e,n){e.guid||(e.guid=newGUID());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},throttle=function(t,e){var n=Date.now();return function(){var r=Date.now();r-n>=e&&(t.apply(undefined,arguments),n=r)}},EventTarget=function(){};EventTarget.prototype.allowedEvents_={},EventTarget.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},on(this,t,e),this.addEventListener=n},EventTarget.prototype.addEventListener=EventTarget.prototype.on,EventTarget.prototype.off=function(t,e){off(this,t,e)},EventTarget.prototype.removeEventListener=EventTarget.prototype.off,EventTarget.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},one(this,t,e),this.addEventListener=n},EventTarget.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=fixEvent(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),trigger(this,t)},EventTarget.prototype.dispatchEvent=EventTarget.prototype.trigger;var isEvented=function(t){return t instanceof EventTarget||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},isValidEventType=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},validateTarget=function(t){if(!t.nodeName&&!isEvented(t))throw new Error("Invalid target; must be a DOM node or evented object.")},validateEventType=function(t){if(!isValidEventType(t))throw new Error("Invalid event type; must be a non-empty string or array.")},validateListener=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},normalizeListenArgs=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),validateTarget(r),validateEventType(i),validateListener(o),o=bind(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},listen=function(t,e,n,r){validateTarget(t),t.nodeName?Events[e](t,n,r):t[e](n,r)},EventedMixin={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=normalizeListenArgs(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(listen(s,"on",a,l),!o){var c=function(){return t.off(s,a,l)};c.guid=l.guid;var u=function(){return t.off("dispose",c)};u.guid=l.guid,listen(this,"on","dispose",c),listen(s,"on","dispose",u)}},one:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=normalizeListenArgs(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(o)listen(s,"one",a,l);else{var c=function u(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.off(s,a,u),l.apply(null,n)};c.guid=l.guid,listen(s,"one",a,c)}},off:function(t,e,n){if(!t||isValidEventType(t))isValidEventType(e)?off(this.eventBusEl_,e,n):off(this.eventBusEl_,t,e);else{var r=t,i=e;validateTarget(r),validateEventType(i),validateListener(n),n=bind(this,n),this.off("dispose",n),r.nodeName?(off(r,i,n),off(r,"dispose",n)):isEvented(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return trigger(this.eventBusEl_,t,e)}},StatefulMixin={state:{},setState:function(t){var e=this;"function"==typeof t&&(t=t());var n=void 0;return each(t,function(t,r){e.state[r]!==t&&(n=n||{},n[r]={from:e.state[r],to:t}),e.state[r]=t}),n&&isEvented(this)&&this.trigger({changes:n,type:"statechanged"}),n}},isArray=Array.isArray,isArray_1=isArray,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol$1=_root.Symbol,_Symbol=Symbol$1,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:undefined,_getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString,_objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:undefined,_baseGetTag=baseGetTag,isObjectLike_1=isObjectLike,symbolTag="[object Symbol]",isSymbol_1=isSymbol,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,_isKey=isKey,isObject_1=isObject$2,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]",isFunction_1=isFunction$1,coreJsData=_root["__core-js_shared__"],_coreJsData=coreJsData,maskSrcKey=function(){var t=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),_isMasked=isMasked,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString,_toSource=toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$1=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$1).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_baseIsNative=baseIsNative,_getValue=getValue,_getNative=getNative,nativeCreate=_getNative(Object,"create"),_nativeCreate=nativeCreate,_hashClear=hashClear,_hashDelete=hashDelete,HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,_hashGet=hashGet,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,_hashHas=hashHas,HASH_UNDEFINED$1="__lodash_hash_undefined__",_hashSet=hashSet;Hash.prototype.clear=_hashClear,Hash.prototype["delete"]=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;var _Hash=Hash,_listCacheClear=listCacheClear,eq_1=eq,_assocIndexOf=assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice,_listCacheDelete=listCacheDelete,_listCacheGet=listCacheGet,_listCacheHas=listCacheHas,_listCacheSet=listCacheSet;ListCache.prototype.clear=_listCacheClear,ListCache.prototype["delete"]=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;var _ListCache=ListCache,Map=_getNative(_root,"Map"),_Map=Map,_mapCacheClear=mapCacheClear,_isKeyable=isKeyable,_getMapData=getMapData,_mapCacheDelete=mapCacheDelete,_mapCacheGet=mapCacheGet,_mapCacheHas=mapCacheHas,_mapCacheSet=mapCacheSet;MapCache.prototype.clear=_mapCacheClear,MapCache.prototype["delete"]=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;var _MapCache=MapCache,FUNC_ERROR_TEXT="Expected a function";memoize.Cache=_MapCache;var memoize_1=memoize,MAX_MEMOIZE_SIZE=500,_memoizeCapped=memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=_memoizeCapped(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rePropName,function(t,n,r,i){e.push(r?i.replace(reEscapeChar,"$1"):n||t)}),e}),_stringToPath=stringToPath,_arrayMap=arrayMap,INFINITY=1/0,symbolProto=_Symbol?_Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined,_baseToString=baseToString,toString_1=toString$1,_castPath=castPath,INFINITY$1=1/0,_toKey=toKey,_baseGet=baseGet,get_1=get$1,Component=function(){function t(e,n,r){if(classCallCheck(this,t),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=extend(!0,{},this.options_),n=this.options_=mergeOptions(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+newGUID()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),!1!==n.evented&&evented(this,{eventBusKey:this.el_?"el_":null}),stateful(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),removeData(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return log$2.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=mergeOptions(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return createEl(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],s=r&&r.split("-")[0],a=i&&i[s],l=n;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,function(t,n){var r=e[n-1],i=r;return void 0===r&&(i=t),i})),l},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=toTitleCase(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"==typeof e){o=toTitleCase(e);var s=n.componentClass||o;n.name=o;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!=typeof a)return null;i=new a(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&toTitleCase(i.name()),o&&(this.childNameIndex_[o]=i),"function"==typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(r[n]!==undefined&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,s=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter(function(t){return!o.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var r=void 0,i=void 0;return"string"==typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}}).filter(function(e){var n=t.getComponent(e.opts.componentClass||toTitleCase(e.name));return n&&!s.isTech(n)}).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&arguments[1]!==undefined&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(t){t&&"function"==typeof t&&t.call(this)},this),this.trigger("ready")},1)},t.prototype.$=function(t,e){return $(t,e||this.contentEl())},t.prototype.$$=function(t,e){return $$(t,e||this.contentEl())},t.prototype.hasClass=function(t){return hasClass(this.el_,t)},t.prototype.addClass=function(t){addClass(this.el_,t)},t.prototype.removeClass=function(t){if(removeClass(this.el_,t),"vjs-lock-showing"===t&&(IS_IOS||IS_ANDROID)){var e=document.getElementsByClassName("vjs-subs-caps-button"),n=get_1(e,"[0].children[1]");n&&(n.className="vjs-menu")}},t.prototype.toggleClass=function(t,e){toggleClass(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return getAttribute(this.el_,t)},t.prototype.setAttribute=function(t,e){setAttribute(this.el_,t,e)},t.prototype.removeAttribute=function(t){removeAttribute(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(e!==undefined)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+toTitleCase(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var r="offset"+toTitleCase(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=void 0;this.on("touchstart",function(r){1===r.touches.length&&(e={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=(new Date).getTime(),n=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)n=!1;else if(e){var r=t.touches[0].pageX-e.pageX,i=t.touches[0].pageY-e.pageY,o=Math.sqrt(r*r+i*i);o>10&&(n=!1)}});var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){if(e=null,!0===n){(new Date).getTime()-t<200&&(r.preventDefault(),this.trigger("tap"))}})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=bind(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.prototype.setTimeout=function(t,e){var n=this;t=bind(this,t);var r=window_1.setTimeout(t,e),i=function(){return n.clearTimeout(r)};return i.guid="vjs-timeout-"+r,this.on("dispose",i),r},t.prototype.clearTimeout=function(t){window_1.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var n=this;t=bind(this,t);var r=window_1.setInterval(t,e),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},t.prototype.clearInterval=function(t){window_1.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e=this;if(this.supportsRaf_){t=bind(this,t);var n=window_1.requestAnimationFrame(t),r=function(){return e.cancelAnimationFrame(n)};return r.guid="vjs-raf-"+n,this.on("dispose",r),n}return this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){window_1.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r=t.getComponent("Tech"),i=r&&r.isTech(n),o=t===n||t.prototype.isPrototypeOf(n.prototype);if(i||!o){var s=void 0;throw s=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+s+".")}e=toTitleCase(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var l=a.players,c=Object.keys(l);if(l&&c.length>0&&c.map(function(t){return l[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=toTitleCase(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();Component.prototype.supportsRaf_="function"==typeof window_1.requestAnimationFrame&&"function"==typeof window_1.cancelAnimationFrame,Component.registerComponent("Component",Component);for(var EXT_MIME={m3u8:"application/x-mpegURL",flv:"video/flv",mp4:"video/mp4",webm:"video/webm",rtmp:"rtmp/flv",mpd:"application/dash+xml",mp3:"audio/mpeg",m4a:"audio/mp4"},SERVER_PATH="playvideo.vodplayvideo.net",SERVER_PATH_V3="playvideo.vodplayvideo.net",SERVER_PATH_BACKUP="playvideo.vodglcdn.com",LICENSE_PATH="https://drm.vod2.myqcloud.com/getlicense/v1",HLS_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/hls.min.1.1.7.js",FLV_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/flv.min.1.6.4.js",WEBRTC_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/TXLivePlayer-1.3.5.min.js",DASH_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/dash.all.min.v3.1.3.js",XP2P_HLS_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/hlsp2p.min.1.6.28.js",XP2P_FLV_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/qvbp2p_common.min.1.8.29.js",parseUrl=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=document_1.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&(i=document_1.createElement("div"),i.innerHTML='<a href="'+t+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),document_1.body.appendChild(i));for(var o={},s=0;s<e.length;s++)o[e[s]]=n[e[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=window_1.location.protocol),r&&document_1.body.removeChild(i),o},getAbsoluteURL=function(t){if(!t.match(/^https?:\/\//)){var e=document_1.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},getFileExtension=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=e.exec(t);if(n)return n.pop().toLowerCase()}return""},isCrossOrigin=function(t){var e=window_1.location,n=parseUrl(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},Url=(Object.freeze||Object)({parseUrl:parseUrl,getAbsoluteURL:getAbsoluteURL,getFileExtension:getFileExtension,isCrossOrigin:isCrossOrigin}),FullscreenApi={},apiMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],specApi=apiMap[0],browserApi=void 0,prefixedAPI=!1,i$1=0;i$1<apiMap.length;i$1++)if(apiMap[i$1][1]in document_1){browserApi=apiMap[i$1];break}if(browserApi){for(var _i=0;_i<browserApi.length;_i++)FullscreenApi[specApi[_i]]=browserApi[_i];prefixedAPI=browserApi[0]===specApi[0]}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;var tuple=SafeParseTuple,trackToJson_=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,n,r){return t[n]&&(e[n]=t[n]),e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},textTracksToJson=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=trackToJson_(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===n.indexOf(t)}).map(trackToJson_))},jsonToTextTracks=function(t,e){return t.forEach(function(t){var n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return n.addCue(t)})}),e.textTracks()},textTrackConverter={textTracksToJson:textTracksToJson,jsonToTextTracks:jsonToTextTracks,trackToJson_:trackToJson_},MODAL_CLASS_NAME="vjs-modal-dialog",ESC=27,ModalDialog=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=createEl("div",{className:MODAL_CLASS_NAME+"-content"},{role:"document"}),i.descEl_=createEl("p",{className:MODAL_CLASS_NAME+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),textContent(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return MODAL_CLASS_NAME+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){t.which===ESC&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",bind(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",bind(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!e&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},e.prototype.fill=function(){this.fillWith(this.content())},e.prototype.fillWith=function(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),insertContent(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},e.prototype.empty=function(){this.trigger("beforemodalempty"),emptyEl(this.contentEl()),this.trigger("modalempty")},e.prototype.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.prototype.conditionalFocus_=function(){var t=document_1.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(document_1,"keydown",this.handleKeyDown))},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(document_1,"keydown",this.handleKeyDown)},e.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<e.length;i++)if(n===e[i]){r=i;break}document_1.activeElement===this.el_&&(r=0),t.shiftKey&&0===r?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||r!==e.length-1||(e[0].focus(),t.preventDefault())}},e.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof window_1.HTMLAnchorElement||t instanceof window_1.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof window_1.HTMLInputElement||t instanceof window_1.HTMLSelectElement||t instanceof window_1.HTMLTextAreaElement||t instanceof window_1.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof window_1.HTMLIFrameElement||t instanceof window_1.HTMLObjectElement||t instanceof window_1.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},e}(Component);ModalDialog.prototype.options_={pauseOnOpen:!0,temporary:!0},Component.registerComponent("ModalDialog",ModalDialog);var TrackList=function(t){function e(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;classCallCheck(this,e);var o=possibleConstructorReturn(this,t.call(this));if(!i&&(i=o,IS_IE8)){i=document_1.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(i[s]=e.prototype[s])}i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var a=0;a<r.length;a++)i.addTrack(r[a]);return n=i,possibleConstructorReturn(o,n)}return inherits(e,t),e.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.prototype.removeTrack=function(t){for(var e=void 0,n=0,r=this.length;n<r;n++)if(this[n]===t){e=this[n],e.off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.prototype.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(EventTarget);TrackList.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var event$1 in TrackList.prototype.allowedEvents_)TrackList.prototype["on"+event$1]=null;var disableOthers=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},AudioTrackList=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,e);for(var o=void 0,s=i.length-1;s>=0;s--)if(i[s].enabled){disableOthers(i,i[s]);break}if(IS_IE8){o=document_1.createElement("custom");for(var a in TrackList.prototype)"constructor"!==a&&(o[a]=TrackList.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(o[l]=e.prototype[l])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),o.changing_=!1,r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){var n=this;e.enabled&&disableOthers(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){n.changing_||(n.changing_=!0,disableOthers(n,e),n.changing_=!1,n.trigger("change"))})},e}(TrackList),disableOthers$1=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},VideoTrackList=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,e)
4
- ;for(var o=void 0,s=i.length-1;s>=0;s--)if(i[s].selected){disableOthers$1(i,i[s]);break}if(IS_IE8){o=document_1.createElement("custom");for(var a in TrackList.prototype)"constructor"!==a&&(o[a]=TrackList.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(o[l]=e.prototype[l])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),o.changing_=!1,Object.defineProperty(o,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){var n=this;e.selected&&disableOthers$1(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",function(){n.changing_||(n.changing_=!0,disableOthers$1(n,e),n.changing_=!1,n.trigger("change"))})},e}(TrackList),TextTrackList=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,e);var o=void 0;if(IS_IE8){o=document_1.createElement("custom");for(var s in TrackList.prototype)"constructor"!==s&&(o[s]=TrackList.prototype[s]);for(var a in e.prototype)"constructor"!==a&&(o[a]=e.prototype[a])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){return!("disabled"===e.mode&&!e.label)&&(!("captions"===e.kind&&!e.label)&&(!(IS_IOS&&"subtitles"===e.kind&&!window.textTrackCleared_)&&(t.prototype.addTrack.call(this,e),e.addEventListener("modechange",bind(this,function(){this.trigger("change")})),void(-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",bind(this,function(){this.trigger("selectedlanguagechange")}))))))},e}(TrackList),HtmlTrackElementList=function(){function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,t);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,o=e.length;i<o;i++)n.addTrackElement_(e[i]);if(IS_IE8)return n}return t.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},t.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},t.prototype.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),TextTrackCueList=function(){function t(e){classCallCheck(this,t);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}if(t.prototype.setCues_.call(n,e),Object.defineProperty(n,"length",{get:function(){return this.length_}}),IS_IE8)return n}return t.prototype.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},t.prototype.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},t}(),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(t){function e(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this)),o=i;if(IS_IE8){o=document_1.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}var a={id:r.id||(0===r.id?0:"vjs_track_"+newGUID()),kind:r.kind||"",label:r.label||"",language:r.language||""};for(var l in a)!function(t){Object.defineProperty(o,t,{get:function(){return a[t]},set:function(){}})}(l);return n=o,possibleConstructorReturn(i,n)}return inherits(e,t),e}(EventTarget),isFunction_1$2=isFunction$3,toString$3=Object.prototype.toString,trim=function(t){return t.replace(/^\s+|\s+$/g,"")},isArray$2=function(t){return"[object Array]"===Object.prototype.toString.call(t)},parseHeaders=function(t){if(!t)return{};for(var e={},n=trim(t).split("\n"),r=0;r<n.length;r++){var i=n[r],o=i.indexOf(":"),s=trim(i.slice(0,o)).toLowerCase(),a=trim(i.slice(o+1));"undefined"==typeof e[s]?e[s]=a:isArray$2(e[s])?e[s].push(a):e[s]=[e[s],a]}return e},immutable=extend$1,hasOwnProperty$4=Object.prototype.hasOwnProperty,xhr=createXHR;createXHR.XMLHttpRequest=window_1.XMLHttpRequest||noop,createXHR.XDomainRequest="withCredentials"in new createXHR.XMLHttpRequest?createXHR.XMLHttpRequest:window_1.XDomainRequest,forEachArray(["get","put","post","patch","head","delete"],function(t){createXHR["delete"===t?"del":t]=function(e,n,r){return n=initParams(e,n,r),n.method=t.toUpperCase(),_createXHR(n)}});var parseCues=function(t,e){var n=new window_1.WebVTT.Parser(window_1,window_1.vttjs,window_1.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(window_1.console&&window_1.console.groupCollapsed&&window_1.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach(function(t){return log$2.error(t)}),window_1.console&&window_1.console.groupEnd&&window_1.console.groupEnd()),n.flush()},loadTrack=function(t,e){var n={uri:t},r=isCrossOrigin(t);r&&(n.cors=r),xhr(n,bind(this,function(t,n,r){if(t)return log$2.error(t,n);if(e.loaded_=!0,"function"!=typeof window_1.WebVTT){if(e.tech_){var i=function(){return parseCues(r,e)};e.tech_.on("vttjsloaded",i),e.tech_.on("vttjserror",function(){log$2.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",i)})}}else parseCues(r,e)}))},TextTrack=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(classCallCheck(this,e),!i.tech)throw new Error("A tech was not provided.");var o=mergeOptions(i,{kind:TextTrackKind[i.kind]||i.kind||"subtitles",language:i.language||i.srclang||""}),s=TextTrackMode[o.mode]||"disabled",a=o["default"];"metadata"!==o.kind&&"chapters"!==o.kind||(s="hidden");var l=n=possibleConstructorReturn(this,t.call(this,o));if(l.tech_=o.tech,IS_IE8)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new TextTrackCueList(l.cues_),h=new TextTrackCueList(l.activeCues_),p=!1,d=bind(l,function(){this.activeCues,p&&(this.trigger("cuechange"),p=!1)});return"disabled"!==s&&l.tech_.ready(function(){l.tech_.on("timeupdate",d)},!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;TextTrackMode[t]&&(s=t,"showing"===s&&this.tech_.ready(function(){e.tech_.on("timeupdate",d)},!0),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=t&&i.endTime>=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(p=!0);return this.activeCues_=e,h.setCues_(this.activeCues_),h},set:function(){}}),o.src?(l.src=o.src,loadTrack(o.src,l)):l.loaded_=!0,r=l,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addCue=function(t){var e=t;if(window_1.vttjs&&!(t instanceof window_1.vttjs.VTTCue)){e=new window_1.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(var n in t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(Track);TextTrack.prototype.allowedEvents_={cuechange:"cuechange"};var AudioTrack=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var o=mergeOptions(i,{kind:AudioTrackKind[i.kind]||""}),s=n=possibleConstructorReturn(this,t.call(this,o)),a=!1;if(IS_IE8)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),o.enabled&&(s.enabled=o.enabled),s.loaded_=!0,r=s,possibleConstructorReturn(n,r)}return inherits(e,t),e}(Track),VideoTrack=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var o=mergeOptions(i,{kind:VideoTrackKind[i.kind]||""}),s=n=possibleConstructorReturn(this,t.call(this,o)),a=!1;if(IS_IE8)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),o.selected&&(s.selected=o.selected),r=s,possibleConstructorReturn(n,r)}return inherits(e,t),e}(Track),NONE=0,LOADING=1,LOADED=2,ERROR=3,HTMLTrackElement=function(t){function e(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this)),i=void 0,o=r;if(IS_IE8){o=document_1.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}var a=new TextTrack(n);if(o.kind=a.kind,o.src=a.src,o.srclang=a.language,o.label=a.label,o["default"]=a["default"],Object.defineProperty(o,"readyState",{get:function(){return i}}),Object.defineProperty(o,"track",{get:function(){return a}}),i=NONE,a.addEventListener("loadeddata",function(){i=LOADED,o.trigger({type:"load",target:o})}),IS_IE8){var l;return l=o,possibleConstructorReturn(r,l)}return r}return inherits(e,t),e}(EventTarget);HTMLTrackElement.prototype.allowedEvents_={load:"load"},HTMLTrackElement.NONE=NONE,HTMLTrackElement.LOADING=LOADING,HTMLTrackElement.LOADED=LOADED,HTMLTrackElement.ERROR=ERROR;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(t){NORMAL[t].getterName=t+"Tracks",NORMAL[t].privateName=t+"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=mergeOptions(NORMAL,REMOTE);REMOTE.names=Object.keys(REMOTE),NORMAL.names=Object.keys(NORMAL),ALL.names=[].concat(REMOTE.names).concat(NORMAL.names);var _objCreate=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();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(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var ESCAPE={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},TAG_NAME={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},TAG_ANNOTATION={v:"title",lang:"lang"},NEEDS_PARENT={rt:"ruby"},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]];StyleBox.prototype.applyStyles=function(t,e){e=e||this.div;for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},StyleBox.prototype.formatStyle=function(t,e){return 0===t?0:t+e},CueStyleBox.prototype=_objCreate(StyleBox.prototype),CueStyleBox.prototype.constructor=CueStyleBox,BoxPosition.prototype.move=function(t,e){switch(e=e!==undefined?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},BoxPosition.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},BoxPosition.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},BoxPosition.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},BoxPosition.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},BoxPosition.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},BoxPosition.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},BoxPosition.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t,{left:t.left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n}},WebVTT$1.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},WebVTT$1.convertCueToDOMTree=function(t,e){return t&&e?parseContent(t,e):null},WebVTT$1.processCues=function(t,e,n){if(!t||!e||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=t.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){var i=[],o=BoxPosition.getSimpleBoxPosition(r),s=Math.round(.05*o.height*100)/100,a={font:s+"px sans-serif"};!function(){for(var n,s,l=0;l<e.length;l++)s=e[l],n=new CueStyleBox(t,s,a),r.appendChild(n.div),moveBoxToLinePosition(t,n,o,i),s.displayState=n.div,i.push(BoxPosition.getSimpleBoxPosition(n))}()}else for(var l=0;l<e.length;l++)r.appendChild(e[l].displayState)},WebVTT$1.Parser=function(t,e,n){n||(n=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},WebVTT$1.Parser.prototype={reportOrThrowError:function(t){if(!(t instanceof ParsingError))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){function e(){for(var t=i.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,i.buffer=t.substr(e),n}function n(t){var e=new Settings;if(parseOptions(t,function(t,n){switch(t){case"id":e.set(t,n);break;case"width":e.percent(t,n);break;case"lines":e.integer(t,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new Settings;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;e.set(t+"X",i.get("x")),e.set(t+"Y",i.get("y"));break;case"scroll":e.alt(t,n,["up"])}},/=/,/\s/),e.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=e.get("width",100),n.lines=e.get("lines",3),n.regionAnchorX=e.get("regionanchorX",0),n.regionAnchorY=e.get("regionanchorY",100),n.viewportAnchorX=e.get("viewportanchorX",0),n.viewportAnchorY=e.get("viewportanchorY",100),n.scroll=e.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:e.get("id"),region:n})}}function r(t){var e=new Settings;parseOptions(t,function(t,n){switch(t){case"MPEGT":e.integer(t+"S",n);break;case"LOCA":e.set(t+"L",parseTimeStamp(n))}},/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:e.get("MPEGTS"),LOCAL:e.get("LOCAL")})}var i=this;t&&(i.buffer+=i.decoder.decode(t,{stream:!0}));try{var o;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;o=e();var s=o.match(/^WEBVTT([ \t].*)?$/);if(!s||!s[0])throw new ParsingError(ParsingError.Errors.BadSignature);i.state="HEADER"}for(var a=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(a?a=!1:o=e(),i.state){case"HEADER":/:/.test(o)?function(t){t.match(/X-TIMESTAMP-MAP/)?parseOptions(t,function(t,e){switch(t){case"X-TIMESTAMP-MAP":r(e)}},/=/):parseOptions(t,function(t,e){switch(t){case"Region":n(e)}},/:/)}(o):o||(i.state="ID");continue;case"NOTE":o||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){i.state="NOTE";break}if(!o)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===o.indexOf("--\x3e")){i.cue.id=o;continue}case"CUE":try{parseCue(o,i.cue,i.regionList)}catch(c){i.reportOrThrowError(c),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var l=-1!==o.indexOf("--\x3e");if(!o||l&&(a=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=o;continue;case"BADCUE":o||(i.state="ID");continue}}}catch(c){i.reportOrThrowError(c),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new ParsingError(ParsingError.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var vtt$1=WebVTT$1,autoKeyword="auto",directionSetting={"":!0,lr:!0,rl:!0},alignSetting={start:!0,middle:!0,end:!0,left:!0,right:!0};VTTCue.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var vttcue=VTTCue,scrollSetting={"":!0,up:!0},vttregion=VTTRegion,browserIndex=createCommonjsModule(function(t){var e=t.exports={WebVTT:vtt$1,VTTCue:vttcue,VTTRegion:vttregion};window_1.vttjs=e,window_1.WebVTT=e.WebVTT;var n=e.VTTCue,r=e.VTTRegion,i=window_1.VTTCue,o=window_1.VTTRegion;e.shim=function(){window_1.VTTCue=n,window_1.VTTRegion=r},e.restore=function(){window_1.VTTCue=i,window_1.VTTRegion=o},window_1.VTTCue||e.shim()}),Tech=function(t){function e(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};classCallCheck(this,e),r.reportTouchActivity=!1;var o=possibleConstructorReturn(this,t.call(this,n,r,i));return o.hasStarted_=!1,o.on("playing",function(){this.hasStarted_=!0}),o.on("loadstart",function(){this.hasStarted_=!1}),ALL.names.forEach(function(t){var e=ALL[t];r&&r[e.getterName]&&(o[e.privateName]=r[e.getterName])}),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===r["native"+t+"Tracks"]&&(o["featuresNative"+t+"Tracks"]=!1)}),!1===r.nativeCaptions||!1===r.nativeTextTracks||IS_MAC&&IS_SAFARI?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks=!1,o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new ALL.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return inherits(e,t),e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(bind(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()}),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return createTimeRanges(0,0)},e.prototype.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(NORMAL.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach(function(t){for(var n=e[t+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}})},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},e.prototype.reset=function(){},e.prototype.error=function(t){return t!==undefined&&(this.error_=new MediaError(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?createTimeRanges(0,0):createTimeRanges()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;NORMAL.names.forEach(function(e){var n=NORMAL[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)})})},e.prototype.addWebVttScript_=function(){var t=this;if(!window_1.WebVTT)if(document_1.body.contains(this.el())){if(!this.options_["vtt.js"]&&isPlain(browserIndex)&&Object.keys(browserIndex).length>0)return void this.trigger("vttjsloaded");var e=document_1.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),window_1.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t<e.length;t++){var n=e[t];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",function(){n.off("addtrack",r),n.off("removetrack",i),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(var t=0;t<e.length;t++){e[t].removeEventListener("cuechange",o)}})},e.prototype.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return createTrackHelper(this,t,e,n)},e.prototype.createRemoteTextTrack=function(t){var e=mergeOptions(t,{tech:this});return new REMOTE.remoteTextEl.TrackClass(e)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(log$2.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(r.track)}),r},e.prototype.addAudioTrack=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=mergeOptions(e,{tech:this}),i=new NORMAL.audio.TrackClass(r);return this.audioTracks_.addTrack(i),!0!==n&&this.ready(function(){return t.audioTracks_.addTrack(i)}),i},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.requestPictureInPicture=function(){var t=this.options_.Promise||window_1.Promise;if(t)return t.reject()},e.prototype.disablePictureInPicture=function(){return!0},e.prototype.setDisablePictureInPicture=function(){},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=toTitleCase(t),e.techs_[t]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return t=toTitleCase(t),e.techs_&&e.techs_[t]?e.techs_[t]:window_1&&window_1.videojs&&window_1.videojs[t]?(log$2.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),window_1.videojs[t]):void 0},e}(Component);ALL.names.forEach(function(t){var e=ALL[t];Tech.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),Tech.prototype.featuresVolumeControl=!0,Tech.prototype.featuresMuteControl=!0,Tech.prototype.featuresFullscreenResize=!1,Tech.prototype.featuresPlaybackRate=!1,Tech.prototype.featuresProgressEvents=!1,Tech.prototype.featuresTimeupdateEvents=!1,Tech.prototype.featuresNativeTextTracks=!1,Tech.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),n===undefined&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n=t.sourceHandlers||[],r=void 0,i=0;i<n.length;i++)if(r=n[i].canPlayType(e))return r;return""},t.selectSourceHandler=function(e,n){for(var r=t.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(e,n))return r[i];return null},t.canPlaySource=function(e,n){var r=t.selectSourceHandler(e,n);return r?r.canHandleSource(e,n):""},["seekable","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(e){var n=t.selectSourceHandler(e,this.options_);n||(t.nativeSourceHandler?n=t.nativeSourceHandler:log$2.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=n.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.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={},allowedGetters={buffered:1,currentTime:1,duration:1,seekable:1,played:1},allowedSetters={setCurrentTime:1},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(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"",e=getFileExtension(t);return MimetypesKind[e.toLowerCase()]||""
2
+ ;var s="",a=!1,l=t,c=e,u=n,h=null,p="",d=!0,f="auto",g="start",y=50,v="middle",m=50,_="middle";if(Object.defineProperty(r,"id",extend$2({},o,{get:function(){return s},set:function(t){s=""+t}})),Object.defineProperty(r,"pauseOnExit",extend$2({},o,{get:function(){return a},set:function(t){a=!!t}})),Object.defineProperty(r,"startTime",extend$2({},o,{get:function(){return l},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");l=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",extend$2({},o,{get:function(){return c},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");c=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",extend$2({},o,{get:function(){return u},set:function(t){u=""+t,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",extend$2({},o,{get:function(){return h},set:function(t){h=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",extend$2({},o,{get:function(){return p},set:function(t){var e=findDirectionSetting(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",extend$2({},o,{get:function(){return d},set:function(t){d=!!t,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",extend$2({},o,{get:function(){return f},set:function(t){if("number"!=typeof t&&t!==autoKeyword)throw new SyntaxError("An invalid number or illegal string was specified.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",extend$2({},o,{get:function(){return g},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",extend$2({},o,{get:function(){return y},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",extend$2({},o,{get:function(){return v},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",extend$2({},o,{get:function(){return m},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",extend$2({},o,{get:function(){return _},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");_=e,this.hasBeenReset=!0}})),r.displayState=undefined,i)return r}function findScrollSetting(t){return"string"==typeof t&&(!!scrollSetting[t.toLowerCase()]&&t.toLowerCase())}function isValidPercentValue(t){return"number"==typeof t&&t>=0&&t<=100}function VTTRegion(){var t=100,e=3,n=0,r=100,i=0,o=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!isValidPercentValue(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorX must be between 0 and 100.");i=t}},scroll:{enumerable:!0,get:function(){return s},set:function(t){var e=findScrollSetting(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");s=e}}})}function createTrackHelper(t,e,n,r){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new ALL.text.TrackClass(i);return o.addTrack(s),s}function use(t,e){middlewares[t]=middlewares[t]||[],middlewares[t].push(e)}function setSource(t,e,n){t.setTimeout(function(){return setSourceHelper(e,middlewares[e.type],n,t)},1)}function setTech(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}function get$3(t,e,n){return t.reduceRight(middlewareIterator(n),e[n]())}function set$1(t,e,n,r){return e[n](t.reduce(middlewareIterator(n),r))}function middlewareIterator(t){return function(e,n){return n[t]?n[t](e):e}}function setSourceHelper(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[],n=arguments[2],r=arguments[3],i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[],o=arguments.length>5&&arguments[5]!==undefined&&arguments[5],s=e[0],a=e.slice(1);if("string"==typeof s)setSourceHelper(t,middlewares[s],n,r,i,o);else if(s){var l=s(r);l.setSource(assign({},t),function(e,s){if(e)return setSourceHelper(t,a,n,r,i,o);i.push(l),setSourceHelper(s,t.type===s.type?a:middlewares[s.type],n,r,i,o)})}else a.length?setSourceHelper(t,a,n,r,i,o):o?n(t,i):setSourceHelper(t,middlewares["*"],n,r,i,!0)}function constructColor(t,e){return"rgba("+parseInt(t[1]+t[1],16)+","+parseInt(t[2]+t[2],16)+","+parseInt(t[3]+t[3],16)+","+e+")"}function tryUpdateStyle(t,e,n){try{t.style[e]=n}catch(r){return}}function formatTime(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:t;t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===Infinity)&&(i=r=n="-"),i=i>0||s>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n}function formatDate(t,e){if(!t)return"";var n=new Date(t),r=n.getFullYear(),i=n.getMonth()+1,o=n.getDate(),s=n.getHours(),a=n.getMinutes();n.getSeconds();return r+"/"+i+"/"+o+" "+s+":"+(a<10?"0"+a:a)}function parseOptionValue(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function getSelectedOptionValue(t,e){return parseOptionValue(t.options[t.options.selectedIndex].value,e)}function setSelectedOption(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(parseOptionValue(t.options[r].value,n)===e){t.selectedIndex=r;break}}function videojs(t,e,n){var r=void 0;if("string"==typeof t){var i=videojs.getPlayers();if(0===t.indexOf("#")&&(t=t.slice(1)),i[t])return e&&log$2.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&i[t].ready(n),i[t];r=$("#"+t)}else r=t;if(!r||!r.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(r.player||Player.players[r.playerId])return r.player||Player.players[r.playerId];isEl(r)&&!document_1.body.contains(r)&&log$2.warn("The element supplied is not included in the DOM"),e=e||{},videojs.hooks("beforesetup").forEach(function(t){var n=t(r,mergeOptions(e));if(!isObject$1(n)||Array.isArray(n))return void log$2.error("please return an object in beforesetup hooks");e=mergeOptions(e,n)});var o=Component.getComponent("Player"),s=new o(r,e,n);return videojs.hooks("setup").forEach(function(t){return t(s)}),s}function toObject(t){if(null===t||t===undefined)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function shouldUseNative(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}function decodeComponents(t,e){try{return decodeURIComponent(t.join(""))}catch(i){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),r=t.slice(e);return Array.prototype.concat.call([],decodeComponents(n),decodeComponents(r))}function decode(t){try{return decodeURIComponent(t)}catch(r){for(var e=t.match(singleMatcher),n=1;n<e.length;n++)t=decodeComponents(e,n).join(""),e=t.match(singleMatcher);return t}}function customDecodeURIComponent(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=multiMatcher.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(a){var r=decode(n[0]);r!==n[0]&&(e[n[0]]=r)}n=multiMatcher.exec(t)}e["%C2"]="�";for(var i=Object.keys(e),o=0;o<i.length;o++){var s=i[o];t=t.replace(new RegExp(s,"g"),e[s])}return t}function encoderForArrayFormat(t){switch(t.arrayFormat){case"index":return function(e,n,r){return null===n?[encode(e,t),"[",r,"]"].join(""):[encode(e,t),"[",encode(r,t),"]=",encode(n,t)].join("")};case"bracket":return function(e,n){return null===n?encode(e,t):[encode(e,t),"[]=",encode(n,t)].join("")};default:return function(e,n){return null===n?encode(e,t):[encode(e,t),"=",encode(n,t)].join("")}}}function parserForArrayFormat(t){var e;switch(t.arrayFormat){case"index":return function(t,n,r){if(e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),!e)return void(r[t]=n);r[t]===undefined&&(r[t]={}),r[t][e[1]]=n};case"bracket":return function(t,n,r){return e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?r[t]===undefined?void(r[t]=[n]):void(r[t]=[].concat(r[t],n)):void(r[t]=n)};default:return function(t,e,n){if(n[t]===undefined)return void(n[t]=e);n[t]=[].concat(n[t],e)}}}function encode(t,e){return e.encode?e.strict?strictUriEncode(t):encodeURIComponent(t):t}function keysSorter(t){return Array.isArray(t)?t.sort():"object"==typeof t?keysSorter(Object.keys(t)).sort(function(t,e){return Number(t)-Number(e)}).map(function(e){return t[e]}):t}function extract(t){var e=t.indexOf("?");return-1===e?"":t.slice(e+1)}function parse(t,e){e=objectAssign({arrayFormat:"none"},e);var n=parserForArrayFormat(e),r=Object.create(null);return"string"!=typeof t?r:(t=t.trim().replace(/^[?#&]/,""))?(t.split("&").forEach(function(t){var e=t.replace(/\+/g," ").split("="),i=e.shift(),o=e.length>0?e.join("="):undefined;o=o===undefined?null:decodeUriComponent(o),n(decodeUriComponent(i),o,r)}),Object.keys(r).sort().reduce(function(t,e){var n=r[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=keysSorter(n):t[e]=n,t},Object.create(null))):r}function jsonp(t,e,n){function r(){c.parentNode&&c.parentNode.removeChild(c),window[a]="",u&&clearTimeout(u)}function i(){window[a]&&r()}"function"==typeof e&&(n=e,e={}),e||(e={});var o,s=e.prefix||"__jp",a=e.name||s+count++,l=e.funcKey||"callback";o="object"==_typeof(e.param)?queryString.stringify(e.param):e.param;var c,u,h=null!=e.timeout?e.timeout:6e3,p=encodeURIComponent,d=document.getElementsByTagName("script")[0]||document.head;return h&&(u=setTimeout(function(){r(),n&&n(new Error("Timeout"))},h)),window[a]=function(t){r(),n&&n(null,t)},t+=(~t.indexOf("?")?"&":"?")+o+"&"+l+"="+p(a),t=t.replace("?&","?"),c=document.createElement("script"),c.setAttribute("src",t),c.setAttribute("async",!0),c.onload=function(t){},c.onreadystatechange=function(){"loaded"===this.readyState&&window[a]&&(r(),n&&n(new Error("ServerError")))},c.onerror=function(t){r(),n&&n(new Error("ServerError"))},d.parentNode.insertBefore(c,d),i}function mountHlsProvider(t){if(videojs.browser.IS_IOS&&videojs.browser.IS_MQQ||videojs.browser.IS_UC)return!1;if(videojs.browser.IS_ENABLED_MSE||videojs.browser.IS_SIMULATOR||t)try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(HlsSourceHandler,0)}catch(n){}}function handlePlaybackMetadataLoaded(t,e){function n(t){return"dash-audio-"+t}function r(t,e){return t.find(function(t){return n(t.index)===e.id})}var i=t.dash.mediaPlayer,o=i.getTracksFor("audio"),s=t.audioTracks();s.length&&e.clearTracks(["audio"]);var a=i.getCurrentTrackFor("audio");o.forEach(function(t){var e=t.lang;t.roles&&t.roles.length&&(e+=" ("+t.roles.join(", ")+")"),s.addTrack(new videojs.AudioTrack({enabled:t===a,id:n(t.index),kind:t.kind||"main",label:e,language:t.lang}))});var l=function(){for(var t=0;t<s.length;t++){var e=s[t];if(e.enabled){var n=r(o,e);i.setCurrentTrack(n)}else;}};s.addEventListener("change",l),t.dash.mediaPlayer.on(window.dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,function(){s.removeEventListener("change",l)})}function setupAudioTracks(t,e){t.dash.mediaPlayer.on(window.dashjs.MediaPlayer.events.PLAYBACK_METADATA_LOADED,handlePlaybackMetadataLoaded.bind(null,t,e))}function find(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n]}function attachDashTextTracksToVideojs(t,e,n){function r(){for(var e=t.dash.mediaPlayer,r=t.textTracks(),o=-1,s=0;s<r.length;s+=1)!function(t){var e=r[t];if("showing"===e.mode){var s=find(i,function(t){return t.textTrack===e}),a=s?s.dashTrack:null;a&&(o=n.indexOf(a))}}(s);o!==e.getCurrentTextTrackIndex()&&e.setTextTrack(o)}var i=[],o=n.map(function(t){return{dashTrack:t,trackConfig:{label:t.lang,language:t.lang,srclang:t.lang,kind:t.kind}}}).map(function(e){var n=e.trackConfig,r=e.dashTrack,o=t.addRemoteTextTrack(n,!1);return i.push({textTrack:o.track,dashTrack:r}),o});return t.textTracks().on("change",r),t.dash.mediaPlayer.on(window_1.dashjs.MediaPlayer.events.STREAM_TEARDOWN_COMPLETE,function(){t.textTracks().off("change",r)}),r(),o}function setupTextTracks(t,e,n){function r(){o.forEach(t.removeRemoteTextTrack.bind(t)),o=[]}function i(a){var l=(a.index,a.tracks);s.off(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i),r(),l.length&&(o=attachDashTextTracksToVideojs(t,e,l,n))}window_1.VTTCue&&!/\[native code\]/.test(window_1.VTTCue.toString())&&(window_1.VTTCue=!1);var o=[];if(e.featuresNativeTextTracks)return void videojs.log.error("You must pass {html: {nativeCaptions: false}} in the videojs constructor to use text tracks in videojs-contrib-dash");var s=t.dash.mediaPlayer;s.on(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i),s.on(window_1.dashjs.MediaPlayer.events.CAN_PLAY,function(){s.off(window_1.dashjs.MediaPlayer.events.TEXT_TRACKS_ADDED,i)})}function mountDashProvider(t){(window_1.MediaSource||t)&&videojs.getTech("Html5").registerSourceHandler(videojs.DashSourceHandler(),0)}function getTemplate(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"fill",n=t,r="draw-"+e;return['<svg height="100%" width="100%" viewBox="0 0 484 348">\n <path class="'+r+'" transform="translate(4 4)" d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"/>\n <path transform="translate(4 4)" d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z" style="fill:#fff ;"/>\n </svg>','<svg height="100%" width="100%" viewBox="0 0 476 340">\n <path class="'+r+'" d="M383,124C350-42,122.3-40.5,90.6,123.5c-110.4,18.5-131,185,.6,216.5H381.6C519.7,310.7,494.1,137.8,383,124Z"/>\n <path d="M200.4,110.2c-9.4-5.8-19.6,2.7-19.4,11.7V256.2c0,8,10.4,16.7,19.4,10.8,2.2-1.4,111.8-65.9,114-67.3,7.4-4,10.1-15.8,0-22.2Z" style="fill:#fff ;"/>\n </svg>','<svg height="100%" width="100%" viewBox="0 14 96 68">\n <path class="'+r+'" d="M96,44.3v7.3c-0.1,7.7-1,15.5-1,15.5s-0.9,6.6-3.8,9.5c-3.6,3.8-7.7,3.8-9.6,4c-13.4,1-33.5,0.9-33.5,0.9 c-0.8,0-25-0.2-32.5-0.9c-2.1-0.4-6.9-0.3-10.6-4.1c-2.9-2.9-3.8-9.5-3.8-9.5s-1-7.7-1.1-15.5v-7.3c0.2-7.8,1.1-15.5,1.1-15.5 s0.9-6.6,3.8-9.5c3.6-3.8,7.7-3.8,9.6-4.1c13.4-1,33.5-0.9,33.5-0.9s20.1-0.1,33.5,0.9c1.9,0.2,5.9,0.2,9.6,4.1 c2.9,2.9,3.8,9.5,3.8,9.5S95.9,36.6,96,44.3z M38.3,61.4L64,47.9L38.3,34.4V61.4z"/>\n <polygon points="64,47.9 38.3,61.4 38.3,34.4" fill="#fff"/>\n </svg>'][n]}function trimmedEndIndex(t){for(var e=t.length;e--&&reWhitespace.test(t.charAt(e)););return e}function baseTrim(t){return t?t.slice(0,_trimmedEndIndex(t)+1).replace(reTrimStart,""):t}function toNumber(t){if("number"==typeof t)return t;if(isSymbol_1(t))return NAN;if(isObject_1(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=isObject_1(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=_baseTrim(t);var n=reIsBinary.test(t);return n||reIsOctal.test(t)?freeParseInt(t.slice(2),n?2:8):reIsBadHex.test(t)?NAN:+t}function debounce(t,e,n){function r(e){var n=p,r=d;return p=d=undefined,m=e,g=t.apply(r,n)}function i(t){return m=t,y=setTimeout(a,e),_?r(t):g}function o(t){var n=t-v,r=t-m,i=e-n;return b?nativeMin(i,f-r):i}function s(t){var n=t-v,r=t-m;return v===undefined||n>=e||n<0||b&&r>=f}function a(){var t=now_1();if(s(t))return l(t);y=setTimeout(a,o(t))}function l(t){return y=undefined,T&&p?r(t):(p=d=undefined,g)}function c(){y!==undefined&&clearTimeout(y),m=0,p=v=d=y=undefined}function u(){return y===undefined?g:l(now_1())}function h(){var t=now_1(),n=s(t);if(p=arguments,d=this,v=t,n){if(y===undefined)return i(v);if(b)return clearTimeout(y),y=setTimeout(a,e),r(v)}return y===undefined&&(y=setTimeout(a,e)),g}var p,d,f,g,y,v,m=0,_=!1,b=!1,T=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$2);return e=toNumber_1(e)||0,isObject_1(n)&&(_=!!n.leading,b="maxWait"in n,f=b?nativeMax(toNumber_1(n.maxWait)||0,e):f,T="trailing"in n?!!n.trailing:T),h.cancel=c,h.flush=u,h}function throttle$1(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$1);return isObject_1(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),debounce_1(t,e,{leading:r,maxWait:e,trailing:i})}function baseAssignValue(t,e,n){"__proto__"==e&&_defineProperty?_defineProperty(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function assignValue(t,e,n){var r=t[e];hasOwnProperty$6.call(t,e)&&eq_1(r,n)&&(n!==undefined||e in t)||_baseAssignValue(t,e,n)}function baseIsArguments(t){return isObjectLike_1(t)&&_baseGetTag(t)==argsTag$1}function stubFalse(){return!1}function isLength(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER$1}function baseIsTypedArray(t){return isObjectLike_1(t)&&isLength_1(t.length)&&!!typedArrayTags[_baseGetTag(t)]}function baseUnary(t){return function(e){return t(e)}}function overArg(t,e){return function(n){return t(e(n))}}function baseIsMap(t){return isObjectLike_1(t)&&_getTag(t)==mapTag$4}function baseIsSet(t){return isObjectLike_1(t)&&_getTag(t)==setTag$4}function mountFlvProvider(t){if(videojs.browser.IS_IOS&&videojs.browser.IS_MQQ)return!1;if(!videojs.browser.IS_TBS&&!videojs.browser.IS_MQQB&&(!IS_IOS||!videojs.browser.IS_SAFARI)&&!videojs.browser.IE_VERSION||t)try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(FlvSourceHandler,0)}catch(n){}}function mountWebRTCProvider(t){if(!videojs.browser.isWebRTCSupported())return!1;try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(sourceHandler,0)}catch(n){}}function FlashRtmpDecorator(t){return t.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},t.streamFromParts=function(t,e){return t+"&"+e},t.streamToParts=function(t){var e={connection:"",stream:""};if(!t)return e;var n=t.search(/&(?!\w+=)/),r=void 0;return-1!==n?r=n+1:0===(n=r=t.lastIndexOf("/")+1)&&(n=r=t.length),e.connection=t.substring(0,n),e.stream=t.substring(r,t.length),e},t.isStreamingType=function(e){return e in t.streamingFormats},t.RTMP_RE=/^rtmp[set]?:\/\//i,t.isStreamingSrc=function(e){return t.RTMP_RE.test(e)},t.rtmpSourceHandler={},t.rtmpSourceHandler.canPlayType=function(e){return t.isStreamingType(e)?"maybe":""},t.rtmpSourceHandler.canHandleSource=function(e,n){var r=t.rtmpSourceHandler.canPlayType(e.type);return r||(t.isStreamingSrc(e.src)?"maybe":"")},t.rtmpSourceHandler.handleSource=function(e,n,r){var i=t.streamToParts(e.src);n.setRtmpConnection(i.connection),n.setRtmpStream(i.stream)},t.registerSourceHandler(t.rtmpSourceHandler),t}function _createSetter(t){var e=t.charAt(0).toUpperCase()+t.slice(1);_api["set"+e]=function(e){return this.el_.vjs_setProperty(t,e)}}function _createGetter(t){_api[t]=function(){return this.el_.vjs_getProperty(t)}}function TCPlayer(t,e,n){var r={str_ext_content:JSON.stringify(e)};reportLog(r);var i=void 0,o=(new Date).getTime(),s=videojs.dom;if("string"==typeof t)i=document.querySelector("#"+t);else{if(!t||!t.nodeName)throw new TypeError("The ID or element supplied is not valid.");i=t}if("video"!=i.nodeName.toLowerCase()&&"audio"!=i.nodeName.toLowerCase())throw new TypeError("The element type must be <video>.");s.hasClass(i,"tcplayer")||s.addClass(i,"tcplayer"),s.hasClass(i,"video-js")||s.addClass(i,"video-js"),videojs.browser.IE_VERSION&&(i.style.width||i.offsetWidth&&300!==i.offsetWidth)&&(window_1.VIDEOJS_NO_DYNAMIC_STYLE=!0);var a={controls:!0,language:"zh-CN",playbackRates:[.5,1,1.25,1.5,2],controlBar:{volumePanel:{inline:"video"!=i.nodeName.toLowerCase()},cssFullscreenToggle:!1,fullscreenToggle:"video"==i.nodeName.toLowerCase(),QualitySwitcherMenuButton:!0,pictureInPictureToggle:!1},plugins:{Skin:"",QualitySwitcher:{},MultiResolution:{},Errors:{},Reporter:{},ContextMenu:{},LevelSwitch:{},VttThumbnail:{},PlayerMetrics:{}},webrtcConfig:{enableAbr:!0,abrLabels:{}}};e.plugins&&e.plugins.Dvr&&(a.plugins.LiveDvr=e.plugins.Dvr),e=videojs.mergeOptions(a,e),e.webrtcConfig.enableAbr&&(isWebrtcUrl(e.sources)&&e.sources&&"string"==typeof e.sources&&arrangeWebrtcSource(e.sources,e),e.sources&&Array.isArray(e.sources)&&e.sources[0]&&e.sources[0].src&&isWebrtcUrl(e.sources[0].src)&&arrangeWebrtcSource(e.sources[0].src,e)),"exitPictureInPicture"in document||(e.controlBar.pictureInPictureToggle=!1),log("player initializing",e),videojs.getComponent("player").prototype.options_.children.splice(1,0,"logoImage");var l=videojs(t,e,n);return l.PlayerMetrics(e).setTimingData({initStart:o}),log("player initialized",e),l}var version="5.3.2",commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},win;win="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};var window_1=win,empty={},empty$1=(Object.freeze||Object)({"default":empty}),minDoc=empty$1&&empty||empty$1,topLevel=void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof window?window:{},doccy;"undefined"!=typeof document?doccy=document:(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"])||(doccy=topLevel["__GLOBAL_DOCUMENT_CACHE@4"]=minDoc);var document_1=doccy,USER_AGENT=window_1.navigator&&window_1.navigator.userAgent||"",VENDOR=window_1.navigator&&window_1.navigator.vendor||"",webkitVersionMap=/AppleWebKit\/([\d.]+)/i.exec(USER_AGENT),appleWebkitVersion=webkitVersionMap?parseFloat(webkitVersionMap.pop()):null,IS_IPAD=/iPad/i.test(USER_AGENT),IS_IPHONE=/iPhone/i.test(USER_AGENT)&&!IS_IPAD,IS_IPOD=/iPod/i.test(USER_AGENT),IS_IOS=IS_IPHONE||IS_IPAD||IS_IPOD,IOS_VERSION=function(){var t=USER_AGENT.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),IOS_VERSION_ARRAY=function(){var t=USER_AGENT.match(/OS (\d+)_(\d+)_?(\d+)?/i);return t&&[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||"0",10)]||[]}(),IS_ANDROID=/Android/i.test(USER_AGENT),ANDROID_VERSION=function(){var t=USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),IS_TBS=/TBS\/\d+/i.test(USER_AGENT),TBS_VERSION=function(){var t=USER_AGENT.match(/TBS\/(\d+)/i);if(t&&t[1])return t[1]}(),IS_MQQB=!IS_TBS&&/MQQBrowser\/\d+/i.test(USER_AGENT),IS_QQB=!IS_TBS&&/ QQBrowser\/\d+/i.test(USER_AGENT),IS_PC_WECHAT=/windowswechat/i.test(USER_AGENT),IS_WECHAT=/(micromessenger|webbrowser)/i.test(USER_AGENT),IS_MQQ=/ QQ\/\d+/i.test(USER_AGENT)||/MQQBrowser\/\d+/i.test(USER_AGENT),IS_OLD_ANDROID=IS_ANDROID&&/webkit/i.test(USER_AGENT)&&ANDROID_VERSION<2.3,IS_NATIVE_ANDROID=IS_ANDROID&&ANDROID_VERSION<5&&appleWebkitVersion<537,IS_FIREFOX=/Firefox/i.test(USER_AGENT),IS_EDGE=/Edge/i.test(USER_AGENT),IS_EDG=/Edg/i.test(USER_AGENT),IS_EDGA=/EdgA/i.test(USER_AGENT),EDG_VERSION=IS_EDG&&function(){var t=USER_AGENT.match(/Edg\/(\d+)/);return t&&t[1]?parseFloat(t[1]):null}(),EDGA_VERSION=IS_EDGA&&function(){var t=USER_AGENT.match(/EdgA\/(\d+)/);return t&&t[1]?parseFloat(t[1]):null}(),IS_CHROME=function(){return!(IS_EDGE||!/Chrome/i.test(USER_AGENT))||!(!/Safari/i.test(USER_AGENT)||!/CriOS/i.test(USER_AGENT))}()&&!IS_WECHAT&&!IS_MQQB&&!IS_QQB,CHROME_VERSION=function(){var t=USER_AGENT.match(/Chrome\/(\d+)/),e=USER_AGENT.match(/CriOS\/(\d+)/);return t&&t[1]?parseFloat(t[1]):e&&e[1]?parseFloat(e[1]):null}(),IS_IE8=/MSIE\s8\.0/.test(USER_AGENT),IE_VERSION=function(){var t=/MSIE\s(\d+)\.\d/.exec(USER_AGENT),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(USER_AGENT)&&/rv:11.0/.test(USER_AGENT)&&(e=11),e}(),IS_SAFARI=/Safari/i.test(USER_AGENT)&&!IS_CHROME&&!IS_ANDROID&&!IS_EDGE&&!IS_MQQB&&!IS_QQB&&!IS_PC_WECHAT,IS_ANY_SAFARI=IS_SAFARI||IS_IOS,IS_SIMULATOR=IS_SAFARI&&"Google Inc."===VENDOR,IS_UC=/UCBrowser\/(\d+)\./i.test(USER_AGENT),IS_QUARK=/Quark\/(\d+)\./i.test(USER_AGENT),TOUCH_ENABLED=isReal()&&("ontouchstart"in window_1||window_1.DocumentTouch&&window_1.document instanceof window_1.DocumentTouch),BACKGROUND_SIZE_SUPPORTED=isReal()&&"backgroundSize"in window_1.document.createElement("video").style,IS_WIN=/Windows/i.test(USER_AGENT),IS_MAC=/MAC OS X/i.test(USER_AGENT),WIN_VER=function(){return/Windows NT ([.\w]+)/.test(USER_AGENT),RegExp.$1}(),MAC_VER=function(){return/Mac OS X (\w+)/.test(USER_AGENT),RegExp.$1}(),QQ_VER=function(){return/QQBrowser\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),EDGE_VER=function(){return/Edge\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),SAFARI_VER=function(){return/Version\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),FIREFOX_VER=function(){return/Firefox\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),CHROME_VER=function(){return/Chrome\/([.\d]+)/.test(USER_AGENT),RegExp.$1}(),IS_HUAWEI=/HUAWEI|honor|HMA/i.test(USER_AGENT),IS_XIAOMI=/HM|RedMi|Mi/i.test(USER_AGENT)&&!IS_HUAWEI,IS_OPPO=/OPPO/i.test(USER_AGENT),IS_VIVO=/VIVO/i.test(USER_AGENT),IS_SX=/GT-|SM-|SCH-/i.test(USER_AGENT),IS_ONE=/ONE/i.test(USER_AGENT),IS_CP=/Coolpad/i.test(USER_AGENT),IS_ZX=/ZTE/i.test(USER_AGENT),isWebRTCAPISupported=function(){return["RTCPeerConnection","webkitRTCPeerConnection","RTCIceGatherer"].filter(function(t){return t in window_1}).length>0},isWebRTCSupported=function(){return!IS_UC&&!IS_EDGE&&(!(IS_EDG&&EDG_VERSION<80&&IS_EDGA&&EDGA_VERSION<80)&&(!(IS_FIREFOX&&FIREFOX_VER<56)&&(!(!IS_TBS&&IS_SAFARI&&IS_IOS&&(0===IOS_VERSION_ARRAY.length||IOS_VERSION_ARRAY[0]<11||11===IOS_VERSION_ARRAY[0]&&IOS_VERSION_ARRAY[1]<1||11===IOS_VERSION_ARRAY[0]&&1===IOS_VERSION_ARRAY[1]&&IOS_VERSION_ARRAY[2]<2))&&(!IS_QUARK&&isWebRTCAPISupported()))))},IS_ENABLED_MSE=function(){var t=window_1.MediaSource=window_1.MediaSource||window_1.WebKitMediaSource,e=window_1.SourceBuffer=window_1.SourceBuffer||window_1.WebKitSourceBuffer,n=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return IS_IOS?undefined:n&&r}(),browser=(Object.freeze||Object)({USER_AGENT:USER_AGENT,IS_IPAD:IS_IPAD,IS_IPHONE:IS_IPHONE,IS_IPOD:IS_IPOD,IS_IOS:IS_IOS,IOS_VERSION:IOS_VERSION,IOS_VERSION_ARRAY:IOS_VERSION_ARRAY,IS_ANDROID:IS_ANDROID,ANDROID_VERSION:ANDROID_VERSION,IS_TBS:IS_TBS,TBS_VERSION:TBS_VERSION,IS_MQQB:IS_MQQB,IS_QQB:IS_QQB,IS_PC_WECHAT:IS_PC_WECHAT,IS_WECHAT:IS_WECHAT,IS_MQQ:IS_MQQ,IS_OLD_ANDROID:IS_OLD_ANDROID,IS_NATIVE_ANDROID:IS_NATIVE_ANDROID,IS_FIREFOX:IS_FIREFOX,IS_EDGE:IS_EDGE,IS_EDG:IS_EDG,IS_EDGA:IS_EDGA,EDG_VERSION:EDG_VERSION,EDGA_VERSION:EDGA_VERSION,IS_CHROME:IS_CHROME,CHROME_VERSION:CHROME_VERSION,IS_IE8:IS_IE8,IE_VERSION:IE_VERSION,IS_SAFARI:IS_SAFARI,IS_ANY_SAFARI:IS_ANY_SAFARI,IS_SIMULATOR:IS_SIMULATOR,IS_UC:IS_UC,IS_QUARK:IS_QUARK,TOUCH_ENABLED:TOUCH_ENABLED,BACKGROUND_SIZE_SUPPORTED:BACKGROUND_SIZE_SUPPORTED,IS_WIN:IS_WIN,IS_MAC:IS_MAC,WIN_VER:WIN_VER,MAC_VER:MAC_VER,QQ_VER:QQ_VER,EDGE_VER:EDGE_VER,SAFARI_VER:SAFARI_VER,FIREFOX_VER:FIREFOX_VER,CHROME_VER:CHROME_VER,IS_HUAWEI:IS_HUAWEI,IS_XIAOMI:IS_XIAOMI,IS_OPPO:IS_OPPO,IS_VIVO:IS_VIVO,IS_SX:IS_SX,IS_ONE:IS_ONE,IS_CP:IS_CP,IS_ZX:IS_ZX,isWebRTCAPISupported:isWebRTCAPISupported,isWebRTCSupported:isWebRTCSupported,IS_ENABLED_MSE:IS_ENABLED_MSE}),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),inherits=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},possibleConstructorReturn=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},taggedTemplateLiteralLoose=function(t,e){return t.raw=e,t},toString=Object.prototype.toString,keys=function(t){return isObject$1(t)?Object.keys(t):[]},log$1=void 0,level="info",history=[],logByType=function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!!IE_VERSION&&IE_VERSION<11,r=log$1.levels[level],i=new RegExp("^("+r+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),history&&history.push([].concat(e)),(log$1.enableLog||"log"!=t)&&(e.unshift("TCPlayer:"),window_1.console)){var o=window_1.console[t];o||"debug"!==t||(o=window_1.console.info||window_1.console.log),o&&r&&i.test(t)&&(n&&(e=e.map(function(t){if(isObject$1(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)}).join(" ")),o.apply?o[Array.isArray(e)?"apply":"call"](window_1.console,e):o(e))}};log$1=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];logByType("log",e)},log$1.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:level},log$1.level=function(t){if("string"==typeof t){if(!log$1.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');level=t}return level},log$1.history=function(){return history?[].concat(history):[]},log$1.history.clear=function(){history&&(history.length=0)},log$1.history.disable=function(){null!==history&&(history.length=0,history=null)},log$1.history.enable=function(){null===history&&(history=[])},log$1.enableLog=!1,log$1.error=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return logByType("error",e)},log$1.warn=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return logByType("warn",e)},log$1.debug=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return logByType("debug",e)};var log$2=log$1,tsml=function(t){for(var e="",n=0;n<arguments.length;n++)e+=clean(t[n])+(arguments[n+1]||"");return e},_templateObject=taggedTemplateLiteralLoose(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]),$=createQuerier("querySelector"),$$=createQuerier("querySelectorAll"),Dom=(Object.freeze||Object)({isReal:isReal,isEl:isEl,isInFrame:isInFrame,createEl:createEl,textContent:textContent,
3
+ 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,$:$,$$:$$}),_guid=1,elData={},elIdAttr="vdata"+(new Date).getTime(),_supportsPassive=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){_supportsPassive=!0}});window_1.addEventListener("test",null,t),window_1.removeEventListener("test",null,t)}catch(e){}}();var passiveEvents=["touchstart","touchmove"],Events=(Object.freeze||Object)({fixEvent:fixEvent,on:on,off:off,trigger:trigger,one:one}),_windowLoaded=!1,videojs$2=void 0,autoSetup=function(){if(isReal()){var t=document_1.getElementsByTagName("video"),e=document_1.getElementsByTagName("audio"),n=document_1.getElementsByTagName("video-js"),r=[];if(t&&t.length>0)for(var i=0,o=t.length;i<o;i++)r.push(t[i]);if(e&&e.length>0)for(var s=0,a=e.length;s<a;s++)r.push(e[s]);if(n&&n.length>0)for(var l=0,c=n.length;l<c;l++)r.push(n[l]);if(r&&r.length>0)for(var u=0,h=r.length;u<h;u++){var p=r[u];if(!p||!p.getAttribute){autoSetupTimeout(1);break}if(p.player===undefined){var d=p.getAttribute("data-setup");null!==d&&videojs$2(p)}}else _windowLoaded||autoSetupTimeout(1)}};isReal()&&"complete"===document_1.readyState?_windowLoaded=!0:one(window_1,"load",function(){_windowLoaded=!0});var createStyleElement=function(t){var e=document_1.createElement("style");return e.className=t,e},setTextContent=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},bind=function(t,e,n){e.guid||(e.guid=newGUID());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},throttle=function(t,e){var n=Date.now();return function(){var r=Date.now();r-n>=e&&(t.apply(undefined,arguments),n=r)}},EventTarget=function(){};EventTarget.prototype.allowedEvents_={},EventTarget.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},on(this,t,e),this.addEventListener=n},EventTarget.prototype.addEventListener=EventTarget.prototype.on,EventTarget.prototype.off=function(t,e){off(this,t,e)},EventTarget.prototype.removeEventListener=EventTarget.prototype.off,EventTarget.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},one(this,t,e),this.addEventListener=n},EventTarget.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=fixEvent(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),trigger(this,t)},EventTarget.prototype.dispatchEvent=EventTarget.prototype.trigger;var isEvented=function(t){return t instanceof EventTarget||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},isValidEventType=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},validateTarget=function(t){if(!t.nodeName&&!isEvented(t))throw new Error("Invalid target; must be a DOM node or evented object.")},validateEventType=function(t){if(!isValidEventType(t))throw new Error("Invalid event type; must be a non-empty string or array.")},validateListener=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},normalizeListenArgs=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),validateTarget(r),validateEventType(i),validateListener(o),o=bind(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},listen=function(t,e,n,r){validateTarget(t),t.nodeName?Events[e](t,n,r):t[e](n,r)},EventedMixin={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=normalizeListenArgs(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(listen(s,"on",a,l),!o){var c=function(){return t.off(s,a,l)};c.guid=l.guid;var u=function(){return t.off("dispose",c)};u.guid=l.guid,listen(this,"on","dispose",c),listen(s,"on","dispose",u)}},one:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=normalizeListenArgs(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(o)listen(s,"one",a,l);else{var c=function u(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.off(s,a,u),l.apply(null,n)};c.guid=l.guid,listen(s,"one",a,c)}},off:function(t,e,n){if(!t||isValidEventType(t))isValidEventType(e)?off(this.eventBusEl_,e,n):off(this.eventBusEl_,t,e);else{var r=t,i=e;validateTarget(r),validateEventType(i),validateListener(n),n=bind(this,n),this.off("dispose",n),r.nodeName?(off(r,i,n),off(r,"dispose",n)):isEvented(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return trigger(this.eventBusEl_,t,e)}},StatefulMixin={state:{},setState:function(t){var e=this;"function"==typeof t&&(t=t());var n=void 0;return each(t,function(t,r){e.state[r]!==t&&(n=n||{},n[r]={from:e.state[r],to:t}),e.state[r]=t}),n&&isEvented(this)&&this.trigger({changes:n,type:"statechanged"}),n}},isArray=Array.isArray,isArray_1=isArray,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol$1=_root.Symbol,_Symbol=Symbol$1,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:undefined,_getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString,_objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:undefined,_baseGetTag=baseGetTag,isObjectLike_1=isObjectLike,symbolTag="[object Symbol]",isSymbol_1=isSymbol,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,_isKey=isKey,isObject_1=isObject$2,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]",isFunction_1=isFunction$1,coreJsData=_root["__core-js_shared__"],_coreJsData=coreJsData,maskSrcKey=function(){var t=/[^.]+$/.exec(_coreJsData&&_coreJsData.keys&&_coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),_isMasked=isMasked,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString,_toSource=toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$1=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$1).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_baseIsNative=baseIsNative,_getValue=getValue,_getNative=getNative,nativeCreate=_getNative(Object,"create"),_nativeCreate=nativeCreate,_hashClear=hashClear,_hashDelete=hashDelete,HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,_hashGet=hashGet,objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,_hashHas=hashHas,HASH_UNDEFINED$1="__lodash_hash_undefined__",_hashSet=hashSet;Hash.prototype.clear=_hashClear,Hash.prototype["delete"]=_hashDelete,Hash.prototype.get=_hashGet,Hash.prototype.has=_hashHas,Hash.prototype.set=_hashSet;var _Hash=Hash,_listCacheClear=listCacheClear,eq_1=eq,_assocIndexOf=assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice,_listCacheDelete=listCacheDelete,_listCacheGet=listCacheGet,_listCacheHas=listCacheHas,_listCacheSet=listCacheSet;ListCache.prototype.clear=_listCacheClear,ListCache.prototype["delete"]=_listCacheDelete,ListCache.prototype.get=_listCacheGet,ListCache.prototype.has=_listCacheHas,ListCache.prototype.set=_listCacheSet;var _ListCache=ListCache,Map=_getNative(_root,"Map"),_Map=Map,_mapCacheClear=mapCacheClear,_isKeyable=isKeyable,_getMapData=getMapData,_mapCacheDelete=mapCacheDelete,_mapCacheGet=mapCacheGet,_mapCacheHas=mapCacheHas,_mapCacheSet=mapCacheSet;MapCache.prototype.clear=_mapCacheClear,MapCache.prototype["delete"]=_mapCacheDelete,MapCache.prototype.get=_mapCacheGet,MapCache.prototype.has=_mapCacheHas,MapCache.prototype.set=_mapCacheSet;var _MapCache=MapCache,FUNC_ERROR_TEXT="Expected a function";memoize.Cache=_MapCache;var memoize_1=memoize,MAX_MEMOIZE_SIZE=500,_memoizeCapped=memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=_memoizeCapped(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rePropName,function(t,n,r,i){e.push(r?i.replace(reEscapeChar,"$1"):n||t)}),e}),_stringToPath=stringToPath,_arrayMap=arrayMap,INFINITY=1/0,symbolProto=_Symbol?_Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined,_baseToString=baseToString,toString_1=toString$1,_castPath=castPath,INFINITY$1=1/0,_toKey=toKey,_baseGet=baseGet,get_1=get$1,Component=function(){function t(e,n,r){if(classCallCheck(this,t),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=extend(!0,{},this.options_),n=this.options_=mergeOptions(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+newGUID()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),!1!==n.evented&&evented(this,{eventBusKey:this.el_?"el_":null}),stateful(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),removeData(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return log$2.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=mergeOptions(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return createEl(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],s=r&&r.split("-")[0],a=i&&i[s],l=n;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,function(t,n){var r=e[n-1],i=r;return void 0===r&&(i=t),i})),l},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=toTitleCase(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"==typeof e){o=toTitleCase(e);var s=n.componentClass||o;n.name=o;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!=typeof a)return null;i=new a(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&toTitleCase(i.name()),o&&(this.childNameIndex_[o]=i),"function"==typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(r[n]!==undefined&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,s=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter(function(t){return!o.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var r=void 0,i=void 0;return"string"==typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}}).filter(function(e){var n=t.getComponent(e.opts.componentClass||toTitleCase(e.name));return n&&!s.isTech(n)}).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&arguments[1]!==undefined&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(t){t&&"function"==typeof t&&t.call(this)},this),this.trigger("ready")},1)},t.prototype.$=function(t,e){return $(t,e||this.contentEl())},t.prototype.$$=function(t,e){return $$(t,e||this.contentEl())},t.prototype.hasClass=function(t){return hasClass(this.el_,t)},t.prototype.addClass=function(t){addClass(this.el_,t)},t.prototype.removeClass=function(t){if(removeClass(this.el_,t),"vjs-lock-showing"===t&&(IS_IOS||IS_ANDROID)){var e=document.getElementsByClassName("vjs-subs-caps-button"),n=get_1(e,"[0].children[1]");n&&(n.className="vjs-menu")}},t.prototype.toggleClass=function(t,e){toggleClass(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return getAttribute(this.el_,t)},t.prototype.setAttribute=function(t,e){setAttribute(this.el_,t,e)},t.prototype.removeAttribute=function(t){removeAttribute(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(e!==undefined)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+toTitleCase(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof window_1.getComputedStyle){var n=window_1.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var r="offset"+toTitleCase(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=void 0;this.on("touchstart",function(r){1===r.touches.length&&(e={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=(new Date).getTime(),n=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)n=!1;else if(e){var r=t.touches[0].pageX-e.pageX,i=t.touches[0].pageY-e.pageY,o=Math.sqrt(r*r+i*i);o>10&&(n=!1)}});var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){if(e=null,!0===n){(new Date).getTime()-t<200&&(r.preventDefault(),this.trigger("tap"))}})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=bind(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.prototype.setTimeout=function(t,e){var n=this;t=bind(this,t);var r=window_1.setTimeout(t,e),i=function(){return n.clearTimeout(r)};return i.guid="vjs-timeout-"+r,this.on("dispose",i),r},t.prototype.clearTimeout=function(t){window_1.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var n=this;t=bind(this,t);var r=window_1.setInterval(t,e),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},t.prototype.clearInterval=function(t){window_1.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e=this;if(this.supportsRaf_){t=bind(this,t);var n=window_1.requestAnimationFrame(t),r=function(){return e.cancelAnimationFrame(n)};return r.guid="vjs-raf-"+n,this.on("dispose",r),n}return this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){window_1.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r=t.getComponent("Tech"),i=r&&r.isTech(n),o=t===n||t.prototype.isPrototypeOf(n.prototype);if(i||!o){var s=void 0;throw s=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+s+".")}e=toTitleCase(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var l=a.players,c=Object.keys(l);if(l&&c.length>0&&c.map(function(t){return l[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=toTitleCase(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();Component.prototype.supportsRaf_="function"==typeof window_1.requestAnimationFrame&&"function"==typeof window_1.cancelAnimationFrame,Component.registerComponent("Component",Component);for(var EXT_MIME={m3u8:"application/x-mpegURL",flv:"video/flv",mp4:"video/mp4",webm:"video/webm",rtmp:"rtmp/flv",mpd:"application/dash+xml",mp3:"audio/mpeg",m4a:"audio/mp4",m4v:"video/x-m4v",mov:"video/mp4",mkv:"video/mp4"},SERVER_PATH="playvideo.vodplayvideo.net",SERVER_PATH_V3="playvideo.vodplayvideo.net",SERVER_PATH_BACKUP="playvideo.vodglcdn.com",LICENSE_PATH="https://drm.vod2.myqcloud.com/getlicense/v1",HLS_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/hls.min.1.1.7.js",FLV_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/flv.min.1.6.4.js",WEBRTC_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/TXLivePlayer-1.3.5.min.js",DASH_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/dash.all.min.v3.1.3.js",XP2P_HLS_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/hlsp2p.min.1.6.28.js",XP2P_FLV_PATH="https://tcsdk.com/player/tcplayer/release/v"+version+"/libs/qvbp2p_common.min.1.8.29.js",parseUrl=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=document_1.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&(i=document_1.createElement("div"),i.innerHTML='<a href="'+t+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),document_1.body.appendChild(i));for(var o={},s=0;s<e.length;s++)o[e[s]]=n[e[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=window_1.location.protocol),r&&document_1.body.removeChild(i),o},getAbsoluteURL=function(t){if(!t.match(/^https?:\/\//)){var e=document_1.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},getFileExtension=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=e.exec(t);if(n)return n.pop().toLowerCase()}return""},isCrossOrigin=function(t){var e=window_1.location,n=parseUrl(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},Url=(Object.freeze||Object)({parseUrl:parseUrl,getAbsoluteURL:getAbsoluteURL,getFileExtension:getFileExtension,isCrossOrigin:isCrossOrigin}),FullscreenApi={},apiMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],specApi=apiMap[0],browserApi=void 0,prefixedAPI=!1,i$1=0;i$1<apiMap.length;i$1++)if(apiMap[i$1][1]in document_1){browserApi=apiMap[i$1];break}if(browserApi){for(var _i=0;_i<browserApi.length;_i++)FullscreenApi[specApi[_i]]=browserApi[_i];prefixedAPI=browserApi[0]===specApi[0]}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;var tuple=SafeParseTuple,trackToJson_=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,n,r){return t[n]&&(e[n]=t[n]),e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},textTracksToJson=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=trackToJson_(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===n.indexOf(t)}).map(trackToJson_))},jsonToTextTracks=function(t,e){return t.forEach(function(t){var n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return n.addCue(t)})}),e.textTracks()},textTrackConverter={textTracksToJson:textTracksToJson,jsonToTextTracks:jsonToTextTracks,trackToJson_:trackToJson_},MODAL_CLASS_NAME="vjs-modal-dialog",ESC=27,ModalDialog=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=createEl("div",{className:MODAL_CLASS_NAME+"-content"},{role:"document"}),i.descEl_=createEl("p",{className:MODAL_CLASS_NAME+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),textContent(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},e.prototype.buildCSSClass=function(){return MODAL_CLASS_NAME+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){t.which===ESC&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",bind(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",bind(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!e&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},e.prototype.fill=function(){this.fillWith(this.content())},e.prototype.fillWith=function(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),insertContent(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},e.prototype.empty=function(){this.trigger("beforemodalempty"),emptyEl(this.contentEl()),this.trigger("modalempty")},e.prototype.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.prototype.conditionalFocus_=function(){var t=document_1.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(document_1,"keydown",this.handleKeyDown))},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(document_1,"keydown",this.handleKeyDown)},e.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<e.length;i++)if(n===e[i]){r=i;break}document_1.activeElement===this.el_&&(r=0),t.shiftKey&&0===r?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||r!==e.length-1||(e[0].focus(),t.preventDefault())}},e.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof window_1.HTMLAnchorElement||t instanceof window_1.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof window_1.HTMLInputElement||t instanceof window_1.HTMLSelectElement||t instanceof window_1.HTMLTextAreaElement||t instanceof window_1.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof window_1.HTMLIFrameElement||t instanceof window_1.HTMLObjectElement||t instanceof window_1.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},e}(Component);ModalDialog.prototype.options_={pauseOnOpen:!0,temporary:!0},Component.registerComponent("ModalDialog",ModalDialog);var TrackList=function(t){function e(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[],i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;classCallCheck(this,e);var o=possibleConstructorReturn(this,t.call(this));if(!i&&(i=o,IS_IE8)){i=document_1.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(i[s]=e.prototype[s])}i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var a=0;a<r.length;a++)i.addTrack(r[a]);return n=i,possibleConstructorReturn(o,n)}return inherits(e,t),e.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.prototype.removeTrack=function(t){for(var e=void 0,n=0,r=this.length;n<r;n++)if(this[n]===t){e=this[n],e.off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.prototype.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(EventTarget);TrackList.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var event$1 in TrackList.prototype.allowedEvents_)TrackList.prototype["on"+event$1]=null;var disableOthers=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},AudioTrackList=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,e);for(var o=void 0,s=i.length-1;s>=0;s--)if(i[s].enabled){disableOthers(i,i[s]);break}if(IS_IE8){o=document_1.createElement("custom");for(var a in TrackList.prototype)"constructor"!==a&&(o[a]=TrackList.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(o[l]=e.prototype[l])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),o.changing_=!1,r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){var n=this;e.enabled&&disableOthers(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){n.changing_||(n.changing_=!0,disableOthers(n,e),n.changing_=!1,n.trigger("change"))})},e}(TrackList),disableOthers$1=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},VideoTrackList=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[]
4
+ ;classCallCheck(this,e);for(var o=void 0,s=i.length-1;s>=0;s--)if(i[s].selected){disableOthers$1(i,i[s]);break}if(IS_IE8){o=document_1.createElement("custom");for(var a in TrackList.prototype)"constructor"!==a&&(o[a]=TrackList.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(o[l]=e.prototype[l])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),o.changing_=!1,Object.defineProperty(o,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){var n=this;e.selected&&disableOthers$1(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",function(){n.changing_||(n.changing_=!0,disableOthers$1(n,e),n.changing_=!1,n.trigger("change"))})},e}(TrackList),TextTrackList=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,e);var o=void 0;if(IS_IE8){o=document_1.createElement("custom");for(var s in TrackList.prototype)"constructor"!==s&&(o[s]=TrackList.prototype[s]);for(var a in e.prototype)"constructor"!==a&&(o[a]=e.prototype[a])}return o=n=possibleConstructorReturn(this,t.call(this,i,o)),r=o,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addTrack=function(e){return!("disabled"===e.mode&&!e.label)&&(!("captions"===e.kind&&!e.label)&&(!(IS_IOS&&"subtitles"===e.kind&&!window.textTrackCleared_)&&(t.prototype.addTrack.call(this,e),e.addEventListener("modechange",bind(this,function(){this.trigger("change")})),void(-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",bind(this,function(){this.trigger("selectedlanguagechange")}))))))},e}(TrackList),HtmlTrackElementList=function(){function t(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,t);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,o=e.length;i<o;i++)n.addTrackElement_(e[i]);if(IS_IE8)return n}return t.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},t.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},t.prototype.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),TextTrackCueList=function(){function t(e){classCallCheck(this,t);var n=this;if(IS_IE8){n=document_1.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}if(t.prototype.setCues_.call(n,e),Object.defineProperty(n,"length",{get:function(){return this.length_}}),IS_IE8)return n}return t.prototype.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},t.prototype.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},t}(),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(t){function e(){var n,r=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this)),o=i;if(IS_IE8){o=document_1.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}var a={id:r.id||(0===r.id?0:"vjs_track_"+newGUID()),kind:r.kind||"",label:r.label||"",language:r.language||""};for(var l in a)!function(t){Object.defineProperty(o,t,{get:function(){return a[t]},set:function(){}})}(l);return n=o,possibleConstructorReturn(i,n)}return inherits(e,t),e}(EventTarget),isFunction_1$2=isFunction$3,toString$3=Object.prototype.toString,trim=function(t){return t.replace(/^\s+|\s+$/g,"")},isArray$2=function(t){return"[object Array]"===Object.prototype.toString.call(t)},parseHeaders=function(t){if(!t)return{};for(var e={},n=trim(t).split("\n"),r=0;r<n.length;r++){var i=n[r],o=i.indexOf(":"),s=trim(i.slice(0,o)).toLowerCase(),a=trim(i.slice(o+1));"undefined"==typeof e[s]?e[s]=a:isArray$2(e[s])?e[s].push(a):e[s]=[e[s],a]}return e},immutable=extend$1,hasOwnProperty$4=Object.prototype.hasOwnProperty,xhr=createXHR;createXHR.XMLHttpRequest=window_1.XMLHttpRequest||noop,createXHR.XDomainRequest="withCredentials"in new createXHR.XMLHttpRequest?createXHR.XMLHttpRequest:window_1.XDomainRequest,forEachArray(["get","put","post","patch","head","delete"],function(t){createXHR["delete"===t?"del":t]=function(e,n,r){return n=initParams(e,n,r),n.method=t.toUpperCase(),_createXHR(n)}});var parseCues=function(t,e){var n=new window_1.WebVTT.Parser(window_1,window_1.vttjs,window_1.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(window_1.console&&window_1.console.groupCollapsed&&window_1.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach(function(t){return log$2.error(t)}),window_1.console&&window_1.console.groupEnd&&window_1.console.groupEnd()),n.flush()},loadTrack=function(t,e){var n={uri:t},r=isCrossOrigin(t);r&&(n.cors=r),xhr(n,bind(this,function(t,n,r){if(t)return log$2.error(t,n);if(e.loaded_=!0,"function"!=typeof window_1.WebVTT){if(e.tech_){var i=function(){return parseCues(r,e)};e.tech_.on("vttjsloaded",i),e.tech_.on("vttjserror",function(){log$2.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",i)})}}else parseCues(r,e)}))},TextTrack=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(classCallCheck(this,e),!i.tech)throw new Error("A tech was not provided.");var o=mergeOptions(i,{kind:TextTrackKind[i.kind]||i.kind||"subtitles",language:i.language||i.srclang||""}),s=TextTrackMode[o.mode]||"disabled",a=o["default"];"metadata"!==o.kind&&"chapters"!==o.kind||(s="hidden");var l=n=possibleConstructorReturn(this,t.call(this,o));if(l.tech_=o.tech,IS_IE8)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new TextTrackCueList(l.cues_),h=new TextTrackCueList(l.activeCues_),p=!1,d=bind(l,function(){this.activeCues,p&&(this.trigger("cuechange"),p=!1)});return"disabled"!==s&&l.tech_.ready(function(){l.tech_.on("timeupdate",d)},!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;TextTrackMode[t]&&(s=t,"showing"===s&&this.tech_.ready(function(){e.tech_.on("timeupdate",d)},!0),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=t&&i.endTime>=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(p=!0);return this.activeCues_=e,h.setCues_(this.activeCues_),h},set:function(){}}),o.src?(l.src=o.src,loadTrack(o.src,l)):l.loaded_=!0,r=l,possibleConstructorReturn(n,r)}return inherits(e,t),e.prototype.addCue=function(t){var e=t;if(window_1.vttjs&&!(t instanceof window_1.vttjs.VTTCue)){e=new window_1.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(var n in t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(Track);TextTrack.prototype.allowedEvents_={cuechange:"cuechange"};var AudioTrack=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var o=mergeOptions(i,{kind:AudioTrackKind[i.kind]||""}),s=n=possibleConstructorReturn(this,t.call(this,o)),a=!1;if(IS_IE8)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),o.enabled&&(s.enabled=o.enabled),s.loaded_=!0,r=s,possibleConstructorReturn(n,r)}return inherits(e,t),e}(Track),VideoTrack=function(t){function e(){var n,r,i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var o=mergeOptions(i,{kind:VideoTrackKind[i.kind]||""}),s=n=possibleConstructorReturn(this,t.call(this,o)),a=!1;if(IS_IE8)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),o.selected&&(s.selected=o.selected),r=s,possibleConstructorReturn(n,r)}return inherits(e,t),e}(Track),NONE=0,LOADING=1,LOADED=2,ERROR=3,HTMLTrackElement=function(t){function e(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this)),i=void 0,o=r;if(IS_IE8){o=document_1.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}var a=new TextTrack(n);if(o.kind=a.kind,o.src=a.src,o.srclang=a.language,o.label=a.label,o["default"]=a["default"],Object.defineProperty(o,"readyState",{get:function(){return i}}),Object.defineProperty(o,"track",{get:function(){return a}}),i=NONE,a.addEventListener("loadeddata",function(){i=LOADED,o.trigger({type:"load",target:o})}),IS_IE8){var l;return l=o,possibleConstructorReturn(r,l)}return r}return inherits(e,t),e}(EventTarget);HTMLTrackElement.prototype.allowedEvents_={load:"load"},HTMLTrackElement.NONE=NONE,HTMLTrackElement.LOADING=LOADING,HTMLTrackElement.LOADED=LOADED,HTMLTrackElement.ERROR=ERROR;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(t){NORMAL[t].getterName=t+"Tracks",NORMAL[t].privateName=t+"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=mergeOptions(NORMAL,REMOTE);REMOTE.names=Object.keys(REMOTE),NORMAL.names=Object.keys(NORMAL),ALL.names=[].concat(REMOTE.names).concat(NORMAL.names);var _objCreate=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();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(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var ESCAPE={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},TAG_NAME={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},TAG_ANNOTATION={v:"title",lang:"lang"},NEEDS_PARENT={rt:"ruby"},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]];StyleBox.prototype.applyStyles=function(t,e){e=e||this.div;for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},StyleBox.prototype.formatStyle=function(t,e){return 0===t?0:t+e},CueStyleBox.prototype=_objCreate(StyleBox.prototype),CueStyleBox.prototype.constructor=CueStyleBox,BoxPosition.prototype.move=function(t,e){switch(e=e!==undefined?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},BoxPosition.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},BoxPosition.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},BoxPosition.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},BoxPosition.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},BoxPosition.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},BoxPosition.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},BoxPosition.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t,{left:t.left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n}},WebVTT$1.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},WebVTT$1.convertCueToDOMTree=function(t,e){return t&&e?parseContent(t,e):null},WebVTT$1.processCues=function(t,e,n){if(!t||!e||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=t.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){var i=[],o=BoxPosition.getSimpleBoxPosition(r),s=Math.round(.05*o.height*100)/100,a={font:s+"px sans-serif"};!function(){for(var n,s,l=0;l<e.length;l++)s=e[l],n=new CueStyleBox(t,s,a),r.appendChild(n.div),moveBoxToLinePosition(t,n,o,i),s.displayState=n.div,i.push(BoxPosition.getSimpleBoxPosition(n))}()}else for(var l=0;l<e.length;l++)r.appendChild(e[l].displayState)},WebVTT$1.Parser=function(t,e,n){n||(n=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},WebVTT$1.Parser.prototype={reportOrThrowError:function(t){if(!(t instanceof ParsingError))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){function e(){for(var t=i.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,i.buffer=t.substr(e),n}function n(t){var e=new Settings;if(parseOptions(t,function(t,n){switch(t){case"id":e.set(t,n);break;case"width":e.percent(t,n);break;case"lines":e.integer(t,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new Settings;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;e.set(t+"X",i.get("x")),e.set(t+"Y",i.get("y"));break;case"scroll":e.alt(t,n,["up"])}},/=/,/\s/),e.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=e.get("width",100),n.lines=e.get("lines",3),n.regionAnchorX=e.get("regionanchorX",0),n.regionAnchorY=e.get("regionanchorY",100),n.viewportAnchorX=e.get("viewportanchorX",0),n.viewportAnchorY=e.get("viewportanchorY",100),n.scroll=e.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:e.get("id"),region:n})}}function r(t){var e=new Settings;parseOptions(t,function(t,n){switch(t){case"MPEGT":e.integer(t+"S",n);break;case"LOCA":e.set(t+"L",parseTimeStamp(n))}},/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:e.get("MPEGTS"),LOCAL:e.get("LOCAL")})}var i=this;t&&(i.buffer+=i.decoder.decode(t,{stream:!0}));try{var o;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;o=e();var s=o.match(/^WEBVTT([ \t].*)?$/);if(!s||!s[0])throw new ParsingError(ParsingError.Errors.BadSignature);i.state="HEADER"}for(var a=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(a?a=!1:o=e(),i.state){case"HEADER":/:/.test(o)?function(t){t.match(/X-TIMESTAMP-MAP/)?parseOptions(t,function(t,e){switch(t){case"X-TIMESTAMP-MAP":r(e)}},/=/):parseOptions(t,function(t,e){switch(t){case"Region":n(e)}},/:/)}(o):o||(i.state="ID");continue;case"NOTE":o||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){i.state="NOTE";break}if(!o)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===o.indexOf("--\x3e")){i.cue.id=o;continue}case"CUE":try{parseCue(o,i.cue,i.regionList)}catch(c){i.reportOrThrowError(c),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var l=-1!==o.indexOf("--\x3e");if(!o||l&&(a=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=o;continue;case"BADCUE":o||(i.state="ID");continue}}}catch(c){i.reportOrThrowError(c),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new ParsingError(ParsingError.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var vtt$1=WebVTT$1,autoKeyword="auto",directionSetting={"":!0,lr:!0,rl:!0},alignSetting={start:!0,middle:!0,end:!0,left:!0,right:!0};VTTCue.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var vttcue=VTTCue,scrollSetting={"":!0,up:!0},vttregion=VTTRegion,browserIndex=createCommonjsModule(function(t){var e=t.exports={WebVTT:vtt$1,VTTCue:vttcue,VTTRegion:vttregion};window_1.vttjs=e,window_1.WebVTT=e.WebVTT;var n=e.VTTCue,r=e.VTTRegion,i=window_1.VTTCue,o=window_1.VTTRegion;e.shim=function(){window_1.VTTCue=n,window_1.VTTRegion=r},e.restore=function(){window_1.VTTCue=i,window_1.VTTRegion=o},window_1.VTTCue||e.shim()}),Tech=function(t){function e(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};classCallCheck(this,e),r.reportTouchActivity=!1;var o=possibleConstructorReturn(this,t.call(this,n,r,i));return o.hasStarted_=!1,o.on("playing",function(){this.hasStarted_=!0}),o.on("loadstart",function(){this.hasStarted_=!1}),ALL.names.forEach(function(t){var e=ALL[t];r&&r[e.getterName]&&(o[e.privateName]=r[e.getterName])}),o.featuresProgressEvents||o.manualProgressOn(),o.featuresTimeupdateEvents||o.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===r["native"+t+"Tracks"]&&(o["featuresNative"+t+"Tracks"]=!1)}),!1===r.nativeCaptions||!1===r.nativeTextTracks||IS_MAC&&IS_SAFARI?o.featuresNativeTextTracks=!1:!0!==r.nativeCaptions&&!0!==r.nativeTextTracks||(o.featuresNativeTextTracks=!0),o.featuresNativeTextTracks=!1,o.featuresNativeTextTracks||o.emulateTextTracks(),o.autoRemoteTextTracks_=new ALL.text.ListClass,o.initTrackListeners(),r.nativeControlsForTouch||o.emitTapEvents(),o.constructor&&(o.name_=o.constructor.name||"Unknown Tech"),o}return inherits(e,t),e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(bind(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()}),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return createTimeRanges(0,0)},e.prototype.bufferedPercent=function(){return bufferedPercent(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(NORMAL.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach(function(t){for(var n=e[t+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}})},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},e.prototype.reset=function(){},e.prototype.error=function(t){return t!==undefined&&(this.error_=new MediaError(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?createTimeRanges(0,0):createTimeRanges()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;NORMAL.names.forEach(function(e){var n=NORMAL[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)})})},e.prototype.addWebVttScript_=function(){var t=this;if(!window_1.WebVTT)if(document_1.body.contains(this.el())){if(!this.options_["vtt.js"]&&isPlain(browserIndex)&&Object.keys(browserIndex).length>0)return void this.trigger("vttjsloaded");var e=document_1.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),window_1.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t<e.length;t++){var n=e[t];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",function(){n.off("addtrack",r),n.off("removetrack",i),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(var t=0;t<e.length;t++){e[t].removeEventListener("cuechange",o)}})},e.prototype.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return createTrackHelper(this,t,e,n)},e.prototype.createRemoteTextTrack=function(t){var e=mergeOptions(t,{tech:this});return new REMOTE.remoteTextEl.TrackClass(e)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(log$2.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(r.track)}),r},e.prototype.addAudioTrack=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=mergeOptions(e,{tech:this}),i=new NORMAL.audio.TrackClass(r);return this.audioTracks_.addTrack(i),!0!==n&&this.ready(function(){return t.audioTracks_.addTrack(i)}),i},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.requestPictureInPicture=function(){var t=this.options_.Promise||window_1.Promise;if(t)return t.reject()},e.prototype.disablePictureInPicture=function(){return!0},e.prototype.setDisablePictureInPicture=function(){},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=toTitleCase(t),e.techs_[t]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return t=toTitleCase(t),e.techs_&&e.techs_[t]?e.techs_[t]:window_1&&window_1.videojs&&window_1.videojs[t]?(log$2.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),window_1.videojs[t]):void 0},e}(Component);ALL.names.forEach(function(t){var e=ALL[t];Tech.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),Tech.prototype.featuresVolumeControl=!0,Tech.prototype.featuresMuteControl=!0,Tech.prototype.featuresFullscreenResize=!1,Tech.prototype.featuresPlaybackRate=!1,Tech.prototype.featuresProgressEvents=!1,Tech.prototype.featuresTimeupdateEvents=!1,Tech.prototype.featuresNativeTextTracks=!1,Tech.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),n===undefined&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n=t.sourceHandlers||[],r=void 0,i=0;i<n.length;i++)if(r=n[i].canPlayType(e))return r;return""},t.selectSourceHandler=function(e,n){for(var r=t.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(e,n))return r[i];return null},t.canPlaySource=function(e,n){var r=t.selectSourceHandler(e,n);return r?r.canHandleSource(e,n):""},["seekable","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(e){var n=t.selectSourceHandler(e,this.options_);n||(t.nativeSourceHandler?n=t.nativeSourceHandler:log$2.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=n.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.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={},allowedGetters={buffered:1,currentTime:1,duration:1,seekable:1,played:1},allowedSetters={setCurrentTime:1},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(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"",e=getFileExtension(t);return MimetypesKind[e.toLowerCase()]||""
5
5
  },filterSource=function t(e){if(Array.isArray(e)){var n=[];e.forEach(function(e){e=t(e),Array.isArray(e)?n=n.concat(e):isObject$1(e)&&n.push(e)}),e=n}else e="string"==typeof e&&e.trim()?[fixSource({src:e})]:isObject$1(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[fixSource(e)]:[];return e},fixSource=function(t){if(!t.type){var e=getMimetype(t.src);e&&(t.type=e)}return t},enc=createCommonjsModule(function(module,exports){!function(t,e){module.exports=e()}(self,function(){return function(){function __webpack_require__(t){var e=__webpack_module_cache__[t];if(e!==undefined)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}var __webpack_modules__={"./node_modules/@tencent/js-armor-loader/dist/runtime.js":function node_modulesTencentJsArmorLoaderDistRuntimeJs(module){function T(t,e,n,r,i,o,s,a){function l(){return function(t,e,n){return new(Function.bind.apply(t,e))}.apply(null,arguments)}var c,u=!r,h=(t=+t,e=e||[0],r=r||[[this],[{}]],i=i||{},[]),p=null;Function.prototype.bind||(c=[].slice,Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("bind101");var e=c.call(arguments,1),n=e.length,r=this,i=function(){},o=function(){return e.length=n,e.push.apply(e,arguments),r.apply(i.prototype.isPrototypeOf(this)?this:t,e)};return this.prototype&&(i.prototype=this.prototype),o.prototype=new i,o});for(var d=([function(){var t=r.pop();i[t]||(n[t]=n[t](),i[t]=1),r.push([n,t])},function(){r[r.length-1]=n[r[r.length-1]]},function(){var n=e[t++],i=r[r.length-2-n];r[r.length-2-n]=r.pop(),r.push(i)},function(){var t=r.pop();r.push(t[0][t[1]])},function(){r[r.length-2]=r[r.length-2]&r.pop()},function(){r.push(r[r.length-1])},function(){r[r.length-2]=r[r.length-2]^r.pop()},function(){throw r[r.length-1]},function(){r[r.length-2]=r[r.length-2]<=r.pop()},function(){r[r.length-2]=r[r.length-2]*r.pop()},function(){r[r.length-2]=r[r.length-2]==r.pop()},function(){r.push([e[t++]])},function(){var n=e[t++],i=n?r.slice(-n):[],n=(r.length-=n,i.unshift(null),r.pop());r.push(l(n[0][n[1]],i))},function(){var t=r[r.length-2],e=Object.getOwnPropertyDescriptor(t[0],t[1])||{configurable:!0,enumerable:!0};e.set=r[r.length-1],Object.defineProperty(t[0],t[1],e)},function(){var t=r.pop(),e=r.pop();r.push([e[0][e[1]],t])},function(){r[r.length-1]+=String.fromCharCode(e[t++])},function(){r.push(~r.pop())},function(){r[r.length-1]=e[t++]},function(){r.push(r[e[t++]][0])},function(){return!!p},function(){r[r[r.length-1][0]]=r[r[r.length-1][0]]===undefined?[]:r[r[r.length-1][0]]},function(){var t=r.pop();r.push([r[r.pop()][0],t])},function(){r[r.length-2]=r[r.length-2]/r.pop()},function(){r.push(!r.pop())},function(){r.push([r.pop(),r.pop()].reverse())},function(){h.push([e[t++],r.length,e[t++]])},function(){var t=r.pop();r.push(delete t[0][t[1]])},function(){return!0},function(){p=null},function(){r[r.length-2]=r[r.length-2]>>>r.pop()},function(){r[r.length-1].length?r.push(r[r.length-1].shift(),!0):r.push(undefined,!1)},function(){var n=e[t++],i=n?r.slice(-n):[],n=(r.length-=n,r.pop());r.push(n[0][n[1]].apply(n[0],i))},function(){r[r.length-2]=r[r.length-2]in r.pop()},function(){var n=e[t++];r[r.length-1]&&(t=n)},function(){for(var l=e[t++],c=[],u=e[t++],h=e[t++],p=[],d=0;d<u;d++)c[e[t++]]=r[e[t++]];for(d=0;d<h;d++)p[d]=e[t++];r.push(function f(){var t=c.slice(0);t[0]=[this],t[1]=[arguments],t[2]=[f];for(var r=0;r<p.length&&r<arguments.length;r++)0<p[r]&&(t[p[r]]=[arguments[r]]);return T(l,e,n,t,i,o,s,a)})},function(){var t=r[r.length-2],e=Object.getOwnPropertyDescriptor(t[0],t[1])||{configurable:!0,enumerable:!0};e.get=r[r.length-1],Object.defineProperty(t[0],t[1],e)},function(){var t=r.pop();i[t]||(n[t]=n[t](),i[t]=1),r.push(n[t])},function(){r.pop()},function(){r[r.length-2]=r[r.length-2]>r.pop()},function(){var n=e[t++];r[n]=r[n]===undefined?[]:r[n]},function(){r.push(!1)},function(){r.push("")},function(){r.push(e[t++])},function(){r.length=e[t++]},function(){r[r[r.length-2][0]][0]=r[r.length-1]},function(){r[r.length-2]=r[r.length-2]<r.pop()},function(){h.pop()},function(){var t=r[r.length-2];t[0][t[1]]=r[r.length-1]},function(){r[r.length-2]=r[r.length-2]-r.pop()},function(){},function(){for(var l=r.pop(),c=e[t++],u=[],h=e[t++],p=e[t++],d=[],f=0;f<h;f++)u[e[t++]]=r[e[t++]];for(f=0;f<p;f++)d[f]=e[t++];var g=function y(){var t=u.slice(0);t[0]=[this],t[1]=[arguments],t[2]=[y];for(var r=0;r<d.length&&r<arguments.length;r++)0<d[r]&&(t[d[r]]=[arguments[r]]);return T(c,e,n,t,i,o,s,a)};g.toString=function(){return l},r.push(g)},function(){r[r.length-2]=r[r.length-2]|r.pop()},function(){t=e[t++]},function(){r[r.length-2]=r[r.length-2]>=r.pop()},function(){r.push(null)},function(){r.length-=e[t++]},function(){r[r.length-2]=r[r.length-2]<<r.pop()},function(){r.push(!0)},function(){r.push([n,r.pop()])},function(){var i=e[t++],o=i?r.slice(-i):[];r.length-=i,r.push(r.pop().apply(n,o))},function(){r.push(r[r.pop()[0]][0])},function(){r[r.length-2]=r[r.length-2]instanceof r.pop()},function(){r.push(_typeof(r.pop()))},function(){r[r.length-2]=r[r.length-2]>>r.pop()},function(){r[r.length-2]=r[r.length-2]%r.pop()},function(){r[r.length-2]=r[r.length-2]+r.pop()},function(){r.push(undefined)},function(){r[r.length-2]=r[r.length-2]===r.pop()},function(){var t,e=[];for(t in r.pop())e.push(t);r.push(e)},function(){var n=e[t++],i=n?r.slice(-n):[];r.length-=n,i.unshift(null),r.push(l(r.pop(),i))}]);;)try{for(var f=!1;!f;)f=d[e[t++]]();if(p)throw p;return u?(r.pop(),r.slice(3+T.v)):r.pop()}catch(y){var g=h.pop();if(g===undefined)throw y;p=y,t=g[0],r.length=g[1],g[2]&&(r[g[2]][0]=p)}}function arrayIndexOf(t,e,n){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e,n);var r,i=o.length;if(0===i)return-1;var s=0|n;if(s>=i)return-1;for(r=Math.max(s>=0?s:i-Math.abs(s),0);r<i;r++)if(r in o&&o[r]===e)return r;return-1}function base64Decode(t){for(var e,n,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),i=String(t).replace(/[=]+$/,""),o=0,s=0,a="";n=i.charAt(s++);~n&&(e=o%4?64*e+n:n,o++%4)?a+=String.fromCharCode(255&e>>(-2*o&6)):0)n=arrayIndexOf(r,n);return a}T.v=0,module.exports.r=function(symbols){for(var result=[],i=0;i<symbols.length;i++)try{result.push(eval(symbols[i]))}catch(_){result.push(undefined)}return result},module.exports.d=function(t){function e(){for(;l===s;)i.push(a),l++,s=r.shift(),a=r.shift()}if("object"!=typeof t[1])return t;for(var n=t[0],r=t[1],i=[],o=base64Decode(n),s=r.shift(),a=r.shift(),l=0,c=0;c<o.length;c++){var u=o.charAt(c).charCodeAt(0);e(),i.push(u),l++}return e(),i},module.exports.g=function(t){return t.shift()[0]},module.exports.v=T},"./utils.js":function(t,e,n){"use strict";function r(t,e,n){var r=arguments.length>3&&arguments[3]!==undefined&&arguments[3],i=document.createElement("script");if(i.onload=i.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||("function"==typeof e&&e(),i.onload=i.onreadystatechange=null,i.parentNode&&!r&&i.parentNode.removeChild(i))},n)for(var o in n)if(n.hasOwnProperty(o)){var s=n[o];null===s?i.removeAttribute(s):i.setAttribute(o,s)}i.src=t,document.getElementsByTagName("head")[0].appendChild(i)}function i(){for(var t="",e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=0;n<32;n++){t+=e[o(0,15)]}return t}function o(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function s(t){return c.g(c.v(0,c.d(["KwQnAicDNBIrCicCJwMnBCcFJwYnBycIJwkqACQ+KQ9zD3QPcg9pD24PZ0MXITQlNDcrJUIbCwMqASRFACwlJQsEKhksJSULBSp7LCUlCwYqACwlJQsGPCoAACkPbA9lD24PZw90D2gOAzUXIXMlNOgqJQsHKgAAKQ9jD2gPYQ9yD0MPbw9kD2UPQQ90DhIGHwEsJSULBxIHKgEJEgUGLCUlCwcLBykPdA9vD1MPdA9yD2kPbg9nFRIEHwEsJSULAykPcA91D3MPaBUSBx8BJQsGBTwFAgECACoBQSwlEQACADMlNFY0CwgqAgApD2YPcg9vD20PQw9oD2EPcg9DD28PZA9lDhIEKmFBHwEsJSULCQsDKQ9qD28PaQ9uFRIIHwEsJSUSCRsLAyIJAAAsJSVCGw==",[7,297]]),[function(){return void 0===t?undefined:t},function(){return"undefined"==typeof Array?undefined:Array},function(){return"undefined"==typeof String?undefined:String}])).call(this)}function a(t){return c.g(c.v(0,c.d(["KwQnAicDNCsrDCcCJwMnBCcFJwYnBycIJwknCicLKgAkPikPcw90D3IPaQ9uD2dDFyE4JTQ7GSVCGwsDKgEkRQAsJSULBCoBJEUALCUlCwUqGSwlJQsGKnssJSULByoCACkPZg9yD28PbQ9DD2gPYQ9yD0MPbw9kD2UOEgUqYUEfASwlJQsDKgAAKQ9zD3APbA9pD3QOEgcfASwlJQsIKgAsJSULCDwLAykPbA9lD24PZw90D2gVAzUXIcElNDIlCwkqAwALAxIIFQMSBR8CLCUlCwkSCSoBCRIGBiwlJQsKKgIAKQ9mD3IPbw9tD0MPaA9hD3IPQw9vD2QPZQ4SCR8BLCUlCwQpD3APdQ9zD2gVEgofASULCAU8BQIBAgAqAUEsJREAAgAzJTSlIgsLCwQpD2oPbw9pD24VKR8BLCUlEgsbCwMiCQAALCUlQhs=",[7,326,191,303]]),[function(){return void 0===t?undefined:t},function(){return"undefined"==typeof Array?undefined:Array},function(){return"undefined"==typeof String?undefined:String},function(){return"undefined"==typeof parseInt?undefined:parseInt}])).call(this)}function l(t,e){if(!e)return!1;var n=new RegExp("^"+e.replace("*",".*")+"$","i");return e.toLowerCase().replace("*.","")===t||n.test(t)}var c=n("./node_modules/@tencent/js-armor-loader/dist/runtime.js");Object.defineProperty(e,"__esModule",{value:!0}),e.decrypto=a,e.encrypto=s,e.genOverlay=i,e.getRandomInt=o,e.isDomainMatchingWildcard=l,e.loadScript=r},"./utils/aes.js":function(t,e,n){"use strict";function r(t){return parseInt(t)===t}function i(t){if(!r(t.length))return!1;for(var e=0;e<t.length;e++)if(!r(t[e])||t[e]<0||t[e]>255)return!1;return!0}function o(t,e){if(t.buffer&&"Uint8Array"===t.name)return e&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!i(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(r(t.length)&&i(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function s(t){return new Uint8Array(t)}function a(t,e,n,r,i){null==r&&null==i||(t=t.slice?t.slice(r,i):Array.prototype.slice.call(t,r,i)),e.set(t,n)}function l(t){for(var e=[],n=0;n<t.length;n+=4)e.push(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);return e}function c(t){t=o(t,!0);var e=16-t.length%16,n=s(t.length+e);a(t,n);for(var r=t.length;r<n.length;r++)n[r]=e;return n}function u(t){if(t=o(t,!0),t.length<16)throw new Error("PKCS#7 invalid length");var e=t[t.length-1];if(e>16)throw new Error("PKCS#7 padding byte out of range");for(var n=t.length-e,r=0;r<e;r++)if(t[n+r]!==e)throw new Error("PKCS#7 invalid padding byte");var i=s(n);return a(t,i,0,0,n),i}n.r(e),n.d(e,{"default":function(){return O}});var h=function(){function t(t){var e=[],n=0;for(t=encodeURI(t);n<t.length;){var r=t.charCodeAt(n++);37===r?(e.push(parseInt(t.substr(n,2),16)),n+=2):e.push(r)}return o(e)}function e(t){for(var e=[],n=0;n<t.length;){var r=t[n];r<128?(e.push(String.fromCharCode(r)),n++):r>191&&r<224?(e.push(String.fromCharCode((31&r)<<6|63&t[n+1])),n+=2):(e.push(String.fromCharCode((15&r)<<12|(63&t[n+1])<<6|63&t[n+2])),n+=3)}return e.join("")}return{toBytes:t,fromBytes:e}}(),p=function(){function t(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e}function e(t){for(var e=[],r=0;r<t.length;r++){var i=t[r];e.push(n[(240&i)>>4]+n[15&i])}return e.join("")}var n="0123456789abcdef";return{toBytes:t,fromBytes:e}}(),d={16:10,24:12,32:14
6
6
  },f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],g=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],y=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],v=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],_=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],b=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],T=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],C=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],S=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],E=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],P=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],w=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],D=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],A=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925],k=function M(t){
7
7
  if(!(this instanceof M))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(t,!0)}),this._prepare()};k.prototype._prepare=function(){var t=d[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var n,r=4*(t+1),i=this.key.length/4,o=l(this.key),e=0;e<i;e++)n=e>>2,this._Ke[n][e%4]=o[e],this._Kd[t-n][e%4]=o[e];for(var s,a=0,c=i;c<r;){if(s=o[i-1],o[0]^=g[s>>16&255]<<24^g[s>>8&255]<<16^g[255&s]<<8^g[s>>24&255]^f[a]<<24,a+=1,8!=i)for(var e=1;e<i;e++)o[e]^=o[e-1];else{for(var e=1;e<i/2;e++)o[e]^=o[e-1];s=o[i/2-1],o[i/2]^=g[255&s]^g[s>>8&255]<<8^g[s>>16&255]<<16^g[s>>24&255]<<24;for(var e=i/2+1;e<i;e++)o[e]^=o[e-1]}for(var u,h,e=0;e<i&&c<r;)u=c>>2,h=c%4,this._Ke[u][h]=o[e],this._Kd[t-u][h]=o[e++],c++}for(var u=1;u<t;u++)for(var h=0;h<4;h++)s=this._Kd[u][h],this._Kd[u][h]=P[s>>24&255]^w[s>>16&255]^D[s>>8&255]^A[255&s]},k.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,n=[0,0,0,0],r=l(t),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var o=1;o<e;o++){for(var i=0;i<4;i++)n[i]=v[r[i]>>24&255]^m[r[(i+1)%4]>>16&255]^_[r[(i+2)%4]>>8&255]^b[255&r[(i+3)%4]]^this._Ke[o][i];r=n.slice()}for(var a,c=s(16),i=0;i<4;i++)a=this._Ke[e][i],c[4*i]=255&(g[r[i]>>24&255]^a>>24),c[4*i+1]=255&(g[r[(i+1)%4]>>16&255]^a>>16),c[4*i+2]=255&(g[r[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(g[255&r[(i+3)%4]]^a);return c},k.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,n=[0,0,0,0],r=l(t),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var o=1;o<e;o++){for(var i=0;i<4;i++)n[i]=T[r[i]>>24&255]^C[r[(i+3)%4]>>16&255]^S[r[(i+2)%4]>>8&255]^E[255&r[(i+1)%4]]^this._Kd[o][i];r=n.slice()}for(var a,c=s(16),i=0;i<4;i++)a=this._Kd[e][i],c[4*i]=255&(y[r[i]>>24&255]^a>>24),c[4*i+1]=255&(y[r[(i+3)%4]>>16&255]^a>>16),c[4*i+2]=255&(y[r[(i+2)%4]>>8&255]^a>>8),c[4*i+3]=255&(y[255&r[(i+1)%4]]^a);return c};var I=function x(t,e){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",e){if(16!=e.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else e=s(16);this._lastCipherblock=o(e,!0),this._aes=new k(t)};I.prototype.encrypt=function(t){if(t=o(t),t.length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16){a(t,n,0,r,r+16);for(var i=0;i<16;i++)n[i]^=this._lastCipherblock[i];this._lastCipherblock=this._aes.encrypt(n),a(this._lastCipherblock,e,r)}return e},I.prototype.decrypt=function(t){if(t=o(t),t.length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=s(t.length),n=s(16),r=0;r<t.length;r+=16){a(t,n,0,r,r+16),n=this._aes.decrypt(n);for(var i=0;i<16;i++)e[r+i]=n[i]^this._lastCipherblock[i];a(t,this._lastCipherblock,0,r,r+16)}return e};var R=function L(t){if(!(this instanceof L))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=s(16),this.setValue(t)):this.setBytes(t)};R.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");if(t>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var e=15;e>=0;--e)this._counter[e]=t%256,t=parseInt(t/256)},R.prototype.setBytes=function(t){if(t=o(t,!0),16!=t.length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},R.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var j={AES:k,Counter:R,modeOfOperation:{cbc:I},utils:{hex:p,utf8:h},padding:{pkcs7:{pad:c,strip:u}},_arrayTest:{coerceArray:o,createArray:s,copyArray:a}},O=j},"./utils/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,{isVisible:function(){return r}});var r=function(t){if(!t)return!1;var e=window.getComputedStyle(t),n=e.getPropertyValue("display"),r=e.getPropertyValue("visibility"),i=e.getPropertyValue("opacity");return"none"!==n&&"hidden"!==r&&"0"!==i}},"./node_modules/charenc/charenc.js":function(t){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e},bytesToString:function(t){for(var e=[],n=0;n<t.length;n++)e.push(String.fromCharCode(t[n]));return e.join("")}}};t.exports=e},"./node_modules/crypt/crypt.js":function(t){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n<t.length;n++,r+=8)e[r>>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n<t.length;n++)e.push((t[n]>>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(parseInt(t.substr(n,2),16));return e},bytesToBase64:function(t){for(var n=[],r=0;r<t.length;r+=3)for(var i=t[r]<<16|t[r+1]<<8|t[r+2],o=0;o<4;o++)8*r+6*o<=8*t.length?n.push(e.charAt(i>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<t.length;i=++r%4)0!=i&&n.push((e.indexOf(t.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(r))>>>6-2*i);return n}};t.exports=n}()},"./node_modules/is-buffer/index.js":function(t){function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function n(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}t.exports=function(t){return null!=t&&(e(t)||n(t)||!!t._isBuffer)}},"./node_modules/jsencrypt/lib/JSEncrypt.js":function(t,e,n){"use strict";n.r(e),n.d(e,{JSEncrypt:function(){return a}});var r,i=n("./node_modules/jsencrypt/lib/lib/jsbn/base64.js"),o=n("./node_modules/jsencrypt/lib/JSEncryptRSAKey.js"),s="undefined"!=typeof process?null===(r=process.env)||void 0===r?void 0:r.npm_package_version:undefined,a=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key,this.key=new o.JSEncryptRSAKey(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt((0,i.b64tohex)(t))}catch(e){return!1}},t.prototype.encrypt=function(t){try{return(0,i.hex2b64)(this.getKey().encrypt(t))}catch(e){return!1}},t.prototype.sign=function(t,e,n){try{return(0,i.hex2b64)(this.getKey().sign(t,e,n))}catch(r){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,(0,i.b64tohex)(e),n)}catch(r){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new o.JSEncryptRSAKey,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=s,t}()},"./node_modules/jsencrypt/lib/JSEncryptRSAKey.js":function(t,e,n){"use strict";n.r(e),n.d(e,{JSEncryptRSAKey:function(){return h}});var r=n("./node_modules/jsencrypt/lib/lib/jsbn/base64.js"),i=n("./node_modules/jsencrypt/lib/lib/asn1js/hex.js"),o=n("./node_modules/jsencrypt/lib/lib/asn1js/base64.js"),s=n("./node_modules/jsencrypt/lib/lib/asn1js/asn1.js"),a=n("./node_modules/jsencrypt/lib/lib/jsbn/rsa.js"),l=n("./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js"),c=n("./node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js"),u=undefined&&undefined.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return u(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,a=r.test(t)?i.Hex.decode(t):o.Base64.unarmor(t),c=s.ASN1.decode(a);if(3===c.sub.length&&(c=c.sub[2].sub[0]),9===c.sub.length){e=c.sub[1].getHexStringValue(),this.n=(0,l.parseBigInt)(e,16),n=c.sub[2].getHexStringValue(),this.e=parseInt(n,16);var u=c.sub[3].getHexStringValue();this.d=(0,l.parseBigInt)(u,16);var h=c.sub[4].getHexStringValue();this.p=(0,l.parseBigInt)(h,16);var p=c.sub[5].getHexStringValue();this.q=(0,l.parseBigInt)(p,16);var d=c.sub[6].getHexStringValue();this.dmp1=(0,l.parseBigInt)(d,16);var f=c.sub[7].getHexStringValue();this.dmq1=(0,l.parseBigInt)(f,16);var g=c.sub[8].getHexStringValue();this.coeff=(0,l.parseBigInt)(g,16)}else{if(2!==c.sub.length)return!1;if(c.sub[0].sub){var y=c.sub[1],v=y.sub[0];e=v.sub[0].getHexStringValue(),this.n=(0,l.parseBigInt)(e,16),n=v.sub[1].getHexStringValue(),this.e=parseInt(n,16)}else e=c.sub[0].getHexStringValue(),this.n=(0,l.parseBigInt)(e,16),n=c.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(m){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new c.KJUR.asn1.DERInteger({"int":0}),new c.KJUR.asn1.DERInteger({bigint:this.n}),new c.KJUR.asn1.DERInteger({"int":this.e}),new c.KJUR.asn1.DERInteger({bigint:this.d}),new c.KJUR.asn1.DERInteger({bigint:this.p}),new c.KJUR.asn1.DERInteger({bigint:this.q}),new c.KJUR.asn1.DERInteger({bigint:this.dmp1}),new c.KJUR.asn1.DERInteger({bigint:this.dmq1}),new c.KJUR.asn1.DERInteger({bigint:this.coeff})]};return new c.KJUR.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return(0,r.hex2b64)(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new c.KJUR.asn1.DERSequence({array:[new c.KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new c.KJUR.asn1.DERNull]}),e=new c.KJUR.asn1.DERSequence({array:[new c.KJUR.asn1.DERInteger({bigint:this.n}),new c.KJUR.asn1.DERInteger({"int":this.e})]}),n=new c.KJUR.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new c.KJUR.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return(0,r.hex2b64)(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(e=e||64,!t)return t;var n="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(a.RSAKey)},"./node_modules/jsencrypt/lib/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,{JSEncrypt:function(){return r.JSEncrypt},"default":function(){return i}});var r=n("./node_modules/jsencrypt/lib/JSEncrypt.js"),i=r.JSEncrypt},"./node_modules/jsencrypt/lib/lib/asn1js/asn1.js":function(t,e,n){"use strict";function r(t,e){return t.length>e&&(t=t.substring(0,e)+o),t}n.r(e),n.d(e,{ASN1:function(){return c},ASN1Tag:function(){return u},Stream:function(){return l}});var i=n("./node_modules/jsencrypt/lib/lib/asn1js/int10.js"),o="…",s=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,a=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,l=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(t===undefined&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",o=t;o<e;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?s:a).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),o=r>127,s=o?255:0,a="";r==s&&++t<e;)r=this.get(t);if(0===(n=e-t))return o?-1:0;if(n>4){for(a=r,n<<=3;0==(128&(+a^s));)a=+a<<1,--n;a="("+n+" bit)\n"}o&&(r-=256);for(var l=new i.Int10(r),c=t+1;c<e;++c)l.mulAdd(256,this.get(c));return a+l.toString()},t.prototype.parseBitString=function(t,e,n){for(var i=this.get(t),o=(e-t-1<<3)-i,s="("+o+" bit)\n",a="",l=t+1;l<e;++l){for(var c=this.get(l),u=l==e-1?i:0,h=7;h>=u;--h)a+=c>>h&1?"1":"0";if(a.length>n)return s+r(a,n)}return s+a},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return r(this.parseStringISO(t,e),n);var i=e-t,s="("+i+" byte)\n";n/=2,i>n&&(e=t+n);for(var a=t;a<e;++a)s+=this.hexByte(this.get(a));return i>n&&(s+=o),s},t.prototype.parseOID=function(t,e,n){for(var o="",s=new i.Int10,a=0,l=t;l<e;++l){var c=this.get(l);if(s.mulAdd(128,127&c),a+=7,!(128&c)){if(""===o)if((s=s.simplify())instanceof i.Int10)s.sub(80),o="2."+s.toString();else{var u=s<80?s<40?0:1:2;o=u+"."+(s-40*u)}else o+="."+s.toString();if(o.length>n)return r(o,n);s=new i.Int10,a=0}}return a>0&&(o+=".incomplete"),o},t}(),c=function(){function t(t,e,n,r,i){if(!(r instanceof u))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(this.tag===undefined)return null;t===undefined&&(t=Infinity);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return r(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return r(this.stream.parseStringISO(e,e+n),t);case 30:return r(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){t===undefined&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;r<n;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof l?e:new l(e,0);var r=new l(n),i=new u(n),o=t.decodeLength(n),s=n.pos,a=s-r.pos,c=null,h=function(){var e=[];if(null!==o){for(var r=s+o;n.pos<r;)e[e.length]=t.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}o=s-n.pos}catch(a){throw new Error("Exception while decoding undefined length content: "+a)}return e};if(i.tagConstructed)c=h();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=h();for(var p=0;p<c.length;++p)if(c[p].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(d){c=null}if(null===c){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);n.pos=s+Math.abs(o)}return new t(r,a,o,i,c)},t}(),u=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new i.Int10;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}()},"./node_modules/jsencrypt/lib/lib/asn1js/base64.js":function(t,e,n){"use strict";n.r(e),n.d(e,{Base64:function(){return i}});var r,i={decode:function(t){var e;if(r===undefined){var n="= \f\n\r\t \u2028\u2029";for(r=Object.create(null),e=0;e<64;++e)r["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(r["-"]=62,r._=63,e=0;e<n.length;++e)r[n.charAt(e)]=-1}var i=[],o=0,s=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=r[a])){if(a===undefined)throw new Error("Illegal character at offset "+e);o|=a,++s>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=255&o,o=0,s=0):o<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=i.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return i.decode(t)}}},"./node_modules/jsencrypt/lib/lib/asn1js/hex.js":function(t,e,n){"use strict";n.r(e),n.d(e,{Hex:function(){return i}});var r,i={decode:function(t){var e;if(r===undefined){var n="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(r={},e=0;e<16;++e)r[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)r[n.charAt(e)]=e;for(e=0;e<i.length;++e)r[i.charAt(e)]=-1}var o=[],s=0,a=0;for(e=0;e<t.length;++e){var l=t.charAt(e);if("="==l)break;if(-1!=(l=r[l])){if(l===undefined)throw new Error("Illegal character at offset "+e);s|=l,++a>=2?(o[o.length]=s,s=0,a=0):s<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return o}}},"./node_modules/jsencrypt/lib/lib/asn1js/int10.js":function(t,e,n){"use strict";n.r(e),n.d(e,{Int10:function(){return r}});var r=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,o=i.length;for(n=0;n<o;++n)r=i[n]*t+e,r<1e13?e=0:(e=0|r/1e13,r-=1e13*e),i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;e<i;++e)n=r[e]-t,n<0?(n+=1e13,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;r>=0;--r)n+=(1e13+e[r]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=1e13*e+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}()},"./node_modules/jsencrypt/lib/lib/jsbn/base64.js":function(t,e,n){"use strict";function r(t){var e,n,r="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),r+=a.charAt(n>>6)+a.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=a.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=a.charAt(n>>2)+a.charAt((3&n)<<4));(3&r.length)>0;)r+=l;return r}function i(t){var e,n="",r=0,i=0;for(e=0;e<t.length&&t.charAt(e)!=l;++e){var o=a.indexOf(t.charAt(e));o<0||(0==r?(n+=(0,s.int2char)(o>>2),i=3&o,r=1):1==r?(n+=(0,s.int2char)(i<<2|o>>4),i=15&o,r=2):2==r?(n+=(0,s.int2char)(i),n+=(0,s.int2char)(o>>2),i=3&o,r=3):(n+=(0,s.int2char)(i<<2|o>>4),n+=(0,s.int2char)(15&o),r=0))}return 1==r&&(n+=(0,s.int2char)(i<<2)),n}function o(t){var e,n=i(t),r=[];for(e=0;2*e<n.length;++e)r[e]=parseInt(n.substring(2*e,2*e+2),16);return r}n.r(e),n.d(e,{b64toBA:function(){return o},b64tohex:function(){return i},hex2b64:function(){return r}});var s=n("./node_modules/jsencrypt/lib/lib/jsbn/util.js"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="="},"./node_modules/jsencrypt/lib/lib/jsbn/jsbn.js":function(t,e,n){"use strict";function r(){return new p(null)}function i(t,e){return new p(t,e)}function o(t,e){var n=b[t.charCodeAt(e)];return null==n?-1:n}function s(t){var e=r();return e.fromInt(t),e}function a(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}n.r(e),n.d(e,{BigInteger:function(){return p},intAt:function(){return o},nbi:function(){return r},nbits:function(){return a},nbv:function(){return s},parseBigInt:function(){return i}});var l,c=n("./node_modules/jsencrypt/lib/lib/jsbn/util.js"),u=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],h=(1<<26)/u[u.length-1],p=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=(0,c.int2char)(n));s>=0;)a<e?(n=(this[s]&(1<<a)-1)<<e-a,n|=this[--s]>>(a+=this.DB-e)):(n=this[s]>>(a-=e)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=(0,c.int2char)(n));return i?o:"0"},t.prototype.negate=function(){var e=r();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+a(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var n=r();return this.abs().divRemTo(e,null,n),this.s<0&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new f(e):new g(e),this.exp(t,n)},t.prototype.clone=function(){var t=r();return this.copyTo(t),t},t.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=r();return this.bitwiseTo(t,c.op_and,e),e},t.prototype.or=function(t){var e=r();return this.bitwiseTo(t,c.op_or,e),e},t.prototype.xor=function(t){var e=r();return this.bitwiseTo(t,c.op_xor,e),e},t.prototype.andNot=function(t){var e=r();return this.bitwiseTo(t,c.op_andnot,e),e},t.prototype.not=function(){for(var t=r(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=r();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=r();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+(0,c.lbit)(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=(0,c.cbit)(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,c.op_or)},t.prototype.clearBit=function(t){return this.changeBit(t,c.op_andnot)},t.prototype.flipBit=function(t){return this.changeBit(t,c.op_xor)},t.prototype.add=function(t){var e=r();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=r();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=r();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=r();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=r();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=r(),n=r();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,i,o=t.bitLength(),l=s(1);if(o<=0)return l;n=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new f(e):e.isEven()?new y(e):new g(e);var c=[],u=3,h=n-1,p=(1<<n)-1;if(c[1]=i.convert(this),n>1){var d=r();for(i.sqrTo(c[1],d);u<=p;)c[u]=r(),i.mulTo(d,c[u-2],c[u]),u+=2}var v,m,_=t.t-1,b=!0,T=r();for(o=a(t[_])-1;_>=0;){for(o>=h?v=t[_]>>o-h&p:(v=(t[_]&(1<<o+1)-1)<<h-o,_>0&&(v|=t[_-1]>>this.DB+o-h)),u=n;0==(1&v);)v>>=1,--u;if((o-=u)<0&&(o+=this.DB,--_),b)c[v].copyTo(l),b=!1;else{for(;u>1;)i.sqrTo(l,T),i.sqrTo(T,l),u-=2;u>0?i.sqrTo(l,T):(m=l,l=T,T=m),i.mulTo(T,c[v],l)}for(;_>=0&&0==(t[_]&1<<o);)i.sqrTo(l,T),m=l,l=T,T=m,--o<0&&(o=this.DB-1,--_)}return i.revert(l)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),o=s(1),a=s(0),l=s(0),c=s(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),n?(l.isEven()&&c.isEven()||(l.addTo(this,l),c.subTo(e,c)),l.rShiftTo(1,l)):c.isEven()||c.subTo(e,c),c.rShiftTo(1,c);r.compareTo(i)>=0?(r.subTo(i,r),n&&o.subTo(l,o),a.subTo(c,a)):(i.subTo(r,i),n&&l.subTo(o,l),c.subTo(a,c))}return 0!=i.compareTo(t.ONE)?t.ZERO:c.compareTo(e)>=0?c.subtract(e):c.signum()<0?(c.addTo(e,c),c.signum()<0?c.add(e):c):c},t.prototype.pow=function(t){return this.exp(t,new d)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=u[u.length-1]){for(e=0;e<u.length;++e)if(n[0]==u[e])return!0;return!1}
@@ -17,5 +17,5 @@ return t!==undefined&&0!==t?void(this.cache_.lastVolume=t):this.cache_.lastVolum
17
17
  Object.keys(this.dashjs.MediaPlayer.events).forEach(function(e){t.mediaPlayer_.off(t.dashjs.MediaPlayer.events[e],videojs.bind(t,t.onEvent))}),this.mediaPlayer_.reset()),this.player.dash&&delete this.player.dash},t.prototype.duration=function(){return this.mediaPlayer_?this.mediaPlayer_.isDynamic()&&!this.hasFiniteDuration_?Infinity:this.mediaPlayer_.duration():0},t.hooks=function(e,n){return t.hooks_[e]=t.hooks_[e]||[],n&&(t.hooks_[e]=t.hooks_[e].concat(n)),t.hooks_[e]},t.hook=function(e,n){t.hooks(e,n)},t.removeHook=function(e,n){var r=t.hooks(e).indexOf(n);return-1!==r&&(t.hooks_[e]=t.hooks_[e].slice(),t.hooks_[e].splice(r,1),!0)},t.prototype.onMetaData=function(t){var e=this,n=this.mediaPlayer_,r=n.getBitrateInfoListFor("video"),i=n.getSettings(),o=i.streaming.abr.autoSwitchBitrate.video,s=[];if(r.length>0){s.push({id:-1,label:"auto",selected:o}),r.forEach(function(t,n){s.push({id:n,label:e.getLevelLabel(t),selected:!o&&e.currentQuality.video===n})});var a={qualityData:{video:s},callbacks:{video:videojs.bind(this,this.switchQuality)}};this.tech_.setTimeout(function(){this.trigger({type:"masterplaylistchange",data:a})},1)}},t.prototype.switchQuality=function(t){var e=this.mediaPlayer_;-1===t.id?e.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):t.id!=this.currentQuality[t.trackType]&&(e.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),e.setQualityFor(t.trackType,t.id))},t.prototype.getLevelLabel=function(t){return t.height?t.height+"p":t.width?Math.round(9*t.width/16)+"p":t.bitrate?t.bitrate/1e3+"kbps":0},t.prototype.onEvent=function(t){switch(this.tech_.trigger({type:"dash_"+t.type,data:t}),t.type){case this.dashjs.MediaPlayer.events.QUALITY_CHANGE_REQUESTED:this.tech_.trigger({type:"dashqualityswitching",data:t});break;case this.dashjs.MediaPlayer.events.QUALITY_CHANGE_RENDERED:this.tech_.trigger({type:"dashqualityswitched",data:t}),this.currentQuality[t.mediaType]=t.newQuality}},t}();Html5DashJS.hooks_={};var canHandleKeySystems=function(t){t=JSON.parse(JSON.stringify(t)),Html5DashJS.updateSourceData&&(videojs.log.warn('updateSourceData has been deprecated. Please switch to using hook("updatesource", callback).'),t=Html5DashJS.updateSourceData(t)),Html5DashJS.hooks("updatesource").forEach(function(e){t=e(t)});var e=document_1.createElement("video");return!(t.keySystemOptions&&!window_1.navigator.requestMediaKeySystemAccess&&!e.msSetMediaKeys)};videojs.DashSourceHandler=function(){return{name:"dashSourceHandler",canHandleSource:function(t){var e=/\.mpd/i;return canHandleKeySystems(t)?videojs.DashSourceHandler.canPlayType(t.type)?"probably":e.test(t.src)?"maybe":"":""},handleSource:function(t,e,n){return new Html5DashJS(t,e,n)},canPlayType:function(t){return videojs.DashSourceHandler.canPlayType(t)}}},videojs.DashSourceHandler.canPlayType=function(t){return/^application\/dash\+xml/i.test(t)?"probably":""},TCPlayer.mountDashProvider=mountDashProvider,mountDashProvider(),videojs.Html5DashJS=Html5DashJS;var Component$6=videojs.getComponent("Component"),hlsOption=["fileID","requestID","mediaType","mimeType","provider","resolution","rate","frames","buffer","connectionSpeed"],mp4Option=["fileID","requestID","mediaType","mimeType","resolution","rate","buffer"],dashOption=["fileID","requestID","mediaType","mimeType","resolution","rate","buffer","provider","connectionSpeed"],infoOption=["info"],VideoStatisticWrapper=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.nodelist={},i.status={fileID:"",requestID:"",mediaType:"",mimeType:"",provider:"",resolution:"",rate:"",frames:"",buffer:"",connectionSpeed:"",info:""},n.on("playcgiend",function(){clearTimeout(i.timeoutID),Object.keys(i.status).forEach(function(t){i.nodelist[t].reset()})}),n.on("statistic",videojs.bind(i,function(t){"open"===t.data.action?i.tick():i.clearTimeout(i.timeoutID)})),i.init(),i}return inherits(e,t),e.prototype.tick=function(){var t=this;this.timeoutID=setTimeout(videojs.bind(this,function(){t.tick()}),1e3),this.updatePanel()},e.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-statistic-wrapper"})},e.prototype.init=function(){var t=this;Object.keys(this.status).forEach(function(e){var n=new VideoTextItem(t,{key:e,data:t.status[e]});t.nodelist[e]=n,t.addChild(n)})},e.prototype.updatePanel=function(){var t=this;if("Html5"===this.player().techName_)switch(this.getStatus(),this.status.mediaType){case"m3u8":hlsOption.forEach(function(e){t.nodelist[e].updateContent(t.status[e])});break;case"mp4":mp4Option.forEach(function(e){t.nodelist[e].updateContent(t.status[e])});break;case"mpd":dashOption.forEach(function(e){t.nodelist[e].updateContent(t.status[e])})}else"Flash"===this.player().techName_&&(this.getFlashStatus(),infoOption.forEach(function(e){"info"===e&&t.nodelist[e].updateContent(t.status[e])}))},e.prototype.getStatus=function(){this.getFileID(),this.getRequestID(),this.getMediaType(),this.getMIMEType(),this.getResolution(),this.getRate(),this.getProvider(),this.getBuffer(),"m3u8"===this.status.mediaType&&(this.getFrames(),this.getConnectionSpeed()),"mpd"===this.status.mediaType&&this.getConnectionSpeed()},e.prototype.getFlashStatus=function(){this.status.mediaType="flash",this.getSupport()},e.prototype.getFileID=function(){var t=this.player().options_.fileID||"";return this.status.fileID=t,t},e.prototype.getRequestID=function(){var t=this.player().PlayerMetrics().playStatus;if(t){var e=t.requestID;return this.status.requestID=e,e}},e.prototype.getMediaType=function(){this.player_.src()&&/\/(.+)\.(.+)\?|\/(.+)\.(.+)/.test(this.player_.src());var t=RegExp.$2||RegExp.$4||"";return this.status.mediaType=t,t},e.prototype.getMIMEType=function(){var t=this.player().src(),e=EXT_MIME[getFileExtension(t)]||"";return this.status.mimeType=e,e},e.prototype.getResolution=function(){var t=this.player_.tech_.el_.videoHeight||0,e=this.player_.tech_.el_.videoWidth||0,n=e+" x "+t;return this.status.resolution=n,n},e.prototype.getRate=function(){var t=this.player().playbackRate()||1;return this.status.rate=t+"x",t},e.prototype.getBuffer=function(){var t=this.player_.bufferedEnd().toFixed(1)||0,e=this.player_.duration().toFixed(1)||0,n=(t/e*100).toFixed(1)+"%",r=t+" / "+e+" ("+n+")";return this.status.buffer=r,r},e.prototype.getSupport=function(){var t=void 0;return t="m3u8"!==this.status.mediaType&&"mp4"!==this.status.mediaType&&"dash"!==this.status.mediaType?"视频统计功能不支持当前视频格式":"",this.status.info=t,t},e.prototype.getProvider=function(){var t=this.player_.tech_.sourceHandler_;return t instanceof Html5HlsJS?(this.status.provider="HlsJS","HlsJS"):t instanceof Html5DashJS?(this.status.provider="DashJS","DashJS"):""},e.prototype.getFrames=function(){var t=this.player_.getVideoPlaybackQuality(),e=(t.droppedVideoFrames||0)+" dropped of "+(t.totalVideoFrames||0);return this.status.frames=e,e},e.prototype.getConnectionSpeed=function(){var t=void 0;if("m3u8"===this.status.mediaType){var e=this.player_.tech_.hlsProvider.hls.abrController._bwEstimator;t=e&&e.getEstimate()?(125e-6*e.getEstimate()).toFixed(0)+"KB/s":"0KB/s",this.status.connectionSpeed=t}if("mpd"===this.status.mediaType){var n=this.player_.dash.mediaPlayer,r=n.getDashMetrics(),i=n.getDashAdapter(),o=n.getActiveStream().getStreamInfo(),s=o.index,a=r.getCurrentRepresentationSwitch("video").to,l=i.getBandwidthForRepresentation(a,s);t=l?(125e-6*l).toFixed(0)+"KB/s":"0KB/s",this.status.connectionSpeed=t}return t},e}(Component$6);videojs.registerComponent("VideoStatisticWrapper",VideoStatisticWrapper);var Component$5=videojs.getComponent("Component"),VideoStatisticPanel=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return n.on("statistic",videojs.bind(i,function(t){"open"===t.data.action?i.show():i.hide()})),n.on("playcgistart",function(){n.trigger({type:"statistic",data:{action:"close"}})}),i.init(),i}return inherits(e,t),e.prototype.createEl=function(){var t=this,e=videojs.dom.createEl("div",{className:"tcp-statistic vjs-hidden"}),n=videojs.dom.createEl("div",{className:"tcp-statistic-close",innerText:"[X]"});return n.addEventListener("click",function(){t.hide(),t.player().trigger({type:"statistic",data:{action:"close"}})}),e.appendChild(n),e},e.prototype.init=function(){this.addChild("VideoStatisticWrapper")},e.prototype.show=function(){t.prototype.show.call(this),this.popped=!0},e.prototype.hide=function(){t.prototype.hide.call(this),this.popped=!1},e}(Component$5);videojs.registerComponent("VideoStatisticPanel",VideoStatisticPanel);var MenuItem$3=videojs.getComponent("MenuItem"),MirrorMenuItem=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.addClass("tc-menu-list"),i.open=!1,i.hasOpen=!1,i.player=n,i.setup(),i}return inherits(e,t),e.prototype.setup=function(){var t=this;this.on(["tap","click"],function(){var e=t.player.tech().el();t.hasOpen||(window.MtaH5&&MtaH5.clickStat("mirror",{appid:t.player.options_.appID,fileid:t.player.options_.fileID}),t.player.trigger({type:"feature",data:"mirror"})),t.open?(videojs.dom.removeClass(e,"tcp-mirror"),videojs.dom.removeClass(t.el_,"tcp-menu-item-select")):(videojs.dom.addClass(e,"tcp-mirror"),videojs.dom.addClass(t.el_,"tcp-menu-item-select"),t.hasOpen=!0),t.open=!t.open})},e}(MenuItem$3);videojs.registerComponent("MirrorMenuItem",MirrorMenuItem);var MenuItem$4=videojs.getComponent("MenuItem"),PoweredByMenuItem=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.addClass("tc-menu-list"),i}return inherits(e,t),e}(MenuItem$4);videojs.registerComponent("PoweredByMenuItem",PoweredByMenuItem);var MenuItem$5=videojs.getComponent("MenuItem"),StatusMenuItem=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.addClass("tc-menu-list"),i.hasOpen=!1,i.player=n,n.on("statistic",videojs.bind(i,function(t){"close"===t.data.action&&(videojs.dom.removeClass(i.el_,"tcp-menu-item-select"),i.hasOpen=!1)})),i.setup(),i}return inherits(e,t),e.prototype.setup=function(){var t=this;this.on(["tap","click"],function(){t.hasOpen?(videojs.dom.removeClass(t.el_,"tcp-menu-item-select"),t.player.trigger({type:"statistic",data:{action:"close"}}),t.hasOpen=!1):(videojs.dom.addClass(t.el_,"tcp-menu-item-select"),t.player.trigger({type:"statistic",data:{action:"open"}}),t.hasOpen=!0,window.MtaH5&&MtaH5.clickStat("mirror",{appid:t.player.options_.appID,fileid:t.player.options_.fileID}),t.player.trigger({type:"feature",data:"statistic"}))})},e}(MenuItem$5);videojs.registerComponent("StatusMenuItem",StatusMenuItem);var Component$8=videojs.getComponent("Component"),Menu$2=videojs.getComponent("Menu"),MenuItem$2=videojs.getComponent("MenuItem"),RightClickPopupMenu=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));i.hide(),i.addChild("PoweredByMenuItem",{label:"Powered by Tencent Cloud."}),!r.statistic||IS_IOS||IS_ANDROID||i.addChild("StatusMenuItem",{label:"Video statistic"}),r.mirror&&i.addChild("MirrorMenuItem",{label:"Mirror"}),n.on("contextmenu",videojs.bind(i,i.onContextmenu)),n.on(["tap","click"],videojs.bind(i,function(t){if(this.popped)return this.hide(),t.stopPropagation(),t.preventDefault(),!1})),videojs.on(document,["tap","click"],videojs.bind(i,function(t){this.popped&&this.hide()}));var o=i;return i.children().forEach(function(t){t.on(["tap","click"],function(){o.hide()})}),i}return inherits(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return videojs.dom.addClass(e,"tcp-right-click-popup-menu"),e},e.prototype.show=function(){t.prototype.show.call(this),this.popped=!0},e.prototype.hide=function(){t.prototype.hide.call(this),this.popped=!1},e.prototype.onContextmenu=function(t){t.preventDefault(),this.show();var e=this.el(),n=t.clientX,r=t.clientY,i=getViewportSize(),o=i.width,s=i.height,a=n+e.offsetWidth-o+5;a=Math.max(0,a);var l=r+e.offsetHeight-s+5;l=Math.max(0,l);var c=this.player().el().getBoundingClientRect();e.style.left=Math.max(0,n-c.left-a)+"px",e.style.top=Math.max(0,r-c.top-l)+"px"},e}(Menu$2);videojs.registerComponent("RightClickPopupMenu",RightClickPopupMenu);var clickableComponent=videojs.getComponent("ClickableComponent"),TimeTooltip$2=videojs.getComponent("TimeTooltip"),Component$9=videojs.getComponent("Component"),dom=videojs.dom,formatTime$2=videojs.formatTime,COMMENT_WIDTH=140,COMMENT_HEIGHT_SINGLE_LINE=23,COMMENT_SHOW_ON_THE_LEFT={POPUP_CONTAINER_OFFSET:-130,POPUP_CONTAINER_OFFSET_WITHOUTGIT:-100,TRIANGLE_OFFEST:96,TRIANGLE_OFFEST_WITHOUTGIF:95},COMMENT_SHOW_ON_THE_RIGHT={TRIANGLE_OFFEST:6,POPUP_CONTAINER_OFFSET:0},ProgressMarkerGenerator=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.duration=0,i.registerListener(),i}return inherits(e,t),e.prototype.registerListener=function(){this.player_.one("canplay",videojs.bind(this,this.resetDotsElement))},e.prototype.resetDotsElement=function(){var t=this.player_;this.duration=t.duration(),dom.emptyEl(this.el_),this.resetEl()},e.prototype.resetEl=function(){this.setUpEl()},e.prototype.dotMouseLeave=function(){var t=event.currentTarget,e=t.getAttribute("container-id");this.getChildById(e).hide()},e.prototype.dotHover=function(){var t=event.currentTarget.parentElement.offsetWidth,e=event.currentTarget.offsetLeft+COMMENT_WIDTH,n=this.getChildById(event.currentTarget.getAttribute("container-id")),r=n.getAttribute("class").search("tcp-without-gif")>=0,i=n.el_.querySelector(".tcp-triangle-both")||n.el_.querySelector(".tcp-triangle");e>t?r?(n.el_.style.left=COMMENT_SHOW_ON_THE_LEFT.POPUP_CONTAINER_OFFSET_WITHOUTGIT+"px",i.style.left=COMMENT_SHOW_ON_THE_LEFT.TRIANGLE_OFFEST_WITHOUTGIF+"%"):(n.el_.style.left=COMMENT_SHOW_ON_THE_LEFT.POPUP_CONTAINER_OFFSET+"px",i.style.left=COMMENT_SHOW_ON_THE_LEFT.TRIANGLE_OFFEST+"%"):event.currentTarget.offsetLeft<=COMMENT_WIDTH&&!r&&(n.el_.style.left=COMMENT_SHOW_ON_THE_RIGHT.POPUP_CONTAINER_OFFSET+"px",i.style.left=COMMENT_SHOW_ON_THE_RIGHT.TRIANGLE_OFFEST+"px");var o=n.getChild("DotImage");if(o){var s=o.el_.getElementsByClassName("tcp-dot-timestamp")[0],a=event.currentTarget.getAttribute("dotinsecond"),l=formatTime$2(a);s.innerHTML=l}n.show()},e.prototype.setChildInTheContainer=function(t,e){var n=t.content&&""!==t.content?decodeURIComponent(t.content.replace(/\+/g," ")):"";if(""!==n){var r=e.addChild("DotComment");r.el_.innerHTML=encodeHTML(n)}if(t.img){e.el_.querySelector(".tcp-triangle").setAttribute("class","tcp-triangle-both");var i=e.addChild("DotImage");if(i.el_.firstChild.setAttribute("src",t.img),""==n)e.addClass("tcp-only-gif"),i.el_.firstChild.className="tcp-image-in-container-only-image";else{this.countContentSize(n)<=20&&(e.addClass("tcp-single-line"),r.el_.style.height=COMMENT_HEIGHT_SINGLE_LINE+"px")}}else if(""!==n){var o=this.countContentSize(n);o<=14?e.addClass("tcp-single-line"):o<=28&&e.addClass("tcp-two-lines"),e.addClass("tcp-without-gif"),r.addClass("tcp-large-comment")}},e.prototype.markSetUp=function(t){var e=t.timeOffset>0?t.timeOffset/1e3:0,n=this.duration?this.duration:0;if(!("number"!=typeof e||e>n)){var r=document.createElement("div");r.className="tcp-dot-basic-style",r.setAttribute("dotinsecond",e.toString()),t["class"]&&(r.className+=" "+t["class"]);var i=this.addChild("PopUpContainer");return r.setAttribute("container-id",i.id_),this.setChildInTheContainer(t,i),r.appendChild(i.el_),r.style.left=e/n*100+"%",r.addEventListener("mouseover",videojs.bind(this,this.dotHover)),r.addEventListener("mouseleave",videojs.bind(this,this.dotMouseLeave)),r}},e.prototype.setUpEl=function(){var e=this,n=this.player_.options_.dots||0,r=this.el_||t.prototype.createEl.call(this);return videojs.dom.addClass(r,"tcp-dot-component"),n&&n instanceof Array&&n.length>0&&n.forEach(function(t){var n=t.content||"";if(n&&""!=n||t.img){var i=e.markSetUp(t);i&&r.appendChild(i)}}),r},e.prototype.countContentSize=function(t){for(var e=0,n=t.length,r=-1,i=0;i<n;i++)r=t.charCodeAt(i),e+=r>=0&&r<=128?1:2;return e},e.prototype.createEl=function(){return this.setUpEl()},e}(clickableComponent);videojs.registerComponent("ProgressMarkerGenerator",ProgressMarkerGenerator);var DotComment=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.addClass("tcp-dot-comment"),i}return inherits(e,t),e}(Component$9);videojs.registerComponent("DotComment",DotComment);var DotImage=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));i.addClass("tcp-dot-image");var o=i.el_||t.prototype.createEl.call(i),s=dom.createEl("img");s.className="tcp-image-in-container",o.appendChild(s);var a=dom.createEl("span");return a.className="tcp-dot-timestamp",a.innerHTML="",o.appendChild(a),i}return inherits(e,t),e}(Component$9);videojs.registerComponent("DotImage",DotImage);var PopUpContainer=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));i.addClass("tcp-popup-container");var o=dom.createEl("div");return o.setAttribute("class","tcp-triangle"),i.el_.appendChild(o),i.hide(),i}return inherits(e,t),e}(TimeTooltip$2);videojs.registerComponent("PopUpContainer",PopUpContainer);var Plugin$2=videojs.getPlugin("plugin"),SpeedUp=function(t){function e(n){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n));return r.TARGET_LANTENCY=1,r.MAX_LATENCY=3,r.RATEVALUE=1.1,n.ready(videojs.bind(r,r.init)),r}return inherits(e,t),e.prototype.checkLatency=function(){var t=this.player.bufferedEnd()-this.player.currentTime();t>this.MAX_LATENCY&&this.player.playbackRate(this.RATEVALUE),t<this.TARGET_LANTENCY&&this.player.playbackRate(1)},e.prototype.init=function(){var t=this,e=this.player,n=void 0;e.on("playing",function(){e.duration()===Infinity&&(n=setInterval(t.checkLatency.bind(t),1e3))}),e.on("waiting",function(){t.reset(n)}),e.on("pause",function(){t.reset(n)})},e.prototype.reset=function(t){this.player.playbackRate(1),clearInterval(t)},e}(Plugin$2);videojs.registerPlugin("SpeedUp",SpeedUp);var Button$3=videojs.getComponent("Button"),BigPlayButton$2=videojs.getComponent("BigPlayButton");BigPlayButton$2.prototype.createEl=function(){var t=Button$3.prototype.createEl.call(this),e=getTemplate();return(this.options_.shapeType||this.options_.styleType)&&(e=getTemplate(this.options_.shapeType,this.options_.styleType)),t.appendChild(videojs.dom.createEl("div",{className:"vjs-button-icon",innerHTML:e})),t},BigPlayButton$2.prototype.controlText_="Play";var Component$10=videojs.getComponent("Component"),VideoStatisticWrapper$1=videojs.getComponent("VideoStatisticWrapper"),LoadingSpinner$2=videojs.getComponent("LoadingSpinner");LoadingSpinner$2.prototype.createEl=function(){function t(t,e){var n=new VideoStatisticWrapper$1(t);if(n.getMediaType(),(n.getBuffer()||"").indexOf("100.0%")>-1)return e.innerText="",!1;e.innerText=n.getConnectionSpeed()}var e=this,n=Component$10.prototype.createEl.call(this,"div",{className:"tcp-loading-spinner",dir:"ltr"});if(!this.player_.options_.loadingSpeed)return n;var r=null;return this.player_.on("waiting",function(){r=setInterval(function(){t(e.player_,n)},100)}),this.player_.on("timeupdate",function(){r&&clearInterval(r)}),n};var Plugin$3=videojs.getPlugin("plugin"),log$3=videojs.log,Skin=function(t){function e(n,r){classCallCheck(this,e),log$3("Skin initializing");var i=possibleConstructorReturn(this,t.call(this,n));return i.player.addClass("tcp-skin"),log$3("Skin initialized"),i}return inherits(e,t),e}(Plugin$3);videojs.registerPlugin("Skin",Skin);var now=function(){return _root.Date.now()},now_1=now,reWhitespace=/\s/,_trimmedEndIndex=trimmedEndIndex,reTrimStart=/^\s+/,_baseTrim=baseTrim,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,toNumber_1=toNumber,FUNC_ERROR_TEXT$2="Expected a function",nativeMax=Math.max,nativeMin=Math.min,debounce_1=debounce,FUNC_ERROR_TEXT$1="Expected a function",throttle_1=throttle$1,Component$11=videojs.getComponent("Component"),DvrProgressControl=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.on("mousemove",i.handleMouseMove),i.on("mouseup",i.handleMouseUp),i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control tcp-dvr-progress-control"})},e.prototype.update=function(t){this.getChild("DvrSeekBar").update(t)},e.prototype.handleMouseMove=function(t){var e=this.getChild("DvrSeekBar"),n=e.calculateDistance(t),r=e.getChild("DvrMouseTimeDisplay");r&&r.update(videojs.dom.getBoundingClientRect(e.el()),n)},e.prototype.handleMouseUp=function(t){this.getChild("DvrSeekBar").handleMouseUp(t)},e}(Component$11);DvrProgressControl.prototype.options_={children:["DvrSeekBar"]},videojs.registerComponent("DvrProgressControl",DvrProgressControl);var Slider$2=videojs.getComponent("Slider"),DvrSeekBar=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.percent_=1,i.update=throttle_1(videojs.bind(i,i.update),50),i.on(n,"seekToLive",videojs.bind(i,function(t){this.update(t.data)})),i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update=function(t){t!=undefined&&(this.percent_=t,this.bar.update(videojs.dom.getBoundingClientRect(this.el_),t),this.updateAriaAttributes(t))},e.prototype.handleMouseDown=function(e){t.prototype.handleMouseDown.call(this,e),this.isMouseDown=!0},e.prototype.handleMouseMove=function(t){var e=this.calculateDistance(t);this.update(e)},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this);var n=this.calculateDistance(e);this.update(n),this.player().Dvr().timeShift(n)},e.prototype.stepBack=function(){},e.prototype.stepForward=function(){},e.prototype.updateAriaAttributes=function(t){this.el().setAttribute("aria-valuenow",(100*t).toFixed(2))},e.prototype.getPercent=function(){return this.percent_},e}(Slider$2);DvrSeekBar.prototype.options_={children:["DvrMouseTimeDisplay","DvrTimeShiftBar"],barName:"DvrTimeShiftBar"},videojs.registerComponent("DvrSeekBar",DvrSeekBar);var DvrTimeShiftBar=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.el_.style.width="100%",i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar tcp-dvr-time-shift",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 100%</span>"})},e.prototype.update=function(t,e){var n=(100*e).toFixed(2)+"%";this.el_.style.width=n},e}(Component$11);videojs.registerComponent("DvrTimeShiftBar",DvrTimeShiftBar);var MouseTimeDisplay$2=videojs.getComponent("MouseTimeDisplay"),DvrMouseTimeDisplay=function(t){function e(){return classCallCheck(this,e),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(e,t),e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player().Dvr().dvrData.maxTimeShift,i=videojs.formatTime((1-e)*r,r);n.el_.style.left=t.width*e+"px",n.getChild("timeTooltip").update(t,e,i)})},e}(MouseTimeDisplay$2);videojs.registerComponent("DvrMouseTimeDisplay",DvrMouseTimeDisplay);var Button$4=videojs.getComponent("Button"),LiveButton=function(t){function e(){return classCallCheck(this,e),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(e,t),e.prototype.createEl=function(){var t=Button$4.prototype.createEl.call(this,"button",{className:"vjs-live-control vjs-control"});return this.contentEl_=videojs.dom.createEl("div",{className:"vjs-live-display",innerHTML:this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},e.prototype.update=function(){},e.prototype.updateControlText=function(t){this.controlText(t?"直播中":"返回直播")},e.prototype.handleClick=function(t){this.player().Dvr().seekToLive()},e}(Button$4);LiveButton.prototype.controlText_="返回直播",videojs.registerComponent("LiveButton",LiveButton);var Plugin$4=videojs.getPlugin("plugin"),Dvr=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));i.isInit=!1,i.options=r;var o=i;return n.ready(function(){var t=n.tech(!0);t&&t.hlsProvider&&n.one("loadedmetadata",function(e){t.el_.setAttribute("poster",""),o.init(),o.options.liveURL&&o.seekToLive()})}),i}return inherits(e,t),e.prototype.init=function(){var t=this.player,e=t.tech(!0).hlsProvider;if(this.parseM3u8(e.manifests[0]),!this.dvrData.startTime&&!this.isInit)return void t.one("loadedmetadata",videojs.bind(this,function(t){this.init()}));this.initControl(),this.delay=getParams("delay",t.tech_.currentSource_.src)||0,this.updateControl(!this.isLive()),t.on("loadedmetadata",videojs.bind(this,function(){this.parseM3u8(e.manifests[0]),this.delay=getParams("delay",t.tech_.currentSource_.src)||0,this.updateControl()})),this.isInit=!0},e.prototype.initControl=function(){var t=this.player;t.addClass("vjs-dvr"),t.controlBar.getChild("ProgressControl").hide(),t.controlBar.getChild("LiveDisplay").hide(),t.controlBar.addChild("DvrProgressControl",{},5),t.controlBar.addChild("liveButton",{},6)},e.prototype.updateControl=function(t){var e=this.player,n=e.controlBar.getChild("ProgressControl"),r=e.controlBar.getChild("LiveDisplay"),i=e.controlBar.getChild("DvrProgressControl"),o=e.controlBar.getChild("LiveButton");e.toggleClass("vjs-dvr-live",this.isLive()),o.updateControlText(this.isLive()),t&&i.update(1-this.delay/this.dvrData.maxTimeShift),this.dvrData.startTime?(i.show(),o.show(),n.hide(),r.hide()):(i.hide(),o.hide(),n.show(),r.show())},e.prototype.seekToLive=function(){this.isLive()||(this.timeShift(1),this.player.trigger({type:"seekToLive",data:1}))},e.prototype.isLive=function(){return!(this.delay>0)},e.prototype.timeShift=function(t){var e=this.player,n=(e.getChild("ControlBar").getChild("LiveButton"),e.tech_.currentSource_),r=Math.floor(this.dvrData.maxTimeShift*(1-t));this.delay=r,0==r&&this.options.liveURL?e.src(this.options.liveURL):(n.src=(this.options.shiftURL||n.src).replace(/delay=*(\d+)/,"delay="+r),e.src(e.tech_.currentSource_.src)),e.bigPlayButton.hide(),e.posterImage.hide(),e.tech_.one("hlsManifestParsed",videojs.bind(this,function(){e.play()}))},e.prototype.parseM3u8=function(t){this.dvrData={};for(var e=new RegExp([/#EXT-TX-TS-START-TIME:*(.+)/.source,/|#EXT-TX-TS-DURATION:*(.+)/.source].join(""),"g"),n=void 0;null!==(n=e.exec(t));)n[1]?this.dvrData.startTime=n[1]:n[2]&&(this.dvrData.duration=n[2]);this.dvrData.startTime&&(this.dvrData.maxTimeShift=Math.min(Math.floor((new Date).getTime()/1e3-this.dvrData.startTime),this.dvrData.duration))},e}(Plugin$4);videojs.registerPlugin("Dvr",Dvr);var Component$12=videojs.getComponent("Component"),LiveProgressControl=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.on("mousemove",i.handleMouseMove),i.on("mouseup",i.handleMouseUp),i.on("loadedmetadata",i.handleInit),i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control tcp-live-progress-control"})},e.prototype.update=function(t){this.getChild("LiveSeekBar").update(t)},e.prototype.handleInit=function(){"dvrLive"!==this.player.dvrMode()?this.hide():(this.player.removeClass("vjs-live"),this.show(),player.controlBar.currentTimeDisplay.show())},e.prototype.handleMouseMove=function(t){var e=this.getChild("LiveSeekBar"),n=e.calculateDistance(t),r=e.getChild("LiveMouseTimeDisplay");r&&r.update(videojs.dom.getBoundingClientRect(e.el()),n)},e.prototype.handleMouseUp=function(t){this.getChild("LiveSeekBar").handleMouseUp(t)},e}(Component$12);LiveProgressControl.prototype.options_={children:["LiveSeekBar"]},videojs.registerComponent("LiveProgressControl",LiveProgressControl);var Slider$3=videojs.getComponent("Slider"),LiveSeekBar=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.percent_=1,i.update=throttle_1(videojs.bind(i,i.update),50),i.on(n,"timeupdate",i.update),i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update=function(t){t!=undefined&&(this.percent_=t,this.bar.update(videojs.dom.getBoundingClientRect(this.el_),t),this.updateAriaAttributes(t))},e.prototype.handleMouseDown=function(e){t.prototype.handleMouseDown.call(this,e),this.isMouseDown=!0},e.prototype.handleMouseMove=function(t){var e=this.calculateDistance(t);this.update(e)},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this);var n=this.calculateDistance(e);this.update(n),this.player().LiveDvr().timeShift(n)},e.prototype.stepBack=function(){},e.prototype.stepForward=function(){},e.prototype.updateAriaAttributes=function(t){this.el().setAttribute("aria-valuenow",(100*t).toFixed(2))},e.prototype.getPercent=function(){return this.percent_},e}(Slider$3);LiveSeekBar.prototype.options_={children:["LiveMouseTimeDisplay","LiveTimeShiftBar"],barName:"LiveTimeShiftBar"},videojs.registerComponent("LiveSeekBar",LiveSeekBar);var LiveTimeShiftBar=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.el_.style.width="100%",i}return inherits(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar tcp-dvr-time-shift tcp-live-time-shift",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 100%</span>"})},e.prototype.update=function(t,e){var n=(100*e).toFixed(2)+"%";this.el_.style.width=n},e}(Component$12);videojs.registerComponent("LiveTimeShiftBar",LiveTimeShiftBar);var MouseTimeDisplay$3=videojs.getComponent("MouseTimeDisplay"),LiveMouseTimeDisplay=function(t){function e(){return classCallCheck(this,e),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(e,t),e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player().VttThumbnail().liveDuration,i=videojs.formatTime(e*r,r);n.el_.style.left=t.width*e+"px",n.getChild("timeTooltip").update(t,e,i)})},e}(MouseTimeDisplay$3);videojs.registerComponent("LiveMouseTimeDisplay",LiveMouseTimeDisplay);var Button$5=videojs.getComponent("Button"),LiveButton$1=function(t){function e(){return classCallCheck(this,e),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(e,t),e.prototype.createEl=function(){var t=Button$5.prototype.createEl.call(this,"button",{className:"vjs-live-control vjs-control"});return this.contentEl_=videojs.dom.createEl("div",{className:"vjs-live-display",innerHTML:this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},e.prototype.update=function(){},e.prototype.updateControlText=function(t){this.controlText(t?"直播中":"返回直播")},e.prototype.handleClick=function(t){this.player().LiveDvr().seekToLive()},e}(Button$5);LiveButton$1.prototype.controlText_="返回直播",videojs.registerComponent("LiveButton",LiveButton$1);var LARGE_ARRAY_SIZE=200,defineProperty$1=function(){try{var t=_getNative(Object,"defineProperty");return t({},"",{}),t}catch(e){}
18
18
  }(),_defineProperty=defineProperty$1,_baseAssignValue=baseAssignValue,objectProto$5=Object.prototype,hasOwnProperty$6=objectProto$5.hasOwnProperty,_assignValue=assignValue,argsTag$1="[object Arguments]",_baseIsArguments=baseIsArguments,objectProto$7=Object.prototype,hasOwnProperty$8=objectProto$7.hasOwnProperty,propertyIsEnumerable=objectProto$7.propertyIsEnumerable,isArguments=_baseIsArguments(function(){return arguments}())?_baseIsArguments:function(t){return isObjectLike_1(t)&&hasOwnProperty$8.call(t,"callee")&&!propertyIsEnumerable.call(t,"callee")},stubFalse_1=stubFalse,isBuffer_1=createCommonjsModule(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i?_root.Buffer:undefined,s=o?o.isBuffer:undefined,a=s||stubFalse_1;t.exports=a}),MAX_SAFE_INTEGER$1=9007199254740991,isLength_1=isLength,argsTag$2="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag$2="[object Function]",mapTag$1="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$1]=typedArrayTags[float64Tag$1]=typedArrayTags[int8Tag$1]=typedArrayTags[int16Tag$1]=typedArrayTags[int32Tag$1]=typedArrayTags[uint8Tag$1]=typedArrayTags[uint8ClampedTag$1]=typedArrayTags[uint16Tag$1]=typedArrayTags[uint32Tag$1]=!0,typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag$1]=typedArrayTags[boolTag$1]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag$1]=typedArrayTags[errorTag$1]=typedArrayTags[funcTag$2]=typedArrayTags[mapTag$1]=typedArrayTags[numberTag$1]=typedArrayTags[objectTag$1]=typedArrayTags[regexpTag$1]=typedArrayTags[setTag$1]=typedArrayTags[stringTag$1]=typedArrayTags[weakMapTag$1]=!1;var _baseIsTypedArray=baseIsTypedArray,_baseUnary=baseUnary,_nodeUtil=createCommonjsModule(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i&&_freeGlobal.process,s=function(){try{var t=r&&r.require&&r.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=s}),nodeIsTypedArray=_nodeUtil&&_nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?_baseUnary(nodeIsTypedArray):_baseIsTypedArray,_overArg=overArg,nativeKeys=_overArg(Object.keys,Object),_cloneBuffer=createCommonjsModule(function(t,e){function n(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}var r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===r,s=o?_root.Buffer:undefined,a=s?s.allocUnsafe:undefined;t.exports=n}),getPrototype=_overArg(Object.getPrototypeOf,Object),DataView$1=_getNative(_root,"DataView"),_DataView=DataView$1,Promise$1=_getNative(_root,"Promise"),_Promise=Promise$1,Set$1=_getNative(_root,"Set"),_Set=Set$1,WeakMap=_getNative(_root,"WeakMap"),_WeakMap=WeakMap,mapTag$2="[object Map]",promiseTag="[object Promise]",setTag$2="[object Set]",weakMapTag$2="[object WeakMap]",dataViewTag$2="[object DataView]",dataViewCtorString=_toSource(_DataView),mapCtorString=_toSource(_Map),promiseCtorString=_toSource(_Promise),setCtorString=_toSource(_Set),weakMapCtorString=_toSource(_WeakMap),getTag=_baseGetTag;(_DataView&&getTag(new _DataView(new ArrayBuffer(1)))!=dataViewTag$2||_Map&&getTag(new _Map)!=mapTag$2||_Promise&&getTag(_Promise.resolve())!=promiseTag||_Set&&getTag(new _Set)!=setTag$2||_WeakMap&&getTag(new _WeakMap)!=weakMapTag$2)&&(getTag=function(t){var e=_baseGetTag(t),n="[object Object]"==e?t.constructor:undefined,r=n?_toSource(n):"";if(r)switch(r){case dataViewCtorString:return dataViewTag$2;case mapCtorString:return mapTag$2;case promiseCtorString:return promiseTag;case setCtorString:return setTag$2;case weakMapCtorString:return weakMapTag$2}return e});var _getTag=getTag,mapTag$4="[object Map]",_baseIsMap=baseIsMap,nodeIsMap=_nodeUtil&&_nodeUtil.isMap,isMap=nodeIsMap?_baseUnary(nodeIsMap):_baseIsMap,setTag$4="[object Set]",_baseIsSet=baseIsSet,nodeIsSet=_nodeUtil&&_nodeUtil.isSet,isSet=nodeIsSet?_baseUnary(nodeIsSet):_baseIsSet,Plugin$5=videojs.getPlugin("plugin"),LiveDvr=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));i.isInit=!1,i.options=r;var o=i;return n.ready(function(){var t=n.tech(!0),e=t&&t.hlsProvider,r=t&&t.webrtcProvider;(e||r)&&n.one("loadedmetadata",function(e){t.el_.setAttribute("poster",""),o.init()})}),i}return inherits(e,t),e.prototype.init=function(){var t=this,e=this.player;e.on("loadedmetadata",function(){t.durationTimer&&clearInterval(t.durationTimer);var n=e.dvrMode();"dvrLive"===n&&(e.controlBar.getChild("ProgressControl").hide(),e.controlBar.getChild("LiveProgressControl")?e.controlBar.getChild("LiveProgressControl").show():e.controlBar.addChild("LiveProgressControl",{},5),e.controlBar.PDTDisplay.hide(),e.removeClass("vjs-live"),e.addClass("vjs-live-dvr")),"dvrEvent"===n&&(e.controlBar.getChild("ProgressControl").show(),e.controlBar.getChild("LiveProgressControl",{},5).hide(),e.controlBar.PDTDisplay.show(),e.removeClass("vjs-live"),e.removeClass("vjs-live-dvr"))});var n=setInterval(function(){t.liveDuration=e.VttThumbnail().liveDuration,t.liveDuration&&(t.initControl(),t.isInit=!0,clearInterval(n))},500)},e.prototype.initControl=function(){var t=this.player;"dvrLive"===t.dvrMode()&&(t.removeClass("vjs-live"),t.addClass("vjs-live-dvr"),t.controlBar.getChild("ProgressControl").hide(),t.controlBar.getChild("LiveDisplay").hide(),t.controlBar.addChild("LiveProgressControl",{},5),t.controlBar.playbackRateMenuButton.hide(),t.controlBar.durationDisplay.hide(),t.controlBar.timeDivider.hide(),t.controlBar.currentTimeDisplay.show())},e.prototype.timeShift=function(t){var e=this.player,n=e.tech_.currentSource_;if(100===t&&this.options.liveURL){e.src(this.options.liveURL);try{e.controlBar.getChild("LiveProgressControl").LiveSeekBar.LiveTimeShiftBar.el_.style.width="100%"}catch(r){}}else n.src=this.options.shiftURL,e.src(e.tech_.currentSource_.src),e.one("loadedmetadata",function(){var n=e.duration()*t;e.currentTime(n)});e.bigPlayButton.hide(),e.posterImage.hide(),e.tech_.one("hlsManifestParsed",videojs.bind(this,function(){e.play()}))},e}(Plugin$5);videojs.registerPlugin("LiveDvr",LiveDvr);var Menu$4=videojs.getComponent("Menu"),QualitySwitcherMenu=function(t){function e(){return classCallCheck(this,e),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(e,t),e.prototype.addItem=function(e){t.prototype.addItem.call(this,e)},e}(Menu$4),MenuItem$6=videojs.getComponent("MenuItem"),QualitySwitcherMenuItem=function(t){function e(n,r){return classCallCheck(this,e),possibleConstructorReturn(this,t.call(this,n,r))}return inherits(e,t),e.prototype.handleClick=function(e){if(t.prototype.handleClick.call(this,e),this.updateItems(),this.options_.callback(this.options_),"video"==this.options_.trackType){var n=this.player().controlBar.getChild(this.options_.trackType+"QualitySwitcherMenuButton");n.updateLabel(this.options_),n.unpressButton()}},e.prototype.updateItems=function(){for(var t=this.player().controlBar.getChild(this.options_.trackType+"QualitySwitcherMenuButton"),e=t.getChild(this.options_.trackType+"QualitySwitcherMenu"),n=e.children(),r=0;r<n.length;r++){var i=n[r];this!==i?(i.selected(!1),i.options_.selected=!1):i.options_.selected=!0}},e}(MenuItem$6),MenuButton$2=videojs.getComponent("MenuButton"),Menu$3=videojs.getComponent("Menu"),QualitySwitcherMenuButton=function(t){function e(){return classCallCheck(this,e),possibleConstructorReturn(this,t.apply(this,arguments))}return inherits(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=videojs.dom.createEl("div",{className:"tcp-quality-switcher-value",innerHTML:""}),e.appendChild(this.labelEl_),e},e.prototype.createMenu=function(){for(var t=this.options_.qualityList,e=new QualitySwitcherMenu(this.player(),{name:this.options_.trackType+"QualitySwitcherMenu"}),n=void 0,r=t.length-1;r>-1;r--){var i=t[r];n=videojs.mergeOptions(i,{trackType:this.options_.trackType,callback:this.options_.callback,selectable:!0}),e.addItem(new QualitySwitcherMenuItem(this.player(),n)),i.selected&&this.updateLabel(i)}return e},e.prototype.updateLabel=function(t){this.labelEl_.innerHTML="<p>"+this.localize(t.label)+"</p>"},e}(MenuButton$2),Plugin$6=videojs.getPlugin("plugin"),TRACK_TYPES=["video","audio","subtitle"],TRACK_CLASS={video:"tcp-video-quality-switcher",audio:"tcp-audio-quality-switcher",subtitle:"tcp-subtitle-quality-switcher"},log$4=videojs.log,QualitySwitcher=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,n.on("qualitydataloaded",videojs.bind(i,i.init)),i}return inherits(e,t),e.prototype.init=function(t){log$4("QualitySwitcher initializing",t);var e=this.player,n=t.data.qualityData,r=t.data.callbacks;if(this.setOptions({qualityData:n,callbacks:r}),!e.controlBar)return void log$4("QualitySwitcher can not initialize without control bar");for(var i=0;i<TRACK_TYPES.length;i++){var o=TRACK_TYPES[i],s=o+"QualitySwitcherMenuButton",a=e.controlBar.getChild(s);n[o]&&n[o].length>0&&e.controlBar.options_.QualitySwitcherMenuButton&&(a&&a.el()&&(a.dispose(),e.controlBar.removeChild(a)),this.repleaceLabel(o,n),a=new QualitySwitcherMenuButton(e,{name:s,qualityList:n[o],callback:r[o],trackType:o}),a.addClass(TRACK_CLASS[o]),e.controlBar.addChild(a,{},10))}log$4("QualitySwitcher initialized",t,this)},e.prototype.setOptions=function(t){this.options=videojs.mergeOptions(this.options,t)},e.prototype.setVideoQuality=function(t){if(this.options.qualityData&&this.options.callbacks.video){for(var e=this.options.qualityData.video,n=0;n<e.length;n++)e[n].selected&&(e[n].selected=!1),e[n].id===t.id&&(e[n].selected=!0);this.options.callbacks.video(t)}},e.prototype.getVideoQualityData=function(){return this.options.qualityData?this.options.qualityData.video:undefined},e.prototype.repleaceLabel=function(t,e){if(this.options.qualityLabelList){var n=this.options.qualityLabelList[t],r=e[t];if(r&&r.length>0&&n&&n.length>0)for(var i=0;i<r.length;i++){var o=r[i].label;o=o.slice(0,o.length-1);for(var s=0;s<n.length;s++)if(n[s].height==o){r[i].label=n[s].resolutionName;break}}}},e.prototype.reset=function(){for(var t=this.player,e=0;e<TRACK_TYPES.length;e++){var n=TRACK_TYPES[e],r=t.controlBar&&t.controlBar.getChild(n+"QualitySwitcherMenuButton");r&&r.el()&&(r.dispose(),t.controlBar.removeChild(r))}},e}(Plugin$6);videojs.registerPlugin("QualitySwitcher",QualitySwitcher);var Plugin$7=videojs.getPlugin("plugin"),log$5=videojs.log,defaultOptions={labels:{FLU:"流畅",SD:"标清",HD:"高清",FHD:"超清"},showOrder:["FLU","SD","HD","FHD"],defaultRes:"SD"},MultiResolution=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,r.useManualOption&&(i.manualOptions=extend({},r)),i.hasInit=!1,n.on("multiresolutionchange",videojs.bind(i,function(t){t.data&&this.update(data)})),n.on(["resolutionswitching","resolutionswitched"],videojs.bind(i,function(t){"resolutionswitching"==t.type?this.player.addClass("tcp-res-switching"):this.player.removeClass("tcp-res-switching")})),n.ready(videojs.bind(i,function(){var t=n.tech(!0);t&&(t.on("masterplaylistchange",videojs.bind(this,this.onMasterPlaylistChange)),t.on("hlsresolutionswitching",videojs.bind(this,this.onHlsLevelChange)),t.on("hlsresolutionswitched",videojs.bind(this,this.onHlsLevelChange)),t.on("dashqualityswitching",videojs.bind(this,this.onDashQualityChange)),t.on("dashqualityswitched",videojs.bind(this,this.onDashQualityChange))),this.hasInit=!0})),i.init(i.player.options_.multiResolution),i}return inherits(e,t),e.prototype.init=function(t){var e={};this.player.options_.label&&(e.label=this.player.options_.label),this.player.options_.labels&&(e.labels=this.player.options_.label),this.player.options_.showOrder&&(e.showOrder=this.player.options_.showOrder),this.player.options_.defaultRes&&(e.defaultRes=this.player.options_.defaultRes);var n=this.player,r=extend({},defaultOptions,t,this.manualOptions,e),i=r&&r.sources;if(this.options=r,i){log$5("MultiResolution initializing",r);var o=void 0;if(this.currentID=r.defaultRes=i[r.defaultRes]?r.defaultRes:Object.keys(i).shift(),o=i[this.currentID],"mediaLoader"!=n.options_.children[0]||this.hasInit)n.src(o);else{var s;(s=n.options_.sources).push.apply(s,o)}this.hasInit||(this.hasInit=!0),n.ready(videojs.bind(this,function(){n.trigger({type:"qualitydataloaded",data:this.initQualityData(r)}),n.one("loadedmetadata",function(){var t=this.tech(!0);"flash"!=t.name_&&t.el_.getAttribute("poster")&&(t.el_.removeAttribute("poster"),delete t.el_.poster)})})),log$5("MultiResolution initialized")}},e.prototype.reset=function(){this.player.QualitySwitcher().reset()},e.prototype.update=function(t){this.init(t)},e.prototype.store=function(t){if(!t)return this.options;this.options=videojs.mergeOptions(defaultOptions,this.options,t)},e.prototype.onMasterPlaylistChange=function(t){this.player.trigger({type:"qualitydataloaded",data:t.data})},e.prototype.onHlsLevelChange=function(t){"hlsresolutionswitching"==t.type?this.player.trigger({type:"resolutionswitching",data:t.data}):"hlsresolutionswitched"==t.type&&this.player.trigger({type:"resolutionswitched",data:t.data})},e.prototype.onDashQualityChange=function(t){"dashqualityswitching"==t.type?this.player.trigger({type:"resolutionswitching",data:t.data}):"dashqualityswitched"==t.type&&this.player.trigger({type:"resolutionswitched",data:t.data})},e.prototype.switchResolution=function(t){if(this.currentID!=t.id){var e=this.player,n=e.currentTime(),r=(e.paused(),Infinity===e.duration());if(e.trigger({type:"resolutionswitching",data:t}),r)e.bigPlayButton&&e.bigPlayButton.hide(),e.posterImage&&e.posterImage.hide(),e.one("loadstart",function(){e.play(),e.trigger({type:"resolutionswitched",data:t})});else{var i=e.ended(),o=e.playbackRate(),s=e.controlBar&&e.controlBar.progressControl&&e.controlBar.progressControl.seekBar.playProgressBar.el().style.width||0,a=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?"loadeddata":"loadedmetadata";e.one(a,function(){e.controlBar&&e.controlBar.progressControl&&(e.controlBar.progressControl.seekBar.playProgressBar.el().style.width=s),i||e.currentTime(n),"Flash"==e.techName_?(e.play(),e.tech(!0).trigger("seeked")):(e.play(),e.playbackRate()!=o&&e.playbackRate(o)),e.trigger({type:"resolutionswitched",data:t})}),e.bigPlayButton&&e.bigPlayButton.hide(),e.posterImage&&e.posterImage.hide(),"none"==e.options_.preload&&e.one("suspend",function(){e.load()})}e.src(this.options.sources[t.id]),r&&setTimeout(function(){e.play(),setTimeout(function(){e.play()},900)},100),this.currentID=t.id}},e.prototype.initQualityData=function(t){var e=[],n=(t.sources,t.labels),r=t.showOrder;return r.length>0&&r.forEach(function(r,i){var o={};o.id=r,o.selected=t.defaultRes===r,o.label=n[r]||r,e.push(o)}),{qualityData:{video:e},callbacks:{video:videojs.bind(this,this.switchResolution)}}},e.prototype.sortSourceOrder=function(t){return[]},e}(Plugin$7);videojs.registerPlugin("MultiResolution",MultiResolution);var FlashObj=videojs.getComponent("Flash"),defaultDismiss=!videojs.browser.IS_IPHONE,registerPlugin=videojs.registerPlugin||videojs.plugin,defaults$1={header:"",code:"",message:"",timeout:45e3,dismiss:defaultDismiss,progressDisabled:!1,errors:{1:{type:"MEDIA_ERR_ABORTED"},2:{type:"MEDIA_ERR_NETWORK"},3:{type:"MEDIA_ERR_DECODE"},4:{type:"MEDIA_ERR_SRC_NOT_SUPPORTED"},5:{type:"MEDIA_ERR_ENCRYPTED"},unknown:{type:"MEDIA_ERR_UNKNOWN"},"-1":{type:"PLAYER_ERR_NO_SRC",message:"No video has been loaded."},"-2":{type:"PLAYER_ERR_TIMEOUT",message:"Could not download the video."},10:{type:"SERVER_ERR",message:"Request timed out."},11:{type:"SERVER_ERR",message:"Server is not respond."},12:{type:"DATA_ERR",message:"Server respond error data."},13:{type:"DATA_ERR",message:"No video transcoding information found."},14:{type:"HLS_NETWORK_ERR",message:"A network error caused the media download to fail part-way."},15:{type:"HLS_MEDIA_ERR",message:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support."},16:{type:"HLS_MUX_ERR",message:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support."},17:{type:"HLS_OTHER_ERR",message:"Rise an internal exception when playing HLS."},18:{type:"DRM_ERR",message:"Current browser not support DRM."},20:{type:"PERMISSION_ERR",message:"This website needs a permission to access device motion."},21:{type:"PERMISSION_ERR",message:"This website needs a permission to access device motion."},30:{type:"HLS_NETWORK_ERR",message:"Failed to load hls.js file"},50:{type:"LICENSE_ERR",message:"License verification failed."},51:{type:"LICENSE_ERR",message:"The license has expired."},52:{type:"LICENSE_ERR",message:"Domain verification failed."},53:{type:"LICENSE_ERR",message:"Time verification failed."},54:{type:"LICENSE_ERR",message:"License type error."},55:{type:"LICENSE_ERR",message:"Lack license url."},56:{type:"LICENSE_ERR",message:"Get license data failed."},60:{type:"SAFECHECK_ERR",message:"Elements check failed."},61:{type:"SAFECHECK_ERR",message:"API check failed."},62:{type:"SAFECHECK_ERR",message:"Environment check failed."},63:{type:"SAFECHECK_ERR",message:"Environment check failed."},403:{type:"SERVER_ERR",message:"Authentication failed."},500:{type:"SERVER_ERR",message:"Server failed."},1001:{type:"SERVER_ERR",message:"The media file does not exist. Please check if the fileID is correct."},1002:{type:"SERVER_ERR",message:"The trial duration is illegal. The trial duration must be within the video duration."},1003:{type:"SERVER_ERR",message:"Param pcfg is not unique."},1004:{type:"SERVER_ERR",message:"The license has expired. Please check whether the expiration time setting is reasonable."},1005:{type:"SERVER_ERR",message:"Did not find an adaptive stream that can be played."},1006:{type:"SERVER_ERR",message:"Invalid request format, please check the request format."},1007:{type:"SERVER_ERR",message:"AppID is not exist, Please check if the AppID is correct."},1008:{type:"SERVER_ERR",message:"Without anti-leech information."},1009:{type:"SERVER_ERR",message:"psign check failed."},1010:{type:"SERVER_ERR",message:"Other errors."},1011:{type:"SERVER_ERR",message:"Get DRM license url failed"},1012:{type:"SERVER_ERR",message:"Get DRM certificate url failed"},1013:{type:"SERVER_ERR",message:"Psign missing contentInfo error"},1014:{type:"SERVER_ERR",message:"Psign contentInfo.audioVideoType invalid"},1015:{type:"SERVER_ERR",message:"Psign missing rawAdaptiveDefinition error"},1016:{type:"SERVER_ERR",message:"Psign missing drmAdaptiveInfo error"},1017:{type:"SERVER_ERR",message:"Psign missing transcodeDefinition error"},1018:{type:"SERVER_ERR",message:"Psign contentInfo.ResolutionNames json marshal error"},1019:{type:"SERVER_ERR",message:"Get super player config error"},1020:{type:"SERVER_ERR",message:"Get play key info error"},1021:{type:"SERVER_ERR",message:"Qsign invalid"},1022:{type:"SERVER_ERR",message:"Ciphered overlay info invalid"},1023:{type:"SERVER_ERR",message:"Ghost watermark info text is too long"},2001:{type:"SERVER_ERR",message:"System error"},2002:{type:"SERVER_ERR",message:"Panic error"},19:{type:"DATA_ERR",message:"Response data verification failed."},10008:{type:"SERVER_ERR",message:"The media file does not exist. Please check if the fileID is correct."},"-2001":{type:"SERVER_ERR",message:"Current browser not support play this stream, please select another one."},"-2002":{type:"SERVER_ERR",message:"Server respond error data.(eg. stream not exist)"},"-2003":{type:"SERVER_ERR",message:"Video play failed, please refresh to start play again."},"-2004":{type:"SERVER_ERR",message:"Connection to the server has failed and the number of connection retries has exceeded the set value."},"-2005":{type:"SERVER_ERR",message:"Video decoding failure."},PLAYER_ERR_DOMAIN_RESTRICTED:{message:"This video is restricted from playing on your current domain."},PLAYER_ERR_IP_RESTRICTED:{message:"This video is restricted at your current IP address."},PLAYER_ERR_GEO_RESTRICTED:{message:"This video is restricted from playing in your current geographic region."}}},initPlugin=function e(t,n){var r=void 0,i=void 0,o=void 0,s=[];videojs.getComponent("ErrorDisplay").prototype.options_.fillAlways=!1;var a=function(t){n.errors=videojs.mergeOptions(n.errors,t),Object.keys(n.errors).forEach(function(t){var e=n.errors[t];e.type||(e.type=t)})};a();var l=function(){t.clearTimeout(i),o&&(o=!1,t.removeClass("vjs-waiting")),i=t.setTimeout(function(){t.error()||t.paused()||t.ended()||(o=!0,t.addClass("vjs-waiting"))},1e3),t.clearTimeout(r),r=t.setTimeout(function(){t.error()||t.paused()||t.ended()||t.error({code:-2,type:"PLAYER_ERR_TIMEOUT"})},n.timeout),t.error()&&-2===t.error().code&&t.error(null)},c=function(){for(var e=void 0;s.length;)e=s.shift(),t.off(e[0],e[1]);t.clearTimeout(r),t.clearTimeout(i)},u=function(e,n){var r=function(){if(!t.error()){var e=t.$(".vjs-tech");if(e&&"application/x-shockwave-flash"===e.type&&!e.vjs_getProperty)return void t.error({code:-2,type:"PLAYER_ERR_TIMEOUT"});if(t.paused())return l();if(t.ended())return l()}n.call(this)};t.on(e,r),s.push([e,r])},h=function(){var e=0;c(),l(),u(["timeupdate","adtimeupdate"],function(){var n=t.currentTime();n!==e&&(e=n,l())}),n.progressDisabled||u("progress",l)},p=function(e){var r="",i=t.error(),o=document_1.createElement("div"),s="";if(i){i=videojs.mergeOptions(i,n.errors[i.code||0]),i.message&&(r='<div class="vjs-errors-message">'+t.localize(i.message)+"</div>"),i.code&&(r+='<div class="vjs-errors-code">'+this.localize("Error Code")+" : "+i.code+"</div>"),i.type&&(r+='<div class="vjs-errors-type">'+this.localize("Error Type")+" : "+i.type+"</div>"),"10"==i.code||i.code,i.code,i.code,o.className="vjs-errors-dialog",s='<div class="vjs-errors-content-container">\n '+r+"\n </div>";var a=t.getChild("errorDisplay");a&&a.closeable(!("dismiss"in i)||i.dismiss)?(o.innerHTML=s,a.fillWith(o),a.contentEl().firstChild.appendChild(a.getChild("closeButton").el())):(o.innerHTML=s,a.fillWith(o)),a.one("modalclose",function(){return t.error(null)})}},d=function g(){c(),t.removeClass("vjs-errors"),t.off("dispose",g),t.off(["aderror","error"],p)},f=function(n){d(),e(t,videojs.mergeOptions(defaults$1,n))};f.extend=function(t){return a(t)},f.getAll=function(){return videojs.mergeOptions(n.errors)},f.disableProgress=function(t){n.progressDisabled=t,h()},t.on("dispose",d),t.on(["aderror","error"],p),t.ready(function(){t.addClass("vjs-errors")}),t.errors=f},errors=function(t){initPlugin(this,videojs.mergeOptions(defaults$1,t))};["extend","getAll","disableProgress"].forEach(function(t){errors[t]=function(){videojs.log.warn("The errors."+t+"() method is not available until the plugin has been initialized!")}}),registerPlugin("Errors",errors);var Plugin$8=videojs.getPlugin("plugin"),cgiSeq={},STATUS_CODE_REPORT_URL="//report.huatuo.qq.com/code.cgi",log$6=videojs.log,Reporter=function(t){function e(n,r){classCallCheck(this,e),log$6("Reporter initilaizing");var i=possibleConstructorReturn(this,t.call(this,n));if(!n.options_.plugins.Reporter){var o;return o=!1,possibleConstructorReturn(i,o)}return i.reportContent={status:"idle"},i.mtaReportCache=[],log$6("Reporter initilaized"),i}return inherits(e,t),e.prototype.setStorage=function(t,e){localStorage.setItem(t,e)},e.prototype.getStorage=function(t){localStorage.getItem(t)},e.prototype.sender=function(t){var e=new Image;e.onload=e.onerror=e.onabort=function(){e.onload=e.onerror=e.onabort=null,e=null},e.src=t},e.prototype.initPlayCgiCodeReport=function(){var t=this.player;t.on("playcgistart",videojs.bind(this,this.onPlayCgiStart)),t.on("playcgiend",videojs.bind(this,this.onPlayCgiEnd))},e.prototype.onPlayCgiStart=function(t){cgiSeq[t.data.time]=cgiSeq[t.data.time]||{},cgiSeq[t.data.time].startTime=t.data.time,cgiSeq[t.data.time].url=t.data.url},e.reportPlayMetrics=function(t,e){xhr.post("https://datacenter.live.tlivesource.com",{body:JSON.stringify(t)},function(){e&&e()})},e.prototype.onPlayCgiEnd=function(t){if(cgiSeq[t.data.startTime]){var e=t.data,n=void 0,r=void 0,i=void 0;if(e.error)switch(r=2,e.error.message){case"Timeout":n=10;break;case"ServerError":n=11}else 0==e.result.code?(r=1,n=0):(r=3,n=e.result.code),i=e.result.requestId;this.reportPlayCgiToISD("","",r,n,t.data.time-cgiSeq[t.data.startTime].startTime,i,void 0,void 0)}},e.prototype.reportPlayCgiToISD=function(t,e,n,r,i,o,s,a){var l={domain:t||"playvideo.qcloud.com",cgi:e||"/getplayinfo/v2",type:n,code:r,time:i,appid:20370,platform:videojs.browser.IS_IOS?"ios":videojs.browser.IS_ANDROID?"android":"pc",expansion1:o,expansion2:s,expansion3:a};this.sender(unifyProtocol(STATUS_CODE_REPORT_URL)+"?"+serializeParams(l))},e.prototype.reportMTA=function(t,e){window.MtaH5?(this.mtaReportCache.length>0&&(this.mtaReportCache.forEach(function(t){t.call()}),this.mtaReportCache=0),MtaH5.clickStat(t,e)):this.mtaReportCache.push(function(){MtaH5.clickStat(t,e)})},e}(Plugin$8);videojs.registerPlugin("Reporter",Reporter);var store2=createCommonjsModule(function(t){!function(e,n){var r={version:"2.12.0",areas:{},apis:{},inherit:function(t,e){for(var n in t)e.hasOwnProperty(n)||Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e},stringify:function(t){return t===undefined||"function"==typeof t?t+"":JSON.stringify(t)},parse:function(t,e){try{return JSON.parse(t,e||r.revive)}catch(n){return t}},fn:function(t,e){r.storeAPI[t]=e;for(var n in r.apis)r.apis[n][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,n){t.setItem(e,n)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,n){var i=r.inherit(r.storeAPI,function(t,e,n){return 0===arguments.length?i.getAll():"function"==typeof e?i.transact(t,e,n):e!==undefined?i.set(t,e,n):"string"==typeof t||"number"==typeof t?i.get(t):"function"==typeof t?i.each(t):t?i.setAll(t,e):i.clear()});i._id=t;try{e.setItem("__store2_test","ok"),i._area=e,e.removeItem("__store2_test")}catch(o){i._area=r.storage("fake")}return i._ns=n||"",r.areas[t]||(r.areas[t]=i._area),r.apis[i._ns+i._id]||(r.apis[i._ns+i._id]=i),i},storeAPI:{area:function(t,e){var n=this[t];return n&&n.area||(n=r.Store(t,e,this._ns),this[t]||(this[t]=n)),n},namespace:function(t,e){if(!t)return this._ns?this._ns.substring(0,this._ns.length-1):"";var n=t,i=this[n];if(!(i&&i.namespace||(i=r.Store(this._id,this._area,this._ns+n+"."),this[n]||(this[n]=i),e)))for(var o in r.areas)i.area(o,r.areas[o]);return i},isFake:function(){return"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):!!(this._in(t)in this._area)},size:function(){return this.keys().length},each:function(t,e){for(var n=0,i=r.length(this._area);n<i;n++){var o=this._out(r.key(this._area,n));if(o!==undefined&&!1===t.call(this,o,this.get(o),e))break;i>r.length(this._area)&&(i--,n--)}return e||this},keys:function(t){return this.each(function(t,e,n){n.push(t)},t||[])},get:function(t,e){var n,i=r.get(this._area,this._in(t));return"function"==typeof e&&(n=e,e=null),null!==i?r.parse(i,n):null!=e?e:i},getAll:function(t){return this.each(function(t,e,n){n[t]=e},t||{})},transact:function(t,e,n){var r=this.get(t,n),i=e(r);return this.set(t,i===undefined?r:i),this},set:function(t,e,n){var i=this.get(t);return null!=i&&!1===n?e:r.set(this._area,this._in(t),r.stringify(e),n)||i},setAll:function(t,e){var n,r;for(var i in t)r=t[i],this.set(i,r,e)!==r&&(n=!0);return n},add:function(t,e){var n=this.get(t);if(n instanceof Array)e=n.concat(e);else if(null!==n){var i=typeof n;if(i===typeof e&&"object"===i){for(var o in e)n[o]=e[o];e=n}else e=n+e}return r.set(this._area,this._in(t),r.stringify(e)),e},remove:function(t,e){var n=this.get(t,e);return r.remove(this._area,this._in(t)),n},clear:function(){return this._ns?this.each(function(t){r.remove(this._area,this._in(t))},1):r.clear(this._area),this},clearAll:function(){var t=this._area;for(var e in r.areas)r.areas.hasOwnProperty(e)&&(this._area=r.areas[e],this.clear());return this._area=t,this},_in:function(t){return"string"!=typeof t&&(t=r.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&0===t.indexOf(this._ns)?t.substring(this._ns.length):undefined:t}},storage:function(t){return r.inherit(r.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var e=0;for(var n in this.items)if(this.has(n)&&t===e++)return n},setItem:function(t,e){this.has(t)||this.length++,this.items[t]=e},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},i=r.Store("local",function(){try{return localStorage}catch(t){}}());i.local=i,i._=r,i.area("session",function(){try{return sessionStorage}catch(t){}}()),i.area("page",r.storage("page")),"function"==typeof n&&n.amd!==undefined?n("store2",[],function(){return i}):t.exports?t.exports=i:(e.store&&(r.conflict=e.store),e.store=i)}(commonjsGlobal,commonjsGlobal&&commonjsGlobal.define)}),Plugin$9=videojs.getPlugin("plugin"),log$7=videojs.log,ContinuePlay=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,i.init(),i}return inherits(e,t),e.prototype.init=function(t){var e=this.player,n=e.options_,r=void 0;e.off("timeupdate",videojs.bind(this,this.onTimeUpdate)),e.ready(videojs.bind(this,function(){r=n&&n.appID&&n.fileID?n.fileID:this.options.playID,this.playID=r,t&&t.src?this.source=t.src.split("?")[0]:e.cache_&&e.cache_.source&&e.cache_.source.src&&(this.source=e.cache_.source.src.split("?")[0]),(r||this.source)&&(log$7("ContinuePlay initializing"),this.lastTime=store2.get(this.getStoreKey()),e.off("timeupdate",videojs.bind(this,this.onTimeUpdate)),e.on("timeupdate",videojs.bind(this,this.onTimeUpdate)),e.one(this.getTriggerEvent(),videojs.bind(this,this.onPlay)),!this.options.auto&&e.getChild("ContinuePlayTips")&&e.getChild("ContinuePlayTips").close(),log$7("ContinuePlay initialized"),e.trigger({type:"feature",data:"continue"}))}))},e.prototype.onTimeUpdate=function(t){store2.set(this.getStoreKey(),this.player.currentTime())},e.prototype.onPlay=function(t){var e=this.player;Math.round(this.lastTime)>1&&this.player.duration()>1&&this.player.duration()!==Infinity&&Math.round(this.lastTime)!=Math.round(this.player.duration())?this.options.auto?this.start():e.addChild("ContinuePlayTips",videojs.mergeOptions(this.options,{time:this.lastTime,resumeCallback:videojs.bind(this,this.start)})):"Flash"==e.techName_&&Math.round(this.lastTime)>1&&Math.round(this.lastTime)!=Math.round(this.player.duration())&&this.player.duration()!==Infinity&&!this.player.duration()&&e.one("loadedmetadata",videojs.bind(this,this.onPlay))},e.prototype.start=function(){var t=this.player;t.currentTime(this.lastTime),"Flash"==t.techName_&&t.tech(!0).trigger("seeked"),t.trigger({type:"continueplay",data:{lastTime:this.lastTime}})},e.prototype.generatePlayID=function(){},e.prototype.getStoreKey=function(){return"tcplayer-lpt-"+(this.playID||this.source)},e.prototype.getTriggerEvent=function(){
19
19
  var t=this.player,e=t.options_;return e.autoplay&&"Flash"==t.techName_?"loadedmetadata":"playing"},e}(Plugin$9);videojs.registerPlugin("ContinuePlay",ContinuePlay);var defaults$2={align:"top-left",className:"",content:"",debug:!1,showBackground:!0,attachToControlBar:!1,overlays:[]},Component$13=videojs.getComponent("Component"),dom$1=videojs.dom||videojs,registerPlugin$1=videojs.registerPlugin||videojs.plugin,isNumber=function(t){return"number"==typeof t&&t===t},hasNoWhitespace=function(t){return"string"==typeof t&&/^\S+$/.test(t)},Overlay=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return["start","end"].forEach(function(t){var e=i.options_[t];if(isNumber(e))i[t+"Event_"]="timeupdate";else if(hasNoWhitespace(e))i[t+"Event_"]=e;else if("start"===t)throw new Error('invalid "start" option; expected number or string')}),["endListener_","rewindListener_","startListener_"].forEach(function(t){i[t]=function(n){return e.prototype[t].call(i,n)}}),"timeupdate"===i.startEvent_&&i.on(n,"timeupdate",i.rewindListener_),i.debug('created, listening to "'+i.startEvent_+'" for "start" and "'+(i.endEvent_||"nothing")+'" for "end"'),i.hide(),i}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_,e=t.content,n=t.showBackground?"tcp-overlay-background":"tcp-overlay-no-background",r=dom$1.createEl("div",{className:"\n tcp-overlay\n tcp-overlay-"+t.align+"\n "+t.className+"\n "+n+"\n vjs-hidden\n "});return"string"==typeof e?r.innerHTML=e:videojs.browser.IS_IE8||e instanceof window_1.DocumentFragment?r.appendChild(e):dom$1.appendContent(r,e),r},e.prototype.debug=function(){if(this.options_.debug){for(var t=videojs.log,e=t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t.hasOwnProperty(r[0])&&"function"==typeof t[r[0]]&&(e=t[r.shift()]),e.apply(undefined,["overlay#"+this.id()+": "].concat(r))}},e.prototype.hide=function(){return t.prototype.hide.call(this),this.debug("hidden"),this.debug('bound `startListener_` to "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('unbound `endListener_` from "'+this.endEvent_+'"'),this.off(this.player(),this.endEvent_,this.endListener_)),this.options_.once?(videojs.browser.IS_IOS&&videojs.browser.IS_WECHAT?this.player().hasStarted()||this.player().ready(videojs.bind(this,function(){this.startListener_({type:this.startEvent_})})):this.player().hasStarted()||this.on(this.player(),this.startEvent_,this.startListener_),this):("pause"===this.startEvent_?this.on(this.player(),this.startEvent_,this.startOnPause_):this.on(this.player(),this.startEvent_,this.startListener_),this)},e.prototype.startOnPause_=function(t){var e=this.player();"pause"===t.type?e.seeking()||e.ended()||this.startListener_({type:"pause"}):e.paused()&&this.startListener_({type:"pause"})},e.prototype.shouldHide_=function(t,e){var n=this.options_.end;return isNumber(n)?t>=n:n===e},e.prototype.show=function(){return t.prototype.show.call(this),"pause"===this.startEvent_&&this.off(this.player(),this.startEvent_,this.startOnPause_),this.off(this.player(),this.startEvent_,this.startListener_),this.debug("shown"),this.debug('unbound `startListener_` from "'+this.startEvent_+'"'),this.endEvent_&&(this.debug('bound `endListener_` to "'+this.endEvent_+'"'),this.on(this.player(),this.endEvent_,this.endListener_)),this},e.prototype.shouldShow_=function(t,e){var n=this.options_.start,r=this.options_.end;return isNumber(n)?isNumber(r)?t>=n&&t<r:this.hasShownSinceSeek_?Math.floor(t)===n:(this.hasShownSinceSeek_=!0,t>=n):n===e},e.prototype.startListener_=function(t){var e=this.player().currentTime();this.shouldShow_(e,t.type)&&this.show()},e.prototype.endListener_=function(t){var e=this.player().currentTime();this.shouldHide_(e,t.type)&&this.hide()},e.prototype.rewindListener_=function(t){var e=this.player().currentTime(),n=this.previousTime_,r=this.options_.start,i=this.options_.end;e<n&&(this.debug("rewind detected"),isNumber(i)&&!this.shouldShow_(e)?(this.debug("hiding; "+i+" is an integer and overlay should not show at this time"),this.hasShownSinceSeek_=!1,this.hide()):hasNoWhitespace(i)&&e<r&&(this.debug("hiding; show point ("+r+") is before now ("+e+") and end point ("+i+") is an event"),this.hasShownSinceSeek_=!1,this.hide())),this.previousTime_=e},e}(Component$13);videojs.registerComponent("Overlay",Overlay);var plugin=function(t){var e=this,n=videojs.mergeOptions(defaults$2,t);Array.isArray(this.overlays_)&&this.overlays_.forEach(function(t){e.removeChild(t),e.controlBar&&e.controlBar.removeChild(t),t.dispose()});var r=n.overlays;delete n.overlays,this.overlays_=r.map(function(t){var r=videojs.mergeOptions(n,t);return r.attachToControlBar&&e.controlBar&&-1!==r.align.indexOf("bottom")?e.controlBar.addChild("overlay",r):e.addChild("overlay",r)})};registerPlugin$1("Patch",plugin);var Plugin$10=videojs.getPlugin("plugin"),log$8=videojs.log,locations=["start","pause","ended"],startEvent=["loadstart","pause","ended"],endEvent=["play","play","play"],ImagePatch=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.hasInit=!1,i.init(r),i}return inherits(e,t),e.prototype.init=function(t){var e=this,n=this.player,r={showBackground:!1,overlays:[]};Array.isArray(t)&&t.length>0&&(log$8("ImagePatch initializing"),t.forEach(function(t){var n=void 0,i=void 0,o=void 0,s=void 0,a=document.createDocumentFragment();o=document.createElement("a"),o.className="tcp-overlay-link",o.target="_blank",t.link&&(o.href=t.link),t.url&&(s=e.loadImg(unifyProtocol(t.url),videojs.bind(e,e.onImgLoaded)),s.className="tcp-overlay-img",o.appendChild(s),videojs.browser.IS_IE8?(n=document.createElement("div"),n.className="tcp-overlay-table",i=document.createElement("div"),i.className="tcp-overlay-cell",i.appendChild(o),n.appendChild(i),a.appendChild(n)):a.appendChild(o),r.overlays.push({content:a,className:"tcp-image-patch tcp-image-patch-"+locations[t.location],start:startEvent[t.location],end:endEvent[t.location],once:0==t.location,align:"center"}))}),r.overlays.length>0?(n.Patch(r),n.trigger({type:"feature",data:"patch"}),this.hasInit=!0):this.reset(),log$8("ImagePatch initialized"))},e.prototype.loadImg=function(t,e){var n,r,i,o,s,a=new Image;return a.src=t,a.complete?(e&&e.call(e,a),a):(r=a.width,i=a.height,a.onerror=function(){n.end=!0,a=a.onload=a.onerror=null},n=function(){o=a.width,s=a.height,(o!==r||s!==i||o*s>1024)&&(e&&e.call(e,a),n.end=!0)},n(),a.onload=function(){!n.end&&n(),a=a.onload=a.onerror=null},a)},e.prototype.onImgLoaded=function(t){if(videojs.browser.IE_VERSION){var e=parseInt(this.player.el().currentStyle.width),n=parseInt(this.player.el().currentStyle.height);if(t.width>e||t.height>n){var r=e/(t.width/t.height);t.width/t.height>e/n||(t.style.marginTop=(n-r)/2+"px"),t.style.width="100%",t.style.height="auto"}}},e.prototype.reset=function(){this.hasInit&&(log$8("ImagePatch reset"),this.player.Patch(),this.hasInit=!1)},e}(Plugin$10);videojs.registerPlugin("ImagePatch",ImagePatch);var Plugin$11=videojs.getPlugin("plugin"),log$9=videojs.log,ContextMenu=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,log$9("ContextMenu initializing"),i.init(),log$9("ContextMenu initialized"),i}return inherits(e,t),e.prototype.init=function(){this.player.addChild("RightClickPopupMenu",this.options)},e}(Plugin$11);videojs.registerPlugin("ContextMenu",ContextMenu);var Plugin$12=videojs.getPlugin("plugin"),LevelSwitch=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,i.init(),i}return inherits(e,t),e.prototype.init=function(){var t=this.player,e=t.options_.plugins.ContextMenu;e&&e.levelSwitch&&e.levelSwitch.open&&t.addChild("LevelSwitchTips",this.options)},e}(Plugin$12);videojs.registerPlugin("LevelSwitch",LevelSwitch);var getParams$2=getParams,Plugin$13=videojs.getPlugin("plugin"),log$11=videojs.log,VttThumbnail=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.hasInit=!1,i.spriteData=[],i.firstShowSprite=!0,i.defaults={width:0,height:0,basePath:""},(r.vttUrl||!0===r.enable)&&n.on("loadedmetadata",function(){i.getSpriteConfig(),i.init(r)}),i}return inherits(e,t),e.prototype.checkEventDvr=function(){var t=this.player.dvrMode();return!!this.player.src()&&("dvrLive"===t||"dvrEvent"===t)},e.prototype.loadTrackFile=function(t){var e=this,n=this.player,r=n.addRemoteTextTrack({src:t.vttUrl,kind:"metadata"},!0);r&&r.addEventListener("load",function(){e.trackInfo=r})},e.prototype.getSpriteConfig=function(){if(!this.checkEventDvr())return!1;var t=this,e=this.player;this.canGetNewSprite=!1;var n=e.src(),r=(getParams$2(n,"tsEnd"),parseInt((new Date).getTime()/1e3),get_1(e,"options_.plugins.Dvr.spriteURL")),i=get_1(e,"options_.plugins.Dvr.startTime"),o=r.indexOf("http://")>-1?"http://":"https://",s=r.replace("https://","").replace("http://","").split("/")[0];xhr({url:r,timeout:3e3},function(e,n,r){if(!r)return!1;t.spriteData=JSON.parse(r),t.lastTime=t.spriteData[t.spriteData.length-1].last_time,t.liveDuration=0,t.spriteData.sort(function(t,e){return t.start_time-e.start_time});for(var a=0;a<t.spriteData.length;a++){var l=t.spriteData[a];0==a&&i>l.start_time?(l.hidden_dur=i-l.start_time,l.play_dur=l.end_time-i,l.hasOwnProperty("duration")&&(l.play_dur=l.duration*l.play_dur/(l.end_time-l.start_time),l.hidden_dur=l.duration-l.play_dur,t.liveDuration+=l.play_dur)):(l.hidden_dur=0,l.play_dur=l.end_time-l.start_time,l.hasOwnProperty("duration")&&(l.play_dur=l.duration,t.liveDuration+=l.play_dur))}t.initLiveDuration=t.liveDuration,t.canGetNewSprite=!0,t.baseHost=o+s,t.prefix=t.baseHost+t.spriteData[t.spriteData.length-1].path,t.durationTimer&&clearInterval(t.durationTimer),t.durationTimer=setInterval(function(){t.player&&!t.player.paused()&&(t.liveDuration=t.liveDuration+1)},1e3)})},e.prototype.init=function(t){if(!videojs.browser.IS_IOS&&!videojs.browser.IS_ANDROID&&this.player.controlBar&&this.player.controlBar.progressControl){if(log$11("VttThumbnail initializing",t),!this.player.controlBar)return void log$11("VttThumbnail can not initialize without control bar");this.options=t;var e=this.player;t.vttUrl&&(this.loadTrackFile(t),this.defaults.basePath=parseBasePath(t.vttUrl)),this.initUI(),this.hasInit=!0,log$11("VttThumbnail initialized"),e.trigger({type:"feature",data:"thumbnail"})}},e.prototype.initTrackFile=function(t){t.track;this.trackInfo=t},e.prototype.initUI=function(){var t=this,e=videojs.dom.createEl("div",{className:"tcp-vtt-thumbnail-container"}),n=videojs.dom.createEl("img",{className:"tcp-vtt-thumbnail-img"});e.appendChild(n),this.containerEl=e,this.imgEl=n,this.cleanTimer&&clearInterval(this.cleanTimer),this.cleanTimer=setInterval(function(){"0"===window.getComputedStyle(t.imgEl).opacity&&(t.containerEl.style.display="none")},200);var r=setInterval(function(){var n=t.player.dvrMode(),i=void 0;(i="dvrLive"===n?t.player.controlBar.getChild("LiveProgressControl"):t.player.controlBar.progressControl)&&(i.el().appendChild(e),i.on("mouseenter",videojs.bind(t,t.onMouseEnter)),i.on("mousemove",videojs.bind(t,t.onMouseMove)),i.on("mouseleave",videojs.bind(t,t.onMouseOut)),clearInterval(r))},500)},e.prototype.onMouseEnter=function(){this.containerEl.style.display="block"},e.prototype.getRelativeOffset=function(t){for(var e=0,n=t,r=0,i=0;i<this.spriteData.length;i++){if(t<e+this.spriteData[i].play_dur){r=i,n=t-e+this.spriteData[i].hidden_dur;break}e+=this.spriteData[i].play_dur}return{relativeOffset:n,gConfigIndex:r}},e.prototype.getSpritePosition=function(t){var e=this.getRelativeOffset(t),n=e.relativeOffset,r=e.gConfigIndex,i=Math.floor(n/60),o=Math.floor(n%60/10);this.prefix=this.baseHost+this.spriteData[r].path;var s=this.baseHost+this.spriteData[r].path+i+".jpg";return s+="?txTimeshift=on",{picUrl:s,xpos:160*Math.floor(o%3),ypos:90*Math.floor(o/3)}},e.prototype.onMouseMove=function(t){var e=void 0,n=void 0,r=void 0,i=void 0,o=void 0,s=void 0,a=void 0,l=void 0,c=0,u=void 0,h=void 0,p=void 0,d=void 0,f=this.player.dvrMode();if(r="dvrLive"===f?this.player.controlBar.getChild("LiveProgressControl"):this.player.controlBar.progressControl,i="dvrLive"===f?r.LiveSeekBar:r.seekBar,o=offsetParent(r.el()).getBoundingClientRect(),s=offsetParent(i.el()).getBoundingClientRect(),e=t.clientX,l="dvrLive"===f?this.liveDuration:this.player.duration(),a=((e-s.left)/i.width()*l).toFixed(3),a>this.initLiveDuration&&this.canGetNewSprite&&this.getSpriteConfig(),!+a)return!1;if("dvrEvent"===f||"dvrLive"===f){var g=player.currentPDT()/100;if(g&&(g>this.lastTime||!this.prefix))return this.getSpriteConfig(),!1;var y=this.getSpritePosition(a);return p={h:90,left:0,src:y.picUrl,w:160,x:y.xpos,y:y.ypos},d=e-s.left+p.w/2-i.width(),d=Math.max(0,d),n=e-o.left-p.w/2-d,n=Math.max(i.el().offsetLeft,n),p.left=n,this.setView(p),!1}if(!this.trackInfo)return!1;for(u=this.trackInfo.track||this.trackInfo;c<u.cues.length;){if(h=u.cues[c],h.startTime<=a&&h.endTime>=a){p=parseImageLink(h.text,this.defaults);break}c++}if(!p)return this.onMouseOut(),!1;d=e-s.left+p.w/2-i.width(),d=Math.max(0,d),n=e-o.left-p.w/2-d,n=Math.max(i.el().offsetLeft,n),p.left=n,this.setView(p)},e.prototype.onMouseOut=function(){this.containerEl.style.display="none"},e.prototype.setView=function(t){var e=this.containerEl,n=this.imgEl,r=this.options;this.firstShowSprite&&(e.style.display="none",this.firstShowSprite=!1),e.style.width==t.w&&e.style.height==t.h||(e.style.width=t.w+"px",e.style.height=t.h+"px"),e.style.left=t.left+"px",n.src!==t.src&&(r.imgUrl&&n.src!=r.imgUrl?n.src=r.imgUrl:n.src=t.src),n.onload=function(){e.style.display="block"},n.onerror=function(){e.style.display="none",setTimeout(function(){e.style.display="none"},200)},n.style.left=-t.x+"px",n.style.top=-t.y+"px",n.style.clip="rect("+t.y+"px,"+(t.w+t.x)+"px,"+(t.y+t.h)+"px,"+t.x+"px)"},e.prototype.reset=function(){if(this.hasInit){log$11("VttThumbnail reset");var t=this.player,e=t.controlBar.progressControl;e.off("mousemove",videojs.bind(this,this.onMouseMove,10)),e.off("mouseleave",videojs.bind(this,this.onMouseOut)),this.hasInit=!1}},e}(Plugin$13),getComputedStyle=function(t,e){return function(n){return window.getComputedStyle?window.getComputedStyle(t,e)[n]:t.currentStyle[n]}},offsetParent=function n(t){return"HTML"!==t.nodeName&&"static"===getComputedStyle(t)("position")?n(t.offsetParent):t},parseImageLink=function(t,e){var n=void 0,r=void 0,i=void 0;if(-1===(r=t.indexOf("#")))return{src:t,w:0,h:0,x:0,y:0};if(n=t.substring(0,r),/^(http:|https:|\/\/)/.test(n)||(n=e.basePath+n),i=t.substring(r+1),"xywh="!==i.substring(0,5))return{src:n,w:0,h:0,x:0,y:0};var o=i.substring(5).split(",");return{src:n,w:parseInt(o[2]),h:parseInt(o[3]),x:parseInt(o[0]),y:parseInt(o[1])}},parseBasePath=function(t){/^(\/\/)/.test(t)&&(t="https:"+t);var e=/(\w+):\/\/([^\:|\/]+)(\:\d*)?(.*\/)([^#|\?|\n]+)?(#.*)?(\?.*)?/i,n=t.match(e);if(n&&n[2]&&n[4])return"//"+n[2]+n[4]};videojs.registerPlugin("VttThumbnail",VttThumbnail);var Plugin$14=videojs.getPlugin("plugin"),log$12=videojs.log,PlayerMetrics=function(t){function e(n,r){classCallCheck(this,e),log$12("PlayerMetrics initializing");var i=possibleConstructorReturn(this,t.call(this,n));if(!1===n.options_.reportable){var o;return o=!1,possibleConstructorReturn(i,o)}return i.player=n,i.checkPrevData(),i.initData(),i.registerListener(),log$12("PlayerMetrics initialized"),i}return inherits(e,t),e.prototype.checkPrevData=function(){var t=localStorage.getItem("tcplayer_data");if(t){var e=JSON.parse(t);Reporter.reportPlayMetrics(e,function(){localStorage.removeItem("tcplayer_data")})}},e.prototype.initData=function(){this.bytes_token=guid(),this.vodBaseData={uint32_service:2,uint32_platform:3,bytes_version:String(version),uint64_appid:0,bytes_bizid:this.guid("dev_uuid"),bytes_stream_id:"",uint32_module_id:1011,uint32_data_type:1,uint32_command:40303,uint64_data_time:0,bytes_token:this.bytes_token,token:this.bytes_token,dev_uuid:this.guid("dev_uuid"),str_app_name:"",str_app_version:"",str_stream_url:"",str_brand_type:this.getDevice(),str_device_resolution:screen.width+"_"+screen.height,str_device_type:"",str_package_name:"",str_sdk_name:"TCPlayer",str_user_id:this.guid("dev_uuid"),sys_type:this.getSystem(),sys_version:String(this.getSystemVer()),str_user_agent:USER_AGENT,str_browser_version:String(this.getBrowserVer()),str_browser_model:String(this.getBrowser()),u32_app_id:String(this.player.options_.appID),str_fileid:String(this.player.options_.fileID),u32_network_type:this.getNetworkType()},this.liveBaseData={str_user_id:this.guid("dev_uuid"),dev_uuid:this.guid("dev_uuid"),str_session_id:this.bytes_token,bytes_token:this.bytes_token,str_device_type:"",str_os_info:this.getSystem(),str_package_name:"",u32_network_type:"0xFF"!==this.getNetworkType()?this.getNetworkType():"",u32_server_ip:"",str_stream_url:this.player.cache_.src,u64_timestamp:this.player.startTime,u32_link_type:1,u32_channel_type:1,str_app_version:"",platform:3,uint32_platform:3,str_browser_version:this.getBrowserVer(),str_browser_model:this.getBrowser(),str_user_agent:USER_AGENT,u32_video_drop:"",u32_drop_usage:"",float64_rtt:""},this.features=[],this.afterCanplay=!1,this.videoDuration=0,this.consumeDuration=0,this.playScene=1,this.timing={},this.playStatus={isFirstPlay:!1,pauseDuration:0},this.contentComputTimePoint=[],this.firstFrameDuration=0,this.firstIFrameDuration=0,this.blockInterval=5e3,this.bufferBlock=[],this.u32_drm_type="plain",this.resetLagStatus(),this.resetBlockData()},e.prototype.getComsumeDuration=function(t){var e=getTimeStamp()-this.timing.firstPlaying;this.consumeDuration=e-this.lagStatus.lagDuration-this.playStatus.pauseDuration,t&&this.consumeDuration<0&&(this.consumeDuration=e>0?e:0)},e.prototype.registerListener=function(){var t=this.player;t.on("loadedmetadata",videojs.bind(this,this.onLoadedmetadata)),t.one("canplay",videojs.bind(this,this.oneCanplay)),t.one("play",videojs.bind(this,this.onePlay)),t.on("play",videojs.bind(this,this.onPlay)),t.on("playing",videojs.bind(this,this.onPlaying)),t.on("seeking",videojs.bind(this,this.onSeeking)),t.on("seeked",videojs.bind(this,this.onSeeked)),t.on("error",videojs.bind(this,this.onError)),t.on("resolutionswitching",videojs.bind(this,this.onResolutionSwitching)),t.on("pause",videojs.bind(this,this.onPause)),t.on("playcgiend",videojs.bind(this,this.onPlaycgiend)),t.on("ended",videojs.bind(this,this.onEnded)),t.on("feature",videojs.bind(this,this.onFeature)),t.on("dispose",videojs.bind(this,this.onDispose)),document.addEventListener("visibilitychange",videojs.bind(this,this.onVisibilityChange)),window.addEventListener("pagehide",videojs.bind(this,this.onPageHide))},e.prototype.onPageHide=function(){this.saveData()},e.prototype.onVisibilityChange=function(){"hidden"===document.visibilityState&&this.saveData()},e.prototype.saveData=function(){this.bytes_token&&3!==this.playScene&&this.player&&(this.getComsumeDuration(),this.report(2===this.playScene?40304:40102,{},function(t){localStorage.setItem("tcplayer_data",JSON.stringify(t))}))},e.prototype.onLoadedmetadata=function(){this.player.tech_.webrtcProvider?this.playScene=3:this.playScene=this.player.duration()===Infinity?1:2,this.videoDuration=parseInt(this.player.duration())||0,videojs.bind(this,this.calculateFirstFrameDuration)(),2===this.playScene&&this.report(40303)},e.prototype.oneCanplay=function(){videojs.bind(this,this.calculateFirstFrameDuration)(),1===this.playScene&&this.report(40101)},e.prototype.calculateFirstFrameDuration=function(){var t=getperformance();t.mark&&t.measure&&t.getEntriesByName&&(t.mark("firstIFrameEnd"),t.measure("firstIFrame","firstFrameStart","firstIFrameEnd"),this.firstIFrameDuration=t.getEntriesByName("firstIFrame")[0].duration)},e.prototype.onePlay=function(){var t=this;this.setTimingData({firstPlay:getTimeStamp()});var e=this.player.el_.firstChild;this.bufferStart=e&&e.buffered&&e.buffered.length>0?e.buffered.start(e.buffered.length-1):0,this.bufferBlock=[this.bufferStart];var n=this.player.getVideoPlaybackQuality();this.recvFrames=n.totalVideoFrames,this.renderedFrames=n.totalVideoFrames-n.droppedVideoFrames,this.blockStartTime=getTimeStamp(),this.blockTimer=setInterval(function(){if(2===t.playScene)return!1;if(t.lagStatus.lagging&&t.lagStatus.lagStart){var n=getTimeStamp()-t.lagStatus.lagStart;n>t.blockInterval?t.blockData.lagBlockDuration=t.blockInterval:t.blockData.lagBlockDuration+=n}t.blockStartTime=getTimeStamp();var r=e&&e.buffered&&e.buffered.length>0?e.buffered.end(e.buffered.length-1):0,i=t.player.getVideoPlaybackQuality(),o=i.totalVideoFrames,s=i.totalVideoFrames-i.droppedVideoFrames;Object.assign(t.blockData,{buffer_avg:parseInt(1e3*(r-t.bufferStart)),recv_frames:o-t.recvFrames,render_frames:s-t.renderedFrames}),t.bufferBlock.push(t.blockData.buffer_avg),t.bufferStart=r,t.recvFrames=o,t.renderedFrames=s,t.report(40100)},this.blockInterval)},e.prototype.onDispose=function(){clearInterval(this.blockTimer)},e.prototype.onPlay=function(){this.playStatus.pauseTime&&(this.playStatus.pauseDuration=this.playStatus.pauseDuration+getTimeStamp()-this.playStatus.pauseTime,this.playStatus.pauseTime=0)},e.prototype.onPlaying=function(){var t=this;if(!this.playStatus.isFirstPlay&&(this.playStatus.isFirstPlay=!0,this.setTimingData({firstPlaying:getTimeStamp()}),this.player.on("waiting",function(){t.lagStatus.lagging||t.player.seeking()||t.lagStatus.skip||(t.lagStatus.lagging=!0,t.lagStatus.lagStart=getTimeStamp())}),this.player.currentSource().keySystems)){var e=this.player.currentSource().keySystems;e.plain&&(this.u32_drm_type="plain"),e.SimpleAES&&(this.u32_drm_type="SimpleAES")}this.lagStatus.lagging&&(this.lagStatus.lagEnd=getTimeStamp())-this.lagStatus.lagStart>this.lagStatus.lagInterval&&(this.lagStatus.lagging=!1,this.lagStatus.lagCount++,this.lagStatus.lagAvg.push(this.lagStatus.lagEnd-this.lagStatus.lagStart),this.lagStatus.lagDuration+=this.lagStatus.lagEnd-this.lagStatus.lagStart,this.lagStatus.lagStart<this.blockStartTime&&(this.blockData.lagBlockDuration=this.lagStatus.lagEnd-this.blockStartTime),this.lagStatus.lagStart>=this.blockStartTime&&(this.blockData.lagBlockDuration+=this.lagStatus.lagEnd-this.lagStatus.lagStart),this.lagStatus.lagEnd=this.lagStatus.lagStart=0,this.lagStatus.isFirstLag||(this.lagStatus.isFirstLag=!0,this.setTimingData({firstLag:getTimeStamp()}))),[60,200,500,1e3].forEach(function(e){t.lagStatus.lagging&&(t.lagStatus.lagEnd=getTimeStamp())-t.lagStatus.lagStart>e&&t.blockData["lagCount_"+e]++}),this.lagStatus.skip=!1},e.prototype.onSeeking=function(){this.contentComputTimePoint.push({type:"end",time:this.player.currentTime()})},e.prototype.onSeeked=function(){this.contentComputTimePoint.push({type:"start",time:this.player.currentTime()})},e.prototype.onError=function(t){this.getComsumeDuration(!0);var e={u64_err_code:t.data.code,str_err_info:t.data.message||(defaults$1.errors[t.data.code]||{}).message},n=(this.player.cache_.src||"").indexOf("vod")>-1||this.player.options_.fileID;t&&t.data&&t.data.code&&(2===this.playScene&&n?this.report(40304,e):this.afterCanplay?this.report(40102,e):this.report(40101,e))},e.prototype.onResolutionSwitching=function(){this.lagStatus.skip=!0},e.prototype.onPause=function(){this.playStatus.pauseTime=getTimeStamp(),this.lagStatus.lagging&&(this.lagStatus.skip=!0)},e.prototype.onPlaycgiend=function(t){var e=this,n=t.data;n.result&&0==n.result.code&&(this.playStatus.requestID=n.result.requestId,setTimeout(function(){if(e.player.currentSources().length>0&&e.player.currentSources()[0].keySystems){var t=e.player.currentSources()[0].keySystems;t["com.widevine.alpha"]&&e.reportMTA("drm",{initialized:"Widevine"}),t["com.apple.fps.1_0"]&&e.reportMTA("drm",{initialized:"FairPlay"})}else e.player.options_.plugins.DRM&&e.player.options_.plugins.DRM.token&&e.reportMTA("drm",{initialized:"SimpleAES"})},0)),this.setTimingData({cgiStart:t.data.startTime,cgiEnd:t.data.time})},e.prototype.onEnded=function(){this.getComsumeDuration(),1===this.playScene?this.report(40102):this.report(40304)},e.prototype.onFeature=function(t){-1==this.features.indexOf(t.data)&&this.features.push(t.data)},e.prototype.guid=function(t){var e=localStorage.getItem(t);return e||(e=guid(),localStorage.setItem(t,e)),e},e.prototype.report=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=arguments[2];if(3===this.playScene)return!1;t&&this["report_"+t](e,n)},e.prototype.report_40101=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(!this.player)return!1;if(3===this.playScene&&!t.fromTxliveplayer)return!1;var e={uint64_data_time:getTimeStampBySecond(),str_stream_url:this.player.cache_.src,u64_timestamp:this.player.startTime,u32_dns_time:"",u32_connect_server_time:parseInt(this.firstFrameDuration),u32_video_decode_type:0,u32_first_frame_down:parseInt(this.firstFrameDuration),u32_first_video_decode_time:parseInt(this.firstIFrameDuration),u32_first_i_frame:parseInt(this.firstIFrameDuration),u32_first_audio_frame_down:parseInt(this.firstFrameDuration),u32_first_audio_render_time:parseInt(this.firstIFrameDuration),u64_err_code:t.u64_err_code||"",str_err_info:t.str_err_info||""},n={app_id:0,data:[Object.assign({},this.liveBaseData,e,t)],module_id:1005,command:40101};Reporter.reportPlayMetrics(n)},e.prototype.report_40100=function(t){var e=this;if(3===this.playScene&&!t.fromTxliveplayer)return!1;var n=this.player||{};this.blockData=this.blockData||{};var r={u32_cpu_usage:"",u32_app_cpu_usage:"",u32_avg_memory:"",u32_avg_cpu_usage:"",str_stream_url:n.cache_&&n.cache_.src,uint64_data_time:getTimeStampBySecond(),u32_recv_av_diff_time:0,u32_play_av_diff_time:0,u64_playtime:getTimeStamp()-this.timing.firstPlaying,u32_audio_decode_type:2,u32_audio_block_count:this.blockData.lagCount_500,u32_audio_cache_time:this.blockData.buffer_avg,u32_audio_drop:"",u32_video_decode_type:0,u32_video_recv_fps:this.blockData.recv_frames,u32_fps:this.blockData.render_frames,u32_video_cache_time:this.blockData.buffer_avg,u32_avg_cache_count:0,u32_video_block_count:this.blockData.lagCount_1000,u32_avg_net_speed:"",u32_video_light_block_count:this.blockData.lagCount_200,u32_video_large_block_count:this.blockData.lagCount_500,u32_audio_jitter_60ms_count:this.blockData.lagCount_60,u32_video_decode_fail:"",u32_audio_decode_fail:"",u32_avg_video_bitrate:0,u32_avg_audio_bitrate:0,u32_block_usage:1e3*parseInt(this.blockData.lagBlockDuration/this.blockInterval)},i={app_id:0,data:[Object.assign({},this.liveBaseData,r,t)],module_id:1005,command:40100};Reporter.reportPlayMetrics(i,function(){e.resetBlockData()})},e.prototype.report_40102=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1];if(3===this.playScene&&!e.fromTxliveplayer)return!1;var r=this.player||{},i=0,o=0,s=0;if("{}"!==JSON.stringify(r)){i=this.lagStatus.lagAvg.length>0?this.lagStatus.lagAvg.reduce(function(t,e){return t+e},0)/this.lagStatus.lagAvg.length:0,o=this.bufferBlock.length>0?this.bufferBlock.reduce(function(t,e){return t+e},0)/this.bufferBlock.length:0;s=(r.getVideoPlaybackQuality&&r.getVideoPlaybackQuality()||{}).totalVideoFrames/e.duration}else this.resetLagStatus();var a={uint64_data_time:getTimeStampBySecond(),str_stream_url:r.cache_&&r.cache_.src,u64_timestamp:getTimeStamp(),u32_avg_cpu_usage:"",u32_avg_memory:"",u64_begin_timestamp:r.startTime,u32_result:this.consumeDuration,u64_err_code:e.u64_err_code,u32_speed_cnt:0,u32_avg_cache_time:o,u32_max_load:Math.max.apply(Math,this.lagStatus.lagAvg),u32_audio_block_time:this.lagStatus.lagDuration,u32_avg_load:i,u32_load_cnt:this.lagStatus.lagAvg.length||0,u32_nodata_cnt:this.lagStatus.lagAvg.length||0,u32_first_i_frame:this.firstIFrameDuration,u32_video_width:r.width_,u32_video_height:r.height_,u32_video_avg_fps:s,u32_avg_block_time:i,u64_block_count:this.lagStatus.lagAvg.length||0,u32_video_block_time:this.lagStatus.lagDuration,u64_jitter_cache_max:0,u64_block_duration_max:Math.max.apply(Math,this.lagStatus.lagAvg),u64_jitter_cache_avg:0,u32_ip_count_quic:"",u32_connect_count_quic:"",u32_connect_count_tcp:"",u32_is_real_time:"",u32_first_frame_black:"",u32_delay_report:0},l={app_id:0,data:[Object.assign({},this.liveBaseData,a,e)],module_id:1005,command:40102};return e.u32_delay_report?(localStorage.setItem("tcplayer_data",JSON.stringify(l)),!1):n?(l.data.u32_delay_report=1,n(l)):void Reporter.reportPlayMetrics(l,function(){t.bytes_token=null,localStorage.removeItem("tcplayer_data")})},e.prototype.report_40303=function(){this.setTimingData({initEnd:getTimeStamp()});var t={msg_client_ip:{uint32_ip:""},uint32_service:this.playScene,uint64_data_time:getTimeStampBySecond(),str_stream_url:this.player.cache_.src,uint32_command:40303,u32_app_id:String(this.player.options_.appID),str_fileid:String(this.player.options_.fileID)},e={app_id:0,data:[Object.assign({},this.vodBaseData,t)],module_id:1011,command:40303};Reporter.reportPlayMetrics(e)},e.prototype.report_40304=function(){var t=this,e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=arguments[1],r=this.lagStatus.lagAvg.length>0?this.lagStatus.lagAvg.reduce(function(t,e){return t+e},0)/this.lagStatus.lagAvg.length:0,i={u32_app_id:String(this.player.options_.appID),str_fileid:String(this.player.options_.fileID),uint64_data_time:getTimeStampBySecond(),uint32_command:40304,str_stream_url:this.player.cache_.src,u32_timeuse:String(parseInt(this.consumeDuration/1e3)||0),u32_videotime:String(this.videoDuration),u32_avg_load:String(r),u32_load_cnt:String(this.lagStatus.lagCount),u32_max_load:this.lagStatus.lagAvg.length>0?String(Math.max.apply(Math,this.lagStatus.lagAvg)):String(0),u32_avg_block_time:String(this.lagStatus.lagDuration),u32_player_type:String(4),u32_dns_time:"",u32_tcp_did_connect:"",u32_first_video_packet:String(parseInt(this.firstFrameDuration)),u32_first_i_frame:String(parseInt(this.firstIFrameDuration)),u32_server_ip:"",u32_drm_type:this.u32_drm_type,u32_playmode:String(1),u64_err_code:String(e.u64_err_code||""),str_err_info:String(e.str_err_info||""),u32_video_decode_type:String(0),u32_speed:this.player&&String(100*this.player.playbackRate())||"1000"},o={app_id:0,data:[Object.assign({},this.vodBaseData,i)],module_id:1011,command:40304};if(n)return n(o);Reporter.reportPlayMetrics(o,function(){t.bytes_token=null,localStorage.removeItem("tcplayer_data")})},e.prototype.setTimingData=function(t){this.timing=videojs.mergeOptions(this.timing,t)},e.prototype.reset=function(){this.playStatus={isFirstPlay:!1}},e.prototype.resetLagStatus=function(){this.lagStatus={lagCount:0,lagging:!1,lagStart:0,lagEnd:0,lagInterval:500,lagDuration:0,lagAvg:[],isFirstLag:!1,skip:!1}},e.prototype.resetBlockData=function(){this.blockData={lagCount_60:0,lagCount_200:0,lagCount_500:0,lagCount_1000:0,lagBlockDuration:0,buffer_avg:0,recv_frames:0,render_frames:0}},e.prototype.reportMTA=function(t,e){},e.prototype.getSystem=function(){return IS_IOS?"ios":IS_ANDROID?"android":IS_WIN?"win":IS_MAC?"mac":"other"},e.prototype.getSystemVer=function(){var t=this.getSystem();return"ios"==t?IOS_VERSION:"android"==t?ANDROID_VERSION:"win"==t?WIN_VER:"mac"==t?MAC_VER:void 0},e.prototype.getBrowser=function(){return IS_FIREFOX?"firefox":IS_EDGE?"edge":IS_MQQB?"mqq":IS_QQB?"qq":IS_TBS?"tbs":IS_CHROME?"chrome":IE_VERSION?"ie":IS_SAFARI?"safari":"other"},e.prototype.getBrowserVer=function(){var t=this.getBrowser();return"firefox"==t?FIREFOX_VER:"edge"==t?EDGE_VER:"chrome"==t?CHROME_VER:"ie"==t?IE_VERSION:"safari"==t?SAFARI_VER:"qq"==t||"mqq"==t?QQ_VER:"tbs"==t?TBS_VERSION:"other"},e.prototype.getDevice=function(){return IS_IOS?"IPHONE":IS_HUAWEI?"HUAWEI":IS_XIAOMI?"XIAOMI":IS_OPPO?"OPPO":IS_VIVO?"VIVO":IS_SX?"SUMSUNG":IS_CP?"COOLPAD":IS_ONE?"ONEPLUS":IS_ZX?"ZTE":"OTHER"},e.prototype.getMediaType=function(){return this.player.src()&&/\/(.+)\.(.+)\?|\/(.+)\.(.+)/.test(this.player.src()),RegExp.$2||RegExp.$4},
20
- e.prototype.getNetworkType=function(){var t=navigator.userAgent,e=t.match(/NetType\/\w+/)?t.match(/NetType\/\w+/)[0]:"NetType/other";e=e.toLowerCase().replace("nettype/","");var n;switch(e){case"wifi":n="1";break;case"4g":n="2";break;case"3g":case"3gnet":n="3";break;case"2g":n="4";break;default:n="0xFF"}return n},e}(Plugin$14);videojs.registerPlugin("PlayerMetrics",PlayerMetrics);var Plugin$15=videojs.getPlugin("plugin"),log$13=videojs.log,ProgressMarker=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return n.ready(videojs.bind(i,i.init)),i}return inherits(e,t),e.prototype.init=function(){var t=this.player;if(t.options_.dots){var e=function r(){Array.isArray(t.options_.dots)&&t.options_.dots.length>0&&(t.options_.dots.forEach(function(e){!e.emitted&&e.timeOffset-1e3*(t.currentTime()||0)<500&&(e.emitted=!0,t.trigger("marker",e.content))}),t.options_.dots[t.options_.dots.length-1].emitted||window.requestAnimationFrame(r))};window.requestAnimationFrame(e)}if(IS_IOS||IS_ANDROID)return!1;if(!t.controlBar||!this.player.controlBar.progressControl)return void log$13("ProgressMarker can not initialize without control bar or progress control");log$13("ProgressMarker initializing");var n=t.controlBar.getChild("ProgressControl").getChild("SeekBar");n.getChild("ProgressMarkerGenerator")&&n.removeChild("ProgressMarkerGenerator"),t.options_.plugins.ProgressMarker&&(n.addChild("ProgressMarkerGenerator"),log$13("ProgressMarker initialized"),t.trigger({type:"feature",data:"marker"}))},e}(Plugin$15);videojs.registerPlugin("ProgressMarker",ProgressMarker);var Component$16=videojs.getComponent("Component"),PlayListItem=function(t){function e(n,r){return classCallCheck(this,e),possibleConstructorReturn(this,t.call(this,n,r))}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_,e=videojs.dom.createEl("div",{className:"tcp-playlist-item"}),n=videojs.dom.createEl("div",{className:"tcp-playlist-item-video",innerHTML:t.img?'<img src="'+t.img+'" class="tcp-playlist-item-img">':'<img src="https://imgcache.qq.com/open_proj/proj_qcloud_v2/mc_2014/video/console/v2/css/img/vod/default-cover.png" height="100" class="tcp-playlist-item-img">'}),r=videojs.dom.createEl("div",{className:"tcp-playlist-item-duration",textContent:this.timeFormat(t.duration)});n.appendChild(r);var i=videojs.dom.createEl("div",{className:"tcp-playlist-item-desc",textContent:t.text});return e.appendChild(n),e.appendChild(i),this.bindEvent(e),e},e.prototype.bindEvent=function(t){var e=this;videojs.on(t,["click"],function(){e.player_.trigger({type:"playItem",data:e.options_})})},e.prototype.timeFormat=function(t){var e="",n=Math.floor(t/3600);0!=n&&(t-=3600*n,n<10&&(n="0"+n),e+=n+":");var r=Math.floor(t/60);return r<10&&(r="0"+r),t-=60*r,t<10&&(t="0"+t),e+=r+":"+t},e}(Component$16);videojs.registerComponent("PlayListItem",PlayListItem);var Component$17=videojs.getComponent("Component"),PlayListTitle=function(t){function e(n,r){return classCallCheck(this,e),possibleConstructorReturn(this,t.call(this,n,r))}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_;return videojs.dom.createEl("div",{className:"tcp-playlist-title",textContent:t.title})},e}(Component$17);videojs.registerComponent("PlayListTitle",PlayListTitle);var Component$15=videojs.getComponent("Component"),PlayListBox=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.init(),i.activeIndex=-1,i}return inherits(e,t),e.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-playlist-box"})},e.prototype.init=function(){var t=this,e=this.options_.data;this.addChild("PlayListTitle",{title:this.options_.title}),e.forEach(function(e,n){e.index=n,t.addChild("PlayListItem",e)}),this.player_.on("ready",function(){t.options_.loop&&(t.activeIndex=0,t.player_.on("ended",videojs.bind(t,function(){t.player_.trigger({type:"playItem"})})))}),this.player_.on("playItem",function(n){var r=n.data,i=void 0;t.activeIndex=r?r.index:(t.activeIndex+1)%e.length,i=e[t.activeIndex],t.player_.loadVideoByID({fileID:i.fileID,appID:i.appID,psign:i.psign}),t.player_.one("loadedmetadata",videojs.bind(t,function(){t.player_.play()})),document.querySelectorAll(".tcp-playlist-item").forEach(function(t){videojs.dom.removeClass(t,"tcp-playlist-item-active")});var o=document.querySelectorAll(".tcp-playlist-item")[t.activeIndex];videojs.dom.addClass(o,"tcp-playlist-item-active")})},e}(Component$15);videojs.registerComponent("PlayListBox",PlayListBox);var Component$18=videojs.getComponent("Component"),PlayListToggle=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.status=0,i}return inherits(e,t),e.prototype.createEl=function(){var t=videojs.dom.createEl("div",{className:"tcp-playlist-toggle",textContent:"<"});return this.bindEvent(t),t},e.prototype.bindEvent=function(t){var e=this;videojs.on(t,["click"],function(n){e.status=!e.status;var r=document.querySelector(".tcp-playlist");e.status?(t.textContent=">",videojs.dom.addClass(r,"tcp-playlist-open"),videojs.dom.removeClass(r,"tcp-playlist-close")):(videojs.dom.addClass(r,"tcp-playlist-close"),videojs.dom.removeClass(r,"tcp-playlist-open"),t.textContent="<")})},e}(Component$18);videojs.registerComponent("PlayListToggle",PlayListToggle);var Component$14=videojs.getComponent("Component"),PlayList$1=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.init(),i}return inherits(e,t),e.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-playlist tcp-playlist-close"})},e.prototype.init=function(){this.addChild("PlayListToggle"),this.addChild("PlayListBox",this.options_)},e}(Component$14);videojs.registerComponent("PlayList",PlayList$1);var Button$6=videojs.getComponent("Button"),PlayNextButton=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.addClass(),i}return inherits(e,t),e.prototype.addClass=function(){videojs.dom.addClass(this.el_,"vjs-play-next")},e.prototype.update=function(){},e.prototype.handleClick=function(t){this.player_.trigger({type:"playItem"})},e}(Button$6);PlayNextButton.prototype.controlText_="Play Next",videojs.registerComponent("PlayNextButton",PlayNextButton);var Plugin$16=videojs.getPlugin("plugin"),log$14=videojs.log,PlayList=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return IS_IOS||IS_ANDROID?possibleConstructorReturn(i):(i.options=r,r&&r.data instanceof Array&&r.data.length>0&&n.ready(videojs.bind(i,i.init)),i)}return inherits(e,t),e.prototype.init=function(){log$14("PlayList initializing"),this.player.addChild("PlayList",this.options),this.player.controlBar.addChild("PlayNextButton",{},1),log$14("PlayList initialized"),this.player.trigger({type:"feature",data:"playlist"})},e}(Plugin$16);videojs.registerPlugin("PlayList",PlayList);var Plugin$17=videojs.getPlugin("plugin"),log$15=videojs.log,HLSToken=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return log$15("HLSToken",n,r),i.init(r),i}return inherits(e,t),e.prototype.init=function(t){log$15("HLSToken init",t,this.player);var e=this.player;t.token&&(this.options=t,e.on("playcgiend",videojs.bind(this,function(t){this.modifyData(t.data)})))},e.prototype.modifyData=function(t){var e=this;if(log$15("HLSToken modifyData",t),0===t.result.code){var n=t.result.videoInfo;if(n.masterPlayList){var r=n.masterPlayList.url.split("/");r[r.length-1]="voddrm.token."+this.options.token+"."+r[r.length-1],n.masterPlayList.url=r.join("/")}n.transcodeList&&n.transcodeList.length>0&&(n.transcodeList=n.transcodeList.map(function(t){var n=t.url.split("/");return n[n.length-1]="voddrm.token."+e.options.token+"."+n[n.length-1],t.url=n.join("/"),t}))}},e}(Plugin$17);videojs.registerPlugin("HLSToken",HLSToken);var getMessageContents=function(t){var e=(new window_1.DOMParser).parseFromString(String.fromCharCode.apply(null,new Uint16Array(t)),"application/xml"),n=e.getElementsByTagName("HttpHeaders")[0],r={};if(n)for(var i=n.getElementsByTagName("name"),o=n.getElementsByTagName("value"),s=0;s<i.length;s++)r[i[s].childNodes[0].nodeValue]=o[s].childNodes[0].nodeValue;var a=e.getElementsByTagName("Challenge")[0],l=void 0;return a&&(l=window_1.atob(a.childNodes[0].nodeValue)),{headers:r,message:l}},requestPlayreadyLicense=function(t,e,n){var r=getMessageContents(e),i=r.headers,o=r.message;videojs.xhr({uri:t,method:"post",headers:i,body:o,responseType:"arraybuffer"},n)},getSupportedKeySystem=function(t){var e=void 0;return Object.keys(t).forEach(function(n){var r={},i=t[n].audioContentType,o=t[n].videoContentType;i&&(r.audioCapabilities=[{contentType:i}]),o&&(r.videoCapabilities=[{contentType:o}]),e=e?e["catch"](function(t){return window_1.navigator.requestMediaKeySystemAccess(n,[r])}):window_1.navigator.requestMediaKeySystemAccess(n,[r])}),e},makeNewRequest=function(t){var e=t.mediaKeys,n=t.initDataType,r=t.initData,i=t.options,o=t.getLicense,s=t.removeSession,a=t.eventBus,l=e.createSession();l.addEventListener("message",function(t){o(i,t.message).then(function(t){return l.update(t)})["catch"](videojs.log.error.bind(videojs.log.error,"failed to get and set license"))},!1),l.addEventListener("keystatuseschange",function(t){var e=!1;l.keyStatuses.forEach(function(n,r){switch(a.trigger({keyId:r,status:n,target:l,type:"keystatuschange"}),n){case"expired":e=!0;break;case"internal-error":videojs.log.warn('Key status reported as "internal-error." Leaving the session open since we don\'t have enough details to know if this error is fatal.',t)}}),e&&l.close().then(function(){s(r)})},!1),l.generateRequest(n,r)["catch"](videojs.log.error.bind(videojs.log.error,"Unable to create or initialize key session"))},addSession=function(t){var e=t.video,n=t.initDataType,r=t.initData,i=t.options,o=t.getLicense,s=t.removeSession,a=t.eventBus;e.mediaKeysObject?makeNewRequest({mediaKeys:e.mediaKeysObject,initDataType:n,initData:r,options:i,getLicense:o,removeSession:s,eventBus:a}):e.pendingSessionData.push({initDataType:n,initData:r})},setMediaKeys=function(t){var e=t.video,n=t.certificate,r=t.createdMediaKeys,i=t.options,o=t.getLicense,s=t.removeSession,a=t.eventBus;e.mediaKeysObject=r,n&&r.setServerCertificate(n);for(var l=0;l<e.pendingSessionData.length;l++){var c=e.pendingSessionData[l];makeNewRequest({mediaKeys:e.mediaKeysObject,initDataType:c.initDataType,initData:c.initData,options:i,getLicense:o,removeSession:s,eventBus:a})}return e.pendingSessionData=[],e.setMediaKeys(r)},defaultPlayreadyGetLicense=function(t){return function(e,n,r){requestPlayreadyLicense(t,n,function(t,e,n){if(t)return void r(t);r(null,n)})}},defaultGetLicense=function(t){return function(e,n,r){videojs.xhr({uri:t,method:"POST",responseType:"arraybuffer",body:n,headers:{"Content-type":"application/octet-stream"}},function(t,e,n){if(t)return void r(t);r(null,n)})}},promisifyGetLicense=function(t,e){return function(n,r){return new Promise(function(i,o){t(n,r,function(t,n){e&&e.trigger("licenserequestattempted"),t&&o(t),i(n)})})}},standardizeKeySystemOptions=function(t,e){if("string"==typeof e&&(e={url:e}),!e.url&&!e.getLicense)throw new Error("Neither URL nor getLicense function provided to get license");return e.url&&!e.getLicense&&(e.getLicense="com.microsoft.playready"===t?defaultPlayreadyGetLicense(e.url):defaultGetLicense(e.url)),e},standard5July2016=function(t){var e=t.video,n=t.initDataType,r=t.initData,i=t.options,o=t.removeSession,s=t.eventBus,a=Promise.resolve();if("undefined"==typeof e.mediaKeysObject){e.mediaKeysObject=null,e.pendingSessionData=[];var l=void 0,c=void 0;if(!(a=getSupportedKeySystem(i.keySystems)))return videojs.log.error("No supported key system found"),Promise.resolve();a=a.then(function(t){return new Promise(function(n,r){if(e.keySystem=t.keySystem,c=standardizeKeySystemOptions(t.keySystem,i.keySystems[t.keySystem]),!c.getCertificate)return void n(t);c.getCertificate(i,function(e,i){if(e)return void r(e);l=i,n(t)})})}).then(function(t){return t.createMediaKeys()}).then(function(t){return setMediaKeys({video:e,certificate:l,createdMediaKeys:t,options:i,getLicense:promisifyGetLicense(c.getLicense,s),removeSession:o,eventBus:s})})["catch"](videojs.log.error.bind(videojs.log.error,"Failed to create and initialize a MediaKeys object"))}return a.then(function(){addSession({video:e,initDataType:n,initData:r,options:i,getLicense:e.keySystem?promisifyGetLicense(standardizeKeySystemOptions(e.keySystem,i.keySystems[e.keySystem]).getLicense,s):null,removeSession:o,eventBus:s})})},stringToUint16Array=function(t){for(var e=new ArrayBuffer(2*t.length),n=new Uint16Array(e),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n},uint8ArrayToString=function(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))},getHostnameFromUri=function(t){var e=document_1.createElement("a");return t=t.match(/.*(skd\:\/\/.+)/i)[1],e.href=t,e.hostname},arrayBuffersEqual=function(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(var n=new DataView(t),r=new DataView(e),i=0;i<n.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0},arrayBufferFrom=function(t){return t instanceof Uint8Array||t instanceof Uint16Array?t.buffer:t},FAIRPLAY_KEY_SYSTEM="com.apple.fps.1_0",concatInitDataIdAndCertificate=function(t){var e=t.initData,n=t.id,r=t.cert;"string"==typeof n&&(n=stringToUint16Array(n));var i=0,o=new ArrayBuffer(e.byteLength+4+n.byteLength+4+r.byteLength),s=new DataView(o);new Uint8Array(o,i,e.byteLength).set(e),i+=e.byteLength,s.setUint32(i,n.byteLength,!0),i+=4;var a=new Uint16Array(o,i,n.length);return a.set(n),i+=a.byteLength,s.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(o,i,r.byteLength).set(r),new Uint8Array(o,0,o.byteLength)},addKey=function(t){var e=t.video,n=t.contentId,r=t.initData,i=t.cert,o=t.options,s=t.getLicense,a=t.eventBus;return new Promise(function(t,l){if(e.webkitKeys||e.webkitSetMediaKeys(new window_1.WebKitMediaKeys(FAIRPLAY_KEY_SYSTEM)),!e.webkitKeys)return void l("Could not create MediaKeys");var c=e.webkitKeys.createSession("video/mp4",concatInitDataIdAndCertificate({id:n,initData:r,cert:i}));if(!c)return void l("Could not create key session");c.contentId=n,c.addEventListener("webkitkeymessage",function(t){s(o,n,t,function(t,e){if(a&&a.trigger("licenserequestattempted"),t)return void l(t);c.update(new Uint8Array(e))})}),c.addEventListener("webkitkeyadded",function(e){t(e)}),c.addEventListener("webkitkeyerror",function(t){l(t)})})},defaultGetCertificate=function(t){return function(e,n){videojs.xhr({uri:t,responseType:"arraybuffer"},function(t,e,r){if(t)return void n(t);n(null,new Uint8Array(r))})}},defaultGetContentId=function(t,e){return getHostnameFromUri(uint8ArrayToString(e))},defaultGetLicense$1=function(t){return function(e,n,r,i){videojs.xhr({uri:t,method:"POST",responseType:"arraybuffer",body:r.message,headers:{"Content-type":"application/x-www-form-urlencoded"}},function(t,e,n){if(t)return void i(t);i(null,n)})}},fairplay=function(t){var e=t.video,n=t.initData,r=t.options,i=t.eventBus,o=r.keySystems[FAIRPLAY_KEY_SYSTEM],s=o.getCertificate||defaultGetCertificate(o.certificateUri),a=o.getContentId||defaultGetContentId,l=o.getLicense||defaultGetLicense$1(o.licenseUri);return new Promise(function(t,e){s(r,function(n,r){if(n)return void e(n);t(r)})}).then(function(t){return addKey({video:e,cert:t,initData:n,getLicense:l,options:r,contentId:a(r,n),eventBus:i})})["catch"](function(t){i.player_.error({code:3,message:t})})},PLAYREADY_KEY_SYSTEM="com.microsoft.playready",addKeyToSession=function(t,e,n,r){var i=t.keySystems[PLAYREADY_KEY_SYSTEM];if("function"==typeof i.getKey)return void i.getKey(t,n.destinationURL,n.message.buffer,function(t,n){if(t)return void videojs.log.error("Unable to get key: "+t);e.update(n)});"string"==typeof i&&(i={url:i});var o=i.url||n.destinationURL;requestPlayreadyLicense(o,n.message.buffer,function(t,n){if(r&&r.trigger("licenserequestattempted"),t)return void videojs.log.error("Unable to request key from url: "+o);e.update(new Uint8Array(n.body))})},createSession=function(t,e,n,r){var i=t.msKeys.createSession("video/mp4",e);if(!i)return void videojs.log.error("Could not create key session.");i.addEventListener("mskeymessage",function(t){addKeyToSession(n,i,t,r)}),i.addEventListener("mskeyerror",function(t){videojs.log.error("Unexpected key error from key session with code: "+i.error.code+" and systemCode: "+i.error.systemCode)})},msPrefixed=function(t){var e=t.video,n=t.initData,r=t.options,i=t.eventBus;e.msKeys&&delete e.msKeys;try{e.msSetMediaKeys(new window_1.MSMediaKeys(PLAYREADY_KEY_SYSTEM))}catch(o){return void videojs.log.error("Unable to create media keys for PlayReady key system. Error: "+o.message)}createSession(e,n,r,i)},Plugin$18=videojs.getPlugin("plugin"),hasSession=function(t,e){for(var n=0;n<t.length;n++)if(t[n].initData){var r=arrayBufferFrom(t[n].initData),i=arrayBufferFrom(e);if(arrayBuffersEqual(r,i))return!0}return!1},removeSession=function(t,e){for(var n=0;n<t.length;n++)if(t[n].initData===e)return void t.splice(n,1)},handleEncryptedEvent=function(t,e,n,r){if(!e||!e.keySystems||e.src&&e.src.indexOf("m3u8")>-1)return Promise.resolve();var i=t.initData;return getSupportedKeySystem(e.keySystems).then(function(o){var s=o.keySystem;if(e.keySystems[s]&&e.keySystems[s].pssh&&(i=e.keySystems[s].pssh),!hasSession(n,i)&&i)return n.push({initData:i}),standard5July2016({video:t.target,initDataType:t.initDataType,initData:i,options:e,removeSession:removeSession.bind(null,n),eventBus:r})})},handleWebKitNeedKeyEvent=function(t,e,n){if(e.keySystems&&e.keySystems[FAIRPLAY_KEY_SYSTEM]&&t.initData)return fairplay({video:t.target,initData:t.initData,options:e,eventBus:n})},handleMsNeedKeyEvent=function(t,e,n,r){if(e.keySystems&&e.keySystems[PLAYREADY_KEY_SYSTEM]&&!n.reduce(function(t,e){return t||e.playready},!1)){var i=t.initData;e.keySystems[PLAYREADY_KEY_SYSTEM]&&e.keySystems[PLAYREADY_KEY_SYSTEM].pssh&&(i=e.keySystems[PLAYREADY_KEY_SYSTEM].pssh),i&&(n.push({playready:!0,initData:i}),msPrefixed({video:t.target,initData:i,options:e,eventBus:r}))}},getOptions=function(t){return videojs.mergeOptions(t.currentSource(),t.eme.options)},setupSessions=function(t){var e=t.src();e!==t.eme.activeSrc&&(t.eme.activeSrc=e,t.eme.sessions=[])},onPlayerReady=function(t){"video"===t.$(".vjs-tech").tagName.toLowerCase()&&t.tech_&&(setupSessions(t),t.tech_.el_.addEventListener("encrypted",function(e){if(t.currentSource().keySystems&&t.currentSource().keySystems["com.widevine.alpha"]&&"application/dash+xml"===t.currentSource().type)return!1;setupSessions(t),handleEncryptedEvent(e,getOptions(t),t.eme.sessions,t.tech_)}),t.tech_.el_.addEventListener("webkitneedkey",function(e){setupSessions(t),handleWebKitNeedKeyEvent(e,getOptions(t),t.tech_)}),videojs.browser.IS_EDGE||t.tech_.el_.addEventListener("msneedkey",function(e){setupSessions(t),handleMsNeedKeyEvent(e,getOptions(t),t.eme.sessions,t.tech_)}))},DRM=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,n.ready(function(){return onPlayerReady(n)}),n.eme={initializeMediaKeys:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){},i=videojs.mergeOptions(n.currentSource(),r,t),o={initDataType:"cenc",initData:null,target:n.tech_.el_};setupSessions(n),n.tech_.el_.setMediaKeys?handleEncryptedEvent(o,i,n.eme.sessions,n.tech_).then(function(){return e()})["catch"](function(t){return e(t)}):n.tech_.el_.msSetMediaKeys&&(handleMsNeedKeyEvent(o,i,n.eme.sessions,n.tech_),e())},options:r},i}return inherits(e,t),e.prototype.setOptions=function(t){this.options=t,this.player.options_.plugins.DRM=t},e}(Plugin$18),registerPlugin$2=videojs.registerPlugin||videojs.plugin;registerPlugin$2("DRM",DRM);var Plugin$19=videojs.getPlugin("plugin"),PDT=function(t){function e(n){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n));return n.plugins=n.plugins||{},n.plugins.pdt=!0,r}return inherits(e,t),e}(Plugin$19);videojs.registerPlugin("PDT",PDT);var Plugin$20=videojs.getPlugin("plugin"),dom$2=videojs.dom;if(!window.requestAnimationFrame){var lastTime=0;window.requestAnimationFrame=function(t){var e=(new Date).getTime(),n=Math.max(0,16.7-(e-lastTime)),r=window.setTimeout(function(){t(e+n)},n);return lastTime=e+n,r}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)});var DynamicWatermark=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r||{},i.content=i.options.content,i.options.content&&i.init(),i}return inherits(e,t),e.prototype.dispose=function(){this.stopAnimation(),this.player.$(".tcp-dynamic-watermark-container")&&this.player.el().removeChild(this.containerElement),t.prototype.dispose.call(this)},e.prototype.init=function(){var t=this,e=this.player;this.isFirstShow=!0,this.initUI(),this.initStyle(),this.initSpeed(),e.on("canplay",function(){t.calculateStyle(),t.setStyle(),dom$2.removeClass(t.containerElement,"vjs-hidden")}),e.one("play",function(){t.encModule=new Enc,t.ghostCycle=t.encModule.calculateGhost(t.player.duration()),t.startAnimation()}),e.on(["fullscreenchange","playerresize"],function(){setTimeout(function(){t.calculateStyle()},200)})},e.prototype.initUI=function(){var t=this.player,e=dom$2.createEl("div",{className:"tcp-dynamic-watermark-container vjs-hidden"}),n=dom$2.createEl("div",{innerHTML:encodeHTML(this.options.content),className:"tcp-dynamic-watermark-content"});if(e.appendChild(n),!this.options.keep&&this.options.content&&t.el().appendChild(e),this.containerElement=e,this.markContentElement=n,"image"===this.options.type){var r=document.createElement("img");this.options.width&&(r.style.width=this.options.width),this.options.height&&(r.style.height=this.options.height),r.setAttribute("src",this.options.content),this.markContentElement.innerHTML="",this.markContentElement.appendChild(r)}},e.prototype.initStyle=function(){this.style={containerWidth:"",containerHeight:"",containerLeft:"",containerTop:"",contentLeft:80*Math.random(),contentTop:80*Math.random(),margin:0,padding:0,display:"block",visibility:"visible",opacity:.5,position:"absolute",color:"rgba(255, 255, 255)"}},e.prototype.initSpeed=function(){if(this.options.keep&&(!this.options.speed||0===this.options.speed))return this.speed=.2,!1;this.speed=this.options.speed},e.prototype.calculateStyle=function(){var t=this.player,e=this.style,n=t.videoWidth(),r=t.videoHeight(),i=dom$2.getBoundingClientRect(t.el()),o=i.width,s=i.height,a=(o/s).toFixed(2),l=(n/r).toFixed(2),c=void 0,u=void 0;l<a?(u=s,c=u*l):l>a?(c=o,u=c/l):l==a&&(c=o,u=s),e.containerLeft=(o-c)/2/o*100,e.containerTop=(s-u)/2/s*100,e.containerWidth=c/o*100,e.containerHeight=u/s*100},e.prototype.setStyle=function(){var t=this.containerElement,e=this.markContentElement,n=this.style;t.style.left=n.containerLeft+"%",t.style.top=n.containerTop+"%",t.style.width=n.containerWidth+"%",t.style.height=n.containerHeight+"%",t.style.display=e.style.display=n.display,t.style.visibility=e.style.visibility=n.visibility,t.style.opacity=e.style.opacity=n.opacity,t.style.position=e.style.position=n.position,t.style.margin=e.style.margin=n.margin,t.style.padding=e.style.padding=n.padding,e.style.left=this.options.left||n.contentLeft+"%",e.style.top=this.options.top||n.contentTop+"%",this.options.right&&(e.style.right=this.options.right),this.options.bottom&&(e.style.bottom=this.options.bottom),e.style.color=this.options.color||n.color,this.options.keep||(t.style.opacity=e.style.opacity=this.options.opacity||n.opacity),"text"===this.options.type&&(e.style.fontSize=this.options.fontSize||"12px",e.innerHTML=encodeHTML(this.options.content))},e.prototype.setContent=function(t){this.options.content=t},e.prototype.startAnimation=function(){var t=this;if(!this.rafID){var e=(this.player,this.style),n=this.containerElement,r=this.markContentElement,i=1,o=1,s=Math.random(),a=function l(){try{if(!t.isPauseAnimation){var a=Math.min(1,0===t.speed?0:t.speed?t.speed:.2),c=dom$2.getBoundingClientRect(n),u=dom$2.getBoundingClientRect(r),h=u.left-c.left,p=u.top-c.top;h+=a*i*s,p+=a*o*(1-s),h+u.width>c.width?(i=-1,s=Math.random()):h<0&&(i=1,s=Math.random()),p+u.height>c.height?(o=-1,s=Math.random()):p<0&&(o=1,s=Math.random()),h=Math.min(c.width-u.width,h),p=Math.min(c.height-u.height,p),e.contentLeft=h/c.width*100,e.contentTop=p/c.height*100,t.setStyle()}}catch(d){t.player&&t.encModule.handleWatermarkElementAdd(t)}if(t.isStopAnimation)return t.isStopAnimation=!1,cancelAnimationFrame(t.rafID),void(t.rafID=null);0!==t.speed&&requestAnimationFrame(l)};this.rafID=requestAnimationFrame(a)}},e.prototype.resumeAnimation=function(){this.isPauseAnimation=!1},e.prototype.pauseAnimation=function(){this.isPauseAnimation=!0},e.prototype.stopAnimation=function(){this.isStopAnimation=!0},e}(Plugin$20);videojs.registerPlugin("DynamicWatermark",DynamicWatermark);var Plugin$21=videojs.getPlugin("plugin"),XP2PHlsjsPlugin=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,i.hlsp2p=null,i}return inherits(e,t),e.prototype.startHLSP2P=function(t,e,n){var r=this,i=this.player.tech_,o=i.options_,s=o.xp2pConfig;if(e.isSupported()&&!window.hlsp2p){for(var a=["videoType","xp2pPackage","xp2pAppId","tencentCloudAppId"],l=a,c=Array.isArray(l),u=0,l=c?l:l[Symbol.iterator]();;){var h;if(c){if(u>=l.length)break;h=l[u++]}else{if(u=l.next(),u.done)break;h=u.value}var p=h;if(s[p]===undefined)return}var d={videoId:o.playerId+"_html5_api",url:o.source.src,videoType:s.videoType,cloudAppId:s.tencentCloudAppId,domain:s.xp2pPackage,xp2pAppId:s.xp2pAppId,p2pStartDelay:1e3},f=HLSP2P.create(t,Object.assign(d,s));f.on(HLSP2P.Events.Rollback,function(t){r.destroy(),n&&n(t)}),this.hlsp2p=f}},e.prototype.destroy=function(){this.hlsp2p&&(this.hlsp2p.destroy(),this.hlsp2p=null,window.hlsp2p=undefined)},e.prototype.dispose=function(){this.destroy()},e}(Plugin$21);videojs.registerPlugin("XP2PHlsjsPlugin",XP2PHlsjsPlugin);var Plugin$22=videojs.getPlugin("plugin"),XP2PFlvjsPlugin=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,i}return inherits(e,t),e.prototype.createLoader=function(t,e,n){var r=this.player.tech();return function(t){function i(e,n){classCallCheck(this,i);var r=possibleConstructorReturn(this,t.call(this));return r._qvbp2p=null,r._receivedLength=0,r._config=n,r}return inherits(i,t),i.isSupported=function(){return e&&e.isSupported()},i.prototype.destroy=function(){this._destroyQVBP2P(),t.prototype.destroy.call(this)},i.prototype.open=function(t){this._createQVBP2P(),this._qvbp2p.on(e.ComEvents.STATE_CHANGE,this._onQVBP2PStateChange.bind(this)),this._qvbp2p.setMediaElement(r.el());var n={src:t.url};this._qvbp2p.loadSource(n)},i.prototype.abort=function(){this._destroyQVBP2P()},i.prototype._onQVBP2PStateChange=function(t,n){var r=e.ComCodes;switch(n.code){case r.RECEIVE_BUFFER:this._receiveBuffer(n.payload);break;case r.ROLLBACK:this._rollback(n)}},i.prototype._receiveBuffer=function(t){var e=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,e,this._receivedLength)},i.prototype._rollback=function(t){n&&n(t)},i.prototype._createQVBP2P=function(){this._qvbp2p&&this._destroyQVBP2P(),this._qvbp2p=e.create(this._config.xp2pConfig),window.qvbp2p=this._qvbp2p},i.prototype._destroyQVBP2P=function(){this._qvbp2p&&(this._qvbp2p.destroy(),this._qvbp2p=null,window.qvbp2p=null)},i}(t.BaseLoader)},e}(Plugin$22);videojs.registerPlugin("XP2PFlvjsPlugin",XP2PFlvjsPlugin);var defaultConfig$1={enableStashBuffer:!1},Html5FlvJS=function(){function t(e,n,r){var i=this;classCallCheck(this,t);var o=function(){var t=window.flvjs;i.flvjs=t;var o=videojs.mergeOptions(defaultConfig$1,r.flvConfig,{xp2pConfig:r.xp2pConfig}),s=n.player();if(window.QVBP2P&&r.xp2pConfig&&r.xp2pConfig.useXP2P&&s.XP2PFlvjsPlugin){var a=s.XP2PFlvjsPlugin().createLoader(t,window.QVBP2P,function(t){i.dispose(),r.xp2pConfig.useXP2P=!1;var e=i.tech.player(),n=i.tech.currentSource_.src;e.src(n)});i.xp2pFlvLoader=a,o.customLoader=a}var l=new t.createPlayer(Object.assign({isLive:!1,url:e.src,type:"flv"},o),o);i.tech=n,l.on(t.Events.ERROR,videojs.bind(i,i.onError));for(var c in t.Events)!function(e){l.on(t.Events[e],videojs.bind(i,function(t){this.onEvent(e,t)}))}(c);s.trigger({type:"flvInstanceCreated",data:{flv:l}}),l.on(t.Events.STATISTICS_INFO,function(t){var e=(t.bps_audio||0)+(t.bps_video||0);s.trigger({type:"playstatus",data:{type:"flv",decodedFrames:t.decodedFrames,droppedFrames:t.droppedFrames,speed:t.speed.toFixed(0),bitrate:e||0,bpsAudio:t.bps_audio||0,bpsVideo:t.bps_video||0}})}),i.flv=l,i._id=(new Date).getTime(),n.el().srcObject&&(n.el().srcObject=null),l.attachMediaElement(n.el()),l.load()};Promise.all([function(){return r.xp2pConfig&&r.xp2pConfig.useXP2P&&"flv"===r.xp2pConfig.format&&!window.QVBP2P?new Promise(function(t){loadScript(XP2P_FLV_PATH,function(){t()})}):Promise.resolve()}(),function(){return window.flvjs?Promise.resolve():new Promise(function(t){loadScript(FLV_PATH,function(){t()})})}()]).then(function(){o()})}return t.prototype.onError=function(t,e,n){var r=this.tech.player();t===this.flvjs.ErrorTypes.NETWORK_ERROR&&r.error({code:2,source:n}),t===this.flvjs.ErrorTypes.MEDIA_ERROR&&r.error({code:3,source:n})},t.prototype.onEvent=function(t,e){this.tech.player().trigger({type:"FLVJS_EVENT",data:{type:t,data:e}})},t.prototype.dispose=function(){if(this.tech.player().pause(),this.tech.flvProvider)try{this.flv.destroy()}catch(t){}this.tech.flvProvider=null},t}(),flvTypeRE=/^video\/flv$/i,flvExtRE=/.flv(?![^?])/i,flvProtoRE=/^(ws:\/\/)/i,FlvSourceHandler={name:"flvSourceHandler",canHandleSource:function(t){return flvTypeRE.test(t.type)?"probably":flvExtRE.test(t.src)||flvProtoRE.test(t.src)?"maybe":""},handleSource:function(t,e,n){return e.flvProvider&&e.flvProvider.dispose(),e.flvProvider=new Html5FlvJS(t,e,n),e.flvProvider},canPlayType:function(t){if(flvTypeRE.test(t))return"probably"}};TCPlayer.mountFlvProvider=mountFlvProvider,mountFlvProvider();var guid$1=function(t){var e=localStorage.getItem(t);return e||(e=guid(),localStorage.setItem(t,e)),e},bytes_token=guid(),liveBaseData={str_user_id:guid$1("dev_uuid"),dev_uuid:guid$1("dev_uuid"),str_session_id:bytes_token,bytes_token:bytes_token,str_device_type:"",str_package_name:"",str_stream_url:"http://pulldrm.buzzcast.com/live/unknown.m3u8",u32_link_type:1001,u32_channel_type:1,str_app_version:"",platform:3,uint32_platform:3,str_user_agent:USER_AGENT,uint64_data_time:getTimeStampBySecond(),u64_timestamp:getTimeStamp(),u32_avg_cpu_usage:"",u32_avg_memory:"",u64_begin_timestamp:"",u32_result:"",u64_err_code:"",u32_speed_cnt:0,u32_avg_cache_time:"",u32_max_load:"",u32_audio_block_time:"",u32_avg_load:"",u32_load_cnt:0,u32_nodata_cnt:0,u32_first_i_frame:"",u32_video_width:"",u32_video_height:"",u32_video_avg_fps:"",u32_avg_block_time:"",u64_block_count:0,u32_video_block_time:0,u64_jitter_cache_max:0,u64_block_duration_max:0,u64_jitter_cache_avg:0,u32_ip_count_quic:"",u32_connect_count_quic:"",u32_connect_count_tcp:"",u32_is_real_time:"",u32_first_frame_black:"",u32_delay_report:0},reportLog=function(t,e){return!1},defaultConfig$2={connectRetryCount:2,connectTimeout:5,receiveVideo:!0,receiveAudio:!0,showLog:!1},WebRTCProvider=function(){function t(e,n,r){var i=this;classCallCheck(this,t);var o=function(){i.tech=n,i.player=i.tech.player(),i.playerMetrics=i.player.PlayerMetrics(),i.report=i.player.options_.reportable;var t=window.TXLivePlayer;i.TXLivePlayer=t,i.eventStack=[];var o=videojs.mergeOptions(defaultConfig$2,r.webrtcConfig)
21
- ;r.xp2pConfig&&"webrtc"===r.xp2pConfig.format&&r.xp2pConfig.useXP2P&&Object.assign(o,{p2pEnable:r.xp2pConfig.useXP2P,p2pConfig:{cloudAppid:r.xp2pConfig.tencentCloudAppId,xp2pAppid:r.xp2pConfig.xp2pAppId,appKey:r.xp2pConfig.xp2pAppKey,xp2pDomain:r.xp2pConfig.xp2pPackage}});var s=new t;i.webrtcConfig=o,s.setPlayerView(n.el()),s.setConfig(o),s.setPlayListener({onPlayEvent:videojs.bind(i,i.onPlayEvent),onPlayStats:videojs.bind(i,i.onPlayStats),onPlayReport:videojs.bind(i,i.onPlayReport),onPlaySEI:videojs.bind(i,i.onPlaySEI)}),s.startPlay(e.src),i.player.one("playing",function(){0!==i.eventStack.length&&reportLog({str_ext_content:"eventStack on playing: "+JSON.stringify(i.eventStack),str_stream_url:i.player.cache_&&i.player.cache_.src})}),i.player.one("error",function(){0!==i.eventStack.length&&reportLog({str_ext_content:"eventStack on error: "+JSON.stringify(i.eventStack),str_stream_url:i.player.cache_&&i.player.cache_.src})}),i.player.trigger({type:"webrtcInstanceCreated",data:{webrtc:s}}),i.webrtcPlayer=s};window.TXLivePlayer?o():loadScript(WEBRTC_PATH,function(){o()})}return t.prototype.onPlayStats=function(t){this.tech.player().trigger({type:"webrtcstats",data:t})},t.prototype.onPlayEvent=function(t,e){-2003===t?this.eventStack.push({event:t,data:e}):this.eventStack.push({event:t,message:e&&e.message});var n=this.tech.player();if(n.trigger({type:"debug",data:{code:t,data:e}}),1005===t&&n.addClass("vjs-waiting"),t<-2e3){if(-2003===t&&e&&e.videoActive&&(n.trigger("blocked"),n.trigger({type:"webrtcevent",data:{code:2005}})),-2003===t)return!1;if(-2005===t||-2001===t||-2004===t){n.trigger({type:"debug",data:{message:"debug === webrtc 状态码 "+t+",进入降级逻辑"}});var r=n.options_.webrtcConfig;if(!r||!1!==r.fallback)return this.switchPlaySource(),!1}return n.error({code:t,source:e}),!1}n.trigger({type:"webrtcevent",data:{code:t,data:e}})},t.prototype.onPlayReport=function(t){if(!1===this.report)return!1;if(t.fromTxliveplayer=!0,40101===t.uint32_command){this.tech.player().trigger({type:"debug",data:{code:"report",data:t}}),this.playerMetrics.report_40101(t)}40100===t.uint32_command&&this.playerMetrics.report_40100(t),40102===t.uint32_command&&this.playerMetrics.report_40102(t)},t.prototype.onPlaySEI=function(t){this.tech.player().trigger({type:"webrtcsei",data:t})},t.prototype.dispose=function(){this.webrtcPlayer&&(this.webrtcPlayer.setPlayListener({onPlayEvent:function(){},onPlayStats:function(){}}),this.webrtcPlayer.stopPlay(),this.webrtcPlayer.setPlayerView(videojs.dom.createEl("video"))),this.webrtcPlayer=null},t.prototype.setSource=function(t){var e=this;this.webrtcPlayer.startPlay(t.src),this.tech.player().one("webrtcevent",function(t){-1002===t.data.code&&e.tech.player().play()})},t.prototype.recovery=function(){var t=this,e=this.tech.player(),n=void 0;e.one("waiting",function(){n=setTimeout(function(){e.one("webrtcevent",function(n){if(1004===n.data.code){t.webrtcPlayer&&t.webrtcPlayer.startPlay(e.src()),e.play();var r=function i(t){1002===t.data.code&&(e.play(),e.off("webrtcevent",i))};e.on("webrtcevent",r)}}),t.webrtcPlayer&&t.webrtcPlayer.stopPlay()},2e3)}),e.one("playing",function(){n&&clearTimeout(n)})},t.prototype.switchPlaySource=function(){var t=this.tech.player(),e=void 0,n=this.tech.currentSource_.src;e=this.webrtcConfig&&this.webrtcConfig.fallbackUrl?[{src:this.webrtcConfig.fallbackUrl}]:[{src:(this.convertProtocol(n)||[])[0]}],t.trigger({type:"webrtcfallback",data:{target:e[0].src}}),t.options_.autoplay&&(t.bigPlayButton&&t.bigPlayButton.hide(),t.posterImage&&t.posterImage.hide());var r=[];t.options_.hlsConfig&&t.options_.hlsConfig.skipHlsJs?e.forEach(function(t){t.src?r.push({src:t.src,skipHlsJs:!0}):r.push({src:t,skipHlsJs:!0})}):r=[].concat(e),reportLog({str_ext_content:"webrtc fallback: "+JSON.stringify(r),str_stream_url:t.cache_&&t.cache_.src}),t.src(r);var i=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?"loadeddata":"loadedmetadata",o=function s(){t.options_.autoplay&&t.play(),t.one("progress",function(){t.options_.autoplay&&t.play(),t.off(i,s)})};t.on(i,o)},t.prototype.convertProtocol=function(t){var e=[];if(t.indexOf(".sdp")>-1)t=t.replace(".sdp",".flv"),e.push(t.replace(".sdp",".m3u8"));else{var n=t.replace("webrtc://","https://").replace("?",".flv?");-1===n.indexOf("?")&&-1===n.indexOf(".flv")&&(n+=".flv");var r=t.replace("webrtc://","https://").replace("?",".m3u8?");-1===r.indexOf("?")&&-1===r.indexOf(".m3u8")&&(r+=".m3u8"),e.push(r)}return e},t}(),webrtcTypeRE=/^webrtc/i,webrtcExtRE=/\.sdp/i,webrtcProtoRE=/^(webrtc:\/\/)/i,sourceHandler={name:"webrtcSourceHandler",canHandleSource:function(t){return webrtcTypeRE.test(t.type)?"probably":webrtcExtRE.test(t.src)||webrtcProtoRE.test(t.src)?"maybe":""},handleSource:function(t,e,n){return e.webrtcProvider&&e.webrtcProvider.dispose(),e.webrtcProvider=new WebRTCProvider(t,e,n),e.webrtcProvider},canPlayType:function(t){if(webrtcTypeRE.test(t))return"probably"}};mountWebRTCProvider();for(var Tech$2=videojs.getComponent("Tech"),Dom$1=videojs.dom,Url$1=videojs.url,createTimeRange=videojs.createTimeRange,mergeOptions$1=videojs.mergeOptions,navigator$2=window_1&&window_1.navigator||{},Flash=function(t){function e(n,r,i){classCallCheck(this,e);var o=possibleConstructorReturn(this,t.call(this,n,r,i));return r.source&&o.ready(function(){this.setSource(r.source)},!0),r.startTime&&o.ready(function(){this.load(),this.play(),this.currentTime(r.startTime)},!0),window_1.videojs=window_1.videojs||{},window_1.videojs.Flash=window_1.videojs.Flash||{},window_1.videojs.Flash.onReady=e.onReady,window_1.videojs.Flash.onEvent=e.onEvent,window_1.videojs.Flash.onError=e.onError,o.on("seeked",function(){this.lastSeekTarget_=undefined}),o}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_;t.swf||(t.swf=unifyProtocol("//imgcache.qq.com/open/qcloud/video/tcplayer/player.swf"));var n=t.techId,r=mergeOptions$1({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:t.autoplay,preload:t.preload,loop:t.loop,muted:t.muted},t.flashVars),i=mergeOptions$1({wmode:"opaque",bgcolor:"#000000"},t.params),o=mergeOptions$1({id:n,name:n,"class":"vjs-tech"},t.attributes);return this.el_=e.embed(t.swf,r,i,o),this.el_.tech=this,this.el_},e.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},e.prototype.pause=function(){this.el_.vjs_pause()},e.prototype.src=function(t){return t===undefined?this.currentSrc():this.setSrc(t)},e.prototype.setSrc=function(t){var e=this;t=Url$1.getAbsoluteURL(t),this.el_.vjs_src(t),this.autoplay()&&this.setTimeout(function(){return e.play()},0)},e.prototype.seeking=function(){return this.lastSeekTarget_!==undefined},e.prototype.setCurrentTime=function(e){var n=this.seekable();n.length&&(e=e>n.start(0)?e:n.start(0),e=e<n.end(n.length-1)?e:n.end(n.length-1),this.lastSeekTarget_=e,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",e),t.prototype.setCurrentTime.call(this))},e.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},e.prototype.duration=function(){if(0===this.readyState())return NaN;var t=this.el_.vjs_getProperty("duration");return t>=0?t:Infinity},e.prototype.load=function(){this.el_.vjs_load()},e.prototype.poster=function(){this.el_.vjs_getProperty("poster")},e.prototype.setPoster=function(){},e.prototype.seekable=function(){var t=this.duration();return 0===t?createTimeRange():createTimeRange(0,t)},e.prototype.buffered=function(){var t=this.el_.vjs_getProperty("buffered");return 0===t.length?createTimeRange():createTimeRange(t[0][0],t[0][1])},e.prototype.supportsFullScreen=function(){return!1},e.prototype.enterFullScreen=function(){return!1},e.prototype.getVideoPlaybackQuality=function(){var t=this.el_.vjs_getProperty("getVideoPlaybackQuality");return window_1.performance&&"function"==typeof window_1.performance.now?t.creationTime=window_1.performance.now():window_1.performance&&window_1.performance.timing&&"number"==typeof window_1.performance.timing.navigationStart&&(t.creationTime=window_1.Date.now()-window_1.performance.timing.navigationStart),t},e}(Tech$2),_readWrite=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","loop","controls","volume","muted","defaultMuted"],_readOnly=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"],_api=Flash.prototype,i$2=0;i$2<_readWrite.length;i$2++)_createGetter(_readWrite[i$2]),_createSetter(_readWrite[i$2]);for(var _i$1=0;_i$1<_readOnly.length;_i$1++)_createGetter(_readOnly[_i$1]);Flash.isSupported=function(){return Flash.version()[0]>=10},Tech$2.withSourceHandlers(Flash),Flash.nativeSourceHandler={},Flash.nativeSourceHandler.canPlayType=function(t){return t in Flash.formats?"maybe":""},Flash.nativeSourceHandler.canHandleSource=function(t,e){var n=void 0;return n=t.type?t.type.replace(/;.*/,"").toLowerCase():function(t){var e=Url$1.getFileExtension(t);return e?"video/"+e:""}(t.src),Flash.nativeSourceHandler.canPlayType(n)},Flash.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},Flash.nativeSourceHandler.dispose=function(){},Flash.registerSourceHandler(Flash.nativeSourceHandler),Flash.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},Flash.onReady=function(t){var e=Dom$1.$("#"+t),n=e&&e.tech;n&&n.el()&&Flash.checkReady(n)},Flash.checkReady=function(t){t.el()&&(t.el().vjs_getProperty?t.triggerReady():this.setTimeout(function(){Flash.checkReady(t)},50))},Flash.onEvent=function(t,e){var n=Dom$1.$("#"+t).tech,r=Array.prototype.slice.call(arguments,2);n.setTimeout(function(){n.trigger(e,r)},1)},Flash.onError=function(t,e){var n=Dom$1.$("#"+t).tech;if("srcnotfound"===e)return n.error(4);n.error("FLASH: "+e)},Flash.version=function(){var t="0,0,0";try{t=new window_1.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(e){try{navigator$2.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(t=(navigator$2.plugins["Shockwave Flash 2.0"]||navigator$2.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(e){}}return t.split(",")},Flash.embed=function(t,e,n,r){var i=Flash.getEmbedCode(t,e,n,r);return Dom$1.createEl("div",{innerHTML:i}).childNodes[0]},Flash.getEmbedCode=function(t,e,n,r){var i="",o="",s="";return e&&Object.getOwnPropertyNames(e).forEach(function(t){i+=t+"="+e[t]+"&amp;"}),n=mergeOptions$1({movie:t,flashvars:i,allowScriptAccess:"always",allowNetworking:"all"},n),Object.getOwnPropertyNames(n).forEach(function(t){o+='<param name="'+t+'" value="'+n[t]+'" />'}),r=mergeOptions$1({data:t,width:"100%",height:"100%"},r),Object.getOwnPropertyNames(r).forEach(function(t){s+=t+'="'+r[t]+'" '}),'<object type="application/x-shockwave-flash" '+s+">"+o+"</object>"},FlashRtmpDecorator(Flash),Tech$2.getTech("Flash")?(videojs.log.warn("Not using videojs-flash as it appears to already be registered"),videojs.log.warn("videojs-flash should only be used with video.js@6 and above")):videojs.registerTech("Flash",Flash);var FlashlsSourceHandler={},mpegurlRE$1=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;FlashlsSourceHandler.canPlayType=function(t){return mpegurlRE$1.test(t)?"maybe":""},FlashlsSourceHandler.canHandleSource=function(t,e){return"maybe"===FlashlsSourceHandler.canPlayType(t.type)},FlashlsSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},FlashlsSourceHandler.dispose=function(){},videojs.getTech("Flash").registerSourceHandler(FlashlsSourceHandler,0),FlashlsSourceHandler.VERSION="__VERSION__";var Play="播放",Pause="暂停",LIVE="直播",Loaded="加载完毕",Progress="进度",Fullscreen="全屏",Rotate="旋转",CssFullscreen="页面全屏",Mute="静音",Unmute="取消静音",Subtitles="字幕",Captions="内嵌字幕",Chapters="节目段落",Descriptions="描述",Close="关闭",Replay="重播",Text="文字",White="白",Black="黑",Red="红",Green="绿",Blue="蓝",Yellow="黄",Magenta="紫红",Cyan="青",Background="背景",Window="视窗",Transparent="透明",Opaque="不透明",None="无",Raised="浮雕",Depressed="压低",Uniform="均匀",Dropshadow="下阴影",Casual="舒适",Script="手写体",Reset="重启",Done="完成",auto="自动",Mirror="镜像",CN={Play:Play,Pause:Pause,LIVE:LIVE,Loaded:Loaded,Progress:Progress,Fullscreen:Fullscreen,Rotate:Rotate,CssFullscreen:CssFullscreen,Mute:Mute,Unmute:Unmute,Subtitles:Subtitles,Captions:Captions,Chapters:Chapters,Descriptions:Descriptions,Close:Close,Replay:Replay,Text:Text,White:White,Black:Black,Red:Red,Green:Green,Blue:Blue,Yellow:Yellow,Magenta:Magenta,Cyan:Cyan,Background:Background,Window:Window,Transparent:Transparent,Opaque:Opaque,None:None,Raised:Raised,Depressed:Depressed,Uniform:Uniform,Dropshadow:Dropshadow,Casual:Casual,Script:Script,Reset:Reset,Done:Done,auto:auto,Mirror:Mirror,"Current Time":"当前时间","Duration Time":"时长","Remaining Time":"剩余时间","Stream Type":"媒体流类型","Non-Fullscreen":"退出全屏","Picture-in-Picture":"画中画","Exit Picture-in-Picture":"退出画中画","Playback Rate":"播放速度","subtitles off":"关闭字幕","captions off":"关闭内嵌字幕","Close Modal Dialog":"关闭弹窗","descriptions off":"关闭描述","Audio Track":"音轨","You aborted the media playback":"视频播放被终止","A network error caused the media download to fail part-way.":"网络错误导致视频下载中途失败。","The media could not be loaded, either because the server or network failed or because the format is not supported.":"视频因格式不支持或者服务器或网络的问题无法加载。","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。","No compatible source was found for this media.":"无法找到此视频兼容的源或者当前环境无法播放该视频。","The media is encrypted and we do not have the keys to decrypt it.":"视频已加密,无法解密。","Play Video":"播放视频","Modal Window":"弹窗","This is a modal window":"这是一个弹窗","This modal can be closed by pressing the Escape key or activating the close button.":"可以按ESC按键或启用关闭按钮来关闭此弹窗。",", opens captions settings dialog":", 开启标题设置弹窗",", opens subtitles settings dialog":", 开启字幕设置弹窗",", opens descriptions settings dialog":", 开启描述设置弹窗",", selected":", 选择","captions settings":"字幕设定","Audio Player":"音频播放器","Video Player":"视频播放器","Progress Bar":"进度小节","Volume Level":"音量","subtitles settings":"字幕设定","descriptions settings":"描述设定","Semi-Transparent":"半透明","Font Size":"字体尺寸","Text Edge Style":"字体边缘样式","Font Family":"字体库","Proportional Sans-Serif":"比例无细体","Monospace Sans-Serif":"单间隔无细体","Proportional Serif":"比例细体","Monospace Serif":"单间隔细体","Small Caps":"小型大写字体","restore all settings to the default values":"恢复全部设定至预设值","Caption Settings Dialog":"字幕设定视窗","Beginning of dialog window. Escape will cancel and close the window.":"开始对话视窗。离开会取消及关闭视窗","End of dialog window.":"结束对话视窗","Request timed out.":"请求超时,请稍后再试。","Could not download the video.":"无法加载视频,请检查网络。","Server is not respond.":"服务器请求失败,请稍后再试。","Server respond error data.":"服务器返回数据有误,请稍后再试。","Last time play at ":"上次看到 ","Resume play":"恢复播放","Powered by Tencent Cloud.":"腾讯云提供技术支持","Rise an internal exception when playing HLS.":"播放 HLS 时出现内部异常。","Authentication failed.":"防盗链参数鉴权失败。","Server failed.":"媒体服务器错误。","Get file error.":"媒体服务器获取文件错误。","The media file does not exist. Please check if the fileID is correct.":"媒体文件不存在,请检查 fileID 是否正确。","No video transcoding information found.":"没有找到视频转码信息。","Current browser not support DRM.":"浏览器不支持当前 DRM 方案。","The trial duration is illegal. The trial duration must be within the video duration.":"试看时长不合法,试看时长要在视频时长范围内。","Param pcfg is not unique.":"pcfg 不唯一。","The license has expired. Please check whether the expiration time setting is reasonable.":"license 过期,请检查过期时间设置是否合理。","Did not find an adaptive stream that can be played.":"没有找到可以播放的自适应码流,<a href='https://cloud.tencent.com/document/product/266/34071' style='color: white;' target='_blank'>查看文档</a>。","Failed to load hls.js file":"hls.js 文件加载失败","Invalid request format, please check the request format.":"请求格式不合法,请检查请求格式。","AppID is not exist, Please check if the AppID is correct.":"AppID 不存在,请检查 AppID 是否正确。","Without anti-leech information.":"没带防盗链检测。","qsign invalid.":"播放参数 qsign 校验失败","psign check failed.":"播放参数 psign 校验失败,<a href='https://cloud.tencent.com/document/product/266/45554' style='color: white' target='_blank'>查看文档</a>。","Other errors.":"其他错误。","Internal error.":"内部错误。","Response data verification failed.":"响应数据校验失败","Video statistic":"视频统计信息","Play Next":"下一个","Current browser not support play this stream, please select another one.":"无法找到此视频兼容的源或者当前环境无法播放该视频,请选择其他视频播放。","Server respond error data.(eg. stream not exist)":"媒体服务器获取数据异常,可能该视频不存在,请选择其他视频播放。","Video play failed, please refresh to start play again.":"视频播放器失败,请刷新并重新播放。","Connection to the server has failed and the number of connection retries has exceeded the set value.":"媒体服务器连接异常,并达到最大重试次数,请检查网络是否正常并刷新重试","Video decoding failure.":"视频解码失败,请选择其他视频播放。"},log=videojs.log;if(Function.prototype.bind&&"object"==("undefined"==typeof console?"undefined":_typeof(console))&&"object"==_typeof(console.log))for(var logFns=["log","info","warn","error","assert","dir","clear","profile","profileEnd"],i=0;i<logFns.length;i++){var method=logFns[i];console[method]=Function.prototype.call.bind(console[method],console)}return videojs.addLanguage("zh-CN",CN),reportLog({str_ext_content:"load sdk success"}),window_1.addEventListener("error",function(t){reportLog({str_err_info:"window global error: "+t.message})}),Object.keys(videojs).forEach(function(t){TCPlayer[t]=videojs[t]}),TCPlayer});
20
+ e.prototype.getNetworkType=function(){var t=navigator.userAgent,e=t.match(/NetType\/\w+/)?t.match(/NetType\/\w+/)[0]:"NetType/other";e=e.toLowerCase().replace("nettype/","");var n;switch(e){case"wifi":n="1";break;case"4g":n="2";break;case"3g":case"3gnet":n="3";break;case"2g":n="4";break;default:n="0xFF"}return n},e}(Plugin$14);videojs.registerPlugin("PlayerMetrics",PlayerMetrics);var Plugin$15=videojs.getPlugin("plugin"),log$13=videojs.log,ProgressMarker=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return n.ready(videojs.bind(i,i.init)),i}return inherits(e,t),e.prototype.init=function(){var t=this.player;if(t.options_.dots){var e=function r(){Array.isArray(t.options_.dots)&&t.options_.dots.length>0&&(t.options_.dots.forEach(function(e){!e.emitted&&e.timeOffset-1e3*(t.currentTime()||0)<500&&(e.emitted=!0,t.trigger("marker",e.content))}),t.options_.dots[t.options_.dots.length-1].emitted||window.requestAnimationFrame(r))};window.requestAnimationFrame(e)}if(IS_IOS||IS_ANDROID)return!1;if(!t.controlBar||!this.player.controlBar.progressControl)return void log$13("ProgressMarker can not initialize without control bar or progress control");log$13("ProgressMarker initializing");var n=t.controlBar.getChild("ProgressControl").getChild("SeekBar");n.getChild("ProgressMarkerGenerator")&&n.removeChild("ProgressMarkerGenerator"),t.options_.plugins.ProgressMarker&&(n.addChild("ProgressMarkerGenerator"),log$13("ProgressMarker initialized"),t.trigger({type:"feature",data:"marker"}))},e}(Plugin$15);videojs.registerPlugin("ProgressMarker",ProgressMarker);var Component$16=videojs.getComponent("Component"),PlayListItem=function(t){function e(n,r){return classCallCheck(this,e),possibleConstructorReturn(this,t.call(this,n,r))}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_,e=videojs.dom.createEl("div",{className:"tcp-playlist-item"}),n=videojs.dom.createEl("div",{className:"tcp-playlist-item-video",innerHTML:t.img?'<img src="'+t.img+'" class="tcp-playlist-item-img">':'<img src="https://imgcache.qq.com/open_proj/proj_qcloud_v2/mc_2014/video/console/v2/css/img/vod/default-cover.png" height="100" class="tcp-playlist-item-img">'}),r=videojs.dom.createEl("div",{className:"tcp-playlist-item-duration",textContent:this.timeFormat(t.duration)});n.appendChild(r);var i=videojs.dom.createEl("div",{className:"tcp-playlist-item-desc",textContent:t.text});return e.appendChild(n),e.appendChild(i),this.bindEvent(e),e},e.prototype.bindEvent=function(t){var e=this;videojs.on(t,["click"],function(){e.player_.trigger({type:"playItem",data:e.options_})})},e.prototype.timeFormat=function(t){var e="",n=Math.floor(t/3600);0!=n&&(t-=3600*n,n<10&&(n="0"+n),e+=n+":");var r=Math.floor(t/60);return r<10&&(r="0"+r),t-=60*r,t<10&&(t="0"+t),e+=r+":"+t},e}(Component$16);videojs.registerComponent("PlayListItem",PlayListItem);var Component$17=videojs.getComponent("Component"),PlayListTitle=function(t){function e(n,r){return classCallCheck(this,e),possibleConstructorReturn(this,t.call(this,n,r))}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_;return videojs.dom.createEl("div",{className:"tcp-playlist-title",textContent:t.title})},e}(Component$17);videojs.registerComponent("PlayListTitle",PlayListTitle);var Component$15=videojs.getComponent("Component"),PlayListBox=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.init(),i.activeIndex=-1,i}return inherits(e,t),e.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-playlist-box"})},e.prototype.init=function(){var t=this,e=this.options_.data;this.addChild("PlayListTitle",{title:this.options_.title}),e.forEach(function(e,n){e.index=n,t.addChild("PlayListItem",e)}),this.player_.on("ready",function(){t.options_.loop&&(t.activeIndex=0,t.player_.on("ended",videojs.bind(t,function(){t.player_.trigger({type:"playItem"})})))}),this.player_.on("playItem",function(n){var r=n.data,i=void 0;t.activeIndex=r?r.index:(t.activeIndex+1)%e.length,i=e[t.activeIndex],t.player_.loadVideoByID({fileID:i.fileID,appID:i.appID,psign:i.psign}),t.player_.one("loadedmetadata",videojs.bind(t,function(){t.player_.play()})),document.querySelectorAll(".tcp-playlist-item").forEach(function(t){videojs.dom.removeClass(t,"tcp-playlist-item-active")});var o=document.querySelectorAll(".tcp-playlist-item")[t.activeIndex];videojs.dom.addClass(o,"tcp-playlist-item-active")})},e}(Component$15);videojs.registerComponent("PlayListBox",PlayListBox);var Component$18=videojs.getComponent("Component"),PlayListToggle=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.status=0,i}return inherits(e,t),e.prototype.createEl=function(){var t=videojs.dom.createEl("div",{className:"tcp-playlist-toggle",textContent:"<"});return this.bindEvent(t),t},e.prototype.bindEvent=function(t){var e=this;videojs.on(t,["click"],function(n){e.status=!e.status;var r=document.querySelector(".tcp-playlist");e.status?(t.textContent=">",videojs.dom.addClass(r,"tcp-playlist-open"),videojs.dom.removeClass(r,"tcp-playlist-close")):(videojs.dom.addClass(r,"tcp-playlist-close"),videojs.dom.removeClass(r,"tcp-playlist-open"),t.textContent="<")})},e}(Component$18);videojs.registerComponent("PlayListToggle",PlayListToggle);var Component$14=videojs.getComponent("Component"),PlayList$1=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.init(),i}return inherits(e,t),e.prototype.createEl=function(){return videojs.dom.createEl("div",{className:"tcp-playlist tcp-playlist-close"})},e.prototype.init=function(){this.addChild("PlayListToggle"),this.addChild("PlayListBox",this.options_)},e}(Component$14);videojs.registerComponent("PlayList",PlayList$1);var Button$6=videojs.getComponent("Button"),PlayNextButton=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n,r));return i.addClass(),i}return inherits(e,t),e.prototype.addClass=function(){videojs.dom.addClass(this.el_,"vjs-play-next")},e.prototype.update=function(){},e.prototype.handleClick=function(t){this.player_.trigger({type:"playItem"})},e}(Button$6);PlayNextButton.prototype.controlText_="Play Next",videojs.registerComponent("PlayNextButton",PlayNextButton);var Plugin$16=videojs.getPlugin("plugin"),log$14=videojs.log,PlayList=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return IS_IOS||IS_ANDROID?possibleConstructorReturn(i):(i.options=r,r&&r.data instanceof Array&&r.data.length>0&&n.ready(videojs.bind(i,i.init)),i)}return inherits(e,t),e.prototype.init=function(){log$14("PlayList initializing"),this.player.addChild("PlayList",this.options),this.player.controlBar.addChild("PlayNextButton",{},1),log$14("PlayList initialized"),this.player.trigger({type:"feature",data:"playlist"})},e}(Plugin$16);videojs.registerPlugin("PlayList",PlayList);var Plugin$17=videojs.getPlugin("plugin"),log$15=videojs.log,HLSToken=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return log$15("HLSToken",n,r),i.init(r),i}return inherits(e,t),e.prototype.init=function(t){log$15("HLSToken init",t,this.player);var e=this.player;t.token&&(this.options=t,e.on("playcgiend",videojs.bind(this,function(t){this.modifyData(t.data)})))},e.prototype.modifyData=function(t){var e=this;if(log$15("HLSToken modifyData",t),0===t.result.code){var n=t.result.videoInfo;if(n.masterPlayList){var r=n.masterPlayList.url.split("/");r[r.length-1]="voddrm.token."+this.options.token+"."+r[r.length-1],n.masterPlayList.url=r.join("/")}n.transcodeList&&n.transcodeList.length>0&&(n.transcodeList=n.transcodeList.map(function(t){var n=t.url.split("/");return n[n.length-1]="voddrm.token."+e.options.token+"."+n[n.length-1],t.url=n.join("/"),t}))}},e}(Plugin$17);videojs.registerPlugin("HLSToken",HLSToken);var getMessageContents=function(t){var e=(new window_1.DOMParser).parseFromString(String.fromCharCode.apply(null,new Uint16Array(t)),"application/xml"),n=e.getElementsByTagName("HttpHeaders")[0],r={};if(n)for(var i=n.getElementsByTagName("name"),o=n.getElementsByTagName("value"),s=0;s<i.length;s++)r[i[s].childNodes[0].nodeValue]=o[s].childNodes[0].nodeValue;var a=e.getElementsByTagName("Challenge")[0],l=void 0;return a&&(l=window_1.atob(a.childNodes[0].nodeValue)),{headers:r,message:l}},requestPlayreadyLicense=function(t,e,n){var r=getMessageContents(e),i=r.headers,o=r.message;videojs.xhr({uri:t,method:"post",headers:i,body:o,responseType:"arraybuffer"},n)},getSupportedKeySystem=function(t){var e=void 0;return Object.keys(t).forEach(function(n){var r={},i=t[n].audioContentType,o=t[n].videoContentType;i&&(r.audioCapabilities=[{contentType:i}]),o&&(r.videoCapabilities=[{contentType:o}]),e=e?e["catch"](function(t){return window_1.navigator.requestMediaKeySystemAccess(n,[r])}):window_1.navigator.requestMediaKeySystemAccess(n,[r])}),e},makeNewRequest=function(t){var e=t.mediaKeys,n=t.initDataType,r=t.initData,i=t.options,o=t.getLicense,s=t.removeSession,a=t.eventBus,l=e.createSession();l.addEventListener("message",function(t){o(i,t.message).then(function(t){return l.update(t)})["catch"](videojs.log.error.bind(videojs.log.error,"failed to get and set license"))},!1),l.addEventListener("keystatuseschange",function(t){var e=!1;l.keyStatuses.forEach(function(n,r){switch(a.trigger({keyId:r,status:n,target:l,type:"keystatuschange"}),n){case"expired":e=!0;break;case"internal-error":videojs.log.warn('Key status reported as "internal-error." Leaving the session open since we don\'t have enough details to know if this error is fatal.',t)}}),e&&l.close().then(function(){s(r)})},!1),l.generateRequest(n,r)["catch"](videojs.log.error.bind(videojs.log.error,"Unable to create or initialize key session"))},addSession=function(t){var e=t.video,n=t.initDataType,r=t.initData,i=t.options,o=t.getLicense,s=t.removeSession,a=t.eventBus;e.mediaKeysObject?makeNewRequest({mediaKeys:e.mediaKeysObject,initDataType:n,initData:r,options:i,getLicense:o,removeSession:s,eventBus:a}):e.pendingSessionData.push({initDataType:n,initData:r})},setMediaKeys=function(t){var e=t.video,n=t.certificate,r=t.createdMediaKeys,i=t.options,o=t.getLicense,s=t.removeSession,a=t.eventBus;e.mediaKeysObject=r,n&&r.setServerCertificate(n);for(var l=0;l<e.pendingSessionData.length;l++){var c=e.pendingSessionData[l];makeNewRequest({mediaKeys:e.mediaKeysObject,initDataType:c.initDataType,initData:c.initData,options:i,getLicense:o,removeSession:s,eventBus:a})}return e.pendingSessionData=[],e.setMediaKeys(r)},defaultPlayreadyGetLicense=function(t){return function(e,n,r){requestPlayreadyLicense(t,n,function(t,e,n){if(t)return void r(t);r(null,n)})}},defaultGetLicense=function(t){return function(e,n,r){videojs.xhr({uri:t,method:"POST",responseType:"arraybuffer",body:n,headers:{"Content-type":"application/octet-stream"}},function(t,e,n){if(t)return void r(t);r(null,n)})}},promisifyGetLicense=function(t,e){return function(n,r){return new Promise(function(i,o){t(n,r,function(t,n){e&&e.trigger("licenserequestattempted"),t&&o(t),i(n)})})}},standardizeKeySystemOptions=function(t,e){if("string"==typeof e&&(e={url:e}),!e.url&&!e.getLicense)throw new Error("Neither URL nor getLicense function provided to get license");return e.url&&!e.getLicense&&(e.getLicense="com.microsoft.playready"===t?defaultPlayreadyGetLicense(e.url):defaultGetLicense(e.url)),e},standard5July2016=function(t){var e=t.video,n=t.initDataType,r=t.initData,i=t.options,o=t.removeSession,s=t.eventBus,a=Promise.resolve();if("undefined"==typeof e.mediaKeysObject){e.mediaKeysObject=null,e.pendingSessionData=[];var l=void 0,c=void 0;if(!(a=getSupportedKeySystem(i.keySystems)))return videojs.log.error("No supported key system found"),Promise.resolve();a=a.then(function(t){return new Promise(function(n,r){if(e.keySystem=t.keySystem,c=standardizeKeySystemOptions(t.keySystem,i.keySystems[t.keySystem]),!c.getCertificate)return void n(t);c.getCertificate(i,function(e,i){if(e)return void r(e);l=i,n(t)})})}).then(function(t){return t.createMediaKeys()}).then(function(t){return setMediaKeys({video:e,certificate:l,createdMediaKeys:t,options:i,getLicense:promisifyGetLicense(c.getLicense,s),removeSession:o,eventBus:s})})["catch"](videojs.log.error.bind(videojs.log.error,"Failed to create and initialize a MediaKeys object"))}return a.then(function(){addSession({video:e,initDataType:n,initData:r,options:i,getLicense:e.keySystem?promisifyGetLicense(standardizeKeySystemOptions(e.keySystem,i.keySystems[e.keySystem]).getLicense,s):null,removeSession:o,eventBus:s})})},stringToUint16Array=function(t){for(var e=new ArrayBuffer(2*t.length),n=new Uint16Array(e),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n},uint8ArrayToString=function(t){return String.fromCharCode.apply(null,new Uint16Array(t.buffer))},getHostnameFromUri=function(t){var e=document_1.createElement("a");return t=t.match(/.*(skd\:\/\/.+)/i)[1],e.href=t,e.hostname},arrayBuffersEqual=function(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(var n=new DataView(t),r=new DataView(e),i=0;i<n.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0},arrayBufferFrom=function(t){return t instanceof Uint8Array||t instanceof Uint16Array?t.buffer:t},FAIRPLAY_KEY_SYSTEM="com.apple.fps.1_0",concatInitDataIdAndCertificate=function(t){var e=t.initData,n=t.id,r=t.cert;"string"==typeof n&&(n=stringToUint16Array(n));var i=0,o=new ArrayBuffer(e.byteLength+4+n.byteLength+4+r.byteLength),s=new DataView(o);new Uint8Array(o,i,e.byteLength).set(e),i+=e.byteLength,s.setUint32(i,n.byteLength,!0),i+=4;var a=new Uint16Array(o,i,n.length);return a.set(n),i+=a.byteLength,s.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(o,i,r.byteLength).set(r),new Uint8Array(o,0,o.byteLength)},addKey=function(t){var e=t.video,n=t.contentId,r=t.initData,i=t.cert,o=t.options,s=t.getLicense,a=t.eventBus;return new Promise(function(t,l){if(e.webkitKeys||e.webkitSetMediaKeys(new window_1.WebKitMediaKeys(FAIRPLAY_KEY_SYSTEM)),!e.webkitKeys)return void l("Could not create MediaKeys");var c=e.webkitKeys.createSession("video/mp4",concatInitDataIdAndCertificate({id:n,initData:r,cert:i}));if(!c)return void l("Could not create key session");c.contentId=n,c.addEventListener("webkitkeymessage",function(t){s(o,n,t,function(t,e){if(a&&a.trigger("licenserequestattempted"),t)return void l(t);c.update(new Uint8Array(e))})}),c.addEventListener("webkitkeyadded",function(e){t(e)}),c.addEventListener("webkitkeyerror",function(t){l(t)})})},defaultGetCertificate=function(t){return function(e,n){videojs.xhr({uri:t,responseType:"arraybuffer"},function(t,e,r){if(t)return void n(t);n(null,new Uint8Array(r))})}},defaultGetContentId=function(t,e){return getHostnameFromUri(uint8ArrayToString(e))},defaultGetLicense$1=function(t){return function(e,n,r,i){videojs.xhr({uri:t,method:"POST",responseType:"arraybuffer",body:r.message,headers:{"Content-type":"application/x-www-form-urlencoded"}},function(t,e,n){if(t)return void i(t);i(null,n)})}},fairplay=function(t){var e=t.video,n=t.initData,r=t.options,i=t.eventBus,o=r.keySystems[FAIRPLAY_KEY_SYSTEM],s=o.getCertificate||defaultGetCertificate(o.certificateUri),a=o.getContentId||defaultGetContentId,l=o.getLicense||defaultGetLicense$1(o.licenseUri);return new Promise(function(t,e){s(r,function(n,r){if(n)return void e(n);t(r)})}).then(function(t){return addKey({video:e,cert:t,initData:n,getLicense:l,options:r,contentId:a(r,n),eventBus:i})})["catch"](function(t){i.player_.error({code:3,message:t})})},PLAYREADY_KEY_SYSTEM="com.microsoft.playready",addKeyToSession=function(t,e,n,r){var i=t.keySystems[PLAYREADY_KEY_SYSTEM];if("function"==typeof i.getKey)return void i.getKey(t,n.destinationURL,n.message.buffer,function(t,n){if(t)return void videojs.log.error("Unable to get key: "+t);e.update(n)});"string"==typeof i&&(i={url:i});var o=i.url||n.destinationURL;requestPlayreadyLicense(o,n.message.buffer,function(t,n){if(r&&r.trigger("licenserequestattempted"),t)return void videojs.log.error("Unable to request key from url: "+o);e.update(new Uint8Array(n.body))})},createSession=function(t,e,n,r){var i=t.msKeys.createSession("video/mp4",e);if(!i)return void videojs.log.error("Could not create key session.");i.addEventListener("mskeymessage",function(t){addKeyToSession(n,i,t,r)}),i.addEventListener("mskeyerror",function(t){videojs.log.error("Unexpected key error from key session with code: "+i.error.code+" and systemCode: "+i.error.systemCode)})},msPrefixed=function(t){var e=t.video,n=t.initData,r=t.options,i=t.eventBus;e.msKeys&&delete e.msKeys;try{e.msSetMediaKeys(new window_1.MSMediaKeys(PLAYREADY_KEY_SYSTEM))}catch(o){return void videojs.log.error("Unable to create media keys for PlayReady key system. Error: "+o.message)}createSession(e,n,r,i)},Plugin$18=videojs.getPlugin("plugin"),hasSession=function(t,e){for(var n=0;n<t.length;n++)if(t[n].initData){var r=arrayBufferFrom(t[n].initData),i=arrayBufferFrom(e);if(arrayBuffersEqual(r,i))return!0}return!1},removeSession=function(t,e){for(var n=0;n<t.length;n++)if(t[n].initData===e)return void t.splice(n,1)},handleEncryptedEvent=function(t,e,n,r){if(!e||!e.keySystems||e.src&&e.src.indexOf("m3u8")>-1)return Promise.resolve();var i=t.initData;return getSupportedKeySystem(e.keySystems).then(function(o){var s=o.keySystem;if(e.keySystems[s]&&e.keySystems[s].pssh&&(i=e.keySystems[s].pssh),!hasSession(n,i)&&i)return n.push({initData:i}),standard5July2016({video:t.target,initDataType:t.initDataType,initData:i,options:e,removeSession:removeSession.bind(null,n),eventBus:r})})},handleWebKitNeedKeyEvent=function(t,e,n){if(e.keySystems&&e.keySystems[FAIRPLAY_KEY_SYSTEM]&&t.initData)return fairplay({video:t.target,initData:t.initData,options:e,eventBus:n})},handleMsNeedKeyEvent=function(t,e,n,r){if(e.keySystems&&e.keySystems[PLAYREADY_KEY_SYSTEM]&&!n.reduce(function(t,e){return t||e.playready},!1)){var i=t.initData;e.keySystems[PLAYREADY_KEY_SYSTEM]&&e.keySystems[PLAYREADY_KEY_SYSTEM].pssh&&(i=e.keySystems[PLAYREADY_KEY_SYSTEM].pssh),i&&(n.push({playready:!0,initData:i}),msPrefixed({video:t.target,initData:i,options:e,eventBus:r}))}},getOptions=function(t){return videojs.mergeOptions(t.currentSource(),t.eme.options)},setupSessions=function(t){var e=t.src();e!==t.eme.activeSrc&&(t.eme.activeSrc=e,t.eme.sessions=[])},onPlayerReady=function(t){"video"===t.$(".vjs-tech").tagName.toLowerCase()&&t.tech_&&(setupSessions(t),t.tech_.el_.addEventListener("encrypted",function(e){if(t.currentSource().keySystems&&t.currentSource().keySystems["com.widevine.alpha"]&&"application/dash+xml"===t.currentSource().type)return!1;setupSessions(t),handleEncryptedEvent(e,getOptions(t),t.eme.sessions,t.tech_)}),t.tech_.el_.addEventListener("webkitneedkey",function(e){setupSessions(t),handleWebKitNeedKeyEvent(e,getOptions(t),t.tech_)}),videojs.browser.IS_EDGE||t.tech_.el_.addEventListener("msneedkey",function(e){setupSessions(t),handleMsNeedKeyEvent(e,getOptions(t),t.eme.sessions,t.tech_)}))},DRM=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,n.ready(function(){return onPlayerReady(n)}),n.eme={initializeMediaKeys:function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){},i=videojs.mergeOptions(n.currentSource(),r,t),o={initDataType:"cenc",initData:null,target:n.tech_.el_};setupSessions(n),n.tech_.el_.setMediaKeys?handleEncryptedEvent(o,i,n.eme.sessions,n.tech_).then(function(){return e()})["catch"](function(t){return e(t)}):n.tech_.el_.msSetMediaKeys&&(handleMsNeedKeyEvent(o,i,n.eme.sessions,n.tech_),e())},options:r},i}return inherits(e,t),e.prototype.setOptions=function(t){this.options=t,this.player.options_.plugins.DRM=t},e}(Plugin$18),registerPlugin$2=videojs.registerPlugin||videojs.plugin;registerPlugin$2("DRM",DRM);var Plugin$19=videojs.getPlugin("plugin"),PDT=function(t){function e(n){classCallCheck(this,e);var r=possibleConstructorReturn(this,t.call(this,n));return n.plugins=n.plugins||{},n.plugins.pdt=!0,r}return inherits(e,t),e}(Plugin$19);videojs.registerPlugin("PDT",PDT);var Plugin$20=videojs.getPlugin("plugin"),dom$2=videojs.dom;if(!window.requestAnimationFrame){var lastTime=0;window.requestAnimationFrame=function(t){var e=(new Date).getTime(),n=Math.max(0,16.7-(e-lastTime)),r=window.setTimeout(function(){t(e+n)},n);return lastTime=e+n,r}}window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)});var DynamicWatermark=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r||{},i.content=i.options.content,i.options.content&&i.init(),i}return inherits(e,t),e.prototype.dispose=function(){this.stopAnimation(),this.player.$(".tcp-dynamic-watermark-container")&&this.player.el().removeChild(this.containerElement),t.prototype.dispose.call(this)},e.prototype.init=function(){var t=this,e=this.player;this.isFirstShow=!0,this.initUI(),this.initStyle(),this.initSpeed(),e.on("canplay",function(){t.calculateStyle(),t.setStyle(),dom$2.removeClass(t.containerElement,"vjs-hidden")}),e.one("play",function(){t.encModule=new Enc,t.ghostCycle=t.encModule.calculateGhost(t.player.duration()),t.startAnimation()}),e.on(["fullscreenchange","playerresize"],function(){setTimeout(function(){t.calculateStyle()},200)})},e.prototype.initUI=function(){var t=this.player,e=dom$2.createEl("div",{className:"tcp-dynamic-watermark-container vjs-hidden"}),n=dom$2.createEl("div",{innerHTML:encodeHTML(this.options.content),className:"tcp-dynamic-watermark-content"});if(e.appendChild(n),!this.options.keep&&this.options.content&&t.el().appendChild(e),this.containerElement=e,this.markContentElement=n,"image"===this.options.type){var r=document.createElement("img");this.options.width&&(r.style.width=this.options.width),this.options.height&&(r.style.height=this.options.height),r.setAttribute("src",this.options.content),this.markContentElement.innerHTML="",this.markContentElement.appendChild(r)}},e.prototype.initStyle=function(){this.style={containerWidth:"",containerHeight:"",containerLeft:"",containerTop:"",contentLeft:80*Math.random(),contentTop:80*Math.random(),margin:0,padding:0,display:"block",visibility:"visible",opacity:.5,position:"absolute",color:"rgba(255, 255, 255)"}},e.prototype.initSpeed=function(){if(this.options.keep&&(!this.options.speed||0===this.options.speed))return this.speed=.2,!1;this.speed=this.options.speed},e.prototype.calculateStyle=function(){var t=this.player,e=this.style,n=t.videoWidth(),r=t.videoHeight(),i=dom$2.getBoundingClientRect(t.el()),o=i.width,s=i.height,a=(o/s).toFixed(2),l=(n/r).toFixed(2),c=void 0,u=void 0;l<a?(u=s,c=u*l):l>a?(c=o,u=c/l):l==a&&(c=o,u=s),e.containerLeft=(o-c)/2/o*100,e.containerTop=(s-u)/2/s*100,e.containerWidth=c/o*100,e.containerHeight=u/s*100},e.prototype.setStyle=function(){var t=this.containerElement,e=this.markContentElement,n=this.style;t.style.left=n.containerLeft+"%",t.style.top=n.containerTop+"%",t.style.width=n.containerWidth+"%",t.style.height=n.containerHeight+"%",t.style.display=e.style.display=n.display,t.style.visibility=e.style.visibility=n.visibility,t.style.opacity=e.style.opacity=n.opacity,t.style.position=e.style.position=n.position,t.style.margin=e.style.margin=n.margin,t.style.padding=e.style.padding=n.padding,e.style.left=this.options.left||n.contentLeft+"%",e.style.top=this.options.top||n.contentTop+"%",this.options.right&&(e.style.right=this.options.right),this.options.bottom&&(e.style.bottom=this.options.bottom),e.style.color=this.options.color||n.color,this.options.keep||(t.style.opacity=e.style.opacity=this.options.opacity||n.opacity),"text"===this.options.type&&(e.style.fontSize=this.options.fontSize||"12px",e.innerHTML=encodeHTML(this.options.content))},e.prototype.setContent=function(t){this.options.content=t},e.prototype.startAnimation=function(){var t=this;if(!this.rafID){var e=(this.player,this.style),n=this.containerElement,r=this.markContentElement,i=1,o=1,s=Math.random(),a=function l(){try{if(!t.isPauseAnimation){var a=Math.min(1,0===t.speed?0:t.speed?t.speed:.2),c=dom$2.getBoundingClientRect(n),u=dom$2.getBoundingClientRect(r),h=u.left-c.left,p=u.top-c.top;h+=a*i*s,p+=a*o*(1-s),h+u.width>c.width?(i=-1,s=Math.random()):h<0&&(i=1,s=Math.random()),p+u.height>c.height?(o=-1,s=Math.random()):p<0&&(o=1,s=Math.random()),h=Math.min(c.width-u.width,h),p=Math.min(c.height-u.height,p),e.contentLeft=h/c.width*100,e.contentTop=p/c.height*100,t.setStyle()}}catch(d){t.player&&t.encModule.handleWatermarkElementAdd(t)}if(t.isStopAnimation)return t.isStopAnimation=!1,cancelAnimationFrame(t.rafID),void(t.rafID=null);0!==t.speed&&requestAnimationFrame(l)};this.rafID=requestAnimationFrame(a)}},e.prototype.resumeAnimation=function(){this.isPauseAnimation=!1},e.prototype.pauseAnimation=function(){this.isPauseAnimation=!0},e.prototype.stopAnimation=function(){this.isStopAnimation=!0},e}(Plugin$20);videojs.registerPlugin("DynamicWatermark",DynamicWatermark);var Plugin$21=videojs.getPlugin("plugin"),XP2PHlsjsPlugin=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,i.hlsp2p=null,i}return inherits(e,t),e.prototype.startHLSP2P=function(t,e,n){var r=this,i=this.player.tech_,o=i.options_,s=o.xp2pConfig;if(e.isSupported()&&!window.hlsp2p){for(var a=["videoType","xp2pPackage","xp2pAppId","tencentCloudAppId"],l=a,c=Array.isArray(l),u=0,l=c?l:l[Symbol.iterator]();;){var h;if(c){if(u>=l.length)break;h=l[u++]}else{if(u=l.next(),u.done)break;h=u.value}var p=h;if(s[p]===undefined)return}var d={videoId:o.playerId+"_html5_api",url:o.source.src,videoType:s.videoType,cloudAppId:s.tencentCloudAppId,domain:s.xp2pPackage,xp2pAppId:s.xp2pAppId,p2pStartDelay:1e3},f=HLSP2P.create(t,Object.assign(d,s));f.on(HLSP2P.Events.Rollback,function(t){r.destroy(),n&&n(t)}),this.hlsp2p=f}},e.prototype.destroy=function(){this.hlsp2p&&(this.hlsp2p.destroy(),this.hlsp2p=null,window.hlsp2p=undefined)},e.prototype.dispose=function(){this.destroy()},e}(Plugin$21);videojs.registerPlugin("XP2PHlsjsPlugin",XP2PHlsjsPlugin);var Plugin$22=videojs.getPlugin("plugin"),XP2PFlvjsPlugin=function(t){function e(n,r){classCallCheck(this,e);var i=possibleConstructorReturn(this,t.call(this,n));return i.options=r,i}return inherits(e,t),e.prototype.createLoader=function(t,e,n){var r=this.player.tech();return function(t){function i(e,n){classCallCheck(this,i);var r=possibleConstructorReturn(this,t.call(this));return r._qvbp2p=null,r._receivedLength=0,r._config=n,r}return inherits(i,t),i.isSupported=function(){return e&&e.isSupported()},i.prototype.destroy=function(){this._destroyQVBP2P(),t.prototype.destroy.call(this)},i.prototype.open=function(t){this._createQVBP2P(),this._qvbp2p.on(e.ComEvents.STATE_CHANGE,this._onQVBP2PStateChange.bind(this)),this._qvbp2p.setMediaElement(r.el());var n={src:t.url};this._qvbp2p.loadSource(n)},i.prototype.abort=function(){this._destroyQVBP2P()},i.prototype._onQVBP2PStateChange=function(t,n){var r=e.ComCodes;switch(n.code){case r.RECEIVE_BUFFER:this._receiveBuffer(n.payload);break;case r.ROLLBACK:this._rollback(n)}},i.prototype._receiveBuffer=function(t){var e=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,e,this._receivedLength)},i.prototype._rollback=function(t){n&&n(t)},i.prototype._createQVBP2P=function(){this._qvbp2p&&this._destroyQVBP2P(),this._qvbp2p=e.create(this._config.xp2pConfig),window.qvbp2p=this._qvbp2p},i.prototype._destroyQVBP2P=function(){this._qvbp2p&&(this._qvbp2p.destroy(),this._qvbp2p=null,window.qvbp2p=null)},i}(t.BaseLoader)},e}(Plugin$22);videojs.registerPlugin("XP2PFlvjsPlugin",XP2PFlvjsPlugin);var defaultConfig$1={enableStashBuffer:!1},Html5FlvJS=function(){function t(e,n,r){var i=this;classCallCheck(this,t);var o=function(){var t=window.flvjs;i.flvjs=t;var o=videojs.mergeOptions(defaultConfig$1,r.flvConfig,{xp2pConfig:r.xp2pConfig}),s=n.player();if(window.QVBP2P&&r.xp2pConfig&&r.xp2pConfig.useXP2P&&s.XP2PFlvjsPlugin){var a=s.XP2PFlvjsPlugin().createLoader(t,window.QVBP2P,function(t){i.dispose(),r.xp2pConfig.useXP2P=!1;var e=i.tech.player(),n=i.tech.currentSource_.src;e.src(n)});i.xp2pFlvLoader=a,o.customLoader=a}var l=new t.createPlayer(Object.assign({isLive:!1,url:e.src,type:"flv"},o),o);i.tech=n,l.on(t.Events.ERROR,videojs.bind(i,i.onError));for(var c in t.Events)!function(e){l.on(t.Events[e],videojs.bind(i,function(t){this.onEvent(e,t)}))}(c);s.trigger({type:"flvInstanceCreated",data:{flv:l}}),l.on(t.Events.STATISTICS_INFO,function(t){var e=(t.bps_audio||0)+(t.bps_video||0);s.trigger({type:"playstatus",data:{type:"flv",decodedFrames:t.decodedFrames,droppedFrames:t.droppedFrames,speed:t.speed.toFixed(0),bitrate:e||0,bpsAudio:t.bps_audio||0,bpsVideo:t.bps_video||0}})}),i.flv=l,i._id=(new Date).getTime(),n.el().srcObject&&(n.el().srcObject=null),l.attachMediaElement(n.el()),l.load()};Promise.all([function(){return r.xp2pConfig&&r.xp2pConfig.useXP2P&&"flv"===r.xp2pConfig.format&&!window.QVBP2P?new Promise(function(t){loadScript(XP2P_FLV_PATH,function(){t()})}):Promise.resolve()}(),function(){return window.flvjs?Promise.resolve():new Promise(function(t){loadScript(FLV_PATH,function(){t()})})}()]).then(function(){o()})}return t.prototype.onError=function(t,e,n){var r=this.tech.player();t===this.flvjs.ErrorTypes.NETWORK_ERROR&&r.error({code:2,source:n}),t===this.flvjs.ErrorTypes.MEDIA_ERROR&&r.error({code:3,source:n})},t.prototype.onEvent=function(t,e){this.tech.player().trigger({type:"FLVJS_EVENT",data:{type:t,data:e}})},t.prototype.dispose=function(){if(this.tech.player().pause(),this.tech.flvProvider)try{this.flv.destroy()}catch(t){}this.tech.flvProvider=null},t}(),flvTypeRE=/^video\/flv$/i,flvExtRE=/.flv(?![^?])/i,flvProtoRE=/^(ws:\/\/)/i,FlvSourceHandler={name:"flvSourceHandler",canHandleSource:function(t){return flvTypeRE.test(t.type)?"probably":flvExtRE.test(t.src)||flvProtoRE.test(t.src)?"maybe":""},handleSource:function(t,e,n){return e.flvProvider&&e.flvProvider.dispose(),e.flvProvider=new Html5FlvJS(t,e,n),e.flvProvider},canPlayType:function(t){if(flvTypeRE.test(t))return"probably"}};TCPlayer.mountFlvProvider=mountFlvProvider,mountFlvProvider();var guid$1=function(t){var e=localStorage.getItem(t);return e||(e=guid(),localStorage.setItem(t,e)),e},bytes_token=guid(),liveBaseData={str_user_id:guid$1("dev_uuid"),dev_uuid:guid$1("dev_uuid"),str_session_id:bytes_token,bytes_token:bytes_token,str_device_type:"",str_package_name:"",str_stream_url:"http://pulldrm.buzzcast.com/live/unknown.m3u8",u32_link_type:1001,u32_channel_type:1,str_app_version:"",platform:3,uint32_platform:3,str_user_agent:USER_AGENT,uint64_data_time:getTimeStampBySecond(),u64_timestamp:getTimeStamp(),u32_avg_cpu_usage:"",u32_avg_memory:"",u64_begin_timestamp:"",u32_result:"",u64_err_code:"",u32_speed_cnt:0,u32_avg_cache_time:"",u32_max_load:"",u32_audio_block_time:"",u32_avg_load:"",u32_load_cnt:0,u32_nodata_cnt:0,u32_first_i_frame:"",u32_video_width:"",u32_video_height:"",u32_video_avg_fps:"",u32_avg_block_time:"",u64_block_count:0,u32_video_block_time:0,u64_jitter_cache_max:0,u64_block_duration_max:0,u64_jitter_cache_avg:0,u32_ip_count_quic:"",u32_connect_count_quic:"",u32_connect_count_tcp:"",u32_is_real_time:"",u32_first_frame_black:"",u32_delay_report:0},reportLog=function(t,e){return!1},defaultConfig$2={connectRetryCount:2,connectTimeout:5,receiveVideo:!0,receiveAudio:!0,showLog:!1},WebRTCProvider=function(){function t(e,n,r){var i=this;classCallCheck(this,t);var o=function(){i.tech=n,i.player=i.tech.player(),i.playerMetrics=i.player.PlayerMetrics(),i.report=i.player.options_.reportable;var t=window.TXLivePlayer;i.TXLivePlayer=t,i.eventStack=[];var e=videojs.mergeOptions(defaultConfig$2,r.webrtcConfig)
21
+ ;r.xp2pConfig&&"webrtc"===r.xp2pConfig.format&&r.xp2pConfig.useXP2P&&Object.assign(e,{p2pEnable:r.xp2pConfig.useXP2P,p2pConfig:{cloudAppid:r.xp2pConfig.tencentCloudAppId,xp2pAppid:r.xp2pConfig.xp2pAppId,appKey:r.xp2pConfig.xp2pAppKey,xp2pDomain:r.xp2pConfig.xp2pPackage}});var o=new t;i.webrtcConfig=e,o.setPlayerView(n.el()),o.setConfig(e),o.setPlayListener({onPlayEvent:videojs.bind(i,i.onPlayEvent),onPlayStats:videojs.bind(i,i.onPlayStats),onPlayReport:videojs.bind(i,i.onPlayReport),onPlaySEI:videojs.bind(i,i.onPlaySEI)}),o.startPlay(i.player.currentSrc()),i.player.one("playing",function(){0!==i.eventStack.length&&reportLog({str_ext_content:"eventStack on playing: "+JSON.stringify(i.eventStack),str_stream_url:i.player.cache_&&i.player.cache_.src})}),i.player.one("error",function(){0!==i.eventStack.length&&reportLog({str_ext_content:"eventStack on error: "+JSON.stringify(i.eventStack),str_stream_url:i.player.cache_&&i.player.cache_.src})}),i.player.trigger({type:"webrtcInstanceCreated",data:{webrtc:o}}),i.webrtcPlayer=o};window.TXLivePlayer?o():loadScript(WEBRTC_PATH,function(){o()})}return t.prototype.onPlayStats=function(t){this.tech.player().trigger({type:"webrtcstats",data:t})},t.prototype.onPlayEvent=function(t,e){-2003===t?this.eventStack.push({event:t,data:e}):this.eventStack.push({event:t,message:e&&e.message});var n=this.tech.player();if(n.trigger({type:"debug",data:{code:t,data:e}}),1005===t&&n.addClass("vjs-waiting"),t<-2e3){if(-2003===t&&e&&e.videoActive&&(n.trigger("blocked"),n.trigger({type:"webrtcevent",data:{code:2005}})),-2003===t||-2006===t)return!1;if(-2005===t||-2001===t||-2004===t){n.trigger({type:"debug",data:{message:"debug === webrtc 状态码 "+t+",进入降级逻辑"}});var r=n.options_.webrtcConfig;if(!r||!1!==r.fallback)return this.switchPlaySource(),!1}return n.error({code:t,source:e}),!1}n.trigger({type:"webrtcevent",data:{code:t,data:e}})},t.prototype.onPlayReport=function(t){if(!1===this.report)return!1;if(t.fromTxliveplayer=!0,40101===t.uint32_command){var e=this.tech.player();e&&e.trigger({type:"debug",data:{code:"report",data:t}}),this.playerMetrics.report_40101(t)}40100===t.uint32_command&&this.playerMetrics.report_40100(t),40102===t.uint32_command&&this.playerMetrics.report_40102(t)},t.prototype.onPlaySEI=function(t){var e=this.tech.player();e&&e.trigger({type:"webrtcsei",data:t})},t.prototype.dispose=function(){this.webrtcPlayer&&(this.webrtcPlayer.setPlayListener({onPlayEvent:function(){},onPlayStats:function(){}}),this.webrtcPlayer.stopPlay(),this.webrtcPlayer.setPlayerView(videojs.dom.createEl("video"))),this.webrtcPlayer=null},t.prototype.setSource=function(t){var e=this;this.webrtcPlayer.startPlay(t.src),this.tech.player().one("webrtcevent",function(t){-1002===t.data.code&&e.tech.player().play()})},t.prototype.recovery=function(){var t=this,e=this.tech.player(),n=void 0;e.one("waiting",function(){n=setTimeout(function(){e.one("webrtcevent",function(n){if(1004===n.data.code){t.webrtcPlayer&&t.webrtcPlayer.startPlay(e.src()),e.play();var r=function i(t){1002===t.data.code&&(e.play(),e.off("webrtcevent",i))};e.on("webrtcevent",r)}}),t.webrtcPlayer&&t.webrtcPlayer.stopPlay()},2e3)}),e.one("playing",function(){n&&clearTimeout(n)})},t.prototype.switchPlaySource=function(){var t=this.tech.player(),e=void 0,n=this.tech.currentSource_.src;e=this.webrtcConfig&&this.webrtcConfig.fallbackUrl?[{src:this.webrtcConfig.fallbackUrl}]:[{src:(this.convertProtocol(n)||[])[0]}],t.trigger({type:"webrtcfallback",data:{target:e[0].src}}),t.options_.autoplay&&(t.bigPlayButton&&t.bigPlayButton.hide(),t.posterImage&&t.posterImage.hide());var r=[];t.options_.hlsConfig&&t.options_.hlsConfig.skipHlsJs?e.forEach(function(t){t.src?r.push({src:t.src,skipHlsJs:!0}):r.push({src:t,skipHlsJs:!0})}):r=[].concat(e),reportLog({str_ext_content:"webrtc fallback: "+JSON.stringify(r),str_stream_url:t.cache_&&t.cache_.src}),t.src(r);var i=videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?"loadeddata":"loadedmetadata",o=function s(){t.options_.autoplay&&t.play(),t.one("progress",function(){t.options_.autoplay&&t.play(),t.off(i,s)})};t.on(i,o)},t.prototype.convertProtocol=function(t){var e=[];if(t.indexOf(".sdp")>-1)t=t.replace(".sdp",".flv"),e.push(t.replace(".sdp",".m3u8"));else{var n=t.replace("webrtc://","https://").replace("?",".flv?");-1===n.indexOf("?")&&-1===n.indexOf(".flv")&&(n+=".flv");var r=t.replace("webrtc://","https://").replace("?",".m3u8?");-1===r.indexOf("?")&&-1===r.indexOf(".m3u8")&&(r+=".m3u8"),e.push(r)}return e},t}(),webrtcTypeRE=/^webrtc/i,webrtcExtRE=/\.sdp/i,webrtcProtoRE=/^(webrtc:\/\/)/i,sourceHandler={name:"webrtcSourceHandler",canHandleSource:function(t){return webrtcTypeRE.test(t.type)?"probably":webrtcExtRE.test(t.src)||webrtcProtoRE.test(t.src)?"maybe":""},handleSource:function(t,e,n){return e.webrtcProvider&&e.webrtcProvider.dispose(),e.webrtcProvider=new WebRTCProvider(t,e,n),e.webrtcProvider},canPlayType:function(t){if(webrtcTypeRE.test(t))return"probably"}};mountWebRTCProvider();for(var Tech$2=videojs.getComponent("Tech"),Dom$1=videojs.dom,Url$1=videojs.url,createTimeRange=videojs.createTimeRange,mergeOptions$1=videojs.mergeOptions,navigator$2=window_1&&window_1.navigator||{},Flash=function(t){function e(n,r,i){classCallCheck(this,e);var o=possibleConstructorReturn(this,t.call(this,n,r,i));return r.source&&o.ready(function(){this.setSource(r.source)},!0),r.startTime&&o.ready(function(){this.load(),this.play(),this.currentTime(r.startTime)},!0),window_1.videojs=window_1.videojs||{},window_1.videojs.Flash=window_1.videojs.Flash||{},window_1.videojs.Flash.onReady=e.onReady,window_1.videojs.Flash.onEvent=e.onEvent,window_1.videojs.Flash.onError=e.onError,o.on("seeked",function(){this.lastSeekTarget_=undefined}),o}return inherits(e,t),e.prototype.createEl=function(){var t=this.options_;t.swf||(t.swf=unifyProtocol("//imgcache.qq.com/open/qcloud/video/tcplayer/player.swf"));var n=t.techId,r=mergeOptions$1({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:t.autoplay,preload:t.preload,loop:t.loop,muted:t.muted},t.flashVars),i=mergeOptions$1({wmode:"opaque",bgcolor:"#000000"},t.params),o=mergeOptions$1({id:n,name:n,"class":"vjs-tech"},t.attributes);return this.el_=e.embed(t.swf,r,i,o),this.el_.tech=this,this.el_},e.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},e.prototype.pause=function(){this.el_.vjs_pause()},e.prototype.src=function(t){return t===undefined?this.currentSrc():this.setSrc(t)},e.prototype.setSrc=function(t){var e=this;t=Url$1.getAbsoluteURL(t),this.el_.vjs_src(t),this.autoplay()&&this.setTimeout(function(){return e.play()},0)},e.prototype.seeking=function(){return this.lastSeekTarget_!==undefined},e.prototype.setCurrentTime=function(e){var n=this.seekable();n.length&&(e=e>n.start(0)?e:n.start(0),e=e<n.end(n.length-1)?e:n.end(n.length-1),this.lastSeekTarget_=e,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",e),t.prototype.setCurrentTime.call(this))},e.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},e.prototype.duration=function(){if(0===this.readyState())return NaN;var t=this.el_.vjs_getProperty("duration");return t>=0?t:Infinity},e.prototype.load=function(){this.el_.vjs_load()},e.prototype.poster=function(){this.el_.vjs_getProperty("poster")},e.prototype.setPoster=function(){},e.prototype.seekable=function(){var t=this.duration();return 0===t?createTimeRange():createTimeRange(0,t)},e.prototype.buffered=function(){var t=this.el_.vjs_getProperty("buffered");return 0===t.length?createTimeRange():createTimeRange(t[0][0],t[0][1])},e.prototype.supportsFullScreen=function(){return!1},e.prototype.enterFullScreen=function(){return!1},e.prototype.getVideoPlaybackQuality=function(){var t=this.el_.vjs_getProperty("getVideoPlaybackQuality");return window_1.performance&&"function"==typeof window_1.performance.now?t.creationTime=window_1.performance.now():window_1.performance&&window_1.performance.timing&&"number"==typeof window_1.performance.timing.navigationStart&&(t.creationTime=window_1.Date.now()-window_1.performance.timing.navigationStart),t},e}(Tech$2),_readWrite=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","loop","controls","volume","muted","defaultMuted"],_readOnly=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"],_api=Flash.prototype,i$2=0;i$2<_readWrite.length;i$2++)_createGetter(_readWrite[i$2]),_createSetter(_readWrite[i$2]);for(var _i$1=0;_i$1<_readOnly.length;_i$1++)_createGetter(_readOnly[_i$1]);Flash.isSupported=function(){return Flash.version()[0]>=10},Tech$2.withSourceHandlers(Flash),Flash.nativeSourceHandler={},Flash.nativeSourceHandler.canPlayType=function(t){return t in Flash.formats?"maybe":""},Flash.nativeSourceHandler.canHandleSource=function(t,e){var n=void 0;return n=t.type?t.type.replace(/;.*/,"").toLowerCase():function(t){var e=Url$1.getFileExtension(t);return e?"video/"+e:""}(t.src),Flash.nativeSourceHandler.canPlayType(n)},Flash.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},Flash.nativeSourceHandler.dispose=function(){},Flash.registerSourceHandler(Flash.nativeSourceHandler),Flash.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},Flash.onReady=function(t){var e=Dom$1.$("#"+t),n=e&&e.tech;n&&n.el()&&Flash.checkReady(n)},Flash.checkReady=function(t){t.el()&&(t.el().vjs_getProperty?t.triggerReady():this.setTimeout(function(){Flash.checkReady(t)},50))},Flash.onEvent=function(t,e){var n=Dom$1.$("#"+t).tech,r=Array.prototype.slice.call(arguments,2);n.setTimeout(function(){n.trigger(e,r)},1)},Flash.onError=function(t,e){var n=Dom$1.$("#"+t).tech;if("srcnotfound"===e)return n.error(4);n.error("FLASH: "+e)},Flash.version=function(){var t="0,0,0";try{t=new window_1.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(e){try{navigator$2.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(t=(navigator$2.plugins["Shockwave Flash 2.0"]||navigator$2.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(e){}}return t.split(",")},Flash.embed=function(t,e,n,r){var i=Flash.getEmbedCode(t,e,n,r);return Dom$1.createEl("div",{innerHTML:i}).childNodes[0]},Flash.getEmbedCode=function(t,e,n,r){var i="",o="",s="";return e&&Object.getOwnPropertyNames(e).forEach(function(t){i+=t+"="+e[t]+"&amp;"}),n=mergeOptions$1({movie:t,flashvars:i,allowScriptAccess:"always",allowNetworking:"all"},n),Object.getOwnPropertyNames(n).forEach(function(t){o+='<param name="'+t+'" value="'+n[t]+'" />'}),r=mergeOptions$1({data:t,width:"100%",height:"100%"},r),Object.getOwnPropertyNames(r).forEach(function(t){s+=t+'="'+r[t]+'" '}),'<object type="application/x-shockwave-flash" '+s+">"+o+"</object>"},FlashRtmpDecorator(Flash),Tech$2.getTech("Flash")?(videojs.log.warn("Not using videojs-flash as it appears to already be registered"),videojs.log.warn("videojs-flash should only be used with video.js@6 and above")):videojs.registerTech("Flash",Flash);var FlashlsSourceHandler={},mpegurlRE$1=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i;FlashlsSourceHandler.canPlayType=function(t){return mpegurlRE$1.test(t)?"maybe":""},FlashlsSourceHandler.canHandleSource=function(t,e){return"maybe"===FlashlsSourceHandler.canPlayType(t.type)},FlashlsSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},FlashlsSourceHandler.dispose=function(){},videojs.getTech("Flash").registerSourceHandler(FlashlsSourceHandler,0),FlashlsSourceHandler.VERSION="__VERSION__";var Play="播放",Pause="暂停",LIVE="直播",Loaded="加载完毕",Progress="进度",Fullscreen="全屏",Rotate="旋转",CssFullscreen="页面全屏",Mute="静音",Unmute="取消静音",Subtitles="字幕",Captions="内嵌字幕",Chapters="节目段落",Descriptions="描述",Close="关闭",Replay="重播",Text="文字",White="白",Black="黑",Red="红",Green="绿",Blue="蓝",Yellow="黄",Magenta="紫红",Cyan="青",Background="背景",Window="视窗",Transparent="透明",Opaque="不透明",None="无",Raised="浮雕",Depressed="压低",Uniform="均匀",Dropshadow="下阴影",Casual="舒适",Script="手写体",Reset="重启",Done="完成",auto="自动",Mirror="镜像",CN={Play:Play,Pause:Pause,LIVE:LIVE,Loaded:Loaded,Progress:Progress,Fullscreen:Fullscreen,Rotate:Rotate,CssFullscreen:CssFullscreen,Mute:Mute,Unmute:Unmute,Subtitles:Subtitles,Captions:Captions,Chapters:Chapters,Descriptions:Descriptions,Close:Close,Replay:Replay,Text:Text,White:White,Black:Black,Red:Red,Green:Green,Blue:Blue,Yellow:Yellow,Magenta:Magenta,Cyan:Cyan,Background:Background,Window:Window,Transparent:Transparent,Opaque:Opaque,None:None,Raised:Raised,Depressed:Depressed,Uniform:Uniform,Dropshadow:Dropshadow,Casual:Casual,Script:Script,Reset:Reset,Done:Done,auto:auto,Mirror:Mirror,"Current Time":"当前时间","Duration Time":"时长","Remaining Time":"剩余时间","Stream Type":"媒体流类型","Non-Fullscreen":"退出全屏","Picture-in-Picture":"画中画","Exit Picture-in-Picture":"退出画中画","Playback Rate":"播放速度","subtitles off":"关闭字幕","captions off":"关闭内嵌字幕","Close Modal Dialog":"关闭弹窗","descriptions off":"关闭描述","Audio Track":"音轨","You aborted the media playback":"视频播放被终止","A network error caused the media download to fail part-way.":"网络错误导致视频下载中途失败。","The media could not be loaded, either because the server or network failed or because the format is not supported.":"视频因格式不支持或者服务器或网络的问题无法加载。","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。","No compatible source was found for this media.":"无法找到此视频兼容的源或者当前环境无法播放该视频。","The media is encrypted and we do not have the keys to decrypt it.":"视频已加密,无法解密。","Play Video":"播放视频","Modal Window":"弹窗","This is a modal window":"这是一个弹窗","This modal can be closed by pressing the Escape key or activating the close button.":"可以按ESC按键或启用关闭按钮来关闭此弹窗。",", opens captions settings dialog":", 开启标题设置弹窗",", opens subtitles settings dialog":", 开启字幕设置弹窗",", opens descriptions settings dialog":", 开启描述设置弹窗",", selected":", 选择","captions settings":"字幕设定","Audio Player":"音频播放器","Video Player":"视频播放器","Progress Bar":"进度小节","Volume Level":"音量","subtitles settings":"字幕设定","descriptions settings":"描述设定","Semi-Transparent":"半透明","Font Size":"字体尺寸","Text Edge Style":"字体边缘样式","Font Family":"字体库","Proportional Sans-Serif":"比例无细体","Monospace Sans-Serif":"单间隔无细体","Proportional Serif":"比例细体","Monospace Serif":"单间隔细体","Small Caps":"小型大写字体","restore all settings to the default values":"恢复全部设定至预设值","Caption Settings Dialog":"字幕设定视窗","Beginning of dialog window. Escape will cancel and close the window.":"开始对话视窗。离开会取消及关闭视窗","End of dialog window.":"结束对话视窗","Request timed out.":"请求超时,请稍后再试。","Could not download the video.":"无法加载视频,请检查网络。","Server is not respond.":"服务器请求失败,请稍后再试。","Server respond error data.":"服务器返回数据有误,请稍后再试。","Last time play at ":"上次看到 ","Resume play":"恢复播放","Powered by Tencent Cloud.":"腾讯云提供技术支持","Rise an internal exception when playing HLS.":"播放 HLS 时出现内部异常。","Authentication failed.":"防盗链参数鉴权失败。","Server failed.":"媒体服务器错误。","Get file error.":"媒体服务器获取文件错误。","The media file does not exist. Please check if the fileID is correct.":"媒体文件不存在,请检查 fileID 是否正确。","No video transcoding information found.":"没有找到视频转码信息。","Current browser not support DRM.":"浏览器不支持当前 DRM 方案。","The trial duration is illegal. The trial duration must be within the video duration.":"试看时长不合法,试看时长要在视频时长范围内。","Param pcfg is not unique.":"pcfg 不唯一。","The license has expired. Please check whether the expiration time setting is reasonable.":"license 过期,请检查过期时间设置是否合理。","Did not find an adaptive stream that can be played.":"没有找到可以播放的自适应码流,<a href='https://cloud.tencent.com/document/product/266/34071' style='color: white;' target='_blank'>查看文档</a>。","Failed to load hls.js file":"hls.js 文件加载失败","Invalid request format, please check the request format.":"请求格式不合法,请检查请求格式。","AppID is not exist, Please check if the AppID is correct.":"AppID 不存在,请检查 AppID 是否正确。","Without anti-leech information.":"没带防盗链检测。","qsign invalid.":"播放参数 qsign 校验失败","psign check failed.":"播放参数 psign 校验失败,<a href='https://cloud.tencent.com/document/product/266/45554' style='color: white' target='_blank'>查看文档</a>。","Other errors.":"其他错误。","Internal error.":"内部错误。","Response data verification failed.":"响应数据校验失败","Video statistic":"视频统计信息","Play Next":"下一个","Current browser not support play this stream, please select another one.":"无法找到此视频兼容的源或者当前环境无法播放该视频,请选择其他视频播放。","Server respond error data.(eg. stream not exist)":"媒体服务器获取数据异常,可能该视频不存在,请选择其他视频播放。","Video play failed, please refresh to start play again.":"视频播放器失败,请刷新并重新播放。","Connection to the server has failed and the number of connection retries has exceeded the set value.":"媒体服务器连接异常,并达到最大重试次数,请检查网络是否正常并刷新重试","Video decoding failure.":"视频解码失败,请选择其他视频播放。"},log=videojs.log;if(Function.prototype.bind&&"object"==("undefined"==typeof console?"undefined":_typeof(console))&&"object"==_typeof(console.log))for(var logFns=["log","info","warn","error","assert","dir","clear","profile","profileEnd"],i=0;i<logFns.length;i++){var method=logFns[i];console[method]=Function.prototype.call.bind(console[method],console)}return videojs.addLanguage("zh-CN",CN),reportLog({str_ext_content:"load sdk success"}),window_1.addEventListener("error",function(t){reportLog({str_err_info:"window global error: "+t.message})}),Object.keys(videojs).forEach(function(t){TCPlayer[t]=videojs[t]}),TCPlayer});