1 |
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,(function(e,t){function n(e,t){Ye(e).forEach((function(n){return t(e[n],n)}))}function r(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[e].concat(r)):(r.forEach((function(t){t&&n(t,(function(t,n){e[n]=t}))})),e)}function i(e){return!!e&&"object"==typeof e}function o(e){return i(e)&&"[object Object]"===Xe.call(e)&&e.constructor===Object}function a(t,n){if(!t||!n)return"";if("function"==typeof e.getComputedStyle){var r=e.getComputedStyle(t);return r?r.getPropertyValue(n)||r[n]:""}return""}function s(e){return"string"==typeof e&&/\S/.test(e)}function u(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function l(){return t===e.document}function c(e){return i(e)&&1===e.nodeType}function d(){try{return e.parent!==e.self}catch(e){return!0}}function f(e){return function(n,r){if(!s(n))return t[e](null);s(r)&&(r=t.querySelector(r));var i=c(r)?r:t;return i[e]&&i[e](n)}}function h(e,n,r,i){void 0===e&&(e="div"),void 0===n&&(n={}),void 0===r&&(r={});var o=t.createElement(e);return Object.getOwnPropertyNames(n).forEach((function(e){var t=n[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?($e.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+t+"."),o.setAttribute(e,t)):"textContent"===e?p(o,t):o[e]=t})),Object.getOwnPropertyNames(r).forEach((function(e){o.setAttribute(e,r[e])})),i&&R(o,i),o}function p(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function v(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function m(e,t){return u(t),e.classList?e.classList.contains(t):function(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}(t).test(e.className)}function g(e,t){return e?(e.classList?e.classList.add(t):m(e,t)||(e.className=(e.className+" "+t).trim()),e):e}function y(e,t){return e?(e.classList?e.classList.remove(t):(u(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):e}function _(e,t,n){var r=m(e,t);return"function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n===r||(n?g(e,t):y(e,t)),e}function b(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function S(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof e[i]&&-1===",autoplay,stretch,fluent,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),t[i]=o}return t}function T(e,t){return e.getAttribute(t)}function w(e,t,n){e.setAttribute(t,n)}function k(e,t){e.removeAttribute(t)}function E(){t.body.focus(),t.onselectstart=function(){return!1}}function C(){t.onselectstart=function(){return!0}}function A(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(a(e,"height"))),n.width||(n.width=parseFloat(a(e,"width"))),n}}function j(n){var r;if(n.getBoundingClientRect&&n.parentNode&&(r=n.getBoundingClientRect()),!r)return{left:0,top:0};var i=t.documentElement,o=t.body,a=i.clientLeft||o.clientLeft||0,s=e.pageXOffset||o.scrollLeft,u=r.left+s-a,l=i.clientTop||o.clientTop||0,c=e.pageYOffset||o.scrollTop,d=r.top+c-l;return{left:Math.round(u),top:Math.round(d)}}function x(e,t){var n={},r=j(e),i=e.offsetWidth,o=e.offsetHeight,a=r.top,s=r.left,u=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(a-u+o)/o)),n.x=Math.max(0,Math.min(1,(l-s)/i)),n}function P(e){return i(e)&&3===e.nodeType}function L(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function O(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),c(e)||P(e)?e:"string"==typeof e&&/\S/.test(e)?t.createTextNode(e):void 0})).filter((function(e){return e}))}function R(e,t){return O(t).forEach((function(t){return e.appendChild(t)})),e}function I(e,t){return R(L(e),t)}function M(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}function D(){return tt++}function U(e,t){if(et.has(e)){var n=et.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&et.delete(e)}}function B(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function N(n){function r(){return!0}function i(){return!1}if(!n||!n.isPropagationStopped){var o=n||e.event;for(var a in n={},o)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&("returnValue"===a&&o.preventDefault||(n[a]=o[a]));if(n.target||(n.target=n.srcElement||t),n.relatedTarget||(n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement),n.preventDefault=function(){o.preventDefault&&o.preventDefault(),n.returnValue=!1,o.returnValue=!1,n.defaultPrevented=!0},n.defaultPrevented=!1,n.stopPropagation=function(){o.stopPropagation&&o.stopPropagation(),n.cancelBubble=!0,o.cancelBubble=!0,n.isPropagationStopped=r},n.isPropagationStopped=i,n.stopImmediatePropagation=function(){o.stopImmediatePropagation&&o.stopImmediatePropagation(),n.isImmediatePropagationStopped=r,n.stopPropagation()},n.isImmediatePropagationStopped=i,null!==n.clientX&&void 0!==n.clientX){var s=t.documentElement,u=t.body;n.pageX=n.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),n.pageY=n.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}n.which=n.charCode||n.keyCode,null!==n.button&&void 0!==n.button&&(n.button=1&n.button?0:4&n.button?1:2&n.button?2:0)}return n}function F(e,t,n){if(Array.isArray(t))return B(F,e,t,n);et.has(e)||et.set(e,{});var r=et.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=D()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=N(t);var i=r.handlers[t.type];if(i)for(var o=i.slice(0),a=0,s=o.length;a<s&&!t.isImmediatePropagationStopped();a++)try{o[a].call(e,t,n)}catch(e){$e.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;nt&&it.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function V(e,t,n){if(et.has(e)){var r=et.get(e);if(r.handlers){if(Array.isArray(t))return B(V,e,t,n);var i=function(e,t){r.handlers[t]=[],U(e,t)};if(void 0!==t){var o=r.handlers[t];if(o){if(!n)return void i(e,t);if(n.guid)for(var a=0;a<o.length;a++)o[a].guid===n.guid&&o.splice(a--,1);U(e,t)}}else for(var s in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},s)&&i(e,s)}}}function z(e,t,n){var r=et.has(e)?et.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=N(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)z.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){et.has(t.target)||et.set(t.target,{});var o=et.get(t.target);t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)}return!t.defaultPrevented}function H(e,t,n){if(Array.isArray(t))return B(H,e,t,n);var r=function r(){V(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||D(),F(e,t,r)}function G(e,t,n){var r=function r(){V(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||D(),F(e,t,r)}function q(t,n){n&&(rt=n),e.setTimeout(st,t)}function W(t,n){void 0===n&&(n={});var i=n.eventBusKey;if(i){if(!t[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');t.eventBusEl_=t[i]}else t.eventBusEl_=h("span",{className:"vjs-event-bus"});return r(t,Tt),t.eventedCallbacks&&t.eventedCallbacks.forEach((function(e){e()})),t.on("dispose",(function(){t.off(),e.setTimeout((function(){t.eventBusEl_=null}),0)})),t}function $(e,t){return r(e,wt),e.state=r({},e.state,t),"function"==typeof e.handleStateChanged&&vt(e)&&e.on("statechanged",e.handleStateChanged),e}function K(){for(var e={},t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return r.forEach((function(t){t&&n(t,(function(t,n){o(t)?(o(e[n])||(e[n]={}),e[n]=K(e[n],t)):e[n]=t}))})),e}function X(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function J(e,t,n){return(J=Z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Y(i,n.prototype),i}).apply(null,arguments)}function Q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ee(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function te(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:ee.bind(null,"start",0,e),end:ee.bind(null,"end",1,e)}}function ne(e,t){return Array.isArray(e)?te(e):void 0===e||void 0===t?te():te([[e,t]])}function re(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=ne(0,0));for(var o=0;o<e.length;o++)n=e.start(o),(r=e.end(o))>t&&(r=t),i+=r-n;return i/t}function ie(e){if(e instanceof ie)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:i(e)&&("number"==typeof e.code&&(this.code=e.code),r(this,e)),this.message||(this.message=ie.defaultMessages[this.code]||"")}function oe(e){return null!=e&&"function"==typeof e.then}function ae(e){oe(e)&&e.then(null,(function(e){}))}function se(e,t){return e(t={exports:{}},t.exports),t.exports}function ue(e,t,n){var r=e;return xn(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=Kr(t,{uri:e}),r.callback=n,r}function le(e,t,n){return ce(t=ue(e,t,n))}function ce(e){function t(){var e=void 0;if(e=a.response?a.response:a.responseText||function(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}(a),v)try{e=JSON.parse(e)}catch(e){}return e}function n(e){return clearTimeout(l),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,o(e,m)}function r(){if(!u){var n;clearTimeout(l),n=e.useXDR&&void 0===a.status?200:1223===a.status?204:a.status;var r=m,i=null;return 0!==n?(r={body:t(),statusCode:n,method:d,headers:{},url:c,rawRequest:a},a.getAllResponseHeaders&&(r.headers=$r(a.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),o(i,r,r.body)}}if(void 0===e.callback)throw new Error("callback argument missing");var i=!1,o=function(t,n,r){i||(i=!0,e.callback(t,n,r))},a=e.xhr||null;a||(a=e.cors||e.useXDR?new le.XDomainRequest:new le.XMLHttpRequest);var s,u,l,c=a.url=e.uri||e.url,d=a.method=e.method||"GET",f=e.body||e.data,h=a.headers=e.headers||{},p=!!e.sync,v=!1,m={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:a};if("json"in e&&!1!==e.json&&(v=!0,h.accept||h.Accept||(h.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),a.onreadystatechange=function(){4===a.readyState&&setTimeout(r,0)},a.onload=r,a.onerror=n,a.onprogress=function(){},a.onabort=function(){u=!0},a.ontimeout=n,a.open(d,c,!p,e.username,e.password),p||(a.withCredentials=!!e.withCredentials),!p&&e.timeout>0&&(l=setTimeout((function(){if(!u){u=!0,a.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}}),e.timeout)),a.setRequestHeader)for(s in h)h.hasOwnProperty(s)&&a.setRequestHeader(s,h[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(a.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(a),a.send(f||null),a}function de(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function fe(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function he(){this.values=ai(null)}function pe(e,t,n,r){var i=r?e.split(r):[e];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(n);if(2===a.length)t(a[0],a[1])}}function ve(e,t,n){function r(){var t=fe(e);if(null===t)throw new de(de.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function i(){e=e.replace(/^\s+/,"")}var o=e;if(i(),t.startTime=r(),i(),"--\x3e"!==e.substr(0,3))throw new de(de.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),i(),t.endTime=r(),i(),function(e,t){var r=new he;pe(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var o=t.split(","),a=o[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=t.split(","),r.percent(e,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}function me(e,t){function n(e){return si[e]}for(var r,i=e.document.createElement("div"),o=i,a=[];null!==(r=function(){if(!t)return null;var e=t.match(/^([^<]*)(<[^>]*>?)?/);return function(e){return t=t.substr(e.length),e}(e[1]?e[1]:e[2])}());)if("<"!==r[0])o.appendChild(e.document.createTextNode(function(e){for(;l=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(l[0],n);return e}(r)));else{if("/"===r[1]){a.length&&a[a.length-1]===r.substr(2).replace(">","")&&(a.pop(),o=o.parentNode);continue}var s,u=fe(r.substr(1,r.length-2));if(u){s=e.document.createProcessingInstruction("timestamp",u),o.appendChild(s);continue}var l=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!l)continue;if(!(s=function(t,n){var r=ui[t];if(!r)return null;var i=e.document.createElement(r);i.localName=r;var o=li[t];return o&&n&&(i[o]=n.trim()),i}(l[1],l[3])))continue;if(!function(e,t){return!ci[t.localName]||ci[t.localName]===e.localName}(o,s))continue;l[2]&&(s.className=l[2].substr(1).replace("."," ")),a.push(l[1]),o.appendChild(s),o=s}return i}function ge(e){for(var t=0;t<di.length;t++){var n=di[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function ye(e){function t(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function n(e){if(!e||!e.length)return null;var r=e.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):i}return"ruby"===r.tagName?n(e):r.childNodes?(t(e,r),n(e)):void 0}var r=[],i="";if(!e||!e.childNodes)return"ltr";for(t(r,e);i=n(r);)for(var o=0;o<i.length;o++)if(ge(i.charCodeAt(o)))return"rtl";return"ltr"}function _e(){}function be(e,t,n){_e.call(this),this.cue=t,this.cueDiv=me(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:ye(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":i=t.position;break;case"middle":i=t.position-t.size/2;break;case"end":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function Se(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var o=(o=e.div.childNodes)&&(o=o[0])&&o.getClientRects&&o.getClientRects();e=e.div.getBoundingClientRect(),t=o?Math.max(o[0]&&o[0].height||0,e.height/o.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function Te(e,t,n,r){var i=new Se(t),o=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(o),s=[];if(o.snapToLines){var u;switch(o.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(a),d=n[u]+l,f=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),a<0&&(c+=""===o.vertical?n.height:n.width,s=s.reverse()),i.move(f,c)}else{var h=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":a-=h/2;break;case"end":a-=h}switch(o.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}s=["+y","-x","+x","-y"],i=new Se(t)}var p=function(e,t){for(var i,o=new Se(e),a=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var u=e.intersectPercentage(n);a>u&&(i=new Se(e),a=u),e=new Se(o)}return i||o}(i,s);t.move(p.toCSSCompatValues(n))}function we(){}function ke(e){return"string"==typeof e&&!!vi[e.toLowerCase()]&&e.toLowerCase()}function Ee(e,t,n){this.hasBeenReset=!1;var r="",i=!1,o=e,a=t,s=n,u=null,l="",c=!0,d="auto",f="start",h=50,p="middle",v=50,m="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return i},set:function(e){i=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return s},set:function(e){s=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&!!pi[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e&&e!==hi)throw new SyntaxError("An invalid number or illegal string was specified.");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");f=t,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return h},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");h=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return m},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}}}),this.displayState=void 0}function Ce(e){return"number"==typeof e&&e>=0&&e<=100}function Ae(e,t,n){e.setTimeout((function(){return Pe(t,Si[t.type],n,e)}),1)}function je(e,t,n,r){void 0===r&&(r=null);var i="call"+Et(n),o=e.reduce(xe(i),r),a=o===wi,s=a?null:t[n](o);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,s,a),s}function xe(e){return function(t,n){return t===wi?wi:n[e]?n[e](t):t}}function Pe(e,t,n,i,o,a){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===o&&(o=[]),void 0===a&&(a=!1);var s=t,u=s[0],l=s.slice(1);if("string"==typeof u)Pe(e,Si[u],n,i,o,a);else if(u){var c=function(e,t){var n=Ti[e.id()],r=null;if(null==n)return r=t(e),Ti[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var o=n[i],a=o[0],s=o[1];a===t&&(r=s)}return null===r&&(r=t(e),n.push([t,r])),r}(i,u);if(!c.setSource)return o.push(c),Pe(e,l,n,i,o,a);c.setSource(r({},e),(function(t,r){if(t)return Pe(e,l,n,i,o,a);o.push(c),Pe(r,e.type===r.type?l:Si[r.type],n,i,o,a)}))}else l.length?Pe(e,l,n,i,o,a):a?n(e,o):Pe(e,Si["*"],n,i,o,!0)}function Le(e){if(!e.type){var t=ji(e.src);t&&(e.type=t)}return e}function Oe(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Re(e,t,n){try{e.style[t]=n}catch(e){return}}function Ie(e,t){return void 0===t&&(t=e),Vi(e,t)}function Me(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function De(e,t,n){var r=De.getPlayer(e);if(r)return t&&$e.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var o="string"==typeof e?Ze("#"+ba(e)):e;if(!c(o))throw new TypeError("The element or ID supplied is not valid. (videojs)");o.ownerDocument.defaultView&&o.ownerDocument.body.contains(o)||$e.warn("The element supplied is not included in the DOM"),t=t||{},De.hooks("beforesetup").forEach((function(e){var n=e(o,K(t));i(n)&&!Array.isArray(n)?t=K(t,n):$e.error("please return an object in beforesetup hooks")}));var a=Ct.getComponent("Player");return r=new a(o,t,n),De.hooks("setup").forEach((function(e){return e(r)})),r}function Ue(){return(Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Be(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fe(t){for(var n=e.atob(t),r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}function Ve(e,t){return function(n){var r=this;if(!t)return new kd(e);if(kd&&!n){var i=ze(t.toString().replace(/^function.+?{/,"").slice(0,-1));return this[bd]=new kd(i),function(e,t){if(e&&t){var n=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&wd.revokeObjectURL(e.objURL),n.call(e)}}}(this[bd],i),this[bd]}var o={postMessage:function(e){r.onmessage&&setTimeout((function(){r.onmessage({data:e,target:o})}))}};t.call(o),this.postMessage=function(e){setTimeout((function(){o.onmessage({data:e,target:r})}))},this.isThisThread=!0}}function ze(e){try{return wd.createObjectURL(new Blob([e],{type:Sd}))}catch(n){var t=new Td;return t.append(e),wd.createObjectURL(t.getBlob(type))}}function He(){}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var Ge="7.6.3",qe=[],We=function(t,n){return function(r,i,o){var a=n.levels[i],s=new RegExp("^("+a+")$");if("log"!==r&&o.unshift(r.toUpperCase()+":"),o.unshift(t+":"),qe&&qe.push([].concat(o)),e.console){var u=e.console[r];u||"debug"!==r||(u=e.console.info||e.console.log),u&&a&&s.test(r)&&u[Array.isArray(o)?"apply":"call"](e.console,o)}}},$e=function e(t){var n,r="info",i=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=We(t,i),i.createLogger=function(n){return e(t+": "+n)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(i.history=function(){return qe?[].concat(qe):[]}).filter=function(e){return(qe||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},i.history.clear=function(){qe&&(qe.length=0)},i.history.disable=function(){null!==qe&&(qe.length=0,qe=null)},i.history.enable=function(){null===qe&&(qe=[])},i.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},i.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},i.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},i}("VIDEOJS"),Ke=$e.createLogger,Xe=Object.prototype.toString,Ye=function(e){return i(e)?Object.keys(e):[]},Ze=f("querySelector"),Je=f("querySelectorAll"),Qe=Object.freeze({isReal:l,isEl:c,isInFrame:d,createEl:h,textContent:p,prependTo:v,hasClass:m,addClass:g,removeClass:y,toggleClass:_,setAttributes:b,getAttributes:S,getAttribute:T,setAttribute:w,removeAttribute:k,blockTextSelection:E,unblockTextSelection:C,getBoundingClientRect:A,findPosition:j,getPointerPosition:x,isTextNode:P,emptyEl:L,normalizeContent:O,appendContent:R,insertContent:I,isSingleLeftClick:M,$:Ze,$$:Je}),et=new WeakMap,tt=1,nt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){nt=!0}});e.addEventListener("test",null,t),e.removeEventListener("test",null,t)}catch(e){}}();var rt,it=["touchstart","touchmove"],ot=Object.freeze({fixEvent:N,on:F,off:V,trigger:z,one:H,any:G}),at=!1,st=function(){if(l()&&!1!==rt.options.autoSetup){var e=Array.prototype.slice.call(t.getElementsByTagName("video")),n=Array.prototype.slice.call(t.getElementsByTagName("audio")),r=Array.prototype.slice.call(t.getElementsByTagName("video-js")),i=e.concat(n,r);if(i&&i.length>0)for(var o=0,a=i.length;o<a;o++){var s=i[o];if(!s||!s.getAttribute){q(1);break}if(void 0===s.player)null!==s.getAttribute("data-setup")&&rt(s)}else at||q(1)}};l()&&"complete"===t.readyState?at=!0:H(e,"load",(function(){at=!0}));var ut,lt=function(e){var n=t.createElement("style");return n.className=e,n},ct=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},dt=30,ft=function(e,t,n){t.guid||(t.guid=D());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},ht=function(t,n){var r=e.performance.now();return function(){var i=e.performance.now();i-r>=n&&(t.apply(void 0,arguments),r=i)}},pt=function(){};pt.prototype.allowedEvents_={},pt.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},F(this,e,t),this.addEventListener=n},pt.prototype.addEventListener=pt.prototype.on,pt.prototype.off=function(e,t){V(this,e,t)},pt.prototype.removeEventListener=pt.prototype.off,pt.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},H(this,e,t),this.addEventListener=n},pt.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},G(this,e,t),this.addEventListener=n},pt.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=N(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),z(this,e)},pt.prototype.dispatchEvent=pt.prototype.trigger,pt.prototype.queueTrigger=function(t){var n=this;ut||(ut=new Map);var r=t.type||t,i=ut.get(this);i||(i=new Map,ut.set(this,i));var o=i.get(r);i.delete(r),e.clearTimeout(o);var a=e.setTimeout((function(){0===i.size&&(i=null,ut.delete(n)),n.trigger(t)}),0);i.set(r,a)};var vt=function(e){return e instanceof pt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},mt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},gt=function(e){if(!e.nodeName&&!vt(e))throw new Error("Invalid target; must be a DOM node or evented object.")},yt=function(e){if(!mt(e))throw new Error("Invalid event type; must be a non-empty string or array.")},_t=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},bt=function(e,t){var n,r,i,o=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return o?(n=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],i=t[1]):(n=t[0],r=t[1],i=t[2]),gt(n),yt(r),_t(i),{isTargetingSelf:o,target:n,type:r,listener:i=ft(e,i)}},St=function(e,t,n,r){gt(e),e.nodeName?ot[t](e,n,r):e[t](n,r)},Tt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=bt(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(St(a,"on",s,u),!o){var l=function(){return e.off(a,s,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,St(this,"on","dispose",l),St(a,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=bt(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)St(a,"one",s,u);else{var l=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,St(a,"one",s,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=bt(this,n),o=i.isTargetingSelf,a=i.target,s=i.type,u=i.listener;if(o)St(a,"any",s,u);else{var l=function t(){e.off(a,s,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,St(a,"any",s,l)}},off:function(e,t,n){if(!e||mt(e))V(this.eventBusEl_,e,t);else{var r=e,i=t;gt(r),yt(i),_t(n),n=ft(this,n),this.off("dispose",n),r.nodeName?(V(r,i,n),V(r,"dispose",n)):vt(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){return z(this.eventBusEl_,e,t)}},wt={state:{},setState:function(e){var t,r=this;return"function"==typeof e&&(e=e()),n(e,(function(e,n){r.state[n]!==e&&((t=t||{})[n]={from:r.state[n],to:e}),r.state[n]=e})),t&&vt(this)&&this.trigger({changes:t,type:"statechanged"}),t}},kt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},Et=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Ct=function(){function t(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.parentComponent_=null,this.options_=K({},this.options_),t=this.options_=K(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+D()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&W(this,{eventBusKey:this.el_?"el_":null}),$(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var n=t.prototype;return n.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),et.has(this.el_)&&et.delete(this.el_),this.el_=null),this.player_=null},n.player=function(){return this.player_},n.options=function(e){return e?(this.options_=K(this.options_,e),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(e,t,n){return h(e,t,n)},n.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],a=r&&r.split("-")[0],s=i&&i[a],u=n;return o&&o[e]?u=o[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(e){return this.childIndex_[e]},n.getChild=function(e){if(e)return this.childNameIndex_[e]},n.addChild=function(e,n,r){var i,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof e){o=Et(e);var a=n.componentClass||o;n.name=o;var s=t.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;i=new s(this.player_||this,n)}else i=e;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(o=o||i.name&&Et(i.name()))&&(this.childNameIndex_[o]=i,this.childNameIndex_[kt(o)]=i),"function"==typeof i.el&&i.el()){var u=this.contentEl().children[r]||null;this.contentEl().insertBefore(i.el(),u)}return i},n.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Et(e.name())]=null,this.childNameIndex_[kt(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},n.initChildren=function(){var e=this,n=this.options_.children;if(n){var r,i=this.options_,o=t.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(t){var r,i;return"string"==typeof t?i=n[r=t]||e.options_[r]||{}:(r=t.name,i=t),{name:r,opts:i}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||Et(e.name));return n&&!o.isTech(n)})).forEach((function(t){var n=t.name,r=t.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=e.options_.playerOptions;var o=e.addChild(n,r);o&&(e[n]=o)}}))}},n.buildCSSClass=function(){return""},n.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},n.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},n.$=function(e,t){return Ze(e,t||this.contentEl())},n.$$=function(e,t){return Je(e,t||this.contentEl())},n.hasClass=function(e){return m(this.el_,e)},n.addClass=function(e){g(this.el_,e)},n.removeClass=function(e){y(this.el_,e)},n.toggleClass=function(e,t){_(this.el_,e,t)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(e){return T(this.el_,e)},n.setAttribute=function(e,t){w(this.el_,e,t)},n.removeAttribute=function(e){k(this.el_,e)},n.width=function(e,t){return this.dimension("width",e,t)},n.height=function(e,t){return this.dimension("height",e,t)},n.dimensions=function(e,t){this.width(e,!0),this.height(t)},n.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+Et(e)],10)},n.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=a(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Et(e);t=this.el_[n]}return t},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},n.handleKeyPress=function(e){this.handleKeyDown(e)},n.emitTapEvents=function(){var t,n=0,r=null;this.on("touchstart",(function(i){1===i.touches.length&&(r={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},n=e.performance.now(),t=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)t=!1;else if(r){var n=e.touches[0].pageX-r.pageX,i=e.touches[0].pageY-r.pageY;Math.sqrt(n*n+i*i)>10&&(t=!1)}}));var i=function(){t=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){r=null,!0===t&&e.performance.now()-n<200&&(i.preventDefault(),this.trigger("tap"))}))},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=ft(this.player(),this.player().reportUserActivity);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)}},n.setTimeout=function(t,n){var r,i=this;return t=ft(this,t),this.clearTimersOnDispose_(),r=e.setTimeout((function(){i.setTimeoutIds_.has(r)&&i.setTimeoutIds_.delete(r),t()}),n),this.setTimeoutIds_.add(r),r},n.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),e.clearTimeout(t)),t},n.setInterval=function(t,n){t=ft(this,t),this.clearTimersOnDispose_();var r=e.setInterval(t,n);return this.setIntervalIds_.add(r),r},n.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),e.clearInterval(t)),t},n.requestAnimationFrame=function(t){var n,r=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=ft(this,t),n=e.requestAnimationFrame((function(){r.rafIds_.has(n)&&r.rafIds_.delete(n),t()})),this.rafIds_.add(n),n):this.setTimeout(t,1e3/60)},n.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),e.cancelAnimationFrame(t)),t):this.clearTimeout(t)},n.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach(e[r],e)})),e.clearingTimersOnDispose_=!1})))},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)throw new Error('Illegal component, "'+e+'"; '+(i?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");e=Et(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var s=a.players,u=Object.keys(s);if(s&&u.length>0&&u.map((function(e){return s[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,t.components_[kt(e)]=n,n},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();Ct.prototype.supportsRaf_="function"==typeof e.requestAnimationFrame&&"function"==typeof e.cancelAnimationFrame,Ct.registerComponent("Component",Ct);for(var At,jt=e.navigator&&e.navigator.userAgent||"",xt=/AppleWebKit\/([\d.]+)/i.exec(jt),Pt=xt?parseFloat(xt.pop()):null,Lt=/iPad/i.test(jt),Ot=/iPhone/i.test(jt)&&!Lt,Rt=/iPod/i.test(jt),It=Ot||Lt||Rt,Mt=function(){var e=jt.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),Dt=/Android/i.test(jt),Ut=function(){var e=jt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),Bt=Dt&&Ut<5&&Pt<537,Nt=/Firefox/i.test(jt),Ft=/Edge/i.test(jt),Vt=!Ft&&(/Chrome/i.test(jt)||/CriOS/i.test(jt)),zt=function(){var e=jt.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Ht=function(){var e=/MSIE\s(\d+)\.\d/.exec(jt),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(jt)&&/rv:11.0/.test(jt)&&(t=11),t}(),Gt=/Safari/i.test(jt)&&!Vt&&!Dt&&!Ft,qt=(Gt||It)&&!Vt,Wt=/Windows/i.test(jt),$t=(l()&&("ontouchstart"in e||e.navigator.maxTouchPoints||e.DocumentTouch&&e.document instanceof e.DocumentTouch)),Kt=Object.freeze({IS_IPAD:Lt,IS_IPHONE:Ot,IS_IPOD:Rt,IS_IOS:It,IOS_VERSION:Mt,IS_ANDROID:Dt,ANDROID_VERSION:Ut,IS_NATIVE_ANDROID:Bt,IS_FIREFOX:Nt,IS_EDGE:Ft,IS_CHROME:Vt,CHROME_VERSION:zt,IE_VERSION:Ht,IS_SAFARI:Gt,IS_ANY_SAFARI:qt,IS_WINDOWS:Wt,TOUCH_ENABLED:$t}),Xt={prefixed:!0},Yt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Zt=Yt[0],Jt=0;Jt<Yt.length;Jt++)if(Yt[Jt][1]in t){At=Yt[Jt];break}if(At){for(var Qt=0;Qt<At.length;Qt++)Xt[Zt[Qt]]=At[Qt];Xt.prefixed=At[0]!==Zt[0]}ie.prototype.code=0,ie.prototype.message="",ie.prototype.status=null,ie.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ie.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 en=0;en<ie.errorTypes.length;en++)ie[ie.errorTypes[en]]=en,ie.prototype[ie.errorTypes[en]]=en;var tn=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]},nn=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},rn=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=nn(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(nn))},on=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},an=se((function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,o=String(e);return(n=r[o.toLowerCase()])?n:(n=i[o.toLowerCase()])||(1===o.length?o.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var o;if(o=r[t.toLowerCase()])return o===n;if(o=i[t.toLowerCase()])return o===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]})),sn=(an.code,an.codes,an.aliases,an.names,an.title,"vjs-modal-dialog"),un=function(n){function r(e,t){var r;return(r=n.call(this,e,t)||this).opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=h("div",{className:sn+"-content"},{role:"document"}),r.descEl_=h("p",{className:sn+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),p(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}X(r,n);var i=r.prototype;return i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,n.prototype.dispose.call(this)},i.buildCSSClass=function(){return sn+" vjs-hidden "+n.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},i.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},i.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!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)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),I(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},i.empty=function(){this.trigger("beforemodalempty"),L(this.contentEl()),this.trigger("modalempty")},i.content=function(e){return void 0!==e&&(this.content_=e),this.content_},i.conditionalFocus_=function(){var e=t.activeElement,n=this.player_.el_;this.previouslyActiveEl_=null,(n.contains(e)||n===e)&&(this.previouslyActiveEl_=e,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(e){if(e.stopPropagation(),an.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(an.isEventKey(e,"Tab")){for(var n,r=this.focusableEls_(),i=this.el_.querySelector(":focus"),o=0;o<r.length;o++)if(i===r[o]){n=o;break}t.activeElement===this.el_&&(n=0),e.shiftKey&&0===n?(r[r.length-1].focus(),e.preventDefault()):e.shiftKey||n!==r.length-1||(r[0].focus(),e.preventDefault())}},i.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,(function(t){return(t instanceof e.HTMLAnchorElement||t instanceof e.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof e.HTMLInputElement||t instanceof e.HTMLSelectElement||t instanceof e.HTMLTextAreaElement||t instanceof e.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof e.HTMLIFrameElement||t instanceof e.HTMLObjectElement||t instanceof e.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")}))},r}(Ct);un.prototype.options_={pauseOnOpen:!0,temporary:!0},Ct.registerComponent("ModalDialog",un);var ln=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(Q(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}X(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this}))},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(pt);for(var cn in ln.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},ln.prototype.allowedEvents_)ln.prototype["on"+cn]=null;var dn,fn=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},hn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){fn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}X(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&fn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,fn(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(ln),pn=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},vn=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){pn(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(Q(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}X(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&pn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,pn(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(ln),mn=function(e){function t(){return e.apply(this,arguments)||this}X(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(ln),gn=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),yn=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),_n={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},bn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Sn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Tn={disabled:"disabled",hidden:"hidden",showing:"showing"},wn=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+D(),kind:t.kind||"",label:t.label||"",language:t.language||""};for(var i in r)!function(e){Object.defineProperty(Q(n),e,{get:function(){return r[e]},set:function(){}})}(i);return n}return X(t,e),t}(pt),kn=function(n){var r=["protocol","hostname","port","pathname","search","hash","host"],i=t.createElement("a");i.href=n;var o,a=""===i.host&&"file:"!==i.protocol;a&&((o=t.createElement("div")).innerHTML='<a href="'+n+'"></a>',i=o.firstChild,o.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(o));for(var s={},u=0;u<r.length;u++)s[r[u]]=i[r[u]];return"http:"===s.protocol&&(s.host=s.host.replace(/:80$/,"")),"https:"===s.protocol&&(s.host=s.host.replace(/:443$/,"")),s.protocol||(s.protocol=e.location.protocol),a&&t.body.removeChild(o),s},En=function(e){if(!e.match(/^https?:\/\//)){var n=t.createElement("div");n.innerHTML='<a href="'+e+'">x</a>',e=n.firstChild.href}return e},Cn=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},An=function(t){var n=e.location,r=kn(t);return(":"===r.protocol?n.protocol:r.protocol)+r.host!==n.protocol+n.host},jn=Object.freeze({parseUrl:kn,getAbsoluteURL:En,getFileExtension:Cn,isCrossOrigin:An}),xn=function(e){var t=Pn.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Pn=Object.prototype.toString,Ln=Array.prototype.slice,On=Object.prototype.toString,Rn=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==On.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,r=Ln.call(arguments,1),i=function(){if(this instanceof n){var i=t.apply(this,r.concat(Ln.call(arguments)));return Object(i)===i?i:this}return t.apply(e,r.concat(Ln.call(arguments)))},o=Math.max(0,t.length-r.length),a=[],s=0;s<o;s++)a.push("$"+s);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var u=function(){};u.prototype=t.prototype,n.prototype=new u,u.prototype=null}return n},In=Object.prototype.toString,Mn=function(e){var t=In.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===In.call(e.callee)),n};if(!Object.keys){var Dn=Object.prototype.hasOwnProperty,Un=Object.prototype.toString,Bn=Mn,Nn=Object.prototype.propertyIsEnumerable,Fn=!Nn.call({toString:null},"toString"),Vn=Nn.call((function(){}),"prototype"),zn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Hn=function(e){var t=e.constructor;return t&&t.prototype===e},Gn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},qn=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!Gn["$"+e]&&Dn.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Hn(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();dn=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===Un.call(e),r=Bn(e),i=t&&"[object String]"===Un.call(e),o=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Vn&&n;if(i&&e.length>0&&!Dn.call(e,0))for(var s=0;s<e.length;++s)o.push(String(s));if(r&&e.length>0)for(var u=0;u<e.length;++u)o.push(String(u));else for(var l in e)a&&"prototype"===l||!Dn.call(e,l)||o.push(String(l));if(Fn)for(var c=function(e){if("undefined"==typeof window||!qn)return Hn(e);try{return Hn(e)}catch(e){return!1}}(e),d=0;d<zn.length;++d)c&&"constructor"===zn[d]||!Dn.call(e,zn[d])||o.push(zn[d]);return o}}var Wn=dn,$n=Array.prototype.slice,Kn=Object.keys,Xn=Kn?function(e){return Kn(e)}:Wn,Yn=Object.keys;Xn.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return Yn(Mn(e)?$n.call(e):e)}):Object.keys=Xn,Object.keys||Xn};var Zn=Xn,Jn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Qn=Object.prototype.toString,er=Array.prototype.concat,tr=Object.defineProperty,nr=tr&&function(){var e={};try{for(var t in tr(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),rr=function(e,t,n,r){(!(t in e)||function(e){return"function"==typeof e&&"[object Function]"===Qn.call(e)}(r)&&r())&&(nr?tr(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},ir=function(e,t){var n=arguments.length>2?arguments[2]:{},r=Zn(t);Jn&&(r=er.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;i+=1)rr(e,r[i],t[r[i]],n[r[i]])};ir.supportsDescriptors=!!nr;var or=ir,ar=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,ur=Object.getPrototypeOf||function(e){return e.__proto__},lr="undefined"==typeof Uint8Array?void 0:ur(Uint8Array),cr={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":sr?ur([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":void 0,"$ %Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":sr?ur(ur([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&sr?ur((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&sr?ur((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":sr?ur(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":sr?Symbol:void 0,"$ %SymbolPrototype%":sr?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":ar,"$ %TypedArray%":lr,"$ %TypedArrayPrototype%":lr?lr.prototype:void 0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},dr=function(e,t){if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var n="$ "+e;if(!(n in cr))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===cr[n]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return cr[n]},fr=Rn.call(Function.call,Object.prototype.hasOwnProperty),hr=dr("%TypeError%"),pr=dr("%SyntaxError%"),vr={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(fr(t,r)&&!n[r])return!1;var i=fr(t,"[[Value]]"),o=fr(t,"[[Get]]")||fr(t,"[[Set]]");if(i&&o)throw new hr("Property Descriptors may not be both accessor and data descriptors");return!0}},mr=function(e,t,n,r){var i=vr[t];if("function"!=typeof i)throw new pr("unknown record type: "+t);if(!i(e,r))throw new hr(n+" must be a "+t);console.log(i(e,r),r)},gr=Number.isNaN||function(e){return e!=e},yr=Number.isNaN||function(e){return e!=e},_r=Number.isFinite||function(e){return"number"==typeof e&&!yr(e)&&e!==1/0&&e!==-1/0},br=function(e){return e>=0?1:-1},Sr=Function.prototype.toString,Tr=/^\s*class\b/,wr=function(e){try{var t=Sr.call(e);return Tr.test(t)}catch(e){return!1}},kr=Object.prototype.toString,Er="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Cr=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(Er)return function(e){try{return!wr(e)&&(Sr.call(e),!0)}catch(e){return!1}}(e);if(wr(e))return!1;var t=kr.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},Ar=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},jr=Object.prototype.toString,xr=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===jr.call(e)?String:Number)===String||t===Number){var n,r,i=t===String?["toString","valueOf"]:["valueOf","toString"];for(r=0;r<i.length;++r)if(Cr(e[i[r]])&&(n=e[i[r]](),Ar(n)))return n;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")},Pr=dr("%Object%"),Lr=dr("%TypeError%"),Or=dr("%String%"),Rr={ToPrimitive:function(e){return Ar(e)?e:arguments.length>1?xr(e,arguments[1]):xr(e)},ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return gr(t)?0:0!==t&&_r(t)?br(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);return gr(t)||0===t||!_r(t)?0:function(e,t){var n=e%t;return Math.floor(n>=0?n:n+t)}(br(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return Or(e)},ToObject:function(e){return this.CheckObjectCoercible(e),Pr(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new Lr(t||"Cannot call method on "+e);return e},IsCallable:Cr,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:gr(e)&&gr(t)},Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(fr(e,n)&&!t[n])return!1;var r=fr(e,"[[Value]]"),i=fr(e,"[[Get]]")||fr(e,"[[Set]]");if(r&&i)throw new Lr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return void 0!==e&&(mr(this,"Property Descriptor","Desc",e),!(!fr(e,"[[Get]]")&&!fr(e,"[[Set]]")))},IsDataDescriptor:function(e){return void 0!==e&&(mr(this,"Property Descriptor","Desc",e),!(!fr(e,"[[Value]]")&&!fr(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return void 0!==e&&(mr(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if(void 0===e)return e;if(mr(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new Lr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new Lr("ToPropertyDescriptor requires an object");var t={};if(fr(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),fr(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),fr(e,"value")&&(t["[[Value]]"]=e.value),fr(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),fr(e,"get")){var n=e.get;if(void 0!==n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(fr(e,"set")){var r=e.set;if(void 0!==r&&!this.IsCallable(r))throw new Lr("setter must be a function");t["[[Set]]"]=r}if((fr(t,"[[Get]]")||fr(t,"[[Set]]"))&&(fr(t,"[[Value]]")||fr(t,"[[Writable]]")))throw new Lr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},Ir=Rn.call(Function.call,String.prototype.replace),Mr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Dr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,Ur=function(){var e=Rr.ToString(Rr.CheckObjectCoercible(this));return Ir(Ir(e,Mr,""),Dr,"")},Br=function(){return String.prototype.trim&&""==="".trim()?String.prototype.trim:Ur},Nr=Rn.call(Function.call,Br());or(Nr,{getPolyfill:Br,implementation:Ur,shim:function(){var e=Br();return or(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var Fr=Nr,Vr=Object.prototype.toString,zr=Object.prototype.hasOwnProperty,Hr=function(e,t,n){for(var r=0,i=e.length;r<i;r++)zr.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},Gr=function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},qr=function(e,t,n){for(var r in e)zr.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},Wr=function(e,t,n){if(!Cr(t))throw new TypeError("iterator must be a function");var r;arguments.length>=3&&(r=n),"[object Array]"===Vr.call(e)?Hr(e,t,r):"string"==typeof e?Gr(e,t,r):qr(e,t,r)},$r=function(e){if(!e)return{};var t={};return Wr(Fr(e).split("\n"),(function(e){var n=e.indexOf(":"),r=Fr(e.slice(0,n)).toLowerCase(),i=Fr(e.slice(n+1));void 0===t[r]?t[r]=i:function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t[r])?t[r].push(i):t[r]=[t[r],i]})),t},Kr=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)Xr.call(n,r)&&(e[r]=n[r])}return e},Xr=Object.prototype.hasOwnProperty,Yr=le;le.XMLHttpRequest=e.XMLHttpRequest||function(){},le.XDomainRequest="withCredentials"in new le.XMLHttpRequest?le.XMLHttpRequest:e.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){le["delete"===e?"del":e]=function(t,n,r){return(n=ue(t,n,r)).method=e.toUpperCase(),ce(n)}}));var Zr=function(t,n){var r=new e.WebVTT.Parser(e,e.vttjs,e.WebVTT.StringDecoder()),i=[];r.oncue=function(e){n.addCue(e)},r.onparsingerror=function(e){i.push(e)},r.onflush=function(){n.trigger({type:"loadeddata",target:n})},r.parse(t),i.length>0&&(e.console&&e.console.groupCollapsed&&e.console.groupCollapsed("Text Track parsing errors for "+n.src),i.forEach((function(e){return $e.error(e)})),e.console&&e.console.groupEnd&&e.console.groupEnd()),r.flush()},Jr=function(t,n){var r={uri:t},i=An(t);i&&(r.cors=i),Yr(r,ft(this,(function(t,r,i){if(t)return $e.error(t,r);n.loaded_=!0,"function"!=typeof e.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],(function(e){return"vttjserror"===e.type?void $e.error("vttjs failed to load, stopping trying to process "+n.src):Zr(i,n)})):Zr(i,n)})))},Qr=function(t){function n(e){var n;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var r=K(e,{kind:Sn[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=Tn[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=t.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[];var a=new yn(n.cues_),s=new yn(n.activeCues_),u=!1,l=ft(Q(n),(function(){this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1)}));return"disabled"!==i&&n.tech_.ready((function(){n.tech_.on("timeupdate",l)}),!0),Object.defineProperties(Q(n),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return i},set:function(e){var t=this;Tn[e]&&("disabled"!==(i=e)?this.tech_.ready((function(){t.tech_.on("timeupdate",l)}),!0):this.tech_.off("timeupdate",l),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(u=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),r.src?(n.src=r.src,Jr(r.src,Q(n))):n.loaded_=!0,n}X(n,t);var r=n.prototype;return r.addCue=function(t){var n=t;if(e.vttjs&&!(t instanceof e.vttjs.VTTCue)){for(var r in n=new e.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)r in n||(n[r]=t[r]);n.id=t.id,n.originalCue_=t}for(var i=this.tech_.textTracks(),o=0;o<i.length;o++)i[o]!==this&&i[o].removeCue(n);this.cues_.push(n),this.cues.setCues_(this.cues_)},r.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},n}(wn);Qr.prototype.allowedEvents_={cuechange:"cuechange"};var ei=function(e){function t(t){var n;void 0===t&&(t={});var r=K(t,{kind:bn[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(Q(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return X(t,e),t}(wn),ti=function(e){function t(t){var n;void 0===t&&(t={});var r=K(t,{kind:_n[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty(Q(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return X(t,e),t}(wn),ni=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r,i=new Qr(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(Q(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:Q(n)})})),n}return X(t,e),t}(pt);ni.prototype.allowedEvents_={load:"load"},ni.NONE=0,ni.LOADING=1,ni.LOADED=2,ni.ERROR=3;var ri={audio:{ListClass:hn,TrackClass:ei,capitalName:"Audio"},video:{ListClass:vn,TrackClass:ti,capitalName:"Video"},text:{ListClass:mn,TrackClass:Qr,capitalName:"Text"}};Object.keys(ri).forEach((function(e){ri[e].getterName=e+"Tracks",ri[e].privateName=e+"Tracks_"}));var ii={remoteText:{ListClass:mn,TrackClass:Qr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:gn,TrackClass:ni,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},oi=K(ri,ii);ii.names=Object.keys(ii),ri.names=Object.keys(ri),oi.names=[].concat(ii.names).concat(ri.names);var ai=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();de.prototype=ai(Error.prototype),de.prototype.constructor=de,de.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},he.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var si={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},ui={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},li={v:"title",lang:"lang"},ci={rt:"ruby"},di=[[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]];_e.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_e.prototype.formatStyle=function(e,t){return 0===e?0:e+t},be.prototype=ai(_e.prototype),be.prototype.constructor=be,Se.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Se.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Se.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Se.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Se.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},Se.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Se.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Se.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},we.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},we.convertCueToDOMTree=function(e,t){return e&&t?me(e,t):null},we.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.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(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],o=Se.getSimpleBoxPosition(r),a={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var n,s,u=0;u<t.length;u++)s=t[u],n=new be(e,s,a),r.appendChild(n.div),Te(0,n,o,i),s.displayState=n.div,i.push(Se.getSimpleBoxPosition(n))}()}else for(var s=0;s<t.length;s++)r.appendChild(t[s].displayState)},we.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},we.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof de))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){function t(){for(var e=i.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}function n(e){var t=new he;if(pe(e,(function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new he;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;t.set(e+"X",i.get("x")),t.set(e+"Y",i.get("y"));break;case"scroll":t.alt(e,n,["up"])}}),/=/,/\s/),t.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:t.get("id"),region:n})}}function r(e){var t=new he;pe(e,(function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",fe(n))}}),/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}var i=this;e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{var o;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;var a=(o=t()).match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new de(de.Errors.BadSignature);i.state="HEADER"}for(var s=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(s?s=!1:o=t(),i.state){case"HEADER":/:/.test(o)?function(e){e.match(/X-TIMESTAMP-MAP/)?pe(e,(function(e,t){switch(e){case"X-TIMESTAMP-MAP":r(t)}}),/=/):pe(e,(function(e,t){switch(e){case"Region":n(t)}}),/:/)}(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{ve(o,i.cue,i.regionList)}catch(e){i.reportOrThrowError(e),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var u=-1!==o.indexOf("--\x3e");if(!o||u&&(s=!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(e){i.reportOrThrowError(e),"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 e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new de(de.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var fi=we,hi="auto",pi={"":1,lr:1,rl:1},vi={start:1,middle:1,end:1,left:1,right:1};Ee.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var mi=Ee,gi={"":!0,up:!0},yi=function(){var e=100,t=3,n=0,r=100,i=0,o=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Ce(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Ce(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Ce(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!Ce(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Ce(e))throw new Error("ViewportAnchorX must be between 0 and 100.");i=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return"string"==typeof e&&!!gi[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");a=t}}})},_i=se((function(t){var n=t.exports={WebVTT:fi,VTTCue:mi,VTTRegion:yi};e.vttjs=n,e.WebVTT=n.WebVTT;var r=n.VTTCue,i=n.VTTRegion,o=e.VTTCue,a=e.VTTRegion;n.shim=function(){e.VTTCue=r,e.VTTRegion=i},n.restore=function(){e.VTTCue=o,e.VTTRegion=a},e.VTTCue||n.shim()})),bi=(_i.WebVTT,_i.VTTCue,_i.VTTRegion,function(n){function r(e,t){var r;return void 0===e&&(e={}),void 0===t&&(t=function(){}),e.reportTouchActivity=!1,(r=n.call(this,null,e,t)||this).hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),oi.names.forEach((function(t){var n=oi[t];e&&e[n.getterName]&&(r[n.privateName]=e[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===e["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new oi.text.ListClass,r.initTrackListeners(),e.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}X(r,n);var i=r.prototype;return i.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},i.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ft(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},i.onDurationChange=function(e){this.duration_=this.duration()},i.buffered=function(){return ne(0,0)},i.bufferedPercent=function(){return re(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks(ri.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),n.prototype.dispose.call(this)},i.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},i.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},i.reset=function(){},i.error=function(e){return void 0!==e&&(this.error_=new ie(e),this.trigger("error")),this.error_},i.played=function(){return this.hasStarted_?ne(0,0):ne()},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){var e=this;ri.names.forEach((function(t){var n=ri[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},i.addWebVttScript_=function(){var n=this;if(!e.WebVTT)if(t.body.contains(this.el())){if(!this.options_["vtt.js"]&&o(_i)&&Object.keys(_i).length>0)return void this.trigger("vttjsloaded");var r=t.createElement("script");r.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",r.onload=function(){n.trigger("vttjsloaded")},r.onerror=function(){n.trigger("vttjserror")},this.on("dispose",(function(){r.onload=null,r.onerror=null})),e.WebVTT=!0,this.el().parentNode.appendChild(r)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return e.trigger("texttrackchange")},a=function(){o();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++)t[e].removeEventListener("cuechange",o)}))},i.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var o=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var a=new oi.text.TrackClass(i);return o.addTrack(a),a}(this,e,t,n)},i.createRemoteTextTrack=function(e){var t=K(e,{tech:this});return new ii.remoteTextEl.TrackClass(t)},i.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&($e.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},i.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){var t=this.options_.Promise||e.Promise;if(t)return t.reject()},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},r.canPlayType=function(){return""},r.canPlaySource=function(e,t){return r.canPlayType(e.type)},r.isTech=function(e){return e.prototype instanceof r||e instanceof r||e===r},r.registerTech=function(e,t){if(r.techs_||(r.techs_={}),!r.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!r.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!r.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Et(e),r.techs_[e]=t,r.techs_[kt(e)]=t,"Tech"!==e&&r.defaultTechOrder_.push(e),t},r.getTech=function(t){if(t)return r.techs_&&r.techs_[t]?r.techs_[t]:(t=Et(t),e&&e.videojs&&e.videojs[t]?($e.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),e.videojs[t]):void 0)},r}(Ct));oi.names.forEach((function(e){var t=oi[e];bi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),bi.prototype.featuresVolumeControl=!0,bi.prototype.featuresMuteControl=!0,bi.prototype.featuresFullscreenResize=!1,bi.prototype.featuresPlaybackRate=!1,bi.prototype.featuresProgressEvents=!1,bi.prototype.featuresSourceset=!1,bi.prototype.featuresTimeupdateEvents=!1,bi.prototype.featuresNativeTextTracks=!1,bi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""},["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:$e.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler)},e.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)}},Ct.registerComponent("Tech",bi),bi.registerTech("Tech",bi),bi.defaultTechOrder_=[];var Si={},Ti={},wi={},ki={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1,volume:1},Ei={setCurrentTime:1,setVolume:1},Ci={play:1,pause:1},Ai={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",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ji=function(e){void 0===e&&(e="");var t=Cn(e);return Ai[t.toLowerCase()]||""},xi=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):i(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Le({src:t})]:i(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Le(t)]:[];return t},Pi=function(e){function t(t,n,r){var i,o=K({createEl:!1},n);if(i=e.call(this,t,o,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var a=0,s=n.playerOptions.techOrder;a<s.length;a++){var u=Et(s[a]),l=bi.getTech(u);if(u||(l=Ct.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return X(t,e),t}(Ct);Ct.registerComponent("MediaLoader",Pi);var Li=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).emitTapEvents(),r.enable(),r}X(t,e);var n=t.prototype;return n.createEl=function(t,n,i){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===i&&(i={}),n=r({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&$e.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),i=r({role:"button"},i),this.tabIndex_=n.tabIndex;var o=e.prototype.createEl.call(this,t,n,i);return this.createControlTextEl(o),o},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=h("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,p(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},n.handleClick=function(e){},n.handleKeyDown=function(t){an.isEventKey(t,"Space")||an.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Ct);Ct.registerComponent("ClickableComponent",Li);var Oi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),t.on("posterchange",ft(Q(r),r.update)),r}X(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},n.createEl=function(){return h("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?ae(this.player_.play()):this.player_.pause())},t}(Li);Ct.registerComponent("PosterImage",Oi);var Ri={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},Ii=function(t){function n(n,r,i){var o;o=t.call(this,n,r,i)||this;var a=ft(Q(o),o.updateDisplay);return n.on("loadstart",ft(Q(o),o.toggleDisplay)),n.on("texttrackchange",a),n.on("loadedmetadata",ft(Q(o),o.preselectTrack)),n.ready(ft(Q(o),(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",a),n.on("playerresize",a),e.addEventListener("orientationchange",a),n.on("dispose",(function(){return e.removeEventListener("orientationchange",a)}));for(var t=this.options_.playerOptions.tracks||[],r=0;r<t.length;r++)this.player_.addRemoteTextTrack(t[r],!0);this.preselectTrack()}}))),o}X(n,t);var r=n.prototype;return r.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),o=this.player_.cache_.selectedLanguage,a=0;a<i.length;a++){var s=i[a];o&&o.enabled&&o.language&&o.language===s.language&&s.kind in r?s.kind===o.kind?n=s:n||(n=s):o&&!o.enabled?(n=null,e=null,t=null):s.default&&("descriptions"!==s.kind||e?s.kind in r&&!t&&(t=s):e=s)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},r.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},r.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},r.clearDisplay=function(){"function"==typeof e.WebVTT&&e.WebVTT.processCues(e,[],this.el_)},r.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var o=null,a=null,s=e.length;s--;){var u=e[s];"showing"===u.mode&&("descriptions"===u.kind?o=u:a=u)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},r.updateDisplayState=function(t){for(var n=this.player_.textTrackSettings.getValues(),r=t.activeCues,i=r.length;i--;){var o=r[i];if(o){var a=o.displayState;if(n.color&&(a.firstChild.style.color=n.color),n.textOpacity&&Re(a.firstChild,"color",Oe(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(a.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Re(a.firstChild,"backgroundColor",Oe(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Re(a,"backgroundColor",Oe(n.windowColor,n.windowOpacity)):a.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===n.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===n.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===n.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),n.fontPercent&&1!==n.fontPercent){var s=e.parseFloat(a.style.fontSize);a.style.fontSize=s*n.fontPercent+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Ri[n.fontFamily])}}},r.updateForTrack=function(t){if(Array.isArray(t)||(t=[t]),"function"==typeof e.WebVTT&&!t.every((function(e){return!e.activeCues}))){for(var n=[],r=0;r<t.length;++r)for(var i=t[r],o=0;o<i.activeCues.length;++o)n.push(i.activeCues[o]);e.WebVTT.processCues(e,n,this.el_);for(var a=0;a<t.length;++a){for(var s=t[a],u=0;u<s.activeCues.length;++u){var l=s.activeCues[u].displayState;g(l,"vjs-text-track-cue"),g(l,"vjs-text-track-cue-"+(s.language?s.language:a))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},n}(Ct);Ct.registerComponent("TextTrackDisplay",Ii);var Mi=function(e){function t(){return e.apply(this,arguments)||this}return X(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=h("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(Ct);Ct.registerComponent("LoadingSpinner",Mi);var Di=function(e){function t(){return e.apply(this,arguments)||this}X(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=r({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=r({type:"button"},n);var i=Ct.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(i),i},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return $e.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Ct.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){an.isEventKey(t,"Space")||an.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(Li);Ct.registerComponent("Button",Di);var Ui=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)return ae(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};oe(t)?t.then(i,(function(){})):this.setTimeout(i,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(Di);Ui.prototype.controlText_="Play Video",Ct.registerComponent("BigPlayButton",Ui);var Bi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){an.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Di);Ct.registerComponent("CloseButton",Bi);var Ni=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",r.handlePlay),r.on(t,"pause",r.handlePause),n.replay&&r.on(t,"ended",r.handleEnded),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Di);Ni.prototype.controlText_="Play",Ct.registerComponent("PlayToggle",Ni);var Fi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)},Vi=Fi,zi=function(e){function n(t,n){var r;return(r=e.call(this,t,n)||this).throttledUpdateContent=ht(ft(Q(r),r.updateContent),dt),r.on(t,"timeupdate",r.throttledUpdateContent),r}X(n,e);var r=n.prototype;return r.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=h("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),n.appendChild(this.contentEl_),n},r.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},r.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=t.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},r.formatTime_=function(e){return Ie(e)},r.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},r.updateContent=function(e){},n}(Ct);zi.prototype.labelText_="Time",zi.prototype.controlText_="Time",Ct.registerComponent("TimeDisplay",zi);var Hi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"ended",r.handleEnded),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},n.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(zi);Hi.prototype.labelText_="Current Time",Hi.prototype.controlText_="Current Time",Ct.registerComponent("CurrentTimeDisplay",Hi);var Gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.updateContent),r.on(t,"loadstart",r.updateContent),r.on(t,"loadedmetadata",r.throttledUpdateContent),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},t}(zi);Gi.prototype.labelText_="Duration",Gi.prototype.controlText_="Duration",Ct.registerComponent("DurationDisplay",Gi);var qi=function(e){function t(){return e.apply(this,arguments)||this}return X(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(Ct);Ct.registerComponent("TimeDivider",qi);var Wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",r.throttledUpdateContent),r.on(t,"ended",r.handleEnded),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(h("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){"number"==typeof this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},n.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},t}(zi);Wi.prototype.labelText_="Remaining Time",Wi.prototype.controlText_="Remaining Time",Ct.registerComponent("RemainingTimeDisplay",Wi);var $i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}X(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=h("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Ct);Ct.registerComponent("LiveDisplay",$i);var Ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}X(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=h("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(e){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,e.prototype.dispose.call(this)},t}(Di);Ki.prototype.controlText_="Seek to live, currently playing live",Ct.registerComponent("SeekToLive",Ki);var Xi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}X(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n.className=n.className+" vjs-slider",n=r({tabIndex:0},n),i=r({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),e.prototype.createEl.call(this,t,n,i)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Vt||e.preventDefault(),E(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;C(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},n.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",r=t.el().style,i=this.vertical()?"height":"width";return r[i]!==n&&(r[i]=n),e}}},n.calculateDistance=function(e){var t=x(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){an.isEventKey(t,"Left")||an.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):an.isEventKey(t,"Right")||an.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Ct);Ct.registerComponent("Slider",Xi);var Yi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",r.update),r}X(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+'</span>: <span class="vjs-control-text-loaded-percentage">0%</span></span>'})},n.dispose=function(){this.partEls_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this.player_.liveTracker,n=this.player_.buffered(),r=t&&t.isLive()?t.seekableEnd():this.player_.duration(),i=this.player_.bufferedEnd(),o=this.partEls_,a=this.$(".vjs-control-text-loaded-percentage"),s=function(e,t,n){var r=e/t||0;return r=100*(r>=1?1:r),n&&(r=r.toFixed(2)),r+"%"};this.el_.style.width=s(i,r),p(a,s(i,r,!0));for(var u=0;u<n.length;u++){var l=n.start(u),c=n.end(u),d=o[u];d||(d=this.el_.appendChild(h()),o[u]=d),d.style.left=s(l,i),d.style.width=s(c-l,i)}for(var f=o.length;f>n.length;f--)this.el_.removeChild(o[f-1]);o.length=n.length},t}(Ct);Ct.registerComponent("LoadProgressBar",Yi);var Zi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=ht(ft(Q(r),r.update),dt),r}X(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=A(this.el_),i=A(this.player_.el()),o=e.width*t;if(i&&r){var a=e.left-i.left+o,s=e.width-o+(i.right-e.right),u=r.width/2;a<u?u+=u-a:s<u&&(u=s),u<0?u=0:u>r.width&&(u=r.width),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){p(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var o,a=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var s=i.player_.liveTracker.liveWindow(),u=s-t*s;o=(u<1?"":"-")+Ie(u,s)}else o=Ie(n,a);i.update(e,t,o),r&&r()}))},t}(Ct);Ct.registerComponent("TimeTooltip",Zi);var Ji=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=ht(ft(Q(r),r.update),dt),r}X(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Ct);Ji.prototype.options_={children:[]},It||Dt||Ji.prototype.options_.children.push("timeTooltip"),Ct.registerComponent("PlayProgressBar",Ji);var Qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=ht(ft(Q(r),r.update),dt),r}X(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Ct);Qi.prototype.options_={children:["timeTooltip"]},Ct.registerComponent("MouseTimeDisplay",Qi);var eo=function(e){function n(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}X(n,e);var r=n.prototype;return r.setEventHandlers_=function(){this.update=ht(ft(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in t&&"visibilityState"in t&&this.on(t,"visibilitychange",this.toggleVisibility_)},r.toggleVisibility_=function(e){t.hidden?this.disableInterval_(e):(this.enableInterval_(),this.requestAnimationFrame(this.update))},r.enableInterval_=function(){var e=this;this.clearInterval(this.updateInterval),this.updateInterval=this.setInterval((function(){e.requestAnimationFrame(e.update)}),30)},r.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&"ended"!==e.type||this.clearInterval(this.updateInterval)},r.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},r.update_=function(e,t){var n=this.player_.liveTracker,r=this.player_.duration();n&&n.isLive()&&(r=this.player_.liveTracker.liveCurrentTime()),this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Ie(e,r),Ie(r,r)],"{1} of {2}")),this.bar&&this.bar.update(A(this.el_),t)},r.update=function(t){if(null!==this.el().offsetParent){var n=e.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n}},r.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},r.handleEnded=function(e){this.update_(this.player_.duration(),1)},r.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e>=1?1:e||0},r.handleMouseDown=function(t){M(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},r.handleMouseMove=function(e){if(M(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){var i=r.seekableStart(),o=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=o&&(t=o),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},r.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},r.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},r.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&ae(this.player_.play())},r.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},r.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},r.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},r.handleKeyDown=function(t){if(an.isEventKey(t,"Space")||an.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(an.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(an.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(an(t))){t.preventDefault(),t.stopPropagation();var n=10*(an.codes[an(t)]-an.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else an.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):an.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n}(Xi);eo.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},It||Dt||eo.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Ct.registerComponent("SeekBar",eo);var to=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=ht(ft(Q(r),r.handleMouseMove),dt),r.throttledHandleMouseSeek=ht(ft(Q(r),r.handleMouseSeek),dt),r.enable(),r}X(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),r=t.el(),i=A(r),o=x(r,e).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t}(Ct);to.prototype.options_={children:["seekBar"]},Ct.registerComponent("ProgressControl",to);var no=function(e){function n(n,r){var i;return(i=e.call(this,n,r)||this).on(n,["enterpictureinpicture","leavepictureinpicture"],i.handlePictureInPictureChange),t.pictureInPictureEnabled||i.disable(),i}X(n,e);var r=n.prototype;return r.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},r.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")},r.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},n}(Di);no.prototype.controlText_="Picture-in-Picture",Ct.registerComponent("PictureInPictureToggle",no);var ro=function(e){function n(n,r){var i;return(i=e.call(this,n,r)||this).on(n,"fullscreenchange",i.handleFullscreenChange),!1===t[n.fsApi_.fullscreenEnabled]&&i.disable(),i}X(n,e);var r=n.prototype;return r.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},r.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},r.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},n}(Di);ro.prototype.controlText_="Fullscreen",Ct.registerComponent("FullscreenToggle",ro);var io=function(e){function t(){return e.apply(this,arguments)||this}return X(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(Ct);Ct.registerComponent("VolumeLevel",io);var oo=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",r.updateLastVolume_),r.on(t,"volumechange",r.updateARIAAttributes),t.ready((function(){return r.updateARIAAttributes()})),r}X(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){M(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){M(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(Xi);oo.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},oo.prototype.playerEvent="volumechange",Ct.registerComponent("VolumeBar",oo);var ao=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||o(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(Q(r=e.call(this,t,n)||this),t),r.throttledHandleMouseMove=ht(ft(Q(r),r.handleMouseMove),dt),r.on("mousedown",r.handleMouseDown),r.on("touchstart",r.handleMouseDown),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}X(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Ct);ao.prototype.options_={children:["volumeBar"]},Ct.registerComponent("VolumeControl",ao);var so=function(e){function t(t,n){var r;return function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(Q(r=e.call(this,t,n)||this),t),r.on(t,["loadstart","volumechange"],r.update),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;It&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)y(this.el_,"vjs-vol-"+n);g(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Di);so.prototype.controlText_="Mute",Ct.registerComponent("MuteToggle",so);var uo=function(e){function n(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||o(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).on(t,["loadstart"],r.volumePanelState_),r.on(r.muteToggle,"keyup",r.handleKeyPress),r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp),r.on("keydown",r.handleKeyPress),r.on("mouseover",r.handleMouseOver),r.on("mouseout",r.handleMouseOut),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}X(n,e);var r=n.prototype;return r.sliderActive_=function(){this.addClass("vjs-slider-active")},r.sliderInactive_=function(){this.removeClass("vjs-slider-active")},r.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},r.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},r.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},r.handleVolumeControlKeyUp=function(e){an.isEventKey(e,"Esc")&&this.muteToggle.focus()},r.handleMouseOver=function(e){this.addClass("vjs-hover"),F(t,"keyup",ft(this,this.handleKeyPress))},r.handleMouseOut=function(e){this.removeClass("vjs-hover"),V(t,"keyup",ft(this,this.handleKeyPress))},r.handleKeyPress=function(e){an.isEventKey(e,"Esc")&&this.handleMouseOut()},n}(Ct);uo.prototype.options_={children:["muteToggle","volumeControl"]},Ct.registerComponent("VolumePanel",uo);var lo=function(e){function n(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=ft(Q(r),r.handleBlur),r.boundHandleTapClick_=ft(Q(r),r.handleTapClick),r}X(n,e);var r=n.prototype;return r.addEventListenerForItem=function(e){e instanceof Ct&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},r.removeEventListenerForItem=function(e){e instanceof Ct&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},r.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},r.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},r.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=h(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),F(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},r.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},r.handleBlur=function(e){var n=e.relatedTarget||t.activeElement;if(!this.children().some((function(e){return e.el()===n}))){var r=this.menuButton_;r&&r.buttonPressed_&&n!==r.el().firstChild&&r.unpressButton()}},r.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},r.handleKeyDown=function(e){an.isEventKey(e,"Left")||an.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(an.isEventKey(e,"Right")||an.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},r.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},r.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},r.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},n}(Ct);Ct.registerComponent("Menu",lo);var co=function(e){function n(n,r){var i;void 0===r&&(r={}),(i=e.call(this,n,r)||this).menuButton_=new Di(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=Di.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"keydown",i.handleKeyDown),i.on(i.menuButton_,"mouseenter",(function(){i.addClass("vjs-hover"),i.menu.show(),F(t,"keyup",ft(Q(i),i.handleMenuKeyUp))})),i.on("mouseleave",i.handleMouseLeave),i.on("keydown",i.handleSubmenuKeyDown),i}X(n,e);var r=n.prototype;return r.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},r.createMenu=function(){var e=new lo(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=h("li",{className:"vjs-menu-title",innerHTML:Et(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new Ct(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},r.createItems=function(){},r.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},r.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Di.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},r.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},r.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},r.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},r.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},r.handleMouseLeave=function(e){this.removeClass("vjs-hover"),V(t,"keyup",ft(this,this.handleMenuKeyUp))},r.focus=function(){this.menuButton_.focus()},r.blur=function(){this.menuButton_.blur()},r.handleKeyDown=function(e){an.isEventKey(e,"Esc")||an.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),an.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(an.isEventKey(e,"Up")||an.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},r.handleMenuKeyUp=function(e){(an.isEventKey(e,"Esc")||an.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},r.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},r.handleSubmenuKeyDown=function(e){(an.isEventKey(e,"Esc")||an.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),an.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},r.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),It&&d())return;this.menu.focus()}},r.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},r.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},r.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},n}(Ct);Ct.registerComponent("MenuButton",co);var fo=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return Q(r);var o=ft(Q(r),r.update);return i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),r.player_.on("ready",o),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o)})),r}return X(t,e),t}(co);Ct.registerComponent("TrackButton",fo);var ho=["Tab","Esc","Up","Down","Right","Left"],po=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}X(t,e);var n=t.prototype;return n.createEl=function(t,n,i){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",r({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),i)},n.handleKeyDown=function(t){ho.some((function(e){return an.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Li);Ct.registerComponent("MenuItem",po);var vo=function(n){function r(r,i){var o,a=i.track,s=r.textTracks();i.label=a.label||a.language||"Unknown",i.selected="showing"===a.mode,(o=n.call(this,r,i)||this).track=a,o.kinds=(i.kinds||[i.kind||o.track.kind]).filter(Boolean);var u,l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.handleTracksChange.apply(Q(o),t)},c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.handleSelectedLanguageChange.apply(Q(o),t)};(r.on(["loadstart","texttrackchange"],l),s.addEventListener("change",l),s.addEventListener("selectedlanguagechange",c),o.on("dispose",(function(){r.off(["loadstart","texttrackchange"],l),s.removeEventListener("change",l),s.removeEventListener("selectedlanguagechange",c)})),void 0===s.onchange)&&o.on(["tap","click"],(function(){if("object"!=typeof e.Event)try{u=new e.Event("change")}catch(e){}u||(u=t.createEvent("Event")).initEvent("change",!0,!0),s.dispatchEvent(u)}));return o.handleTracksChange(),o}X(r,n);var i=r.prototype;return i.handleClick=function(e){var t=this.track,r=this.player_.textTracks();if(n.prototype.handleClick.call(this,e),r)for(var i=0;i<r.length;i++){var o=r[i];-1!==this.kinds.indexOf(o.kind)&&(o===t?"showing"!==o.mode&&(o.mode="showing"):"disabled"!==o.mode&&(o.mode="disabled"))}},i.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},i.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},i.dispose=function(){this.track=null,n.prototype.dispose.call(this)},r}(po);Ct.registerComponent("TextTrackMenuItem",vo);var mo=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}X(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var o=t[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(vo);Ct.registerComponent("OffTextTrackMenuItem",mo);var go=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return X(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=vo),this.label_&&(n=this.label_+" off"),e.push(new mo(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var a=new t(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+o.kind+"-menu-item"),e.push(a)}}return e},t}(fo);Ct.registerComponent("TextTrackButton",go);var yo=function(e){function t(t,n){var r,i=n.track,o=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=o,i.addEventListener("cuechange",ft(Q(r),r.update)),r}X(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(po);Ct.registerComponent("ChaptersTrackMenuItem",yo);var _o=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Et(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new yo(this.player_,{track:this.track_,cue:i});e.push(o)}return e},t}(go);_o.prototype.kind_="chapters",_o.prototype.controlText_="Chapters",Ct.registerComponent("ChaptersButton",_o);var bo=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=t.textTracks(),a=ft(Q(i),i.handleTracksChange);return o.addEventListener("change",a),i.on("dispose",(function(){o.removeEventListener("change",a)})),i}X(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var o=t[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(go);bo.prototype.kind_="descriptions",bo.prototype.controlText_="Descriptions",Ct.registerComponent("DescriptionsButton",bo);var So=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(go);So.prototype.kind_="subtitles",So.prototype.controlText_="Subtitles",Ct.registerComponent("SubtitlesButton",So);var To=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return X(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(vo);Ct.registerComponent("CaptionSettingsMenuItem",To);var wo=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new To(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(go);wo.prototype.kind_="captions",wo.prototype.controlText_="Captions",Ct.registerComponent("CaptionsButton",wo);var ko=function(e){function t(){return e.apply(this,arguments)||this}return X(t,e),t.prototype.createEl=function(t,n,i){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(o+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),o+="</span>",e.prototype.createEl.call(this,t,r({innerHTML:o},n),i)},t}(vo);Ct.registerComponent("SubsCapsMenuItem",ko);var Eo=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(Et(r.label_)),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new To(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t,ko)},t}(go);Eo.prototype.kinds_=["captions","subtitles"],Eo.prototype.controlText_="Subtitles",Ct.registerComponent("SubsCapsButton",Eo);var Co=function(e){function t(t,n){var r,i=n.track,o=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(Q(r),t)};return o.addEventListener("change",a),r.on("dispose",(function(){o.removeEventListener("change",a)})),r}X(t,e);var n=t.prototype;return n.createEl=function(t,n,i){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(o+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),o+="</span>",e.prototype.createEl.call(this,t,r({innerHTML:o},n),i)},n.handleClick=function(t){var n=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(po);Ct.registerComponent("AudioTrackMenuItem",Co);var Ao=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new Co(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(fo);Ao.prototype.controlText_="Audio Track",Ct.registerComponent("AudioTrackButton",Ao);var jo=function(e){function t(t,n){var r,i=n.rate,o=parseFloat(i,10);return n.label=i,n.selected=1===o,n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=o,r.on(t,"ratechange",r.update),r}X(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(po);jo.prototype.contentElType="button",Ct.registerComponent("PlaybackRateMenuItem",jo);var xo=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateVisibility(),r.updateLabel(),r.on(t,"loadstart",r.updateVisibility),r.on(t,"ratechange",r.updateLabel),r}X(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=h("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var e=new lo(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new jo(this.player(),{rate:t[n]+"x"}));return e},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(co);xo.prototype.controlText_="Playback Rate",Ct.registerComponent("PlaybackRateMenuButton",xo);var Po=function(e){function t(){return e.apply(this,arguments)||this}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(Ct);Ct.registerComponent("Spacer",Po);var Lo=function(e){function t(){return e.apply(this,arguments)||this}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Po);Ct.registerComponent("CustomControlSpacer",Lo);var Oo=function(e){function t(){return e.apply(this,arguments)||this}return X(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Ct);Oo.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in t&&Oo.prototype.options_.children.splice(Oo.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Ct.registerComponent("ControlBar",Oo);var Ro=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",r.open),r}X(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(un);Ro.prototype.options_=K(un.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ct.registerComponent("ErrorDisplay",Ro);var Io=["#000","Black"],Mo=["#00F","Blue"],Do=["#0FF","Cyan"],Uo=["#0F0","Green"],Bo=["#F0F","Magenta"],No=["#F00","Red"],Fo=["#FFF","White"],Vo=["#FF0","Yellow"],zo=["1","Opaque"],Ho=["0.5","Semi-Transparent"],Go=["0","Transparent"],qo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Io,Fo,No,Uo,Mo,Vo,Bo,Do]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[zo,Ho,Go]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Fo,Io,No,Uo,Mo,Vo,Bo,Do]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[zo,Ho]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Go,Ho,zo]}};qo.windowColor.options=qo.backgroundColor.options;var Wo=function(t){function r(e,r){var i;return r.temporary=!1,(i=t.call(this,e,r)||this).updateDisplay=ft(Q(i),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=h("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===r.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",(function(){i.saveSettings(),i.close()})),i.on(i.$(".vjs-default-button"),"click",(function(){i.setDefaults(),i.updateDisplay()})),n(qo,(function(e){i.on(i.$(e.selector),"change",i.updateDisplay)})),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}X(r,t);var i=r.prototype;return i.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},i.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=qo[e],o=i.id.replace("%s",this.id_),a=[t,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(i.options.map((function(e){var t=o+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},i.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},i.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},i.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},i.createElColors_=function(){return h("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return h("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},i.createElControls_=function(){var e=this.localize("restore all settings to the default values");return h("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var e=this;return function(e,t,n){return void 0===n&&(n=0),Ye(e).reduce((function(n,r){return t(n,e[r],r)}),n)}(qo,(function(t,n,r){var i=function(e,t){return Me(e.options[e.options.selectedIndex].value,t)}(e.$(n.selector),n.parser);return void 0!==i&&(t[r]=i),t}),{})},i.setValues=function(e){var t=this;n(qo,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(Me(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},i.setDefaults=function(){var e=this;n(qo,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},i.restoreSettings=function(){var t;try{t=JSON.parse(e.localStorage.getItem("vjs-text-track-settings"))}catch(e){$e.warn(e)}t&&this.setValues(t)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?e.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):e.localStorage.removeItem("vjs-text-track-settings")}catch(e){$e.warn(e)}}},i.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},r}(un);Ct.registerComponent("TextTrackSettings",Wo);var $o=function(t){function n(n,r){var i,o=r.ResizeObserver||e.ResizeObserver;null===r.ResizeObserver&&(o=!1);var a=K({createEl:!o,reportTouchActivity:!1},r);return(i=t.call(this,n,a)||this).ResizeObserver=r.ResizeObserver||e.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=function(t,n,r,i){void 0===i&&(i=e);var o,a=function(){var e=this,a=arguments,s=function(){o=null,s=null,r||t.apply(e,a)};!o&&r&&t.apply(e,a),i.clearTimeout(o),o=i.setTimeout(s,n)};return a.cancel=function(){i.clearTimeout(o),o=null},a}((function(){i.resizeHandler()}),100,!1,Q(i)),o?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(n.el())):(i.loadListener_=function(){if(i.el_&&i.el_.contentWindow){var e=i.debouncedHandler_,t=i.unloadListener_=function(){V(this,"resize",e),V(this,"unload",t),t=null};F(i.el_.contentWindow,"unload",t),F(i.el_.contentWindow,"resize",e)}},i.one("load",i.loadListener_)),i}X(n,t);var r=n.prototype;return r.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},r.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},r.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,t.prototype.dispose.call(this)},n}(Ct);Ct.registerComponent("ResizeManager",$o);var Ko=function(e){function n(n,r){var i,o=K({createEl:!1},r);return(i=e.call(this,n,o)||this).reset_(),i.on(i.player_,"durationchange",i.handleDurationchange),Ht&&"hidden"in t&&"visibilityState"in t&&i.on(t,"visibilitychange",i.handleVisibilityChange),i}X(n,e);var r=n.prototype;return r.handleVisibilityChange=function(){this.player_.duration()===1/0&&(t.hidden?this.stopTracking():this.startTracking())},r.isBehind_=function(){if(!this.timeupdateSeen_)return!1;var e=this.liveCurrentTime(),t=this.player_.currentTime(),n=this.seekableIncrement_;return e!==1/0&&e-(2*n+.07)>=t},r.trackLive_=function(){this.pastSeekEnd_=this.pastSeekEnd_;var e=this.player_.seekable();if(e&&e.length){var t=this.seekableEnd();t!==this.lastSeekEnd_&&(this.lastSeekEnd_&&(this.seekableIncrement_=Math.abs(t-this.lastSeekEnd_)),this.pastSeekEnd_=0,this.lastSeekEnd_=t,this.trigger("seekableendchange")),this.pastSeekEnd_=this.pastSeekEnd()+.03,this.isBehind_()!==this.behindLiveEdge()&&(this.behindLiveEdge_=this.isBehind_(),this.trigger("liveedgechange"))}},r.handleDurationchange=function(){this.player_.duration()===1/0?this.startTracking():this.stopTracking()},r.startTracking=function(){var e=this;this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,"play",this.trackLive_),this.on(this.player_,"pause",this.trackLive_),this.timeupdateSeen_||(this.one(this.player_,"play",this.handlePlay),this.handleTimeupdate=function(){e.timeupdateSeen_=!0,e.handleTimeupdate=null},this.one(this.player_,"timeupdate",this.handleTimeupdate)))},r.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},r.reset_=function(){this.pastSeekEnd_=0,this.lastSeekEnd_=null,this.behindLiveEdge_=null,this.timeupdateSeen_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.seekableIncrement_=12,this.off(this.player_,"play",this.trackLive_),this.off(this.player_,"pause",this.trackLive_),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.seekToLiveEdge),this.handleTimeupdate&&(this.off(this.player_,"timeupdate",this.handleTimeupdate),this.handleTimeupdate=null)},r.stopTracking=function(){this.isTracking()&&this.reset_()},r.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},r.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},r.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?1/0:e-this.seekableStart()},r.isLive=function(){return this.isTracking()},r.atLiveEdge=function(){return!this.behindLiveEdge()},r.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},r.pastSeekEnd=function(){return this.pastSeekEnd_},r.behindLiveEdge=function(){return this.behindLiveEdge_},r.isTracking=function(){return"number"==typeof this.trackingInterval_},r.seekToLiveEdge=function(){this.atLiveEdge()||(this.player_.currentTime(this.liveCurrentTime()),this.player_.paused()&&this.player_.play())},r.dispose=function(){this.stopTracking(),e.prototype.dispose.call(this)},n}(Ct);Ct.registerComponent("LiveTracker",Ko);var Xo=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var o=0;o<n.length;o++){var a=n[o].src;a&&-1===r.indexOf(a)&&r.push(a)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},Yo=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(n){var r=t.createElement(this.nodeName.toLowerCase());r.innerHTML=n;for(var i=t.createDocumentFragment();r.childNodes.length;)i.appendChild(r.childNodes[0]);return this.innerText="",e.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Zo=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},Jo=function(t){return Zo([t.el(),e.HTMLMediaElement.prototype,e.Element.prototype,Yo],"innerHTML")},Qo=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=Jo(e),i=function(n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=n.apply(t,i);return Xo(e),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=i(n[e]))})),Object.defineProperty(t,"innerHTML",K(r,{set:i(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},ea=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?En(e.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return e.Element.prototype.setAttribute.call(this,"src",t),t}}),ta=function(t){return Zo([t.el(),e.HTMLMediaElement.prototype,ea],"src")},na=function(n){function i(e,t){var r;r=n.call(this,e,t)||this;var i=e.source,o=!1;if(i&&(r.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),e.enableSourceset&&r.setupSourcesetHandling_(),r.el_.hasChildNodes()){for(var a=r.el_.childNodes,s=a.length,u=[];s--;){var l=a[s];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),o||r.el_.hasAttribute("crossorigin")||!An(l.src)||(o=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&$e.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),($t||Ot||Bt)&&!0===e.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}X(i,n);var o=i.prototype;return o.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),i.disposeMediaElement(this.el_),this.options_=null,n.prototype.dispose.call(this)},o.setupSourcesetHandling_=function(){!function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=ta(e),r=t.setAttribute,i=t.load;Object.defineProperty(t,"src",K(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var o=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),o},t.load=function(){var n=i.call(t);return Xo(e)||(e.triggerSourceset(""),Qo(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):Xo(e)||Qo(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=i,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}}(this)},o.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},o.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},o.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},o.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},o.proxyNativeTracksForType_=function(e){var t=this,n=ri[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(e){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},a=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=o,Object.keys(o).forEach((function(e){var n=o[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",a),this.on("dispose",(function(e){return t.off("loadstart",a)}))}},o.proxyNativeTracks_=function(){var e=this;ri.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},o.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),i.disposeMediaElement(e),e=n}else{e=t.createElement("video");var o=K({},this.options_.tag&&S(this.options_.tag));$t&&!0===this.options_.nativeControlsForTouch||delete o.controls,b(e,r(o,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&w(e,"preload",this.options_.preload);for(var a=["loop","muted","playsinline","autoplay","stretch","fluent"],s=0;s<a.length;s++){var u=a[s],l=this.options_[u];void 0!==l&&(l?w(e,u,u):k(e,u),e[u]=l)}return e},o.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},o.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){$e(e,"Video is not ready. (Video.js)")}},o.duration=function(){var e=this;if(this.el_.duration===1/0&&Dt&&Vt&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},o.width=function(){return this.el_.offsetWidth},o.height=function(){return this.el_.offsetHeight},o.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},o.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=e.navigator&&e.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},o.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},o.exitFullScreen=function(){this.el_.webkitExitFullScreen()},o.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},o.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},o.reset=function(){i.resetMediaElement(this.el_)},o.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},o.setControls=function(e){this.el_.controls=!!e},o.addTextTrack=function(e,t,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,r):n.prototype.addTextTrack.call(this,e,t,r)},o.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return n.prototype.createRemoteTextTrack.call(this,e);var r=t.createElement("track");return e.kind&&(r.kind=e.kind),e.label&&(r.label=e.label),(e.language||e.srclang)&&(r.srclang=e.language||e.srclang),e.default&&(r.default=e.default),e.id&&(r.id=e.id),e.src&&(r.src=e.src),r},o.addRemoteTextTrack=function(e,t){var r=n.prototype.addRemoteTextTrack.call(this,e,t);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},o.removeRemoteTextTrack=function(e){if(n.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var t=this.$$("track"),r=t.length;r--;)e!==t[r]&&e!==t[r].track||this.el().removeChild(t[r])},o.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),e.performance&&"function"==typeof e.performance.now?t.creationTime=e.performance.now():e.performance&&e.performance.timing&&"number"==typeof e.performance.timing.navigationStart&&(t.creationTime=e.Date.now()-e.performance.timing.navigationStart),t},i}(bi);if(l()){na.TEST_VID=t.createElement("video");var ra=t.createElement("track");ra.kind="captions",ra.srclang="en",ra.label="English",na.TEST_VID.appendChild(ra)}na.isSupported=function(){try{na.TEST_VID.volume=.5}catch(e){return!1}return!(!na.TEST_VID||!na.TEST_VID.canPlayType)},na.canPlayType=function(e){return na.TEST_VID.canPlayType(e)},na.canPlaySource=function(e,t){return na.canPlayType(e.type)},na.canControlVolume=function(){try{var e=na.TEST_VID.volume;return na.TEST_VID.volume=e/2+.1,e!==na.TEST_VID.volume}catch(e){return!1}},na.canMuteVolume=function(){try{var e=na.TEST_VID.muted;return na.TEST_VID.muted=!e,na.TEST_VID.muted?w(na.TEST_VID,"muted","muted"):k(na.TEST_VID,"muted"),e!==na.TEST_VID.muted}catch(e){return!1}},na.canControlPlaybackRate=function(){if(Dt&&Vt&&zt<58)return!1;try{var e=na.TEST_VID.playbackRate;return na.TEST_VID.playbackRate=e/2+.1,e!==na.TEST_VID.playbackRate}catch(e){return!1}},na.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(t.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(t.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(t.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(t.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},na.supportsNativeTextTracks=function(){return qt||It&&Vt},na.supportsNativeVideoTracks=function(){return!(!na.TEST_VID||!na.TEST_VID.videoTracks)},na.supportsNativeAudioTracks=function(){return!(!na.TEST_VID||!na.TEST_VID.audioTracks)},na.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],na.prototype.featuresVolumeControl=na.canControlVolume(),na.prototype.featuresMuteControl=na.canMuteVolume(),na.prototype.featuresPlaybackRate=na.canControlPlaybackRate(),na.prototype.featuresSourceset=na.canOverrideAttributes(),na.prototype.movingMediaElementInDOM=!It,na.prototype.featuresFullscreenResize=!0,na.prototype.featuresProgressEvents=!0,na.prototype.featuresTimeupdateEvents=!0,na.prototype.featuresNativeTextTracks=na.supportsNativeTextTracks(),na.prototype.featuresNativeVideoTracks=na.supportsNativeVideoTracks(),na.prototype.featuresNativeAudioTracks=na.supportsNativeAudioTracks();var ia=na.TEST_VID&&na.TEST_VID.constructor.prototype.canPlayType,oa=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;na.patchCanPlayType=function(){Ut>=4&&!Nt&&!Vt&&(na.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&oa.test(e)?"maybe":ia.call(this,e)})},na.unpatchCanPlayType=function(){var e=na.TEST_VID.constructor.prototype.canPlayType;return na.TEST_VID.constructor.prototype.canPlayType=ia,e},na.patchCanPlayType(),na.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},na.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","stretch","fluent","controls","loop","playsinline"].forEach((function(e){na.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){na.prototype["set"+Et(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){na.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach((function(e){na.prototype["set"+Et(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){na.prototype[e]=function(){return this.el_[e]()}})),bi.withSourceHandlers(na),na.nativeSourceHandler={},na.nativeSourceHandler.canPlayType=function(e){try{return na.TEST_VID.canPlayType(e)}catch(e){return""}},na.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return na.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Cn(e.src);return na.nativeSourceHandler.canPlayType("video/"+n)}return""},na.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},na.nativeSourceHandler.dispose=function(){},na.registerSourceHandler(na.nativeSourceHandler),bi.registerTech("Html5",na);var aa=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],sa={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ua=["tiny","xsmall","small","medium","large","xlarge","huge"],la={};ua.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;la[e]="vjs-layout-"+t}));var ca={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},da=function(n){function i(e,t,o){var a;if(e.id=e.id||t.id||"vjs_video_"+D(),(t=r(i.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if("function"==typeof e.closest){var s=e.closest("[lang]");s&&s.getAttribute&&(t.language=s.getAttribute("lang"))}else for(var u=e;u&&1===u.nodeType;){if(S(u).hasOwnProperty("lang")){t.language=u.getAttribute("lang");break}u=u.parentNode}if((a=n.call(this,null,t,o)||this).boundDocumentFullscreenChange_=ft(Q(a),a.documentFullscreenChange_),a.boundFullWindowOnEscKey_=ft(Q(a),a.fullWindowOnEscKey),a.log=Ke(a.id_),a.fsApi_=Xt,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=e,a.tagAttributes=e&&S(e),a.language(a.options_.language),t.languages){var l={};Object.getOwnPropertyNames(t.languages).forEach((function(e){l[e.toLowerCase()]=t.languages[e]})),a.languages_=l}else a.languages_=i.prototype.options_.languages;a.resetCache_(),a.poster_=t.poster||"",a.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],e.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((function(e){if("function"!=typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),W(Q(a),{eventBusKey:"el_"}),a.fluid_&&a.on("playerreset",a.updateStyleEl_);var c=K(a.options_);t.plugins&&Object.keys(t.plugins).forEach((function(e){a[e](t.plugins[e])})),a.options_.playerOptions=c,a.middleware_=[],a.initChildren(),a.isAudio("audio"===e.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),$t&&a.addClass("vjs-touch-enabled"),It||a.addClass("vjs-workinghover"),i.players[a.id_]=Q(a);var d=Ge.split(".")[0];return a.addClass("vjs-v"+d),a.userActive(!0),a.reportUserActivity(),a.one("play",a.listenForUserActivity_),a.on("stageclick",a.handleStageClick_),a.on("keydown",a.handleKeyDown),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}X(i,n);var o=i.prototype;return o.dispose=function(){var e=this;this.trigger("dispose"),this.off("dispose"),V(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),V(t,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),i.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function(e){Ti[e.id()]=null}(this),oi.names.forEach((function(t){var n=oi[t],r=e[n.getterName]();r&&r.off&&r.off()})),n.prototype.dispose.call(this)},o.createEl=function(){var r,i=this.tag,o=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();o?r=this.el_=i.parentNode:a||(r=this.el_=n.prototype.createEl.call(this,"div"));var s=S(i);if(a){for(r=this.el_=i,i=this.tag=t.createElement("video");r.children.length;)i.appendChild(r.firstChild);m(r,"video-js")||g(r,"video-js"),r.appendChild(i),o=this.playerElIngest_=r,Object.keys(r).forEach((function(e){i[e]=r[e]}))}if(i.setAttribute("tabindex","-1"),s.tabindex="-1",(Ht||Vt&&Wt)&&(i.setAttribute("role","application"),s.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"in s&&delete s.width,"height"in s&&delete s.height,Object.getOwnPropertyNames(s).forEach((function(e){a&&"class"===e||r.setAttribute(e,s[e]),a&&i.setAttribute(e,s[e])})),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=r.player=this,this.addClass("vjs-paused"),!0!==e.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=lt("vjs-styles-dimensions");var u=Ze(".vjs-styles-defaults"),l=Ze("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var c=i.getElementsByTagName("a"),d=0;d<c.length;d++){var f=c.item(d);g(f,"vjs-hidden"),f.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!o&&i.parentNode.insertBefore(r,i),v(i,r),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_=r,r},o.width=function(e){return this.dimension("width",e)},o.height=function(e){return this.dimension("height",e)},o.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?$e.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},o.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,vt(this)&&this.off("playerreset",this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),function(e,t){vt(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))}((function(){this.on("playerreset",this.updateStyleEl_)}))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},o.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},o.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},o.updateStyleEl_=function(){if(!0!==e.VIDEOJS_NO_DYNAMIC_STYLE){var t,n,r,i=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=i[1]/i[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,n=void 0!==this.height_?this.height_:t*o,r=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(r),ct(this.styleEl_,"\n ."+r+" {\n width: "+t+"px;\n height: "+n+"px;\n }\n\n ."+r+".vjs-fluid {\n padding-top: "+100*o+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(a>=0&&(u.width=a),s>=0&&(u.height=s))}},o.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var i=Et(e),o=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(bi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+o+"_api",playsinline:this.options_.playsinline,stretch:this.options_.stretch,fluent:this.options_.fluent,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};oi.names.forEach((function(e){var t=oi[e];a[t.getterName]=n[t.privateName]})),r(a,this.options_[i]),r(a,this.options_[o]),r(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var s=bi.getTech(e);if(!s)throw new Error("No Tech named '"+i+"' exists! '"+i+"' should be registered using videojs.registerTech()'");this.tech_=new s(a),this.tech_.ready(ft(this,this.handleTechReady_),!0),on(this.textTracksJson_||[],this.tech_),aa.forEach((function(e){n.on(n.tech_,e,n["handleTech"+Et(e)+"_"])})),Object.keys(sa).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+sa[e]+"_"].bind(n),event:t}):n["handleTech"+sa[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreentoggle",this.handleTechFullscreenToggle_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||v(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},o.unloadTech_=function(){var e=this;oi.names.forEach((function(t){var n=oi[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=rn(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},o.tech=function(e){return void 0===e&&$e.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},o.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},o.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},o.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},o.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.seekingTimer&&(clearTimeout(this.seekingTimer),this.seekingTimer=0),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},o.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(oe(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?oe(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),oe(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},o.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var o=r[i];if(o.type&&o.src&&o.src===t)return o.type}return ji(t)}(this,t)),this.cache_.source=K({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],o=this.$$("source"),a=[],s=0;s<o.length;s++){var u=S(o[s]);i.push(u),u.src&&u.src===t&&a.push(u.src)}a.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},o.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},o.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},o.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},o.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},o.waitingTimer=0,o.seekingTimer=0,o.handleTechWaiting_=function(){var e=this;this.waitingTimer&&clearTimeout(this.waitingTimer),this.waitingTimer=setTimeout((function(){e.addClass("vjs-waiting")}),1e3),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){e.waitingTimer&&(clearTimeout(e.waitingTimer),e.waitingTimer=0),t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},o.handleTechCanPlay_=function(){this.waitingTimer&&(clearTimeout(this.waitingTimer),this.waitingTimer=0),this.removeClass("vjs-waiting"),this.trigger("canplay")},o.handleTechCanPlayThrough_=function(){this.waitingTimer&&(clearTimeout(this.waitingTimer),this.waitingTimer=0),this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},o.handleTechPlaying_=function(){this.waitingTimer&&(clearTimeout(this.waitingTimer),this.waitingTimer=0),this.removeClass("vjs-waiting"),this.trigger("playing")},o.handleTechSeeking_=function(){var e=this;this.seekingTimer&&clearTimeout(this.seekingTimer),this.seekingTimer=setTimeout((function(){e.addClass("vjs-seeking")}),1e3),this.trigger("seeking")},o.handleTechSeeked_=function(){this.seekingTimer&&(clearTimeout(this.seekingTimer),this.seekingTimer=0),this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},o.handleTechFirstPlay_=function(){this.options_.starttime&&($e.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},o.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},o.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},o.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},o.handleTechClick_=function(e){M(e)&&this.controls_&&this.paused()},o.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},o.handleTechTap_=function(){this.userActive(!this.userActive())},o.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},o.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},o.handleTechTouchEnd_=function(e){e.preventDefault()},o.handleStageClick_=function(){this.reportUserActivity()},o.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},o.documentFullscreenChange_=function(e){var n=this.el(),r=t[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r),!1===this.isFullscreen()&&V(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.fsApi_.prefixed&&this.trigger("fullscreenchange")},o.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},o.handleTechFullscreenToggle_=function(e,t){this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()},o.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},o.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},o.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},o.handleTechError_=function(){var e=this.tech_.error();this.error(e)},o.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},o.getCache=function(){return this.cache_},o.resetCache_=function(){this.cache_={currentTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},o.techCall_=function(e,t){this.ready((function(){if(e in Ei)return function(e,t,n,r){return t[n](e.reduce(xe(n),r))}(this.middleware_,this.tech_,e,t);if(e in Ci)return je(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw $e(e),e}}),!0)},o.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in ki)return function(e,t,n){return e.reduceRight(xe(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Ci)return je(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw $e("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw $e("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw $e(t),t}}},o.play=function(){var t=this,n=this.options_.Promise||e.Promise;return n?new n((function(e){t.play_(e)})):this.play_()},o.play_=function(e){var t=this;void 0===e&&(e=ae),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!qt&&!It||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},o.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},o.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},o.pause=function(){this.techCall_("pause")},o.paused=function(){return!1!==this.techGet_("paused")},o.played=function(){return this.techGet_("played")||ne(0,0)},o.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},o.currentTime=function(e){return void 0!==e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},o.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?(this.addClass("vjs-live"),this.options_.liveui&&this.player_.liveTracker&&this.addClass("vjs-liveui")):(this.removeClass("vjs-live"),this.removeClass("vjs-liveui")),isNaN(e)||this.trigger("durationchange"))},o.remainingTime=function(){return this.duration()-this.currentTime()},o.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},o.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=ne(0,0)),e},o.bufferedPercent=function(){return re(this.buffered(),this.duration())},o.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},o.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},o.muted=function(e){return void 0!==e?void this.techCall_("setMuted",e):this.techGet_("muted")||!1},o.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},o.lastVolume_=function(e){return void 0!==e&&0!==e?void(this.cache_.lastVolume=e):this.cache_.lastVolume},o.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},o.isFullscreen=function(e){return void 0!==e?(this.isFullscreen_=!!e,void this.toggleFullscreenClass_()):!!this.isFullscreen_},o.requestFullscreen=function(e){var n;this.isFullscreen(!0),this.fsApi_.requestFullscreen?(F(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.fsApi_.prefixed||(n=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(n=e)),ae(this.el_[this.fsApi_.requestFullscreen](n))):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},o.exitFullscreen=function(){this.isFullscreen(!1),this.fsApi_.requestFullscreen?(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)&&ae(t[this.fsApi_.exitFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},o.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=t.documentElement.style.overflow,F(t,"keydown",this.boundFullWindowOnEscKey_),t.documentElement.style.overflow="hidden",g(t.body,"vjs-full-window"),this.trigger("enterFullWindow")},o.fullWindowOnEscKey=function(e){an.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},o.exitFullWindow=function(){this.isFullWindow=!1,V(t,"keydown",this.boundFullWindowOnEscKey_),t.documentElement.style.overflow=this.docOrigOverflow,y(t.body,"vjs-full-window"),this.trigger("exitFullWindow")},o.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},o.requestPictureInPicture=function(){if("pictureInPictureEnabled"in t)return this.techGet_("requestPictureInPicture")},o.exitPictureInPicture=function(){if("pictureInPictureEnabled"in t)return t.exitPictureInPicture()},o.handleKeyDown=function(e){var t=this.options_.userActions;t&&t.hotkeys&&(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;return"input"===t?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type):-1!==["textarea"].indexOf(t)}(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e)))},o.handleHotkeys=function(e){var n=this.options_.userActions?this.options_.userActions.hotkeys:{},r=n.fullscreenKey,i=void 0===r?function(e){return an.isEventKey(e,"f")}:r,o=n.muteKey,a=void 0===o?function(e){return an.isEventKey(e,"m")}:o,s=n.playPauseKey,u=void 0===s?function(e){return an.isEventKey(e,"k")||an.isEventKey(e,"Space")}:s;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();var l=Ct.getComponent("FullscreenToggle");!1!==t[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),Ct.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(u.call(this,e)){e.preventDefault(),e.stopPropagation(),Ct.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},o.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=bi.getTech(i);if(o||(o=Ct.getComponent(i)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else $e.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},o.selectSource=function(e){var t=this,n=this.options_.techOrder.map((function(e){return[e,bi.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():($e.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},i=function(e,n){var r=e[0];if(e[1].canPlaySource(n,t.options_[r.toLowerCase()]))return{source:n,tech:r}};return(this.options_.sourceOrder?r(e,n,function(e){return function(t,n){return e(n,t)}}(i)):r(n,e,i))||!1},o.src=function(e){var t=this;if(void 0===e)return this.cache_.src||"";var n=xi(e);n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Ae(this,n[0],(function(e,r){if(t.middleware_=r,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return n.length>1?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void t.triggerReady());!function(e,t){e.forEach((function(e){return e.setTech&&e.setTech(t)}))}(r,t.tech_)}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},o.src_=function(e){var t=this,n=this.selectSource([e]);return!n||(function(e,t){return Et(e)===Et(t)}(n.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready((function(){t.changingSrc_=!1})),!1))},o.load=function(){this.techCall_("load")},o.reset=function(){var t=this,n=this.options_.Promise||e.Promise;this.paused()||!n?this.doReset_():ae(this.play().then((function(){return t.doReset_()})))},o.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),vt(this)&&this.trigger("playerreset")},o.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},o.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},o.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},o.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},o.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},o.currentSource=function(){return this.cache_.source||{}},o.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},o.currentType=function(){return this.currentSource()&&this.currentSource().type||""},o.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},o.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},o.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},o.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},o.stretch=function(e){return void 0!==e?(this.techCall_("setStretch",e),void(this.options_.stretch=e)):this.techGet_("stretch")},o.fluent=function(e){return null!=e?(this.techCall_("setFluent",e),this.options_.fluent=e,this):this.techGet_("fluent")},o.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},o.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},o.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},o.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},o.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&e.message&&e.message===this.localize(this.options_.notSupportedMessage)){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new ie(e),this.addClass("vjs-error"),$e.error("(CODE:"+this.error_.code+" "+ie.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},o.reportUserActivity=function(e){this.userActivity_=!0},o.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},o.listenForUserActivity_=function(){var e,t,n,r=ft(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",(function(t){r(),this.clearInterval(e)}));var i,o=this.getChild("controlBar");!o||It||Dt||(o.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),o.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(i);var e=this.options_.inactivityTimeout;e<=0||(i=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},o.playbackRate=function(e){return void 0!==e?void this.techCall_("setPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},o.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},o.isAudio=function(e){return void 0!==e?void(this.isAudio_=!!e):!!this.isAudio_},o.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},o.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},o.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},o.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},o.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},o.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},o.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},o.languages=function(){return K(i.prototype.options_.languages,this.languages_)},o.toJSON=function(){var e=K(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=K(r)).player=void 0,e.tracks[n]=r}return e},o.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new un(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},o.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<ua.length;n++){var r=ua[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(la[e]),this.addClass(la[r]),this.breakpoint_=r;break}}},o.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},o.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=r({},ca,e),this.updateCurrentBreakpoint_()),r(this.breakpoints_)},o.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},o.currentBreakpoint=function(){return this.breakpoint_},o.currentBreakpointClass=function(){return la[this.breakpoint_]||""},o.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=K(e);var r=this.cache_.media,i=r.artwork,o=r.poster,a=r.src,s=r.textTracks;!i&&o&&(this.cache_.media.artwork=[{src:o,type:ji(o)}]),a&&this.src(a),o&&this.poster(o),Array.isArray(s)&&s.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},o.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:ji(t.poster)}]),t}return K(this.cache_.media)},i.getTagSettings=function(e){var t={sources:[],tracks:[]},n=S(e),i=n["data-setup"];if(m(e,"vjs-fill")&&(n.fill=!0),m(e,"vjs-fluid")&&(n.fluid=!0),null!==i){var o=tn(i||"{}"),a=o[0],s=o[1];a&&$e.error(a),r(n,s)}if(r(t,n),e.hasChildNodes())for(var u=e.childNodes,l=0,c=u.length;l<c;l++){var d=u[l],f=d.nodeName.toLowerCase();"source"===f?t.sources.push(S(d)):"track"===f&&t.tracks.push(S(d))}return t},o.flexNotSupported_=function(){var e=t.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},i}(Ct);oi.names.forEach((function(e){var t=oi[e];da.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),da.players={};var fa=e.navigator;da.prototype.options_={techOrder:bi.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:fa&&(fa.languages&&fa.languages[0]||fa.userLanguage||fa.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){da.prototype[e]=function(){return this.techGet_(e)}})),aa.forEach((function(e){da.prototype["handleTech"+Et(e)+"_"]=function(){return this.trigger(e)}})),Ct.registerComponent("Player",da);var ha={},pa=function(e){return ha.hasOwnProperty(e)},va=function(e){return pa(e)?ha[e]:void 0},ma=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},ga=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},ya=function(e,t){return t.prototype.name=e,function(){ga(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=J(t,[this].concat(r));return this[e]=function(){return o},ga(this,o.getEventHash()),o}},_a=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,W(this),delete this.trigger,$(this,this.constructor.defaultState),ma(t,this.name),this.dispose=ft(this,this.dispose),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),z(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=ya(e,ha[e])},e.isBasic=function(t){var n="string"==typeof t?va(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(pa(t))$e.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(da.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return ha[t]=n,"plugin"!==t&&(e.isBasic(n)?da.prototype[t]=function(e,t){var n=function(){ga(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return ma(this,e),ga(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):da.prototype[t]=ya(t,n)),n},e.deregisterPlugin=function(e){if("plugin"===e)throw new Error("Cannot de-register base plugin.");pa(e)&&(delete ha[e],delete da.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(ha)),e.forEach((function(e){var n=va(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=va(e);return t&&t.VERSION||""},e}();_a.getPlugin=va,_a.BASE_PLUGIN_NAME="plugin",_a.registerPlugin("plugin",_a),da.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},da.prototype.hasPlugin=function(e){return!!pa(e)};var ba=function(e){return 0===e.indexOf("#")?e.slice(1):e};if(De.hooks_={},De.hooks=function(e,t){return De.hooks_[e]=De.hooks_[e]||[],t&&(De.hooks_[e]=De.hooks_[e].concat(t)),De.hooks_[e]},De.hook=function(e,t){De.hooks(e,t)},De.hookOnce=function(e,t){De.hooks(e,[].concat(t).map((function(t){return function n(){return De.removeHook(e,n),t.apply(void 0,arguments)}})))},De.removeHook=function(e,t){var n=De.hooks(e).indexOf(t);return!(n<=-1||(De.hooks_[e]=De.hooks_[e].slice(),De.hooks_[e].splice(n,1),0))},!0!==e.VIDEOJS_NO_DYNAMIC_STYLE&&l()){var Sa=Ze(".vjs-styles-defaults");if(!Sa){Sa=lt("vjs-styles-defaults");var Ta=Ze("head");Ta&&Ta.insertBefore(Sa,Ta.firstChild),ct(Sa,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}q(1,De),De.VERSION=Ge,De.options=da.prototype.options_,De.getPlayers=function(){return da.players},De.getPlayer=function(e){var t,n=da.players;if("string"==typeof e){var r=ba(e),i=n[r];if(i)return i;t=Ze("#"+r)}else t=e;if(c(t)){var o=t,a=o.player,s=o.playerId;if(a||n[s])return a||n[s]}},De.getAllPlayers=function(){return Object.keys(da.players).map((function(e){return da.players[e]})).filter(Boolean)},De.players=da.players,De.getComponent=Ct.getComponent,De.registerComponent=function(e,t){bi.isTech(t)&&$e.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Ct.registerComponent.call(Ct,e,t)},De.getTech=bi.getTech,De.registerTech=bi.registerTech,De.use=function(e,t){Si[e]=Si[e]||[],Si[e].push(t)},Object.defineProperty(De,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(De.middleware,"TERMINATOR",{value:wi,writeable:!1,enumerable:!0}),De.browser=Kt,De.TOUCH_ENABLED=$t,De.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)}(n,e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},De.mergeOptions=K,De.bind=ft,De.registerPlugin=_a.registerPlugin,De.deregisterPlugin=_a.deregisterPlugin,De.plugin=function(e,t){return $e.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),_a.registerPlugin(e,t)},De.getPlugins=_a.getPlugins,De.getPlugin=_a.getPlugin,De.getPluginVersion=_a.getPluginVersion,De.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),De.options.languages=K(De.options.languages,((n={})[e]=t,n)),De.options.languages[e]},De.log=$e,De.createLogger=Ke,De.createTimeRange=De.createTimeRanges=ne,De.formatTime=Ie,De.setFormatTime=function(e){Vi=e},De.resetFormatTime=function(){Vi=Fi},De.parseUrl=kn,De.isCrossOrigin=An,De.EventTarget=pt,De.on=F,De.one=H,De.off=V,De.trigger=z,De.xhr=Yr,De.TextTrack=Qr,De.AudioTrack=ei,De.VideoTrack=ti,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){De[e]=function(){return $e.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Qe[e].apply(null,arguments)}})),De.computedStyle=a,De.dom=Qe,De.url=jn;var wa,ka,Ea,Ca,Aa,ja=se((function(e,t){!function(t){var n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,a={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=a.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=a.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):t;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=r.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=a.normalizePath(d)}else l.path=s.path,o.params||(l.params=s.params,o.query||(l.query=s.query));return null===l.path&&(l.path=n.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(l)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a}()})),xa=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t,n,r,i=this.listeners[e];if(i)if(2===arguments.length)for(n=i.length,t=0;t<n;++t)i[t].call(this,arguments[1]);else for(r=Array.prototype.slice.call(arguments,1),n=i.length,t=0;t<n;++t)i[t].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),Pa=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return Be(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(xa),La=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},Oa=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}Be(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;if(0!==(e=e.trim()).length){if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"totalduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"byterange"},t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var o=La(t[1]);if(o.URI&&(n.uri=o.URI),o.BYTERANGE){var a=o.BYTERANGE.split("@"),s=a[0],u=a[1];n.byterange={},s&&(n.byterange.length=parseInt(s,10)),u&&(n.byterange.offset=parseInt(u,10))}}r.trigger("data",n)}else{if(!(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)))return(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))?(n={type:"tag",tagType:"media"},t[1]&&(n.attributes=La(t[1])),void r.trigger("data",n)):(t=/^#EXT-X-ENDLIST/.exec(e))?void r.trigger("data",{type:"tag",tagType:"endlist"}):(t=/^#EXT-X-DISCONTINUITY/.exec(e))?void r.trigger("data",{type:"tag",tagType:"discontinuity"}):(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))?(n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n)):(t=/^#EXT-X-KEY:?(.*)$/.exec(e))?(n={type:"tag",tagType:"key"},t[1]&&(n.attributes=La(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n)):(t=/^#EXT-X-START:?(.*)$/.exec(e))?(n={type:"tag",tagType:"start"},t[1]&&(n.attributes=La(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n)):(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))?(n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n)):(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))?(n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n)):(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))?(n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n)):void r.trigger("data",{type:"tag",data:e.slice(4)});if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=La(t[1]),n.attributes.RESOLUTION){var l=n.attributes.RESOLUTION.split("x"),c={};l[0]&&(c.width=parseInt(l[0],10)),l[1]&&(c.height=parseInt(l[1],10)),n.attributes.RESOLUTION=c}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}}else r.trigger("data",{type:"comment",text:e.slice(1)})}))}},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,o=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:o}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(xa),Ra=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new Pa,t.parseStream=new Oa,t.lineStream.pipe(t.parseStream);var n,r,i=Ne(Ne(t)),o=[],a={},s=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},l=0;return t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},t.parseStream.on("data",(function(e){var t,c;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(a.byterange=t,t.length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&(a.byterange=t,t.offset=e.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){return e.attributes?"NONE"===e.attributes.METHOD?void(r=null):e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void(void 0!==e.attributes.IV&&(r.iv=e.attributes.IV))):void this.trigger("warn",{message:"ignoring key declaration without URI"}):void this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,l=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes?(a.attributes||(a.attributes={}),Ue(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(c={default:/yes/i.test(e.attributes.DEFAULT)}).default?c.autoselect=!0:c.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(c.language=e.attributes.LANGUAGE),e.attributes.URI&&(c.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(c.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(c.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(c.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=c}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){l+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data}}[e.tagType]||s).call(i)},uri:function(){a.uri=e.uri,o.push(a),!this.manifest.targetDuration||"duration"in a||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),r&&(a.key=r),a.timeline=l,n&&(a.map=n),a={}},comment:function(){},custom:function(){e.segment?(a.custom=a.custom||{},a.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}Be(t,e);var n=t.prototype;return n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(xa),Ia=function(e){return!!e&&"object"==typeof e},Ma=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):Ia(t[r])&&Ia(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},Da=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},Ua=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},Ba="INVALID_NUMBER_OF_PERIOD",Na="DASH_EMPTY_MANIFEST",Fa="DASH_INVALID_XML",Va="NO_BASE_URL",za="SEGMENT_TIME_UNSPECIFIED",Ha="UNSUPPORTED_UTC_TIMING_SCHEME",Ga=function(e,t){return function(e,t){!function(t){var n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,a={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=a.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=a.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return n.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):t;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var u=r.exec(s.path);s.netLoc=u[1],s.path=u[2]}s.netLoc&&!s.path&&(s.path="/");var l={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(l.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+o.path;l.path=a.normalizePath(d)}else l.path=s.path,o.params||(l.params=s.params,o.query||(l.query=s.query));return null===l.path&&(l.path=n.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(l)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=a}()}(t={exports:{}}),t.exports}(),qa=function(t,n){return/^[a-z]+:/i.test(n)?n:(/\/\//i.test(t)||(t=Ga.buildAbsoluteURL(e.location.href,t)),Ga.buildAbsoluteURL(t,n))},Wa=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,o=e.range,a=void 0===o?"":o,s=e.indexRange,u=void 0===s?"":s,l={uri:i,resolvedUri:qa(n||"",i)};if(a||u){var c=(a||u).split("-"),d=parseInt(c[0],10),f=parseInt(c[1],10);l.byterange={length:f-d+1,offset:d}}return l},$a=function(e){var t=e.offset+e.length-1;return e.offset+"-"+t},Ka={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration;return{start:0,end:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,o=void 0===i?1:i,a=e.duration,s=e.start,u=void 0===s?0:s,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,f=void 0===d?1/0:d,h=(t+n)/1e3,p=r+u,v=h+c-p,m=Math.ceil(v*o/a),g=Math.floor((h-p-f)*o/a),y=Math.floor((h-p)*o/a);return{start:Math.max(0,g),end:Math.min(m,y)}}},Xa=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.sourceDuration,s=Ka[n](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(s.start,s.end).map(function(e){return function(t,n){var r=e.duration,i=e.timescale,o=void 0===i?1:i,a=e.periodIndex,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:r/o,timeline:a,time:n*r}}}(e));if("static"===n){var l=u.length-1;u[l].duration=a-r/o*l}return u},Ya=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,o=e.timescale,a=void 0===o?1:o,s=e.indexRange,u=void 0===s?"":s,l=e.duration;if(!t)throw new Error(Va);var c=Wa({baseUrl:t,source:r.sourceURL,range:r.range}),d=Wa({baseUrl:t,source:t,indexRange:u});if(d.map=c,l){var f=Xa(e);f.length&&(d.duration=f[0].duration,d.timeline=f[0].timeline)}else i&&(d.duration=i/a,d.timeline=0);return d.number=0,[d]},Za=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,o=e.timeline||0,a=e.sidx.byterange,s=a.offset+a.length,u=t.timescale,l=t.references.filter((function(e){return 1!==e.referenceType})),c=[],d=s+t.firstOffset,f=0;f<l.length;f++){var h=t.references[f],p=h.referencedSize,v=h.subsegmentDuration,m=Ya({baseUrl:n,timescale:u,timeline:o,periodIndex:o,duration:v,sourceDuration:i,indexRange:d+"-"+(d+p-1)})[0];r&&(m.map=r),c.push(m),d+=p}return e.segments=c,e},Ja=function(e){return function(e){return Object.keys(e).map((function(t){return e[t]}))}(e.reduce((function(e,t){var n,r=t.attributes.id+(t.attributes.lang||"");e[r]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[r].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[r].attributes.contentProtection=t.attributes.contentProtection)):e[r]=t;return e}),{})).map((function(e){return e.discontinuityStarts=function(e,t){return e.reduce((function(e,n,r){return n[t]&&e.push(r),e}),[])}(e.segments,"discontinuity"),e}))},Qa=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e){var r=e[n];if(r.sidx){var i=r.sidx.uri+"-"+$a(r.sidx.byterange),o=t[i]&&t[i].sidx;r.sidx&&o&&Za(r,o,r.sidx.resolvedUri)}}return e},es=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},ts=function(e){var t,n=e.attributes,r=e.segments;return void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration),{attributes:(t={NAME:n.id,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}},ns=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,o={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},rs=function(e,t){var n;if(void 0===t&&(t={}),!e.length)return{};var r=e[0].attributes,i=r.sourceDuration,o=r.minimumUpdatePeriod,a=void 0===o?0:o,s=Ja(e.filter((function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video"===t.contentType}))).map(ns),u=Ja(e.filter((function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio"===t.contentType}))),l=e.filter((function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType})),c={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(n={AUDIO:{},VIDEO:{}},n["CLOSED-CAPTIONS"]={},n.SUBTITLES={},n),uri:"",duration:i,playlists:Qa(s,t),minimumUpdatePeriod:1e3*a};return u.length&&(c.mediaGroups.AUDIO.audio=function(e,t){void 0===t&&(t={});var n,r=e.reduce((function(e,r){var i=r.attributes.role&&r.attributes.role.value||"",o=r.attributes.lang||"",a="main";if(o){var s=i?" ("+i+")":"";a=""+r.attributes.lang+s}return e[a]&&e[a].playlists[0].attributes.BANDWIDTH>r.attributes.bandwidth||(e[a]={language:o,autoselect:!0,default:"main"===i,playlists:Qa([es(r)],t),uri:""},void 0===n&&"main"===i&&((n=r).default=!0)),e}),{});return n||(r[Object.keys(r)[0]].default=!0),r}(u,t)),l.length&&(c.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:Qa([ts(n)],t),uri:""}),e}),{})}(l,t)),c},is=function(e,t,n){var r=e.NOW,i=e.clientOffset,o=e.availabilityStartTime,a=e.timescale,s=void 0===a?1:a,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===c?0:c)-(o+l);return Math.ceil((d*s-t)/n)},os=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,o=void 0===i?0:i,a=e.media,s=void 0===a?"":a,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,d=e.startNumber,f=void 0===d?1:d,h=e.periodIndex,p=[],v=-1,m=0;m<t.length;m++){var g=t[m],y=g.d,_=g.r||0,b=g.t||0;v<0&&(v=b),b&&b>v&&(v=b);var S=void 0;if(_<0){var T=m+1;S=T===t.length?"dynamic"===r&&o>0&&s.indexOf("$Number$")>0?is(e,v,y):(u*c-v)/y:(t[T].t-v)/y}else S=_+1;for(var w=f+p.length+S,k=f+p.length;k<w;)p.push({number:k,duration:y/c,time:v,timeline:h}),v+=y,k++}return p},as=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ss=function(e,t){return e.replace(as,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var o=""+e[n];return"RepresentationID"===n?o:(i=r?parseInt(i,10):1,o.length>=i?o:""+new Array(i-o.length+1).join("0")+o)}}(t))},us=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,o=Wa({baseUrl:e.baseUrl,source:ss(i.sourceURL,n),range:i.range});return function(e,t){return e.duration||t?e.duration?Xa(e):os(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var r=ss(e.media||"",n);return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:qa(e.baseUrl||"",r),map:o,number:t.number}}))},ls=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error(za);var o,a=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,o=Wa({baseUrl:n,source:i.sourceURL,range:i.range}),a=Wa({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=o,a}(e,t)}));return n&&(o=Xa(e)),t&&(o=os(e,t)),o.map((function(e,t){if(a[t]){var n=a[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},cs=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=us,t=Ma(r,i.template)):i.base?(n=Ya,t=Ma(r,i.base)):i.list&&(n=ls,t=Ma(r,i.list));var o={attributes:r};if(!n)return o;var a=n(t,i.timeline);if(t.duration){var s=t,u=s.duration,l=s.timescale,c=void 0===l?1:l;t.duration=u/c}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return o.attributes=t,o.segments=a,i.base&&t.indexRange&&(o.sidx=a[0],o.segments=[]),o},ds=function(e,t){return Ua(e.childNodes).filter((function(e){return e.tagName===t}))},fs=function(e){return e.textContent.trim()},hs=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(o||0)+3600*parseFloat(a||0)+60*parseFloat(s||0)+parseFloat(u||0)},ps={mediaPresentationDuration:function(e){return hs(e)},availabilityStartTime:function(e){return function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),Date.parse(e)}(e)/1e3},minimumUpdatePeriod:function(e){return hs(e)},timeShiftBufferDepth:function(e){return hs(e)},start:function(e){return hs(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?hs(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},vs=function(e){return e&&e.attributes?Ua(e.attributes).reduce((function(e,t){var n=ps[t.name]||ps.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},ms={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},gs=function(e,t){return t.length?Da(e.map((function(e){return t.map((function(t){return qa(e,fs(t))}))}))):e},ys=function(e){var t=ds(e,"SegmentTemplate")[0],n=ds(e,"SegmentList")[0],r=n&&ds(n,"SegmentURL").map((function(e){return Ma({tag:"SegmentURL"},vs(e))})),i=ds(e,"SegmentBase")[0],o=n||t,a=o&&ds(o,"SegmentTimeline")[0],s=n||i||t,u=s&&ds(s,"Initialization")[0],l=t&&vs(t);l&&u?l.initialization=u&&vs(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:a&&ds(a,"S").map((function(e){return vs(e)})),list:n&&Ma(vs(n),{segmentUrls:r,initialization:vs(u)}),base:i&&Ma(vs(i),{initialization:vs(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},_s=function(e,t,n){return function(r){var i=vs(r),o=gs(t,ds(r,"BaseURL")),a=ds(r,"Role")[0],s={role:vs(a)},u=Ma(e,i,s),l=function(e){return e.reduce((function(e,t){var n=vs(t),r=ms[n.schemeIdUri];if(r){e[r]={attributes:n};var i=ds(t,"cenc:pssh")[0];if(i){var o=fs(i),a=o&&Fe(o);e[r].pssh=a}}return e}),{})}(ds(r,"ContentProtection"));Object.keys(l).length&&(u=Ma(u,{contentProtection:l}));var c=ys(r),d=ds(r,"Representation"),f=Ma(n,c);return Da(d.map(function(e,t,n){return function(r){var i=ds(r,"BaseURL"),o=gs(t,i),a=Ma(e,vs(r)),s=ys(r);return o.map((function(e){return{segmentInfo:Ma(n,s),attributes:Ma(a,{baseUrl:e})}}))}}(u,o,f)))}},bs=function(t,n){return function(r,i){var o=gs(n,ds(r,"BaseURL")),a=vs(r),s=parseInt(a.id,10),u=e.isNaN(s)?i:s,l=Ma(t,{periodIndex:u}),c=ds(r,"AdaptationSet"),d=ys(r);return Da(c.map(_s(l,o,d)))}},Ss=function(t){if(""===t)throw new Error(Na);var n=(new e.DOMParser).parseFromString(t,"application/xml"),r=n&&"MPD"===n.documentElement.tagName?n.documentElement:null;if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(Fa);return r},Ts=function(e,t){return void 0===t&&(t={}),rs(function(e){return e.map(cs)}(function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,o=n.NOW,a=void 0===o?Date.now():o,s=n.clientOffset,u=void 0===s?0:s,l=ds(e,"Period");if(!l.length)throw new Error(Ba);var c=vs(e),d=gs([i],ds(e,"BaseURL"));return c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=a,c.clientOffset=u,Da(l.map(bs(c,d)))}(Ss(e),t)),t.sidxMapping)},ws=function(e){return function(e){var t=ds(e,"UTCTiming")[0];if(!t)return null;var n=vs(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Ha)}return n}(Ss(e))},ks=function(e){return e>>>0};Ea=function(e){return wa(e,["moov","trak"]).reduce((function(e,t){var n,r,i,o,a;return(n=wa(t,["tkhd"])[0])?(r=n[0],o=ks(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=wa(t,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,e[o]=ks(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),e):null):null}),{})},Ca=function(e,t){var n,r,i;return n=wa(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return wa(t,["tfhd"]).map((function(n){var r,i;return r=ks(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,(wa(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=ks(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=ks(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0]||1/0)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},Aa=function(e){var t=wa(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=wa(e,["mdia","hdlr"]),r=wa(e,["tkhd"]);t.forEach((function(e,t){var i,o,a=ka(e.subarray(8,12)),s=r[t];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n};var Es,Cs,As,js,xs,Ps,Ls,Os,Rs,Is,Ms,Ds,Us,Bs,Ns,Fs,Vs,zs,Hs,Gs,qs,Ws,$s,Ks,Xs,Ys,Zs,Js,Qs,eu,tu,nu,ru,iu,ou,au,su,uu,lu={findBox:wa=function(e,t){var n,r,i,o,a,s=[];if(!t.length)return null;for(n=0;n<e.byteLength;)r=ks(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),i=ka(e.subarray(n+4,n+8)),o=r>1?n+r:e.byteLength,i===t[0]&&(1===t.length?s.push(e.subarray(n+8,o)):(a=wa(e.subarray(n+8,o),t.slice(1))).length&&(s=s.concat(a))),n=o;return s},parseType:ka=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},timescale:Ea,startTime:Ca,videoTrackIds:Aa},cu=lu.parseType,du=function(e){return new Date(1e3*e-20828448e5)},fu=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},hu=function(e){var t,n,r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=[];for(t=0;t+4<e.length;t+=n)if(n=r.getUint32(t),t+=4,n<=0)i.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+e[t]&31)}return i},pu={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:Es(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,r,i,o=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},s=31&e[5];for(r=6,i=0;i<s;i++)n=o.getUint16(r),r+=2,a.sps.push(new Uint8Array(e.subarray(r,r+n))),r+=n;for(t=e[r],r++,i=0;i<t;i++)n=o.getUint16(r),r+=2,a.pps.push(new Uint8Array(e.subarray(r,r+n))),r+=n;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:cu(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},r=8;r<e.byteLength;)n.compatibleBrands.push(cu(e.subarray(r,r+4))),r+=4;return n},dinf:function(e){return{boxes:Es(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:Es(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:cu(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:hu(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=4,i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===i.version?(r+=4,i.creationTime=du(n.getUint32(r)),r+=8,i.modificationTime=du(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=8,i.duration=n.getUint32(r)):(i.creationTime=du(n.getUint32(r)),r+=4,i.modificationTime=du(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=4,i.duration=n.getUint32(r)),r+=4,t=n.getUint16(r),i.language+=String.fromCharCode(96+(t>>10)),i.language+=String.fromCharCode(96+((992&t)>>5)),i.language+=String.fromCharCode(96+(31&t)),i},mdia:function(e){return{boxes:Es(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:Es(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=Es(e.subarray(28))[0]),n},moof:function(e){return{boxes:Es(e)}},moov:function(e){return{boxes:Es(e)}},mvex:function(e){return{boxes:Es(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=du(t.getUint32(n)),n+=8,r.modificationTime=du(t.getUint32(n)),n+=4,r.timescale=t.getUint32(n),n+=8,r.duration=t.getUint32(n)):(r.creationTime=du(t.getUint32(n)),n+=4,r.modificationTime=du(t.getUint32(n)),n+=4,r.timescale=t.getUint32(n),n+=4,r.duration=t.getUint32(n)),n+=4,r.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,r.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,n+=8,r.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,r.nextTrackId=t.getUint32(n),r},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},i=n.getUint16(22);for(t=24;i;t+=12,i--)r.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&n.getUint32(t+8)});return r},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:Es(e)}},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},i=n.getUint32(4);for(t=8;i;t+=4,i--)r.chunkOffsets.push(n.getUint32(t));return r},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n.getUint32(4),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;r;t+=12,r--)i.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return i},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:Es(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)r.entries.push(n.getUint32(t));return r},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},i=n.getUint32(4);for(t=8;i;t+=8,i--)r.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return r},styp:function(e){return pu.ftyp(e)},tfdt:function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:e[4]<<24|e[5]<<16|e[6]<<8|e[7]};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),t},tfhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=du(t.getUint32(n)),n+=8,r.modificationTime=du(t.getUint32(n)),n+=4,r.trackId=t.getUint32(n),n+=4,n+=8,r.duration=t.getUint32(n)):(r.creationTime=du(t.getUint32(n)),n+=4,r.modificationTime=du(t.getUint32(n)),n+=4,r.trackId=t.getUint32(n),n+=4,n+=4,r.duration=t.getUint32(n)),n+=4,n+=8,r.layer=t.getUint16(n),n+=2,r.alternateGroup=t.getUint16(n),n+=2,r.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,r.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,r.width=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,r.height=t.getUint16(n)+t.getUint16(n+2)/16,r},traf:function(e){return{boxes:Es(e)}},trak:function(e){return{boxes:Es(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),o&&c&&(t={flags:fu(e.subarray(d,d+4))},d+=4,a&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),l&&(t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},a&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=fu(e.subarray(d,d+4)),d+=4),l&&(t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},vu={inspect:Es=function(e){for(var t,n,r,i,o,a=0,s=[],u=new ArrayBuffer(e.length),l=new Uint8Array(u),c=0;c<e.length;++c)l[c]=e[c];for(t=new DataView(u);a<e.byteLength;)n=t.getUint32(a),r=cu(e.subarray(a+4,a+8)),i=n>1?a+n:e.byteLength,(o=(pu[r]||function(e){return{data:e}})(e.subarray(a+8,i))).size=n,o.type=r,s.push(o),a=i;return s},textify:Cs=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map((function(e,r){return n+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var r=n+" "+t+": ",i=e[t];if(i instanceof Uint8Array||i instanceof Uint32Array){var o=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return o?1===o.length?r+"<"+o.join("").slice(1)+">":r+"<\n"+o.map((function(e){return n+" "+e})).join("\n")+"\n"+n+" >":r+"<>"}return r+JSON.stringify(i,null,2).split("\n").map((function(e,t){return 0===t?e:n+" "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+Cs(e.boxes,t+1):"")})).join("\n")},parseTfdt:pu.tfdt,parseHdlr:pu.hdlr,parseTfhd:pu.tfhd,parseTrun:pu.trun,parseSidx:pu.sidx},mu=Math.pow(2,32)-1;!function(){var e;if(Xs={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in Xs)Xs.hasOwnProperty(e)&&(Xs[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);Ys=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),Js=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Zs=new Uint8Array([0,0,0,1]),Qs=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),eu=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),tu={video:Qs,audio:eu},iu=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ru=new Uint8Array([0,0,0,0,0,0,0,0]),ou=new Uint8Array([0,0,0,0,0,0,0,0]),au=ou,su=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),uu=ou,nu=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),As=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},js=function(){return As(Xs.dinf,As(Xs.dref,iu))},xs=function(e){return As(Xs.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},Ps=function(){return As(Xs.ftyp,Ys,Zs,Ys,Js)},zs=function(e){return As(Xs.hdlr,tu[e])},Ls=function(e){return As(Xs.mdat,e)},Vs=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),As(Xs.mdhd,t)},Fs=function(e){return As(Xs.mdia,Vs(e),zs(e.type),Rs(e))},Os=function(e){return As(Xs.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},Rs=function(e){return As(Xs.minf,"video"===e.type?As(Xs.vmhd,nu):As(Xs.smhd,ru),js(),Gs(e))},Is=function(e,t){for(var n=[],r=t.length;r--;)n[r]=Ws(t[r]);return As.apply(null,[Xs.moof,Os(e)].concat(n))},Ms=function(e){for(var t=e.length,n=[];t--;)n[t]=Bs(e[t]);return As.apply(null,[Xs.moov,Us(4294967295)].concat(n).concat(Ds(e)))},Ds=function(e){for(var t=e.length,n=[];t--;)n[t]=$s(e[t]);return As.apply(null,[Xs.mvex].concat(n))},Us=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return As(Xs.mvhd,t)},Hs=function(e){var t,n,r=e.samples||[],i=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)t=r[n].flags,i[n+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return As(Xs.sdtp,i)},Gs=function(e){return As(Xs.stbl,qs(e),As(Xs.stts,uu),As(Xs.stsc,au),As(Xs.stsz,su),As(Xs.stco,ou))},function(){var e,t;qs=function(n){return As(Xs.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?e(n):t(n))},e=function(e){var t,n=e.sps||[],r=e.pps||[],i=[],o=[];for(t=0;t<n.length;t++)i.push((65280&n[t].byteLength)>>>8),i.push(255&n[t].byteLength),i=i.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));return As(Xs.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),As(Xs.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length]).concat(i).concat([r.length]).concat(o))),As(Xs.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},t=function(e){return As(Xs.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),xs(e))}}(),Ns=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return As(Xs.tkhd,t)},Ws=function(e){var t,n,r,i,o,a;return t=As(Xs.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),o=Math.floor(e.baseMediaDecodeTime/(mu+1)),a=Math.floor(e.baseMediaDecodeTime%(mu+1)),n=As(Xs.tfdt,new Uint8Array([1,0,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a])),92,"audio"===e.type?(r=Ks(e,92),As(Xs.traf,t,n,r)):(i=Hs(e),r=Ks(e,i.length+92),As(Xs.traf,t,n,r,i))},Bs=function(e){return e.duration=e.duration||4294967295,As(Xs.trak,Ns(e),Fs(e))},$s=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),As(Xs.trex,t)},function(){var e,t,n;n=function(e,t){var n=0,r=0,i=0,o=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},t=function(e,t){var r,i,o,a;for(t+=20+16*(i=e.samples||[]).length,r=n(i,t),a=0;a<i.length;a++)o=i[a],r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size,o.flags.isLeading<<2|o.flags.dependsOn,o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,61440&o.flags.degradationPriority,15&o.flags.degradationPriority,(4278190080&o.compositionTimeOffset)>>>24,(16711680&o.compositionTimeOffset)>>>16,(65280&o.compositionTimeOffset)>>>8,255&o.compositionTimeOffset]);return As(Xs.trun,new Uint8Array(r))},e=function(e,t){var r,i,o,a;for(t+=20+8*(i=e.samples||[]).length,r=n(i,t),a=0;a<i.length;a++)o=i[a],r=r.concat([(4278190080&o.duration)>>>24,(16711680&o.duration)>>>16,(65280&o.duration)>>>8,255&o.duration,(4278190080&o.size)>>>24,(16711680&o.size)>>>16,(65280&o.size)>>>8,255&o.size]);return As(Xs.trun,new Uint8Array(r))},Ks=function(n,r){return"audio"===n.type?e(n,r):t(n,r)}}();var gu={ftyp:Ps,mdat:Ls,moof:Is,moov:Ms,initSegment:function(e){var t,n=Ps(),r=Ms(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t}},yu=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};yu.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),e},yu.prototype.push=function(e){this.trigger("data",e)},yu.prototype.flush=function(e){this.trigger("done",e)};var _u,bu,Su,Tu,wu,ku,Eu=yu,Cu=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},Au=function(e){var t,n,r=[],i=[];for(r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.push(r),i},ju=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},xu=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},Pu=function(e,t){var n,r,i,o,a,s=t||0,u=[];for(n=0;n<e.length;n++)for(o=e[n],r=0;r<o.length;r++)a=o[r],s+=(i=Cu(a,s)).size,u.push(i);return u},Lu=function(e){var t,n,r,i,o,a,s=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],d.setUint32(s,a.data.byteLength),s+=4,c.set(a.data,s),s+=a.data.byteLength;return c},Ou=[33,16,5,32,164,27],Ru=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Iu=function(e){for(var t=[];e--;)t.push(0);return t},Mu=function(e){return Object.keys(e).reduce((function(t,n){return t[n]=new Uint8Array(e[n].reduce((function(e,t){return e.concat(t)}),[])),t}),{})}({96e3:[Ou,[227,64],Iu(154),[56]],88200:[Ou,[231],Iu(170),[56]],64e3:[Ou,[248,192],Iu(240),[56]],48e3:[Ou,[255,192],Iu(268),[55,148,128],Iu(54),[112]],44100:[Ou,[255,192],Iu(268),[55,163,128],Iu(84),[112]],32e3:[Ou,[255,192],Iu(268),[55,234],Iu(226),[112]],24e3:[Ou,[255,192],Iu(268),[55,255,128],Iu(268),[111,112],Iu(126),[224]],16e3:[Ou,[255,192],Iu(268),[55,255,128],Iu(268),[111,255],Iu(269),[223,108],Iu(195),[1,192]],12e3:[Ru,Iu(268),[3,127,248],Iu(268),[6,255,240],Iu(268),[13,255,224],Iu(268),[27,253,128],Iu(259),[56]],11025:[Ru,Iu(268),[3,127,248],Iu(268),[6,255,240],Iu(268),[13,255,224],Iu(268),[27,255,192],Iu(268),[55,175,128],Iu(108),[112]],8e3:[Ru,Iu(268),[3,121,16],Iu(47),[7]]});wu=function(e,t){return _u(Tu(e,t))},ku=function(e,t){return bu(Su(e),t)};_u=function(e){return 9e4*e},bu=function(e,t){return e*t},Su=function(e){return e/9e4},Tu=function(e,t){return e/t};var Du=wu,Uu=ku,Bu=function(e,t,n,r){var i,o,a,s=0,u=0,l=0,c=0;if(t.length&&(i=Du(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(9e4/(e.samplerate/1024)),n&&r&&(u=i-Math.max(n,r),c=(l=Math.floor(u/s))*s),!(l<1||c>45e3))){for((o=Mu[e.samplerate])||(o=t[0].data),a=0;a<l;a++)t.splice(a,0,{data:o});e.baseMediaDecodeTime-=Math.floor(Uu(c,e.samplerate))}},Nu=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Fu=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},Vu=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},zu=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Hu=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/9e4,n=Math.floor(n)),n},Gu=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},qu=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}t+=i,r=0,i=0}return n},Wu=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},$u=function(e,t){var n,r,i,o,a=[];if(!(64&t[0]))return a;for(r=31&t[0],n=0;n<r;n++)o={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(o.ccData=t[i+3]<<8|t[i+4],a.push(o));return a},Ku=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},Xu=4,Yu=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new tl(0,0),new tl(0,1),new tl(1,0),new tl(1,1)],this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))}),this)};(Yu.prototype=new Eu).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&((t=qu(e.escapedRBSP)).payloadType===Xu&&(n=Wu(t)))){if(e.dts<this.latestDts_)return void(this.ignoreNextEqualDts_=!0);if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return void(--this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=$u(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Yu.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2&&this.dispatchCea608Packet(e)}),this),this.captionPackets_.length=0,this.ccStreams_.forEach((function(e){e.flush()}),this)):this.ccStreams_.forEach((function(e){e.flush()}),this)},Yu.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},Yu.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Yu.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Yu.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Yu.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)};var Zu={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ju=function(e){return null===e?"":(e=Zu[e]||e,String.fromCharCode(e))},Qu=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],el=function(){for(var e=[],t=15;t--;)e.push("");return e},tl=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,o;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=el();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=el();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=el()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))o=Ju((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),o=Ju((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=Qu.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=Ju(r),o+=Ju(i),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};tl.prototype=new Eu,tl.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},tl.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=el(),this.nonDisplayed_=el(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},tl.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},tl.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},tl.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},tl.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},tl.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},tl.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},tl.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},tl.prototype.isNormalChar=function(e){return e>=32&&e<=127},tl.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=el(),this.displayed_=el()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},tl.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},tl.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},tl.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},tl.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},tl.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},tl.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var nl={CaptionStream:Yu,Cea608Stream:tl},rl={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},il=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},ol=function e(t){var n,r;e.prototype.init.call(this),this.type_=t,this.push=function(e){e.type===this.type_&&(void 0===r&&(r=e.dts),e.dts=il(e.dts,r),e.pts=il(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.discontinuity=function(){r=void 0,n=void 0}};ol.prototype=new Eu;var al,sl=ol,ul=il,ll=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},cl=function(e,t,n){return decodeURIComponent(ll(e,t,n))},dl=function(e,t,n){return unescape(ll(e,t,n))},fl=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},hl={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=cl(e.data,1,t),e.value=cl(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=cl(e.data,1,t),e.url=cl(e.data,t+1,e.data.length);break}},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=dl(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(al=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],o=0;if(al.prototype.init.call(this),this.dispatchType=rl.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,a,s,u,l;if("timed-metadata"===e.type){if(e.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))return void(n.debug&&console.log("Skipping unrecognized metadata packet"));if(i.push(e),o+=e.data.byteLength,1===i.length&&(r=fl(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&t.data[5]&&(a+=4,a+=fl(t.data.subarray(10,14)),r-=fl(t.data.subarray(16,20)));do{if((s=fl(t.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[a],t.data[a+1],t.data[a+2],t.data[a+3]),data:t.data.subarray(a+10,a+s+10)}).key=u.id,hl[u.id]&&(hl[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],u.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",t)}}}}).prototype=new Eu;var pl,vl,ml,gl=al,yl=sl;(pl=function(){var e=new Uint8Array(188),t=0;pl.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")}}).prototype=new Eu,(vl=function(){var e,t,n,r;vl.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var o=e[i],a=(31&e[i+1])<<8|e[i+2];o===rl.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=a:o===rl.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=a:o===rl.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][a]=o),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=rl.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=rl.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new Eu,vl.STREAM_TYPES={h264:27,adts:15},(ml=function(){var e=this,t={data:[],size:0},n={data:[],size:0},r={data:[],size:0},i=function(t,n,r){var i,o=new Uint8Array(t.size),a={type:n},s=0,u=0,l=!1;if(t.data.length&&!(t.size<9)){for(a.trackId=t.data[0].pid,s=0;s<t.data.length;s++)i=t.data[s],o.set(i.data,u),u+=i.data.byteLength;(function(e,t){var n;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),192&(n=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])})(o,a),l="video"===n||a.packetLength<=t.size,(r||l)&&(t.size=0,t.data.length=0),l&&e.trigger("data",a)}};ml.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,a;switch(o.streamType){case rl.H264_STREAM_TYPE:case rl.H264_STREAM_TYPE:e=t,a="video";break;case rl.ADTS_STREAM_TYPE:e=n,a="audio";break;case rl.METADATA_STREAM_TYPE:e=r,a="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&i(e,a,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},n=o.programMapTable;null!==n.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[o.type]()},this.flush=function(){i(t,"video"),i(n,"audio"),i(r,"timed-metadata"),this.trigger("done")}}).prototype=new Eu;var _l={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:pl,TransportParseStream:vl,ElementaryStream:ml,TimestampRolloverStream:yl,CaptionStream:nl.CaptionStream,Cea608Stream:nl.Cea608Stream,MetadataStream:gl};for(var bl in rl)rl.hasOwnProperty(bl)&&(_l[bl]=rl[bl]);var Sl,Tl=_l,wl=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Sl=function(){var e;Sl.prototype.init.call(this),this.push=function(t){var n,r,i,o,a,s,u=0,l=0;if("audio"===t.type)for(e?(o=e,(e=new Uint8Array(o.byteLength+t.data.byteLength)).set(o),e.set(t.data,o.byteLength)):e=t.data;u+5<e.length;)if(255===e[u]&&240==(246&e[u+1])){if(r=2*(1&~e[u+1]),n=(3&e[u+3])<<11|e[u+4]<<3|(224&e[u+5])>>5,s=9e4*(a=1024*(1+(3&e[u+6])))/wl[(60&e[u+2])>>>2],i=u+n,e.byteLength<i)return;if(this.trigger("data",{pts:t.pts+l*s,dts:t.dts+l*s,sampleCount:a,audioobjecttype:1+(e[u+2]>>>6&3),channelcount:(1&e[u+2])<<2|(192&e[u+3])>>>6,samplerate:wl[(60&e[u+2])>>>2],samplingfrequencyindex:(60&e[u+2])>>>2,samplesize:16,data:e.subarray(u+7+r,i)}),e.byteLength===i)return void(e=void 0);l++,e=e.subarray(i)}else u++},this.flush=function(){this.trigger("done")}}).prototype=new Eu;var kl,El,Cl,Al=Sl,jl=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,o=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");o.set(e.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,t-=a},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),o=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(El=function(){var e,t,n=0;El.prototype.init.call(this),this.push=function(r){var i;for(t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;n<t.byteLength-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<t.byteLength;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<t.length);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")}}).prototype=new Eu,Cl={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(kl=function(){var e,t,n,r,i,o,a,s=new El;kl.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(a){var s={trackId:t,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),this.flush=function(){s.flush()},a=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},o=function(e){var t,n,r,i,o,s,u,l,c,d,f,h,p,v=0,m=0,g=0,y=0,_=1;if(n=(t=new jl(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Cl[n]&&(3===(o=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(f=3!==o?8:12,p=0;p<f;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(v=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:h=[1,1];break;case 2:h=[12,11];break;case 3:h=[10,11];break;case 4:h=[16,11];break;case 5:h=[40,33];break;case 6:h=[24,11];break;case 7:h=[20,11];break;case 8:h=[32,11];break;case 9:h=[80,33];break;case 10:h=[18,11];break;case 11:h=[15,11];break;case 12:h=[64,33];break;case 13:h=[160,99];break;case 14:h=[4,3];break;case 15:h=[3,2];break;case 16:h=[2,1];break;case 255:h=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}h&&(_=h[0]/h[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*v-2*m)*_),height:(2-d)*(c+1)*16-2*g-2*y}}}).prototype=new Eu;var xl,Pl={H264Stream:kl,NalByteStream:El},Ll=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Ol=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Rl=function(e,t,n){return unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(e,t,n))},Il={isLikelyAacData:function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},parseId3TagSize:function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return Ll[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=Ol(e.subarray(10,14)));do{if((n=Ol(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===Rl(r,0,i)){var o=r.subarray(i+1),a=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return(a*=4)+(3&o[7])}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(xl=function(){var e=new Uint8Array,t=0;xl.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,o,a,s=0,u=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(s=Il.parseAdtsSize(e,u))>e.length)break;o={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",o),u+=s}else{if(e.length-u<10)break;if(u+(s=Il.parseId3TagSize(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array}}).prototype=new Eu;var Ml,Dl,Ul,Bl,Nl=xl,Fl=Pl.H264Stream,Vl=Il.isLikelyAacData,zl=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Hl=["width","height","profileIdc","levelIdc","profileCompatibility"],Gl=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},ql=function(e,t,n,r,i,o){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:o,baseMediaDecodeTime:e}};(Dl=function(e,t){var n=[],r=0,i=0,o=0,a=1/0;t=t||{},Dl.prototype.init.call(this),this.push=function(t){Gu(e,t),e&&zl.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(t){i=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var s,u,l,c;0!==n.length?(s=Nu(n,e,i),e.baseMediaDecodeTime=Hu(e,t.keepOriginalTimestamps),Bu(e,s,o,a),e.samples=Fu(s),l=gu.mdat(Vu(s)),n=[],u=gu.moof(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),zu(e),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")}}).prototype=new Eu,(Ml=function(e,t){var n,r,i=0,o=[],a=[];t=t||{},Ml.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Gu(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Hl.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,r,s,u,l,c,d,f,h=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=Au(o),(s=ju(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],e))?(h=r.duration,s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=xu(s)),a.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");zu(e),s=p}Gu(e,s),e.samples=Pu(s),l=gu.mdat(Lu(s)),e.baseMediaDecodeTime=Hu(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=s[0],f=s[s.length-1],this.trigger("segmentTimingInfo",ql(e.baseMediaDecodeTime,d.dts,d.pts,f.dts+f.duration,f.pts+f.duration,h)),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=gu.moof(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){zu(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)i=(o=this.gopCache_[a]).gop,e.pps&&Gl(e.pps[0],o.pps[0])&&e.sps&&Gl(e.sps[0],o.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,o,s,u,l;for(o=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<a.length&&n<e.length&&(r=a[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=o,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,o,s,u;for(t=a.length-1,n=e.length-1,o=null,s=!1;t>=0&&n>=0;){if(r=a[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;if(0===(u=s?n:o))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){a=e}}).prototype=new Eu,(Bl=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps&&(this.keepOriginalTimestamps=e.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Bl.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}}).prototype=new Eu,Bl.prototype.flush=function(e){var t,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return void(++this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,Hl.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,zl.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=gu.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=t.startPts,this.keepOriginalTimestamps||(t.startTime-=s),t.startTime/=9e4,t.endTime=t.endPts,this.keepOriginalTimestamps||(t.endTime-=s),t.endTime/=9e4,a.captionStreams[t.stream]=!0,a.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=n.pts,this.keepOriginalTimestamps||(n.cueTime-=s),n.cueTime/=9e4,a.metadata.push(n);a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(Ul=function(e){var t,n,r=this,i=!0;Ul.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new Tl.MetadataStream,t.aacStream=new Nl,t.audioTimestampRolloverStream=new Tl.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new Tl.TimestampRolloverStream("timed-metadata"),t.adtsStream=new Al,t.coalesceStream=new Bl(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",(function(e){t.aacStream.setTimestamp(e.timeStamp)})),t.aacStream.on("data",(function(i){"timed-metadata"!==i.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new Dl(n,e),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))})),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new Tl.MetadataStream,i.packetStream=new Tl.TransportPacketStream,i.parseStream=new Tl.TransportParseStream,i.elementaryStream=new Tl.ElementaryStream,i.videoTimestampRolloverStream=new Tl.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Tl.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Tl.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Al,i.h264Stream=new Fl,i.captionStream=new Tl.CaptionStream,i.coalesceStream=new Bl(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)t||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||((n=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new Ml(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(e){n&&(n.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Dl(n,e),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,zu(n),e.keepOriginalTimestamps||(n.timelineStartInfo.baseMediaDecodeTime=r),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[],i.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,zu(t),i.captionStream.reset(),e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=r)),i.timedMetadataTimestampRolloverStream&&i.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=Vl(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Eu;var Wl={Transmuxer:Ul,VideoSegmentStream:Ml,AudioSegmentStream:Dl,AUDIO_PROPERTIES:zl,VIDEO_PROPERTIES:Hl,generateVideoSegmentTimingInfo:ql},$l=Ku,Kl=nl.CaptionStream,Xl=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},Yl=function(e,t){var n=lu.findBox(e,["moof","traf"]),r=lu.findBox(e,["mdat"]),i={},o=[];return r.forEach((function(e,t){var r=n[t];o.push({mdat:e,traf:r})})),o.forEach((function(e){var n,r,o=e.mdat,a=e.traf,s=lu.findBox(a,["tfhd"]),u=vu.parseTfhd(s[0]),l=u.trackId,c=lu.findBox(a,["tfdt"]),d=c.length>0?vu.parseTfdt(c[0]).baseMediaDecodeTime:0,f=lu.findBox(a,["trun"]);t===l&&f.length>0&&(n=function(e,t,n){var r=t,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return e.forEach((function(e){var t=vu.parseTrun(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=o),e.trackId=a,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),s=s.concat(t)})),s}(f,d,u),r=function(e,t,n){var r,i,o,a,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+o),c=Xl(i,t);r={nalUnitType:"sei_rbsp",size:o,data:l,escapedRBSP:$l(l),trackId:n},c?(r.pts=c.pts,r.dts=c.dts,a=c):(r.pts=a.pts,r.dts=a.dts),u.push(r)}return u}(o,n,l),i[l]||(i[l]=[]),i[l]=i[l].concat(r))})),i},Zl={generator:gu,probe:lu,Transmuxer:Wl.Transmuxer,AudioSegmentStream:Wl.AudioSegmentStream,VideoSegmentStream:Wl.VideoSegmentStream,CaptionParser:function(){var e,t,n,r,i,o=!1;this.isInitialized=function(){return o},this.init=function(){e=new Kl,o=!0,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||n===e[0]&&r===t[n])},this.parse=function(e,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(!n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,o,a)}return null!==(s=function(e,t,n){return t?{seiNals:Yl(e,t)[t],timescale:n}:null}(e,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}}.CaptionParser,Jl=function(e){var t=31&e[1];return(t<<=8)|e[2]},Ql=function(e){return!!(64&e[1])},ec=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},tc=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},nc={parseType:function(e,t){var n=Jl(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=Ql(e),n=4+ec(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=Ql(e),r=4+ec(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var o=12+((15&e[r+10])<<8|e[r+11]);o<i;){var a=r+o;t[(31&e[a+1])<<8|e[a+2]]=e[a],o+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:Ql,parsePesType:function(e,t){switch(t[Jl(e)]){case rl.H264_STREAM_TYPE:return"video";case rl.ADTS_STREAM_TYPE:return"audio";case rl.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Ql(e))return null;var t=4+ec(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+ec(e),n=e.subarray(t),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===tc(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===tc(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===tc(31&n[i+3])&&(o=!0),o}},rc=ul,ic={};ic.ts=nc,ic.aac=Il;var oc=function(e,t,n){for(var r,i,o,a,s=0,u=188,l=!1;u<=e.byteLength;)if(71!==e[s]||71!==e[u]&&u!==e.byteLength)s++,u++;else{switch(r=e.subarray(s,u),ic.ts.parseType(r,t.pid)){case"pes":i=ic.ts.parsePesType(r,t.table),o=ic.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(a=ic.ts.parsePesTime(r))&&(a.type="audio",n.audio.push(a),l=!0)}if(l)break;s+=188,u+=188}for(s=(u=e.byteLength)-188,l=!1;s>=0;)if(71!==e[s]||71!==e[u]&&u!==e.byteLength)s--,u--;else{switch(r=e.subarray(s,u),ic.ts.parseType(r,t.pid)){case"pes":i=ic.ts.parsePesType(r,t.table),o=ic.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&o&&(a=ic.ts.parsePesTime(r))&&(a.type="audio",n.audio.push(a),l=!0)}if(l)break;s-=188,u-=188}},ac=function(e,t,n){for(var r,i,o,a,s,u,l,c=0,d=188,f=!1,h={data:[],size:0};d<e.byteLength;)if(71!==e[c]||71!==e[d])c++,d++;else{switch(r=e.subarray(c,d),ic.ts.parseType(r,t.pid)){case"pes":if(i=ic.ts.parsePesType(r,t.table),o=ic.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(o&&!f&&(a=ic.ts.parsePesTime(r))&&(a.type="video",n.video.push(a),f=!0),!n.firstKeyFrame)){if(o&&0!==h.size){for(s=new Uint8Array(h.size),u=0;h.data.length;)l=h.data.shift(),s.set(l,u),u+=l.byteLength;if(ic.ts.videoPacketContainsKeyFrame(s)){var p=ic.ts.parsePesTime(s);p?(n.firstKeyFrame=p,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}h.size=0}h.data.push(r),h.size+=r.byteLength}}if(f&&n.firstKeyFrame)break;c+=188,d+=188}for(c=(d=e.byteLength)-188,f=!1;c>=0;)if(71!==e[c]||71!==e[d])c--,d--;else{switch(r=e.subarray(c,d),ic.ts.parseType(r,t.pid)){case"pes":i=ic.ts.parsePesType(r,t.table),o=ic.ts.parsePayloadUnitStartIndicator(r),"video"===i&&o&&(a=ic.ts.parsePesTime(r))&&(a.type="video",n.video.push(a),f=!0)}if(f)break;c-=188,d-=188}},sc=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),ic.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=ic.ts.parsePat(n));break;case"pmt":t.table||(t.table=ic.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table)if(t.table.hasOwnProperty(r)){switch(t.table[r]){case rl.H264_STREAM_TYPE:n.video=[],ac(e,t,n),0===n.video.length&&delete n.video;break;case rl.ADTS_STREAM_TYPE:n.audio=[],oc(e,t,n),0===n.audio.length&&delete n.audio}}return n},uc=function(e,t){var n;return(n=ic.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,o=null,a=0,s=0;e.length-s>=3;){switch(ic.aac.parseType(e,s)){case"timed-metadata":if(e.length-s<10){n=!0;break}if((a=ic.aac.parseId3TagSize(e,s))>e.length){n=!0;break}null===o&&(t=e.subarray(s,s+a),o=ic.aac.parseAacTimestamp(t)),s+=a;break;case"audio":if(e.length-s<7){n=!0;break}if((a=ic.aac.parseAdtsSize(e,s))>e.length){n=!0;break}null===i&&(t=e.subarray(s,s+a),i=ic.aac.parseSampleRate(t)),r++,s+=a;break;default:s++}if(n)return null}if(null===i||null===o)return null;var u=9e4/i;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*r*u,pts:o+1024*r*u}]}}(e):sc(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=rc(e.dts,n),e.pts=rc(e.pts,n),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=rc(e.dts,r),e.pts=rc(e.pts,r),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=rc(i.dts,r),i.pts=rc(i.pts,r),i.dtsTime=i.dts/9e4,i.ptsTime=i.dts/9e4}}}(n,t),n):null},lc=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},cc=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),dc=null,fc=function(){function e(t){lc(this,e),dc||(dc=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],r=t[4],i=n[4],o=void 0,a=void 0,s=void 0,u=[],l=[],c=void 0,d=void 0,f=void 0,h=void 0,p=void 0;for(o=0;o<256;o++)l[(u[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!r[a];a^=c||1,s=l[s]||1)for(f=(f=s^s<<1^s<<2^s<<3^s<<4)>>8^255&f^99,r[a]=f,i[f]=a,p=16843009*u[d=u[c=u[a]]]^65537*d^257*c^16843008*a,h=257*u[f]^16843008*f,o=0;o<4;o++)t[o][a]=h=h<<24^h>>>8,n[o][f]=p=p<<24^p>>>8;for(o=0;o<5;o++)t[o]=t[o].slice(0),n[o]=n[o].slice(0);return e}()),this._tables=[[dc[0][0].slice(),dc[0][1].slice(),dc[0][2].slice(),dc[0][3].slice(),dc[0][4].slice()],[dc[1][0].slice(),dc[1][1].slice(),dc[1][2].slice(),dc[1][3].slice(),dc[1][4].slice()]];var n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=this._tables[0][4],u=this._tables[1],l=t.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(o=t.slice(0),a=[],this._key=[o,a],n=l;n<4*l+28;n++)i=o[n-1],(n%l==0||8===l&&n%l==4)&&(i=s[i>>>24]<<24^s[i>>16&255]<<16^s[i>>8&255]<<8^s[255&i],n%l==0&&(i=i<<8^i>>>24^c<<24,c=c<<1^283*(c>>7))),o[n]=o[n-l]^i;for(r=0;n;r++,n--)i=o[3&r?n:n-4],a[r]=n<=4||r<4?i:u[0][s[i>>>24]]^u[1][s[i>>16&255]]^u[2][s[i>>8&255]]^u[3][s[255&i]]}return e.prototype.decrypt=function(e,t,n,r,i,o){var a=this._key[1],s=e^a[0],u=r^a[1],l=n^a[2],c=t^a[3],d=void 0,f=void 0,h=void 0,p=a.length/4-2,v=void 0,m=4,g=this._tables[1],y=g[0],_=g[1],b=g[2],S=g[3],T=g[4];for(v=0;v<p;v++)d=y[s>>>24]^_[u>>16&255]^b[l>>8&255]^S[255&c]^a[m],f=y[u>>>24]^_[l>>16&255]^b[c>>8&255]^S[255&s]^a[m+1],h=y[l>>>24]^_[c>>16&255]^b[s>>8&255]^S[255&u]^a[m+2],c=y[c>>>24]^_[s>>16&255]^b[u>>8&255]^S[255&l]^a[m+3],m+=4,s=d,u=f,l=h;for(v=0;v<4;v++)i[(3&-v)+o]=T[s>>>24]<<24^T[u>>16&255]<<16^T[l>>8&255]<<8^T[255&c]^a[m++],d=s,s=u,u=l,l=c,c=d},e}(),hc=function(){function e(){lc(this,e),this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},e.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},e.prototype.dispose=function(){this.listeners={}},e.prototype.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),pc=function(e){function t(){lc(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,hc));return n.jobs=[],n.delay=1,n.timeout_=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},t.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(hc),vc=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},mc=function(e,t,n){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),i=new fc(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),a=new Int32Array(o.buffer),s=void 0,u=void 0,l=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,v=void 0;for(s=n[0],u=n[1],l=n[2],c=n[3],v=0;v<r.length;v+=4)d=vc(r[v]),f=vc(r[v+1]),h=vc(r[v+2]),p=vc(r[v+3]),i.decrypt(d,f,h,p,a,v),a[v]=vc(a[v]^s),a[v+1]=vc(a[v+1]^u),a[v+2]=vc(a[v+2]^l),a[v+3]=vc(a[v+3]^c),s=d,u=f,l=h,c=p;return o},gc=function(){function e(t,n,r,i){lc(this,e);var o=e.STEP,a=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new pc,this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+o),n,r,s)),u=o;u<a.length;u+=o)r=new Uint32Array([vc(a[u-4]),vc(a[u-3]),vc(a[u-2]),vc(a[u-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+o),n,r,s));this.asyncStream_.push((function(){i(null,function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}(s))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=mc(e,t,n);r.set(i,e.byteOffset)}},cc(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}(),yc=function(t,n){return/^[a-z]+:/i.test(n)?n:(/\/\//i.test(t)||(t=ja.buildAbsoluteURL(e.location.href,t)),ja.buildAbsoluteURL(t,n))},_c=function(e,t,n){return e&&n.responseURL&&t!==n.responseURL?n.responseURL:t},bc=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Sc=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Tc=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},wc=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},kc=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Ec=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Cc=De.mergeOptions,Ac=De.EventTarget,jc=De.log,xc=function(e,t){["AUDIO","SUBTITLES"].forEach((function(n){for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var o=e.mediaGroups[n][r][i];t(o,n,r,i)}}))},Pc=function(e,t){var n=Cc(e,{}),r=n.playlists[t.uri];if(!r)return null;if(r.segments&&t.segments&&r.segments.length===t.segments.length&&r.endList===t.endList&&r.mediaSequence===t.mediaSequence)return null;var i=Cc(r,t);r.segments&&(i.segments=function(e,t,n){var r=t.slice();n=n||0;for(var i=Math.min(e.length,t.length+n),o=n;o<i;o++)r[o-n]=Cc(e[o],r[o-n]);return r}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)),i.segments.forEach((function(e){!function(e,t){e.resolvedUri||(e.resolvedUri=yc(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=yc(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=yc(t,e.map.uri))}(e,i.resolvedUri)}));for(var o=0;o<n.playlists.length;o++)n.playlists[o].uri===t.uri&&(n.playlists[o]=i);return n.playlists[t.uri]=i,n},Lc=function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];e.playlists[n.uri]=n,n.resolvedUri=yc(e.uri,n.uri),n.id=t,n.attributes||(n.attributes={},jc.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},Oc=function(e){xc(e,(function(t){t.uri&&(t.resolvedUri=yc(e.uri,t.uri))}))},Rc=function(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)},Ic=function(t){function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};bc(this,n);var i=kc(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),o=r.withCredentials,a=void 0!==o&&o,s=r.handleManifestRedirects,u=void 0!==s&&s;i.srcUrl=e,i.hls_=t,i.withCredentials=a,i.handleManifestRedirects=u;var l=t.options_;if(i.customTagParsers=l&&l.customTagParsers||[],i.customTagMappers=l&&l.customTagMappers||[],!i.srcUrl)throw new Error("A non-empty playlist URL is required");return i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.hls_.xhr({uri:yc(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media().uri,"HAVE_METADATA"):void i.haveMetadata(i.request,i.media().uri)})))})),i}return wc(n,t),Sc(n,[{key:"playlistRequestError",value:function(e,t,n){this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[t],status:e.status,message:"HLS playlist request error at URL: "+t+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(t,n){var r=this;this.request=null,this.state="HAVE_METADATA";var i=new Ra;this.customTagParsers.forEach((function(e){return i.addParser(e)})),this.customTagMappers.forEach((function(e){return i.addTagMapper(e)})),i.push(t.responseText),i.end(),i.manifest.uri=n,i.manifest.attributes=i.manifest.attributes||{};var o=Pc(this.master,i.manifest);this.targetDuration=i.manifest.targetDuration,o?(this.master=o,this.media_=this.master.playlists[i.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(e.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=e.setTimeout((function(){r.trigger("mediaupdatetimeout")}),Rc(this.media(),!!o))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),e.clearTimeout(this.mediaUpdateTimeout),e.clearTimeout(this.finalRenditionTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(t,n){var r=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(e.clearTimeout(this.finalRenditionTimeout),n){var i=t.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=e.setTimeout(this.media.bind(this,t,!1),i)}else{var o=this.state,a=!this.media_||t.uri!==this.media_.uri;if(this.master.playlists[t.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(a&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(a){if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},(function(e,n){if(r.request){if(t.resolvedUri=_c(r.handleManifestRedirects,t.resolvedUri,n),e)return r.playlistRequestError(r.request,t.uri,o);r.haveMetadata(n,t.uri),"HAVE_MASTER"===o?r.trigger("loadedmetadata"):r.trigger("mediachange")}}))}}}},{key:"pause",value:function(){this.stopRequest(),e.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(t){var n=this;e.clearTimeout(this.mediaUpdateTimeout);var r=this.media();if(t){var i=r?r.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=e.setTimeout((function(){return n.load()}),i)}else this.started?r&&!r.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var t=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(t.request){if(t.request=null,n)return t.error={status:r.status,message:"HLS playlist request error at URL: "+t.srcUrl+".",responseText:r.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");var i=new Ra;return t.customTagParsers.forEach((function(e){return i.addParser(e)})),t.customTagMappers.forEach((function(e){return i.addTagMapper(e)})),i.push(r.responseText),i.end(),t.state="HAVE_MASTER",t.srcUrl=_c(t.handleManifestRedirects,t.srcUrl,r),i.manifest.uri=t.srcUrl,i.manifest.playlists?(t.master=i.manifest,Lc(t.master),Oc(t.master),t.trigger("loadedplaylist"),void(t.request||t.media(i.manifest.playlists[0]))):(t.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:e.location.href,playlists:[{uri:t.srcUrl,id:0,resolvedUri:t.srcUrl,attributes:{}}]},t.master.playlists[t.srcUrl]=t.master.playlists[0],t.haveMetadata(r,t.srcUrl),t.trigger("loadedmetadata"))}}))}}]),n}(Ac),Mc=De.createTimeRange,Dc=function(e,t,n){var r=void 0,i=void 0;return void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t)).precise?r.result:(i=function(e,t){for(var n=0,r=void 0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(r=e.segments[i]).start)return{result:r.start-n,precise:!0};if(n+=r.duration,void 0!==r.end)return{result:r.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?i.result:r.result+n},Uc=function(t,n,r){if(!t)return 0;if("number"!=typeof r&&(r=0),void 0===n){if(t.totalDuration)return t.totalDuration;if(!t.endList)return e.Infinity}return Dc(t,n,r)},Bc=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var o=t;o<Math.min(0,n);o++)r+=e.targetDuration;t=0}for(var a=t;a<n;a++)r+=e.segments[a].duration;return r},Nc=function(e){if(!e.segments.length)return 0;for(var t=e.segments.length-1,n=e.segments[t].duration||e.targetDuration,r=n+2*e.targetDuration;t--&&!((n+=e.segments[t].duration)>=r););return Math.max(0,t)},Fc=function(e,t,n){if(!e||!e.segments)return null;if(e.endList)return Uc(e);if(null===t)return null;t=t||0;var r=n?Nc(e):e.segments.length;return Dc(e,e.mediaSequence+r,t)},Vc=function(e){return e-Math.floor(e)==0},zc=function(e,t){if(Vc(t))return t+.1*e;for(var n=t.toString().split(".")[1].length,r=1;r<=n;r++){var i=Math.pow(10,r),o=t*i;if(Vc(o)||r===n)return(o+e)/i}},Hc=zc.bind(null,1),Gc=zc.bind(null,-1),qc=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Wc=function(e){return e.excludeUntil&&e.excludeUntil===1/0},$c=function(e){var t=qc(e);return!e.disabled&&!t},Kc=function(e,t){return t.attributes&&t.attributes[e]},Xc=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!$c(e)&&(e.attributes.BANDWIDTH||0)<n})).length},Yc={duration:Uc,seekable:function(e,t){var n=t||0,r=Fc(e,t,!0);return null===r?Mc():Mc(n,r)},safeLiveIndex:Nc,getMediaInfoForTime:function(e,t,n,r){var i=void 0,o=void 0,a=e.segments.length,s=t-r;if(s<0){if(n>0)for(i=n-1;i>=0;i--)if(o=e.segments[i],(s+=Gc(o.duration))>0)return{mediaIndex:i,startTime:r-Bc(e,n,i)};return{mediaIndex:0,startTime:t}}if(n<0){for(i=n;i<0;i++)if((s-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(i=n;i<a;i++)if(o=e.segments[i],(s-=Hc(o.duration))<0)return{mediaIndex:i,startTime:r+Bc(e,n,i)};return{mediaIndex:a-1,startTime:t}},isEnabled:$c,isDisabled:function(e){return e.disabled},isBlacklisted:qc,isIncompatible:Wc,playlistEnd:Fc,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},isFmp4:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1},hasAttribute:Kc,estimateSegmentRequestTime:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return Kc("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:Xc},Zc=De.xhr,Jc=De.mergeOptions,Qc=function(){return function e(t,n){t=Jc({timeout:45e3},t);var r=e.beforeRequest||De.Hls.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var o=Zc(t,(function(e,t){var r=o.response;!e&&r&&(o.responseTime=Date.now(),o.roundTripTime=o.responseTime-o.requestTime,o.bytesReceived=r.byteLength||r.length,o.bandwidth||(o.bandwidth=Math.floor(o.bytesReceived/o.roundTripTime*8*1e3))),t.headers&&(o.responseHeaders=t.headers),e&&"ETIMEDOUT"===e.code&&(o.timedout=!0),e||o.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(o&&(r||o.responseText)))),n(e,o)})),a=o.abort;return o.abort=function(){return o.aborted=!0,a.apply(o,arguments)},o.uri=t.uri,o.requestTime=Date.now(),o}},ed=function(e){var t={};return e.byterange&&(t.Range=function(e){var t;return t=e.offset+e.length-1,"bytes="+e.offset+"-"+t}(e.byterange)),t},td=function(e,t){return e.start(t)+"-"+e.end(t)},nd=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},rd=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},id=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},od=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},ad=function(e){return e.resolvedUri},sd=function(e){for(var t=Array.prototype.slice.call(e),n="",r=0;r<t.length/16;r++)n+=t.slice(16*r,16*r+16).map(nd).join("")+" "+t.slice(16*r,16*r+16).map(rd).join("")+"\n";return n},ud=Object.freeze({createTransferableMessage:id,initSegmentId:od,segmentKeyId:ad,hexDump:sd,tagDump:function(e){var t=e.bytes;return sd(t)},textRanges:function(e){var t="",n=void 0;for(n=0;n<e.length;n++)t+=td(e,n)+" ";return t}}),ld=function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var o=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n=0,r=void 0,i=0;i<t.segments.length&&!(e<=(n=(r=t.segments[i]).videoTimingInfo?r.videoTimingInfo.transmuxedPresentationEnd:n+r.duration));i++);var o=t.segments[t.segments.length-1];if(o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+.25*o.duration)return null;r=o}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:n-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!o)return i({message:"valid programTime was not found"});if("estimate"===o.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:o.estimatedStart});var a={mediaSeconds:r},s=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,o.segment);return s&&(a.programDateTime=s.toISOString()),i(null,a)},cd=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,o=void 0===i?2:i,a=t.seekTo,s=t.pauseAfterSeek,u=void 0===s||s,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!a)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(r))return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var d=function(e,t){var n=void 0;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1&&(r=t.segments[i],!(n<t.segments[i+1].dateTimeObject));i++);var o=t.segments[t.segments.length-1],a=o.dateTimeObject,s=o.videoTimingInfo?function(e){return e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds}(o.videoTimingInfo):o.duration+.25*o.duration;return n>new Date(a.getTime()+1e3*s)?null:(n>a&&(r=o),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Yc.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return c({message:n+" was not found in the stream"});var f=d.segment,h=function(e,t){var n=void 0,r=void 0;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(f.dateTimeObject,n);if("estimate"===d.type)return 0===o?c({message:n+" is not buffered yet. Try again"}):(a(d.estimatedStart+h),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:o-1,seekTo:a,pauseAfterSeek:u,tech:l,callback:c})})));var p=f.start+h;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),a(p)},dd=function(e,t){var n=[],r=void 0;if(e&&e.length)for(r=0;r<e.length;r++)t(e.start(r),e.end(r))&&n.push([e.start(r),e.end(r)]);return De.createTimeRanges(n)},fd=function(e,t){return dd(e,(function(e,n){return e-1/30<=t&&n+1/30>=t}))},hd=function(e,t){return dd(e,(function(e){return e-1/30>=t}))},pd=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},vd=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},md=function(e,t,n){var r=void 0,i=void 0;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime<=t&&i.endTime>=e&&n.removeCue(i)},gd=function(e){return isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e},yd=function(t,n,r){var i=e.WebKitDataCue||e.VTTCue;if(n&&n.forEach((function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new i(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))}),t),r){var o=gd(t.mediaSource_.duration);if(r.forEach((function(t){var n=t.cueTime+this.timestampOffset;!("number"!=typeof n||e.isNaN(n)||n<0)&&n<1/0&&t.frames.forEach((function(e){var t=new i(n,n,e.value||e.url||e.data||"");t.frame=e,t.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return De.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return De.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return De.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(t),this.metadataTrack_.addCue(t)}),this)}),t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){for(var a=t.metadataTrack_.cues,s=[],u=0;u<a.length;u++)a[u]&&s.push(a[u]);var l=s.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),c=Object.keys(l).sort((function(e,t){return Number(e)-Number(t)}));c.forEach((function(e,t){var n=l[e],r=Number(c[t+1])||o;n.forEach((function(e){e.endTime=r}))}))}}},_d="undefined"!=typeof window?window:{},bd="undefined"==typeof Symbol?"__target":Symbol(),Sd="application/javascript",Td=_d.BlobBuilder||_d.WebKitBlobBuilder||_d.MozBlobBuilder||_d.MSBlobBuilder,wd=_d.URL||_d.webkitURL||wd&&wd.msURL,kd=_d.Worker;if(kd){var Ed,Cd=ze("self.onmessage = function () {}"),Ad=new Uint8Array(1);try{(Ed=new kd(Cd)).postMessage(Ad,[Ad.buffer])}catch(e){kd=null}finally{wd.revokeObjectURL(Cd),Ed&&Ed.terminate()}}var jd=new Ve("./transmuxer-worker.worker.js",(function(e,t){var n=this;!function(){var e,t,r,i,o,a,s,u,l,c,d,f,h,p,v,m,g,y,_,b,S,T,w,k,E,C,A,j,x,P,L,O,R,I,M,D,U=Math.pow(2,32)-1;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),E=new Uint8Array([0,0,0,1]),A=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),j=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),x={video:A,audio:j},O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),L=new Uint8Array([0,0,0,0,0,0,0,0]),R=new Uint8Array([0,0,0,0,0,0,0,0]),I=R,M=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),D=R,P=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),e=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},t=function(){return e(w.dinf,e(w.dref,O))},r=function(t){return e(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},i=function(){return e(w.ftyp,k,E,k,C)},m=function(t){return e(w.hdlr,x[t])},o=function(t){return e(w.mdat,t)},v=function(t){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(n[12]=t.samplerate>>>24&255,n[13]=t.samplerate>>>16&255,n[14]=t.samplerate>>>8&255,n[15]=255&t.samplerate),e(w.mdhd,n)},p=function(t){return e(w.mdia,v(t),m(t.type),s(t))},a=function(t){return e(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},s=function(n){return e(w.minf,"video"===n.type?e(w.vmhd,P):e(w.smhd,L),t(),y(n))},u=function(t,n){for(var r=[],i=n.length;i--;)r[i]=b(n[i]);return e.apply(null,[w.moof,a(t)].concat(r))},l=function(t){for(var n=t.length,r=[];n--;)r[n]=f(t[n]);return e.apply(null,[w.moov,d(4294967295)].concat(r).concat(c(t)))},c=function(t){for(var n=t.length,r=[];n--;)r[n]=S(t[n]);return e.apply(null,[w.mvex].concat(r))},d=function(t){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e(w.mvhd,n)},g=function(t){var n,r,i=t.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e(w.sdtp,o)},y=function(t){return e(w.stbl,_(t),e(w.stts,D),e(w.stsc,I),e(w.stsz,M),e(w.stco,R))},function(){var t,n;_=function(r){return e(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===r.type?t(r):n(r))},t=function(t){var n,r=t.sps||[],i=t.pps||[],o=[],a=[];for(n=0;n<r.length;n++)o.push((65280&r[n].byteLength)>>>8),o.push(255&r[n].byteLength),o=o.concat(Array.prototype.slice.call(r[n]));for(n=0;n<i.length;n++)a.push((65280&i[n].byteLength)>>>8),a.push(255&i[n].byteLength),a=a.concat(Array.prototype.slice.call(i[n]));return e(w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),e(w.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([r.length]).concat(o).concat([i.length]).concat(a))),e(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},n=function(t){return e(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),r(t))}}(),h=function(t){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return e(w.tkhd,n)},b=function(t){var n,r,i,o,a,s;return n=e(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(U+1)),s=Math.floor(t.baseMediaDecodeTime%(U+1)),r=e(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===t.type?(i=T(t,92),e(w.traf,n,r,i)):(o=g(t),i=T(t,o.length+92),e(w.traf,n,r,i,o))},f=function(t){return t.duration=t.duration||4294967295,e(w.trak,h(t),p(t))},S=function(t){var n=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(n[n.length-1]=0),e(w.trex,n)},function(){var t,n,r;r=function(e,t){var n=0,r=0,i=0,o=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(o=8)),[0,0,n|r|i|o,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},n=function(t,n){var i,o,a,s;for(n+=20+16*(o=t.samples||[]).length,i=r(o,n),s=0;s<o.length;s++)a=o[s],i=i.concat([(4278190080&a.duration)>>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size,a.flags.isLeading<<2|a.flags.dependsOn,a.flags.isDependedOn<<6|a.flags.hasRedundancy<<4|a.flags.paddingValue<<1|a.flags.isNonSyncSample,61440&a.flags.degradationPriority,15&a.flags.degradationPriority,(4278190080&a.compositionTimeOffset)>>>24,(16711680&a.compositionTimeOffset)>>>16,(65280&a.compositionTimeOffset)>>>8,255&a.compositionTimeOffset]);return e(w.trun,new Uint8Array(i))},t=function(t,n){var i,o,a,s;for(n+=20+8*(o=t.samples||[]).length,i=r(o,n),s=0;s<o.length;s++)a=o[s],i=i.concat([(4278190080&a.duration)>>>24,(16711680&a.duration)>>>16,(65280&a.duration)>>>8,255&a.duration,(4278190080&a.size)>>>24,(16711680&a.size)>>>16,(65280&a.size)>>>8,255&a.size]);return e(w.trun,new Uint8Array(i))},T=function(e,r){return"audio"===e.type?t(e,r):n(e,r)}}();var B,N,F,V,z,H={ftyp:i,mdat:o,moof:u,moov:l,initSegment:function(e){var t,n=i(),r=l(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t}},G=function(e){return e>>>0};F=function(e){return B(e,["moov","trak"]).reduce((function(e,t){var n,r,i,o,a;return(n=B(t,["tkhd"])[0])?(r=n[0],o=G(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=B(t,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,e[o]=G(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),e):null):null}),{})},V=function(e,t){var n,r,i;return n=B(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return B(t,["tfhd"]).map((function(n){var r,i;return r=G(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,(B(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=G(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=G(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0]||1/0)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},z=function(e){var t=B(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=B(e,["mdia","hdlr"]),r=B(e,["tkhd"]);t.forEach((function(e,t){var i,o,a=N(e.subarray(8,12)),s=r[t];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n};var q={findBox:B=function(e,t){var n,r,i,o,a,s=[];if(!t.length)return null;for(n=0;n<e.byteLength;)r=G(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),i=N(e.subarray(n+4,n+8)),o=r>1?n+r:e.byteLength,i===t[0]&&(1===t.length?s.push(e.subarray(n+8,o)):(a=B(e.subarray(n+8,o),t.slice(1))).length&&(s=s.concat(a))),n=o;return s},parseType:N=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},timescale:F,startTime:V,videoTrackIds:z},W=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};W.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),e},W.prototype.push=function(e){this.trigger("data",e)},W.prototype.flush=function(e){this.trigger("done",e)};var $,K,X,Y,Z,J,Q=W,ee=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},te=function(e){var t,n,r=[],i=[];for(r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.push(r),i},ne=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i},re=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},ie=function(e,t){var n,r,i,o,a,s=t||0,u=[];for(n=0;n<e.length;n++)for(o=e[n],r=0;r<o.length;r++)a=o[r],s+=(i=ee(a,s)).size,u.push(i);return u},oe=function(e){var t,n,r,i,o,a,s=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(o=i[n],r=0;r<o.length;r++)a=o[r],d.setUint32(s,a.data.byteLength),s+=4,c.set(a.data,s),s+=a.data.byteLength;return c},ae=[33,16,5,32,164,27],se=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ue=function(e){for(var t=[];e--;)t.push(0);return t},le=function(e){return Object.keys(e).reduce((function(t,n){return t[n]=new Uint8Array(e[n].reduce((function(e,t){return e.concat(t)}),[])),t}),{})}({96e3:[ae,[227,64],ue(154),[56]],88200:[ae,[231],ue(170),[56]],64e3:[ae,[248,192],ue(240),[56]],48e3:[ae,[255,192],ue(268),[55,148,128],ue(54),[112]],44100:[ae,[255,192],ue(268),[55,163,128],ue(84),[112]],32e3:[ae,[255,192],ue(268),[55,234],ue(226),[112]],24e3:[ae,[255,192],ue(268),[55,255,128],ue(268),[111,112],ue(126),[224]],16e3:[ae,[255,192],ue(268),[55,255,128],ue(268),[111,255],ue(269),[223,108],ue(195),[1,192]],12e3:[se,ue(268),[3,127,248],ue(268),[6,255,240],ue(268),[13,255,224],ue(268),[27,253,128],ue(259),[56]],11025:[se,ue(268),[3,127,248],ue(268),[6,255,240],ue(268),[13,255,224],ue(268),[27,255,192],ue(268),[55,175,128],ue(108),[112]],8e3:[se,ue(268),[3,121,16],ue(47),[7]]});Z=function(e,t){return $(Y(e,t))},J=function(e,t){return K(X(e),t)};$=function(e){return 9e4*e},K=function(e,t){return e*t},X=function(e){return e/9e4},Y=function(e,t){return e/t};var ce=Z,de=J,fe=function(e,t,n,r){var i,o,a,s=0,u=0,l=0,c=0;if(t.length&&(i=ce(e.baseMediaDecodeTime,e.samplerate),s=Math.ceil(9e4/(e.samplerate/1024)),n&&r&&(u=i-Math.max(n,r),c=(l=Math.floor(u/s))*s),!(l<1||c>45e3))){for((o=le[e.samplerate])||(o=t[0].data),a=0;a<l;a++)t.splice(a,0,{data:o});e.baseMediaDecodeTime-=Math.floor(de(c,e.samplerate))}},he=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},pe=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r},ve=function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i},me=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},ge=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/9e4,n=Math.floor(n)),n},ye=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},_e=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}t+=i,r=0,i=0}return n},be=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Se=function(e,t){var n,r,i,o,a=[];if(!(64&t[0]))return a;for(r=31&t[0],n=0;n<r;n++)o={type:3&t[(i=3*n)+2],pts:e},4&t[i+2]&&(o.ccData=t[i+3]<<8|t[i+4],a.push(o));return a},Te=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},we=4,ke=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new xe(0,0),new xe(0,1),new xe(1,0),new xe(1,1)],this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))}),this)};(ke.prototype=new Q).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&((t=_e(e.escapedRBSP)).payloadType===we&&(n=be(t)))){if(e.dts<this.latestDts_)return void(this.ignoreNextEqualDts_=!0);if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return void(--this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Se(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},ke.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2&&this.dispatchCea608Packet(e)}),this),this.captionPackets_.length=0,this.ccStreams_.forEach((function(e){e.flush()}),this)):this.ccStreams_.forEach((function(e){e.flush()}),this)},ke.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},ke.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},ke.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},ke.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},ke.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)};var Ee={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ce=function(e){return null===e?"":(e=Ee[e]||e,String.fromCharCode(e))},Ae=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],je=function(){for(var e=[],t=15;t--;)e.push("");return e},xe=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,o;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=je();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=je();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=je()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))o=Ce((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),o=Ce((r=(3&r)<<8)|i),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var a=Ae.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),o=Ce(r),o+=Ce(i),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};xe.prototype=new Q,xe.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},xe.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=je(),this.nonDisplayed_=je(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},xe.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},xe.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},xe.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},xe.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},xe.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},xe.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},xe.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},xe.prototype.isNormalChar=function(e){return e>=32&&e<=127},xe.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=je(),this.displayed_=je()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},xe.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},xe.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},xe.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},xe.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},xe.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},xe.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Pe={CaptionStream:ke,Cea608Stream:xe},Le={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Oe=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Re=function e(t){var n,r;e.prototype.init.call(this),this.type_=t,this.push=function(e){e.type===this.type_&&(void 0===r&&(r=e.dts),e.dts=Oe(e.dts,r),e.pts=Oe(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.discontinuity=function(){r=void 0,n=void 0}};Re.prototype=new Q;var Ie,Me=Re,De=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},Ue=function(e,t,n){return decodeURIComponent(De(e,t,n))},Be=function(e,t,n){return unescape(De(e,t,n))},Ne=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Fe={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ue(e.data,1,t),e.value=Ue(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ue(e.data,1,t),e.url=Ue(e.data,t+1,e.data.length);break}},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Be(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Ie=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],o=0;if(Ie.prototype.init.call(this),this.dispatchType=Le.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,a,s,u,l;if("timed-metadata"===e.type){if(e.dataAlignmentIndicator&&(o=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))return void(n.debug&&console.log("Skipping unrecognized metadata packet"));if(i.push(e),o+=e.data.byteLength,1===i.length&&(r=Ne(e.data.subarray(6,10)),r+=10),!(o<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,o-=i[0].data.byteLength,i.shift();a=10,64&t.data[5]&&(a+=4,a+=Ne(t.data.subarray(10,14)),r-=Ne(t.data.subarray(16,20)));do{if((s=Ne(t.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[a],t.data[a+1],t.data[a+2],t.data[a+3]),data:t.data.subarray(a+10,a+s+10)}).key=u.id,Fe[u.id]&&(Fe[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],u.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),a+=10,a+=s}while(a<r);this.trigger("data",t)}}}}).prototype=new Q;var Ve,ze,He,Ge=Ie,qe=Me;(Ve=function(){var e=new Uint8Array(188),t=0;Ve.prototype.init.call(this),this.push=function(n){var r,i=0,o=188;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;o<r.byteLength;)71!==r[i]||71!==r[o]?(i++,o++):(this.trigger("data",r.subarray(i,o)),i+=188,o+=188);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){188===t&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")}}).prototype=new Q,(ze=function(){var e,t,n,r;ze.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var o=e[i],a=(31&e[i+1])<<8|e[i+2];o===Le.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=a:o===Le.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=a:o===Le.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][a]=o),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Le.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Le.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new Q,ze.STREAM_TYPES={h264:27,adts:15},(He=function(){var e=this,t={data:[],size:0},n={data:[],size:0},r={data:[],size:0},i=function(t,n,r){var i,o=new Uint8Array(t.size),a={type:n},s=0,u=0,l=!1;if(t.data.length&&!(t.size<9)){for(a.trackId=t.data[0].pid,s=0;s<t.data.length;s++)i=t.data[s],o.set(i.data,u),u+=i.data.byteLength;(function(e,t){var n;t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),192&(n=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8])})(o,a),l="video"===n||a.packetLength<=t.size,(r||l)&&(t.size=0,t.data.length=0),l&&e.trigger("data",a)}};He.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,a;switch(o.streamType){case Le.H264_STREAM_TYPE:case Le.H264_STREAM_TYPE:e=t,a="video";break;case Le.ADTS_STREAM_TYPE:e=n,a="audio";break;case Le.METADATA_STREAM_TYPE:e=r,a="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&i(e,a,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},n=o.programMapTable;null!==n.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"}),null!==n.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"}),e.trigger("data",t)}})[o.type]()},this.flush=function(){i(t,"video"),i(n,"audio"),i(r,"timed-metadata"),this.trigger("done")}}).prototype=new Q;var We={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ve,TransportParseStream:ze,ElementaryStream:He,TimestampRolloverStream:qe,CaptionStream:Pe.CaptionStream,Cea608Stream:Pe.Cea608Stream,MetadataStream:Ge};for(var $e in Le)Le.hasOwnProperty($e)&&(We[$e]=Le[$e]);var Ke,Xe=We,Ye=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Ke=function(){var e;Ke.prototype.init.call(this),this.push=function(t){var n,r,i,o,a,s,u=0,l=0;if("audio"===t.type)for(e?(o=e,(e=new Uint8Array(o.byteLength+t.data.byteLength)).set(o),e.set(t.data,o.byteLength)):e=t.data;u+5<e.length;)if(255===e[u]&&240==(246&e[u+1])){if(r=2*(1&~e[u+1]),n=(3&e[u+3])<<11|e[u+4]<<3|(224&e[u+5])>>5,s=9e4*(a=1024*(1+(3&e[u+6])))/Ye[(60&e[u+2])>>>2],i=u+n,e.byteLength<i)return;if(this.trigger("data",{pts:t.pts+l*s,dts:t.dts+l*s,sampleCount:a,audioobjecttype:1+(e[u+2]>>>6&3),channelcount:(1&e[u+2])<<2|(192&e[u+3])>>>6,samplerate:Ye[(60&e[u+2])>>>2],samplingfrequencyindex:(60&e[u+2])>>>2,samplesize:16,data:e.subarray(u+7+r,i)}),e.byteLength===i)return void(e=void 0);l++,e=e.subarray(i)}else u++},this.flush=function(){this.trigger("done")}}).prototype=new Q;var Ze,Je,Qe,et=Ke,tt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,o=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");o.set(e.subarray(i,i+a)),n=new DataView(o.buffer).getUint32(0),r=8*a,t-=a},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),o=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?o<<i|this.readBits(i):o},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(Je=function(){var e,t,n=0;Je.prototype.init.call(this),this.push=function(r){var i;for(t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;n<t.byteLength-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<t.byteLength;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<t.length);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")}}).prototype=new Q,Qe={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Ze=function(){var e,t,n,r,i,o,a,s=new Je;Ze.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,s.push(e))},s.on("data",(function(a){var s={trackId:t,pts:n,dts:r,data:a};switch(31&a[0]){case 5:s.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:s.nalUnitType="sei_rbsp",s.escapedRBSP=i(a.subarray(1));break;case 7:s.nalUnitType="seq_parameter_set_rbsp",s.escapedRBSP=i(a.subarray(1)),s.config=o(s.escapedRBSP);break;case 8:s.nalUnitType="pic_parameter_set_rbsp";break;case 9:s.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",s)})),s.on("done",(function(){e.trigger("done")})),this.flush=function(){s.flush()},a=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],o=1;o<r-2;)0===e[o]&&0===e[o+1]&&3===e[o+2]?(i.push(o+2),o+=2):o++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var a=0;for(o=0;o<t;a++,o++)a===i[0]&&(a++,i.shift()),n[o]=e[a];return n},o=function(e){var t,n,r,i,o,s,u,l,c,d,f,h,p,v=0,m=0,g=0,y=0,_=1;if(n=(t=new tt(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Qe[n]&&(3===(o=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(f=3!==o?8:12,p=0;p<f;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(v=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:h=[1,1];break;case 2:h=[12,11];break;case 3:h=[10,11];break;case 4:h=[16,11];break;case 5:h=[40,33];break;case 6:h=[24,11];break;case 7:h=[20,11];break;case 8:h=[32,11];break;case 9:h=[80,33];break;case 10:h=[18,11];break;case 11:h=[15,11];break;case 12:h=[64,33];break;case 13:h=[160,99];break;case 14:h=[4,3];break;case 15:h=[3,2];break;case 16:h=[2,1];break;case 255:h=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}h&&(_=h[0]/h[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*v-2*m)*_),height:(2-d)*(c+1)*16-2*g-2*y}}}).prototype=new Q;var nt,rt={H264Stream:Ze,NalByteStream:Je},it=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},ot=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},at=function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n};(nt=function(){var e=new Uint8Array,t=0;nt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,o,a,s=0,u=0;for(e.length?(a=e.length,(e=new Uint8Array(n.byteLength+a)).set(e.subarray(0,a)),e.set(n,a)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(s=at(e,u))>e.length)break;o={type:"audio",data:e.subarray(u,u+s),pts:t,dts:t},this.trigger("data",o),u+=s}else{if(e.length-u<10)break;if(u+(s=ot(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+s)},this.trigger("data",i),u+=s}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array}}).prototype=new Q;var st,ut,lt,ct,dt=nt,ft=rt.H264Stream,ht=it,pt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],vt=["width","height","profileIdc","levelIdc","profileCompatibility"],mt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},gt=function(e,t,n,r,i,o){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:o,baseMediaDecodeTime:e}};(ut=function(e,t){var n=[],r=0,i=0,o=0,a=1/0;t=t||{},ut.prototype.init.call(this),this.push=function(t){ye(e,t),e&&pt.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(t){i=t-e.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var s,u,l,c;0!==n.length?(s=he(n,e,i),e.baseMediaDecodeTime=ge(e,t.keepOriginalTimestamps),fe(e,s,o,a),e.samples=pe(s),l=H.mdat(ve(s)),n=[],u=H.moof(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),me(e),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")}}).prototype=new Q,(st=function(e,t){var n,r,i=0,o=[],a=[];t=t||{},st.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){ye(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],vt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.flush=function(){for(var n,r,s,u,l,c,d,f,h=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=te(o),(s=ne(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],e))?(h=r.duration,s.unshift(r),s.byteLength+=r.byteLength,s.nalCount+=r.nalCount,s.pts=r.pts,s.dts=r.dts,s.duration+=r.duration):s=re(s)),a.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(s):this.alignGopsAtStart_(s)))return this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");me(e),s=p}ye(e,s),e.samples=ie(s),l=H.mdat(oe(s)),e.baseMediaDecodeTime=ge(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",s.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=s[0],f=s[s.length-1],this.trigger("segmentTimingInfo",gt(e.baseMediaDecodeTime,d.dts,d.pts,f.dts+f.duration,f.pts+f.duration,h)),this.gopCache_.unshift({gop:s.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=H.moof(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){me(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,o,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)i=(o=this.gopCache_[a]).gop,e.pps&&mt(e.pps[0],o.pps[0])&&e.sps&&mt(e.sps[0],o.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||s>n)&&(r=o,s=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,o,s,u,l;for(o=e.byteLength,s=e.nalCount,u=e.duration,t=n=0;t<a.length&&n<e.length&&(r=a[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,o-=i.byteLength,s-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=o,l.duration=u,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,o,s,u;for(t=a.length-1,n=e.length-1,o=null,s=!1;t>=0&&n>=0;){if(r=a[t],i=e[n],r.pts===i.pts){s=!0;break}r.pts>i.pts?t--:(t===a.length-1&&(o=n),n--)}if(!s&&null===o)return null;if(0===(u=s?n:o))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){a=e}}).prototype=new Q,(ct=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps&&(this.keepOriginalTimestamps=e.keepOriginalTimestamps),this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ct.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}}).prototype=new Q,ct.prototype.flush=function(e){var t,n,r,i,o=0,a={captions:[],captionStreams:{},metadata:[],info:{}},s=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return void(++this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(s=this.videoTrack.timelineStartInfo.pts,vt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(s=this.audioTrack.timelineStartInfo.pts,pt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,r=H.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(r.byteLength),a.initSegment.set(r),a.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)a.data.set(this.pendingBoxes[i],o),o+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(t=this.pendingCaptions[i]).startTime=t.startPts,this.keepOriginalTimestamps||(t.startTime-=s),t.startTime/=9e4,t.endTime=t.endPts,this.keepOriginalTimestamps||(t.endTime-=s),t.endTime/=9e4,a.captionStreams[t.stream]=!0,a.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)(n=this.pendingMetadata[i]).cueTime=n.pts,this.keepOriginalTimestamps||(n.cueTime-=s),n.cueTime/=9e4,a.metadata.push(n);a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(lt=function(e){var t,n,r=this,i=!0;lt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};this.transmuxPipeline_=t,t.type="aac",t.metadataStream=new Xe.MetadataStream,t.aacStream=new dt,t.audioTimestampRolloverStream=new Xe.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new Xe.TimestampRolloverStream("timed-metadata"),t.adtsStream=new et,t.coalesceStream=new ct(e,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",(function(e){t.aacStream.setTimestamp(e.timeStamp)})),t.aacStream.on("data",(function(i){"timed-metadata"!==i.type||t.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new ut(n,e),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))})),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new Xe.MetadataStream,i.packetStream=new Xe.TransportPacketStream,i.parseStream=new Xe.TransportParseStream,i.elementaryStream=new Xe.ElementaryStream,i.videoTimestampRolloverStream=new Xe.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Xe.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Xe.TimestampRolloverStream("timed-metadata"),i.adtsStream=new et,i.h264Stream=new ft,i.captionStream=new Xe.CaptionStream,i.coalesceStream=new ct(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(o){var a;if("metadata"===o.type){for(a=o.tracks.length;a--;)t||"video"!==o.tracks[a].type?n||"audio"!==o.tracks[a].type||((n=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=o.tracks[a]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new st(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(e){n&&(n.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ut(n,e),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,me(n),e.keepOriginalTimestamps||(n.timelineStartInfo.baseMediaDecodeTime=r),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[],i.videoTimestampRolloverStream.discontinuity()),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,me(t),i.captionStream.reset(),e.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=r)),i.timedMetadataTimestampRolloverStream&&i.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=ht(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new Q;var yt,_t,bt={Transmuxer:lt,VideoSegmentStream:st,AudioSegmentStream:ut,AUDIO_PROPERTIES:pt,VIDEO_PROPERTIES:vt,generateVideoSegmentTimingInfo:gt},St=q.parseType,Tt=function(e){return new Date(1e3*e-20828448e5)},wt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},kt=function(e){var t,n,r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=[];for(t=0;t+4<e.length;t+=n)if(n=r.getUint32(t),t+=4,n<=0)i.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:i.push("slice_layer_without_partitioning_rbsp");break;case 5:i.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:i.push("sei_rbsp");break;case 7:i.push("seq_parameter_set_rbsp");break;case 8:i.push("pic_parameter_set_rbsp");break;case 9:i.push("access_unit_delimiter_rbsp");break;default:i.push("UNKNOWN NAL - "+e[t]&31)}return i},Et={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:yt(e.subarray(78,e.byteLength))}},avcC:function(e){var t,n,r,i,o=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},s=31&e[5];for(r=6,i=0;i<s;i++)n=o.getUint16(r),r+=2,a.sps.push(new Uint8Array(e.subarray(r,r+n))),r+=n;for(t=e[r],r++,i=0;i<t;i++)n=o.getUint16(r),r+=2,a.pps.push(new Uint8Array(e.subarray(r,r+n))),r+=n;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={majorBrand:St(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},r=8;r<e.byteLength;)n.compatibleBrands.push(St(e.subarray(r,r+4))),r+=4;return n},dinf:function(e){return{boxes:yt(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:yt(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:St(e.subarray(8,12)),name:""},n=8;for(n=24;n<e.byteLength;n++){if(0===e[n]){n++;break}t.name+=String.fromCharCode(e[n])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:kt(e)}},mdhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=4,i={version:n.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===i.version?(r+=4,i.creationTime=Tt(n.getUint32(r)),r+=8,i.modificationTime=Tt(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=8,i.duration=n.getUint32(r)):(i.creationTime=Tt(n.getUint32(r)),r+=4,i.modificationTime=Tt(n.getUint32(r)),r+=4,i.timescale=n.getUint32(r),r+=4,i.duration=n.getUint32(r)),r+=4,t=n.getUint16(r),i.language+=String.fromCharCode(96+(t>>10)),i.language+=String.fromCharCode(96+((992&t)>>5)),i.language+=String.fromCharCode(96+(31&t)),i},mdia:function(e){return{boxes:yt(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:yt(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(n.streamDescriptor=yt(e.subarray(28))[0]),n},moof:function(e){return{boxes:yt(e)}},moov:function(e){return{boxes:yt(e)}},mvex:function(e){return{boxes:yt(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=Tt(t.getUint32(n)),n+=8,r.modificationTime=Tt(t.getUint32(n)),n+=4,r.timescale=t.getUint32(n),n+=8,r.duration=t.getUint32(n)):(r.creationTime=Tt(t.getUint32(n)),n+=4,r.modificationTime=Tt(t.getUint32(n)),n+=4,r.timescale=t.getUint32(n),n+=4,r.duration=t.getUint32(n)),n+=4,r.rate=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,r.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,n+=8,r.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,n+=24,r.nextTrackId=t.getUint32(n),r},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)n.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return n},sidx:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8),earliestPresentationTime:n.getUint32(12),firstOffset:n.getUint32(16)},i=n.getUint16(22);for(t=24;i;t+=12,i--)r.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&n.getUint32(t+8)});return r},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:yt(e)}},stco:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},i=n.getUint32(4);for(t=8;i;t+=4,i--)r.chunkOffsets.push(n.getUint32(t));return r},stsc:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=n.getUint32(4),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;r;t+=12,r--)i.sampleToChunks.push({firstChunk:n.getUint32(t),samplesPerChunk:n.getUint32(t+4),sampleDescriptionIndex:n.getUint32(t+8)});return i},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:yt(e.subarray(8))}},stsz:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)r.entries.push(n.getUint32(t));return r},stts:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},i=n.getUint32(4);for(t=8;i;t+=8,i--)r.timeToSamples.push({sampleCount:n.getUint32(t),sampleDelta:n.getUint32(t+4)});return r},styp:function(e){return Et.ftyp(e)},tfdt:function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:e[4]<<24|e[5]<<16|e[6]<<8|e[7]};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=e[8]<<24|e[9]<<16|e[10]<<8|e[11]),t},tfhd:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===r.version?(n+=4,r.creationTime=Tt(t.getUint32(n)),n+=8,r.modificationTime=Tt(t.getUint32(n)),n+=4,r.trackId=t.getUint32(n),n+=4,n+=8,r.duration=t.getUint32(n)):(r.creationTime=Tt(t.getUint32(n)),n+=4,r.modificationTime=Tt(t.getUint32(n)),n+=4,r.trackId=t.getUint32(n),n+=4,n+=4,r.duration=t.getUint32(n)),n+=4,n+=8,r.layer=t.getUint16(n),n+=2,r.alternateGroup=t.getUint16(n),n+=2,r.volume=t.getUint8(n)+t.getUint8(n+1)/8,n+=2,n+=2,r.matrix=new Uint32Array(e.subarray(n,n+36)),n+=36,r.width=t.getUint16(n)+t.getUint16(n+2)/16,n+=4,r.height=t.getUint16(n)+t.getUint16(n+2)/16,r},traf:function(e){return{boxes:yt(e)}},trak:function(e){return{boxes:yt(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],o=4&n.flags[2],a=1&n.flags[1],s=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),o&&c&&(t={flags:wt(e.subarray(d,d+4))},d+=4,a&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),l&&(t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},a&&(t.duration=r.getUint32(d),d+=4),s&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=wt(e.subarray(d,d+4)),d+=4),l&&(t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},Ct={inspect:yt=function(e){for(var t,n,r,i,o,a=0,s=[],u=new ArrayBuffer(e.length),l=new Uint8Array(u),c=0;c<e.length;++c)l[c]=e[c];for(t=new DataView(u);a<e.byteLength;)n=t.getUint32(a),r=St(e.subarray(a+4,a+8)),i=n>1?a+n:e.byteLength,(o=(Et[r]||function(e){return{data:e}})(e.subarray(a+8,i))).size=n,o.type=r,s.push(o),a=i;return s},textify:_t=function(e,t){var n;return t=t||0,n=new Array(2*t+1).join(" "),e.map((function(e,r){return n+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var r=n+" "+t+": ",i=e[t];if(i instanceof Uint8Array||i instanceof Uint32Array){var o=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return o?1===o.length?r+"<"+o.join("").slice(1)+">":r+"<\n"+o.map((function(e){return n+" "+e})).join("\n")+"\n"+n+" >":r+"<>"}return r+JSON.stringify(i,null,2).split("\n").map((function(e,t){return 0===t?e:n+" "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+_t(e.boxes,t+1):"")})).join("\n")},parseTfdt:Et.tfdt,parseHdlr:Et.hdlr,parseTfhd:Et.tfhd,parseTrun:Et.trun,parseSidx:Et.sidx},At=Te,jt=Pe.CaptionStream,xt=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},Pt=function(e,t){var n=q.findBox(e,["moof","traf"]),r=q.findBox(e,["mdat"]),i={},o=[];return r.forEach((function(e,t){var r=n[t];o.push({mdat:e,traf:r})})),o.forEach((function(e){var n,r,o=e.mdat,a=e.traf,s=q.findBox(a,["tfhd"]),u=Ct.parseTfhd(s[0]),l=u.trackId,c=q.findBox(a,["tfdt"]),d=c.length>0?Ct.parseTfdt(c[0]).baseMediaDecodeTime:0,f=q.findBox(a,["trun"]);t===l&&f.length>0&&(n=function(e,t,n){var r=t,i=n.defaultSampleDuration||0,o=n.defaultSampleSize||0,a=n.trackId,s=[];return e.forEach((function(e){var t=Ct.parseTrun(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=o),e.trackId=a,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),s=s.concat(t)})),s}(f,d,u),r=function(e,t,n){var r,i,o,a,s=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=o)if(o=s.getUint32(i),i+=4,!(o<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+o),c=xt(i,t);r={nalUnitType:"sei_rbsp",size:o,data:l,escapedRBSP:At(l),trackId:n},c?(r.pts=c.pts,r.dts=c.dts,a=c):(r.pts=a.pts,r.dts=a.dts),u.push(r)}return u}(o,n,l),i[l]||(i[l]=[]),i[l]=i[l].concat(r))})),i},Lt={generator:H,probe:q,Transmuxer:bt.Transmuxer,AudioSegmentStream:bt.AudioSegmentStream,VideoSegmentStream:bt.VideoSegmentStream,CaptionParser:function(){var e,t,n,r,i,o=!1;this.isInitialized=function(){return o},this.init=function(){e=new jt,o=!0,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||n===e[0]&&r===t[n])},this.parse=function(e,o,a){var s;if(!this.isInitialized())return null;if(!o||!a)return null;if(this.isNewInit(o,a))n=o[0],r=a[n];else if(!n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,o,a)}return null!==(s=function(e,t,n){return t?{seiNals:Pt(e,t)[t],timescale:n}:null}(e,n,r))&&s.seiNals?(this.pushNals(s.seiNals),this.flushStream(),i):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},Ot=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Rt=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.options=n||{},this.self=t,this.init()}return Ot(e,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Lt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.captionStream&&t.captionStream.on("data",(function(t){e.postMessage({action:"caption",data:t})})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}))}(this.self,this.transmuxer)}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*t))}},{key:"setAudioAppendStart",value:function(e){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*e.appendStart))}},{key:"flush",value:function(e){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}]),e}();new function(e){e.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new Rt(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new Rt(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(n)}()})),xd={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},Pd=function(e){return e.map((function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)}))}))},Ld=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={codecCount:0},n=void 0;return t.codecCount=e.split(",").length,t.codecCount=t.codecCount||2,(n=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(e))&&(t.videoCodec=n[2],t.videoObjectTypeIndicator=n[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(e),t.audioProfile=t.audioProfile&&t.audioProfile[2],t},Od=function(e,t,n){return e+"/"+t+'; codecs="'+n.filter((function(e){return!!e})).join(", ")+'"'},Rd=function(e,t){var n=function(e){return e.segments&&e.segments.length&&e.segments[0].map?"mp4":"mp2t"}(t),r=function(e){var t=e.attributes||{};return t.CODECS?Ld(t.CODECS):xd}(t),i=t.attributes||{},o=!0,a=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&i.AUDIO){var s=e.mediaGroups.AUDIO[i.AUDIO];if(s)for(var u in a=!0,o=!1,s)if(!s[u].uri&&!s[u].playlists){o=!0;break}}a&&!r.audioProfile&&(o||(r.audioProfile=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return Ld(i.playlists[0].attributes.CODECS).audioProfile}return null}(e,i.AUDIO)),r.audioProfile||(De.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),r.audioProfile=xd.audioProfile));var l={};r.videoCodec&&(l.video=""+r.videoCodec+r.videoObjectTypeIndicator),r.audioProfile&&(l.audio="mp4a.40."+r.audioProfile);var c=Od("audio",n,[l.audio]),d=Od("video",n,[l.video]),f=Od("video",n,[l.video,l.audio]);return a?!o&&l.video?[d,c]:o||l.video?[f,c]:[c,c]:l.video?[f]:[c]},Id=function(e){return/mp4a\.\d+.\d+/i.test(e)},Md=function(e){return/avc1\.[\da-f]+/i.test(e)},Dd=function(e,t,n){if(null==t||!e.length)return[];var r=Math.ceil(9e4*(t-n+3)),i=void 0;for(i=0;i<e.length&&!(e[i].pts>r);i++);return e.slice(i)},Ud=function(e){function t(e,n){bc(this,t);var r=kc(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,De.EventTarget));r.timestampOffset_=0,r.pendingBuffers_=[],r.bufferUpdating_=!1,r.mediaSource_=e,r.codecs_=n,r.audioCodec_=null,r.videoCodec_=null,r.audioDisabled_=!1,r.appendAudioInitSegment_=!0,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=De.browser.IE_VERSION>=11;var i={remux:!1,alignGopsAtEnd:r.safeAppend_};return r.codecs_.forEach((function(e){Id(e)?r.audioCodec_=e:Md(e)&&(r.videoCodec_=e)})),r.transmuxer_=new jd,r.transmuxer_.postMessage({action:"init",options:i}),r.transmuxer_.onmessage=function(e){return"data"===e.data.action?r.data_(e):"done"===e.data.action?r.done_(e):"gopInfo"===e.data.action?r.appendGopInfo_(e):"videoSegmentTimingInfo"===e.data.action?r.videoSegmentTimingInfo_(e.data.videoSegmentTimingInfo):void 0},Object.defineProperty(r,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&e>=0&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(r,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(r,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(r,"buffered",{get:function(){return function(e,t,n){var r=null,i=null,o=0,a=[],s=[];if(!e&&!t)return De.createTimeRange();if(!e)return t.buffered;if(!t)return e.buffered;if(n)return e.buffered;if(0===e.buffered.length&&0===t.buffered.length)return De.createTimeRange();for(var u=e.buffered,l=t.buffered,c=u.length;c--;)a.push({time:u.start(c),type:"start"}),a.push({time:u.end(c),type:"end"});for(c=l.length;c--;)a.push({time:l.start(c),type:"start"}),a.push({time:l.end(c),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),c=0;c<a.length;c++)"start"===a[c].type?2==++o&&(r=a[c].time):"end"===a[c].type&&1==--o&&(i=a[c].time),null!==r&&null!==i&&(s.push([r,i]),r=null,i=null);return De.createTimeRanges(s)}(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),r}return wc(t,e),Sc(t,[{key:"data_",value:function(e){var t=e.data.segment;t.data=new Uint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),function(e,t,n){var r=t.player_;if(n.captions&&n.captions.length)for(var i in e.inbandTextTracks_||(e.inbandTextTracks_={}),n.captionStreams)if(!e.inbandTextTracks_[i]){r.tech_.trigger({type:"usage",name:"hls-608"});var o=r.textTracks().getTrackById(i);e.inbandTextTracks_[i]=o||r.addRemoteTextTrack({kind:"captions",id:i,label:i},!1).track}n.metadata&&n.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=n.metadata.dispatchType)}(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(e){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"videoSegmentTimingInfo_",value:function(e){var t={start:{decode:e.start.dts/9e4,presentation:e.start.pts/9e4},end:{decode:e.end.dts/9e4,presentation:e.end.pts/9e4},baseMediaDecodeTime:e.baseMediaDecodeTime/9e4};e.prependedContentDuration&&(t.prependedContentDuration=e.prependedContentDuration/9e4),this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}},{key:"createRealSourceBuffers_",value:function(){var e=this,t=["audio","video"];t.forEach((function(n){if(e[n+"Codec_"]&&!e[n+"Buffer_"]){var r=null;if(e.mediaSource_[n+"Buffer_"])(r=e.mediaSource_[n+"Buffer_"]).updating=!1;else{var i=n+'/mp4;codecs="'+e[n+"Codec_"]+'"';r=function(e,t){var n=e.addSourceBuffer(t),r=Object.create(null);for(var i in r.updating=!1,r.realBuffer_=n,n)!function(e){"function"==typeof n[e]?r[e]=function(){return n[e].apply(n,arguments)}:void 0===r[e]&&Object.defineProperty(r,e,{get:function(){return n[e]},set:function(t){return n[e]=t}})}(i);return r}(e.mediaSource_.nativeMediaSource_,i),e.mediaSource_[n+"Buffer_"]=r}e[n+"Buffer_"]=r,["update","updatestart","updateend"].forEach((function(i){r.addEventListener(i,(function(){if("audio"!==n||!e.audioDisabled_)return"updateend"===i&&(e[n+"Buffer_"].updating=!1),t.every((function(t){return!("audio"!==t||!e.audioDisabled_)||n===t||!e[t+"Buffer_"]||!e[t+"Buffer_"].updating}))?e.trigger(i):void 0}))}))}}))}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:Dd(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(e){this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,e.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(e,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(e,t),this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil(9e4*(t-r)),o=Math.ceil(9e4*(n-r)),a=e.slice(),s=e.length;s--&&!(e[s].pts<=o););if(-1===s)return a;for(var u=s+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),a.splice(u,s-u+1),a}(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),md(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)md(e,t,this.inbandTextTracks_[n])}},{key:"processPendingSegments_",value:function(){var e={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};e=this.pendingBuffers_.reduce((function(e,t){var n=t.type,r=t.data,i=t.initSegment;return e[n].segments.push(r),e[n].bytes+=r.byteLength,e[n].initSegment=i,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[n].info=t.info),t.metadata&&(e.metadata=e.metadata.concat(t.metadata)),e}),e),this.videoBuffer_||this.audioBuffer_||(0===e.video.bytes&&(this.videoCodec_=null),0===e.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),e.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:e.audio.info}),e.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:e.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(e.audio.segments.unshift(e.audio.initSegment),e.audio.bytes+=e.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var t=!1;this.videoBuffer_&&e.video.bytes?(e.video.segments.unshift(e.video.initSegment),e.video.bytes+=e.video.initSegment.byteLength,this.concatAndAppendSegments_(e.video,this.videoBuffer_)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),yd(this,e.captions,e.metadata),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(e.audio,this.audioBuffer_),this.pendingBuffers_.length=0,t&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(e,t){var n=0,r=void 0;if(e.bytes){r=new Uint8Array(e.bytes),e.segments.forEach((function(e){r.set(e,n),n+=e.byteLength}));try{t.updating=!0,t.appendBuffer(r)}catch(e){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}}]),t}(De.EventTarget),Bd=function(n){function r(){bc(this,r);var n=kc(this,(r.__proto__||Object.getPrototypeOf(r)).call(this)),i=void 0;for(i in n.nativeMediaSource_=new e.MediaSource,n.nativeMediaSource_)i in r.prototype||"function"!=typeof n.nativeMediaSource_[i]||(n[i]=n.nativeMediaSource_[i].bind(n.nativeMediaSource_));return n.duration_=NaN,Object.defineProperty(n,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(e){this.duration_=e,e===1/0||(this.nativeMediaSource_.duration=e)}}),Object.defineProperty(n,"seekable",{get:function(){return this.duration_===1/0?De.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(n,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(n,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),n.sourceBuffers=[],n.activeSourceBuffers_=[],n.updateActiveSourceBuffers_=function(){if(n.activeSourceBuffers_.length=0,1===n.sourceBuffers.length){var e=n.sourceBuffers[0];return e.appendAudioInitSegment_=!0,e.audioDisabled_=!e.audioCodec_,void n.activeSourceBuffers_.push(e)}for(var t=!1,r=!0,i=0;i<n.player_.audioTracks().length;i++){var o=n.player_.audioTracks()[i];if(o.enabled&&"main"!==o.kind){t=!0,r=!1;break}}n.sourceBuffers.forEach((function(e,i){if(e.appendAudioInitSegment_=!0,e.videoCodec_&&e.audioCodec_)e.audioDisabled_=t;else if(e.videoCodec_&&!e.audioCodec_)e.audioDisabled_=!0,r=!1;else if(!e.videoCodec_&&e.audioCodec_&&(e.audioDisabled_=i?r:!r,e.audioDisabled_))return;n.activeSourceBuffers_.push(e)}))},n.onPlayerMediachange_=function(){n.sourceBuffers.forEach((function(e){e.appendAudioInitSegment_=!0}))},n.onHlsReset_=function(){n.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.postMessage({action:"resetCaptions"})}))},n.onHlsSegmentTimeMapping_=function(e){n.sourceBuffers.forEach((function(t){return t.timeMapping_=e.mapping}))},["sourceopen","sourceclose","sourceended"].forEach((function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))}),n),n.on("sourceopen",(function(e){var r=t.querySelector('[src="'+n.url_+'"]');r&&(n.player_=De(r.parentNode),n.player_&&(n.player_.tech_.on("hls-reset",n.onHlsReset_),n.player_.tech_.on("hls-segment-time-mapping",n.onHlsSegmentTimeMapping_),n.player_.audioTracks&&n.player_.audioTracks()&&(n.player_.audioTracks().on("change",n.updateActiveSourceBuffers_),n.player_.audioTracks().on("addtrack",n.updateActiveSourceBuffers_),n.player_.audioTracks().on("removetrack",n.updateActiveSourceBuffers_)),n.player_.on("mediachange",n.onPlayerMediachange_)))})),n.on("sourceended",(function(e){for(var t=gd(n.duration),r=0;r<n.sourceBuffers.length;r++){var i=n.sourceBuffers[r],o=i.metadataTrack_&&i.metadataTrack_.cues;o&&o.length&&(o[o.length-1].endTime=t)}})),n.on("sourceclose",(function(e){this.sourceBuffers.forEach((function(e){e.transmuxer_&&e.transmuxer_.terminate()})),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_&&this.player_.tech_.el_&&(this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))})),n}return wc(r,n),Sc(r,[{key:"addSeekableRange_",value:function(e,t){var n=void 0;if(this.duration!==1/0)throw(n=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",n.code=11,n;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=void 0,n=function(e){var t={type:"",parameters:{}},n=e.trim().split(";");return t.type=n.shift().trim(),n.forEach((function(e){var n=e.trim().split("=");if(n.length>1){var r=n[0].replace(/"/g,"").trim(),i=n[1].replace(/"/g,"").trim();t.parameters[r]=i}})),t}(e);if(/^(video|audio)\/mp2t$/i.test(n.type)){var r=[];n.parameters&&n.parameters.codecs&&(r=n.parameters.codecs.split(","),r=(r=Pd(r)).filter((function(e){return Id(e)||Md(e)}))),0===r.length&&(r=["avc1.4d400d","mp4a.40.2"]),t=new Ud(this,r),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}}]),r}(De.EventTarget),Nd=0;De.mediaSources={};var Fd=function(e,t){var n=De.mediaSources[e];if(!n)throw new Error("Media Source not found (Video.js)");n.trigger({type:"sourceopen",swfId:t})},Vd=function(){return!!e.MediaSource&&!!e.MediaSource.isTypeSupported&&e.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},zd=function(){if(this.MediaSource={open:Fd,supportsNativeMediaSources:Vd},Vd())return new Bd;throw new Error("Cannot use create a virtual MediaSource for this video")};zd.open=Fd,zd.supportsNativeMediaSources=Vd;var Hd={createObjectURL:function(t){var n=void 0;return t instanceof Bd?(n=e.URL.createObjectURL(t.nativeMediaSource_),t.url_=n,n):t instanceof Bd?(n="blob:vjs-media-source/"+Nd,Nd++,De.mediaSources[n]=t,n):(n=e.URL.createObjectURL(t),t.url_=n,n)}};De.MediaSource=zd,De.URL=Hd;var Gd=De.EventTarget,qd=De.mergeOptions,Wd=function(e,t){for(var n=void 0,r=qd(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),i=0;i<t.playlists.length;i++){var o=Pc(r,t.playlists[i]);o?r=o:n=!0}return xc(t,(function(e,t,i,o){if(e.playlists&&e.playlists.length){var a=e.playlists[0].uri,s=Pc(r,e.playlists[0]);s&&((r=s).mediaGroups[t][i][o].playlists[0]=r.playlists[a],n=!1)}})),n?null:r},$d=function(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t},Kd=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},Xd=function(e,t){var n={};for(var r in e){var i=e[r].sidx;if(i){var o=$d(i);if(!t[o])break;var a=t[o].sidxInfo;Kd(a,i)&&(n[o]=t[o])}}return n},Yd=function(e,t,n,r,i){var o={uri:_c(r.handleManifestRedirects,e.resolvedUri),byterange:e.byterange,playlist:t};return n(De.mergeOptions(o,{responseType:"arraybuffer",headers:ed(o)}),i)},Zd=function(t){function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3];bc(this,n);var o=kc(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),a=r.withCredentials,s=void 0!==a&&a,u=r.handleManifestRedirects,l=void 0!==u&&u;if(o.hls_=t,o.withCredentials=s,o.handleManifestRedirects=l,!e)throw new Error("A non-empty playlist URL or playlist is required");return o.on("minimumUpdatePeriod",(function(){o.refreshXml_()})),o.on("mediaupdatetimeout",(function(){o.refreshMedia_(o.media().uri)})),o.state="HAVE_NOTHING",o.loadedPlaylists_={},"string"==typeof e?(o.srcUrl=e,o.sidxMapping_={},kc(o)):(o.setupChildLoader(i,e),o)}return wc(n,t),Sc(n,[{key:"setupChildLoader",value:function(e,t){this.masterPlaylistLoader_=e,this.childPlaylist_=t}},{key:"dispose",value:function(){this.stopRequest(),this.loadedPlaylists_={},e.clearTimeout(this.minimumUpdatePeriodTimeout_),e.clearTimeout(this.mediaRequest_),e.clearTimeout(this.mediaUpdateTimeout)}},{key:"hasPendingRequest",value:function(){return this.request||this.mediaRequest_}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"sidxRequestFinished_",value:function(e,t,n,r){var i=this;return function(o,a){if(i.request){if(i.request=null,o)return i.error={status:a.status,message:"DASH playlist request error at URL: "+e.uri,response:a.response,code:2},n&&(i.state=n),i.trigger("error"),r(t,null);var s=new Uint8Array(a.response),u=vu.parseSidx(s.subarray(8));return r(t,u)}}}},{key:"media",value:function(t){var n=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var r=this.state;if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}var i=!this.media_||t.uri!==this.media_.uri;if(i&&this.loadedPlaylists_[t.uri]&&this.loadedPlaylists_[t.uri].endList)return this.state="HAVE_METADATA",this.media_=t,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(i){if(this.media_&&this.trigger("mediachanging"),!t.sidx)return void(this.mediaRequest_=e.setTimeout(this.haveMetadata.bind(this,{startingState:r,playlist:t}),0));var o=void 0,a=void 0;this.masterPlaylistLoader_?(o=this.masterPlaylistLoader_.master,a=this.masterPlaylistLoader_.sidxMapping_):(o=this.master,a=this.sidxMapping_);var s=$d(t.sidx);a[s]={sidxInfo:t.sidx},this.request=Yd(t.sidx,t,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(t,o,r,(function(e,i){if(!e||!i)throw new Error("failed to request sidx");a[s].sidx=i,n.haveMetadata({startingState:r,playlist:e.playlists[t.uri]})})))}}},{key:"haveMetadata",value:function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.uri]=n,this.mediaRequest_=null,this.refreshMedia_(n.uri),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")}},{key:"pause",value:function(){this.stopRequest(),e.clearTimeout(this.mediaUpdateTimeout),e.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(t){var n=this;e.clearTimeout(this.mediaUpdateTimeout),e.clearTimeout(this.minimumUpdatePeriodTimeout_);var r=this.media();if(t){var i=r?r.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=e.setTimeout((function(){return n.load()}),i)}else this.started?this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var e=Ts(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_});e.uri=this.srcUrl;for(var t=0;t<e.playlists.length;t++){var n="placeholder-uri-"+t;e.playlists[t].uri=n,e.playlists[n]=e.playlists[t]}return xc(e,(function(t,n,r,i){if(t.playlists&&t.playlists.length){var o="placeholder-uri-"+n+"-"+r+"-"+i;t.playlists[0].uri=o,e.playlists[o]=t.playlists[0]}})),Lc(e),Oc(e),e}},{key:"start",value:function(){var t=this;this.started=!0,this.masterPlaylistLoader_?this.mediaRequest_=e.setTimeout(this.haveMaster_.bind(this),0):this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(e,n){if(t.request){if(t.request=null,e)return t.error={status:n.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:n.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.masterXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?t.masterLoaded_=Date.parse(n.responseHeaders.date):t.masterLoaded_=Date.now(),t.srcUrl=_c(t.handleManifestRedirects,t.srcUrl,n),t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))}}))}},{key:"syncClientServerClock_",value:function(e){var t=this,n=ws(this.masterXml_);return null===n?(this.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.clientOffset_=n.value-Date.now(),e()):void(this.request=this.hls_.xhr({uri:yc(this.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,i){if(t.request){if(r)return t.clientOffset_=t.masterLoaded_-Date.now(),e();var o;o="HEAD"===n.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):t.masterLoaded_:Date.parse(i.responseText),t.clientOffset_=o-Date.now(),e()}})))}},{key:"haveMaster_",value:function(){this.state="HAVE_MASTER",this.mediaRequest_=null,this.masterPlaylistLoader_?this.media_||this.media(this.childPlaylist_):(this.master=this.parseMasterXml(),this.trigger("loadedplaylist"))}},{key:"onClientServerClockSync_",value:function(){var t=this;this.haveMaster_(),this.hasPendingRequest()||this.media_||this.media(this.master.playlists[0]),this.master&&this.master.minimumUpdatePeriod&&(this.minimumUpdatePeriodTimeout_=e.setTimeout((function(){t.trigger("minimumUpdatePeriod")}),this.master.minimumUpdatePeriod))}},{key:"refreshXml_",value:function(){var t=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(t.request){if(t.request=null,n)return t.error={status:r.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:r.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.masterXml_=r.responseText,t.sidxMapping_=function(e,t,n,r){var i=Ts(e,{manifestUri:t,clientOffset:n}),o=Xd(i.playlists,r);return xc(i,(function(e,t,n,i){if(e.playlists&&e.playlists.length){var a=e.playlists;o=qd(o,Xd(a,r))}})),o}(t.masterXml_,t.srcUrl,t.clientOffset_,t.sidxMapping_);var i=t.parseMasterXml(),o=Wd(t.master,i);if(o){var a=$d(t.media().sidx);if(t.sidxMapping_[a])t.master=o;else{var s=t.media();t.request=Yd(s.sidx,s,t.hls_.xhr,{handleManifestRedirects:t.handleManifestRedirects},t.sidxRequestFinished_(s,i,t.state,(function(n,r){if(!n||!r)throw new Error("failed to request sidx on minimumUpdatePeriod");t.sidxMapping_[a].sidx=r,t.minimumUpdatePeriodTimeout_=e.setTimeout((function(){t.trigger("minimumUpdatePeriod")}),t.master.minimumUpdatePeriod),t.refreshMedia_(t.media().uri)})))}}t.minimumUpdatePeriodTimeout_=e.setTimeout((function(){t.trigger("minimumUpdatePeriod")}),t.master.minimumUpdatePeriod)}}))}},{key:"refreshMedia_",value:function(t){var n=this;if(!t)throw new Error("refreshMedia_ must take a media uri");var r=void 0,i=void 0;this.masterPlaylistLoader_?(r=this.masterPlaylistLoader_.master,i=this.masterPlaylistLoader_.parseMasterXml()):(r=this.master,i=this.parseMasterXml());var o=Wd(r,i);o?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=o:this.master=o,this.media_=o.playlists[t]):(this.media_=i.playlists[t],this.trigger("playlistunchanged")),this.media().endList||(this.mediaUpdateTimeout=e.setTimeout((function(){n.trigger("mediaupdatetimeout")}),Rc(this.media(),!!o))),this.trigger("loadedplaylist")}}]),n}(Gd),Jd=function(e){return De.log.debug?De.log.debug.bind(De,"VHS:",e+" >"):function(){}},Qd=function(){function e(t,n,r,i){bc(this,e),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,this.type_=r,this.mimeType_=n,this.logger_=Jd("SourceUpdater["+r+"]["+n+"]"),"closed"===t.readyState?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,n,i)):this.createSourceBuffer_(n,i)}return Sc(e,[{key:"createSourceBuffer_",value:function(e,t){var n=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(e),this.logger_("created SourceBuffer"),t&&(t.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?t.on("sourcebufferadded",(function(){n.start_()})):this.start_()}},{key:"start_",value:function(){var e=this;this.started_=!0,this.onUpdateendCallback_=function(){var t=e.pendingCallback_;e.pendingCallback_=null,e.sourceBuffer_.removing=!1,e.logger_("buffered ["+pd(e.buffered())+"]"),t&&t(),e.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(e){var t=this;this.processedAppend_&&this.queueCallback_((function(){t.sourceBuffer_.abort()}),e)}},{key:"appendBuffer",value:function(e,t){var n=this;this.processedAppend_=!0,this.queueCallback_((function(){e.videoSegmentTimingInfoCallback&&n.sourceBuffer_.addEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),n.sourceBuffer_.appendBuffer(e.bytes)}),(function(){e.videoSegmentTimingInfoCallback&&n.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),t()}))}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:De.createTimeRanges()}},{key:"remove",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He;this.processedAppend_&&this.queueCallback_((function(){n.logger_("remove ["+e+" => "+t+"]"),n.sourceBuffer_.removing=!0,n.sourceBuffer_.remove(e,t)}),r)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==He}},{key:"timestampOffset",value:function(e){var t=this;return void 0!==e&&(this.queueCallback_((function(){t.sourceBuffer_.timestampOffset=e,t.runCallback_()})),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){var e=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){var e=this,t=function t(){e.sourceBuffer_&&"open"===e.mediaSource.readyState&&e.sourceBuffer_.abort(),e.sourceBuffer_.removeEventListener("updateend",t)};this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_.removing?this.sourceBuffer_.addEventListener("updateend",t):t()}}]),e}(),ef={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},tf=2,nf=-101,rf=-102,of=function(e){e.forEach((function(e){e.abort()}))},af=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:nf,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:rf,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:tf,xhr:t}:null},sf=function(e,t,n){var r=0,i=!1;return function(o,a){if(!i)return o?(i=!0,of(e),n(o,a)):(r+=1)===e.length?(a.endOfAllRequests=Date.now(),a.encryptedBytes?function(e,t,n){var r;e.addEventListener("message",(function r(i){if(i.data.source===t.requestId){e.removeEventListener("message",r);var o=i.data.decrypted;return t.bytes=new Uint8Array(o.bytes,o.byteOffset,o.byteLength),n(null,t)}})),r=t.key.bytes.slice?t.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.key.bytes)),e.postMessage(id({source:t.requestId,encrypted:t.encryptedBytes,key:r,iv:t.key.iv}),[t.encryptedBytes.buffer,r.buffer])}(t,a,n):n(null,a)):void 0}},uf=function(e,t){return function(n){return e.stats=De.mergeOptions(e.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(n)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(n,e)}},lf=function(e,t,n,r,i,o,a){var s=[],u=sf(s,n,a);if(i.key&&!i.key.bytes){var l=De.mergeOptions(t,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),c=function(e,t){return function(n,r){var i=r.response,o=af(n,r);if(o)return t(o,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:tf,xhr:r},e);var a=new DataView(i);return e.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),t(null,e)}}(i,u),d=e(l,c);s.push(d)}if(i.map&&!i.map.bytes){var f=De.mergeOptions(t,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:ed(i.map)}),h=function(e,t,n){return function(r,i){var o=i.response,a=af(r,i);return a?n(a,e):0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:tf,xhr:i},e):(e.map.bytes=new Uint8Array(i.response),t&&!t.isInitialized()&&t.init(),e.map.timescales=lu.timescale(e.map.bytes),e.map.videoTrackIds=lu.videoTrackIds(e.map.bytes),n(null,e))}}(i,r,u),p=e(f,h);s.push(p)}var v=De.mergeOptions(t,{uri:i.resolvedUri,responseType:"arraybuffer",headers:ed(i)}),m=function(e,t,n){return function(r,i){var o=i.response,a=af(r,i),s=void 0;return a?n(a,e):0===o.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:tf,xhr:i},e):(e.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),e.key?e.encryptedBytes=new Uint8Array(i.response):e.bytes=new Uint8Array(i.response),t&&e.map&&e.map.bytes&&(t.isInitialized()||t.init(),(s=t.parse(e.bytes,e.map.videoTrackIds,e.map.timescales))&&s.captions&&(e.captionStreams=s.captionStreams,e.fmp4Captions=s.captions)),n(null,e))}}(i,r,u),g=e(v,m);return g.addEventListener("progress",uf(i,o)),s.push(g),function(){return of(s)}},cf=function(t,n){var r=void 0;return t?(r=e.getComputedStyle(t))?r[n]:"":""},df=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},ff=function(t,n){var r=void 0,i=void 0;return t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),r=r||e.Number.MAX_VALUE,n.attributes.BANDWIDTH&&(i=n.attributes.BANDWIDTH),r-(i=i||e.Number.MAX_VALUE)},hf=function(e,t,n){if(!e||!t)return!1;var r=n===e.segments.length;return e.endList&&"open"===t.readyState&&r},pf=function(e){return"number"==typeof e&&isFinite(e)},vf=function(t){function n(e){bc(this,n);var t=kc(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));if(!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return t.bandwidth=e.bandwidth,t.throughput={rate:0,count:0},t.roundTrip=NaN,t.resetStats_(),t.mediaIndex=null,t.hasPlayed_=e.hasPlayed,t.currentTime_=e.currentTime,t.seekable_=e.seekable,t.seeking_=e.seeking,t.duration_=e.duration,t.mediaSource_=e.mediaSource,t.hls_=e.hls,t.loaderType_=e.loaderType,t.startingMedia_=void 0,t.segmentMetadataTrack_=e.segmentMetadataTrack,t.goalBufferLength_=e.goalBufferLength,t.sourceType_=e.sourceType,t.inbandTextTracks_=e.inbandTextTracks,t.state_="INIT",t.checkBufferTimeout_=null,t.error_=void 0,t.currentTimeline_=-1,t.pendingSegment_=null,t.mimeType_=null,t.sourceUpdater_=null,t.xhrOptions_=null,t.activeInitSegmentId_=null,t.initSegments_={},t.cacheEncryptionKeys_=e.cacheEncryptionKeys,t.keyCache_={},"main"===t.loaderType_?t.captionParser_=new Zl:t.captionParser_=null,t.decrypter_=e.decrypter,t.syncController_=e.syncController,t.syncPoint_={segmentIndex:0,time:0},t.syncController_.on("syncinfoupdate",(function(){return t.trigger("syncinfoupdate")})),t.mediaSource_.addEventListener("sourceopen",(function(){return t.ended_=!1})),t.fetchAtBuffer_=!1,t.logger_=Jd("SegmentLoader["+t.loaderType_+"]"),Object.defineProperty(t,"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e)}}),t}return wc(n,t),Sc(n,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_(),this.captionParser_&&this.captionParser_.reset()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return void 0!==e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():De.createTimeRanges()}},{key:"initSegment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=od(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,timescales:e.timescales,videoTrackIds:e.videoTrackIds}),r||e}},{key:"segmentKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=ad(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new Qd(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return void(null!==this.mediaIndex&&this.resyncLoader());var o=e.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+o+"]"),null!==this.mediaIndex&&(this.mediaIndex-=o),r&&(r.mediaIndex-=o,r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(e.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e,t){this.mimeType_||(this.mimeType_=e,this.sourceBufferEmitter_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(e){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_(),e),this.captionParser_&&this.captionParser_.clearAllCaptions(),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t,n){if(this.sourceUpdater_&&this.sourceUpdater_.remove(e,t,n),md(e,t,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var r in this.inbandTextTracks_)md(e,t,this.inbandTextTracks_[r])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&e.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=e.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&e.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=e.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e)return this.isEndOfStream_(e.mediaIndex)?void this.endOfStream():void((e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&(e.timeline!==this.currentTimeline_&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment,this.captionParser_&&this.captionParser_.clearAllCaptions()),this.loadSegment_(e)))}}},{key:"isEndOfStream_",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.playlist_;return hf(t,this.mediaSource_,e)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function(e,t,n,r,i,o){var a=0,s=void 0;e.length&&(a=e.end(e.length-1));var u=Math.max(0,a-i);if(!t.segments.length)return null;if(u>=this.goalBufferLength_())return null;if(!r&&u>=1)return null;if(null===o)return n=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,n,null,!0);if(null!==n){var l=t.segments[n];return s=l&&l.end?l.end:a,this.generateSegmentInfo_(t,n+1,s,!1)}if(this.fetchAtBuffer_){var c=Yc.getMediaInfoForTime(t,a,o.segmentIndex,o.time);n=c.mediaIndex,s=c.startTime}else{var d=Yc.getMediaInfoForTime(t,i,o.segmentIndex,o.time);n=d.mediaIndex,s=d.startTime}return this.generateSegmentInfo_(t,n,s,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var n=e.segments.map((function(e,t){return{timeline:e.timeline,segmentIndex:t}})).filter((function(e){return e.timeline===t.currentTimeline_}));return n.length?n[Math.min(n.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,n,r){if(t<0||t>=e.segments.length)return null;var i=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:i.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:i.timeline,duration:i.duration,segment:i}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=Yc.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(i<=o)return!1;var a=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,i=e.duration,o=e.segmentDuration,a=e.timeUntilRebuffer,s=e.currentTimeline,u=e.syncController,l=t.playlists.filter((function(e){return!Yc.isIncompatible(e)})),c=l.filter(Yc.isEnabled);c.length||(c=l.filter((function(e){return!Yc.isDisabled(e)})));var d=c.filter(Yc.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=u.getSyncPoint(e,i,s,n)?1:2;return{playlist:e,rebufferingImpact:Yc.estimateSegmentRequestTime(o,r,e)*t-a}})),f=d.filter((function(e){return e.rebufferingImpact<=0}));return df(f,(function(e,t){return ff(t.playlist,e.playlist)})),f.length?f[0]:(df(d,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),d[0]||null)}({master:this.hls_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var s=i-o-a.rebufferingImpact,u=.5;return o<=1/30&&(u=1),!(!a.playlist||a.playlist.uri===this.playlist_.uri||s<u)&&(this.bandwidth=a.playlist.attributes.BANDWIDTH*ef.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(e,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),e.abortRequests=lf(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(e){var t=function(e,t,n){var r;return r=e.length&&e.start(0)>0&&e.start(0)<t?e.start(0):t-30,Math.min(r,t-n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,n={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var r=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);n.key=this.segmentKey(t.key),n.key.iv=r}return t.map&&(n.map=this.initSegment(t.map)),n}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===rf?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===nf?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),t.key&&this.segmentKey(t.key,!0),this.processSegmentResponse_(t)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,e.fmp4Captions&&(function(e,t,n){for(var r in n)if(!e[r]){t.trigger({type:"usage",name:"hls-608"});var i=t.textTracks().getTrackById(r);e[r]=i||t.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}}(this.inbandTextTracks_,this.hls_.tech_,e.captionStreams),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var i=window.WebKitDataCue||window.VTTCue;n.forEach((function(e){var n=e.stream,o=e.startTime,a=e.endTime;t[n]&&(o+=r,a+=r,t[n].addCue(new i(o,a,e.text)))}))}}({inbandTextTracks:this.inbandTextTracks_,captionArray:e.fmp4Captions,timestampOffset:0}),this.captionParser_&&this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){var t=this.pendingSegment_,n=t.segment,r=this.syncController_.probeSegmentInfo(t);void 0===this.startingMedia_&&r&&(r.containsAudio||r.containsVideo)&&(this.startingMedia_={containsAudio:r.containsAudio,containsVideo:r.containsVideo});var i=function(e,t,n){return"main"===e&&t&&n?n.containsAudio||n.containsVideo?t.containsVideo&&!n.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.containsVideo&&n.containsVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.startingMedia_,r);if(i)return this.error({message:i,blacklistDuration:1/0}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset"));var o=this.syncController_.mappingForTimeline(t.timeline);if(null!==o&&this.trigger({type:"segmenttimemapping",mapping:o}),this.state="APPENDING",n.map){var a=od(n.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==a){var s=this.initSegment(n.map);this.sourceUpdater_.appendBuffer({bytes:s.bytes},(function(){e.activeInitSegmentId_=a}))}}t.byteLength=t.bytes.byteLength,"number"==typeof n.start&&"number"==typeof n.end?this.mediaSecondsLoaded+=n.end-n.start:this.mediaSecondsLoaded+=n.duration,this.logger_(function(e){var t=e.segment,n=t.start,r=t.end,i=e.playlist,o=i.mediaSequence,a=i.id,s=i.segments,u=void 0===s?[]:s,l=e.mediaIndex,c=e.timeline;return["appending ["+l+"] of ["+o+", "+(o+u.length)+"] from playlist ["+a+"]","["+n+" => "+r+"] in timeline ["+c+"]"].join(" ")}(t)),this.sourceUpdater_.appendBuffer({bytes:t.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,t.requestId)},this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleVideoSegmentTimingInfo_",value:function(e,t){if(this.pendingSegment_&&e===this.pendingSegment_.requestId){var n=this.pendingSegment_.segment;n.videoTimingInfo||(n.videoTimingInfo={}),n.videoTimingInfo.transmuxerPrependedSeconds=t.videoSegmentTimingInfo.prependedContentDuration||0,n.videoTimingInfo.transmuxedPresentationStart=t.videoSegmentTimingInfo.start.presentation,n.videoTimingInfo.transmuxedPresentationEnd=t.videoSegmentTimingInfo.end.presentation,n.videoTimingInfo.baseMediaDecodeTime=t.videoSegmentTimingInfo.baseMediaDecodeTime}}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,n=null!==this.mediaIndex;this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration?this.resetEverything():(n&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.isEndOfStream_(e.mediaIndex+1,e.playlist)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(t){if(this.segmentMetadataTrack_){var n=t.segment,r=n.start,i=n.end;if(pf(r)&&pf(i)){md(r,i,this.segmentMetadataTrack_);var o=e.WebKitDataCue||e.VTTCue,a={custom:n.custom,dateTimeObject:n.dateTimeObject,dateTimeString:n.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:r,end:i},s=new o(r,i,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}}}]),n}(De.EventTarget),mf=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},gf=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),yf=function(t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};bc(this,n);var r=kc(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.mediaSource_=null,r.subtitlesTrack_=null,r}return wc(n,t),Sc(n,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return De.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return De.createTimeRanges([[t,n]])}},{key:"initSegment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var n=od(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=gf.byteLength+e.bytes.byteLength,o=new Uint8Array(i);o.set(e.bytes),o.set(gf,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return r||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(e,t){md(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var t=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var n=this.pendingSegment_,r=n.segment;if("function"!=typeof e.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var i=void 0,o=function(){t.subtitlesTrack_.tech_.off("vttjsloaded",i),t.error({message:"Error loading vtt.js"}),t.state="READY",t.pause(),t.trigger("error")};return i=function(){t.subtitlesTrack_.tech_.off("vttjserror",o),t.handleSegment_()},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",i),void this.subtitlesTrack_.tech_.one("vttjserror",o)}r.requested=!0;try{this.parseVTTCues_(n)}catch(e){return this.error({message:e.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=r.duration,n.cues.length&&this.remove(n.cues[0].endTime,n.cues[n.cues.length-1].endTime),n.cues.forEach((function(e){t.subtitlesTrack_.addCue(e)})),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(t){var n=void 0,r=!1;"function"==typeof e.TextDecoder?n=new e.TextDecoder("utf8"):(n=e.WebVTT.StringDecoder(),r=!0);var i=new e.WebVTT.Parser(e,e.vttjs,n);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=t.cues.push.bind(t.cues),i.ontimestampmap=function(e){return t.timestampmap=e},i.onparsingerror=function(e){De.log.warn("Error encountered when parsing cues: "+e.message)},t.segment.map){var o=t.segment.map.bytes;r&&(o=mf(o)),i.parse(o)}var a=t.bytes;r&&(a=mf(a)),i.parse(a),i.flush()}},{key:"updateTimeMapping_",value:function(e,t,n){var r=e.segment;if(t){if(!e.cues.length)return void(r.empty=!0);var i=e.timestampmap,o=i.MPEGTS/9e4-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=o,e.endTime+=o})),!n.syncInfo){var a=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,s-r.duration)}}}}}]),n}(vf),_f=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},bf=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.segments)for(var i=r,o=void 0,a=0;a<t.segments.length;a++){var s=t.segments[a];if(o||(o=_f(n,i+s.duration/2)),o){if("cueIn"in s){o.endTime=i,o.adEndTime=i,i+=s.duration,o=null;continue}if(i<o.endTime){i+=s.duration;continue}o.endTime+=s.duration}else if("cueOut"in s&&((o=new e.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,o.adEndTime=i+parseFloat(s.cueOut),n.addCue(o)),"cueOutCont"in s){var u=void 0,l=void 0,c=s.cueOutCont.split("/").map(parseFloat),d=Ec(c,2);u=d[0],l=d[1],(o=new e.VTTCue(i,i+s.duration,"")).adStartTime=i-u,o.adEndTime=o.adStartTime+l,n.addCue(o)}i+=s.duration}},Sf=uc,Tf=[{name:"VOD",run:function(e,t,n,r,i){return n!==1/0?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!e.datetimeToDisplayTime)return null;var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,d=Math.abs(i-c);if(null!==s&&(0===d||s<d))break;s=d,a={time:c,segmentIndex:u}}}return a}},{name:"Segment",run:function(e,t,n,r,i){var o=t.segments||[],a=null,s=null;i=i||0;for(var u=0;u<o.length;u++){var l=o[u];if(l.timeline===r&&void 0!==l.start){var c=Math.abs(i-l.start);if(null!==s&&s<c)break;(!a||null===s||s>=c)&&(s=c,a={time:l.start,segmentIndex:u})}}return a}},{name:"Discontinuity",run:function(e,t,n,r,i){var o=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,s=0;s<t.discontinuityStarts.length;s++){var u=t.discontinuityStarts[s],l=t.discontinuitySequence+s+1,c=e.discontinuities[l];if(c){var d=Math.abs(i-c.time);if(null!==a&&a<d)break;(!o||null===a||a>=d)&&(a=d,o={time:c.time,segmentIndex:u})}}return o}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],wf=function(e){function t(){bc(this,t);var e=kc(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.inspectCache_=void 0,e.timelines=[],e.discontinuities=[],e.datetimeToDisplayTime=null,e.logger_=Jd("SyncController"),e}return wc(t,e),Sc(t,[{key:"getSyncPoint",value:function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+Bc(e,r.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,n,r){for(var i=[],o=0;o<Tf.length;o++){var a=Tf[o],s=a.run(this,e,t,n,r);s&&(s.strategy=a.name,i.push({strategy:a.name,syncPoint:s}))}return i}},{key:"selectSyncPoint_",value:function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,o=1;o<e.length;o++){var a=Math.abs(e[o].syncPoint[t.key]-t.value);a<r&&(r=a,n=e[o].syncPoint,i=e[o].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t,n=e.segment,r=e.playlist;return(t=n.map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,t)&&(this.saveDiscontinuitySyncInfo_(e),r.syncInfo||(r.syncInfo={mediaSequence:r.mediaSequence+e.mediaIndex,time:n.start})),t}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,n=lu.timescale(t.map.bytes),r=lu.startTime(n,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=r),{start:r,end:r+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=Sf(e.bytes,this.inspectCache_),n=void 0,r=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,n=t.video[0].dtsTime,r=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,n=t.audio[0].dtsTime,r=t.audio[1].dtsTime),{start:n,end:r,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var n=e.segment,r=this.timelines[e.timeline];if(null!==e.timestampOffset)r={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=r,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+r.time+"] [mapping: "+r.mapping+"]"),n.start=e.startOfSegment,n.end=t.end+r.mapping;else{if(!r)return!1;n.start=t.start+r.mapping,n.end=t.end+r.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],o=t.discontinuitySequence+r+1,a=i-e.mediaIndex,s=Math.abs(a);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>s){var u;u=a<0?n.start-Bc(t,e.mediaIndex,i):n.end+Bc(t,e.mediaIndex+1,i),this.discontinuities[o]={time:u,accuracy:s}}}}}]),t}(De.EventTarget),kf=new Ve("./decrypter-worker.worker.js",(function(e,t){var n=this;!function(){var e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=null,i=function(){function t(n){e(this,t),r||(r=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],n=e[1],r=t[4],i=n[4],o=void 0,a=void 0,s=void 0,u=[],l=[],c=void 0,d=void 0,f=void 0,h=void 0,p=void 0;for(o=0;o<256;o++)l[(u[o]=o<<1^283*(o>>7))^o]=o;for(a=s=0;!r[a];a^=c||1,s=l[s]||1)for(f=(f=s^s<<1^s<<2^s<<3^s<<4)>>8^255&f^99,r[a]=f,i[f]=a,p=16843009*u[d=u[c=u[a]]]^65537*d^257*c^16843008*a,h=257*u[f]^16843008*f,o=0;o<4;o++)t[o][a]=h=h<<24^h>>>8,n[o][f]=p=p<<24^p>>>8;for(o=0;o<5;o++)t[o]=t[o].slice(0),n[o]=n[o].slice(0);return e}()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];var i=void 0,o=void 0,a=void 0,s=void 0,u=void 0,l=this._tables[0][4],c=this._tables[1],d=n.length,f=1;if(4!==d&&6!==d&&8!==d)throw new Error("Invalid aes key size");for(s=n.slice(0),u=[],this._key=[s,u],i=d;i<4*d+28;i++)a=s[i-1],(i%d==0||8===d&&i%d==4)&&(a=l[a>>>24]<<24^l[a>>16&255]<<16^l[a>>8&255]<<8^l[255&a],i%d==0&&(a=a<<8^a>>>24^f<<24,f=f<<1^283*(f>>7))),s[i]=s[i-d]^a;for(o=0;i;o++,i--)a=s[3&o?i:i-4],u[o]=i<=4||o<4?a:c[0][l[a>>>24]]^c[1][l[a>>16&255]]^c[2][l[a>>8&255]]^c[3][l[255&a]]}return t.prototype.decrypt=function(e,t,n,r,i,o){var a=this._key[1],s=e^a[0],u=r^a[1],l=n^a[2],c=t^a[3],d=void 0,f=void 0,h=void 0,p=a.length/4-2,v=void 0,m=4,g=this._tables[1],y=g[0],_=g[1],b=g[2],S=g[3],T=g[4];for(v=0;v<p;v++)d=y[s>>>24]^_[u>>16&255]^b[l>>8&255]^S[255&c]^a[m],f=y[u>>>24]^_[l>>16&255]^b[c>>8&255]^S[255&s]^a[m+1],h=y[l>>>24]^_[c>>16&255]^b[s>>8&255]^S[255&u]^a[m+2],c=y[c>>>24]^_[s>>16&255]^b[u>>8&255]^S[255&l]^a[m+3],m+=4,s=d,u=f,l=h;for(v=0;v<4;v++)i[(3&-v)+o]=T[s>>>24]<<24^T[u>>16&255]<<16^T[l>>8&255]<<8^T[255&c]^a[m++],d=s,s=u,u=l,l=c,c=d},t}(),o=function(){function t(){e(this,t),this.listeners={}}return t.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.prototype.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e].splice(n,1),n>-1},t.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(e){this.on("data",(function(t){e.push(t)}))},t}(),a=function(t){function n(){e(this,n);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.call(this,o));return r.jobs=[],r.delay=1,r.timeout_=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},n}(o),s=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},u=function(){function n(t,r,i,o){e(this,n);var u=n.STEP,l=new Int32Array(t.buffer),c=new Uint8Array(t.byteLength),d=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+u),r,i,c)),d=u;d<l.length;d+=u)i=new Uint32Array([s(l[d-4]),s(l[d-3]),s(l[d-2]),s(l[d-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(d,d+u),r,i,c));this.asyncStream_.push((function(){o(null,function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}(c))}))}return n.prototype.decryptChunk_=function(e,t,n,r){return function(){var o=function(e,t,n){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),o=new i(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),u=new Int32Array(a.buffer),l=void 0,c=void 0,d=void 0,f=void 0,h=void 0,p=void 0,v=void 0,m=void 0,g=void 0;for(l=n[0],c=n[1],d=n[2],f=n[3],g=0;g<r.length;g+=4)h=s(r[g]),p=s(r[g+1]),v=s(r[g+2]),m=s(r[g+3]),o.decrypt(h,p,v,m,u,g),u[g]=s(u[g]^l),u[g+1]=s(u[g+1]^c),u[g+2]=s(u[g+2]^d),u[g+3]=s(u[g+3]^f),l=h,c=p,d=v,f=m;return a}(e,t,n);r.set(o,e.byteOffset)}},t(n,null,[{key:"STEP",get:function(){return 32e3}}]),n}();new function(e){e.onmessage=function(t){var n=t.data,r=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),o=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new u(r,i,o,(function(t,r){e.postMessage(function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t}({source:n.source,decrypted:r}),[r.buffer])}))}}(n)}()})),Ef=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Cf=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Af=function(e,t){t.activePlaylistLoader=e,e.load()},jf={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Cf(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter((function(e){return e.default}))[0]||a[0]).id,u=r.tracks[s];if(o!==u){for(var l in De.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];De.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Cf(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},xf={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",jf[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),o.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",jf[e](e,n))}},Pf={AUDIO:function(e,t){var n=t.hls,r=t.sourceType,i=t.segmentLoaders[e],o=t.requestOptions,a=t.master.mediaGroups,s=t.mediaTypes[e],u=s.groups,l=s.tracks,c=t.masterPlaylistLoader;for(var d in a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}}),a[e])for(var f in u[d]||(u[d]=[]),a[e][d]){var h,p=a[e][d][f];if(h=p.resolvedUri?new Ic(p.resolvedUri,n,o):p.playlists&&"dash"===r?new Zd(p.playlists[0],n,o,c):null,p=De.mergeOptions({id:f,playlistLoader:h},p),xf[e](e,p.playlistLoader,t),u[d].push(p),void 0===l[f]){var v=new De.AudioTrack({id:f,kind:Ef(p),enabled:!1,language:p.language,default:p.default,label:f});l[f]=v}}i.on("error",jf[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.hls,i=t.sourceType,o=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var f in s[e])for(var h in l[f]||(l[f]=[]),s[e][f])if(!s[e][f][h].forced){var p=s[e][f][h],v=void 0;if("hls"===i?v=new Ic(p.resolvedUri,r,a):"dash"===i&&(v=new Zd(p.playlists[0],r,a,d)),p=De.mergeOptions({id:h,playlistLoader:v},p),xf[e](e,p.playlistLoader,t),l[f].push(p),void 0===c[h]){var m=n.addRemoteTextTrack({id:h,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:h},!1).track;c[h]=m}}o.on("error",jf[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],o=i.groups,a=i.tracks;for(var s in r[e])for(var u in o[s]||(o[s]=[]),r[e][s]){var l=r[e][s][u];if(l.instreamId.match(/CC\d/)&&(o[s].push(De.mergeOptions({id:u},l)),void 0===a[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;a[u]=c}}}},Lf={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode)return n[r];return null}}},Of=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Pf[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.hls;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=r.media();if(!o)return null;var a=null;return o.attributes[e]&&(a=i[o.attributes[e]]),a=a||i.main,void 0===n?a:null===n?null:a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Lf[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(Cf(r,o),s){if(!s.playlistLoader)return void(u&&i.resetEverything());r.resyncLoader(),Af(s.playlistLoader,o)}}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(Cf(r,o),s){if(!s.playlistLoader)return void i.resetEverything();if(u===s.playlistLoader)return void Af(s.playlistLoader,o);r.track&&r.track(a),r.resetEverything(),Af(s.playlistLoader,o)}}}(n,e)}));var o=t.AUDIO.activeGroup(),a=(o.filter((function(e){return e.default}))[0]||o[0]).id;t.AUDIO.tracks[a].enabled=!0,t.AUDIO.onTrackChanged(),n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))}));var s=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"hls-audio-change"})};for(var u in r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[u])},Rf=void 0,If=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Mf=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Df=function(t){function n(e){bc(this,n);var t=kc(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),r=e.url,i=e.handleManifestRedirects,o=e.withCredentials,a=e.tech,s=e.bandwidth,u=e.externHls,l=e.useCueTags,c=e.blacklistDuration,d=e.enableLowInitialPlaylist,f=e.sourceType,h=e.seekTo,p=e.cacheEncryptionKeys;if(!r)throw new Error("A non-empty playlist URL is required");Rf=u,t.withCredentials=o,t.tech_=a,t.hls_=a.hls,t.seekTo_=h,t.sourceType_=f,t.useCueTags_=l,t.blacklistDuration=c,t.enableLowInitialPlaylist=d,t.useCueTags_&&(t.cueTagsTrack_=t.tech_.addTextTrack("metadata","ad-cues"),t.cueTagsTrack_.inBandMetadataTrackDispatchType=""),t.requestOptions_={withCredentials:o,handleManifestRedirects:i,timeout:null},t.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:He,activeTrack:He,onGroupChanged:He,onTrackChanged:He}})),e}(),t.mediaSource=new De.MediaSource,t.mediaSource.addEventListener("sourceopen",t.handleSourceOpen_.bind(t)),t.seekable_=De.createTimeRanges(),t.hasPlayed_=function(){return!1},t.syncController_=new wf(e),t.segmentMetadataTrack_=a.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,t.decrypter_=new kf,t.inbandTextTracks_={};var v={hls:t.hls_,mediaSource:t.mediaSource,currentTime:t.tech_.currentTime.bind(t.tech_),seekable:function(){return t.seekable()},seeking:function(){return t.tech_.seeking()},duration:function(){return t.mediaSource.duration},hasPlayed:function(){return t.hasPlayed_()},goalBufferLength:function(){return t.goalBufferLength()},bandwidth:s,syncController:t.syncController_,decrypter:t.decrypter_,sourceType:t.sourceType_,inbandTextTracks:t.inbandTextTracks_,cacheEncryptionKeys:p};return t.masterPlaylistLoader_="dash"===t.sourceType_?new Zd(r,t.hls_,t.requestOptions_):new Ic(r,t.hls_,t.requestOptions_),t.setupMasterPlaylistLoaderListeners_(),t.mainSegmentLoader_=new vf(De.mergeOptions(v,{segmentMetadataTrack:t.segmentMetadataTrack_,loaderType:"main"}),e),t.audioSegmentLoader_=new vf(De.mergeOptions(v,{loaderType:"audio"}),e),t.subtitleSegmentLoader_=new yf(De.mergeOptions(v,{loaderType:"vtt"}),e),t.setupSegmentLoaderListeners_(),If.forEach((function(e){t[e+"_"]=Mf.bind(t,e)})),t.logger_=Jd("MPC"),t.masterPlaylistLoader_.load(),t}return wc(n,t),Sc(n,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Xc(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Of({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,hls:e.hls_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t);try{e.setupSourceBuffers_()}catch(t){return De.log.warn("Failed to create SourceBuffers",t),e.mediaSource.endOfStream("decode")}e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var t=e.masterPlaylistLoader_.media();if(!t){e.excludeUnsupportedVariants_();var n=void 0;return e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),e.initialMedia_=n,void e.masterPlaylistLoader_.media(e.initialMedia_)}if(e.useCueTags_&&e.updateAdCues_(t),e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.updateDuration(),e.tech_.paused()||(e.mainSegmentLoader_.load(),e.audioSegmentLoader_&&e.audioSegmentLoader_.load()),!t.endList){var r=function(){var t=e.seekable();0!==t.length&&e.mediaSource.addSeekableRange_(t.start(0),t.end(0))};if(e.duration()!==1/0){e.tech_.one("durationchange",(function t(){e.duration()===1/0?r():e.tech_.one("durationchange",t)}))}else r()}})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Xc(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))}},{key:"triggerPresenceUsage_",value:function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o]){n.AUDIO[o][a].uri||(r=!1)}r&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),Rf.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),Rf.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist(),n=e.masterPlaylistLoader_.media(),r=e.tech_.buffered(),i=r.length?r.end(r.length-1)-e.tech_.currentTime():0,o=e.bufferLowWaterLine();(!n.endList||e.duration()<ef.MAX_BUFFER_LOW_WATER_LINE||t.attributes.BANDWIDTH<n.attributes.BANDWIDTH||i>=o)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("ended",(function(){e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)})),this.mainSegmentLoader_.on("reseteverything",(function(){e.tech_.trigger("hls-reset")})),this.mainSegmentLoader_.on("segmenttimemapping",(function(t){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})})),this.audioSegmentLoader_.on("ended",(function(){e.onEndOfStream()}))}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"smoothQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var e=this,t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything((function(){De.browser.IE_VERSION||De.browser.IS_EDGE?e.tech_.setCurrentTime(e.tech_.currentTime()+.04):e.tech_.setCurrentTime(e.tech_.currentTime())})))}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.seekTo_(0),this.hasPlayed_()&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.seekTo_(e.end(e.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_())return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(De.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.seekTo_(n.end(0)),e.hasPlayed_=function(){return!0}})),!1;this.trigger("firstplay"),this.seekTo_(n.end(0))}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(e){return De.log.warn("Failed to create Source Buffers",e),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e){this.logger_("calling mediaSource.endOfStream()");try{this.mediaSource.endOfStream()}catch(e){De.log.warn("Failed to call media source endOfStream",e)}}}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===t)return!1;var n=Rf.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var o=i.end(i.length-1);return o-r<=.1&&n-o<=.1}},{key:"blacklistCurrentPlaylist",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=void 0,r=void 0;if(n=e.playlist||this.masterPlaylistLoader_.media(),t=t||e.blacklistDuration||this.blacklistDuration,!n){this.error=e;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var i=1===this.masterPlaylistLoader_.master.playlists.filter($c).length,o=this.masterPlaylistLoader_.master.playlists;return 1===o.length?(De.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(i)):(i&&(De.log.warn("Removing all playlists from the blacklist because the last rendition is about to be blacklisted."),o.forEach((function(e){e.excludeUntil!==1/0&&delete e.excludeUntil})),this.tech_.trigger("retryplaylist")),n.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),r=this.selectPlaylist(),De.log.warn("Problem encountered with the current HLS playlist."+(e.message?" "+e.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(r,i))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(e){var t=fd(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:Rf.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0,t=void 0;if(this.masterPlaylistLoader_){var n=this.masterPlaylistLoader_.media();if(n){var r=this.syncController_.getExpiredTime(n,this.mediaSource.duration);if(null!==r&&0!==(e=Rf.Playlist.seekable(n,r)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(n=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(r=this.syncController_.getExpiredTime(n,this.mediaSource.duration)))return;if(0===(t=Rf.Playlist.seekable(n,r)).length)return}var i=void 0,o=void 0;this.seekable_&&this.seekable_.length&&(i=this.seekable_.end(0),o=this.seekable_.start(0)),t?t.start(0)>e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=De.createTimeRanges([[t.start(0)>e.start(0)?t.start(0):e.start(0),t.end(0)<e.end(0)?t.end(0):e.end(0)]]):this.seekable_=e,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===i&&this.seekable_.start(0)===o||(this.logger_("seekable updated ["+pd(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},{key:"updateDuration",value:function(){var e=this,t=this.mediaSource.duration,n=Rf.Playlist.duration(this.masterPlaylistLoader_.media()),r=this.tech_.buffered(),i=function t(){e.logger_("Setting duration from "+e.mediaSource.duration+" => "+n);try{e.mediaSource.duration=n}catch(e){De.log.warn("Failed to set media source duration",e)}e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)};r.length>0&&(n=Math.max(n,r.end(r.length-1))),t!==n&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",i):i())}},{key:"dispose",value:function(){var e=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e=this.masterPlaylistLoader_.media(),t=void 0;if(e&&"open"===this.mediaSource.readyState){if((t=Rd(this.masterPlaylistLoader_.master,e)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(t),this.excludeIncompatibleVariants_(e)}}},{key:"configureLoaderMimeTypes_",value:function(e){var t=e.length>1&&-1===e[0].indexOf(",")&&e[0]!==e[1]?new De.EventTarget:null;this.mainSegmentLoader_.mimeType(e[0],t),e[1]&&this.audioSegmentLoader_.mimeType(e[1],t)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach((function(t){t.attributes.CODECS&&e.MediaSource&&e.MediaSource.isTypeSupported&&!e.MediaSource.isTypeSupported('video/mp4; codecs="'+function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return Pd([e])[0]}))}(t.attributes.CODECS)+'"')&&(t.excludeUntil=1/0)}))}},{key:"excludeIncompatibleVariants_",value:function(e){var t=2,n=null,r=void 0;e.attributes.CODECS&&(r=Ld(e.attributes.CODECS),n=r.videoCodec,t=r.codecCount),this.master().playlists.forEach((function(e){var r={codecCount:2,videoCodec:null};e.attributes.CODECS&&(r=Ld(e.attributes.CODECS)),r.codecCount!==t&&(e.excludeUntil=1/0),r.videoCodec!==n&&(e.excludeUntil=1/0)}))}},{key:"updateAdCues_",value:function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),bf(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=ef.GOAL_BUFFER_LENGTH,n=ef.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,ef.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=ef.BUFFER_LOW_WATER_LINE,n=ef.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,ef.MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,r)}}]),n}(De.EventTarget),Uf=function e(t,n,r){bc(this,e);var i=t.masterPlaylistController_,o=i[(t.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(i);if(n.attributes.RESOLUTION){var a=n.attributes.RESOLUTION;this.width=a.width,this.height=a.height}this.bandwidth=n.attributes.BANDWIDTH,this.id=r,this.enabled=function(e,t,n){return function(r){var i=e.master.playlists[t],o=Wc(i),a=$c(i);return void 0===r?a:(r?delete i.disabled:i.disabled=!0,r===a||o||(n(),r?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),r)}}(t.playlists,n.uri,o)},Bf=["seeking","seeked","pause","playing","error"],Nf=function(){function t(n){var r=this;bc(this,t),this.tech_=n.tech,this.seekable=n.seekable,this.seekTo=n.seekTo,this.allowSeeksWithinUnsafeLiveWindow=n.allowSeeksWithinUnsafeLiveWindow,this.media=n.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Jd("PlaybackWatcher"),this.logger_("initialize");var i=function(){return r.monitorCurrentTime_()},o=function(){return r.techWaiting_()},a=function(){return r.cancelTimer_()},s=function(){return r.fixesBadSeeks_()};this.tech_.on("seekablechanged",s),this.tech_.on("waiting",o),this.tech_.on(Bf,a),this.tech_.on("canplay",i),this.dispose=function(){r.logger_("dispose"),r.tech_.off("seekablechanged",s),r.tech_.off("waiting",o),r.tech_.off(Bf,a),r.tech_.off("canplay",i),r.checkCurrentTimeTimeout_&&e.clearTimeout(r.checkCurrentTimeTimeout_),r.cancelTimer_()}}return Sc(t,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&e.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=e.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){if(!this.tech_.seeking())return!1;var e=this.seekable(),t=this.tech_.currentTime(),n=void 0;return this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(n=e.end(e.length-1)),this.beforeSeekableWindow_(e,t)&&(n=e.start(0)+.1),void 0!==n&&(this.logger_("Trying to seek outside of seekable at time "+t+" with seekable range "+pd(e)+". Seeking to "+n+"."),this.seekTo(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=fd(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.seekTo(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.seekTo(n),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.buffered(),i=hd(r,t);if(this.videoUnderflow_(i,r,t))return this.cancelTimer_(),this.seekTo(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(i.length>0){var o=i.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+o+", seeking to "+i.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*o,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-.1)}},{key:"videoUnderflow_",value:function(e,t,n){if(0===e.length){var r=this.gapFromVideoUnderflow_(t,n);if(r)return this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+n),!0}return!1}},{key:"skipTheGap_",value:function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=hd(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.seekTo(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(var n=function(e){if(e.length<2)return De.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return De.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:o}}return null}}]),t}(),Ff={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},Vf=function e(t,n){var r=0,i=0,o=De.mergeOptions(Ff,n);t.ready((function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*o.errorInterval?void t.trigger({type:"usage",name:"hls-error-reload-canceled"}):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(t,s)):void De.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",a),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}},zf=function(e){Vf(this,e)};De.use("*",(function(e){return{setSource:function(e,t){t(null,e)},setCurrentTime:function(t){return e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(t),t},play:function(){e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(e.tech_.currentTime())}}}));var Hf={PlaylistLoader:Ic,Playlist:Yc,Decrypter:gc,AsyncStream:pc,decrypt:mc,utils:ud,STANDARD_PLAYLIST_SELECTOR:function(){return function(t,n,r,i,o){var a=t.playlists.map((function(t){var n,r;return n=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,r=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height,{bandwidth:t.attributes.BANDWIDTH||e.Number.MAX_VALUE,width:n,height:r,playlist:t}}));df(a,(function(e,t){return e.bandwidth-t.bandwidth}));var s=(a=a.filter((function(e){return!Yc.isIncompatible(e.playlist)}))).filter((function(e){return Yc.isEnabled(e.playlist)}));s.length||(s=a.filter((function(e){return!Yc.isDisabled(e.playlist)})));var u=s.filter((function(e){return e.bandwidth*ef.BANDWIDTH_VARIANCE<n})),l=u[u.length-1],c=u.filter((function(e){return e.bandwidth===l.bandwidth}))[0];if(!1===o){var d=c||s[0]||a[0];return d?d.playlist:null}var f=u.filter((function(e){return e.width&&e.height}));df(f,(function(e,t){return e.width-t.width}));var h=f.filter((function(e){return e.width===r&&e.height===i}));l=h[h.length-1];var p=h.filter((function(e){return e.bandwidth===l.bandwidth}))[0],v=void 0,m=void 0,g=void 0;p||(m=(v=f.filter((function(e){return e.width>r||e.height>i}))).filter((function(e){return e.width===v[0].width&&e.height===v[0].height})),l=m[m.length-1],g=m.filter((function(e){return e.bandwidth===l.bandwidth}))[0]);var y=g||p||c||s[0]||a[0];return y?y.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(cf(this.tech_.el(),"width"),10),parseInt(cf(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var e=this.playlists.master.playlists.filter(Yc.isEnabled);return df(e,(function(e,t){return ff(e,t)})),e.filter((function(e){return Ld(e.attributes.CODECS).videoCodec}))[0]||null},comparePlaylistBandwidth:ff,comparePlaylistResolution:function(t,n){var r=void 0,i=void 0;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),r=r||e.Number.MAX_VALUE,n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(i=n.attributes.RESOLUTION.width),r===(i=i||e.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&n.attributes.BANDWIDTH?t.attributes.BANDWIDTH-n.attributes.BANDWIDTH:r-i},xhr:Qc()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach((function(e){Object.defineProperty(Hf,e,{get:function(){return De.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),ef[e]},set:function(t){De.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?De.log.warn("value of Hls."+e+" must be greater than or equal to 0"):ef[e]=t}})}));var Gf=function(e){return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e)?"hls":/^application\/dash\+xml/i.test(e)?"dash":null},qf=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.uri){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Hf.canPlaySource=function(){return De.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Wf=function(e){if("dash"===e.options_.sourceType){var t=De.players[e.tech_.options_.playerId];if(t.eme){var n=function(e,t,n){if(!e)return e;var r={};for(var i in e)r[i]={audioContentType:'audio/mp4; codecs="'+n.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+t.attributes.CODECS+'"'},t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(r[i].pssh=t.contentProtection[i].pssh),"string"==typeof e[i]&&(r[i].url=e[i]);return De.mergeOptions(e,r)}(e.source_.keySystems,e.playlists.media(),e.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());n&&(t.currentSource().keySystems=n,t.eme.initializeMediaKeys&&t.eme.initializeMediaKeys())}}},$f=function(){if(!window.localStorage)return null;var e=window.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Hf.supportsNativeHls=function(){var e=t.createElement("video");return!!De.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Hf.supportsNativeDash=!!De.getTech("Html5").isSupported()&&/maybe|probably/i.test(t.createElement("video").canPlayType("application/dash+xml")),Hf.supportsTypeNatively=function(e){return"hls"===e?Hf.supportsNativeHls:"dash"===e&&Hf.supportsNativeDash},Hf.isSupported=function(){return De.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Kf=function(e){function n(e,r,i){bc(this,n);var o=kc(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r,i.hls));if(r.options_&&r.options_.playerId){var a=De(r.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return De.log.warn("player.hls is deprecated. Use player.tech().hls instead."),r.trigger({type:"usage",name:"hls-player-access"}),o},configurable:!0}),a.vhs=o,a.dash=o,o.player_=a}if(o.tech_=r,o.source_=e,o.stats={},o.setOptions_(),o.options_.overrideNative&&r.overrideNativeAudioTracks&&r.overrideNativeVideoTracks)r.overrideNativeAudioTracks(!0),r.overrideNativeVideoTracks(!0);else if(o.options_.overrideNative&&(r.featuresNativeVideoTracks||r.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return o.on(t,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var n=t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;n&&n.contains(o.tech_.el())&&o.masterPlaylistController_.smoothQualityChange_()})),o.on(o.tech_,"seeking",(function(){0===this.tech_.currentTime()&&this.tech_.player_.loop()&&this.setCurrentTime(0)})),o.on(o.tech_,"error",(function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),o.on(o.tech_,"play",o.play),o}return wc(n,e),Sc(n,[{key:"setOptions_",value:function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=$f();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=ef.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ef.INITIAL_BANDWIDTH,["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function(e,t){var n=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=Hf,this.options_.sourceType=Gf(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e),n.setCurrentTime(e)},this.masterPlaylistController_=new Df(this.options_),this.playbackWatcher_=new Nf(De.mergeOptions(this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()}})),this.masterPlaylistController_.on("error",(function(){De.players[n.tech_.options_.playerId].error(n.masterPlaylistController_.error)})),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Hf.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Hf.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){De.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return vd(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return vd(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!window.localStorage)return!1;var t=$f();t=t?De.mergeOptions(t,e):e;try{window.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){(function(e){var t=e.playlists;e.representations=function(){return t.master.playlists.filter((function(e){return!Wc(e)})).map((function(t,n){return new Uf(e,t,t.uri)}))}})(n),Wf(n)})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.tech_.ready((function(){return n.setupQualityLevels_()})),this.tech_.el()&&this.tech_.src(De.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var e=this,t=De.players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){!function(e,t){t.representations().forEach((function(t){e.addQualityLevel(t)})),qf(e,t.playlists)}(e.qualityLevels_,e)})),this.playlists.on("mediachange",(function(){qf(e.qualityLevels_,e.playlists)})))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.hls&&delete this.tech_.hls,Tc(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function(e,t){return ld({playlist:this.masterPlaylistController_.media(),time:e,callback:t})}},{key:"seekToProgramTime",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return cd({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}]),n}(De.getComponent("Component")),Xf={name:"videojs-http-streaming",VERSION:"1.10.3",canHandleSource:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=De.mergeOptions(De.options,t);return Xf.canPlayType(e.type,n)},handleSource:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=De.mergeOptions(De.options,n);return t.hls=new Kf(e,t,r),t.hls.xhr=Qc(),t.hls.src(e.src,e.type),t.hls},canPlayType:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=De.mergeOptions(De.options,t),r=n.hls.overrideNative,i=Gf(e);return!i||Hf.supportsTypeNatively(i)&&!r?"":"maybe"}};return void 0!==De.MediaSource&&void 0!==De.URL||(De.MediaSource=zd,De.URL=Hd),zd.supportsNativeMediaSources()&&De.getTech("Html5").registerSourceHandler(Xf,0),De.HlsHandler=Kf,De.HlsSourceHandler=Xf,De.Hls=Hf,De.use||De.registerComponent("Hls",Hf),De.options.hls=De.options.hls||{},De.registerPlugin?De.registerPlugin("reloadSourceOnError",zf):De.plugin("reloadSourceOnError",zf),De})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):e.videojsSnapshot=t(e.videojs)}(this,(function(e){"use strict";e="default"in e?e.default:e;var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};return function(e,t){return e(t={exports:{}}),t.exports}((function(n){!function(t,r){n.exports?n.exports=r(e):t.returnExports=r(t.videojs)}(t,(function(e){var t,n,r={},i=e.registerPlugin||e.plugin,o=e.getComponent("Component"),a=e.getComponent("Button");e.SnapshoterBaseComponent=e.extend(o,{constructor:function(e,t){o.call(this,e,t)},dispose:function(){}}),e.SnapshoterComponent=e.extend(e.SnapshoterBaseComponent,{constructor:function(t,n){o.call(this,t,n),this.loadOptions(),this.resetState(),this.player().one("ready",this.setupUI.bind(this));var r=e.ImageCaptureEngine;try{this.engine=new r(this.player())}catch(t){throw new Error("Could not load "+e.ImageCaptureEngine+" plugin")}},loadOptions:function(){},setupUI:function(){this.player().controlBar.addChild(this.player().cameraButton),this.player().controlBar.el().appendChild(this.player().cameraButton.el()),this.player().options_.controls&&(this.player().controlBar.show(),this.player().controlBar.el().style.display="flex")},isSnapshoting:function(){return this._snapshoting},isProcessing:function(){return this._processing},isDestroyed:function(){return this.player()&&null===this.player().children()},start:function(){this.isProcessing()||(this._snapshoting=!0,this._processing=!0,this.player().controlBar.playToggle.hide(),this.createSnapshot())},stop:function(){this.isProcessing()&&(this._snapshoting=!1,this._processing=!1),this.player().controlBar.playToggle.show()},destroy:function(){this.stop(),this.player().dispose(),this.resetState()},reset:function(){this.stop(),this.loadOptions(),this.resetState(),this.player().reset(),this.player().snapshotCanvas.hide(),this.player().cameraButton.hide()},resetState:function(){this._snapshoting=!1,this._processing=!1},createSnapshot:function(){var e=this;this.captureFrame().then((function(t){e.player().trigger("snap",t),e.stop()})).catch((function(e){console.log(e)}))},retrySnapshot:function(){this._processing=!1,this.player().snapshotCanvas.hide()},captureFrame:function(){var e=this,t=this.player().snapshotCanvas.el().firstChild;return t.width=this.player().videoWidth(),t.height=this.player().videoHeight(),new Promise((function(n,r){return n(e.engine.imageCaptureByIdAndCanvasDom(e.player().id(),t))}))}}),n=e.extend(o),(t=e.extend(a,{constructor:function(e,t){a.call(this,e,t),this.on("click",this.onClick),this.on("tap",this.onClick)}})).prototype.onClick=function(e){e.stopImmediatePropagation();var t=this.player().snapshoter;t.isProcessing()?(t.retrySnapshot(),this.onStop()):t.start()},t.prototype.onStart=function(){this.removeClass("vjs-icon-photo-camera"),this.addClass("vjs-icon-photo-retry"),this.el().firstChild.firstChild.innerHTML=this.localize("Retry")},t.prototype.onStop=function(){this.removeClass("vjs-icon-photo-retry"),this.addClass("vjs-icon-photo-camera"),this.el().firstChild.firstChild.innerHTML=this.localize("Image")};var s=function(e,t,n){var r={className:"vjs-"+e+"-control vjs-control vjs-button",innerHTML:'<span aria-hidden="true" class="vjs-icon-'+n+'"></span><span class="vjs-control-text" aria-live="polite">'+t+"</span>"},i={title:t,type:"button","aria-disabled":"false"};return o.prototype.createEl("button",r,i)},u=function(e){var t={className:"vjs-"+e+"-canvas",innerHTML:"<canvas></canvas>"};return o.prototype.createEl("div",t)},l=function(i){var o=this,a=e.mergeOptions(r,i),l=this;l.ready((function(){!function(e,t){e.addClass("vjs-snapshot")}(o,e.mergeOptions(r,i))})),l.on("play",(function(){try{l.tech_.el_.setAttribute("crossorigin","anonymous")}catch(e){}})),l.snapshoter=new e.SnapshoterComponent(this,{options:a}),l.addChild(l.snapshoter),l.snapshotCanvas=new n(l,{el:u("snapshot")}),l.snapshotCanvas.hide(),l.snapshoter.addChild(l.snapshotCanvas),l.cameraButton=new t(l,{el:s("snapshot",l.localize("Snapshot"),"spinner")}),l.cameraButton.show()};return i("snapshot",l),l})),function(t,r){n.exports?n.exports=r(e):t.returnExports=r(t.videojs)}(t,(function(e){var t=e.getComponent("Component");e.ImageCaptureEngine=e.extend(t,{constructor:function(e,n){t.call(this,e,n)},formatTag:function(e){if(e&&0!==(e=e.trim()).length)return e},getDomByIdAndTag:function(e,t){t=this.formatTag(t);var n=document.getElementById(e);if(t&&0!==t.trim().length)return n.tagName.toUpperCase()===t.toUpperCase()?n:n.getElementsByTagName(t)[0]},getScreenContainerDomByIdAndTag:function(e,t){return(t=this.formatTag(t))?this.getDomByIdAndTag(e,t):this.getDomByIdAndTag(e,"object")||this.getDomByIdAndTag(e,"video")},drawCanvas:function(e,t){e.width=t.videoWidth,e.height=t.videoHeight,e.getContext("2d").drawImage(t,0,0,e.width,e.height)},imageCaptureByDom:function(e,t){var n;return e&&e.tagName.toUpperCase()==="object".toUpperCase()?n=e.vjs_snap():(this.drawCanvas(t,e),n=t.toDataURL("image/png")),n},imageCaptureById:function(e,t){return this.imageCaptureByDom(this.getScreenContainerDomByIdAndTag(e),this.getDomByIdAndTag(t,"canvas"))},imageCaptureByIdAndCanvasDom:function(e,t){return this.imageCaptureByDom(this.getScreenContainerDomByIdAndTag(e),t)}})}))}))})),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).flvjs=e()}}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(r,i){!function(e,r){"object"==typeof n&&void 0!==t?t.exports=r():e.ES6Promise=r()}(this,(function(){"use strict";function t(e){return"function"==typeof e}function n(){var e=setTimeout;return function(){return e(o,1)}}function o(){for(var e=0;e<b;e+=2)(0,x[e])(x[e+1]),x[e]=void 0,x[e+1]=void 0;b=0}function a(e,t){var n=this,r=new this.constructor(u);void 0===r[L]&&y(r);var i=n._state;if(i){var o=arguments[i-1];w((function(){return g(i,r,o,n._result)}))}else v(n,r,e,t);return r}function s(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(u);return d(t,e),t}function u(){}function l(e){try{return e.then}catch(e){return M.error=e,M}}function c(e,n,r){n.constructor===e.constructor&&r===a&&n.constructor.resolve===s?function(e,t){t._state===R?h(e,t._result):t._state===I?p(e,t._result):v(t,void 0,(function(t){return d(e,t)}),(function(t){return p(e,t)}))}(e,n):r===M?(p(e,M.error),M.error=null):void 0===r?h(e,n):t(r)?function(e,t,n){w((function(e){var r=!1,i=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?d(e,n):h(e,n))}),(function(t){r||(r=!0,p(e,t))}),e._label);!r&&i&&(r=!0,p(e,i))}),e)}(e,n,r):h(e,n)}function d(e,t){e===t?p(e,new TypeError("You cannot resolve a promise with itself")):function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}(t)?c(e,t,l(t)):h(e,t)}function f(e){e._onerror&&e._onerror(e._result),m(e)}function h(e,t){e._state===O&&(e._result=t,e._state=R,0!==e._subscribers.length&&w(m,e))}function p(e,t){e._state===O&&(e._state=I,e._result=t,w(f,e))}function v(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+R]=n,i[o+I]=r,0===o&&e._state&&w(m,e)}function m(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,o=e._result,a=0;a<t.length;a+=3)r=t[a],i=t[a+n],r?g(n,r,i,o):i(o);e._subscribers.length=0}}function g(e,n,r,i){var o=t(r),a=void 0,s=void 0,u=void 0,l=void 0;if(o){if((a=function(e,t){try{return e(t)}catch(e){return M.error=e,M}}(r,i))===M?(l=!0,s=a.error,a.error=null):u=!0,n===a)return void p(n,new TypeError("A promises callback cannot return that same promise."))}else a=i,u=!0;n._state!==O||(o&&u?d(n,a):l?p(n,s):e===R?h(n,a):e===I&&p(n,a))}function y(e){e[L]=D++,e._state=void 0,e._result=void 0,e._subscribers=[]}var _=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},b=0,S=void 0,T=void 0,w=function(e,t){x[b]=e,x[b+1]=t,2===(b+=2)&&(T?T(o):P())},k="undefined"!=typeof window?window:void 0,E=k||{},C=E.MutationObserver||E.WebKitMutationObserver,A="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),j="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,x=new Array(1e3),P=void 0;P=A?function(){return r.nextTick(o)}:C?function(){var e=0,t=new C(o),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():j?function(){var e=new MessageChannel;return e.port1.onmessage=o,function(){return e.port2.postMessage(0)}}():void 0===k&&"function"==typeof e?function(){try{var e=Function("return this")().require("vertx");return void 0!==(S=e.runOnLoop||e.runOnContext)?function(){S(o)}:n()}catch(e){return n()}}():n();var L=Math.random().toString(36).substring(2),O=void 0,R=1,I=2,M={error:null},D=0,U=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(u),this.promise[L]||y(this.promise),_(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?h(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&h(this.promise,this._result))):p(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===s){var i=l(e);if(i===a&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===B){var o=new n(u);c(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,e===I?p(r,n):this._result[t]=n),0===this._remaining&&h(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;v(e,void 0,(function(e){return n._settledAt(R,t,e)}),(function(e){return n._settledAt(I,t,e)}))},e}(),B=function(){function e(t){this[L]=D++,this._result=this._state=void 0,this._subscribers=[],u!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t((function(t){d(e,t)}),(function(t){p(e,t)}))}catch(t){p(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();return B.prototype.then=a,B.all=function(e){return new U(this,e).promise},B.race=function(e){var t=this;return new t(_(e)?function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})},B.resolve=s,B.reject=function(e){var t=new this(u);return p(t,e),t},B._setScheduler=function(e){T=e},B._setAsap=function(e){w=e},B._asap=w,B.polyfill=function(){var e=void 0;if(void 0!==i)e=i;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=B},B.Promise=B,B}))}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],2:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(a(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),r=(l=n.slice()).length,u=0;u<r;u++)l[u].apply(this,s);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(){v&&h&&(v=!1,h.length?p=h.concat(p):m=-1,p.length&&s())}function s(){if(!v){var e=o(a);v=!0;for(var t=p.length;t;){for(h=p,p=[];++m<t;)h&&h[m].run();m=-1,t=p.length}h=null,v=!1,function(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function l(){}var c,d,f=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}}();var h,p=[],v=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new u(e,t)),1!==p.length||v||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=l,f.addListener=l,f.once=l,f.off=l,f.removeListener=l,f.removeAllListeners=l,f.emit=l,f.prependListener=l,f.prependOnceListener=l,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],4:[function(e,t,n){var r=arguments[3],i=arguments[4],o=arguments[5],a=JSON.stringify;t.exports=function(e,t){for(var n,s=Object.keys(o),u=0,l=s.length;u<l;u++){var c=s[u],d=o[c].exports;if(d===e||d&&d.default===e){n=c;break}}if(!n){n=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var f={};for(u=0,l=s.length;u<l;u++){f[c=s[u]]=c}i[n]=["function(require,module,exports){"+e+"(self); }",f]}var h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[n]=n,i[h]=["function(require,module,exports){var f = require("+a(n)+");(f.default ? f.default : f)(self);}",p];var v={};!function e(t){for(var n in v[t]=!0,i[t][1]){var r=i[t][1][n];v[r]||e(r)}}(h);var m="("+r+")({"+Object.keys(v).map((function(e){return a(e)+":["+i[e][0]+","+a(i[e][1])+"]"})).join(",")+"},{},["+a(h)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([m],{type:"text/javascript"});if(t&&t.bare)return y;var _=g.createObjectURL(y),b=new Worker(_);return b.objectURL=_,b}},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDefaultConfig=function(){return Object.assign({},r)};var r=n.defaultConfig={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0}},{}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(e("../io/io-controller.js")),o=e("../config.js"),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var e=new i.default({},(0,o.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new i.default({},(0,o.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){null==e.videoElement&&(e.videoElement=window.document.createElement("video"));var n=e.videoElement.canPlayType(t);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t}}]),e}();n.default=a},{"../config.js":5,"../io/io-controller.js":23}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return r(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,r=e.length-1,i=0,o=0,a=r;for(t<e[0]&&(n=0,o=a+1);o<=a;){if((i=o+Math.floor((a-o)/2))===r||t>=e[i]&&t<e[i+1]){n=i;break}e[i]<t?o=i+1:a=i-1}return n}}]),e}();n.default=i},{}],8:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n.SampleInfo=function e(t,n,i,o,a){r(this,e),this.dts=t,this.pts=n,this.duration=i,this.originalDts=o,this.isSyncPoint=a,this.fileposition=null},n.MediaSegmentInfo=function(){function e(){r(this,e),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return i(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),n.IDRSampleList=function(){function e(){r(this,e),this._list=[]}return i(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,r=t.length-1,i=0,o=0,a=r;for(e<t[0].dts&&(n=0,o=a+1);o<=a;){if((i=o+Math.floor((a-o)/2))===r||e>=t[i].dts&&e<t[i+1].dts){n=i;break}t[i].dts<e?o=i+1:a=i-1}return this._list[n]}}]),e}(),n.MediaSegmentInfoList=function(){function e(t){r(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return i(e,[{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,r=0,i=0,o=n,a=0;if(e<t[0].originalBeginDts)return-1;for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||e>t[r].lastSample.originalDts&&e<t[r+1].originalBeginDts){a=r;break}t[r].originalBeginDts<e?i=r+1:o=r-1}return a}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,r=this._lastAppendLocation,i=0;-1!==r&&r<t.length&&n.originalBeginDts>=t[r].lastSample.originalDts&&(r===t.length-1||r<t.length-1&&n.originalBeginDts<t[r+1].originalBeginDts)?i=r+1:t.length>0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}},{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}]),e}()},{}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(e("events")),a=r(e("../utils/logger.js")),s=r(e("../utils/browser.js")),u=r(e("./mse-events.js")),l=e("./media-segment-info.js"),c=e("../utils/exception.js"),d=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.TAG="MSEController",this._config=t,this._emitter=new o.default,this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new l.IDRSampleList}return i(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new c.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var r=this._sourceBuffers[t];if(r){if("closed"!==e.readyState){try{e.removeSourceBuffer(r)}catch(e){a.default.e(this.TAG,e.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){a.default.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,r=""+n.container;n.codec&&n.codec.length>0&&(r+=";codecs="+n.codec);var i=!1;if(a.default.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[n.type]=n,r!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])a.default.v(this.TAG,"Notice: "+n.type+" mimeType changed, origin: "+this._mimeTypes[n.type]+", target: "+r);else{i=!0;try{var o=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(r);o.addEventListener("error",this.e.onSourceBufferError),o.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return a.default.e(this.TAG,e.message),void this._emitter.emit(u.default.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=r}t||this._pendingSegments[n.type].push(n),i||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),s.default.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){a.default.e(this.TAG,e.message)}this._idrList.clear();var r=this._pendingSegments[t];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var i=0;i<n.buffered.length;i++){var o=n.buffered.start(i),u=n.buffered.end(i);this._pendingRemoveRanges[t].push({start:o,end:u})}if(n.updating||this._doRemoveRanges(),s.default.safari){var l=this._lastInitSegments[t];l&&(this._pendingSegments[t].push(l),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){var r=n.buffered;if(r.length>=1&&e-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var r=n.buffered,i=!1,o=0;o<r.length;o++){var a=r.start(o),s=r.end(o);if(a<=e&&e<s+3){if(e-a>=this._config.autoCleanupMaxBackwardDuration){i=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:a,end:u})}}else s<e&&(i=!0,this._pendingRemoveRanges[t].push({start:a,end:s}))}i&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(a.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+n),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var r=n.shift();t.remove(r.start,r.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var r=this._sourceBuffers[t].timestampOffset,i=n.timestampOffset/1e3;Math.abs(r-i)>.1&&(a.default.v(this.TAG,"Update MPEG audio timestampOffset from "+r+" to "+i),this._sourceBuffers[t].timestampOffset=i),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(u.default.BUFFER_FULL),this._isBufferFull=!0):(a.default.e(this.TAG,e.message),this._emitter.emit(u.default.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(a.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(u.default.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){a.default.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){a.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(u.default.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){a.default.e(this.TAG,"SourceBuffer Error: "+e)}}]),e}();n.default=d},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./media-segment-info.js":8,"./mse-events.js":10,events:2}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"}},{}],11:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(e("events")),a=r(e("../utils/logger.js")),s=r(e("../utils/logging-control.js")),u=r(e("./transmuxing-controller.js")),l=r(e("./transmuxing-events.js")),c=r(e("./transmuxing-worker.js")),d=r(e("./media-info.js")),f=function(){function t(n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.TAG="Transmuxer",this._emitter=new o.default,r.enableWorker&&"undefined"!=typeof Worker)try{var i=e("webworkify");this._worker=i(c.default),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[n,r]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},s.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:s.default.getConfig()})}catch(e){a.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new u.default(n,r)}else this._controller=new u.default(n,r);if(this._controller){var d=this._controller;d.on(l.default.IO_ERROR,this._onIOError.bind(this)),d.on(l.default.DEMUX_ERROR,this._onDemuxError.bind(this)),d.on(l.default.INIT_SEGMENT,this._onInitSegment.bind(this)),d.on(l.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),d.on(l.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),d.on(l.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),d.on(l.default.MEDIA_INFO,this._onMediaInfo.bind(this)),d.on(l.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),d.on(l.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),d.on(l.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),d.on(l.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return i(t,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),s.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.INIT_SEGMENT,e,t)})).catch((function(){}))}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.MEDIA_SEGMENT,e,t)})).catch((function(){}))}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(l.default.LOADING_COMPLETE)})).catch((function(){}))}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(l.default.RECOVERED_EARLY_EOF)})).catch((function(){}))}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.MEDIA_INFO,e)})).catch((function(){}))}},{key:"_onMetaDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.METADATA_ARRIVED,e)})).catch((function(){}))}},{key:"_onScriptDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.SCRIPTDATA_ARRIVED,e)})).catch((function(){}))}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.STATISTICS_INFO,e)})).catch((function(){}))}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.IO_ERROR,e,t)})).catch((function(){}))}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(l.default.DEMUX_ERROR,e,t)})).catch((function(){}))}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(l.default.RECOMMEND_SEEKPOINT,e)})).catch((function(){}))}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case l.default.INIT_SEGMENT:case l.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case l.default.LOADING_COMPLETE:case l.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case l.default.MEDIA_INFO:Object.setPrototypeOf(n,d.default.prototype),this._emitter.emit(t.msg,n);break;case l.default.METADATA_ARRIVED:case l.default.SCRIPTDATA_ARRIVED:case l.default.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case l.default.IO_ERROR:case l.default.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case l.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":a.default.emitter.emit("log",n.type,n.logcat)}}}]),t}();n.default=f},{"../utils/logger.js":41,"../utils/logging-control.js":42,"./media-info.js":7,"./transmuxing-controller.js":12,"./transmuxing-events.js":13,"./transmuxing-worker.js":14,events:2,webworkify:4}],12:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(e("events")),a=r(e("../utils/logger.js")),s=r(e("../utils/browser.js")),u=r(e("./media-info.js")),l=r(e("../demux/flv-demuxer.js")),c=r(e("../remux/mp4-remuxer.js")),d=r(e("../demux/demux-errors.js")),f=r(e("../io/io-controller.js")),h=r(e("./transmuxing-events.js")),p=(e("../io/loader.js"),function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.TAG="TransmuxingController",this._emitter=new o.default,this._config=n,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var r=0;this._mediaDataSource.segments.forEach((function(e){e.timestampBase=r,r+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,n.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy)})),isNaN(r)||this._mediaDataSource.duration===r||(this._mediaDataSource.duration=r),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return i(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],r=this._ioctl=new f.default(n,this._config,e);r.onError=this._onIOException.bind(this),r.onSeeked=this._onIOSeeked.bind(this),r.onComplete=this._onIOComplete.bind(this),r.onRedirect=this._onIORedirect.bind(this),r.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):r.onDataArrival=this._onInitChunkArrival.bind(this),r.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var n=this._mediaInfo.segments[t];if(null==n)this._pendingSeekTime=e;else{var r=n.getNearestKeyframe(e);this._remuxer.seek(r.milliseconds),this._ioctl.seek(r.fileposition),this._pendingResolveSeekPoint=r.milliseconds}}else{var i=this._mediaInfo.segments[t];if(null==i)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var o=i.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,o.fileposition),this._pendingResolveSeekPoint=o.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,n=t.length-1,r=0;r<t.length;r++)if(e<t[r].timestampBase){n=r-1;break}return n}},{key:"_onInitChunkArrival",value:function(e,t){var n=this,r=null,i=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,i=this._demuxer.parseChunks(e,t);else if((r=l.default.probe(e)).match){this._demuxer=new l.default(r,this._config),this._remuxer||(this._remuxer=new c.default(this._config));var o=this._mediaDataSource;null==o.duration||isNaN(o.duration)||(this._demuxer.overridedDuration=o.duration),"boolean"==typeof o.hasAudio&&(this._demuxer.overridedHasAudio=o.hasAudio),"boolean"==typeof o.hasVideo&&(this._demuxer.overridedHasVideo=o.hasVideo),this._demuxer.timestampBase=o.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),i=this._demuxer.parseChunks(e,t)}else r=null,a.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(h.default.DEMUX_ERROR,d.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),i=0;return i}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,u.default.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,u.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(h.default.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(h.default.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer&&this._remuxer.flushStashedSamples(),this._emitter.emit(h.default.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(h.default.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){a.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(h.default.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){a.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(h.default.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(h.default.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(h.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var n=t.info.syncPoints,r=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,s.default.safari&&n.length>0&&n[0].originalDts===r&&(r=n[0].pts),this._emitter.emit(h.default.RECOMMEND_SEEKPOINT,r)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(h.default.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(h.default.STATISTICS_INFO,e)}}]),e}());n.default=p},{"../demux/demux-errors.js":16,"../demux/flv-demuxer.js":18,"../io/io-controller.js":23,"../io/loader.js":24,"../remux/mp4-remuxer.js":38,"../utils/browser.js":39,"../utils/logger.js":41,"./media-info.js":7,"./transmuxing-events.js":13,events:2}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},{}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=(r(e("../utils/logger.js")),e("../utils/logging-control.js")),o=r(i),a=r(e("../utils/polyfill.js")),s=r(e("./transmuxing-controller.js")),u=r(e("./transmuxing-events.js"));n.default=function(e){function t(t,n){var r={msg:u.default.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function n(t,n){var r={msg:u.default.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function r(){var t={msg:u.default.LOADING_COMPLETE};e.postMessage(t)}function i(){var t={msg:u.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function l(t){var n={msg:u.default.MEDIA_INFO,data:t};e.postMessage(n)}function c(t){var n={msg:u.default.METADATA_ARRIVED,data:t};e.postMessage(n)}function d(t){var n={msg:u.default.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function f(t){var n={msg:u.default.STATISTICS_INFO,data:t};e.postMessage(n)}function h(t,n){e.postMessage({msg:u.default.IO_ERROR,data:{type:t,info:n}})}function p(t,n){e.postMessage({msg:u.default.DEMUX_ERROR,data:{type:t,info:n}})}function v(t){e.postMessage({msg:u.default.RECOMMEND_SEEKPOINT,data:t})}var m=null,g=function(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}.bind(this);a.default.install(),e.addEventListener("message",(function(a){switch(a.data.cmd){case"init":(m=new s.default(a.data.param[0],a.data.param[1])).on(u.default.IO_ERROR,h.bind(this)),m.on(u.default.DEMUX_ERROR,p.bind(this)),m.on(u.default.INIT_SEGMENT,t.bind(this)),m.on(u.default.MEDIA_SEGMENT,n.bind(this)),m.on(u.default.LOADING_COMPLETE,r.bind(this)),m.on(u.default.RECOVERED_EARLY_EOF,i.bind(this)),m.on(u.default.MEDIA_INFO,l.bind(this)),m.on(u.default.METADATA_ARRIVED,c.bind(this)),m.on(u.default.SCRIPTDATA_ARRIVED,d.bind(this)),m.on(u.default.STATISTICS_INFO,f.bind(this)),m.on(u.default.RECOMMEND_SEEKPOINT,v.bind(this));break;case"destroy":m&&(m.destroy(),m=null),e.postMessage({msg:"destroyed"});break;case"start":m.start();break;case"stop":m.stop();break;case"seek":m.seek(a.data.param);break;case"pause":m.pause();break;case"resume":m.resume();break;case"logging_config":var y=a.data.param;o.default.applyConfig(y),!0===y.enableCallback?o.default.addLogListener(g):o.default.removeLogListener(g)}}))}},{"../utils/logger.js":41,"../utils/logging-control.js":42,"../utils/polyfill.js":43,"./transmuxing-controller.js":12,"./transmuxing-events.js":13}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(e("../utils/logger.js")),a=r(e("../utils/utf8-conv.js")),s=e("../utils/exception.js"),u=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"parseScriptData",value:function(t,n,r){var i={};try{var o=e.parseValue(t,n,r),a=e.parseValue(t,n+o.size,r-o.size);i[o.data]=a.data}catch(e){}return i}},{key:"parseObject",value:function(t,n,r){if(r<3)throw new s.IllegalStateException("Data not enough when parse ScriptDataObject");var i=e.parseString(t,n,r),o=e.parseValue(t,n+i.size,r-i.size),a=o.objectEnd;return{data:{name:i.data,value:o.data},size:i.size+o.size,objectEnd:a}}},{key:"parseVariable",value:function(t,n,r){return e.parseObject(t,n,r)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new s.IllegalStateException("Data not enough when parse String");var r=new DataView(e,t,n).getUint16(0,!u);return{data:r>0?(0,a.default)(new Uint8Array(e,t+2,r)):"",size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new s.IllegalStateException("Data not enough when parse LongString");var r=new DataView(e,t,n).getUint32(0,!u);return{data:r>0?(0,a.default)(new Uint8Array(e,t+4,r)):"",size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new s.IllegalStateException("Data size invalid when parse Date");var r=new DataView(e,t,n),i=r.getFloat64(0,!u);return i+=60*r.getInt16(8,!u)*1e3,{data:new Date(i),size:10}}},{key:"parseValue",value:function(t,n,r){if(r<1)throw new s.IllegalStateException("Data not enough when parse Value");var i=new DataView(t,n,r),a=1,l=i.getUint8(0),c=void 0,d=!1;try{switch(l){case 0:c=i.getFloat64(1,!u),a+=8;break;case 1:c=!!i.getUint8(1),a+=1;break;case 2:var f=e.parseString(t,n+1,r-1);c=f.data,a+=f.size;break;case 3:c={};var h=0;for(9==(16777215&i.getUint32(r-4,!u))&&(h=3);a<r-4;){var p=e.parseObject(t,n+a,r-a-h);if(p.objectEnd)break;c[p.data.name]=p.data.value,a+=p.size}a<=r-3&&9==(16777215&i.getUint32(a-1,!u))&&(a+=3);break;case 8:c={},a+=4;var v=0;for(9==(16777215&i.getUint32(r-4,!u))&&(v=3);a<r-8;){var m=e.parseVariable(t,n+a,r-a-v);if(m.objectEnd)break;c[m.data.name]=m.data.value,a+=m.size}a<=r-3&&9==(16777215&i.getUint32(a-1,!u))&&(a+=3);break;case 9:c=void 0,a=1,d=!0;break;case 10:c=[];var g=i.getUint32(1,!u);a+=4;for(var y=0;y<g;y++){var _=e.parseValue(t,n+a,r-a);c.push(_.data),a+=_.size}break;case 11:var b=e.parseDate(t,n+1,r-1);c=b.data,a+=b.size;break;case 12:var S=e.parseString(t,n+1,r-1);c=S.data,a+=S.size;break;default:a=r,o.default.w("AMF","Unsupported AMF value type "+l)}}catch(e){o.default.e("AMF",e.toString())}return{data:c,size:a,objectEnd:d}}}]),e}();n.default=l},{"../utils/exception.js":40,"../utils/logger.js":41,"../utils/utf8-conv.js":44}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},{}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=e("../utils/exception.js"),o=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return r(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new i.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new i.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var o=Math.min(r,this._current_word_bits_left),a=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,n<<o|a}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e=void 0;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}();n.default=o},{"../utils/exception.js":40}],18:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(e("../utils/logger.js")),s=r(e("./amf-parser.js")),u=r(e("./sps-parser.js")),l=r(e("./demux-errors.js")),c=r(e("../core/media-info.js")),d=e("../utils/exception.js"),f=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new c.default,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return o(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new c.default}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(t,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new d.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,i=this._littleEndian;if(0===n){if(!(t.byteLength>13))return 0;r=e.probe(t).dataOffset}for(this._firstParse&&(this._firstParse=!1,n+r!==this._dataOffset&&a.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,r).getUint32(0,!i)&&a.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);r<t.byteLength;){this._dispatch=!0;var o=new DataView(t,r);if(r+11+4>t.byteLength)break;var s=o.getUint8(0),u=16777215&o.getUint32(0,!i);if(r+11+u+4>t.byteLength)break;if(8===s||9===s||18===s){var l=o.getUint8(4),c=o.getUint8(5),f=o.getUint8(6)|c<<8|l<<16|o.getUint8(7)<<24;0!=(16777215&o.getUint32(7,!i))&&a.default.w(this.TAG,"Meet tag which has StreamID != 0!");var h=r+11;switch(s){case 8:this._parseAudioData(t,h,u,f);break;case 9:this._parseVideoData(t,h,u,f,n+r);break;case 18:this._parseScriptData(t,h,u)}var p=o.getUint32(11+u,!i);p!==11+u&&a.default.w(this.TAG,"Invalid PrevTagSize "+p),r+=11+u+4}else a.default.w(this.TAG,"Unsupported tag type "+s+", skipped"),r+=11+u+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r}},{key:"_parseScriptData",value:function(e,t,n){var r=s.default.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!==i(r.onMetaData))return void a.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&a.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var o=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},o)),"boolean"==typeof o.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=o.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof o.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=o.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof o.audiodatarate&&(this._mediaInfo.audioDataRate=o.audiodatarate),"number"==typeof o.videodatarate&&(this._mediaInfo.videoDataRate=o.videodatarate),"number"==typeof o.width&&(this._mediaInfo.width=o.width),"number"==typeof o.height&&(this._mediaInfo.height=o.height),"number"==typeof o.duration){if(!this._durationOverrided){var u=Math.floor(o.duration*this._timescale);this._duration=u,this._mediaInfo.duration=u}}else this._mediaInfo.duration=0;if("number"==typeof o.framerate){var l=Math.floor(1e3*o.framerate);if(l>0){var c=l/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=c,this._referenceFrameRate.fps_num=l,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=c}}if("object"===i(o.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var d=o.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(d),o.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=o,a.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],r=1;r<e.times.length;r++){var i=this._timestampBase+Math.floor(1e3*e.times[r]);t.push(i),n.push(e.filepositions[r])}return{times:t,filepositions:n}}},{key:"_parseAudioData",value:function(e,t,n,r){if(n<=1)a.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){var i=(this._littleEndian,new DataView(e,t,n)).getUint8(0),o=i>>>4;if(2!==o&&10!==o)return void this._onError(l.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+o);var s,u=(12&i)>>>2;if(!(u>=0&&u<=4))return void this._onError(l.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+u);s=this._flvSoundRateTable[u];var c=1&i,d=this._audioMetadata,f=this._audioTrack;if(d||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(d=this._audioMetadata={}).type="audio",d.id=f.id,d.timescale=this._timescale,d.duration=this._duration,d.audioSampleRate=s,d.channelCount=0===c?1:2),10===o){var h=this._parseAACAudioData(e,t+1,n-1);if(null==h)return;if(0===h.packetType){if(d.config)return void a.default.w(this.TAG,"Found another AudioSpecificConfig!");var p=h.data;d.audioSampleRate=p.samplingRate,d.channelCount=p.channelCount,d.codec=p.codec,d.originalCodec=p.originalCodec,d.config=p.config,d.refSampleDuration=1024/d.audioSampleRate*d.timescale,a.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",d);var v=this._mediaInfo;v.audioCodec=d.originalCodec,v.audioSampleRate=d.audioSampleRate,v.audioChannelCount=d.channelCount,v.hasVideo?null!=v.videoCodec&&(v.mimeType='video/x-flv; codecs="'+v.videoCodec+","+v.audioCodec+'"'):v.mimeType='video/x-flv; codecs="'+v.audioCodec+'"',v.isComplete()&&this._onMediaInfo(v)}else if(1===h.packetType){var m=this._timestampBase+r,g={unit:h.data,length:h.data.byteLength,dts:m,pts:m};f.samples.push(g),f.length+=h.data.length}else a.default.e(this.TAG,"Flv: Unsupported AAC data type "+h.packetType)}else if(2===o){if(!d.codec){var y=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==y)return;d.audioSampleRate=y.samplingRate,d.channelCount=y.channelCount,d.codec=y.codec,d.originalCodec=y.originalCodec,d.refSampleDuration=1152/d.audioSampleRate*d.timescale,a.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",d);var _=this._mediaInfo;_.audioCodec=d.codec,_.audioSampleRate=d.audioSampleRate,_.audioChannelCount=d.channelCount,_.audioDataRate=y.bitRate,_.hasVideo?null!=_.videoCodec&&(_.mimeType='video/x-flv; codecs="'+_.videoCodec+","+_.audioCodec+'"'):_.mimeType='video/x-flv; codecs="'+_.audioCodec+'"',_.isComplete()&&this._onMediaInfo(_)}var b=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==b)return;var S=this._timestampBase+r,T={unit:b,length:b.byteLength,dts:S,pts:S};f.samples.push(T),f.length+=b.length}}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var r={},i=new Uint8Array(e,t,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):r.data=i.subarray(1),r}a.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var r,i,o=new Uint8Array(e,t,n),a=null,s=0,u=null;if(s=r=o[0]>>>3,(i=(7&o[0])<<1|o[1]>>>7)<0||i>=this._mpegSamplingRates.length)this._onError(l.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[i],d=(120&o[1])>>>3;if(!(d<0||d>=8)){5===s&&(u=(7&o[1])<<1|o[2]>>>7,o[2]);var f=self.navigator.userAgent.toLowerCase();return-1!==f.indexOf("firefox")?i>=6?(s=5,a=new Array(4),u=i-3):(s=2,a=new Array(2),u=i):-1!==f.indexOf("android")?(s=2,a=new Array(2),u=i):(s=5,u=i,a=new Array(4),i>=6?u=i-3:1===d&&(s=2,a=new Array(2),u=i)),a[0]=s<<3,a[0]|=(15&i)>>>1,a[1]=(15&i)<<7,a[1]|=(15&d)<<3,5===s&&(a[1]|=(15&u)>>>1,a[2]=(1&u)<<7,a[2]|=8,a[3]=0),{config:a,samplingRate:c,channelCount:d,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}this._onError(l.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,r){if(!(n<4)){var i=(this._littleEndian,new Uint8Array(e,t,n)),o=null;if(r){if(255!==i[0])return;var s=i[1]>>>3&3,u=(6&i[1])>>1,l=(240&i[2])>>>4,c=(12&i[2])>>>2,d=3!==(i[3]>>>6&3)?2:1,f=0,h=0;switch(s){case 0:f=this._mpegAudioV25SampleRateTable[c];break;case 2:f=this._mpegAudioV20SampleRateTable[c];break;case 3:f=this._mpegAudioV10SampleRateTable[c]}switch(u){case 1:l<this._mpegAudioL3BitRateTable.length&&(h=this._mpegAudioL3BitRateTable[l]);break;case 2:l<this._mpegAudioL2BitRateTable.length&&(h=this._mpegAudioL2BitRateTable[l]);break;case 3:l<this._mpegAudioL1BitRateTable.length&&(h=this._mpegAudioL1BitRateTable[l])}o={bitRate:h,samplingRate:f,channelCount:d,codec:"mp3",originalCodec:"mp3"}}else o=i;return o}a.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")}},{key:"_parseVideoData",value:function(e,t,n,r,i){if(n<=1)a.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var o=new Uint8Array(e,t,n)[0],s=(240&o)>>>4,u=15&o;if(7!==u)return void this._onError(l.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+u);this._parseAVCVideoPacket(e,t+1,n-1,r,i,s)}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,r,i,o){if(n<4)a.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var s=this._littleEndian,u=new DataView(e,t,n),c=u.getUint8(0),d=(16777215&u.getUint32(0,!s))<<8>>8;if(0===c)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===c)this._parseAVCVideoData(e,t+4,n-4,r,i,o,d);else if(2!==c)return void this._onError(l.default.FORMAT_ERROR,"Flv: Invalid video packet type "+c)}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)a.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,i=this._videoTrack,o=this._littleEndian,s=new DataView(e,t,n);if(r){if(void 0!==r.avcc)return void a.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!")}else!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration;var c=s.getUint8(0),d=s.getUint8(1);if(s.getUint8(2),s.getUint8(3),1===c&&0!==d)if(this._naluLengthSize=1+(3&s.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var f=31&s.getUint8(5);if(0!==f){f>1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+f);for(var h=6,p=0;p<f;p++){var v=s.getUint16(h,!o);if(h+=2,0!==v){var m=new Uint8Array(e,t+h,v);h+=v;var g=u.default.parseSPS(m);if(0===p){r.codecWidth=g.codec_size.width,r.codecHeight=g.codec_size.height,r.presentWidth=g.present_size.width,r.presentHeight=g.present_size.height,r.profile=g.profile_string,r.level=g.level_string,r.bitDepth=g.bit_depth,r.chromaFormat=g.chroma_format,r.sarRatio=g.sar_ratio,r.frameRate=g.frame_rate,!1!==g.frame_rate.fixed&&0!==g.frame_rate.fps_num&&0!==g.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var y=r.frameRate.fps_den,_=r.frameRate.fps_num;r.refSampleDuration=r.timescale*(y/_);for(var b=m.subarray(1,4),S="avc1.",T=0;T<3;T++){var w=b[T].toString(16);w.length<2&&(w="0"+w),S+=w}r.codec=S;var k=this._mediaInfo;k.width=r.codecWidth,k.height=r.codecHeight,k.fps=r.frameRate.fps,k.profile=r.profile,k.level=r.level,k.refFrames=g.ref_frames,k.chromaFormat=g.chroma_format_string,k.sarNum=r.sarRatio.width,k.sarDen=r.sarRatio.height,k.videoCodec=S,k.hasAudio?null!=k.audioCodec&&(k.mimeType='video/x-flv; codecs="'+k.videoCodec+","+k.audioCodec+'"'):k.mimeType='video/x-flv; codecs="'+k.videoCodec+'"',k.isComplete()&&this._onMediaInfo(k)}}}var E=s.getUint8(h);if(0!==E){E>1&&a.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+E),h++;for(var C=0;C<E;C++){var A=s.getUint16(h,!o);h+=2,0!==A&&(h+=A)}r.avcc=new Uint8Array(n),r.avcc.set(new Uint8Array(e,t,n),0),a.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",r)}else this._onError(l.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(l.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(l.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(l.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}}},{key:"_parseAVCVideoData",value:function(e,t,n,r,i,o,s){for(var u=this._littleEndian,l=new DataView(e,t,n),c=[],d=0,f=0,h=this._naluLengthSize,p=this._timestampBase+r,v=1===o;f<n;){if(f+4>=n){a.default.w(this.TAG,"Malformed Nalu near timestamp "+p+", offset = "+f+", dataSize = "+n);break}var m=l.getUint32(f,!u);if(3===h&&(m>>>=8),m>n-h)return void a.default.w(this.TAG,"Malformed Nalus near timestamp "+p+", NaluSize > DataSize!");var g=31&l.getUint8(f+h);5===g&&(v=!0);var y=new Uint8Array(e,t+f,h+m),_={type:g,data:y};c.push(_),d+=y.byteLength,f+=h+m}if(c.length){var b=this._videoTrack,S={units:c,length:d,isKeyframe:v,dts:p,cts:s,pts:p+s};v&&(S.fileposition=i),b.samples.push(S),b.length+=d}}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var r=(4&t[4])>>>2!=0,i=0!=(1&t[4]),o=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}(t,5);return o<9?n:{match:!0,consumed:o,dataOffset:o,hasAudioTrack:r,hasVideoTrack:i}}}]),e}();n.default=f},{"../core/media-info.js":7,"../utils/exception.js":40,"../utils/logger.js":41,"./amf-parser.js":15,"./demux-errors.js":16,"./sps-parser.js":19}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(e("./exp-golomb.js")),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,r=new Uint8Array(n),i=0,o=0;o<n;o++)o>=2&&3===t[o]&&0===t[o-1]&&0===t[o-2]||(r[i]=t[o],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),r=new i.default(n);r.readByte();var o=r.readByte();r.readByte();var a=r.readByte();r.readUEG();var s=e.getProfileString(o),u=e.getLevelString(a),l=1,c=420,d=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(c=[0,420,422,444][l]),d=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var f=3!==l?8:12,h=0;h<f;h++)r.readBool()&&(h<6?e._skipScalingList(r,16):e._skipScalingList(r,64));r.readUEG();var p=r.readUEG();if(0===p)r.readUEG();else if(1===p){r.readBits(1),r.readSEG(),r.readSEG();for(var v=r.readUEG(),m=0;m<v;m++)r.readSEG()}var g=r.readUEG();r.readBits(1);var y=r.readUEG(),_=r.readUEG(),b=r.readBits(1);0===b&&r.readBits(1),r.readBits(1);var S=0,T=0,w=0,k=0;r.readBool()&&(S=r.readUEG(),T=r.readUEG(),w=r.readUEG(),k=r.readUEG());var E=1,C=1,A=0,j=!0,x=0,P=0;if(r.readBool()){if(r.readBool()){var L=r.readByte();L>0&&L<16?(E=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][L-1],C=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][L-1]):255===L&&(E=r.readByte()<<8|r.readByte(),C=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var O=r.readBits(32),R=r.readBits(32);j=r.readBool(),A=(x=R)/(P=2*O)}}var I=1;1===E&&1===C||(I=E/C);var M=0,D=0;0===l?(M=1,D=2-b):(M=3===l?1:2,D=(1===l?2:1)*(2-b));var U=16*(y+1),B=16*(_+1)*(2-b);U-=(S+T)*M,B-=(w+k)*D;var N=Math.ceil(U*I);return r.destroy(),r=null,{profile_string:s,level_string:u,bit_depth:d,ref_frames:g,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:j,fps:A,fps_den:P,fps_num:x},sar_ratio:{width:E,height:C},codec_size:{width:U,height:B},present_size:{width:N,height:B}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,r=8,i=0;i<t;i++)0!==r&&(r=(n+e.readSEG()+256)%256),n=0===r?n:r}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}();n.default=o},{"./exp-golomb.js":17}],20:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(e("./utils/polyfill.js")),a=r(e("./core/features.js")),s=e("./io/loader.js"),u=r(e("./player/flv-player.js")),l=r(e("./player/native-player.js")),c=r(e("./player/player-events.js")),d=e("./player/player-errors.js"),f=r(e("./utils/logging-control.js")),h=e("./utils/exception.js");o.default.install();var p={createPlayer:function(e,t){var n=e;if(null==n||"object"!==(void 0===n?"undefined":i(n)))throw new h.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new h.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new u.default(n,t);default:return new l.default(n,t)}},isSupported:function(){return a.default.supportMSEH264Playback()},getFeatureList:function(){return a.default.getFeatureList()}};p.BaseLoader=s.BaseLoader,p.LoaderStatus=s.LoaderStatus,p.LoaderErrors=s.LoaderErrors,p.Events=c.default,p.ErrorTypes=d.ErrorTypes,p.ErrorDetails=d.ErrorDetails,p.FlvPlayer=u.default,p.NativePlayer=l.default,p.LoggingControl=f.default,p.reconnect=!1,Object.defineProperty(p,"version",{enumerable:!0,get:function(){return"1.4.2"}}),n.default=p},{"./core/features.js":6,"./io/loader.js":24,"./player/flv-player.js":32,"./player/native-player.js":33,"./player/player-errors.js":34,"./player/player-events.js":35,"./utils/exception.js":40,"./utils/logging-control.js":42,"./utils/polyfill.js":43}],21:[function(e,t,n){"use strict";t.exports=e("./flv.js").default},{"./flv.js":20}],22:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=(r(e("../utils/logger.js")),e("../utils/browser.js")),u=r(s),l=e("./loader.js"),c=e("../utils/exception.js"),d=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"fetch-stream-loader"));return r.TAG="FetchStreamLoader",r._seekHandler=e,r._config=n,r._needStash=!0,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,null,[{key:"isSupported",value:function(){try{var e=u.default.msedge&&u.default.version.minor>=15048,t=!u.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),a(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var o=this._seekHandler.getConfig(r,t),a=new self.Headers;if("object"===i(o.headers)){var s=o.headers;for(var u in s)s.hasOwnProperty(u)&&a.append(u,s[u])}var d={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===i(this._config.headers))for(var f in this._config.headers)a.append(f,this._config.headers[f]);!1===e.cors&&(d.mode="same-origin"),e.withCredentials&&(d.credentials="include"),e.referrerPolicy&&(d.referrerPolicy=e.referrerPolicy),this._status=l.LoaderStatus.kConnecting,self.fetch(o.url,d).then((function(e){if(n._requestAbort){try{var t=e.body.getReader();t&&t.cancel()}catch(e){}return n._requestAbort=!1,void(n._status=l.LoaderStatus.kIdle)}if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==o.url&&n._onURLRedirect){var r=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(r)}var i=e.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=l.LoaderStatus.kError,!n._onError)throw new c.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(l.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(n._status=l.LoaderStatus.kError,!n._onError)throw e;n._onError(l.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then((function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=l.LoaderStatus.kError;var r=l.LoaderErrors.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new c.RuntimeException(i.msg);t._onError(r,i)}else t._status=l.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=l.LoaderStatus.kComplete,e.cancel();t._status=l.LoaderStatus.kBuffering;var o=n.value.buffer,a=t._range.from+t._receivedLength;t._receivedLength+=o.byteLength,t._onDataArrival&&t._onDataArrival(o,a,t._receivedLength),t._pump(e)}})).catch((function(e){if(11!==e.code||!u.default.msedge){t._status=l.LoaderStatus.kError;var n=0,r=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(n=l.LoaderErrors.EXCEPTION,r={code:e.code,msg:e.message}):(n=l.LoaderErrors.EARLY_EOF,r={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new c.RuntimeException(r.msg);t._onError(n,r)}}))}}]),t}(l.BaseLoader);n.default=d},{"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],23:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(e("../utils/logger.js")),a=r(e("./speed-sampler.js")),s=e("./loader.js"),u=r(e("./fetch-stream-loader.js")),l=r(e("./xhr-moz-chunked-loader.js")),c=(r(e("./xhr-msstream-loader.js")),e("./xhr-range-loader.js")),d=r(c),f=r(e("./websocket-loader.js")),h=r(e("./range-seek-handler.js")),p=r(e("./param-seek-handler.js")),v=e("../utils/exception.js"),m=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.TAG="IOController",this._config=n,this._extraData=r,this._stashInitialSize=393216,null!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new a.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return i(e,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new h.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new p.default(t,n)}else{if("custom"!==e.seekType)throw new v.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new v.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=f.default;else if(u.default.isSupported())this._loaderClass=u.default;else if(l.default.isSupported())this._loaderClass=l.default;else{if(!d.default.isSupported())throw new v.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=d.default}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new v.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(r,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,r=0,i=0,o=n;if(e<t[0])return t[0];for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:o=r-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,n){if(!this._onDataArrival)throw new v.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var r=this._speedSampler.lastSecondKBps;if(0!==r){var i=this._normalizeSpeed(r);this._speedNormalized!==i&&(this._speedNormalized=i,this._adjustStashSize(i))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var o=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var a=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(a,this._stashByteStart);if(s<a.byteLength){if(s>0){var u=new Uint8Array(a,s);o.set(u,0),this._stashUsed=u.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var l=this._dispatchChunks(e,t);if(l<e.byteLength){var c=e.byteLength-l;c>this._bufferSize&&(this._expandBuffer(c),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(e,l),0),this._stashUsed+=c,this._stashByteStart=t+l}}}else if(0===this._stashUsed){var d=this._dispatchChunks(e,t);if(d<e.byteLength){var f=e.byteLength-d;f>this._bufferSize&&this._expandBuffer(f),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,d),0),this._stashUsed+=f,this._stashByteStart=t+d}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var h=new Uint8Array(this._stashBuffer,0,this._bufferSize);h.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p<this._stashUsed&&p>0){var m=new Uint8Array(this._stashBuffer,p);h.set(m,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-n;if(n<t.byteLength){if(!e){if(n>0){var i=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(t,n);i.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=n}return 0}o.default.w(this.TAG,r+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,r}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(o.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=s.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case s.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(o.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}e=s.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case s.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case s.LoaderErrors.CONNECTING_TIMEOUT:case s.LoaderErrors.HTTP_STATUS_CODE_INVALID:case s.LoaderErrors.EXCEPTION:}if(!this._onError)throw new v.RuntimeException("IOException: "+t.msg);this._onError(e,t)}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===d.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}}]),e}();n.default=m},{"../utils/exception.js":40,"../utils/logger.js":41,"./fetch-stream-loader.js":22,"./loader.js":24,"./param-seek-handler.js":25,"./range-seek-handler.js":26,"./speed-sampler.js":27,"./websocket-loader.js":28,"./xhr-moz-chunked-loader.js":29,"./xhr-msstream-loader.js":30,"./xhr-range-loader.js":31}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseLoader=n.LoaderErrors=n.LoaderStatus=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=e("../utils/exception.js"),o=n.LoaderStatus={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4};n.LoaderErrors={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},n.BaseLoader=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._type=t||"undefined",this._status=o.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return r(e,[{key:"destroy",value:function(){this._status=o.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===o.kConnecting||this._status===o.kBuffering}},{key:"open",value:function(e,t){throw new i.NotImplementedException("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new i.NotImplementedException("Unimplemented abstract function!")}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}}]),e}()},{"../utils/exception.js":40}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._startName=t,this._endName=n}return r(e,[{key:"getConfig",value:function(e,t){var n=e;if(0!==t.from||-1!==t.to){var r=!0;-1===n.indexOf("?")&&(n+="?",r=!1),r&&(n+="&"),n+=this._startName+"="+t.from.toString(),-1!==t.to&&(n+="&"+this._endName+"="+t.to.toString())}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],n=void 0,r=e.indexOf("?");-1!==r&&(n=e.substring(r+1));var i="";if(null!=n&&n.length>0)for(var o=n.split("&"),a=0;a<o.length;a++){var s=o[a].split("="),u=a>0;s[0]!==this._startName&&s[0]!==this._endName&&(u&&(i+="&"),i+=o[a])}return 0===i.length?t:t+"?"+i}}]),e}();n.default=i},{}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._zeroStart=t||!1}return r(e,[{key:"getConfig",value:function(e,t){var n={};if(0!==t.from||-1!==t.to){var r;r=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",n.Range=r}else this._zeroStart&&(n.Range="bytes=0-");return{url:e,headers:n}}},{key:"removeURLParameters",value:function(e){return e}}]),e}();n.default=i},{}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return r(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}();n.default=i},{}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=(function(e){e&&e.__esModule}(e("../utils/logger.js")),e("./loader.js")),a=e("../utils/exception.js"),s=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"websocket-loader"));return e.TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),i(t,[{key:"destroy",value:function(){this._ws&&this.abort(),r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=o.LoaderStatus.kConnecting}catch(e){this._status=o.LoaderStatus.kError;var n={code:e.code,msg:e.message};if(!this._onError)throw new a.RuntimeException(n.msg);this._onError(o.LoaderErrors.EXCEPTION,n)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=o.LoaderStatus.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=o.LoaderStatus.kBuffering}},{key:"_onWebSocketClose",value:function(e){!0!==this._requestAbort?(this._status=o.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{this._status=o.LoaderStatus.kError;var r={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new a.RuntimeException(r.msg);this._onError(o.LoaderErrors.EXCEPTION,r)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,n=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=o.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new a.RuntimeException(t.msg);this._onError(o.LoaderErrors.EXCEPTION,t)}}]),t}(o.BaseLoader);n.default=s},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){return e&&e.__esModule?e:{default:e}}(e("../utils/logger.js")),s=e("./loader.js"),u=e("../utils/exception.js"),l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-moz-chunked-loader"));return r.TAG="MozChunkedLoader",r._seekHandler=e,r._config=n,r._needStash=!0,r._xhr=null,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return a.default.w("MozChunkedLoader",e.message),!1}}}]),o(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var i=this._seekHandler.getConfig(n,t);this._requestURL=i.url;var o=this._xhr=new XMLHttpRequest;if(o.open("GET",i.url,!0),o.responseType="moz-chunked-arraybuffer",o.onreadystatechange=this._onReadyStateChange.bind(this),o.onprogress=this._onProgress.bind(this),o.onloadend=this._onLoadEnd.bind(this),o.onerror=this._onXhrError.bind(this),e.withCredentials&&(o.withCredentials=!0),"object"===r(i.headers)){var a=i.headers;for(var u in a)a.hasOwnProperty(u)&&o.setRequestHeader(u,a[u])}if("object"===r(this._config.headers)){var l=this._config.headers;for(var c in l)l.hasOwnProperty(c)&&o.setRequestHeader(c,l[c])}this._status=s.LoaderStatus.kConnecting,o.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=s.LoaderStatus.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=s.LoaderStatus.kError,!this._onError)throw new u.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=s.LoaderStatus.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==s.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==s.LoaderStatus.kError&&(this._status=s.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=s.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&e.loaded<this._contentLength?(t=s.LoaderErrors.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=s.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new u.RuntimeException(n.msg);this._onError(t,n)}}]),t}(s.BaseLoader);n.default=l},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(e){return e&&e.__esModule?e:{default:e}}(e("../utils/logger.js")),s=e("./loader.js"),u=e("../utils/exception.js"),l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-msstream-loader"));return r.TAG="MSStreamLoader",r._seekHandler=e,r._config=n,r._needStash=!0,r._xhr=null,r._reader=null,r._totalRange=null,r._currentRange=null,r._currentRequestURL=null,r._currentRedirectedURL=null,r._contentLength=null,r._receivedLength=0,r._bufferLimit=16777216,r._lastTimeBufferSize=0,r._isReconnecting=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"isSupported",value:function(){try{if(void 0===self.MSStream||void 0===self.MSStreamReader)return!1;var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="ms-stream","ms-stream"===e.responseType}catch(e){return a.default.w("MSStreamLoader",e.message),!1}}}]),o(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._internalOpen(e,t,!1)}},{key:"_internalOpen",value:function(e,t,n){this._dataSource=e,n?this._currentRange=t:this._totalRange=t;var i=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL));var o=this._seekHandler.getConfig(i,t);this._currentRequestURL=o.url;var a=this._reader=new self.MSStreamReader;a.onprogress=this._msrOnProgress.bind(this),a.onload=this._msrOnLoad.bind(this),a.onerror=this._msrOnError.bind(this);var u=this._xhr=new XMLHttpRequest;if(u.open("GET",o.url,!0),u.responseType="ms-stream",u.onreadystatechange=this._xhrOnReadyStateChange.bind(this),u.onerror=this._xhrOnError.bind(this),e.withCredentials&&(u.withCredentials=!0),"object"===r(o.headers)){var l=o.headers;for(var c in l)l.hasOwnProperty(c)&&u.setRequestHeader(c,l[c])}if("object"===r(this._config.headers)){var d=this._config.headers;for(var f in d)d.hasOwnProperty(f)&&u.setRequestHeader(f,d[f])}this._isReconnecting?this._isReconnecting=!1:this._status=s.LoaderStatus.kConnecting,u.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=s.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(1===this._reader.readyState&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState)if(t.status>=200&&t.status<=299){if(this._status=s.LoaderStatus.kBuffering,null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}var r=t.getResponseHeader("Content-Length");if(null!=r&&null==this._contentLength){var i=parseInt(r);i>0&&(this._contentLength=i,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else{if(this._status=s.LoaderStatus.kError,!this._onError)throw new u.RuntimeException("MSStreamLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else if(3===t.readyState&&t.status>=200&&t.status<=299){this._status=s.LoaderStatus.kBuffering;var o=t.response;this._reader.readAsArrayBuffer(o)}}},{key:"_xhrOnError",value:function(e){this._status=s.LoaderStatus.kError;var t=s.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type};if(!this._onError)throw new u.RuntimeException(n.msg);this._onError(t,n)}},{key:"_msrOnProgress",value:function(e){var t=e.target.result;if(null!=t){var n=t.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=t.byteLength;var r=this._totalRange.from+this._receivedLength;this._receivedLength+=n.byteLength,this._onDataArrival&&this._onDataArrival(n,r,this._receivedLength),t.byteLength>=this._bufferLimit&&(a.default.v(this.TAG,"MSStream buffer exceeded max size near "+(r+n.byteLength)+", reconnecting..."),this._doReconnectIfNeeded())}else this._doReconnectIfNeeded()}},{key:"_doReconnectIfNeeded",value:function(){if(null==this._contentLength||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var e={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,e,!0)}}},{key:"_msrOnLoad",value:function(e){this._status=s.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(e){this._status=s.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength<this._contentLength?(t=s.LoaderErrors.EARLY_EOF,n={code:-1,msg:"MSStream meet Early-Eof"}):(t=s.LoaderErrors.EARLY_EOF,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new u.RuntimeException(n.msg);this._onError(t,n)}}]),t}(s.BaseLoader);n.default=l},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24}],31:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=r(e("../utils/logger.js")),u=r(e("./speed-sampler.js")),l=e("./loader.js"),c=e("../utils/exception.js"),d=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"xhr-range-loader"));return r.TAG="RangeLoader",r._seekHandler=e,r._config=n,r._needStash=!1,r._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],r._currentChunkSizeKB=384,r._currentSpeedNormalized=0,r._zeroSpeedChunkCount=0,r._xhr=null,r._speedSampler=new u.default,r._requestAbort=!1,r._waitForTotalLength=!1,r._totalLengthReceived=!1,r._currentRequestURL=null,r._currentRedirectedURL=null,r._currentRequestRange=null,r._totalLength=null,r._contentLength=null,r._receivedLength=0,r._lastTimeLoaded=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,null,[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return s.default.w("RangeLoader",e.message),!1}}}]),a(t,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=l.LoaderStatus.kConnecting;var n=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,n=t+e;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var o=this._xhr=new XMLHttpRequest;if(o.open("GET",r.url,!0),o.responseType="arraybuffer",o.onreadystatechange=this._onReadyStateChange.bind(this),o.onprogress=this._onProgress.bind(this),o.onload=this._onLoad.bind(this),o.onerror=this._onXhrError.bind(this),e.withCredentials&&(o.withCredentials=!0),"object"===i(r.headers)){var a=r.headers;for(var s in a)a.hasOwnProperty(s)&&o.setRequestHeader(s,a[s])}if("object"===i(this._config.headers)){var u=this._config.headers;for(var l in u)u.hasOwnProperty(l)&&o.setRequestHeader(l,u[l])}o.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=l.LoaderStatus.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=l.LoaderStatus.kBuffering}else{if(this._status=l.LoaderStatus.kError,!this._onError)throw new c.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(l.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==l.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(r)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,r=0,i=0,o=n;if(e<t[0])return t[0];for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:o=r-1}}},{key:"_onLoad",value:function(e){if(this._status!==l.LoaderStatus.kError){if(this._waitForTotalLength)return void(this._waitForTotalLength=!1);this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&++this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var r=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():o=!0,this._onDataArrival&&this._onDataArrival(r,i,this._receivedLength),o&&(this._status=l.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){this._status=l.LoaderStatus.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=l.LoaderErrors.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=l.LoaderErrors.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new c.RuntimeException(n.msg);this._onError(t,n)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}}]),t}(l.BaseLoader);n.default=d},{"../utils/exception.js":40,"../utils/logger.js":41,"./loader.js":24,"./speed-sampler.js":27}],32:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(e("events")),s=r(e("../utils/logger.js")),u=r(e("../utils/browser.js")),l=r(e("./player-events.js")),c=r(e("../core/transmuxer.js")),d=r(e("../core/transmuxing-events.js")),f=r(e("../core/mse-controller.js")),h=r(e("../core/mse-events.js")),p=e("./player-errors.js"),v=e("../config.js"),m=e("../utils/exception.js"),g=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new a.default,this._config=(0,v.createDefaultConfig)(),"object"===(void 0===n?"undefined":i(n))&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new m.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var r=u.default.chrome&&(u.default.version.major<50||50===u.default.version.major&&u.default.version.build<2661);this._alwaysSeekKeyframe=!!(r||u.default.msedge||u.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return o(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===l.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(l.default.MEDIA_INFO,n.mediaInfo)})):e===l.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(l.default.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new f.default(this._config),this._msectl.on(h.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(h.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(h.default.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(h.default.ERROR,(function(e){t._emitter.emit(l.default.ERROR,p.ErrorTypes.MEDIA_ERROR,p.ErrorDetails.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var e=this,t=!1,n=0;if(!this._mediaElement)throw new m.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new m.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened)return void(this._hasPendingLoad=!0);this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new c.default(this._mediaDataSource,this._config),this._transmuxer.on(d.default.INIT_SEGMENT,(function(t,n){e._msectl.appendInitSegment(n)})),this._transmuxer.on(d.default.MEDIA_SEGMENT,(function(r,i){if(e._msectl.appendMediaSegment(i),e._config.isLive&&"video"==i.type){flvjs.reconnect&&(e.dataRetryTimer&&(clearTimeout(e.dataRetryTimer),e.dataRetryTimer=0),e.dataRetryTimer=setTimeout((function(){e._mediaElement&&(e.unload(),e.load(),setTimeout((function(){e.play().catch((function(){}))}),1e3),console.log("reconnect"))}),1e3));var o=e._mediaElement.currentTime,a=e._mediaElement.paused,u=i.info.beginPts-1e3*o;if(u>=3e3&&!t&&!a){if(n&&n==o)return void(u>=5e3&&e._emitter.emit(l.default.ERROR,p.ErrorTypes.OTHER_ERROR,"got wrong timestamp ",i.info.beginPts));var c=i.info.beginPts/1e3-1;s.default.w(e.TAG,"Live seems stuck at "+o+", try seek to "+c),t=!0,e._requestSetTime=!0,e.currentTime=c,n=o}else i.info.beginPts-1e3*o>=2e3&&t&&(t=!1)}if(e._config.lazyLoad&&!e._config.isLive){o=e._mediaElement.currentTime;i.info.endDts>=1e3*(o+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(s.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(d.default.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(l.default.LOADING_COMPLETE)})),this._transmuxer.on(d.default.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(l.default.RECOVERED_EARLY_EOF)})),this._transmuxer.on(d.default.IO_ERROR,(function(t,n){e._emitter.emit(l.default.ERROR,p.ErrorTypes.NETWORK_ERROR,t,n)})),this._transmuxer.on(d.default.DEMUX_ERROR,(function(t,n){e._emitter.emit(l.default.ERROR,p.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:n})})),this._transmuxer.on(d.default.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(l.default.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(d.default.METADATA_ARRIVED,(function(t){e._emitter.emit(l.default.METADATA_ARRIVED,t)})),this._transmuxer.on(d.default.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(l.default.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(d.default.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(l.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(d.default.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(console.log("recommend seekpoint",t/1e3),e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()}}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,r=0;r<e.length;r++){var i=e.start(r),o=e.end(r);if(i<=t&&t<o){n=o;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(s.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){s.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,r=0;r<t.length;r++){var i=t.start(r),o=t.end(r);if(e>=i&&e<o){e>=o-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(s.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(e>=r&&e<i)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,r=0;if(e<1&&this._mediaElement.buffered.length>0){var i=this._mediaElement.buffered.start(0);(i<1&&e<i||u.default.safari)&&(n=!0,r=u.default.safari?.1:i)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=r;else if(t){if(this._alwaysSeekKeyframe){var o=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=o?o.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;if(n.length>0&&t.currentTime<n.end(0)){if(this._config.isLive&&n.end(0)-t.currentTime>3600)return s.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", try seek to "+n.end(0)+", cancle"),this._mediaElement.removeEventListener("progress",this.e.onvProgress),void this._emitter.emit(l.default.ERROR,p.ErrorTypes.MEDIA_ERROR,"got wrong timestamp ",n.end(0));s.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+n.end(0)),this._requestSetTime=!0,this._mediaElement.currentTime=n.end(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress)}}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&n.length>0){var r=n.start(0);if(r<1&&t<r||u.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=u.default.safari?.1:r)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var i=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=i&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}}]),e}();n.default=g},{"../config.js":5,"../core/mse-controller.js":9,"../core/mse-events.js":10,"../core/transmuxer.js":11,"../core/transmuxing-events.js":13,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./player-errors.js":34,"./player-events.js":35,events:2}],33:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(e("events")),s=r(e("./player-events.js")),u=e("../config.js"),l=e("../utils/exception.js"),c=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new a.default,this._config=(0,u.createDefaultConfig)(),"object"===(void 0===n?"undefined":i(n))&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new l.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new l.InvalidArgumentException("NativePlayer("+t.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return o(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===s.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(s.default.MEDIA_INFO,n.mediaInfo)})):e===s.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(s.default.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new l.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(s.default.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(s.default.STATISTICS_INFO,this.statisticsInfo)}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}}]),e}();n.default=c},{"../config.js":5,"../utils/exception.js":40,"./player-events.js":35,events:2}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorDetails=n.ErrorTypes=void 0;var r=e("../io/loader.js"),i=function(e){return e&&e.__esModule?e:{default:e}}(e("../demux/demux-errors.js"));n.ErrorTypes={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},n.ErrorDetails={NETWORK_EXCEPTION:r.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:r.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:r.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:r.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:i.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:i.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:i.default.CODEC_UNSUPPORTED}},{"../demux/demux-errors.js":16,"../io/loader.js":24}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"}},{}],36:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),e}();n.default=i},{}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"init",value:function(){for(var t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,o=0;o<i;o++)t+=r[o].byteLength;(n=new Uint8Array(t))[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var a=8,s=0;s<i;s++)n.set(r[s],a),a+=r[s].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),r=e.moov(t),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),r=e.trak(t),i=e.mvex(t);return e.box(e.types.moov,n,r,i)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration,i=t.presentWidth,o=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,o>>>8&255,255&o,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(t){var n;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types[".mp3"],i)}},{key:"mp4a",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,i,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return e.box(e.types.esds,i)}},{key:"avc1",value:function(t){var n=t.avcc,r=t.codecWidth,i=t.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,r>>>8&255,255&r,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,o,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,r)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var r=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),o=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=e.sdtp(t),s=e.trun(t,a.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,o,s,a)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],r=n.length,i=new Uint8Array(4+r),o=0;o<r;o++){var a=n[o].flags;i[o+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return e.box(e.types.sdtp,i)}},{key:"trun",value:function(t,n){var r=t.samples||[],i=r.length,o=12+16*i,a=new Uint8Array(o);n+=8+o,a.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s<i;s++){var u=r[s].duration,l=r[s].size,c=r[s].flags,d=r[s].cts;a.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return e.box(e.types.trun,a)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();i.init(),n.default=i},{}],38:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(e("../utils/logger.js")),a=r(e("./mp4-generator.js")),s=r(e("./aac-silent.js")),u=r(e("../utils/browser.js")),l=e("../core/media-segment-info.js"),c=e("../utils/exception.js"),d=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new l.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new l.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!u.default.chrome||!(u.default.version.major<50||50===u.default.version.major&&u.default.version.build<2661)),this._fillSilentAfterSeek=u.default.msedge||u.default.msie,this._mp3UseMpegAudio=!u.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return i(e,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new c.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,r="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=a.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=a.default.generateInitSegment(t)}if(!this._onInitSegment)throw new c.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:i,container:e+"/"+r,mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(r.samples.push(t),r.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(r,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n=e,r=n.samples,i=void 0,c=-1,d=-1,f=this._audioMeta.refSampleDuration,h="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,p=this._dtsBaseInited&&void 0===this._audioNextDts,v=!1;if(r&&0!==r.length&&(1!==r.length||t)){var m=0,g=null,y=0;h?(m=0,y=n.length):(m=8,y=8+n.length);var _=null;if(r.length>1&&(y-=(_=r.pop()).length),null!=this._audioStashedLastSample){var b=this._audioStashedLastSample;this._audioStashedLastSample=null,r.unshift(b),y+=b.length}null!=_&&(this._audioStashedLastSample=_);var S=r[0].dts-this._dtsBase;if(this._audioNextDts)i=S-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())i=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(v=!0);else{var T=this._audioSegmentInfoList.getLastSampleBefore(S);if(null!=T){var w=S-(T.originalDts+T.duration);w<=3&&(w=0),i=S-(T.dts+T.duration+w)}else i=0}if(v){var k=S-i,E=this._videoSegmentInfoList.getLastSegmentBefore(S);if(null!=E&&E.beginDts<k){var C=s.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(C){var A=E.beginDts,j=k-E.beginDts;o.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+A+", duration: "+j),r.unshift({unit:C,dts:A,pts:A}),y+=C.byteLength}}else v=!1}for(var x=[],P=0;P<r.length;P++){var L=r[P],O=L.unit,R=L.dts-this._dtsBase,I=R,M=!1,D=null,U=0;if(!(R<-.001)){if("mp3"!==this._audioMeta.codec){var B=R;if(this._audioNextDts&&(B=this._audioNextDts),(i=R-B)<=-3*f){o.default.w(this.TAG,"Dropping 1 audio frame (originalDts: "+R+" ms ,curRefDts: "+B+" ms) due to dtsCorrection: "+i+" ms overlap.");continue}if(i>=3*f&&this._fillAudioTimestampGap&&!u.default.safari){M=!0;var N=Math.floor(i/f);o.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: "+R+" ms, curRefDts: "+B+" ms, dtsCorrection: "+Math.round(i)+" ms, generate: "+N+" frames"),I=Math.floor(B),U=Math.floor(B+f)-I;var F=s.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==F&&(o.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),F=O),D=[];for(var V=0;V<N;V++){B+=f;var z=Math.floor(B),H=Math.floor(B+f)-z,G={dts:z,pts:z,cts:0,unit:F,size:F.byteLength,duration:H,originalDts:R,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};D.push(G),y+=G.size}this._audioNextDts=B+f}else I=Math.floor(B),U=Math.floor(B+f)-I,this._audioNextDts=B+f}else{if(I=R-i,P!==r.length-1)U=r[P+1].dts-this._dtsBase-i-I;else if(null!=_){U=_.dts-this._dtsBase-i-I}else U=x.length>=1?x[x.length-1].duration:Math.floor(f);this._audioNextDts=I+U}-1===c&&(c=I),x.push({dts:I,pts:I,cts:0,unit:L.unit,size:L.unit.byteLength,duration:U,originalDts:R,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),M&&x.push.apply(x,D)}}if(0===x.length)return n.samples=[],void(n.length=0);h?g=new Uint8Array(y):((g=new Uint8Array(y))[0]=y>>>24&255,g[1]=y>>>16&255,g[2]=y>>>8&255,g[3]=255&y,g.set(a.default.types.mdat,4));for(var q=0;q<x.length;q++){var W=x[q].unit;g.set(W,m),m+=W.byteLength}var $=x[x.length-1];d=$.dts+$.duration;var K=new l.MediaSegmentInfo;K.beginDts=c,K.endDts=d,K.beginPts=c,K.endPts=d,K.originalBeginDts=x[0].originalDts,K.originalEndDts=$.originalDts+$.duration,K.firstSample=new l.SampleInfo(x[0].dts,x[0].pts,x[0].duration,x[0].originalDts,!1),K.lastSample=new l.SampleInfo($.dts,$.pts,$.duration,$.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(K),n.samples=x,n.sequenceNumber++;var X;X=h?new Uint8Array:a.default.moof(n,c),n.samples=[],n.length=0;var Y={type:"audio",data:this._mergeBoxes(X,g).buffer,sampleCount:x.length,info:K};h&&p&&(Y.timestampOffset=c),this._onMediaSegment("audio",Y)}}}},{key:"_remuxVideo",value:function(e,t){if(null!=this._videoMeta){var n=e,r=n.samples,i=void 0,o=-1,s=-1,u=-1,c=-1;if(r&&0!==r.length&&(1!==r.length||t)){var d=8,f=null,h=8+e.length,p=null;if(r.length>1&&(h-=(p=r.pop()).length),null!=this._videoStashedLastSample){var v=this._videoStashedLastSample;this._videoStashedLastSample=null,r.unshift(v),h+=v.length}null!=p&&(this._videoStashedLastSample=p);var m=r[0].dts-this._dtsBase;if(this._videoNextDts)i=m-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())i=0;else{var g=this._videoSegmentInfoList.getLastSampleBefore(m);if(null!=g){var y=m-(g.originalDts+g.duration);y<=3&&(y=0),i=m-(g.dts+g.duration+y)}else i=0}for(var _=new l.MediaSegmentInfo,b=[],S=0;S<r.length;S++){var T=r[S],w=T.dts-this._dtsBase,k=T.isKeyframe,E=w-i,C=T.cts,A=E+C;-1===o&&(o=E,u=A);var j=0;if(S!==r.length-1)j=r[S+1].dts-this._dtsBase-i-E;else if(null!=p){j=p.dts-this._dtsBase-i-E}else j=b.length>=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(k){var x=new l.SampleInfo(E,A,j,T.dts,!0);x.fileposition=T.fileposition,_.appendSyncPoint(x)}b.push({dts:E,pts:A,cts:C,units:T.units,size:T.length,isKeyframe:k,duration:j,originalDts:w,flags:{isLeading:0,dependsOn:k?2:1,isDependedOn:k?1:0,hasRedundancy:0,isNonSync:k?0:1}})}(f=new Uint8Array(h))[0]=h>>>24&255,f[1]=h>>>16&255,f[2]=h>>>8&255,f[3]=255&h,f.set(a.default.types.mdat,4);for(var P=0;P<b.length;P++)for(var L=b[P].units;L.length;){var O=L.shift().data;f.set(O,d),d+=O.byteLength}var R=b[b.length-1];if(s=R.dts+R.duration,c=R.pts+R.duration,this._videoNextDts=s,_.beginDts=o,_.endDts=s,_.beginPts=u,_.endPts=c,_.originalBeginDts=b[0].originalDts,_.originalEndDts=R.originalDts+R.duration,_.firstSample=new l.SampleInfo(b[0].dts,b[0].pts,b[0].duration,b[0].originalDts,b[0].isKeyframe),_.lastSample=new l.SampleInfo(R.dts,R.pts,R.duration,R.originalDts,R.isKeyframe),this._isLive||this._videoSegmentInfoList.append(_),n.samples=b,n.sequenceNumber++,this._forceFirstIDR){var I=b[0].flags;I.dependsOn=2,I.isNonSync=0}var M=a.default.moof(n,o);n.samples=[],n.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(M,f).buffer,sampleCount:b.length,info:_})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}}]),e}();n.default=d},{"../core/media-segment-info.js":8,"../utils/browser.js":39,"../utils/exception.js":40,"../utils/logger.js":41,"./aac-silent.js":36,"./mp4-generator.js":37}],39:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],i={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},o={};if(i.browser){o[i.browser]=!0;var a=i.majorVersion.split(".");o.version={major:parseInt(i.majorVersion,10),string:i.version},a.length>1&&(o.version.minor=parseInt(a[1],10)),a.length>2&&(o.version.build=parseInt(a[2],10))}for(var s in i.platform&&(o[i.platform]=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),(o.rv||o.iemobile)&&(o.rv&&delete o.rv,i.browser="msie",o.msie=!0),o.edge&&(delete o.edge,i.browser="msedge",o.msedge=!0),o.opr&&(i.browser="opera",o.opera=!0),o.safari&&o.android&&(i.browser="android",o.android=!0),o.name=i.browser,o.platform=i.platform,r)r.hasOwnProperty(s)&&delete r[s];Object.assign(r,o)}(),n.default=r},{}],40:[function(e,t,n){"use strict";function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n.RuntimeException=function(){function e(t){o(this,e),this._message=t}return a(e,[{key:"toString",value:function(){return this.name+": "+this.message}},{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),e}();n.IllegalStateException=function(e){function t(e){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return i(t,e),a(t,[{key:"name",get:function(){return"IllegalStateException"}}]),t}(s),n.InvalidArgumentException=function(e){function t(e){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return i(t,e),a(t,[{key:"name",get:function(){return"InvalidArgumentException"}}]),t}(s),n.NotImplementedException=function(e){function t(e){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return i(t,e),a(t,[{key:"name",get:function(){return"NotImplementedException"}}]),t}(s)},{}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){return e&&e.__esModule?e:{default:e}}(e("events")),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"e",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",r),e.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",r),e.ENABLE_INFO&&(console.info?console.info(r):console.log(r))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",r),e.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",r),e.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="["+t+"] > "+n;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",r),e.ENABLE_VERBOSE&&console.log(r)}}]),e}();o.GLOBAL_TAG="flv.js",o.FORCE_GLOBAL_TAG=!1,o.ENABLE_ERROR=!0,o.ENABLE_INFO=!0,o.ENABLE_WARN=!0,o.ENABLE_DEBUG=!0,o.ENABLE_VERBOSE=!0,o.ENABLE_CALLBACK=!1,o.emitter=new i.default,n.default=o},{events:2}],42:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(e("events")),a=r(e("./logger.js")),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"getConfig",value:function(){return{globalTag:a.default.GLOBAL_TAG,forceGlobalTag:a.default.FORCE_GLOBAL_TAG,enableVerbose:a.default.ENABLE_VERBOSE,enableDebug:a.default.ENABLE_DEBUG,enableInfo:a.default.ENABLE_INFO,enableWarn:a.default.ENABLE_WARN,enableError:a.default.ENABLE_ERROR,enableCallback:a.default.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){a.default.GLOBAL_TAG=e.globalTag,a.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,a.default.ENABLE_VERBOSE=e.enableVerbose,a.default.ENABLE_DEBUG=e.enableDebug,a.default.ENABLE_INFO=e.enableInfo,a.default.ENABLE_WARN=e.enableWarn,a.default.ENABLE_ERROR=e.enableError,a.default.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){a.default.emitter.addListener("log",t),a.default.emitter.listenerCount("log")>0&&(a.default.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){a.default.emitter.removeListener("log",t),0===a.default.emitter.listenerCount("log")&&(a.default.ENABLE_CALLBACK=!1,e._notifyChange())}},{key:"forceGlobalTag",get:function(){return a.default.FORCE_GLOBAL_TAG},set:function(t){a.default.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return a.default.GLOBAL_TAG},set:function(t){a.default.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return a.default.ENABLE_VERBOSE&&a.default.ENABLE_DEBUG&&a.default.ENABLE_INFO&&a.default.ENABLE_WARN&&a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_VERBOSE=t,a.default.ENABLE_DEBUG=t,a.default.ENABLE_INFO=t,a.default.ENABLE_WARN=t,a.default.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return a.default.ENABLE_DEBUG},set:function(t){a.default.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return a.default.ENABLE_VERBOSE},set:function(t){a.default.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return a.default.ENABLE_INFO},set:function(t){a.default.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return a.default.ENABLE_WARN},set:function(t){a.default.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return a.default.ENABLE_ERROR},set:function(t){a.default.ENABLE_ERROR=t,e._notifyChange()}}]),e}();s.emitter=new o.default,n.default=s},{"./logger.js":41,events:2}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},"function"!=typeof self.Promise&&e("es6-promise").polyfill()}}]),t}();i.install(),n.default=i},{"es6-promise":1}],44:[function(e,t,n){"use strict";function r(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){for(var t=[],n=e,i=0,o=e.length;i<o;)if(n[i]<128)t.push(String.fromCharCode(n[i])),++i;else{if(n[i]<192);else if(n[i]<224){if(r(n,i,1)){var a=(31&n[i])<<6|63&n[i+1];if(a>=128){t.push(String.fromCharCode(65535&a)),i+=2;continue}}}else if(n[i]<240){if(r(n,i,2)){var s=(15&n[i])<<12|(63&n[i+1])<<6|63&n[i+2];if(s>=2048&&55296!=(63488&s)){t.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(n[i]<248&&r(n,i,3)){var u=(7&n[i])<<18|(63&n[i+1])<<12|(63&n[i+2])<<6|63&n[i+3];if(u>65536&&u<1114112){u-=65536,t.push(String.fromCharCode(u>>>10|55296)),t.push(String.fromCharCode(1023&u|56320)),i+=4;continue}}t.push(String.fromCharCode(65533)),++i}return t.join("")}},{}]},{},[21])(21)})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):e.videojsFlash=t(e.videojs)}(this,(function(e){"use strict";function t(e){h[e]=function(){return this.el_.vjs_getProperty(e)}}e=e&&e.hasOwnProperty("default")?e.default:e;for(var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r="undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:{},i=e.getComponent("Tech"),o=e.dom,a=e.url,s=e.createTimeRange,u=e.mergeOptions,l=r&&r.navigator||{},c=function(e){function t(n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,i));return n.source&&o.ready((function(){this.setSource(n.source)}),!0),n.startTime&&o.ready((function(){this.load(),this.play(),this.currentTime(n.startTime)}),!0),r.videojs=r.videojs||{},r.videojs.Flash=r.videojs.Flash||{},r.videojs.Flash.onReady=t.onReady,r.videojs.Flash.onEvent=t.onEvent,r.videojs.Flash.onError=t.onError,o.on("seeked",(function(){this.lastSeekTarget_=void 0})),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.createEl=function(){var e=this.options_;e.swf||(e.swf="https://vjs.zencdn.net/swf/5.4.2/video-js.swf");var n=e.techId,r=u({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:e.autoplay,stretch:e.stretch||!1,fluent:e.fluent||!1,preload:e.preload,loop:e.loop,muted:e.muted},e.flashVars),i=u({wmode:"opaque",bgcolor:"#000000"},e.params),o=u({id:n,name:n,class:"vjs-tech"},e.attributes);return this.el_=t.embed(e.swf,r,i,o),this.el_.tech=this,this.el_},t.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},t.prototype.pause=function(){this.el_.vjs_pause()},t.prototype.src=function(e){return void 0===e?this.currentSrc():this.setSrc(e)},t.prototype.setSrc=function(e){var t=this;e=a.getAbsoluteURL(e),this.el_.vjs_src(e),this.autoplay()&&this.setTimeout((function(){return t.play()}),0)},t.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},t.prototype.setCurrentTime=function(t){var n=this.seekable();n.length&&(t=(t=t>n.start(0)?t:n.start(0))<n.end(n.length-1)?t:n.end(n.length-1),this.lastSeekTarget_=t,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",t),e.prototype.setCurrentTime.call(this))},t.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},t.prototype.duration=function(){if(0===this.readyState())return NaN;var e=this.el_.vjs_getProperty("duration");return e>=0?e:1/0},t.prototype.load=function(){this.el_.vjs_load()},t.prototype.poster=function(){this.el_.vjs_getProperty("poster")},t.prototype.setPoster=function(){},t.prototype.seekable=function(){var e=this.duration();return 0===e?s():s(0,e)},t.prototype.buffered=function(){var e=this.el_.vjs_getProperty("buffered");return 0===e.length?s():s(e[0][0],e[0][1])},t.prototype.supportsFullScreen=function(){return!1},t.prototype.enterFullScreen=function(){return!1},t.prototype.getVideoPlaybackQuality=function(){var e=this.el_.vjs_getProperty("getVideoPlaybackQuality");return r.performance&&"function"==typeof r.performance.now?e.creationTime=r.performance.now():r.performance&&r.performance.timing&&"number"==typeof r.performance.timing.navigationStart&&(e.creationTime=r.Date.now()-r.performance.timing.navigationStart),e},t}(i),d=["rtmpConnection","rtmpStream","preload","defaultPlaybackRate","playbackRate","autoplay","stretch","fluent","loop","controls","volume","muted","defaultMuted"],f=["networkState","readyState","initialTime","startOffsetTime","paused","ended","videoWidth","videoHeight"],h=c.prototype,p=0;p<d.length;p++)t(d[p]),function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["set"+t]=function(t){return this.el_.vjs_setProperty(e,t)}}(d[p]);for(var v=0;v<f.length;v++)t(f[v]);return c.isSupported=function(){return!!(e.browser.IS_CHROME&&!e.browser.IS_ANDROID||e.browser.IS_SAFARI&&!e.browser.IS_IOS)||c.version()[0]>=10},i.withSourceHandlers(c),c.nativeSourceHandler={},c.nativeSourceHandler.canPlayType=function(e){return e in c.formats?"maybe":""},c.nativeSourceHandler.canHandleSource=function(e,t){var n;return n=e.type?e.type.replace(/;.*/,"").toLowerCase():function(e){var t=a.getFileExtension(e);return t?"video/"+t:""}(e.src),c.nativeSourceHandler.canPlayType(n)},c.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},c.nativeSourceHandler.dispose=function(){},c.registerSourceHandler(c.nativeSourceHandler),c.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},c.onReady=function(e){var t=o.$("#"+e),n=t&&t.tech;n&&n.el()&&c.checkReady(n)},c.checkReady=function(e){e.el()&&(e.el().vjs_getProperty?e.triggerReady():this.setTimeout((function(){c.checkReady(e)}),50))},c.onEvent=function(e,t){var n=o.$("#"+e).tech,r=Array.prototype.slice.call(arguments,2);n.setTimeout((function(){n.trigger(t,r)}),1)},c.onError=function(e,t){var n=o.$("#"+e).tech;if("srcnotfound"===t)return n.error(4);"string"==typeof t?n.error("FLASH: "+t):(t.origin="flash",n.error(t))},c.version=function(){var e="0,0,0";try{e=new r.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{l.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(e=(l.plugins["Shockwave Flash 2.0"]||l.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(e){}}return e.split(",")},c.embed=function(e,t,n,r){var i=c.getEmbedCode(e,t,n,r);return o.createEl("div",{innerHTML:i}).childNodes[0]},c.getEmbedCode=function(e,t,n,r){var i="",o="",a="";return t&&Object.getOwnPropertyNames(t).forEach((function(e){i+=e+"="+t[e]+"&"})),n=u({movie:e,flashvars:i,allowScriptAccess:"always",allowNetworking:"all"},n),Object.getOwnPropertyNames(n).forEach((function(e){o+='<param name="'+e+'" value="'+n[e]+'" />'})),r=u({data:e,width:"100%",height:"100%"},r),Object.getOwnPropertyNames(r).forEach((function(e){a+=e+'="'+r[e]+'" '})),'<object type="application/x-shockwave-flash" '+a+">"+o+"</object>"},function(e){e.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},e.streamFromParts=function(e,t){return e+"&"+t},e.streamToParts=function(e){var t={connection:"",stream:""};if(!e)return t;var n=e.search(/&(?![\w-]+=)/),r=void 0;return-1!==n?r=n+1:0===(n=r=e.lastIndexOf("/")+1)&&(n=r=e.length),t.connection=e.substring(0,n),t.stream=e.substring(r,e.length),t},e.isStreamingType=function(t){return t in e.streamingFormats},e.RTMP_RE=/^rtmp[set]?:\/\//i,e.isStreamingSrc=function(t){return e.RTMP_RE.test(t)},e.rtmpSourceHandler={},e.rtmpSourceHandler.canPlayType=function(t){return e.isStreamingType(t)?"maybe":""},e.rtmpSourceHandler.canHandleSource=function(t,n){return e.rtmpSourceHandler.canPlayType(t.type)||(e.isStreamingSrc(t.src)?"maybe":"")},e.rtmpSourceHandler.handleSource=function(t,n,r){var i=e.streamToParts(t.src);n.setRtmpConnection(i.connection),n.setRtmpStream(i.stream)},e.registerSourceHandler(e.rtmpSourceHandler)}(c),i.getTech("Flash")?(e.log.warn("Not using videojs-flash as it appears to already be registered"),e.log.warn("videojs-flash should only be used with video.js@6 and above")):e.registerTech("Flash",c),c.VERSION="2.1.2",c})),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).videojsFlvjs=e()}}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(e){return e&&e.__esModule?e:{default:e}}("undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null),o=i.default.getTech("Html5"),a=i.default.mergeOptions||i.default.util.mergeOptions,s={mediaDataSource:{},config:{}},u=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=a(s,e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"setSrc",value:function(e){this.flvPlayer&&(this.flvPlayer.unload(),this.flvPlayer.detachMediaElement(),this.flvPlayer.destroy());var t=this.options_.mediaDataSource,n=this.options_.config;t.type=void 0===t.type?"flv":t.type,t.url=e,this.flvPlayer=window.flvjs.createPlayer(t,n),this.flvPlayer.attachMediaElement(this.el_),this.flvPlayer.load()}},{key:"dispose",value:function(){this.flvPlayer&&(this.flvPlayer.detachMediaElement(),this.flvPlayer.unload(),this.flvPlayer.destroy(),this.flvPlayer=null),r(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"dispose",this).call(this)}}]),n}(o);u.isSupported=function(){return window.flvjs&&window.flvjs.isSupported()},u.formats={"video/flv":"FLV","video/x-flv":"FLV"},u.canPlayType=function(e){return u.isSupported()&&e in u.formats?"maybe":""},u.canPlaySource=function(e,t){return u.canPlayType(e.type)},u.VERSION="0.2.0",i.default.registerTech("Flvjs",u),n.default=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)})),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).adapter=e()}}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";var r=(0,e("./adapter_factory.js").adapterFactory)({window:"undefined"==typeof window?void 0:window});t.exports=r},{"./adapter_factory.js":2}],2:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(n,"__esModule",{value:!0}),n.adapterFactory=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.window,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},r=i.log,c=i.detectBrowser(t),d={browserDetails:c,commonShim:l,extractVersion:i.extractVersion,disableLog:i.disableLog,disableWarnings:i.disableWarnings};switch(c.browser){case"chrome":if(!o||!o.shimPeerConnection||!n.shimChrome)return r("Chrome shim is not included in this adapter release."),d;if(null===c.version)return r("Chrome shim can not determine version, not shimming."),d;r("adapter.js shimming chrome."),d.browserShim=o,o.shimGetUserMedia(t),o.shimMediaStream(t),o.shimPeerConnection(t),o.shimOnTrack(t),o.shimAddTrackRemoveTrack(t),o.shimGetSendersWithDtmf(t),o.shimGetStats(t),o.shimSenderReceiverGetStats(t),o.fixNegotiationNeeded(t),l.shimRTCIceCandidate(t),l.shimConnectionState(t),l.shimMaxMessageSize(t),l.shimSendThrowTypeError(t),l.removeAllowExtmapMixed(t);break;case"firefox":if(!s||!s.shimPeerConnection||!n.shimFirefox)return r("Firefox shim is not included in this adapter release."),d;r("adapter.js shimming firefox."),d.browserShim=s,s.shimGetUserMedia(t),s.shimPeerConnection(t),s.shimOnTrack(t),s.shimRemoveStream(t),s.shimSenderGetStats(t),s.shimReceiverGetStats(t),s.shimRTCDataChannel(t),s.shimAddTransceiver(t),s.shimGetParameters(t),s.shimCreateOffer(t),s.shimCreateAnswer(t),l.shimRTCIceCandidate(t),l.shimConnectionState(t),l.shimMaxMessageSize(t),l.shimSendThrowTypeError(t);break;case"edge":if(!a||!a.shimPeerConnection||!n.shimEdge)return r("MS edge shim is not included in this adapter release."),d;r("adapter.js shimming edge."),d.browserShim=a,a.shimGetUserMedia(t),a.shimGetDisplayMedia(t),a.shimPeerConnection(t),a.shimReplaceTrack(t),l.shimMaxMessageSize(t),l.shimSendThrowTypeError(t);break;case"safari":if(!u||!n.shimSafari)return r("Safari shim is not included in this adapter release."),d;r("adapter.js shimming safari."),d.browserShim=u,u.shimRTCIceServerUrls(t),u.shimCreateOfferLegacy(t),u.shimCallbacksAPI(t),u.shimLocalStreamsAPI(t),u.shimRemoteStreamsAPI(t),u.shimTrackEventTransceiver(t),u.shimGetUserMedia(t),u.shimAudioContext(t),l.shimRTCIceCandidate(t),l.shimMaxMessageSize(t),l.shimSendThrowTypeError(t),l.removeAllowExtmapMixed(t);break;default:r("Unsupported browser!")}return d};var i=r(e("./utils")),o=r(e("./chrome/chrome_shim")),a=r(e("./edge/edge_shim")),s=r(e("./firefox/firefox_shim")),u=r(e("./safari/safari_shim")),l=r(e("./common_shim"))},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((function(t){return e._shimmedLocalStreams[t][0]}))};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((function(e){if(t.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")}));var r=this.getSenders();n.apply(this,arguments);var i=this.getSenders().filter((function(e){return-1===r.indexOf(e)}));this._shimmedLocalStreams[e.id]=[e].concat(i)};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((function(n){var r=t._shimmedLocalStreams[n].indexOf(e);-1!==r&&t._shimmedLocalStreams[n].splice(r,1),1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]})),i.apply(this,arguments)}}Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=e("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return a.shimGetUserMedia}});var s=e("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return s.shimGetDisplayMedia}}),n.shimMediaStream=function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},n.shimOnTrack=function(e){if("object"!==(void 0===e?"undefined":o(e))||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype)u.wrapPeerConnectionEvent(e,"track",(function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e}));else{Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return this._ontrackpoly||(this._ontrackpoly=function(t){t.stream.addEventListener("addtrack",(function(r){var i;i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.track.id})):{track:r.track};var o=new Event("track");o.track=r.track,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)})),t.stream.getTracks().forEach((function(r){var i;i=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.id})):{track:r};var o=new Event("track");o.track=r,o.receiver=i,o.transceiver={receiver:i},o.streams=[t.stream],n.dispatchEvent(o)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}},n.shimGetSendersWithDtmf=function(e){if("object"===(void 0===e?"undefined":o(e))&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){var i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};var r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach((function(e){n._senders.push(t(n,e))}))};var a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._senders=this._senders||[],a.apply(this,[e]),e.getTracks().forEach((function(e){var n=t._senders.find((function(t){return t.track===e}));n&&t._senders.splice(t._senders.indexOf(n),1)}))}}else if("object"===(void 0===e?"undefined":o(e))&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var s=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=s.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},n.shimGetStats=function(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=this,n=Array.prototype.slice.call(arguments),r=n[0],i=n[1],o=n[2];if(arguments.length>0&&"function"==typeof r)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof r))return t.apply(this,[]);var a=function(e){var t={};return e.result().forEach((function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((function(t){n[t]=e.stat(t)})),t[n.id]=n})),t},s=function(e){return new Map(Object.keys(e).map((function(t){return[t,e[t]]})))};if(arguments.length>=2){var u=function(e){i(s(a(e)))};return t.apply(this,[u,r])}return new Promise((function(n,r){t.apply(e,[function(e){n(s(a(e)))},r])})).then(i,o)}}},n.shimSenderReceiverGetStats=function(e){if("object"===(void 0===e?"undefined":o(e))&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return u.filterStats(t,e.track,!0)}))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var r=e.RTCPeerConnection.prototype.getReceivers;r&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=r.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t}),u.wrapPeerConnectionEvent(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return u.filterStats(t,e.track,!1)}))}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var t=arguments[0],n=void 0,r=void 0,o=void 0;return this.getSenders().forEach((function(e){e.track===t&&(n?o=!0:n=e)})),this.getReceivers().forEach((function(e){return e.track===t&&(r?o=!0:r=e),e.track===t})),o||n&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):n?n.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return i.apply(this,arguments)}}}},n.shimAddTrackRemoveTrackWithNative=i,n.shimAddTrackRemoveTrack=function(e){function t(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function n(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)})),new RTCSessionDescription({type:t.type,sdp:n})}if(e.RTCPeerConnection){var o=u.detectBrowser(e);if(e.RTCPeerConnection.prototype.addTrack&&o.version>=65)return i(e);var a=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=a.apply(this);return this._reverseStreams=this._reverseStreams||{},t.map((function(t){return e._reverseStreams[t.id]}))};var s=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((function(e){if(n.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){var r=new e.MediaStream(t.getTracks());this._streams[t.id]=r,this._reverseStreams[r.id]=t,t=r}s.apply(this,[t])};var l=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},l.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){var r=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find((function(e){return e===t})))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find((function(e){return e.track===t})))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var o=this._streams[n.id];if(o)o.addTrack(t),Promise.resolve().then((function(){r.dispatchEvent(new Event("negotiationneeded"))}));else{var a=new e.MediaStream([t]);this._streams[n.id]=a,this._reverseStreams[a.id]=n,this.addStream(a)}return this.getSenders().find((function(e){return e.track===t}))},["createOffer","createAnswer"].forEach((function(n){var i=e.RTCPeerConnection.prototype[n],o=r({},n,(function(){var e=this,n=arguments;return arguments.length&&"function"==typeof arguments[0]?i.apply(this,[function(r){var i=t(e,r);n[0].apply(null,[i])},function(e){n[1]&&n[1].apply(null,e)},arguments[2]]):i.apply(this,arguments).then((function(n){return t(e,n)}))}));e.RTCPeerConnection.prototype[n]=o[n]}));var c=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=n(this,arguments[0]),c.apply(this,arguments)):c.apply(this,arguments)};var d=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=d.get.apply(this);return""===e.type?e:t(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var n=void 0;Object.keys(this._streams).forEach((function(r){t._streams[r].getTracks().find((function(t){return e.track===t}))&&(n=t._streams[r])})),n&&(1===n.getTracks().length?this.removeStream(this._reverseStreams[n.id]):n.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}},n.shimPeerConnection=function(e){var t=u.detectBrowser(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection){var n=0===e.RTCPeerConnection.prototype.addIceCandidate.length;t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],i=r({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=i[t]}));var i=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return n||arguments[0]?t.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():i.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}},n.fixNegotiationNeeded=function(e){var t=u.detectBrowser(e);u.wrapPeerConnectionEvent(e,"negotiationneeded",(function(e){var n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e}))};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("../utils.js"))},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=function(e,t){if((!e.navigator.mediaDevices||!("getDisplayMedia"in e.navigator.mediaDevices))&&e.navigator.mediaDevices)return"function"!=typeof t?void console.error("shimGetDisplayMedia: getSourceId argument is not a function"):void(e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((function(t){var r=n.video&&n.video.width,i=n.video&&n.video.height,o=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:o||3}},r&&(n.video.mandatory.maxWidth=r),i&&(n.video.mandatory.maxHeight=i),e.navigator.mediaDevices.getUserMedia(n)}))})}},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.shimGetUserMedia=function(e){var t=e&&e.navigator;if(t.mediaDevices){var n=i.detectBrowser(e),a=function(e){if("object"!==(void 0===e?"undefined":r(e))||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach((function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var i="object"===r(e[n])?e[n]:{ideal:e[n]};void 0!==i.exact&&"number"==typeof i.exact&&(i.min=i.max=i.exact);var o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==i.ideal){t.optional=t.optional||[];var a={};"number"==typeof i.ideal?(a[o("min",n)]=i.ideal,t.optional.push(a),(a={})[o("max",n)]=i.ideal,t.optional.push(a)):(a[o("",n)]=i.ideal,t.optional.push(a))}void 0!==i.exact&&"number"!=typeof i.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=i.exact):["min","max"].forEach((function(e){void 0!==i[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=i[e])}))}})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},s=function(e,i){if(n.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"===r(e.audio)){var s=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};s((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),s(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=a(e.audio)}if(e&&"object"===r(e.video)){var u=e.video.facingMode;u=u&&("object"===(void 0===u?"undefined":r(u))?u:{ideal:u});var l=n.version<66;if(u&&("user"===u.exact||"environment"===u.exact||"user"===u.ideal||"environment"===u.ideal)&&(!t.mediaDevices.getSupportedConstraints||!t.mediaDevices.getSupportedConstraints().facingMode||l)){delete e.video.facingMode;var c=void 0;if("environment"===u.exact||"environment"===u.ideal?c=["back","rear"]:"user"!==u.exact&&"user"!==u.ideal||(c=["front"]),c)return t.mediaDevices.enumerateDevices().then((function(t){var n=(t=t.filter((function(e){return"videoinput"===e.kind}))).find((function(e){return c.some((function(t){return e.label.toLowerCase().includes(t)}))}));return!n&&t.length&&c.includes("back")&&(n=t[t.length-1]),n&&(e.video.deviceId=u.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=a(e.video),o("chrome: "+JSON.stringify(e)),i(e)}))}e.video=a(e.video)}return o("chrome: "+JSON.stringify(e)),i(e)},u=function(e){return n.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};if(t.getUserMedia=function(e,n,r){s(e,(function(e){t.webkitGetUserMedia(e,n,(function(e){r&&r(u(e))}))}))}.bind(t),t.mediaDevices.getUserMedia){var l=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return s(e,(function(e){return l(e).then((function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach((function(e){e.stop()})),new DOMException("","NotFoundError");return t}),(function(e){return Promise.reject(u(e))}))}))}}}};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("../utils.js")),o=i.log},{"../utils.js":15}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.shimRTCIceCandidate=function(e){if(e.RTCIceCandidate&&(!e.RTCIceCandidate||!("foundation"in e.RTCIceCandidate.prototype))){var t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"===(void 0===e?"undefined":r(e))&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){var n=new t(e),o=i.default.parseCandidate(e.candidate),a=Object.assign(n,o);return a.toJSON=function(){return{candidate:a.candidate,sdpMid:a.sdpMid,sdpMLineIndex:a.sdpMLineIndex,usernameFragment:a.usernameFragment}},a}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,o.wrapPeerConnectionEvent(e,"icecandidate",(function(t){return t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t}))}},n.shimMaxMessageSize=function(e){if(e.RTCPeerConnection){var t=o.detectBrowser(e);"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var n=function(e){if(!e||!e.sdp)return!1;var t=i.default.splitSections(e.sdp);return t.shift(),t.some((function(e){var t=i.default.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))},r=function(e){var t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;var n=parseInt(t[1],10);return n!=n?-1:n},a=function(e){var n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n},s=function(e,n){var r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);var o=i.default.matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?r=parseInt(o[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r},u=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76&&"plan-b"===this.getConfiguration().sdpSemantics&&Object.defineProperty(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0}),n(arguments[0])){var e=r(arguments[0]),i=a(e),o=s(arguments[0],e),l=void 0;l=0===i&&0===o?Number.POSITIVE_INFINITY:0===i||0===o?Math.max(i,o):Math.min(i,o);var c={};Object.defineProperty(c,"maxMessageSize",{get:function(){return l}}),this._sctp=c}return u.apply(this,arguments)}}},n.shimSendThrowTypeError=function(e){function t(e,t){var n=e.send;e.send=function(){var r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=n.apply(this,arguments);return t(e,this),e},o.wrapPeerConnectionEvent(e,"datachannel",(function(e){return t(e.channel,e.target),e}))}},n.shimConnectionState=function(e){if(e.RTCPeerConnection&&!("connectionState"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((function(e){var n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(e){var t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}},n.removeAllowExtmapMixed=function(e){if(e.RTCPeerConnection){var t=o.detectBrowser(e);if(!("chrome"===t.browser&&t.version>=71||"safari"===t.browser&&t.version>=605)){var n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(e){return e&&e.sdp&&-1!==e.sdp.indexOf("\na=extmap-allow-mixed")&&(e.sdp=e.sdp.split("\n").filter((function(e){return"a=extmap-allow-mixed"!==e.trim()})).join("\n")),n.apply(this,arguments)}}}};var i=function(e){return e&&e.__esModule?e:{default:e}}(e("sdp")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("./utils"))},{"./utils":15,sdp:17}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var r=e("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return r.shimGetUserMedia}});var i=e("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return i.shimGetDisplayMedia}}),n.shimPeerConnection=function(e){var t=o.detectBrowser(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){var n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set:function(e){n.set.call(this,e);var t=new Event("enabled");t.enabled=e,this.dispatchEvent(t)}})}!e.RTCRtpSender||"dtmf"in e.RTCRtpSender.prototype||Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCDtmfSender&&!e.RTCDTMFSender&&(e.RTCDTMFSender=e.RTCDtmfSender);var r=(0,s.default)(e,t.version);e.RTCPeerConnection=function(e){return e&&e.iceServers&&(e.iceServers=(0,a.filterIceServers)(e.iceServers,t.version),o.log("ICE servers after filtering:",e.iceServers)),new r(e)},e.RTCPeerConnection.prototype=r.prototype},n.shimReplaceTrack=function(e){!e.RTCRtpSender||"replaceTrack"in e.RTCRtpSender.prototype||(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)};var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("../utils")),a=e("./filtericeservers"),s=function(e){return e&&e.__esModule?e:{default:e}}(e("rtcpeerconnection-shim"))},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.filterIceServers=function(e,t){var n=!1;return(e=JSON.parse(JSON.stringify(e))).filter((function(e){if(e&&(e.urls||e.url)){var t=e.urls||e.url;e.url&&!e.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");var i="string"==typeof t;return i&&(t=[t]),t=t.filter((function(e){if(0===e.indexOf("stun:"))return!1;var t=e.startsWith("turn")&&!e.startsWith("turn:[")&&e.includes("transport=udp");return t&&!n?(n=!0,!0):t&&!n})),delete e.url,e.urls=i?t[0]:t,!!t.length}}))};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("../utils"))},{"../utils":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=function(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator)))}},{}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetUserMedia=function(e){var t=e&&e.navigator,n=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return n(e).catch((function(e){return Promise.reject(function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return this.name}}}(e))}))}}},{}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return i.shimGetUserMedia}});var o=e("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return o.shimGetDisplayMedia}}),n.shimOnTrack=function(e){"object"===(void 0===e?"undefined":r(e))&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},n.shimPeerConnection=function(e){var t=a.detectBrowser(e);if("object"===(void 0===e?"undefined":r(e))&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){if(!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=r[t]})),t.version<68){var n=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=Array.prototype.slice.call(arguments),n=e[0],r=e[1],a=e[2];return o.apply(this,[n||null]).then((function(e){if(t.version<53&&!r)try{e.forEach((function(e){e.type=i[e.type]||e.type}))}catch(t){if("TypeError"!==t.name)throw t;e.forEach((function(t,n){e.set(n,Object.assign({},t,{type:i[t.type]||t.type}))}))}return e})).then(r,a)}}},n.shimSenderGetStats=function(e){if("object"===(void 0===e?"undefined":r(e))&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpSender.prototype))){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}},n.shimReceiverGetStats=function(e){if("object"===(void 0===e?"undefined":r(e))&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpReceiver.prototype))){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n}),a.wrapPeerConnectionEvent(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}},n.shimRemoveStream=function(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;a.deprecated("removeStream","removeTrack"),this.getSenders().forEach((function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)}))})},n.shimRTCDataChannel=function(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)},n.shimAddTransceiver=function(e){if("object"===(void 0===e?"undefined":r(e))&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var e=arguments[1],n=e&&"sendEncodings"in e;n&&e.sendEncodings.forEach((function(e){if("rid"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));var r=t.apply(this,arguments);if(n){var i=r.sender,o=i.getParameters();"encodings"in o&&(1!==o.encodings.length||0!==Object.keys(o.encodings[0]).length)||(o.encodings=e.sendEncodings,i.sendEncodings=e.sendEncodings,this.setParametersPromises.push(i.setParameters(o).then((function(){delete i.sendEncodings})).catch((function(){delete i.sendEncodings}))))}return r})}},n.shimGetParameters=function(e){if("object"===(void 0===e?"undefined":r(e))&&e.RTCRtpSender){var t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){var e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}},n.shimCreateOffer=function(e){if("object"===(void 0===e?"undefined":r(e))&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){var e=this,n=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(e,n)})).finally((function(){e.setParametersPromises=[]})):t.apply(this,arguments)}}},n.shimCreateAnswer=function(e){if("object"===(void 0===e?"undefined":r(e))&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){var e=this,n=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(e,n)})).finally((function(){e.setParametersPromises=[]})):t.apply(this,arguments)}}};var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("../utils"))},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){var r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}},{}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.shimGetUserMedia=function(e){var t=i.detectBrowser(e),n=e&&e.navigator,o=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){i.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var a=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(e){return"object"===(void 0===e?"undefined":r(e))&&"object"===r(e.audio)&&(e=JSON.parse(JSON.stringify(e)),a(e.audio,"autoGainControl","mozAutoGainControl"),a(e.audio,"noiseSuppression","mozNoiseSuppression")),s(e)},o&&o.prototype.getSettings){var u=o.prototype.getSettings;o.prototype.getSettings=function(){var e=u.apply(this,arguments);return a(e,"mozAutoGainControl","autoGainControl"),a(e,"mozNoiseSuppression","noiseSuppression"),e}}if(o&&o.prototype.applyConstraints){var l=o.prototype.applyConstraints;o.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"===(void 0===e?"undefined":r(e))&&(e=JSON.parse(JSON.stringify(e)),a(e,"autoGainControl","mozAutoGainControl"),a(e,"noiseSuppression","mozNoiseSuppression")),l.apply(this,[e])}}}};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("../utils"))},{"../utils":15}],14:[function(e,t,n){"use strict";function r(e){return e&&void 0!==e.video?Object.assign({},e,{video:o.compactObject(e.video)}):e}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.shimLocalStreamsAPI=function(e){if("object"===(void 0===e?"undefined":i(e))&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((function(r){return t.call(n,r,e)})),e.getVideoTracks().forEach((function(r){return t.call(n,r,e)}))},e.RTCPeerConnection.prototype.addTrack=function(e){for(var n=this,r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i&&i.forEach((function(e){n._localStreams?n._localStreams.includes(e)||n._localStreams.push(e):n._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._localStreams||(this._localStreams=[]);var n=this._localStreams.indexOf(e);if(-1!==n){this._localStreams.splice(n,1);var r=e.getTracks();this.getSenders().forEach((function(e){r.includes(e.track)&&t.removeTrack(e)}))}})}},n.shimRemoteStreamsAPI=function(e){if("object"===(void 0===e?"undefined":i(e))&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){var t=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach((function(e){if(t._remoteStreams||(t._remoteStreams=[]),!t._remoteStreams.includes(e)){t._remoteStreams.push(e);var n=new Event("addstream");n.stream=e,t.dispatchEvent(n)}}))})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((function(t){if(e._remoteStreams||(e._remoteStreams=[]),!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}}))}),t.apply(e,arguments)}}},n.shimCallbacksAPI=function(e){if("object"===(void 0===e?"undefined":i(e))&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,a=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(e,t){var r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};var u=function(e,t,n){var r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=u,u=function(e,t,n){var r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=u,u=function(e,t,n){var r=s.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=u}},n.shimGetUserMedia=function(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,i=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(e){return i(r(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))},n.shimConstraints=r,n.shimRTCIceServerUrls=function(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var r=[],i=0;i<e.iceServers.length;i++){var a=e.iceServers[i];!a.hasOwnProperty("urls")&&a.hasOwnProperty("url")?(o.deprecated("RTCIceServer.url","RTCIceServer.urls"),(a=JSON.parse(JSON.stringify(a))).urls=a.url,delete a.url,r.push(a)):r.push(e.iceServers[i])}e.iceServers=r}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}},n.shimTrackEventTransceiver=function(e){"object"===(void 0===e?"undefined":i(e))&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},n.shimCreateOfferLegacy=function(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);var n=this.getTransceivers().find((function(e){return"audio"===e.receiver.track.kind}));!1===e.offerToReceiveAudio&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveAudio||n||this.addTransceiver("audio"),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);var r=this.getTransceivers().find((function(e){return"video"===e.receiver.track.kind}));!1===e.offerToReceiveVideo&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveVideo||r||this.addTransceiver("video")}return t.apply(this,arguments)}},n.shimAudioContext=function(e){"object"!==(void 0===e?"undefined":i(e))||e.AudioContext||(e.AudioContext=e.webkitAudioContext)};var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(e("../utils"))},{"../utils":15}],15:[function(e,t,n){"use strict";function r(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function i(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((function(r){r.endsWith("Id")?o(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((function(t){o(e,e.get(t),n)}))})))}Object.defineProperty(n,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.extractVersion=r,n.wrapPeerConnectionEvent=function(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);var o=function(e){var t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};var o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);var r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}},n.disableLog=function(e){return"boolean"!=typeof e?new Error("Argument type: "+(void 0===e?"undefined":a(e))+". Please use a boolean."):(s=e,e?"adapter.js logging disabled":"adapter.js logging enabled")},n.disableWarnings=function(e){return"boolean"!=typeof e?new Error("Argument type: "+(void 0===e?"undefined":a(e))+". Please use a boolean."):(u=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},n.log=function(){if("object"===("undefined"==typeof window?"undefined":a(window))){if(s)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},n.deprecated=function(e,t){u&&console.warn(e+" is deprecated, please use "+t+" instead.")},n.detectBrowser=function(e){var t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;var n=e.navigator;if(n.mozGetUserMedia)t.browser="firefox",t.version=r(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=r(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(n.mediaDevices&&n.userAgent.match(/Edge\/(\d+).(\d+)$/))t.browser="edge",t.version=r(n.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=r(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t},n.compactObject=function e(t){return i(t)?Object.keys(t).reduce((function(n,r){var o=i(t[r]),a=o?e(t[r]):t[r],s=o&&!Object.keys(a).length;return void 0===a||s?n:Object.assign(n,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,a))}),{}):t},n.walkStats=o,n.filterStats=function(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;var a=[];return e.forEach((function(e){"track"===e.type&&e.trackIdentifier===t.id&&a.push(e)})),a.forEach((function(t){e.forEach((function(n){n.type===r&&n.trackId===t.id&&o(e,n,i)}))})),i};var s=!0,u=!0},{}],16:[function(e,t,n){"use strict";function r(e,t,n,r,i){var o=u.writeRtpDescription(e.kind,t);if(o+=u.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=u.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":i||"active"),o+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?o+="a=sendrecv\r\n":e.rtpSender?o+="a=sendonly\r\n":e.rtpReceiver?o+="a=recvonly\r\n":o+="a=inactive\r\n",e.rtpSender){var a=e.rtpSender._initialTrackId||e.rtpSender.track.id;e.rtpSender._initialTrackId=a;var s="msid:"+(r?r.id:"-")+" "+a+"\r\n";o+="a="+s,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+s,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+s,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+u.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+u.localCName+"\r\n"),o}function i(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},r=function(e,t){e=parseInt(e,10);for(var n=0;n<t.length;n++)if(t[n].payloadType===e||t[n].preferredPayloadType===e)return t[n]},i=function(e,t,n,i){var o=r(e.parameters.apt,n),a=r(t.parameters.apt,i);return o&&a&&o.name.toLowerCase()===a.name.toLowerCase()};return e.codecs.forEach((function(r){for(var o=0;o<t.codecs.length;o++){var a=t.codecs[o];if(r.name.toLowerCase()===a.name.toLowerCase()&&r.clockRate===a.clockRate){if("rtx"===r.name.toLowerCase()&&r.parameters&&a.parameters.apt&&!i(r,a,e.codecs,t.codecs))continue;(a=JSON.parse(JSON.stringify(a))).numChannels=Math.min(r.numChannels,a.numChannels),n.codecs.push(a),a.rtcpFeedback=a.rtcpFeedback.filter((function(e){for(var t=0;t<r.rtcpFeedback.length;t++)if(r.rtcpFeedback[t].type===e.type&&r.rtcpFeedback[t].parameter===e.parameter)return!0;return!1}));break}}})),e.headerExtensions.forEach((function(e){for(var r=0;r<t.headerExtensions.length;r++){var i=t.headerExtensions[r];if(e.uri===i.uri){n.headerExtensions.push(i);break}}})),n}function o(e,t,n){return-1!=={offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[t][e].indexOf(n)}function a(e,t){var n=e.getRemoteCandidates().find((function(e){return t.foundation===e.foundation&&t.ip===e.ip&&t.port===e.port&&t.priority===e.priority&&t.protocol===e.protocol&&t.type===e.type}));return n||e.addRemoteCandidate(t),!n}function s(e,t){var n=new Error(t);return n.name=e,n.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[e],n}var u=e("sdp");t.exports=function(e,t){function n(t,n){n.addTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("addtrack",{track:t}))}function l(t,n){n.removeTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))}function c(t,n,r,i){var o=new Event("track");o.track=n,o.receiver=r,o.transceiver={receiver:r},o.streams=i,e.setTimeout((function(){t._dispatchEvent("track",o)}))}var d=function(n){var r=this,i=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach((function(e){r[e]=i[e].bind(i)})),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",n=JSON.parse(JSON.stringify(n||{})),this.usingBundle="max-bundle"===n.bundlePolicy,"negotiate"===n.rtcpMuxPolicy)throw s("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(n.rtcpMuxPolicy||(n.rtcpMuxPolicy="require"),n.iceTransportPolicy){case"all":case"relay":break;default:n.iceTransportPolicy="all"}switch(n.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:n.bundlePolicy="balanced"}if(n.iceServers=function(e,t){var n=!1;return(e=JSON.parse(JSON.stringify(e))).filter((function(e){if(e&&(e.urls||e.url)){var r=e.urls||e.url;e.url&&!e.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var i="string"==typeof r;return i&&(r=[r]),r=r.filter((function(e){return 0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||n?0===e.indexOf("stun:")&&t>=14393&&-1===e.indexOf("?transport=udp"):(n=!0,!0)})),delete e.url,e.urls=i?r[0]:r,!!r.length}}))}(n.iceServers||[],t),this._iceGatherers=[],n.iceCandidatePoolSize)for(var o=n.iceCandidatePoolSize;o>0;o--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:n.iceServers,gatherPolicy:n.iceTransportPolicy}));else n.iceCandidatePoolSize=0;this._config=n,this.transceivers=[],this._sdpSessionId=u.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(d.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(d.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),d.prototype.onicecandidate=null,d.prototype.onaddstream=null,d.prototype.ontrack=null,d.prototype.onremovestream=null,d.prototype.onsignalingstatechange=null,d.prototype.oniceconnectionstatechange=null,d.prototype.onconnectionstatechange=null,d.prototype.onicegatheringstatechange=null,d.prototype.onnegotiationneeded=null,d.prototype.ondatachannel=null,d.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},d.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},d.prototype.getConfiguration=function(){return this._config},d.prototype.getLocalStreams=function(){return this.localStreams},d.prototype.getRemoteStreams=function(){return this.remoteStreams},d.prototype._createTransceiver=function(e,t){var n=this.transceivers.length>0,r={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&n)r.iceTransport=this.transceivers[0].iceTransport,r.dtlsTransport=this.transceivers[0].dtlsTransport;else{var i=this._createIceAndDtlsTransports();r.iceTransport=i.iceTransport,r.dtlsTransport=i.dtlsTransport}return t||this.transceivers.push(r),r},d.prototype.addTrack=function(t,n){if(this._isClosed)throw s("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");if(this.transceivers.find((function(e){return e.track===t})))throw s("InvalidAccessError","Track already exists.");for(var r,i=0;i<this.transceivers.length;i++)this.transceivers[i].track||this.transceivers[i].kind!==t.kind||(r=this.transceivers[i]);return r||(r=this._createTransceiver(t.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(n)&&this.localStreams.push(n),r.track=t,r.stream=n,r.rtpSender=new e.RTCRtpSender(t,r.dtlsTransport),r.rtpSender},d.prototype.addStream=function(e){var n=this;if(t>=15025)e.getTracks().forEach((function(t){n.addTrack(t,e)}));else{var r=e.clone();e.getTracks().forEach((function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",(function(e){n.enabled=e.enabled}))})),r.getTracks().forEach((function(e){n.addTrack(e,r)}))}},d.prototype.removeTrack=function(t){if(this._isClosed)throw s("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=this.transceivers.find((function(e){return e.rtpSender===t}));if(!n)throw s("InvalidAccessError","Sender was not created by this connection.");var r=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map((function(e){return e.stream})).indexOf(r)&&this.localStreams.indexOf(r)>-1&&this.localStreams.splice(this.localStreams.indexOf(r),1),this._maybeFireNegotiationNeeded()},d.prototype.removeStream=function(e){var t=this;e.getTracks().forEach((function(e){var n=t.getSenders().find((function(t){return t.track===e}));n&&t.removeTrack(n)}))},d.prototype.getSenders=function(){return this.transceivers.filter((function(e){return!!e.rtpSender})).map((function(e){return e.rtpSender}))},d.prototype.getReceivers=function(){return this.transceivers.filter((function(e){return!!e.rtpReceiver})).map((function(e){return e.rtpReceiver}))},d.prototype._createIceGatherer=function(t,n){var r=this;if(n&&t>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[t].bufferedCandidateEvents=[],this.transceivers[t].bufferCandidates=function(e){var n=!e.candidate||0===Object.keys(e.candidate).length;i.state=n?"completed":"gathering",null!==r.transceivers[t].bufferedCandidateEvents&&r.transceivers[t].bufferedCandidateEvents.push(e)},i.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),i},d.prototype._gather=function(t,n){var r=this,i=this.transceivers[n].iceGatherer;if(!i.onlocalcandidate){var o=this.transceivers[n].bufferedCandidateEvents;this.transceivers[n].bufferedCandidateEvents=null,i.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),i.onlocalcandidate=function(e){if(!(r.usingBundle&&n>0)){var o=new Event("icecandidate");o.candidate={sdpMid:t,sdpMLineIndex:n};var a=e.candidate,s=!a||0===Object.keys(a).length;if(s)"new"!==i.state&&"gathering"!==i.state||(i.state="completed");else{"new"===i.state&&(i.state="gathering"),a.component=1,a.ufrag=i.getLocalParameters().usernameFragment;var l=u.writeCandidate(a);o.candidate=Object.assign(o.candidate,u.parseCandidate(l)),o.candidate.candidate=l,o.candidate.toJSON=function(){return{candidate:o.candidate.candidate,sdpMid:o.candidate.sdpMid,sdpMLineIndex:o.candidate.sdpMLineIndex,usernameFragment:o.candidate.usernameFragment}}}var c=u.getMediaSections(r._localDescription.sdp);c[o.candidate.sdpMLineIndex]+=s?"a=end-of-candidates\r\n":"a="+o.candidate.candidate+"\r\n",r._localDescription.sdp=u.getDescription(r._localDescription.sdp)+c.join("");var d=r.transceivers.every((function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state}));"gathering"!==r.iceGatheringState&&(r.iceGatheringState="gathering",r._emitGatheringStateChange()),s||r._dispatchEvent("icecandidate",o),d&&(r._dispatchEvent("icecandidate",new Event("icecandidate")),r.iceGatheringState="complete",r._emitGatheringStateChange())}},e.setTimeout((function(){o.forEach((function(e){i.onlocalcandidate(e)}))}),0)}},d.prototype._createIceAndDtlsTransports=function(){var t=this,n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateIceConnectionState(),t._updateConnectionState()};var r=new e.RTCDtlsTransport(n);return r.ondtlsstatechange=function(){t._updateConnectionState()},r.onerror=function(){Object.defineProperty(r,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:n,dtlsTransport:r}},d.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var r=this.transceivers[e].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[e].dtlsTransport)},d.prototype._transceive=function(e,n,r){var o=i(e.localCapabilities,e.remoteCapabilities);n&&e.rtpSender&&(o.encodings=e.sendEncodingParameters,o.rtcp={cname:u.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(o.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(o)),r&&e.rtpReceiver&&o.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&t<15019&&e.recvEncodingParameters.forEach((function(e){delete e.rtx})),e.recvEncodingParameters.length?o.encodings=e.recvEncodingParameters:o.encodings=[{}],o.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(o.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(o.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(o))},d.prototype.setLocalDescription=function(e){var t,n,r=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(s("TypeError",'Unsupported type "'+e.type+'"'));if(!o("setLocalDescription",e.type,r.signalingState)||r._isClosed)return Promise.reject(s("InvalidStateError","Can not set local "+e.type+" in state "+r.signalingState));if("offer"===e.type)t=u.splitSections(e.sdp),n=t.shift(),t.forEach((function(e,t){var n=u.parseRtpParameters(e);r.transceivers[t].localCapabilities=n})),r.transceivers.forEach((function(e,t){r._gather(e.mid,t)}));else if("answer"===e.type){t=u.splitSections(r._remoteDescription.sdp),n=t.shift();var a=u.matchPrefix(n,"a=ice-lite").length>0;t.forEach((function(e,t){var o=r.transceivers[t],s=o.iceGatherer,l=o.iceTransport,c=o.dtlsTransport,d=o.localCapabilities,f=o.remoteCapabilities;if(!(u.isRejected(e)&&0===u.matchPrefix(e,"a=bundle-only").length||o.rejected)){var h=u.getIceParameters(e,n),p=u.getDtlsParameters(e,n);a&&(p.role="server"),r.usingBundle&&0!==t||(r._gather(o.mid,t),"new"===l.state&&l.start(s,h,a?"controlling":"controlled"),"new"===c.state&&c.start(p));var v=i(d,f);r._transceive(o,v.codecs.length>0,!1)}}))}return r._localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?r._updateSignalingState("have-local-offer"):r._updateSignalingState("stable"),Promise.resolve()},d.prototype.setRemoteDescription=function(r){var d=this;if(-1===["offer","answer"].indexOf(r.type))return Promise.reject(s("TypeError",'Unsupported type "'+r.type+'"'));if(!o("setRemoteDescription",r.type,d.signalingState)||d._isClosed)return Promise.reject(s("InvalidStateError","Can not set remote "+r.type+" in state "+d.signalingState));var f={};d.remoteStreams.forEach((function(e){f[e.id]=e}));var h=[],p=u.splitSections(r.sdp),v=p.shift(),m=u.matchPrefix(v,"a=ice-lite").length>0,g=u.matchPrefix(v,"a=group:BUNDLE ").length>0;d.usingBundle=g;var y=u.matchPrefix(v,"a=ice-options:")[0];return d.canTrickleIceCandidates=!!y&&y.substr(14).split(" ").indexOf("trickle")>=0,p.forEach((function(o,s){var c=u.splitLines(o),p=u.getKind(o),y=u.isRejected(o)&&0===u.matchPrefix(o,"a=bundle-only").length,_=c[0].substr(2).split(" ")[2],b=u.getDirection(o,v),S=u.parseMsid(o),T=u.getMid(o)||u.generateIdentifier();if(y||"application"===p&&("DTLS/SCTP"===_||"UDP/DTLS/SCTP"===_))d.transceivers[s]={mid:T,kind:p,protocol:_,rejected:!0};else{!y&&d.transceivers[s]&&d.transceivers[s].rejected&&(d.transceivers[s]=d._createTransceiver(p,!0));var w,k,E,C,A,j,x,P,L,O,R,I=u.parseRtpParameters(o);y||(O=u.getIceParameters(o,v),(R=u.getDtlsParameters(o,v)).role="client"),x=u.parseRtpEncodingParameters(o);var M=u.parseRtcpParameters(o),D=u.matchPrefix(o,"a=end-of-candidates",v).length>0,U=u.matchPrefix(o,"a=candidate:").map((function(e){return u.parseCandidate(e)})).filter((function(e){return 1===e.component}));if(("offer"===r.type||"answer"===r.type)&&!y&&g&&s>0&&d.transceivers[s]&&(d._disposeIceAndDtlsTransports(s),d.transceivers[s].iceGatherer=d.transceivers[0].iceGatherer,d.transceivers[s].iceTransport=d.transceivers[0].iceTransport,d.transceivers[s].dtlsTransport=d.transceivers[0].dtlsTransport,d.transceivers[s].rtpSender&&d.transceivers[s].rtpSender.setTransport(d.transceivers[0].dtlsTransport),d.transceivers[s].rtpReceiver&&d.transceivers[s].rtpReceiver.setTransport(d.transceivers[0].dtlsTransport)),"offer"!==r.type||y){if("answer"===r.type&&!y)k=(w=d.transceivers[s]).iceGatherer,E=w.iceTransport,C=w.dtlsTransport,A=w.rtpReceiver,j=w.sendEncodingParameters,P=w.localCapabilities,d.transceivers[s].recvEncodingParameters=x,d.transceivers[s].remoteCapabilities=I,d.transceivers[s].rtcpParameters=M,U.length&&"new"===E.state&&(!m&&!D||g&&0!==s?U.forEach((function(e){a(w.iceTransport,e)})):E.setRemoteCandidates(U)),g&&0!==s||("new"===E.state&&E.start(k,O,"controlling"),"new"===C.state&&C.start(R)),!i(w.localCapabilities,w.remoteCapabilities).codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&w.sendEncodingParameters[0].rtx&&delete w.sendEncodingParameters[0].rtx,d._transceive(w,"sendrecv"===b||"recvonly"===b,"sendrecv"===b||"sendonly"===b),!A||"sendrecv"!==b&&"sendonly"!==b?delete w.rtpReceiver:(L=A.track,S?(f[S.stream]||(f[S.stream]=new e.MediaStream),n(L,f[S.stream]),h.push([L,A,f[S.stream]])):(f.default||(f.default=new e.MediaStream),n(L,f.default),h.push([L,A,f.default])))}else{(w=d.transceivers[s]||d._createTransceiver(p)).mid=T,w.iceGatherer||(w.iceGatherer=d._createIceGatherer(s,g)),U.length&&"new"===w.iceTransport.state&&(!D||g&&0!==s?U.forEach((function(e){a(w.iceTransport,e)})):w.iceTransport.setRemoteCandidates(U)),P=e.RTCRtpReceiver.getCapabilities(p),t<15019&&(P.codecs=P.codecs.filter((function(e){return"rtx"!==e.name}))),j=w.sendEncodingParameters||[{ssrc:1001*(2*s+2)}];var B,N=!1;if("sendrecv"===b||"sendonly"===b){if(N=!w.rtpReceiver,A=w.rtpReceiver||new e.RTCRtpReceiver(w.dtlsTransport,p),N)L=A.track,S&&"-"===S.stream||(S?(f[S.stream]||(f[S.stream]=new e.MediaStream,Object.defineProperty(f[S.stream],"id",{get:function(){return S.stream}})),Object.defineProperty(L,"id",{get:function(){return S.track}}),B=f[S.stream]):(f.default||(f.default=new e.MediaStream),B=f.default)),B&&(n(L,B),w.associatedRemoteMediaStreams.push(B)),h.push([L,A,B])}else w.rtpReceiver&&w.rtpReceiver.track&&(w.associatedRemoteMediaStreams.forEach((function(e){var t=e.getTracks().find((function(e){return e.id===w.rtpReceiver.track.id}));t&&l(t,e)})),w.associatedRemoteMediaStreams=[]);w.localCapabilities=P,w.remoteCapabilities=I,w.rtpReceiver=A,w.rtcpParameters=M,w.sendEncodingParameters=j,w.recvEncodingParameters=x,d._transceive(d.transceivers[s],!1,N)}}})),void 0===d._dtlsRole&&(d._dtlsRole="offer"===r.type?"active":"passive"),d._remoteDescription={type:r.type,sdp:r.sdp},"offer"===r.type?d._updateSignalingState("have-remote-offer"):d._updateSignalingState("stable"),Object.keys(f).forEach((function(t){var n=f[t];if(n.getTracks().length){if(-1===d.remoteStreams.indexOf(n)){d.remoteStreams.push(n);var r=new Event("addstream");r.stream=n,e.setTimeout((function(){d._dispatchEvent("addstream",r)}))}h.forEach((function(e){var t=e[0],r=e[1];n.id===e[2].id&&c(d,t,r,[n])}))}})),h.forEach((function(e){e[2]||c(d,e[0],e[1],[])})),e.setTimeout((function(){d&&d.transceivers&&d.transceivers.forEach((function(e){e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))}))}),4e3),Promise.resolve()},d.prototype.close=function(){this.transceivers.forEach((function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()})),this._isClosed=!0,this._updateSignalingState("closed")},d.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},d.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,e.setTimeout((function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}}),0))},d.prototype._updateIceConnectionState=function(){var e,t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&!e.rejected&&t[e.iceTransport.state]++})),e="new",t.failed>0?e="failed":t.checking>0?e="checking":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0?e="connected":t.completed>0&&(e="completed"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},d.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&e.dtlsTransport&&!e.rejected&&(t[e.iceTransport.state]++,t[e.dtlsTransport.state]++)})),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0&&(e="connected"),e!==this.connectionState){this.connectionState=e;var n=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",n)}},d.prototype.createOffer=function(){var n=this;if(n._isClosed)return Promise.reject(s("InvalidStateError","Can not call createOffer after close"));var i=n.transceivers.filter((function(e){return"audio"===e.kind})).length,o=n.transceivers.filter((function(e){return"video"===e.kind})).length,a=arguments[0];if(a){if(a.mandatory||a.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==a.offerToReceiveAudio&&(i=!0===a.offerToReceiveAudio?1:!1===a.offerToReceiveAudio?0:a.offerToReceiveAudio),void 0!==a.offerToReceiveVideo&&(o=!0===a.offerToReceiveVideo?1:!1===a.offerToReceiveVideo?0:a.offerToReceiveVideo)}for(n.transceivers.forEach((function(e){"audio"===e.kind?--i<0&&(e.wantReceive=!1):"video"===e.kind&&--o<0&&(e.wantReceive=!1)}));i>0||o>0;)i>0&&(n._createTransceiver("audio"),i--),o>0&&(n._createTransceiver("video"),o--);var l=u.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.transceivers.forEach((function(r,i){var o=r.track,a=r.kind,s=r.mid||u.generateIdentifier();r.mid=s,r.iceGatherer||(r.iceGatherer=n._createIceGatherer(i,n.usingBundle));var l=e.RTCRtpSender.getCapabilities(a);t<15019&&(l.codecs=l.codecs.filter((function(e){return"rtx"!==e.name}))),l.codecs.forEach((function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1"),r.remoteCapabilities&&r.remoteCapabilities.codecs&&r.remoteCapabilities.codecs.forEach((function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)}))})),l.headerExtensions.forEach((function(e){(r.remoteCapabilities&&r.remoteCapabilities.headerExtensions||[]).forEach((function(t){e.uri===t.uri&&(e.id=t.id)}))}));var c=r.sendEncodingParameters||[{ssrc:1001*(2*i+1)}];o&&t>=15019&&"video"===a&&!c[0].rtx&&(c[0].rtx={ssrc:c[0].ssrc+1}),r.wantReceive&&(r.rtpReceiver=new e.RTCRtpReceiver(r.dtlsTransport,a)),r.localCapabilities=l,r.sendEncodingParameters=c})),"max-compat"!==n._config.bundlePolicy&&(l+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),l+="a=ice-options:trickle\r\n",n.transceivers.forEach((function(e,t){l+=r(e,e.localCapabilities,"offer",e.stream,n._dtlsRole),l+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===n.iceGatheringState||0!==t&&n.usingBundle||(e.iceGatherer.getLocalCandidates().forEach((function(e){e.component=1,l+="a="+u.writeCandidate(e)+"\r\n"})),"completed"===e.iceGatherer.state&&(l+="a=end-of-candidates\r\n"))}));var c=new e.RTCSessionDescription({type:"offer",sdp:l});return Promise.resolve(c)},d.prototype.createAnswer=function(){var n=this;if(n._isClosed)return Promise.reject(s("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==n.signalingState&&"have-local-pranswer"!==n.signalingState)return Promise.reject(s("InvalidStateError","Can not call createAnswer in signalingState "+n.signalingState));var o=u.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.usingBundle&&(o+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),o+="a=ice-options:trickle\r\n";var a=u.getMediaSections(n._remoteDescription.sdp).length;n.transceivers.forEach((function(e,s){if(!(s+1>a)){if(e.rejected)return"application"===e.kind?"DTLS/SCTP"===e.protocol?o+="m=application 0 DTLS/SCTP 5000\r\n":o+="m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?o+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(o+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(o+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n");var u;if(e.stream)"audio"===e.kind?u=e.stream.getAudioTracks()[0]:"video"===e.kind&&(u=e.stream.getVideoTracks()[0]),u&&t>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1});var l=i(e.localCapabilities,e.remoteCapabilities);!l.codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,o+=r(e,l,"answer",e.stream,n._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(o+="a=rtcp-rsize\r\n")}}));var l=new e.RTCSessionDescription({type:"answer",sdp:o});return Promise.resolve(l)},d.prototype.addIceCandidate=function(e){var t,n=this;return e&&void 0===e.sdpMLineIndex&&!e.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise((function(r,i){if(!n._remoteDescription)return i(s("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var o=e.sdpMLineIndex;if(e.sdpMid)for(var l=0;l<n.transceivers.length;l++)if(n.transceivers[l].mid===e.sdpMid){o=l;break}var c=n.transceivers[o];if(!c)return i(s("OperationError","Can not add ICE candidate"));if(c.rejected)return r();var d=Object.keys(e.candidate).length>0?u.parseCandidate(e.candidate):{};if("tcp"===d.protocol&&(0===d.port||9===d.port))return r();if(d.component&&1!==d.component)return r();if((0===o||o>0&&c.iceTransport!==n.transceivers[0].iceTransport)&&!a(c.iceTransport,d))return i(s("OperationError","Can not add ICE candidate"));var f=e.candidate.trim();0===f.indexOf("a=")&&(f=f.substr(2)),(t=u.getMediaSections(n._remoteDescription.sdp))[o]+="a="+(d.type?f:"end-of-candidates")+"\r\n",n._remoteDescription.sdp=u.getDescription(n._remoteDescription.sdp)+t.join("")}else for(var h=0;h<n.transceivers.length&&(n.transceivers[h].rejected||(n.transceivers[h].iceTransport.addRemoteCandidate({}),(t=u.getMediaSections(n._remoteDescription.sdp))[h]+="a=end-of-candidates\r\n",n._remoteDescription.sdp=u.getDescription(n._remoteDescription.sdp)+t.join(""),!n.usingBundle));h++);r()}))},d.prototype.getStats=function(t){if(t&&t instanceof e.MediaStreamTrack){var n=null;if(this.transceivers.forEach((function(e){e.rtpSender&&e.rtpSender.track===t?n=e.rtpSender:e.rtpReceiver&&e.rtpReceiver.track===t&&(n=e.rtpReceiver)})),!n)throw s("InvalidAccessError","Invalid selector.");return n.getStats()}var r=[];return this.transceivers.forEach((function(e){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach((function(t){e[t]&&r.push(e[t].getStats())}))})),Promise.all(r).then((function(e){var t=new Map;return e.forEach((function(e){e.forEach((function(e){t.set(e.id,e)}))})),t}))},["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"].forEach((function(t){var n=e[t];if(n&&n.prototype&&n.prototype.getStats){var r=n.prototype.getStats;n.prototype.getStats=function(){return r.apply(this).then((function(e){var t=new Map;return Object.keys(e).forEach((function(n){e[n].type=function(e){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type}(e[n]),t.set(n,e[n])})),t}))}}}));var f=["createOffer","createAnswer"];return f.forEach((function(e){var t=d.prototype[e];d.prototype[e]=function(){var e=arguments;return"function"==typeof e[0]||"function"==typeof e[1]?t.apply(this,[arguments[2]]).then((function(t){"function"==typeof e[0]&&e[0].apply(null,[t])}),(function(t){"function"==typeof e[1]&&e[1].apply(null,[t])})):t.apply(this,arguments)}})),(f=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach((function(e){var t=d.prototype[e];d.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]||"function"==typeof e[2]?t.apply(this,arguments).then((function(){"function"==typeof e[1]&&e[1].apply(null)}),(function(t){"function"==typeof e[2]&&e[2].apply(null,[t])})):t.apply(this,arguments)}})),["getStats"].forEach((function(e){var t=d.prototype[e];d.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]?t.apply(this,arguments).then((function(){"function"==typeof e[1]&&e[1].apply(null)})):t.apply(this,arguments)}})),d}},{sdp:17}],17:[function(e,t,n){"use strict";var r={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};r.localCName=r.generateIdentifier(),r.splitLines=function(e){return e.trim().split("\n").map((function(e){return e.trim()}))},r.splitSections=function(e){return e.split("\nm=").map((function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"}))},r.getDescription=function(e){var t=r.splitSections(e);return t&&t[0]},r.getMediaSections=function(e){var t=r.splitSections(e);return t.shift(),t},r.matchPrefix=function(e,t){return r.splitLines(e).filter((function(e){return 0===e.indexOf(t)}))},r.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:n[t[r]]=t[r+1]}return n},r.writeCandidate=function(e){var t=[];t.push(e.foundation),t.push(e.component),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);var n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},r.parseIceOptions=function(e){return e.substr(14).split(" ")},r.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},r.writeRtpMap=function(e){var t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);var n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},r.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},r.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},r.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),i=0;i<r.length;i++)n[(t=r[i].trim().split("="))[0].trim()]=t[1];return n},r.writeFmtp=function(e){var t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var r=[];Object.keys(e.parameters).forEach((function(t){e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)})),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},r.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},r.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},r.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},r.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},r.getMid=function(e){var t=r.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},r.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},r.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:r.matchPrefix(e+t,"a=fingerprint:").map(r.parseFingerprint)}},r.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach((function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),n},r.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},r.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?r.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},r.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},r.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},r.getCryptoParameters=function(e,t){return r.matchPrefix(e+t,"a=crypto:").map(r.parseCryptoLine)},r.getIceParameters=function(e,t){var n=r.matchPrefix(e+t,"a=ice-ufrag:")[0],i=r.matchPrefix(e+t,"a=ice-pwd:")[0];return n&&i?{usernameFragment:n.substr(12),password:i.substr(10)}:null},r.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},r.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e)[0].split(" "),i=3;i<n.length;i++){var o=n[i],a=r.matchPrefix(e,"a=rtpmap:"+o+" ")[0];if(a){var s=r.parseRtpMap(a),u=r.matchPrefix(e,"a=fmtp:"+o+" ");switch(s.parameters=u.length?r.parseFmtp(u[0]):{},s.rtcpFeedback=r.matchPrefix(e,"a=rtcp-fb:"+o+" ").map(r.parseRtcpFb),t.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":t.fecMechanisms.push(s.name.toUpperCase())}}}return r.matchPrefix(e,"a=extmap:").forEach((function(e){t.headerExtensions.push(r.parseExtmap(e))})),t},r.writeRtpDescription=function(e,t){var n="";n+="m="+e+" ",n+=t.codecs.length>0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach((function(e){n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)}));var i=0;return t.codecs.forEach((function(e){e.maxptime>i&&(i=e.maxptime)})),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions&&t.headerExtensions.forEach((function(e){n+=r.writeExtmap(e)})),n},r.parseRtpEncodingParameters=function(e){var t,n=[],i=r.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),a=-1!==i.fecMechanisms.indexOf("ULPFEC"),s=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute})),u=s.length>0&&s[0].ssrc,l=r.matchPrefix(e,"a=ssrc-group:FID").map((function(e){return e.substr(17).split(" ").map((function(e){return parseInt(e,10)}))}));l.length>0&&l[0].length>1&&l[0][0]===u&&(t=l[0][1]),i.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var r={ssrc:u,codecPayloadType:parseInt(e.parameters.apt,10)};u&&t&&(r.rtx={ssrc:t}),n.push(r),o&&((r=JSON.parse(JSON.stringify(r))).fec={ssrc:u,mechanism:a?"red+ulpfec":"red"},n.push(r))}})),0===n.length&&u&&n.push({ssrc:u});var c=r.matchPrefix(e,"b=");return c.length&&(c=0===c[0].indexOf("b=TIAS:")?parseInt(c[0].substr(7),10):0===c[0].indexOf("b=AS:")?1e3*parseInt(c[0].substr(5),10)*.95-16e3:void 0,n.forEach((function(e){e.maxBitrate=c}))),n},r.parseRtcpParameters=function(e){var t={},n=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var i=r.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=i.length>0,t.compound=0===i.length;var o=r.matchPrefix(e,"a=rtcp-mux");return t.mux=o.length>0,t},r.parseMsid=function(e){var t,n=r.matchPrefix(e,"a=msid:");if(1===n.length)return{stream:(t=n[0].substr(7).split(" "))[0],track:t[1]};var i=r.matchPrefix(e,"a=ssrc:").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));return i.length>0?{stream:(t=i[0].value.split(" "))[0],track:t[1]}:void 0},r.parseSctpDescription=function(e){var t,n=r.parseMLine(e),i=r.matchPrefix(e,"a=max-message-size:");i.length>0&&(t=parseInt(i[0].substr(19),10)),isNaN(t)&&(t=65536);var o=r.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substr(12),10),protocol:n.fmt,maxMessageSize:t};if(r.matchPrefix(e,"a=sctpmap:").length>0){var a=r.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(a[0],10),protocol:a[1],maxMessageSize:t}}},r.writeSctpDescription=function(e,t){var n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},r.generateSessionId=function(){return Math.random().toString().substr(2,21)},r.writeSessionBoilerplate=function(e,t,n){var i=void 0!==t?t:2;return"v=0\r\no="+(n||"thisisadapterortc")+" "+(e||r.generateSessionId())+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},r.writeMediaSection=function(e,t,n,i){var o=r.writeRtpDescription(e.kind,t);if(o+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",e.direction?o+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?o+="a=sendrecv\r\n":e.rtpSender?o+="a=sendonly\r\n":e.rtpReceiver?o+="a=recvonly\r\n":o+="a=inactive\r\n",e.rtpSender){var a="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+a,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),o},r.getDirection=function(e,t){for(var n=r.splitLines(e),i=0;i<n.length;i++)switch(n[i]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[i].substr(2)}return t?r.getDirection(t):"sendrecv"},r.getKind=function(e){return r.splitLines(e)[0].split(" ")[0].substr(2)},r.isRejected=function(e){return"0"===e.split(" ",2)[1]},r.parseMLine=function(e){var t=r.splitLines(e)[0].substr(2).split(" ");return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(" ")}},r.parseOLine=function(e){var t=r.matchPrefix(e,"o=")[0].substr(2).split(" ");return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}},r.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;for(var t=r.splitLines(e),n=0;n<t.length;n++)if(t[n].length<2||"="!==t[n].charAt(1))return!1;return!0},"object"==typeof t&&(t.exports=r)},{}]},{},[1])(1)})),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).videojsFlvjs=e()}}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(e){return e&&e.__esModule?e:{default:e}}("undefined"!=typeof window?window.videojs:void 0!==e?e.videojs:null),o=i.default.getTech("Html5"),a=i.default.mergeOptions||i.default.util.mergeOptions,s={dataInterval:3e3},u=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=a(s,e),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:"setSrc",value:function(e){var t=this,n=!!this.options_.debug;this.options_.autoplay,this.debug=n;var r=this.options_.dataInterval;n&&console.log("rtc debug on"),this.src=e,this.stream=new MediaStream,this.pc=new RTCPeerConnection,this.pc.ontrack=function(e){t.stream.addTrack(e.track),t.el_.srcObject!=t.stream&&(t.el_.srcObject=t.stream),n&&console.log(e.streams.length,"track",e.track.kind,"is delivered")},this.pc.oniceconnectionstatechange=function(e){"disconnected"==t.pc.iceConnectionState&&t.sendChannelTicker&&(t.eventBusEl_&&t.trigger({type:"error",name:"ice disconnected"}),clearInterval(t.sendChannelTicker),t.sendChannelTicker=0),n&&console.log("ice connection state change: "+t.pc.iceConnectionState)},this.sendChannel=this.pc.createDataChannel("keepalive"),this.sendChannel.onclose=function(){t.sendChannelTicker&&(t.eventBusEl_&&t.trigger({type:"error",name:"send channel closed"}),clearInterval(t.sendChannelTicker),t.sendChannelTicker=0),n&&console.log("sendChannel has closed")},this.sendChannel.onopen=function(){n&&console.log("sendChannel has opened"),t.sendChannel.send("ping"),t.sendChannelTicker=setInterval((function(){n&&console.log("sendChannel ping..."),t.sendChannel.send("ping")}),r)},this.sendChannel.onmessage=function(e){n&&console.log("sendChannel message",e.data)},this.pc.createOffer({offerToReceiveVideo:!0,offerToReceiveAudio:!0}).then((function(r){t.pc.setLocalDescription(r).then((function(){var r=new XMLHttpRequest;r.open("POST",e.replace("webrtc","http"),!0),r.onreadystatechange=function(){if(4==r.readyState)if(r.status>=200&&r.status<300||304===r.status)try{t.pc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:atob(r.responseText)}))}catch(e){t.eventBusEl_&&t.trigger({type:"error",name:"set rtc remote sdp failed"}),n&&console.log("set rtc remote sdp error",e)}else t.eventBusEl_&&t.trigger({type:"error",name:"post rtc status "+r.status}),n&&console.log("post rtc status",r.status,r.statusText)},r.send(btoa(t.pc.localDescription.sdp))})).catch((function(e){n&&console.log("pc setLocalDescription error",e)}))})).catch((function(e){n&&console.log("pc createOffer error",e)}))}},{key:"dispose",value:function(){this.debug&&console.log("rtc dispose"),this.sendChannelTicker&&(clearInterval(this.sendChannelTicker),this.sendChannelTicker=0),this.sendChannel&&(this.sendChannel.close(),this.sendChannel=null),this.pc&&(this.pc.close(),this.pc=null),this.el_.srcObject&&(this.el_.srcObject=null),r(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"dispose",this).call(this)}},{key:"reload",value:function(){this.sendChannelTicker&&(clearInterval(this.sendChannelTicker),this.sendChannelTicker=0),this.sendChannel&&(this.sendChannel.close(),this.sendChannel=null),this.pc&&(this.pc.close(),this.pc=null),this.el_.srcObject&&(this.el_.srcObject=null),this.src?this.setSrc(this.src):this.debug&&console.log("reload error, src not found")}}]),n}(o);u.isSupported=function(){return!!window.RTCPeerConnection},u.formats={"video/webrtc":"RTC"},u.canPlayType=function(e){return u.isSupported()?"maybe":""},u.canPlaySource=function(e,t){return u.canPlayType(e.type)},u.VERSION="0.2.0",i.default.registerTech("Webrtc",u),n.default=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)})),function(){"use strict";var e;e=void 0===window.videojs&&"function"==typeof require?require("video.js"):window.videojs,function(e,t){function n(e,t,n,r){return o={label:n,sources:t},"function"==typeof r?r(e,t,n):e.src(t.map((function(e){return{src:e.src,type:e.type,res:e.res}})))}var r,i={},o={},a={},s=t.getComponent("MenuItem"),u=t.extend(s,{constructor:function(e,t,n,r){this.onClickListener=n,this.label=r,s.call(this,e,t),this.src=t.src,this.on("click",this.onClick),this.on("touchstart",this.onClick),t.initialySelected&&(this.showAsLabel(),this.selected(!0),this.addClass("vjs-selected"))},showAsLabel:function(){this.label&&(this.label.innerHTML=this.options_.label)},onClick:function(e){this.onClickListener(this);var t=this.player_.currentTime(),r=this.player_.paused();this.showAsLabel(),this.addClass("vjs-selected"),r||this.player_.bigPlayButton.hide(),"function"!=typeof e&&"function"==typeof this.options_.customSourcePicker&&(e=this.options_.customSourcePicker);var i="loadeddata";"Youtube"!==this.player_.techName_&&"none"===this.player_.preload()&&"Flash"!==this.player_.techName_&&(i="timeupdate"),n(this.player_,this.src,this.options_.label,e),this.player_.one(i,(function(){this.player_.currentTime(t),this.player_.handleTechSeeked_(),this.player_.trigger("resolutionchange")}))}}),l=t.getComponent("MenuButton"),c=t.extend(l,{constructor:function(e,n,r,i){if(this.sources=n.sources,this.label=i,this.label.innerHTML=n.initialySelectedLabel,l.call(this,e,n,r),this.controlText("Quality"),r.dynamicLabel)this.el().appendChild(i);else{var o=document.createElement("span");t.dom.addClass(o,"vjs-resolution-button-staticlabel"),this.el().appendChild(o)}},createItems:function(){var e=[],t=this.sources&&this.sources.label||{},n=function(t){e.map((function(e){e.selected(e===t),e.removeClass("vjs-selected")}))};for(var r in t)t.hasOwnProperty(r)&&(e.push(new u(this.player_,{label:r,src:t[r],initialySelected:r===this.options_.initialySelectedLabel,customSourcePicker:this.options_.customSourcePicker},n,this.label)),a[r]=e[e.length-1]);return e}});r=function(e){function r(e,t){return e.res&&t.res?+t.res-+e.res:0}function s(e){var t={label:{},res:{},type:{}};return e.map((function(e){u(t,"label",e),u(t,"res",e),u(t,"type",e),l(t,"label",e),l(t,"res",e),l(t,"type",e)})),t}function u(e,t,n){null==e[t][n[t]]&&(e[t][n[t]]=[])}function l(e,t,n){e[t][n[t]].push(n)}var d=t.mergeOptions(i,e),f=this,h=document.createElement("span"),p={};t.dom.addClass(h,"vjs-menu"),t.browser.IE_VERSION?t.dom.addClass(h,"vjs-resolution-button-label-ie"):t.dom.addClass(h,"vjs-resolution-button-label"),f.updateSrc=function(e){if(!e)return f.src();f.controlBar.resolutionSwitcher&&(f.controlBar.resolutionSwitcher.dispose(),delete f.controlBar.resolutionSwitcher),e=e.sort(r);var i=function(e,t){var n=d.default,r="";return"high"===n?(n=t[0].res,r=t[0].label):"low"!==n&&null!=n&&e.res[n]?e.res[n]&&(r=e.res[n][0].label):(n=t[t.length-1].res,r=t[t.length-1].label),{res:n,label:r,sources:e.res[n]}}(p=s(e),e),o=new c(f,{sources:p,initialySelectedLabel:i.label,initialySelectedRes:i.res,customSourcePicker:d.customSourcePicker},d,h);return t.dom.addClass(o.el(),"vjs-resolution-button"),f.controlBar.resolutionSwitcher=f.controlBar.el_.insertBefore(o.el_,f.controlBar.getChild("fullscreenToggle").el_),f.controlBar.resolutionSwitcher.dispose=function(){this.parentNode.removeChild(this)},n(f,i.sources,i.label)},f.currentResolution=function(e,t){return null==e?o:(null!=a[e]&&a[e].onClick(t),f)},f.getGroupedSrc=function(){return p},f.ready((function(){f.options_.sources.length>1&&f.updateSrc(f.options_.sources),"Youtube"===f.techName_&&function(e){e.tech_.ytPlayer.setPlaybackQuality("default"),e.tech_.ytPlayer.addEventListener("onPlaybackQualityChange",(function(){e.trigger("resolutionchange")})),e.one("play",(function(){var t=e.tech_.ytPlayer.getAvailableQualityLevels(),n={highres:{res:1080,label:"1080",yt:"highres"},hd1080:{res:1080,label:"1080",yt:"hd1080"},hd720:{res:720,label:"720",yt:"hd720"},large:{res:480,label:"480",yt:"large"},medium:{res:360,label:"360",yt:"medium"},small:{res:240,label:"240",yt:"small"},tiny:{res:144,label:"144",yt:"tiny"},auto:{res:0,label:"auto",yt:"default"}},r=[];t.map((function(t){r.push({src:e.src().src,type:e.src().type,label:n[t].label,res:n[t].res,_yt:n[t].yt})}));var i="auto",o=0,a=((p=s(r)).label.auto,new c(e,{sources:p,initialySelectedLabel:i,initialySelectedRes:o,customSourcePicker:function(t,n,r){return e.tech_.ytPlayer.setPlaybackQuality(n[0]._yt),e}},d,h));a.el().classList.add("vjs-resolution-button"),e.controlBar.resolutionSwitcher=e.controlBar.addChild(a)}))}(f)}))},t.registerPlugin("videoJsResolutionSwitcher",r)}(window,e)}(),function(e,t){"undefined"!=typeof window&&window.videojs?t(window.videojs):"function"==typeof define&&define.amd?define("videojs-hotkeys",["video.js"],(function(e){return t(e.default||e)})):"undefined"!=typeof module&&module.exports&&(module.exports=t(require("video.js")))}(0,(function(e){"use strict";"undefined"!=typeof window&&(window.videojs_hotkeys={version:"0.2.22"});(e.registerPlugin||e.plugin)("hotkeys",(function(t){function n(e){return"function"==typeof l?l(e):l}var r=this,i=r.el(),o=document,a={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:function(e){return 32===e.which||179===e.which},rewindKey:function(e){return 37===e.which||177===e.which},forwardKey:function(e){return 39===e.which||176===e.which},volumeUpKey:function(e){return 38===e.which},volumeDownKey:function(e){return 40===e.which},muteKey:function(e){return 77===e.which},fullscreenKey:function(e){return 70===e.which},customKeys:{}},s=e.mergeOptions||e.util.mergeOptions,u=(t=s(a,t||{})).volumeStep,l=t.seekStep,c=t.enableMute,d=t.enableVolumeScroll,f=t.enableFullscreen,h=t.enableNumbers,p=t.enableJogStyle,v=t.alwaysCaptureHotkeys,m=t.enableModifiersForNumbers,g=t.enableInactiveFocus,y=t.skipInitialFocus;i.hasAttribute("tabIndex")||i.setAttribute("tabIndex","-1"),i.style.outline="none",!v&&r.autoplay()||y||r.one("play",(function(){i.focus({preventScroll:!0})})),g&&r.on("userinactive",(function(){var e=function(){clearTimeout(t)},t=setTimeout((function(){r.off("useractive",e);var t=o.activeElement,n=i.querySelector(".vjs-control-bar");t&&t.parentElement==n&&i.focus()}),10);r.one("useractive",e)})),r.on("play",(function(){var e=i.querySelector(".iframeblocker");e&&""===e.style.display&&(e.style.display="block",e.style.bottom="39px")}));var _=function(e){if(r.controls()){var t=o.activeElement;if((v||t==i||t==i.querySelector(".vjs-tech")||t==i.querySelector(".iframeblocker")||t==i.querySelector(".vjs-control-bar"))&&d){e=window.event||e;var n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==n?r.volume(r.volume()+u):-1==n&&r.volume(r.volume()-u)}}},b=function(e,n){return t.playPauseKey(e,n)?1:t.rewindKey(e,n)?2:t.forwardKey(e,n)?3:t.volumeUpKey(e,n)?4:t.volumeDownKey(e,n)?5:t.muteKey(e,n)?6:t.fullscreenKey(e,n)?7:void 0};return r.on("keydown",(function(e){var a,s,l=e.which,d=e.preventDefault,g=r.duration();if(r.controls()){var y=o.activeElement;if(v||y==i||y==i.querySelector(".vjs-tech")||y==i.querySelector(".vjs-control-bar")||y==i.querySelector(".iframeblocker"))switch(b(e,r)){case 1:d(),v&&e.stopPropagation(),r.paused()?r.play():r.pause();break;case 2:a=!r.paused(),d(),a&&r.pause(),(s=r.currentTime()-n(e))<=0&&(s=0),r.currentTime(s),a&&r.play();break;case 3:a=!r.paused(),d(),a&&r.pause(),(s=r.currentTime()+n(e))>=g&&(s=a?g-.001:g),r.currentTime(s),a&&r.play();break;case 5:d(),p?(s=r.currentTime()-1,r.currentTime()<=1&&(s=0),r.currentTime(s)):r.volume(r.volume()-u);break;case 4:d(),p?((s=r.currentTime()+1)>=g&&(s=g),r.currentTime(s)):r.volume(r.volume()+u);break;case 6:c&&r.muted(!r.muted());break;case 7:f&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen());break;default:if((l>47&&l<59||l>95&&l<106)&&(m||!(e.metaKey||e.ctrlKey||e.altKey))&&h){var _=48;l>95&&(_=96);var S=l-_;d(),r.currentTime(r.duration()*S*.1)}for(var T in t.customKeys){var w=t.customKeys[T];w&&w.key&&w.handler&&w.key(e)&&(d(),w.handler(r,t,e))}}}})),r.on("mousewheel",_),r.on("DOMMouseScroll",_),this}))})),function(e){e.URL=e.URL||e.webkitURL,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var t=function(t,n){(n=n||{}).sampleBits=n.sampleBits||8,n.sampleRate=n.sampleRate||8e3;var r=new(e.webkitAudioContext||e.AudioContext),i=r.createMediaStreamSource(t),o=(r.createScriptProcessor||r.createJavaScriptNode).apply(r,[4096,1,1]),a=!1,s={size:0,buffer:[],inputSampleRate:r.sampleRate,inputSampleBits:16,outputSampleRate:n.sampleRate,oututSampleBits:n.sampleBits,input:function(e){this.buffer.push(new Float32Array(e)),this.size+=e.length,n.pcmCallback&&(n.pcmCallback(this.encodePCM()),this.buffer.splice(0,this.size),this.size=0)},compress:function(){for(var e=new Float32Array(this.size),t=0,n=0;n<this.buffer.length;n++)e.set(this.buffer[n],t),t+=this.buffer[n].length;for(var r=parseInt(this.inputSampleRate/this.outputSampleRate),i=e.length/r,o=new Float32Array(i),a=0,s=0;a<i;)o[a]=e[s],s+=r,a++;return o},encodePCM:function(){var e=Math.min(this.inputSampleBits,this.oututSampleBits),t=this.compress(),n=t.length*(e/8),r=new ArrayBuffer(n),i=new DataView(r),o=0;if(8===e)for(var a=0;a<t.length;a++,o++){var s=(u=Math.max(-1,Math.min(1,t[a])))<0?32768*u:32767*u;s=parseInt(255/(65535/(s+32768))),i.setInt8(o,s,!0)}else for(a=0;a<t.length;a++,o+=2){var u=Math.max(-1,Math.min(1,t[a]));i.setInt16(o,u<0?32768*u:32767*u,!0)}return new Blob([i],{type:"audio/pcm"})},encodeWAV:function(){var e=Math.min(this.inputSampleRate,this.outputSampleRate),t=Math.min(this.inputSampleBits,this.oututSampleBits),n=this.compress(),r=n.length*(t/8),i=new ArrayBuffer(44+r),o=new DataView(i),a=0,s=function(e){for(var t=0;t<e.length;t++)o.setUint8(a+t,e.charCodeAt(t))};if(s("RIFF"),a+=4,o.setUint32(a,36+r,!0),a+=4,s("WAVE"),a+=4,s("fmt "),a+=4,o.setUint32(a,16,!0),a+=4,o.setUint16(a,1,!0),a+=2,o.setUint16(a,1,!0),a+=2,o.setUint32(a,e,!0),a+=4,o.setUint32(a,1*e*(t/8),!0),a+=4,o.setUint16(a,t/8*1,!0),a+=2,o.setUint16(a,t,!0),a+=2,s("data"),a+=4,o.setUint32(a,r,!0),a+=4,8===t)for(var u=0;u<n.length;u++,a++){var l=(c=Math.max(-1,Math.min(1,n[u])))<0?32768*c:32767*c;l=parseInt(255/(65535/(l+32768))),o.setInt8(a,l,!0)}else for(u=0;u<n.length;u++,a+=2){var c=Math.max(-1,Math.min(1,n[u]));o.setInt16(a,c<0?32768*c:32767*c,!0)}return new Blob([o],{type:"audio/wav"})}};this.start=function(){a||(i.connect(o),o.connect(r.destination),a=!0)},this.stop=function(){a&&(o.disconnect(),a=!1)},this.destroy=function(){this.stop(),r&&(r.close(),r=null)},this.getBlob=function(){return this.stop(),s.encodeWAV()},this.getPCMBlob=function(){return this.stop(),s.encodePCM()},this.play=function(t){t.src=e.URL.createObjectURL(this.getBlob())},this.recording=function(){return a},this.upload=function(e,t){var n=new FormData;n.append("audioData",this.getBlob()),n.append("pcmData",this.getPCMBlob());var r=new XMLHttpRequest;t&&(r.upload.addEventListener("progress",(function(e){t("uploading",e)}),!1),r.addEventListener("load",(function(e){t("ok",e)}),!1),r.addEventListener("error",(function(e){t("error",e)}),!1),r.addEventListener("abort",(function(e){t("cancel",e)}),!1)),r.open("POST",e),r.send(n)},o.onaudioprocess=function(e){s.input(e.inputBuffer.getChannelData(0))}};t.canRecording=null!=navigator.getUserMedia,t.get=function(e,n){if(e){if(!navigator.getUserMedia)return"https:"!=String(location.protocol).toLowerCase()?void e(null,"当前浏览器不支持录音功能, 请确认当前是否访问 HTTPS 服务!"):void e(null,"当前浏览器不支持录音功能。");navigator.getUserMedia({audio:!0},(function(r){var i=new t(r,n);e(i,null)}),(function(t){switch(t.name||t.code){case"PERMISSION_DENIED":case"PermissionDeniedError":e(null,"用户拒绝提供信息。");break;case"NOT_SUPPORTED_ERROR":case"NotSupportedError":e(null,"浏览器不支持硬件设备。");break;case"MANDATORY_UNSATISFIED_ERROR":case"MandatoryUnsatisfiedError":e(null,"无法发现指定的硬件设备。");break;default:e(null,"无法打开麦克风。异常信息:"+(t.name||t.code))}}))}},e.LiveRecorder=t}(window),videojs.addLanguage("zh-CN",{Play:"播放",Pause:"暂停","Current Time":"当前时间",Duration:"时长","Remaining Time":"剩余时间","Stream Type":"媒体流类型",LIVE:"直播",Loaded:"加载完毕",Progress:"进度",Fullscreen:"全屏","Non-Fullscreen":"退出全屏",Mute:"静音",Unmute:"取消静音","Playback Rate":"播放速度",Subtitles:"字幕","subtitles off":"关闭字幕",Captions:"内嵌字幕","captions off":"关闭内嵌字幕",Chapters:"节目段落","Close Modal Dialog":"关闭弹窗",Descriptions:"描述","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":"播放视频",Close:"关闭","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":"视频播放器",Replay:"重播","Progress Bar":"进度条","Volume Level":"音量","subtitles settings":"字幕设定","descriptions settings":"描述设定",Text:"文字",White:"白",Black:"黑",Red:"红",Green:"绿",Blue:"蓝",Yellow:"黄",Magenta:"紫红",Cyan:"青",Background:"背景",Window:"视窗",Transparent:"透明","Semi-Transparent":"半透明",Opaque:"不透明","Font Size":"字体尺寸","Text Edge Style":"字体边缘样式",None:"无",Raised:"浮雕",Depressed:"压低",Uniform:"均匀",Dropshadow:"下阴影","Font Family":"字体库","Proportional Sans-Serif":"比例无细体","Monospace Sans-Serif":"单间隔无细体","Proportional Serif":"比例细体","Monospace Serif":"单间隔细体",Casual:"舒适",Script:"手写体","Small Caps":"小型大写字体",Reset:"重置","restore all settings to the default values":"恢复全部设定至预设值",Done:"完成","Caption Settings Dialog":"字幕设定视窗","Beginning of dialog window. Escape will cancel and close the window.":"开始对话视窗。离开会取消及关闭视窗","End of dialog window.":"结束对话视窗","Seek to live, currently behind live":"试图直播,当前延时播放","Seek to live, currently playing live":"试图直播,当前实时播放","progress bar timing: currentTime={1} duration={2}":"{1}/{2}","{1} is loading.":"正在加载 {1}。","Picture-in-Picture":"画中画","Exit Picture-in-Picture":"退出画中画",Snapshot:"截图",STD:"标准",STR:"拉伸","Click switch to standard display":"点击切换到标准显示","Click switch to stretch display":"点击切换到拉伸显示",Fluent:"流畅",Fast:"极速","Click switch to fast play":"点击切换到极速播放","Click switch to fluent play":"点击切换到流畅播放"}),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"+0kC":function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},"+VX4":function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},"+WbQ":function(e,t,n){"use strict";var r=n("CzRT"),i=n("u4vu"),o=n("Jt9q"),a=n("g5pV")("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},"+bx0":function(e,t,n){"use strict";var r=n("CzRT"),i=n("Jt9q"),o=n("PYqL"),a=n("+izM"),s=n("Bl3t"),u=n("b0Vn"),l=n("CSYH"),c=n("i1r4"),d=n("IS5P"),f=n("IBxK"),h=n("y4VI"),p=n("Idnr").f,v=n("u4vu").f,m=n("p0CF"),g=n("usP3"),y="ArrayBuffer",_="DataView",b="Wrong index!",S=r.ArrayBuffer,T=r.DataView,w=r.Math,k=r.RangeError,E=r.Infinity,C=S,A=w.abs,j=w.pow,x=w.floor,P=w.log,L=w.LN2,O="buffer",R="byteLength",I="byteOffset",M=i?"_b":O,D=i?"_l":R,U=i?"_o":I;function B(e,t,n){var r,i,o,a=new Array(n),s=8*n-t-1,u=(1<<s)-1,l=u>>1,c=23===t?j(2,-24)-j(2,-77):0,d=0,f=e<0||0===e&&1/e<0?1:0;for((e=A(e))!=e||e===E?(i=e!=e?1:0,r=u):(r=x(P(e)/L),e*(o=j(2,-r))<1&&(r--,o*=2),(e+=r+l>=1?c/o:c*j(2,1-l))*o>=2&&(r++,o/=2),r+l>=u?(i=0,r=u):r+l>=1?(i=(e*o-1)*j(2,t),r+=l):(i=e*j(2,l-1)*j(2,t),r=0));t>=8;a[d++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;a[d++]=255&r,r/=256,s-=8);return a[--d]|=128*f,a}function N(e,t,n){var r,i=8*n-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=n-1,l=e[u--],c=127&l;for(l>>=7;s>0;c=256*c+e[u],u--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===c)c=1-a;else{if(c===o)return r?NaN:l?-E:E;r+=j(2,t),c-=a}return(l?-1:1)*r*j(2,c-t)}function F(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function V(e){return[255&e]}function z(e){return[255&e,e>>8&255]}function H(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function G(e){return B(e,52,8)}function q(e){return B(e,23,4)}function W(e,t,n){v(e.prototype,t,{get:function(){return this[n]}})}function $(e,t,n,r){var i=h(+n);if(i+t>e[D])throw k(b);var o=e[M]._b,a=i+e[U],s=o.slice(a,a+t);return r?s:s.reverse()}function K(e,t,n,r,i,o){var a=h(+n);if(a+t>e[D])throw k(b);for(var s=e[M]._b,u=a+e[U],l=r(+i),c=0;c<t;c++)s[u+c]=l[o?c:t-c-1]}if(a.ABV){if(!l((function(){S(1)}))||!l((function(){new S(-1)}))||l((function(){return new S,new S(1.5),new S(NaN),S.name!=y}))){for(var X,Y=(S=function(e){return c(this,S),new C(h(e))}).prototype=C.prototype,Z=p(C),J=0;Z.length>J;)(X=Z[J++])in S||s(S,X,C[X]);o||(Y.constructor=S)}var Q=new T(new S(2)),ee=T.prototype.setInt8;Q.setInt8(0,2147483648),Q.setInt8(1,2147483649),!Q.getInt8(0)&&Q.getInt8(1)||u(T.prototype,{setInt8:function(e,t){ee.call(this,e,t<<24>>24)},setUint8:function(e,t){ee.call(this,e,t<<24>>24)}},!0)}else S=function(e){c(this,S,y);var t=h(e);this._b=m.call(new Array(t),0),this[D]=t},T=function(e,t,n){c(this,T,_),c(e,S,_);var r=e[D],i=d(t);if(i<0||i>r)throw k("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw k("Wrong length!");this[M]=e,this[U]=i,this[D]=n},i&&(W(S,R,"_l"),W(T,O,"_b"),W(T,R,"_l"),W(T,I,"_o")),u(T.prototype,{getInt8:function(e){return $(this,1,e)[0]<<24>>24},getUint8:function(e){return $(this,1,e)[0]},getInt16:function(e){var t=$(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=$(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return F($(this,4,e,arguments[1]))},getUint32:function(e){return F($(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return N($(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return N($(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){K(this,1,e,V,t)},setUint8:function(e,t){K(this,1,e,V,t)},setInt16:function(e,t){K(this,2,e,z,t,arguments[2])},setUint16:function(e,t){K(this,2,e,z,t,arguments[2])},setInt32:function(e,t){K(this,4,e,H,t,arguments[2])},setUint32:function(e,t){K(this,4,e,H,t,arguments[2])},setFloat32:function(e,t){K(this,4,e,q,t,arguments[2])},setFloat64:function(e,t){K(this,8,e,G,t,arguments[2])}});g(S,y),g(T,_),s(T.prototype,a.VIEW,!0),t.ArrayBuffer=S,t.DataView=T},"+izM":function(e,t,n){for(var r,i=n("CzRT"),o=n("Bl3t"),a=n("2LOv"),s=a("typed_array"),u=a("view"),l=!(!i.ArrayBuffer||!i.DataView),c=l,d=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(r=i[f[d++]])?(o(r.prototype,s,!0),o(r.prototype,u,!0)):c=!1;e.exports={ABV:l,CONSTR:c,TYPED:s,VIEW:u}},"/ALM":function(e,t,n){"use strict";var r=n("gE22"),i=n("qG9X"),o=n("Gwsb"),a=n("Q+xJ"),s=n("IBxK"),u=n("9Bdx"),l=n("A1Nh"),c=n("CSYH"),d=Math.min,f=[].push,h=4294967295,p=!c((function(){RegExp(h,"y")}));n("xG+P")("split",2,(function(e,t,n,c){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var o,a,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,p=void 0===t?h:t>>>0,v=new RegExp(e.source,c+"g");(o=l.call(v,i))&&!((a=v.lastIndex)>d&&(u.push(i.slice(d,o.index)),o.length>1&&o.index<i.length&&f.apply(u,o.slice(1)),s=o[0].length,d=a,u.length>=p));)v.lastIndex===o.index&&v.lastIndex++;return d===i.length?!s&&v.test("")||u.push(""):u.push(i.slice(d)),u.length>p?u.slice(0,p):u}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):v.call(String(i),n,r)},function(e,t){var r=c(v,e,this,t,v!==n);if(r.done)return r.value;var l=i(e),f=String(this),m=o(l,RegExp),g=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(p?"y":"g"),_=new m(p?l:"^(?:"+l.source+")",y),b=void 0===t?h:t>>>0;if(0===b)return[];if(0===f.length)return null===u(_,f)?[f]:[];for(var S=0,T=0,w=[];T<f.length;){_.lastIndex=p?T:0;var k,E=u(_,p?f:f.slice(T));if(null===E||(k=d(s(_.lastIndex+(p?0:T)),f.length))===S)T=a(f,T,g);else{if(w.push(f.slice(S,T)),w.length===b)return w;for(var C=1;C<=E.length-1;C++)if(w.push(E[C]),w.length===b)return w;T=S=k}}return w.push(f.slice(S)),w}]}))},"/Hwg":function(e,t,n){var r=n("6Zvs");r(r.G+r.W+r.F*!n("+izM").ABV,{DataView:n("+bx0").DataView})},"/af7":function(e,t,n){var r=n("6Zvs"),i=n("CzRT").isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},"/b8B":function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},"/bDA":function(e,t,n){var r=n("6Zvs");r(r.S,"System",{global:n("CzRT")})},"/wIV":function(e,t,n){var r=n("6Zvs"),i=n("KFv0").f,o=n("qG9X");r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(o(e),t);return!(n&&!n.configurable)&&delete e[t]}})},0:function(e,t,n){n("n0Vy"),e.exports=n("q/s7")},"0+8G":function(e,t,n){var r=n("Jt9q"),i=n("k8pk"),o=n("NHEB"),a=n("NdTx").f;e.exports=function(e){return function(t){for(var n,s=o(t),u=i(s),l=u.length,c=0,d=[];l>c;)n=u[c++],r&&!a.call(s,n)||d.push(e?[n,s[n]]:s[n]);return d}}},"0/A7":function(e,t,n){var r=n("6Zvs"),i=n("9Zdl");r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},"048k":function(e,t,n){var r=n("6Zvs"),i=n("QCSf"),o=Math.exp;r(r.S+r.F*n("CSYH")((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},"0GvP":function(e,t,n){"use strict";var r=n("6Zvs");e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},"0PKJ":function(e,t,n){"use strict";var r=n("qG9X"),i=n("IBxK"),o=n("Q+xJ"),a=n("9Bdx");n("xG+P")("match",1,(function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var u=r(e),l=String(this);if(!u.global)return a(u,l);var c=u.unicode;u.lastIndex=0;for(var d,f=[],h=0;null!==(d=a(u,l));){var p=String(d[0]);f[h]=p,""===p&&(u.lastIndex=o(l,i(u.lastIndex),c)),h++}return 0===h?null:f}]}))},"0csP":function(e,t,n){var r=n("6Zvs"),i=n("QCSf"),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},"0ct0":function(e,t,n){var r=n("zqLp");e.exports=Array.isArray||function(e){return"Array"==r(e)}},"0pJw":function(e,t,n){e.exports=n("vSEY")},"0xxC":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("IBxK"),o=n("2zQq"),a="startsWith",s="".startsWith;r(r.P+r.F*n("WBxH")(a),"String",{startsWith:function(e){var t=o(this,e,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},"19gH":function(e,t,n){var r=n("6Zvs");r(r.P,"String",{repeat:n("QiaT")})},"1EV7":function(e,t,n){var r=n("zqLp"),i=n("g5pV")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},"1GBN":function(e,t,n){var r=n("u4vu"),i=n("KFv0"),o=n("rdyb"),a=n("T9SM"),s=n("6Zvs"),u=n("XtyL"),l=n("qG9X"),c=n("nP/W");s(s.S,"Reflect",{set:function e(t,n,s){var d,f,h=arguments.length<4?t:arguments[3],p=i.f(l(t),n);if(!p){if(c(f=o(t)))return e(f,n,s,h);p=u(0)}if(a(p,"value")){if(!1===p.writable||!c(h))return!1;if(d=i.f(h,n)){if(d.get||d.set||!1===d.writable)return!1;d.value=s,r.f(h,n,d)}else r.f(h,n,u(0,s));return!0}return void 0!==p.set&&(p.set.call(h,s),!0)}})},"1Mlq":function(e,t,n){"use strict";var r=n("MlCS");function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},"1htP":function(e,t,n){var r=n("6Zvs"),i=n("f/iY");r(r.G+r.F*(parseInt!=i),{parseInt:i})},"1tSY":function(e,t,n){n("0GvP")("WeakSet")},"29CL":function(e,t,n){n("0GvP")("Map")},"2LOv":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"2R1b":function(e,t,n){"use strict";var r=n("qG9X"),i=n("abDT"),o=n("9Bdx");n("xG+P")("search",1,(function(e,t,n,a){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),u=String(this),l=s.lastIndex;i(l,0)||(s.lastIndex=0);var c=o(s,u);return i(s.lastIndex,l)||(s.lastIndex=l),null===c?-1:c.index}]}))},"2zQq":function(e,t,n){var r=n("gE22"),i=n("OrC7");e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},"34SM":function(e,t,n){var r=n("NHEB"),i=n("KFv0").f;n("sr7R")("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},"3KC/":function(e,t,n){n("EGsU")("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},"3NoG":function(e,t,n){var r=n("6Zvs"),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},"3Op6":function(e,t,n){var r=n("lT22"),i=n("g5pV")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},"3kk6":function(e,t,n){n("Jt9q")&&"g"!=/./g.flags&&n("u4vu").f(RegExp.prototype,"flags",{configurable:!0,get:n("a/gg")})},"3oq6":function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,u=1,l={},c=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return l[u]=i,r(u),u++},f.clearImmediate=h}function h(e){delete l[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{h(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n("UywP"),n("TDnd"))},"3uIT":function(e,t,n){var r=n("6Zvs"),i=n("ez6g");r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},"3vGM":function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},"47sf":function(e,t,n){var r=n("1EV7"),i=n("g5pV")("iterator"),o=n("lT22");e.exports=n("duNF").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},"4P8B":function(e,t,n){var r=n("nP/W"),i=n("qG9X"),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n("Hk3x")(Function.call,n("KFv0").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},"4mts":function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=n("MlCS"),a=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?i:o)(n),a(r))}}})},"4rlp":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("WCZW"),o=n("gHi9"),a=n("IBxK"),s=n("MlCS"),u=n("cPKL");r(r.P,"Array",{flatMap:function(e){var t,n,r=o(this);return s(e),t=a(r.length),n=u(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n("h7JP")("flatMap")},"4vfJ":function(e,t,n){"use strict";var r=n("MlCS"),i=n("nP/W"),o=n("phgA"),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?u(t,r.length,r):o(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},"539R":function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{clamp:function(e,t,n){return Math.min(n,Math.max(t,e))}})},"56d0":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("6ap5")(3);r(r.P+r.F*!n("lbZd")([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},"58gK":function(e,t,n){var r=n("Idnr"),i=n("DClA"),o=n("qG9X"),a=n("CzRT").Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},"5BhU":function(e,t,n){"use strict";n("a2+z")("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},"5bTj":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("6ap5")(5),o="find",a=!0;o in[]&&Array(1).find((function(){a=!1})),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n("h7JP")(o)},"5i1J":function(e,t,n){"use strict";var r,i=n("CzRT"),o=n("6ap5")(0),a=n("hOgw"),s=n("SfLy"),u=n("nxVP"),l=n("GZPV"),c=n("nP/W"),d=n("Cyja"),f=n("Cyja"),h=!i.ActiveXObject&&"ActiveXObject"in i,p="WeakMap",v=s.getWeak,m=Object.isExtensible,g=l.ufstore,y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},_={get:function(e){if(c(e)){var t=v(e);return!0===t?g(d(this,p)).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(d(this,p),e,t)}},b=e.exports=n("C8qm")(p,y,_,l,!0,!0);f&&h&&(u((r=l.getConstructor(y,p)).prototype,_),s.NEED=!0,o(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];a(t,e,(function(t,i){if(c(t)&&!m(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)}))})))},"5oDD":function(e,t,n){"use strict";var r=n("CzRT"),i=n("T9SM"),o=n("zqLp"),a=n("qDq2"),s=n("XRBt"),u=n("CSYH"),l=n("Idnr").f,c=n("KFv0").f,d=n("u4vu").f,f=n("6zRk").trim,h="Number",p=r.Number,v=p,m=p.prototype,g=o(n("fuPg")(m))==h,y="trim"in String.prototype,_=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,o=(t=y?t.trim():f(t,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),l=0,c=u.length;l<c;l++)if((a=u.charCodeAt(l))<48||a>i)return NaN;return parseInt(u,r)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(g?u((function(){m.valueOf.call(n)})):o(n)!=h)?a(new v(_(t)),n,p):_(t)};for(var b,S=n("Jt9q")?l(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),T=0;S.length>T;T++)i(v,b=S[T])&&!i(p,b)&&d(p,b,c(v,b));p.prototype=m,m.constructor=p,n("hOgw")(r,h,p)}},"6ANa":function(e,t,n){"use strict";n("a2+z")("sup",(function(e){return function(){return e(this,"sup","","")}}))},"6NdC":function(e,t,n){var r=n("nP/W"),i=n("CzRT").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"6Zvs":function(e,t,n){var r=n("CzRT"),i=n("duNF"),o=n("Bl3t"),a=n("hOgw"),s=n("Hk3x"),u=function(e,t,n){var l,c,d,f,h=e&u.F,p=e&u.G,v=e&u.S,m=e&u.P,g=e&u.B,y=p?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,_=p?i:i[t]||(i[t]={}),b=_.prototype||(_.prototype={});for(l in p&&(n=t),n)d=((c=!h&&y&&void 0!==y[l])?y:n)[l],f=g&&c?s(d,r):m&&"function"==typeof d?s(Function.call,d):d,y&&a(y,l,d,e&u.U),_[l]!=d&&o(_,l,f),m&&b[l]!=d&&(b[l]=d)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},"6ap5":function(e,t,n){var r=n("Hk3x"),i=n("G5bc"),o=n("gHi9"),a=n("IBxK"),s=n("cPKL");e.exports=function(e,t){var n=1==e,u=2==e,l=3==e,c=4==e,d=6==e,f=5==e||d,h=t||s;return function(t,s,p){for(var v,m,g=o(t),y=i(g),_=r(s,p,3),b=a(y.length),S=0,T=n?h(t,b):u?h(t,0):void 0;b>S;S++)if((f||S in y)&&(m=_(v=y[S],S,g),e))if(n)T[S]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return S;case 2:T.push(v)}else if(c)return!1;return d?-1:l||c?c:T}}},"6zRk":function(e,t,n){var r=n("6Zvs"),i=n("OrC7"),o=n("CSYH"),a=n("XcOH"),s="["+a+"]",u=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),c=function(e,t,n){var i={},s=o((function(){return!!a[e]()||"
"!="
"[e]()})),u=i[e]=s?t(d):a[e];n&&(i[n]=u),r(r.P+r.F*s,"String",i)},d=c.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(l,"")),e};e.exports=c},"7ITH":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("qG9X"),o=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n("NGC/")(o,"Object",(function(){var e,t=this,n=t._k;do{if(t._i>=n.length)return{value:void 0,done:!0}}while(!((e=n[t._i++])in t._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},"7UuE":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("WCZW"),o=n("gHi9"),a=n("IBxK"),s=n("IS5P"),u=n("cPKL");r(r.P,"Array",{flatten:function(){var e=arguments[0],t=o(this),n=a(t.length),r=u(t,0);return i(r,t,t,n,0,void 0===e?1:s(e)),r}}),n("h7JP")("flatten")},"7ewW":function(e,t,n){var r,i,o,a=n("Hk3x"),s=n("phgA"),u=n("u8yI"),l=n("6NdC"),c=n("CzRT"),d=c.process,f=c.setImmediate,h=c.clearImmediate,p=c.MessageChannel,v=c.Dispatch,m=0,g={},y="onreadystatechange",_=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){_.call(e.data)};f&&h||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},h=function(e){delete g[e]},"process"==n("zqLp")(d)?r=function(e){d.nextTick(a(_,e,1))}:v&&v.now?r=function(e){v.now(a(_,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r=y in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),_.call(e)}}:function(e){setTimeout(a(_,e,1),0)}),e.exports={set:f,clear:h}},"7gar":function(e,t,n){"use strict";n("a2+z")("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},"7sMS":function(e,t,n){var r=n("6Zvs");r(r.S,"Array",{isArray:n("0ct0")})},"8zQ5":function(e,t,n){var r=n("6Zvs"),i=n("qG9X"),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},"8zpv":function(e,t,n){n("EGsU")("Uint32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},"9Bdx":function(e,t,n){"use strict";var r=n("1EV7"),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"9MEG":function(e,t,n){var r=n("6Zvs"),i=Math.imul;r(r.S+r.F*n("CSYH")((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},"9T8Z":function(e,t,n){n("EGsU")("Int32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},"9Zdl":function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},"9b2o":function(e,t,n){var r=n("6Zvs");r(r.S,"Object",{create:n("fuPg")})},A1Nh:function(e,t,n){"use strict";var r,i,o=n("a/gg"),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,l=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),l&&(t=u.lastIndex),r=a.call(u,e),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},A7sX:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},AG1B:function(e,t,n){(e.exports=n("LH+K")(void 0)).push([e.i,'.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-modal-dialog,.vjs-button>.vjs-icon-placeholder:before,.vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.vjs-button>.vjs-icon-placeholder:before{text-align:center}@font-face{font-family:VideoJS;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABDkAAsAAAAAG6gAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3hY21hcAAAAYQAAADaAAADPv749/pnbHlmAAACYAAAC3AAABHQZg6OcWhlYWQAAA3QAAAAKwAAADYZw251aGhlYQAADfwAAAAdAAAAJA+RCLFobXR4AAAOHAAAABMAAACM744AAGxvY2EAAA4wAAAASAAAAEhF6kqubWF4cAAADngAAAAfAAAAIAE0AIFuYW1lAAAOmAAAASUAAAIK1cf1oHBvc3QAAA/AAAABJAAAAdPExYuNeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS7wTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGJHcRdyA4RZgQRADK3CxEAAHic7dFZbsMgAEXRS0ycyZnnOeG7y+qC8pU1dHusIOXxuoxaOlwZYWQB0Aea4quIEN4E9LzKbKjzDeM6H/mua6Lmc/p8yhg0lvdYx15ZG8uOLQOGjMp3EzqmzJizYMmKNRu27Nhz4MiJMxeu3Ljz4Ekqm7T8P52G8PP3lnTOVk++Z6iN6QZzNN1F7ptuN7eGOjDUoaGODHVsuvU8MdTO9Hd5aqgzQ50b6sJQl4a6MtS1oW4MdWuoO0PdG+rBUI+GejLUs6FeDPVqqDdDvRvqw1CfhpqM9At0iFLaAAB4nJ1YDXBTVRZ+5/22TUlJ8we0pHlJm7RJf5O8F2j6EymlSPkpxaL8U2xpa3DKj0CBhc2IW4eWKSokIoLsuMqssM64f+jA4HSdWXXXscBq67IOs3FXZ1ZYWVyRFdo899yXtIBQZ90k7717zz3v3HPPOfd854YCCj9cL9dL0RQFOqCbGJnrHb5EayiKIWN8iA/hWBblo6hUWm8TtCDwE80WMJus/irwyxOdxeB0MDb14VNJHnXYoLLSl6FfCUYO9nYPTA8Epg9090LprfbBbZ2hY0UlJUXHQp3/vtWkS6EBv8+rPMq5u9692f/dNxJNiqwC1xPE9TCUgCsSdQWgE3XQD25lkG4CN2xmTcOXWBOyser6RN6KnGbKSbmQ3+d0OI1m2W8QzLLkI2sykrWAgJJEtA8vGGW/2Q+CmT3n8zS9wZwu2DCvtuZKZN3xkrLh36yCZuUomQSqGpY8t/25VfHVhw8z4ebGBtfLb0ya9PCaDc+8dGTvk2dsh6z7WzvowlXKUSWo9MJ15a3KrEP2loOr2Ojhw6iW6hf2BDdEccQvZGpaAy7YovSwq8kr7HGllxpd71rkS6G0Sf11sl9OvMK1+jwPPODxjUwkOim9CU3ix1wNjXDfmJSEn618Bs6lpWwUpU+8PCqLMY650zjq8VhCIP17NEKTx3eaLL+s5Pi6yJWaWjTHLR1jYzPSV9VF/6Ojdb/1kO3Mk3uhHC0x6gc1BjlKQ+nQFxTYdaJkZ7ySVxLBbhR1dsboNXp1tCYKW2LRaEzpYcIx2BKNxaL0ZaUnSqfFoiNhHKR/GkX6PWUSAaJelQaqZL1EpoHNsajSEyPSoJ9IjhIxTdjHLmwZvhRDOiFTY/YeQnvrVZmiTQtGncECXtFTBZLOVwwMRgoXHAkXzMzPn1nAJJ8jYSbMDaqN2waGLzNhih/bZynUBMpIWSg7VYi7DRx2m8ALkIdRCJwI6ArJx2EI8kaDWeTQKeAFk9fjl/1AvwktjQ1P7NjyMGQyfd4vjipX6M/i52D7Cq80kqlcxEcGXRr/FEcgs0u5uGgB4VWuMFfpdn2Re6Hi3PqzmxWKsz6+ae2Pn9hXXw/fqM859UiGC0oKYYILJBqJrsn1Z1E5qOs9rQCiUQRREjm8yJcbHF5cUJufX1vAHlefw0XgUoboS3ETfQlTxBC4SOtuE8VPRJTBSCQSjZCpk7Gqzu+masaZ2y7Zjehho4F3g82BNDkAHpORG4+OCS+f6JTPmtRn/PH1kch6d04sp7AQb25aQ/pqUyXeQ8vrebG8OYQdXOQ+585u0sdW9rqalzRURiJ+9F4MweRFrKUjl1GUYhH1A27WOHw5cTFSFPMo9EeUIGnQTZHIaJ7AHLaOKsOODaNF9jkBjYG2QEsQ2xjMUAx2bBEbeTBWMHwskBjngq56S/yfgkBnWBa4K9sqKtq2t1UI8S9He5XuBRbawAdatrQEAi30Aks2+LM8WeCbalVZkWNylvJ+dqJnzVb+OHlSoKW8nPCP7Rd+CcZ2DdWAGqJ2CBFOphgywFFCFBNtfAbGtNPBCwxvygHeYMZMY9ZboBqwq/pVrsbgN5tkv152ODlbMfiqwGMBgxa4Exz3QhovRIUp6acqZmQzRq0ypDXS2TPLT02YIkQETnOE445oOGxOmXAqUJNNG7XgupMjPq2ua9asrj5yY/yuKteO1Kx0YNJTufrirLe1mZnat7OL6rnUdCWenpW6I8mAnbsY8KWs1PuSovCW9A/Z25PQ24a7cNOqgmTkLmBMgh4THgc4b9k2IVv1/g/F5nGljwPLfOgHAzJzh45V/4+WenTzmMtR5Z7us2Tys909UHqrPY7KbckoxRvRHhmVc3cJGE97uml0R1S0jdULVl7EvZtDFVBF35N9cEdjpgmAiOlFZ+Dtoh93+D3zzHr8RRNZQhnCNMNbcegOvpEwZoL+06cJQ07h+th3fZ/7PVbVC6ngTAV/KoLFuO6+2KFcU651gEb5ugPSIb1D+Xp8V4+k3sEIGnw5mYe4If4k1lFYr6SCzmM2EQ8iWtmwjnBI9kTwe1TlfAmXh7H02by9fW2gsjKwtv0aaURKil4OdV7rDL1MXIFNrhdxohcZXYTnq47WisrKitaObbf5+yvkLi5J6lCNZZ+B6GC38VNBZBDidSS/+mSvh6s+srgC8pyKMvDtt+de3c9fU76ZPfuM8ud4Kv0fyP/LqfepMT/3oZxSqpZaTa1DaQYLY8TFsHYbWYsPoRhRWfL5eSSQbhUGgGC3YLbVMk6PitTFNGpAsNrC6D1VNBKgBHMejaiuRWEWGgsSDBTJjqWIl8kJLlsaLJ2tXDr6xGfT85bM2Q06a46x2HTgvdnV8z5YDy/27J4zt6x2VtkzjoYpkq36kaBr4eQSg7tyiVweWubXZugtadl58ydapfbORfKsDTuZ0OBgx4cfdjCf5tbWNITnL120fdOi1RV1C3uKGzNdwYLcMvZ3BxoPyTOCD1XvXTp7U10gWCVmTV9b3r2z0SkGWovb2hp9I89O8a2smlyaO8muMU+dRmtzp60IzAoFpjLr1n388boLyf0dRvxhsHZ0qbWqDkwqvvpkj4l0fY6EIXRi5sQSrAvsVYwXRy4qJ2EVtD1AN7a0HWth9ymvL1xc3WTUKK/TAHA/bXDVtVWfOMfuGxGZv4Ln/jVr9jc3j1yMv0tndmyt9Vq88Y9gH1wtLX3KWjot5++jWHgAoZZkQ14wGQ20Fli71UmKJAy4xKMSTGbVdybW7FDDAut9XpD5AzWrYO7zQ8qffqF8+Ynd/clrHcdyxGy3a/3+mfNnzC/cBsveTjnTvXf1o6vzOlZw7WtqtdmPK/Errz/6NNtD72zmNOZfbmYdTGHfoofqI79Oc+R2n1lrnL6pOm0Up7kwxhTW12Amm7WYkXR2qYrF2AmgmbAsxZjwy1xpg/m1Je2vrp8v/nz2xpmlBg4E9hrMU341wVpTOh/OfmGvAnra8q6uctr60ZQHV3Q+WMQJykMj8ZsWn2QBOmmHMB+m5pDIpTFonYigiaKAhGEiAHF7EliVnQkjoLVIMPtJpBKHYd3A8GYH9jJzrWwmHx5Qjp7vDAX0suGRym1vtm/9W1/HyR8vczfMs6Sk8DSv855/5dlX9oQq52hT8syyp2rx5Id17IAyAM3wIjQPMOHzytEB64q6D5zT91yNbnx3V/nqnd017S9Y0605k3izoXLpsxde2n38yoOV9s1LcjwzNjbdX6asnBVaBj/6/DwKwPkpcqbDG7BnsXoSqWnUAmottYF6jMSdVyYZh3zVXCjwTiwwHH6sGuRiEHQGzuRX6whZkp123oy1BWE2mEfJ/tvIRtM4ZM5bDXiMsPMaAKOTyc5uL57rqyyc5y5JE5pm1i2S2iUX0CcaQ6lC6Zog7JqSqZmYlosl2K6pwNA84zRnQW6SaALYZQGW5lhCtU/W34N6o+bKfZ8cf3/Cl/+iTX3wBzpOY4mRkeNf3rptycGSshQWgGbYt5jFc2e0+DglIrwl6DVWQ7BuwaJ3Xk1J4VL5urnLl/Wf+gHU/hZoZdKNym6lG+I34FaNeZKcSpJIo2IeCVvpdsDGfKvzJnAwmeD37Ow65ZWwSowpgwX5T69s/rB55dP5BcpgDKFV8p7q2sn/1uc93bVzT/w6UrCqDTWvfCq/oCD/qZXNoUj8BL5Kp6GU017frfNXkAtiiyf/SOCEeLqnd8R/Ql9GlCRfctS6k5chvIBuQ1zCCjoCHL2DHNHIXxMJ3kQeO8lbsUXONeSfA5EjcG6/E+KdhN4bP04vBhdi883+BFBzQbxFbvZzQeY9LNBZc0FNfn5NwfDn6rCTnTw6R8o+gfpf5hCom33cRuiTlss3KHmZjD+BPN+5gXuA2ziS/Q73mLxUkpbKN/eqwz5uK0X9F3h2d1V4nGNgZGBgAOJd776+iue3+crAzc4AAje5Bfcg0xz9YHEOBiYQBQA8FQlFAHicY2BkYGBnAAGOPgaG//85+hkYGVCBMgBGGwNYAAAAeJxjYGBgYB8EmKOPgQEAQ04BfgAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhAi2COh4nGNgZGBgUGYoZWBnAAEmIOYCQgaG/2A+AwAYCQG2AHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkMl2wjAMRfOAhABlKm2h80C3+ajgCKKDY6cegP59TYBzukAL+z1Zsq8ctaJTTKPrsUQLbXQQI0EXKXroY4AbDDHCGBNMcYsZ7nCPB8yxwCOe8IwXvOIN7/jAJ76wxHfUqWX+OzgumWAjJMV17i0Ndlr6irLKO+qftdT7i6y4uFSUvCknay+lFYZIZaQcmfH/xIFdYn98bqhra1aKTM/6lWMnyaYirx1rFUQZFBkb2zJUtoXeJCeg0WnLtHeSFc3OtrnozNwqi0TkSpBMDB1nSde5oJXW23hTS2/T0LilglXX7dmFVxLnq5U0vYATHFk3zX3BOisoQHNDFDeZnqKDy9hRNawN7Vh727hFzcJ5c8TILrKZfH7tIPxAFP0BpLeJPA==) format("woff");font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder,.vjs-icon-play{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-js .vjs-play-control .vjs-icon-placeholder:before,.vjs-icon-play:before{content:"\\F101"}.vjs-icon-play-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-play-circle:before{content:"\\F102"}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder,.vjs-icon-pause{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before,.vjs-icon-pause:before{content:"\\F103"}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder,.vjs-icon-volume-mute{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before,.vjs-icon-volume-mute:before{content:"\\F104"}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder,.vjs-icon-volume-low{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before,.vjs-icon-volume-low:before{content:"\\F105"}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder,.vjs-icon-volume-mid{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before,.vjs-icon-volume-mid:before{content:"\\F106"}.video-js .vjs-mute-control .vjs-icon-placeholder,.vjs-icon-volume-high{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-mute-control .vjs-icon-placeholder:before,.vjs-icon-volume-high:before{content:"\\F107"}.video-js .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-enter:before{content:"\\F108"}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,.vjs-icon-fullscreen-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,.vjs-icon-fullscreen-exit:before{content:"\\F109"}.vjs-icon-square{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-square:before{content:"\\F10A"}.vjs-icon-spinner{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-spinner:before{content:"\\F10B"}.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subs-caps-button .vjs-icon-placeholder,.video-js .vjs-subtitles-button .vjs-icon-placeholder,.vjs-icon-subtitles{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js .vjs-subtitles-button .vjs-icon-placeholder:before,.vjs-icon-subtitles:before{content:"\\F10C"}.video-js .vjs-captions-button .vjs-icon-placeholder,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder,.vjs-icon-captions{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-captions-button .vjs-icon-placeholder:before,.video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before,.vjs-icon-captions:before{content:"\\F10D"}.video-js .vjs-chapters-button .vjs-icon-placeholder,.vjs-icon-chapters{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-chapters-button .vjs-icon-placeholder:before,.vjs-icon-chapters:before{content:"\\F10E"}.vjs-icon-share{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-share:before{content:"\\F10F"}.vjs-icon-cog{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-cog:before{content:"\\F110"}.video-js .vjs-play-progress,.video-js .vjs-volume-level,.vjs-icon-circle,.vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-progress:before,.video-js .vjs-volume-level:before,.vjs-icon-circle:before,.vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\\F111"}.vjs-icon-circle-outline{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-outline:before{content:"\\F112"}.vjs-icon-circle-inner-circle{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-circle-inner-circle:before{content:"\\F113"}.vjs-icon-hd{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-hd:before{content:"\\F114"}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,.vjs-icon-cancel{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,.vjs-icon-cancel:before{content:"\\F115"}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,.vjs-icon-replay{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,.vjs-icon-replay:before{content:"\\F116"}.vjs-icon-facebook{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-facebook:before{content:"\\F117"}.vjs-icon-gplus{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-gplus:before{content:"\\F118"}.vjs-icon-linkedin{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-linkedin:before{content:"\\F119"}.vjs-icon-twitter{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-twitter:before{content:"\\F11A"}.vjs-icon-tumblr{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-tumblr:before{content:"\\F11B"}.vjs-icon-pinterest{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-pinterest:before{content:"\\F11C"}.video-js .vjs-descriptions-button .vjs-icon-placeholder,.vjs-icon-audio-description{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-descriptions-button .vjs-icon-placeholder:before,.vjs-icon-audio-description:before{content:"\\F11D"}.video-js .vjs-audio-button .vjs-icon-placeholder,.vjs-icon-audio{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-audio-button .vjs-icon-placeholder:before,.vjs-icon-audio:before{content:"\\F11E"}.vjs-icon-next-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-next-item:before{content:"\\F11F"}.vjs-icon-previous-item{font-family:VideoJS;font-weight:400;font-style:normal}.vjs-icon-previous-item:before{content:"\\F120"}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-enter{font-family:VideoJS;font-weight:400;font-style:normal}.video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-enter:before{content:"\\F121"}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder,.vjs-icon-picture-in-picture-exit{font-family:VideoJS;font-weight:400;font-style:normal}.video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before,.vjs-icon-picture-in-picture-exit:before{content:"\\F122"}.video-js{display:block;vertical-align:top;box-sizing:border-box;color:#fff;background-color:#000;position:relative;padding:0;font-size:10px;line-height:1;font-weight:400;font-style:normal;font-family:Arial,Helvetica,sans-serif;word-break:normal}.video-js:-moz-full-screen{position:absolute}.video-js:-webkit-full-screen{width:100%!important;height:100%!important}.video-js[tabindex="-1"]{outline:none}.video-js *,.video-js :after,.video-js :before{box-sizing:inherit}.video-js ul{font-family:inherit;font-size:inherit;line-height:inherit;list-style-position:outside;margin:0}.video-js.vjs-4-3,.video-js.vjs-16-9,.video-js.vjs-fluid{width:100%;max-width:100%;height:0}.video-js.vjs-16-9{padding-top:56.25%}.video-js.vjs-4-3{padding-top:75%}.video-js.vjs-fill,.video-js .vjs-tech{width:100%;height:100%}.video-js .vjs-tech{position:absolute;top:0;left:0}body.vjs-full-window{padding:0;margin:0;height:100%}.vjs-full-window .video-js.vjs-fullscreen{position:fixed;overflow:hidden;z-index:1000;left:0;top:0;bottom:0;right:0}.video-js.vjs-fullscreen{width:100%!important;height:100%!important;padding-top:0!important}.video-js.vjs-fullscreen.vjs-user-inactive{cursor:none}.vjs-hidden{display:none!important}.vjs-disabled{opacity:.5;cursor:default}.video-js .vjs-offscreen{height:1px;left:-9999px;position:absolute;top:0;width:1px}.vjs-lock-showing{display:block!important;opacity:1;visibility:visible}.vjs-no-js{padding:20px;color:#fff;background-color:#000;font-size:18px;font-family:Arial,Helvetica,sans-serif;text-align:center;width:300px;height:150px;margin:0 auto}.vjs-no-js a,.vjs-no-js a:visited{color:#66a8cc}.video-js .vjs-big-play-button{font-size:3em;line-height:1.5em;height:1.63332em;width:3em;display:block;position:absolute;top:10px;left:10px;padding:0;cursor:pointer;opacity:1;border:.06666em solid #fff;background-color:#2b333f;background-color:rgba(43,51,63,.7);border-radius:.3em;transition:all .4s}.vjs-big-play-centered .vjs-big-play-button{top:50%;left:50%;margin-top:-.81666em;margin-left:-1.5em}.video-js .vjs-big-play-button:focus,.video-js:hover .vjs-big-play-button{border-color:#fff;background-color:#73859f;background-color:rgba(115,133,159,.5);transition:all 0s}.vjs-controls-disabled .vjs-big-play-button,.vjs-error .vjs-big-play-button,.vjs-has-started .vjs-big-play-button,.vjs-using-native-controls .vjs-big-play-button{display:none}.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block}.video-js button{background:none;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vjs-control .vjs-button{width:100%;height:100%}.video-js .vjs-control.vjs-close-button{cursor:pointer;height:3em;position:absolute;right:0;top:.5em;z-index:2}.video-js .vjs-modal-dialog{background:rgba(0,0,0,.8);background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto}.video-js .vjs-modal-dialog>*{box-sizing:border-box}.vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em;line-height:1.5;padding:20px 24px;z-index:1}.vjs-menu-button{cursor:pointer}.vjs-menu-button.vjs-disabled{cursor:default}.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none}.vjs-menu .vjs-menu-content{display:block;padding:0;margin:0;font-family:Arial,Helvetica,sans-serif;overflow:auto}.vjs-menu .vjs-menu-content>*{box-sizing:border-box}.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}.vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}.js-focus-visible .vjs-menu li.vjs-menu-item:hover,.vjs-menu li.vjs-menu-item:focus,.vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}.js-focus-visible .vjs-menu li.vjs-selected:hover,.vjs-menu li.vjs-selected,.vjs-menu li.vjs-selected:focus,.vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}.vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}.vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}.vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}.vjs-menu-button-popup .vjs-menu.vjs-lock-showing,.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu{display:block}.video-js .vjs-menu-button-inline{transition:all .4s;overflow:hidden}.video-js .vjs-menu-button-inline:before{width:2.222222222em}.video-js .vjs-menu-button-inline.vjs-slider-active,.video-js .vjs-menu-button-inline:focus,.video-js .vjs-menu-button-inline:hover,.video-js.vjs-no-flex .vjs-menu-button-inline{width:12em}.vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}.vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-menu-button-inline:focus .vjs-menu,.vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}.vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu{width:auto}.vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}.video-js .vjs-control-bar{display:none;width:100%;position:absolute;bottom:0;left:0;right:0;height:3em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.vjs-has-started .vjs-control-bar{display:flex;visibility:visible;opacity:1;transition:visibility .1s,opacity .1s}.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible;opacity:0;transition:visibility 1s,opacity 1s}.vjs-controls-disabled .vjs-control-bar,.vjs-error .vjs-control-bar,.vjs-using-native-controls .vjs-control-bar{display:none!important}.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}.vjs-has-started.vjs-no-flex .vjs-control-bar{display:table}.video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}.vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}.video-js .vjs-control:focus,.video-js .vjs-control:focus:before,.video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff}.video-js .vjs-control-text{border:0;clip:rect(0 0 0 0);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}.video-js .vjs-custom-control-spacer{display:none}.video-js .vjs-progress-control{cursor:pointer;flex:auto;display:flex;align-items:center;min-width:4em;touch-action:none}.video-js .vjs-progress-control.disabled{cursor:default}.vjs-live .vjs-progress-control{display:none}.vjs-liveui .vjs-progress-control{display:flex;align-items:center}.vjs-no-flex .vjs-progress-control{width:auto}.video-js .vjs-progress-holder{flex:auto;transition:all .2s;height:.3em}.video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px}.video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.6666666667em}.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em}.video-js .vjs-progress-holder .vjs-load-progress,.video-js .vjs-progress-holder .vjs-load-progress div,.video-js .vjs-progress-holder .vjs-play-progress{position:absolute;display:block;height:100%;margin:0;padding:0;width:0}.video-js .vjs-play-progress{background-color:#fff}.video-js .vjs-play-progress:before{font-size:.9em;position:absolute;right:-.5em;top:-.3333333333em;z-index:1}.video-js .vjs-load-progress{background:rgba(115,133,159,.5)}.video-js .vjs-load-progress div{background:rgba(115,133,159,.75)}.video-js .vjs-time-tooltip{background-color:#fff;background-color:hsla(0,0%,100%,.8);border-radius:.3em;color:#000;float:right;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:6px 8px 8px;pointer-events:none;position:absolute;top:-3.4em;visibility:hidden;z-index:1}.video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none}.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,.video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block;font-size:.6em;visibility:visible}.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em}.video-js .vjs-progress-control .vjs-mouse-display{display:none;position:absolute;width:1px;height:100%;background-color:#000;z-index:1}.vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}.video-js .vjs-progress-control:hover .vjs-mouse-display{display:block}.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden;opacity:0;transition:visibility 1s,opacity 1s}.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display{display:none}.vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}.video-js .vjs-slider{position:relative;cursor:pointer;padding:0;margin:0 .45em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#73859f;background-color:rgba(115,133,159,.5)}.video-js .vjs-slider.disabled{cursor:default}.video-js .vjs-slider:focus{text-shadow:0 0 1em #fff;box-shadow:0 0 1em #fff}.video-js .vjs-mute-control{cursor:pointer;flex:none}.video-js .vjs-volume-control{cursor:pointer;margin-right:1em;display:flex}.video-js .vjs-volume-control.vjs-volume-horizontal{width:5em}.video-js .vjs-volume-panel .vjs-volume-control{visibility:visible;opacity:0;width:1px;height:1px;margin-left:-1px}.video-js .vjs-volume-panel{transition:width 1s}.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,.video-js .vjs-volume-panel .vjs-volume-control:active,.video-js .vjs-volume-panel:active .vjs-volume-control,.video-js .vjs-volume-panel:focus .vjs-volume-control{visibility:visible;opacity:1;position:relative;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s}.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em}.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control~.vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,.video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,.video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,.video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical{left:-3.5em;transition:left 0s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active{width:9em;transition:width .1s}.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only{width:4em}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em;width:3em;left:-3000em;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s}.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s}.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{width:5em;height:3em;visibility:visible;opacity:1;position:relative;transition:none}.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{position:absolute;bottom:3em;left:.5em}.video-js .vjs-volume-panel{display:flex}.video-js .vjs-volume-bar{margin:1.35em .45em}.vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}.vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}.video-js .vjs-volume-level{position:absolute;bottom:0;left:0;background-color:#fff}.video-js .vjs-volume-level:before{position:absolute;font-size:.9em}.vjs-slider-vertical .vjs-volume-level{width:.3em}.vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em}.vjs-slider-horizontal .vjs-volume-level{height:.3em}.vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}.video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em}.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}.video-js .vjs-volume-vertical{width:3em;height:8em;bottom:8em;background-color:#2b333f;background-color:rgba(43,51,63,.7)}.video-js .vjs-volume-horizontal .vjs-menu{left:-2em}.vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}.vjs-has-started .vjs-poster{display:none}.vjs-audio.vjs-has-started .vjs-poster{display:block}.vjs-using-native-controls .vjs-poster{display:none}.video-js .vjs-live-control{display:flex;align-items:flex-start;flex:auto;font-size:1em;line-height:3em}.vjs-no-flex .vjs-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-liveui .vjs-live-control,.video-js:not(.vjs-live) .vjs-live-control{display:none}.video-js .vjs-seek-to-live-control{cursor:pointer;flex:none;display:inline-flex;height:100%;padding-left:.5em;padding-right:.5em;font-size:1em;line-height:3em;width:auto;min-width:4em}.vjs-no-flex .vjs-seek-to-live-control{display:table-cell;width:auto;text-align:left}.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,.video-js:not(.vjs-live) .vjs-seek-to-live-control{display:none}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}.vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}.video-js .vjs-time-control{flex:none;font-size:1em;line-height:3em;min-width:2em;width:auto;padding-left:1em;padding-right:1em}.video-js .vjs-current-time,.video-js .vjs-duration,.vjs-live .vjs-time-control,.vjs-no-flex .vjs-current-time,.vjs-no-flex .vjs-duration{display:none}.vjs-time-divider{display:none;line-height:3em}.vjs-live .vjs-time-divider{display:none}.video-js .vjs-play-control{cursor:pointer}.video-js .vjs-play-control .vjs-icon-placeholder{flex:none}.vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em}.video-js .vjs-text-track{font-size:1.4em;text-align:center;margin-bottom:.1em}.vjs-subtitles{color:#fff}.vjs-captions{color:#fc6}.vjs-tt-cue{display:block}video::-webkit-media-text-track-display{transform:translateY(-3em)}.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)}.video-js .vjs-fullscreen-control,.video-js .vjs-picture-in-picture-control{cursor:pointer;flex:none}.vjs-playback-rate .vjs-playback-rate-value,.vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}.vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}.vjs-playback-rate .vjs-menu{width:4em;left:0}.vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}.vjs-error .vjs-error-display:before{color:#fff;content:"X";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}.vjs-seeking .vjs-loading-spinner,.vjs-waiting .vjs-loading-spinner{display:block;-webkit-animation:vjs-spinner-show 0s linear .3s forwards;animation:vjs-spinner-show 0s linear .3s forwards}.vjs-loading-spinner:after,.vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:before{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-seeking .vjs-loading-spinner:before,.vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}.vjs-seeking .vjs-loading-spinner:after,.vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:.44s;animation-delay:.44s}@keyframes vjs-spinner-show{to{visibility:visible}}@-webkit-keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@-webkit-keyframes vjs-spinner-spin{to{-webkit-transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}@-webkit-keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}.vjs-chapters-button .vjs-menu ul{width:24em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-subs-caps-button+.vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:"\\F10D";font-size:1.5em;line-height:inherit}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle;display:inline-block;margin-bottom:-.1em}.video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS;content:" \\F11D";font-size:1.5em;line-height:inherit}.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-control,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-control,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-audio-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-captions-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-chapters-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-current-time,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-descriptions-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-duration,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-playback-rate,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-remaining-time,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-subtitles-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-time-divider,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-control{display:none}.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active,.video-js:not(.vjs-fullscreen).vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:auto}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-subs-caps-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small:not(.vjs-live) .vjs-subs-caps-button,.video-js:not(.vjs-fullscreen).vjs-layout-x-small:not(.vjs-liveui) .vjs-subs-caps-button{display:none}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-custom-control-spacer,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-custom-control-spacer{flex:auto;display:block}.video-js:not(.vjs-fullscreen).vjs-layout-tiny.vjs-no-flex .vjs-custom-control-spacer,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui.vjs-no-flex .vjs-custom-control-spacer{width:auto}.video-js:not(.vjs-fullscreen).vjs-layout-tiny .vjs-progress-control,.video-js:not(.vjs-fullscreen).vjs-layout-x-small.vjs-liveui .vjs-progress-control{display:none}.vjs-modal-dialog.vjs-text-track-settings{background-color:#2b333f;background-color:rgba(43,51,63,.75);color:#fff;height:70%}.vjs-text-track-settings .vjs-modal-dialog-content{display:table}.vjs-text-track-settings .vjs-track-settings-colors,.vjs-text-track-settings .vjs-track-settings-controls,.vjs-text-track-settings .vjs-track-settings-font{display:table-cell}.vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom}@supports (display:grid){.vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}.vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}.vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}.vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}.vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}.vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}.vjs-text-track-settings fieldset span{display:inline-block}.vjs-text-track-settings fieldset span>select{max-width:7.3em}.vjs-text-track-settings legend{color:#fff;margin:0 0 5px}.vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px;padding:0;border:0;height:1px;width:1px;overflow:hidden}.vjs-track-settings-controls button:active,.vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f)}.vjs-track-settings-controls button:hover{color:rgba(43,51,63,.75)}.vjs-track-settings-controls button{background-color:#fff;background-image:linear-gradient(-180deg,#fff 88%,#73859f);color:#2b333f;cursor:pointer;border-radius:2px}.vjs-track-settings-controls .vjs-default-button{margin-right:1em}@media print{.video-js>:not(.vjs-tech):not(.vjs-poster){visibility:hidden}}.vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}.js-focus-visible .video-js :focus:not(.focus-visible),.video-js .vjs-menu :focus:not(:focus-visible),.video-js :focus:not(:focus-visible){outline:none;background:none}',""])},APKf:function(e,t,n){var r=n("6Zvs");r(r.P,"Array",{fill:n("p0CF")}),n("h7JP")("fill")},AaTj:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("gHi9"),o=n("XRBt");r(r.P+r.F*n("CSYH")((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},Acjw:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("P6fP");r(r.P+r.F*!n("lbZd")([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},AjBM:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("E3To");r(r.S+r.F*n("CSYH")((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},B4wW:function(e,t,n){var r=n("CzRT"),i=n("duNF"),o=n("PYqL"),a=n("GlgS"),s=n("u4vu").f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},B8O0:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n("3oq6"),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n("UywP"))},B9Ti:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>16,u=i>>16,l=(s*a>>>0)+(o*a>>>16);return s*u+(l>>16)+((o*u>>>0)+(l&n)>>16)}})},BAqB:function(e,t,n){n("EGsU")("Uint16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},BFEv:function(e,t,n){var r=n("nP/W"),i=n("0ct0"),o=n("g5pV")("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},Bf1l:function(e,t,n){e.exports=n("uqfp")("native-function-to-string",Function.toString)},Bl3t:function(e,t,n){var r=n("u4vu"),i=n("XtyL");e.exports=n("Jt9q")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},Bl4z:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},BoJA:function(e,t,n){var r=n("6Zvs");r(r.S,"Reflect",{has:function(e,t){return t in e}})},Bz0c:function(e,t,n){var r=n("KFv0"),i=n("6Zvs"),o=n("qG9X");i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},C8qm:function(e,t,n){"use strict";var r=n("CzRT"),i=n("6Zvs"),o=n("hOgw"),a=n("b0Vn"),s=n("SfLy"),u=n("Kzeq"),l=n("i1r4"),c=n("nP/W"),d=n("CSYH"),f=n("GprO"),h=n("usP3"),p=n("qDq2");e.exports=function(e,t,n,v,m,g){var y=r[e],_=y,b=m?"set":"add",S=_&&_.prototype,T={},w=function(e){var t=S[e];o(S,e,"delete"==e||"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof _&&(g||S.forEach&&!d((function(){(new _).entries().next()})))){var k=new _,E=k[b](g?{}:-0,1)!=k,C=d((function(){k.has(1)})),A=f((function(e){new _(e)})),j=!g&&d((function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)}));A||((_=t((function(t,n){l(t,_,e);var r=p(new y,t,_);return null!=n&&u(n,m,r[b],r),r}))).prototype=S,S.constructor=_),(C||j)&&(w("delete"),w("has"),m&&w("get")),(j||E)&&w(b),g&&S.clear&&delete S.clear}else _=v.getConstructor(t,e,m,b),a(_.prototype,n),s.NEED=!0;return h(_,e),T[e]=_,i(i.G+i.W+i.F*(_!=y),T),g||v.setStrong(_,e,m),_}},CFuw:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("UqQs")(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n("lbZd")(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},CGwd:function(e,t,n){n("EGsU")("Int16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},CSYH:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},CWzX:function(e,t,n){var r=n("6Zvs"),i=n("0+8G")(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},Cyja:function(e,t,n){var r=n("nP/W");e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},CzRT:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},DClA:function(e,t){t.f=Object.getOwnPropertySymbols},DIQv:function(e,t,n){"use strict";var r=n("FmPI")(!0);n("Eg+M")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},DNwU:function(e,t,n){var r=n("6Zvs");r(r.P,"Function",{bind:n("4vfJ")})},DQ26:function(e,t,n){var r=n("tig4"),i=n("GmmS");"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},DUyB:function(e,t,n){var r=n("nP/W");n("sr7R")("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},DgE9:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("gHi9"),o=n("MlCS"),a=n("u4vu");n("Jt9q")&&r(r.P+n("lMtF"),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},DuUM:function(e,t){e.exports=Math.scale||function(e,t,n,r,i){return 0===arguments.length||e!=e||t!=t||n!=n||r!=r||i!=i?NaN:e===1/0||e===-1/0?e:(e-t)*(i-r)/(n-t)+r}},E3To:function(e,t,n){"use strict";var r=n("u4vu"),i=n("XtyL");e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},EEon:function(e,t,n){var r=n("nP/W"),i=n("SfLy").onFreeze;n("sr7R")("preventExtensions",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},EGsU:function(e,t,n){"use strict";if(n("Jt9q")){var r=n("PYqL"),i=n("CzRT"),o=n("CSYH"),a=n("6Zvs"),s=n("+izM"),u=n("+bx0"),l=n("Hk3x"),c=n("i1r4"),d=n("XtyL"),f=n("Bl3t"),h=n("b0Vn"),p=n("IS5P"),v=n("IBxK"),m=n("y4VI"),g=n("cyvI"),y=n("XRBt"),_=n("T9SM"),b=n("1EV7"),S=n("nP/W"),T=n("gHi9"),w=n("3Op6"),k=n("fuPg"),E=n("rdyb"),C=n("Idnr").f,A=n("47sf"),j=n("2LOv"),x=n("g5pV"),P=n("6ap5"),L=n("UqQs"),O=n("Gwsb"),R=n("JbqQ"),I=n("lT22"),M=n("GprO"),D=n("+WbQ"),U=n("p0CF"),B=n("Z2oa"),N=n("u4vu"),F=n("KFv0"),V=N.f,z=F.f,H=i.RangeError,G=i.TypeError,q=i.Uint8Array,W="ArrayBuffer",$="SharedArrayBuffer",K="BYTES_PER_ELEMENT",X=Array.prototype,Y=u.ArrayBuffer,Z=u.DataView,J=P(0),Q=P(2),ee=P(3),te=P(4),ne=P(5),re=P(6),ie=L(!0),oe=L(!1),ae=R.values,se=R.keys,ue=R.entries,le=X.lastIndexOf,ce=X.reduce,de=X.reduceRight,fe=X.join,he=X.sort,pe=X.slice,ve=X.toString,me=X.toLocaleString,ge=x("iterator"),ye=x("toStringTag"),_e=j("typed_constructor"),be=j("def_constructor"),Se=s.CONSTR,Te=s.TYPED,we=s.VIEW,ke="Wrong length!",Ee=P(1,(function(e,t){return Pe(O(e,e[be]),t)})),Ce=o((function(){return 1===new q(new Uint16Array([1]).buffer)[0]})),Ae=!!q&&!!q.prototype.set&&o((function(){new q(1).set({})})),je=function(e,t){var n=p(e);if(n<0||n%t)throw H("Wrong offset!");return n},xe=function(e){if(S(e)&&Te in e)return e;throw G(e+" is not a typed array!")},Pe=function(e,t){if(!S(e)||!(_e in e))throw G("It is not a typed array constructor!");return new e(t)},Le=function(e,t){return Oe(O(e,e[be]),t)},Oe=function(e,t){for(var n=0,r=t.length,i=Pe(e,r);r>n;)i[n]=t[n++];return i},Re=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Ie=function(e){var t,n,r,i,o,a,s=T(e),u=arguments.length,c=u>1?arguments[1]:void 0,d=void 0!==c,f=A(s);if(null!=f&&!w(f)){for(a=f.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(d&&u>2&&(c=l(c,arguments[2],2)),t=0,n=v(s.length),i=Pe(this,n);n>t;t++)i[t]=d?c(s[t],t):s[t];return i},Me=function(){for(var e=0,t=arguments.length,n=Pe(this,t);t>e;)n[e]=arguments[e++];return n},De=!!q&&o((function(){me.call(new q(1))})),Ue=function(){return me.apply(De?pe.call(xe(this)):xe(this),arguments)},Be={copyWithin:function(e,t){return B.call(xe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return te(xe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return U.apply(xe(this),arguments)},filter:function(e){return Le(this,Q(xe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ne(xe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return re(xe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){J(xe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return oe(xe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return ie(xe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return fe.apply(xe(this),arguments)},lastIndexOf:function(e){return le.apply(xe(this),arguments)},map:function(e){return Ee(xe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ce.apply(xe(this),arguments)},reduceRight:function(e){return de.apply(xe(this),arguments)},reverse:function(){for(var e,t=this,n=xe(t).length,r=Math.floor(n/2),i=0;i<r;)e=t[i],t[i++]=t[--n],t[n]=e;return t},some:function(e){return ee(xe(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return he.call(xe(this),e)},subarray:function(e,t){var n=xe(this),r=n.length,i=g(e,r);return new(O(n,n[be]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===t?r:g(t,r))-i))}},Ne=function(e,t){return Le(this,pe.call(xe(this),e,t))},Fe=function(e){xe(this);var t=je(arguments[1],1),n=this.length,r=T(e),i=v(r.length),o=0;if(i+t>n)throw H(ke);for(;o<i;)this[t+o]=r[o++]},Ve={entries:function(){return ue.call(xe(this))},keys:function(){return se.call(xe(this))},values:function(){return ae.call(xe(this))}},ze=function(e,t){return S(e)&&e[Te]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},He=function(e,t){return ze(e,t=y(t,!0))?d(2,e[t]):z(e,t)},Ge=function(e,t,n){return!(ze(e,t=y(t,!0))&&S(n)&&_(n,"value"))||_(n,"get")||_(n,"set")||n.configurable||_(n,"writable")&&!n.writable||_(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};Se||(F.f=He,N.f=Ge),a(a.S+a.F*!Se,"Object",{getOwnPropertyDescriptor:He,defineProperty:Ge}),o((function(){ve.call({})}))&&(ve=me=function(){return fe.call(this)});var qe=h({},Be);h(qe,Ve),f(qe,ge,Ve.values),h(qe,{slice:Ne,set:Fe,constructor:function(){},toString:ve,toLocaleString:Ue}),Re(qe,"buffer","b"),Re(qe,"byteOffset","o"),Re(qe,"byteLength","l"),Re(qe,"length","e"),V(qe,ye,{get:function(){return this[Te]}}),e.exports=function(e,t,n,u){var l=e+((u=!!u)?"Clamped":"")+"Array",d="get"+e,h="set"+e,p=i[l],g=p||{},y=p&&E(p),_=!p||!s.ABV,T={},w=p&&p.prototype,A=function(e,n){V(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[d](n*t+r.o,Ce)}(this,n)},set:function(e){return function(e,n,r){var i=e._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[h](n*t+i.o,r,Ce)}(this,n,e)},enumerable:!0})};_?(p=n((function(e,n,r,i){c(e,p,l,"_d");var o,a,s,u,d=0,h=0;if(S(n)){if(!(n instanceof Y||(u=b(n))==W||u==$))return Te in n?Oe(p,n):Ie.call(p,n);o=n,h=je(r,t);var g=n.byteLength;if(void 0===i){if(g%t)throw H(ke);if((a=g-h)<0)throw H(ke)}else if((a=v(i)*t)+h>g)throw H(ke);s=a/t}else s=m(n),o=new Y(a=s*t);for(f(e,"_d",{b:o,o:h,l:a,e:s,v:new Z(o)});d<s;)A(e,d++)})),w=p.prototype=k(qe),f(w,"constructor",p)):o((function(){p(1)}))&&o((function(){new p(-1)}))&&M((function(e){new p,new p(null),new p(1.5),new p(e)}),!0)||(p=n((function(e,n,r,i){var o;return c(e,p,l),S(n)?n instanceof Y||(o=b(n))==W||o==$?void 0!==i?new g(n,je(r,t),i):void 0!==r?new g(n,je(r,t)):new g(n):Te in n?Oe(p,n):Ie.call(p,n):new g(m(n))})),J(y!==Function.prototype?C(g).concat(C(y)):C(g),(function(e){e in p||f(p,e,g[e])})),p.prototype=w,r||(w.constructor=p));var j=w[ge],x=!!j&&("values"==j.name||null==j.name),P=Ve.values;f(p,_e,!0),f(w,Te,l),f(w,we,!0),f(w,be,p),(u?new p(1)[ye]==l:ye in w)||V(w,ye,{get:function(){return l}}),T[l]=p,a(a.G+a.W+a.F*(p!=g),T),a(a.S,l,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*o((function(){g.of.call(p,1)})),l,{from:Ie,of:Me}),K in w||f(w,K,t),a(a.P,l,Be),D(l),a(a.P+a.F*Ae,l,{set:Fe}),a(a.P+a.F*!x,l,Ve),r||w.toString==ve||(w.toString=ve),a(a.P+a.F*o((function(){new p(1).slice()})),l,{slice:Ne}),a(a.P+a.F*(o((function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()}))||!o((function(){w.toLocaleString.call([1,2])}))),l,{toLocaleString:Ue}),I[l]=x?j:P,r||x||f(w,ge,P)}}else e.exports=function(){}},"EIT+":function(e,t,n){var r=n("6Zvs");r(r.S+r.F*!n("Jt9q"),"Object",{defineProperty:n("u4vu").f})},EY5l:function(e,t,n){var r=n("6Zvs"),i=n("f/iY");r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},"Eg+M":function(e,t,n){"use strict";var r=n("PYqL"),i=n("6Zvs"),o=n("hOgw"),a=n("Bl3t"),s=n("lT22"),u=n("NGC/"),l=n("usP3"),c=n("rdyb"),d=n("g5pV")("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",p="values",v=function(){return this};e.exports=function(e,t,n,m,g,y,_){u(n,t,m);var b,S,T,w=function(e){if(!f&&e in A)return A[e];switch(e){case h:case p:return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",E=g==p,C=!1,A=e.prototype,j=A[d]||A["@@iterator"]||g&&A[g],x=j||w(g),P=g?E?w("entries"):x:void 0,L="Array"==t&&A.entries||j;if(L&&(T=c(L.call(new e)))!==Object.prototype&&T.next&&(l(T,k,!0),r||"function"==typeof T[d]||a(T,d,v)),E&&j&&j.name!==p&&(C=!0,x=function(){return j.call(this)}),r&&!_||!f&&!C&&A[d]||a(A,d,x),s[t]=x,s[k]=v,g)if(b={values:E?x:w(p),keys:y?x:w(h),entries:P},_)for(S in b)S in A||o(A,S,b[S]);else i(i.P+i.F*(f||C),t,b);return b}},"Ex+h":function(e,t,n){n("EGsU")("Float32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},"FNH+":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("CSYH"),o=n("mp0a"),a=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},FZoA:function(e,t,n){var r=n("6Zvs");r(r.S+r.F*!n("Jt9q"),"Object",{defineProperties:n("P55W")})},FabU:function(e,t,n){"use strict";n("a2+z")("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},FmPI:function(e,t,n){var r=n("IS5P"),i=n("OrC7");e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},Fp97:function(e,t,n){n("0GvP")("Set")},G5bc:function(e,t,n){var r=n("zqLp");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},G8eP:function(e,t,n){for(var r=n("JbqQ"),i=n("k8pk"),o=n("hOgw"),a=n("CzRT"),s=n("Bl3t"),u=n("lT22"),l=n("g5pV"),c=l("iterator"),d=l("toStringTag"),f=u.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),v=0;v<p.length;v++){var m,g=p[v],y=h[g],_=a[g],b=_&&_.prototype;if(b&&(b[c]||s(b,c,f),b[d]||s(b,d,g),u[g]=f,y))for(m in r)b[m]||o(b,m,r[m],!0)}},GCCH:function(e,t,n){var r=n("6Zvs"),i=n("vaCW"),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},GZPV:function(e,t,n){"use strict";var r=n("b0Vn"),i=n("SfLy").getWeak,o=n("qG9X"),a=n("nP/W"),s=n("i1r4"),u=n("Kzeq"),l=n("6ap5"),c=n("T9SM"),d=n("Cyja"),f=l(5),h=l(6),p=0,v=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},g=function(e,t){return f(e.a,(function(e){return e[0]===t}))};m.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var l=e((function(e,r){s(e,l,t,"_i"),e._t=t,e._i=p++,e._l=void 0,null!=r&&u(r,n,e[o],e)}));return r(l.prototype,{delete:function(e){if(!a(e))return!1;var n=i(e);return!0===n?v(d(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=i(e);return!0===n?v(d(this,t)).has(e):n&&c(n,this._i)}}),l},def:function(e,t,n){var r=i(o(t),!0);return!0===r?v(e).set(t,n):r[e._i]=n,e},ufstore:v}},GlgS:function(e,t,n){t.f=n("g5pV")},GmmS:function(e,t,n){(e.exports=n("LH+K")(void 0)).push([e.i,'.video-wrapper .show-time .video-js .vjs-time-control:not(.vjs-remaining-time){padding-left:.5em;padding-right:0;min-width:0;display:block}.video-wrapper .video-js .vjs-remaining-time{display:none}.video-wrapper .live .vjs-progress-control{visibility:hidden}.video-wrapper .av-loading .vjs-big-play-button,.video-wrapper .live .vjs-remaining-time,.video-wrapper .live .vjs-time-control{display:none}.video-wrapper .hide-big-play-button .vjs-big-play-button,.video-wrapper .hide-controls .vjs-control-bar,.video-wrapper .hide-fluent-button .live-player-fluent-btn,.video-wrapper .hide-fullscreen-button .vjs-fullscreen-control,.video-wrapper .hide-pic-in-pic .video-js .vjs-picture-in-picture-control,.video-wrapper .hide-snapshot-button .vjs-snapshot-control,.video-wrapper .hide-stretch-button .live-player-stretch-btn,.video-wrapper .hide-waiting .vjs-seeking .vjs-loading-spinner,.video-wrapper .hide-waiting .vjs-waiting .vjs-loading-spinner{display:none!important}.video-wrapper .alt{position:absolute;left:0;top:0;right:0;bottom:0;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;color:#fff;text-align:center}.video-wrapper .alt>table{width:100%;height:100%}.video-wrapper .alt>table tr>td{vertical-align:middle}.video-wrapper .video-js .video-slot{font-size:14px}.video-wrapper .video-js .video-title{font-size:14px;position:absolute;top:5px;right:5px;color:#fff;background-color:hsla(0,0%,50%,.5);border-radius:2px;padding:5px;max-width:120px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.video-wrapper .video-js .vjs-control-bar .vjs-button{cursor:pointer;outline:none}.video-wrapper .video-js .vjs-control-bar .vjs-icon-spinner:before{font-size:1.4em;line-height:1.87}.video-wrapper .vjs-error-display{display:none}.video-wrapper .video-js .vjs-time-control{font-size:1.035em;line-height:2.93em}.video-wrapper .vjs-resolution-button{color:#ccc;font-family:VideoJS}.video-wrapper .vjs-resolution-button .vjs-resolution-button-staticlabel:before{content:"\\F110";font-size:1.8em;line-height:1.7em}.video-wrapper .vjs-resolution-button .vjs-resolution-button-label{width:100%;height:.6em;display:block!important}.video-wrapper .vjs-resolution-button .vjs-resolution-button-label-ie{width:100%;height:.4em;display:block!important}.video-wrapper .vjs-resolution-button ul.vjs-menu-content{width:4em!important}.video-wrapper .vjs-resolution-button .vjs-menu{left:0}.video-wrapper .vjs-resolution-button .vjs-menu li{text-transform:none;font-size:1em;line-height:1.5em;font-family:Arial,Helvetica,sans-serif}.video-wrapper .vjs-audio-button{display:none!important}.video-wrapper .video-js .vjs-big-play-button .vjs-icon-placeholder:before,.video-wrapper .vjs-button>.vjs-icon-placeholder:before{position:relative!important}.video-wrapper .video-js .vjs-play-progress:before{top:-.33em!important}.video-wrapper .video-js .vjs-control:focus,.video-wrapper .video-js .vjs-control:focus:before,.video-wrapper .video-js .vjs-control:hover:before{text-shadow:none!important}@media screen and (-webkit-min-device-pixel-ratio:0){.video-wrapper .video-js .vjs-control-bar{font-size:14px}.video-wrapper .video-js .vjs-slider-vertical .vjs-volume-level:before{left:-.33em!important}}.video-wrapper.video-wrapper-stretch .alt,.video-wrapper.video-wrapper-stretch .video-js .vjs-poster{background-size:100% 100%}',""])},GprO:function(e,t,n){var r=n("g5pV")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},Gwsb:function(e,t,n){var r=n("qG9X"),i=n("MlCS"),o=n("g5pV")("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},HfrQ:function(e,t){!function(e,t){"use strict";function n(){var e=E.splice(0,E.length);for(Ze=0;e.length;)e.shift().call(null,e.shift())}function r(e,t){for(var n=0,r=e.length;n<r;n++)p(e[n],t)}function i(e){return function(t){De(t)&&(p(t,e),oe.length&&r(t.querySelectorAll(oe),e))}}function o(e){var t=ze.call(e,"is"),n=e.nodeName.toUpperCase(),r=se.call(re,t?ee+t.toUpperCase():Q+n);return t&&-1<r&&!a(n,t)?-1:r}function a(e,t){return-1<oe.indexOf(e+'[is="'+t+'"]')}function s(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target,o=e[K]||2,a=e[X]||3;!rt||i&&i!==t||!t[z]||"style"===r||e.prevValue===e.newValue&&(""!==e.newValue||n!==o&&n!==a)||t[z](r,n===o?null:e.prevValue,n===a?null:e.newValue)}function u(e){var t=i(e);return function(e){E.push(t,e.target),Ze&&clearTimeout(Ze),Ze=setTimeout(n,1)}}function l(e){nt&&(nt=!1,e.currentTarget.removeEventListener(Z,l)),oe.length&&r((e.target||T).querySelectorAll(oe),e.detail===F?F:B),Ie&&function(){for(var e,t=0,n=Ue.length;t<n;t++)e=Ue[t],ae.contains(e)||(n--,Ue.splice(t--,1),p(e,F))}()}function c(e,t){var n=this;qe.call(n,e,t),C.call(n,{target:n})}function d(e,t,n){var r=t.apply(e,n),i=o(r);return-1<i&&O(r,ie[i]),n.pop()&&oe.length&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],O(t,ie[o(t)])}(r.querySelectorAll(oe)),r}function f(e,t){Pe(e,t),x?x.observe(e,Xe):(tt&&(e.setAttribute=c,e[D]=j(e),e[U](J,C)),e[U](Y,s)),e[W]&&rt&&(e.created=!0,e[W](),e.created=!1)}function h(e){throw new Error("A "+e+" type is already registered")}function p(e,t){var n,r,i=o(e);-1<i&&!Fe.call(e,"TEMPLATE")&&(L(e,ie[i]),i=0,t!==B||e[B]?t!==F||e[F]||(e[B]=!1,e[F]=!0,r="disconnected",i=1):(e[F]=!1,e[B]=!0,r="connected",i=1,Ie&&se.call(Ue,e)<0&&Ue.push(e)),i&&(n=e[t+N]||e[r+N])&&n.call(e))}function v(){}function m(e,t,n){var r=n&&n[V]||"",i=t.prototype,o=xe(i),a=t.observedAttributes||fe,s={prototype:o};Me(o,W,{value:function(){if(ke)ke=!1;else if(!this[ye]){this[ye]=!0,new t(this),i[W]&&i[W].call(this);var e=Ee[Ae.get(t)];(!be||e.create.length>1)&&_(this)}}}),Me(o,z,{value:function(e){-1<se.call(a,e)&&i[z]&&i[z].apply(this,arguments)}}),i[G]&&Me(o,H,{value:i[G]}),i[q]&&Me(o,$,{value:i[q]}),r&&(s[V]=r),e=e.toUpperCase(),Ee[e]={constructor:t,create:r?[r,je(e)]:[e]},Ae.set(t,e),T[I](e.toLowerCase(),s),b(e),Ce[e].r()}function g(e){var t=Ee[e.toUpperCase()];return t&&t.constructor}function y(e){return"string"==typeof e?e:e&&e.is||""}function _(e){for(var t,n=e[z],r=n?e.attributes:fe,i=r.length;i--;)t=r[i],n.call(e,t.name||t.nodeName,null,t.value||t.nodeValue)}function b(e){return(e=e.toUpperCase())in Ce||(Ce[e]={},Ce[e].p=new we((function(t){Ce[e].r=t}))),Ce[e].p}function S(){_e&&delete e.customElements,de(e,"customElements",{configurable:!0,value:new v}),de(e,"CustomElementRegistry",{configurable:!0,value:v});for(var t=k.get(/^HTML[A-Z]*[a-z]/),n=t.length;n--;function(t){var n=e[t];if(n){e[t]=function(e){var t,r;return e||(e=this),e[ye]||(ke=!0,t=Ee[Ae.get(e.constructor)],(e=(r=be&&1===t.create.length)?Reflect.construct(n,fe,t.constructor):T.createElement.apply(T,t.create))[ye]=!0,ke=!1,r||_(e)),e},e[t].prototype=n.prototype;try{n.prototype.constructor=e[t]}catch(r){!0,de(n,ye,{value:e[t]})}}}(t[n]));T.createElement=function(e,t){var n=y(t);return n?Ke.call(this,e,je(n)):Ke.call(this,e)},Je||(et=!0,T[I](""))}var T=e.document,w=e.Object,k=function(e){var t,n,r,i,o=/^[A-Z]+[a-z]/,a=function(e,t){(t=t.toLowerCase())in s||(s[e]=(s[e]||[]).concat(t),s[t]=s[t.toUpperCase()]=e)},s=(w.create||w)(null),u={};for(n in e)for(i in e[n])for(r=e[n][i],s[i]=r,t=0;t<r.length;t++)s[r[t].toLowerCase()]=s[r[t].toUpperCase()]=i;return u.get=function(e){return"string"==typeof e?s[e]||(o.test(e)?[]:""):function(e){var t,n=[];for(t in s)e.test(t)&&n.push(t);return n}(e)},u.set=function(e,t){return o.test(e)?a(e,t):a(t,e),u},u}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});"object"!=typeof t&&(t={type:t||"auto"});var E,C,A,j,x,P,L,O,R,I="registerElement",M=1e5*e.Math.random()>>0,D="__"+I+M,U="addEventListener",B="attached",N="Callback",F="detached",V="extends",z="attributeChanged"+N,H=B+N,G="connected"+N,q="disconnected"+N,W="created"+N,$=F+N,K="ADDITION",X="REMOVAL",Y="DOMAttrModified",Z="DOMContentLoaded",J="DOMSubtreeModified",Q="<",ee="=",te=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,ne=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],re=[],ie=[],oe="",ae=T.documentElement,se=re.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},ue=w.prototype,le=ue.hasOwnProperty,ce=ue.isPrototypeOf,de=w.defineProperty,fe=[],he=w.getOwnPropertyDescriptor,pe=w.getOwnPropertyNames,ve=w.getPrototypeOf,me=w.setPrototypeOf,ge=!!w.__proto__,ye="__dreCEv1",_e=e.customElements,be=!/^force/.test(t.type)&&!!(_e&&_e.define&&_e.get&&_e.whenDefined),Se=w.create||w,Te=e.Map||function(){var e,t=[],n=[];return{get:function(e){return n[se.call(t,e)]},set:function(r,i){(e=se.call(t,r))<0?n[t.push(r)-1]=i:n[e]=i}}},we=e.Promise||function(e){function t(e){for(r=!0;n.length;)n.shift()(e)}var n=[],r=!1,i={catch:function(){return i},then:function(e){return n.push(e),r&&setTimeout(t,1),i}};return e(t),i},ke=!1,Ee=Se(null),Ce=Se(null),Ae=new Te,je=function(e){return e.toLowerCase()},xe=w.create||function e(t){return t?(e.prototype=t,new e):this},Pe=me||(ge?function(e,t){return e.__proto__=t,e}:pe&&he?function(){function e(e,t){for(var n,r=pe(t),i=0,o=r.length;i<o;i++)n=r[i],le.call(e,n)||de(e,n,he(t,n))}return function(t,n){do{e(t,n)}while((n=ve(n))&&!ce.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),Le=e.MutationObserver||e.WebKitMutationObserver,Oe=e.HTMLAnchorElement,Re=(e.HTMLElement||e.Element||e.Node).prototype,Ie=!ce.call(Re,ae),Me=Ie?function(e,t,n){return e[t]=n.value,e}:de,De=Ie?function(e){return 1===e.nodeType}:function(e){return ce.call(Re,e)},Ue=Ie&&[],Be=Re.attachShadow,Ne=Re.cloneNode,Fe=Re.closest||function(e){for(var t=this;t&&t.nodeName!==e;)t=t.parentNode;return t},Ve=Re.dispatchEvent,ze=Re.getAttribute,He=Re.hasAttribute,Ge=Re.removeAttribute,qe=Re.setAttribute,We=T.createElement,$e=T.importNode,Ke=We,Xe=Le&&{attributes:!0,characterData:!0,attributeOldValue:!0},Ye=Le||function(e){tt=!1,ae.removeEventListener(Y,Ye)},Ze=0,Je=I in T&&!/^force-all/.test(t.type),Qe=!0,et=!1,tt=!0,nt=!0,rt=!0;if(Le&&((R=T.createElement("div")).innerHTML="<div><div></div></div>",new Le((function(e,t){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var n=(R=he(Re,"innerHTML"))&&R.set;n&&de(Re,"innerHTML",{set:function(e){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,e)}})}t.disconnect(),R=null})).observe(R,{childList:!0,subtree:!0}),R.innerHTML=""),Je||(me||ge?(L=function(e,t){ce.call(t,e)||f(e,t)},O=f):O=L=function(e,t){e[D]||(e[D]=w(!0),f(e,t))},Ie?(tt=!1,function(){var e=he(Re,U),t=e.value,n=function(e){var t=new CustomEvent(Y,{bubbles:!0});t.attrName=e,t.prevValue=ze.call(this,e),t.newValue=null,t[X]=t.attrChange=2,Ge.call(this,e),Ve.call(this,t)},r=function(e,t){var n=He.call(this,e),r=n&&ze.call(this,e),i=new CustomEvent(Y,{bubbles:!0});qe.call(this,e,t),i.attrName=e,i.prevValue=n?r:null,i.newValue=t,n?i.MODIFICATION=i.attrChange=1:i[K]=i.attrChange=0,Ve.call(this,i)},i=function(e){var t,n=e.currentTarget,r=n[D],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(Y,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[K]=t.attrChange=0:t.MODIFICATION=t.attrChange=1,Ve.call(n,t))};e.value=function(e,o,a){e===Y&&this[z]&&this.setAttribute!==r&&(this[D]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",i)),t.call(this,e,o,a)},de(Re,U,e)}()):Le||(ae[U](Y,Ye),ae.setAttribute(D,1),ae.removeAttribute(D),tt&&(C=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[D],i[D]=n=j(i),n){if(!(r in t))return A(0,i,r,t[r],n[r],K);if(n[r]!==t[r])return A(1,i,r,t[r],n[r],"MODIFICATION")}for(r in t)if(!(r in n))return A(2,i,r,t[r],n[r],X)}},A=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,s(a)},j=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),T[I]=function(e,t){if(n=e.toUpperCase(),Qe&&(Qe=!1,Le?(x=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new Le((function(r){for(var i,o,a,s=0,u=r.length;s<u;s++)"childList"===(i=r[s]).type?(n(i.addedNodes,e),n(i.removedNodes,t)):(o=i.target,rt&&o[z]&&"style"!==i.attributeName&&(a=ze.call(o,i.attributeName))!==i.oldValue&&o[z](i.attributeName,i.oldValue,a))}))}(i(B),i(F)),(P=function(e){return x.observe(e,{childList:!0,subtree:!0}),e})(T),Be&&(Re.attachShadow=function(){return P(Be.apply(this,arguments))})):(E=[],T[U]("DOMNodeInserted",u(B)),T[U]("DOMNodeRemoved",u(F))),T[U](Z,l),T[U]("readystatechange",l),T.importNode=function(e,t){switch(e.nodeType){case 1:return d(T,$e,[e,!!t]);case 11:for(var n=T.createDocumentFragment(),r=e.childNodes,i=r.length,o=0;o<i;o++)n.appendChild(T.importNode(r[o],!!t));return n;default:return Ne.call(e,!!t)}},Re.cloneNode=function(e){return d(this,Ne,[!!e])}),et)return et=!1;if(-2<se.call(re,ee+n)+se.call(re,Q+n)&&h(e),!te.test(n)||-1<se.call(ne,n))throw new Error("The type "+e+" is invalid");var n,o,a=function(){return c?T.createElement(f,n):T.createElement(f)},s=t||ue,c=le.call(s,V),f=c?t[V].toUpperCase():n;return c&&-1<se.call(re,Q+f)&&h(f),o=re.push((c?ee:Q)+n)-1,oe=oe.concat(oe.length?",":"",c?f+'[is="'+e.toLowerCase()+'"]':f),a.prototype=ie[o]=le.call(s,"prototype")?s.prototype:xe(Re),oe.length&&r(T.querySelectorAll(oe),B),a},T.createElement=Ke=function(e,t){var n=y(t),r=n?We.call(T,e,je(n)):We.call(T,e),i=""+e,o=se.call(re,(n?ee:Q)+(n||i).toUpperCase()),s=-1<o;return n&&(r.setAttribute("is",n=n.toLowerCase()),s&&(s=a(i.toUpperCase(),n))),rt=!T.createElement.innerHTMLHelper,s&&O(r,ie[o]),r}),addEventListener("beforeunload",(function(){delete T.createElement,delete T.importNode,delete T[I]}),!1),v.prototype={constructor:v,define:be?function(e,t,n){if(n)m(e,t,n);else{var r=e.toUpperCase();Ee[r]={constructor:t,create:[r]},Ae.set(t,r),_e.define(e,t)}}:m,get:be?function(e){return _e.get(e)||g(e)}:g,whenDefined:be?function(e){return we.race([_e.whenDefined(e),b(e)])}:b},!_e||/^force/.test(t.type))S();else if(!t.noBuiltIn)try{!function(t,n,r){var i=new RegExp("^<a\\s+is=('|\")"+r+"\\1></a>$");if(n[V]="a",(t.prototype=xe(Oe.prototype)).constructor=t,e.customElements.define(r,t,n),!i.test(T.createElement("a",{is:r}).outerHTML)||!i.test((new t).outerHTML))throw n}((function e(){return Reflect.construct(Oe,[],e)}),{},"document-register-element-a"+M)}catch(e){S()}if(!t.noBuiltIn)try{if(We.call(T,"a","a").outerHTML.indexOf("is")<0)throw{}}catch(e){je=function(e){return{is:e.toLowerCase()}}}}(window)},Hk3x:function(e,t,n){var r=n("MlCS");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},Hlud:function(e,t,n){n("B4wW")("observable")},HsRg:function(e,t,n){var r=n("6Zvs"),i=n("zqLp");r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},I5Jy:function(e,t,n){var r=n("IBxK"),i=n("QiaT"),o=n("OrC7");e.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,l=void 0===n?" ":String(n),c=r(t);if(c<=u||""==l)return s;var d=c-u,f=i.call(l,Math.ceil(d/l.length));return f.length>d&&(f=f.slice(0,d)),a?f+s:s+f}},IBxK:function(e,t,n){var r=n("IS5P"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},IS5P:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},Idnr:function(e,t,n){var r=n("Okwa"),i=n("Bl4z").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},"JG/L":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("6ap5")(0),o=n("lbZd")([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},JbqQ:function(e,t,n){"use strict";var r=n("h7JP"),i=n("b+/2"),o=n("lT22"),a=n("NHEB");e.exports=n("Eg+M")(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},Jj3s:function(e,t,n){var r=n("nP/W"),i=n("SfLy").onFreeze;n("sr7R")("freeze",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},Jt9q:function(e,t,n){e.exports=!n("CSYH")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},KEO2:function(e,t,n){"use strict";var r=n("Hk3x"),i=n("6Zvs"),o=n("gHi9"),a=n("sdQg"),s=n("3Op6"),u=n("IBxK"),l=n("E3To"),c=n("47sf");i(i.S+i.F*!n("GprO")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,f=o(e),h="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,m=void 0!==v,g=0,y=c(f);if(m&&(v=r(v,p>2?arguments[2]:void 0,2)),null==y||h==Array&&s(y))for(n=new h(t=u(f.length));t>g;g++)l(n,g,m?v(f[g],g):f[g]);else for(d=y.call(f),n=new h;!(i=d.next()).done;g++)l(n,g,m?a(d,v,[i.value,g],!0):i.value);return n.length=g,n}})},KFv0:function(e,t,n){var r=n("NdTx"),i=n("XtyL"),o=n("NHEB"),a=n("XRBt"),s=n("T9SM"),u=n("g9Oc"),l=Object.getOwnPropertyDescriptor;t.f=n("Jt9q")?l:function(e,t){if(e=o(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},Kam6:function(e,t,n){var r=n("6Zvs");r(r.S,"Reflect",{ownKeys:n("58gK")})},Kzeq:function(e,t,n){var r=n("Hk3x"),i=n("sdQg"),o=n("3Op6"),a=n("qG9X"),s=n("IBxK"),u=n("47sf"),l={},c={};(t=e.exports=function(e,t,n,d,f){var h,p,v,m,g=f?function(){return e}:u(e),y=r(n,d,t?2:1),_=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(o(g)){for(h=s(e.length);h>_;_++)if((m=t?y(a(p=e[_])[0],p[1]):y(e[_]))===l||m===c)return m}else for(v=g.call(e);!(p=v.next()).done;)if((m=i(v,y,p.value,t))===l||m===c)return m}).BREAK=l,t.RETURN=c},"LH+K":function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},LTSS:function(e,t,n){var r=n("6Zvs"),i=n("NHEB"),o=n("IBxK");r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},LTk5:function(e,t,n){var r=n("CzRT"),i=n("7ewW").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n("zqLp")(a);e.exports=function(){var e,t,n,l=function(){var r,i;for(u&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(l)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(l)}}else n=function(){i.call(r,l)};else{var d=!0,f=document.createTextNode("");new o(l).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},"Mb+X":function(e,t,n){(function(n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){"use strict";function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){u(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=a.URL||a.webkitURL,u=document.createElement("a");t=t||e.name||"download",u.download=t,u.rel="noopener","string"==typeof e?(u.href=e,u.origin===location.origin?o(u):i(u.href)?r(e,t,n):o(u,u.target="_blank")):(u.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){o(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(i(e))r(e,n,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){o(s)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var o="application/octet-stream"===e.type,u=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||o&&u||s)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,f=d.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout((function(){d.revokeObjectURL(f)}),4e4)}});a.saveAs=u.saveAs=u,e.exports=u})?r.apply(t,i):r)||(e.exports=o)}).call(this,n("UywP"))},MlCS:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},Mmmh:function(e,t,n){var r=n("CzRT"),i=n("qDq2"),o=n("u4vu").f,a=n("Idnr").f,s=n("gE22"),u=n("a/gg"),l=r.RegExp,c=l,d=l.prototype,f=/a/g,h=/a/g,p=new l(f)!==f;if(n("Jt9q")&&(!p||n("CSYH")((function(){return h[n("g5pV")("match")]=!1,l(f)!=f||l(h)==h||"/a/i"!=l(f,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),o=void 0===t;return!n&&r&&e.constructor===l&&o?e:i(p?new c(r&&!o?e.source:e,t):c((r=e instanceof l)?e.source:e,r&&o?u.call(e):t),n?this:d,l)};for(var v=function(e){e in l||o(l,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})},m=a(c),g=0;m.length>g;)v(m[g++]);d.constructor=l,l.prototype=d,n("hOgw")(r,"RegExp",l)}n("+WbQ")("RegExp")},MuoG:function(e,t,n){var r=n("gHi9"),i=n("k8pk");n("sr7R")("keys",(function(){return function(e){return i(r(e))}}))},NEGA:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("MlCS"),o=n("gHi9"),a=n("CSYH"),s=[].sort,u=[1,2,3];r(r.P+r.F*(a((function(){u.sort(void 0)}))||!a((function(){u.sort(null)}))||!n("lbZd")(s)),"Array",{sort:function(e){return void 0===e?s.call(o(this)):s.call(o(this),i(e))}})},NFGw:function(e,t,n){var r=n("6Zvs");r(r.S,"Number",{isNaN:function(e){return e!=e}})},"NGC/":function(e,t,n){"use strict";var r=n("fuPg"),i=n("XtyL"),o=n("usP3"),a={};n("Bl3t")(a,n("g5pV")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},NHEB:function(e,t,n){var r=n("G5bc"),i=n("OrC7");e.exports=function(e){return r(i(e))}},NMJc:function(e,t,n){"use strict";var r=n("qG9X"),i=n("XRBt"),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},NdTx:function(e,t){t.f={}.propertyIsEnumerable},O3Uf:function(e,t,n){"use strict";n("a2+z")("strike",(function(e){return function(){return e(this,"strike","","")}}))},OKyS:function(e,t,n){var r=n("tig4"),i=n("AG1B");"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},OUrq:function(e,t,n){var r=n("6Zvs");r(r.P+r.R,"Set",{toJSON:n("vRXo")("Set")})},Og1P:function(e,t,n){var r=n("uqfp")("keys"),i=n("2LOv");e.exports=function(e){return r[e]||(r[e]=i(e))}},Okwa:function(e,t,n){var r=n("T9SM"),i=n("NHEB"),o=n("UqQs")(!1),a=n("Og1P")("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)n!=a&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},OrC7:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},P1vA:function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r.toString,s=r.getTime;new Date(NaN)+""!=i&&n("hOgw")(r,o,(function(){var e=s.call(this);return e==e?a.call(this):i}))},P4YY:function(e,t,n){var r=n("6Zvs");r(r.S,"Object",{setPrototypeOf:n("4P8B").set})},P55W:function(e,t,n){var r=n("u4vu"),i=n("qG9X"),o=n("k8pk");e.exports=n("Jt9q")?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},P6fP:function(e,t,n){var r=n("MlCS"),i=n("gHi9"),o=n("G5bc"),a=n("IBxK");e.exports=function(e,t,n,s,u){r(t);var l=i(e),c=o(l),d=a(l.length),f=u?d-1:0,h=u?-1:1;if(n<2)for(;;){if(f in c){s=c[f],f+=h;break}if(f+=h,u?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:d>f;f+=h)f in c&&(s=t(s,c[f],f,l));return s}},"PF+O":function(e,t,n){var r=n("6Zvs");r(r.P+r.R,"Map",{toJSON:n("vRXo")("Map")})},PFZ3:function(e,t,n){var r=n("k8pk"),i=n("DClA"),o=n("NdTx");e.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),u=o.f,l=0;s.length>l;)u.call(e,a=s[l++])&&t.push(a);return t}},PYqL:function(e,t){e.exports=!1},PdG6:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=n>>>0;return(t>>>0)+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},Pjja:function(e,t,n){"use strict";var r=n("mN7E"),i=n("Cyja"),o="Map";e.exports=n("C8qm")(o,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,o),e);return t&&t.v},set:function(e,t){return r.def(i(this,o),0===e?0:e,t)}},r,!0)},Pkkd:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},"Q+xJ":function(e,t,n){"use strict";var r=n("FmPI")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},QCSf:function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},QFcP:function(e,t,n){"use strict";n("3kk6");var r=n("qG9X"),i=n("a/gg"),o=n("Jt9q"),a="toString",s=/./.toString,u=function(e){n("hOgw")(RegExp.prototype,a,e,!0)};n("CSYH")((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?u((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):s.name!=a&&u((function(){return s.call(this)}))},Qchu:function(e,t,n){var r=n("6Zvs"),i=180/Math.PI;r(r.S,"Math",{degrees:function(e){return e*i}})},QiaT:function(e,t,n){"use strict";var r=n("IS5P"),i=n("OrC7");e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},Qk9t:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},Qy8u:function(e,t,n){var r=n("6Zvs");r(r.S,"Date",{now:function(){return(new Date).getTime()}})},REGE:function(e,t,n){var r=n("NHEB"),i=n("Idnr").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},RIuc:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{signbit:function(e){return(e=+e)!=e?e:0==e?1/e==1/0:e>0}})},S3lv:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("MlCS"),o=n("Hk3x"),a=n("Kzeq");e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,s,u=arguments[1];return i(this),(t=void 0!==u)&&i(u),null==e?new this:(n=[],t?(r=0,s=o(u,arguments[2],2),a(e,!1,(function(e){n.push(s(e,r++))}))):a(e,!1,n.push,n),new this(n))}})}},SDYs:function(e,t,n){var r=n("qG9X"),i=n("nP/W"),o=n("1Mlq");e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},SJCa:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("6ap5")(2);r(r.P+r.F*!n("lbZd")([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},SL6O:function(e,t,n){n("S3lv")("WeakMap")},SfLy:function(e,t,n){var r=n("2LOv")("meta"),i=n("nP/W"),o=n("T9SM"),a=n("u4vu").f,s=0,u=Object.isExtensible||function(){return!0},l=!n("CSYH")((function(){return u(Object.preventExtensions({}))})),c=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&d.NEED&&u(e)&&!o(e,r)&&c(e),e}}},Sr9y:function(e,t,n){var r=n("gHi9"),i=n("rdyb");n("sr7R")("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},Sun6:function(e,t,n){var r=n("nP/W"),i=n("SfLy").onFreeze;n("sr7R")("seal",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},T9SM:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},TDnd:function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,d=-1;function f(){c&&u&&(c=!1,u.length?l=u.concat(l):d=-1,l.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},TTOz:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("6ap5")(4);r(r.P+r.F*!n("lbZd")([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},TitO:function(e,t,n){n("sr7R")("getOwnPropertyNames",(function(){return n("REGE").f}))},TnZK:function(e,t,n){"use strict";n("a2+z")("blink",(function(e){return function(){return e(this,"blink","","")}}))},UAdq:function(e,t,n){n("S3lv")("WeakSet")},UBF9:function(e,t,n){"use strict";var r=n("DQ26");n.n(r).a},UXO0:function(e,t,n){var r=n("6Zvs"),i=n("DuUM"),o=n("aioW");r(r.S,"Math",{fscale:function(e,t,n,r,a){return o(i(e,t,n,r,a))}})},UZlR:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("IBxK"),o=n("2zQq"),a="endsWith",s="".endsWith;r(r.P+r.F*n("WBxH")(a),"String",{endsWith:function(e){var t=o(this,e,a),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),l=String(e);return s?s.call(t,l,u):t.slice(u-l.length,u)===l}})},UhzP:function(e,t,n){n("lPBy"),n("9b2o"),n("EIT+"),n("FZoA"),n("34SM"),n("Sr9y"),n("MuoG"),n("TitO"),n("Jj3s"),n("Sun6"),n("EEon"),n("eJKh"),n("iGir"),n("DUyB"),n("a6At"),n("tMGs"),n("P4YY"),n("kkT2"),n("DNwU"),n("pFDu"),n("adtI"),n("1htP"),n("wyXM"),n("5oDD"),n("eJas"),n("FNH+"),n("onE/"),n("/af7"),n("bnD9"),n("NFGw"),n("GCCH"),n("YAa1"),n("wzGP"),n("g5uw"),n("EY5l"),n("Vn79"),n("3NoG"),n("y/cC"),n("0/A7"),n("cyyO"),n("vjMg"),n("waXl"),n("emtv"),n("vob5"),n("9MEG"),n("Pkkd"),n("pToA"),n("Qk9t"),n("x/d9"),n("048k"),n("0csP"),n("bGIW"),n("zCeI"),n("LTSS"),n("YWGH"),n("DIQv"),n("gBhe"),n("UZlR"),n("mC7n"),n("19gH"),n("0xxC"),n("7gar"),n("gjvf"),n("TnZK"),n("wsYS"),n("o4PT"),n("5BhU"),n("FabU"),n("wIR4"),n("Uok2"),n("Wk2d"),n("O3Uf"),n("w4s5"),n("6ANa"),n("Qy8u"),n("AaTj"),n("3uIT"),n("P1vA"),n("eRyi"),n("7sMS"),n("KEO2"),n("AjBM"),n("yppY"),n("me8Y"),n("NEGA"),n("JG/L"),n("Vm4B"),n("SJCa"),n("56d0"),n("TTOz"),n("Acjw"),n("zgUC"),n("CFuw"),n("kvhr"),n("cMVS"),n("APKf"),n("5bTj"),n("p+WI"),n("j7Hu"),n("JbqQ"),n("Mmmh"),n("v3OP"),n("QFcP"),n("3kk6"),n("0PKJ"),n("je7k"),n("2R1b"),n("/ALM"),n("XxzG"),n("Pjja"),n("xcso"),n("5i1J"),n("vzSm"),n("beDZ"),n("/Hwg"),n("kPm7"),n("t2v2"),n("3KC/"),n("CGwd"),n("BAqB"),n("9T8Z"),n("8zpv"),n("Ex+h"),n("vLlL"),n("YvAf"),n("ev4w"),n("b5uo"),n("/wIV"),n("7ITH"),n("iDBd"),n("Bz0c"),n("Uvkl"),n("BoJA"),n("8zQ5"),n("Kam6"),n("WkLS"),n("1GBN"),n("yr43"),n("qhgO"),n("4rlp"),n("7UuE"),n("mEjU"),n("uJpW"),n("kQXc"),n("g6b2"),n("uWg0"),n("nxFa"),n("n2D4"),n("Hlud"),n("rGdY"),n("s9dh"),n("CWzX"),n("DgE9"),n("X+le"),n("e6pC"),n("aE0E"),n("PF+O"),n("OUrq"),n("29CL"),n("Fp97"),n("wlCu"),n("1tSY"),n("mR1C"),n("eaga"),n("SL6O"),n("UAdq"),n("yBXD"),n("/bDA"),n("HsRg"),n("539R"),n("XzJy"),n("Qchu"),n("UXO0"),n("PdG6"),n("gdvq"),n("B9Ti"),n("A7sX"),n("eDkL"),n("w1gs"),n("lCrv"),n("RIuc"),n("tH/n"),n("lLwX"),n("bcGJ"),n("vpH9"),n("qbkY"),n("tkWd"),n("/b8B"),n("qur+"),n("kLUt"),n("+VX4"),n("4mts"),n("hjCl"),n("UpYr"),n("yBh6"),n("xfeU"),n("G8eP"),e.exports=n("duNF")},Uok2:function(e,t,n){"use strict";n("a2+z")("link",(function(e){return function(t){return e(this,"a","href",t)}}))},UpYr:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("CzRT"),o=n("duNF"),a=n("LTk5")(),s=n("g5pV")("observable"),u=n("MlCS"),l=n("qG9X"),c=n("i1r4"),d=n("b0Vn"),f=n("Bl3t"),h=n("Kzeq"),p=h.RETURN,v=function(e){return null==e?void 0:u(e)},m=function(e){var t=e._c;t&&(e._c=void 0,t())},g=function(e){return void 0===e._o},y=function(e){g(e)||(e._o=void 0,m(e))},_=function(e,t){l(e),this._c=void 0,this._o=e,e=new b(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}g(this)&&m(this)};_.prototype=d({},{unsubscribe:function(){y(this)}});var b=function(e){this._s=e};b.prototype=d({},{next:function(e){var t=this._s;if(!g(t)){var n=t._o;try{var r=v(n.next);if(r)return r.call(n,e)}catch(e){try{y(t)}finally{throw e}}}},error:function(e){var t=this._s;if(g(t))throw e;var n=t._o;t._o=void 0;try{var r=v(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{m(t)}finally{throw e}}return m(t),e},complete:function(e){var t=this._s;if(!g(t)){var n=t._o;t._o=void 0;try{var r=v(n.complete);e=r?r.call(n,e):void 0}catch(e){try{m(t)}finally{throw e}}return m(t),e}}});var S=function(e){c(this,S,"Observable","_f")._f=u(e)};d(S.prototype,{subscribe:function(e){return new _(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)((function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n})}))}}),d(S,{from:function(e){var t="function"==typeof this?this:S,n=v(l(e)[s]);if(n){var r=l(n.call(e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}return new t((function(t){var n=!1;return a((function(){if(!n){try{if(h(e,!1,(function(e){if(t.next(e),n)return p}))===p)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}})),function(){n=!0}}))},of:function(){for(var e=0,t=arguments.length,n=new Array(t);e<t;)n[e]=arguments[e++];return new("function"==typeof this?this:S)((function(e){var t=!1;return a((function(){if(!t){for(var r=0;r<n.length;++r)if(e.next(n[r]),t)return;e.complete()}})),function(){t=!0}}))}}),f(S.prototype,s,(function(){return this})),r(r.G,{Observable:S}),n("+WbQ")("Observable")},UqQs:function(e,t,n){var r=n("NHEB"),i=n("IBxK"),o=n("cyvI");e.exports=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},Uvkl:function(e,t,n){var r=n("6Zvs"),i=n("rdyb"),o=n("qG9X");r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},UywP:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},Vm4B:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("6ap5")(1);r(r.P+r.F*!n("lbZd")([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},Vn79:function(e,t,n){var r=n("6Zvs"),i=n("3vGM"),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},WBxH:function(e,t,n){var r=n("g5pV")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},WCZW:function(e,t,n){"use strict";var r=n("0ct0"),i=n("nP/W"),o=n("IBxK"),a=n("Hk3x"),s=n("g5pV")("isConcatSpreadable");e.exports=function e(t,n,u,l,c,d,f,h){for(var p,v,m=c,g=0,y=!!f&&a(f,h,3);g<l;){if(g in u){if(p=y?y(u[g],g,n):u[g],v=!1,i(p)&&(v=void 0!==(v=p[s])?!!v:r(p)),v&&d>0)m=e(t,n,p,o(p.length),m,d-1)-1;else{if(m>=9007199254740991)throw TypeError();t[m]=p}m++}g++}return m}},Wk2d:function(e,t,n){"use strict";n("a2+z")("small",(function(e){return function(){return e(this,"small","","")}}))},WkLS:function(e,t,n){var r=n("6Zvs"),i=n("qG9X"),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},"X+le":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("gHi9"),o=n("MlCS"),a=n("u4vu");n("Jt9q")&&r(r.P+n("lMtF"),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},XRBt:function(e,t,n){var r=n("nP/W");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},XcOH:function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},XtyL:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},XxzG:function(e,t,n){"use strict";var r,i,o,a,s=n("PYqL"),u=n("CzRT"),l=n("Hk3x"),c=n("1EV7"),d=n("6Zvs"),f=n("nP/W"),h=n("MlCS"),p=n("i1r4"),v=n("Kzeq"),m=n("Gwsb"),g=n("7ewW").set,y=n("LTk5")(),_=n("1Mlq"),b=n("+0kC"),S=n("rrjf"),T=n("SDYs"),w="Promise",k=u.TypeError,E=u.process,C=E&&E.versions,A=C&&C.v8||"",j=u.Promise,x="process"==c(E),P=function(){},L=i=_.f,O=!!function(){try{var e=j.resolve(1),t=(e.constructor={})[n("g5pV")("species")]=function(e){e(P,P)};return(x||"function"==typeof PromiseRejectionEvent)&&e.then(P)instanceof t&&0!==A.indexOf("6.6")&&-1===S.indexOf("Chrome/66")}catch(e){}}(),R=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},I=function(e,t){if(!e._n){e._n=!0;var n=e._c;y((function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(i||(2==e._h&&U(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),a=!0)),n===t.promise?l(k("Promise-chain cycle")):(o=R(n))?o.call(n,u,l):u(n)):l(r)}catch(e){c&&!a&&c.exit(),l(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&M(e)}))}},M=function(e){g.call(u,(function(){var t,n,r,i=e._v,o=D(e);if(o&&(t=b((function(){x?E.emit("unhandledRejection",i,e):(n=u.onunhandledrejection)?n({promise:e,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=x||D(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},D=function(e){return 1!==e._h&&0===(e._a||e._c).length},U=function(e){g.call(u,(function(){var t;x?E.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},B=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),I(t,!0))},N=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=R(e))?y((function(){var r={_w:n,_d:!1};try{t.call(e,l(N,r,1),l(B,r,1))}catch(e){B.call(r,e)}})):(n._v=e,n._s=1,I(n,!1))}catch(e){B.call({_w:n,_d:!1},e)}}};O||(j=function(e){p(this,j,w,"_h"),h(e),r.call(this);try{e(l(N,this,1),l(B,this,1))}catch(e){B.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("b0Vn")(j.prototype,{then:function(e,t){var n=L(m(this,j));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=x?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=l(N,e,1),this.reject=l(B,e,1)},_.f=L=function(e){return e===j||e===a?new o(e):i(e)}),d(d.G+d.W+d.F*!O,{Promise:j}),n("usP3")(j,w),n("+WbQ")(w),a=n("duNF").Promise,d(d.S+d.F*!O,w,{reject:function(e){var t=L(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!O),w,{resolve:function(e){return T(s&&this===a?j:this,e)}}),d(d.S+d.F*!(O&&n("GprO")((function(e){j.all(e).catch(P)}))),w,{all:function(e){var t=this,n=L(t),r=n.resolve,i=n.reject,o=b((function(){var n=[],o=0,a=1;v(e,!1,(function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[s]=e,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=L(t),r=n.reject,i=b((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},XzJy:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},YAa1:function(e,t,n){var r=n("6Zvs");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},YWGH:function(e,t,n){"use strict";n("6zRk")("trim",(function(e){return function(){return e(this,3)}}))},YvAf:function(e,t,n){var r=n("6Zvs"),i=n("MlCS"),o=n("qG9X"),a=(n("CzRT").Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n("CSYH")((function(){a((function(){}))})),"Reflect",{apply:function(e,t,n){var r=i(e),u=o(n);return a?a(r,t,u):s.call(r,t,u)}})},Z2oa:function(e,t,n){"use strict";var r=n("gHi9"),i=n("cyvI"),o=n("IBxK");e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),u=i(t,a),l=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===l?a:i(l,a))-u,a-s),d=1;for(u<s&&s<u+c&&(d=-1,u+=c-1,s+=c-1);c-- >0;)u in n?n[s]=n[u]:delete n[s],s+=d,u+=d;return n}},Zsq7:function(e,t,n){var r=n("6Zvs"),i=n("gg7v")(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},"a/gg":function(e,t,n){"use strict";var r=n("qG9X");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"a2+z":function(e,t,n){var r=n("6Zvs"),i=n("CSYH"),o=n("OrC7"),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},a6At:function(e,t,n){var r=n("6Zvs");r(r.S+r.F,"Object",{assign:n("nxVP")})},aE0E:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("gHi9"),o=n("XRBt"),a=n("rdyb"),s=n("KFv0").f;n("Jt9q")&&r(r.P+n("lMtF"),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do{if(t=s(n,r))return t.set}while(n=a(n))}})},abDT:function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},adtI:function(e,t,n){"use strict";var r=n("nP/W"),i=n("rdyb"),o=n("g5pV")("hasInstance"),a=Function.prototype;o in a||n("u4vu").f(a,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},aioW:function(e,t,n){var r=n("9Zdl"),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),l=r(e);return i<u?l*(i/u/a+1/o-1/o)*u*a:(n=(t=(1+a/o)*i)-(t-i))>s||n!=n?l*(1/0):l*n}},"b+/2":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},b0Vn:function(e,t,n){var r=n("hOgw");e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},b5uo:function(e,t,n){var r=n("u4vu"),i=n("6Zvs"),o=n("qG9X"),a=n("XRBt");i(i.S+i.F*n("CSYH")((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,t,n){o(e),t=a(t,!0),o(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},bGIW:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},bcGJ:function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,i(n),o(r))}})},beDZ:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("+izM"),o=n("+bx0"),a=n("qG9X"),s=n("cyvI"),u=n("IBxK"),l=n("nP/W"),c=n("CzRT").ArrayBuffer,d=n("Gwsb"),f=o.ArrayBuffer,h=o.DataView,p=i.ABV&&c.isView,v=f.prototype.slice,m=i.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(c!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,g,{isView:function(e){return p&&p(e)||l(e)&&m in e}}),r(r.P+r.U+r.F*n("CSYH")((function(){return!new f(2).slice(1,void 0).byteLength})),g,{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(d(this,f))(u(i-r)),l=new h(this),c=new h(o),p=0;r<i;)c.setUint8(p++,l.getUint8(r++));return o}}),n("+WbQ")(g)},bnD9:function(e,t,n){var r=n("6Zvs");r(r.S,"Number",{isInteger:n("vaCW")})},cMVS:function(e,t,n){var r=n("6Zvs");r(r.P,"Array",{copyWithin:n("Z2oa")}),n("h7JP")("copyWithin")},cPKL:function(e,t,n){var r=n("BFEv");e.exports=function(e,t){return new(r(e))(t)}},cyvI:function(e,t,n){var r=n("IS5P"),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},cyyO:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},duNF:function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},e6pC:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("gHi9"),o=n("XRBt"),a=n("rdyb"),s=n("KFv0").f;n("Jt9q")&&r(r.P+n("lMtF"),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do{if(t=s(n,r))return t.get}while(n=a(n))}})},eDkL:function(e,t,n){var r=n("6Zvs"),i=Math.PI/180;r(r.S,"Math",{radians:function(e){return e*i}})},eJKh:function(e,t,n){var r=n("nP/W");n("sr7R")("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},eJas:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("IS5P"),o=n("mp0a"),a=n("QiaT"),s=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",d="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*l[n],l[n]=r%1e7,r=u(r/1e7)},h=function(e){for(var t=6,n=0;--t>=0;)n+=l[t],l[t]=u(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==l[e]){var n=String(l[e]);t=""===t?n:t+a.call(d,7-n.length)+n}return t},v=function(e,t,n){return 0===t?n:t%2==1?v(e,t-1,n*e):v(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n("CSYH")((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,u=o(this,c),l=i(e),m="",g=d;if(l<0||l>20)throw RangeError(c);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(m="-",u=-u),u>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(u*v(2,69,1))-69)<0?u*v(2,-t,1):u/v(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),r=l;r>=7;)f(1e7,0),r-=7;for(f(v(10,r,1),0),r=t-1;r>=23;)h(1<<23),r-=23;h(1<<r),f(1,1),h(2),g=p()}else f(0,n),f(1<<-t,0),g=p()+a.call(d,l);return g=l>0?m+((s=g.length)<=l?"0."+a.call(d,l-s)+g:g.slice(0,s-l)+"."+g.slice(s-l)):m+g}})},eRyi:function(e,t,n){var r=n("g5pV")("toPrimitive"),i=Date.prototype;r in i||n("Bl3t")(i,r,n("NMJc"))},eaga:function(e,t,n){n("S3lv")("Set")},efJX:function(e,t,n){n("Zsq7"),e.exports=n("duNF").RegExp.escape},emtv:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{fround:n("aioW")})},ev4w:function(e,t,n){var r=n("6Zvs"),i=n("fuPg"),o=n("MlCS"),a=n("qG9X"),s=n("nP/W"),u=n("CSYH"),l=n("4vfJ"),c=(n("CzRT").Reflect||{}).construct,d=u((function(){function e(){}return!(c((function(){}),[],e)instanceof e)})),f=!u((function(){c((function(){}))}));r(r.S+r.F*(d||f),"Reflect",{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(f&&!d)return c(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(l.apply(e,r))}var u=n.prototype,h=i(s(u)?u:Object.prototype),p=Function.apply.call(e,h,t);return s(p)?p:h}})},ez6g:function(e,t,n){"use strict";var r=n("CSYH"),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},"f/iY":function(e,t,n){var r=n("CzRT").parseInt,i=n("6zRk").trim,o=n("XcOH"),a=/^[-+]?0[xX]/;e.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},fuPg:function(e,t,n){var r=n("qG9X"),i=n("P55W"),o=n("Bl4z"),a=n("Og1P")("IE_PROTO"),s=function(){},u=function(){var e,t=n("6NdC")("iframe"),r=o.length;for(t.style.display="none",n("u8yI").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},g5pV:function(e,t,n){var r=n("uqfp")("wks"),i=n("2LOv"),o=n("CzRT").Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},g5uw:function(e,t,n){var r=n("6Zvs"),i=n("iJ6w");r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},g6b2:function(e,t,n){"use strict";n("6zRk")("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},g9Oc:function(e,t,n){e.exports=!n("Jt9q")&&!n("CSYH")((function(){return 7!=Object.defineProperty(n("6NdC")("div"),"a",{get:function(){return 7}}).a}))},gBhe:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("FmPI")(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},gDp1:function(e,t,n){var r=n("Pjja"),i=n("6Zvs"),o=n("uqfp")("metadata"),a=o.store||(o.store=new(n("5i1J"))),s=function(e,t,n){var i=a.get(e);if(!i){if(!n)return;a.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o};e.exports={store:a,map:s,has:function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){s(n,r,!0).set(e,t)},keys:function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach((function(e,t){r.push(t)})),r},key:function(e){return void 0===e||"symbol"==typeof e?e:String(e)},exp:function(e){i(i.S,"Reflect",e)}}},gE22:function(e,t,n){var r=n("nP/W"),i=n("zqLp"),o=n("g5pV")("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},gHi9:function(e,t,n){var r=n("OrC7");e.exports=function(e){return Object(r(e))}},gdvq:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=n>>>0;return(t>>>0)-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},gg7v:function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},gjvf:function(e,t,n){"use strict";n("a2+z")("big",(function(e){return function(){return e(this,"big","","")}}))},h7JP:function(e,t,n){var r=n("g5pV")("unscopables"),i=Array.prototype;null==i[r]&&n("Bl3t")(i,r,{}),e.exports=function(e){i[r][e]=!0}},hOgw:function(e,t,n){var r=n("CzRT"),i=n("Bl3t"),o=n("T9SM"),a=n("2LOv")("src"),s=n("Bf1l"),u="toString",l=(""+s).split(u);n("duNF").inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},hjCl:function(e,t,n){var r=n("6Zvs"),i=n("LTk5")(),o=n("CzRT").process,a="process"==n("zqLp")(o);r(r.G,{asap:function(e){var t=a&&o.domain;i(t?t.bind(e):e)}})},i1r4:function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},iDBd:function(e,t,n){var r=n("KFv0"),i=n("rdyb"),o=n("T9SM"),a=n("6Zvs"),s=n("nP/W"),u=n("qG9X");a(a.S,"Reflect",{get:function e(t,n){var a,l,c=arguments.length<3?t:arguments[2];return u(t)===c?t[n]:(a=r.f(t,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(c):void 0:s(l=i(t))?e(l,n,c):void 0}})},iGir:function(e,t,n){var r=n("nP/W");n("sr7R")("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},iJ6w:function(e,t,n){var r=n("CzRT").parseFloat,i=n("6zRk").trim;e.exports=1/r(n("XcOH")+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},j7Hu:function(e,t,n){n("+WbQ")("Array")},je7k:function(e,t,n){"use strict";var r=n("qG9X"),i=n("gHi9"),o=n("IBxK"),a=n("IS5P"),s=n("Q+xJ"),u=n("9Bdx"),l=Math.max,c=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n("xG+P")("replace",2,(function(e,t,n,p){return[function(r,i){var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(e,t){var i=p(n,e,this,t);if(i.done)return i.value;var d=r(e),f=String(this),h="function"==typeof t;h||(t=String(t));var m=d.global;if(m){var g=d.unicode;d.lastIndex=0}for(var y=[];;){var _=u(d,f);if(null===_)break;if(y.push(_),!m)break;""===String(_[0])&&(d.lastIndex=s(f,o(d.lastIndex),g))}for(var b,S="",T=0,w=0;w<y.length;w++){_=y[w];for(var k=String(_[0]),E=l(c(a(_.index),f.length),0),C=[],A=1;A<_.length;A++)C.push(void 0===(b=_[A])?b:String(b));var j=_.groups;if(h){var x=[k].concat(C,E,f);void 0!==j&&x.push(j);var P=String(t.apply(void 0,x))}else P=v(k,f,E,C,j,t);E>=T&&(S+=f.slice(T,E)+P,T=E+k.length)}return S+f.slice(T)}];function v(e,t,r,o,a,s){var u=r+e.length,l=o.length,c=h;return void 0!==a&&(a=i(a),c=f),n.call(s,c,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":s=a[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>l){var f=d(c/10);return 0===f?n:f<=l?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}s=o[c-1]}return void 0===s?"":s}))}}))},k8pk:function(e,t,n){var r=n("Okwa"),i=n("Bl4z");e.exports=Object.keys||function(e){return r(e,i)}},kLUt:function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=n("rdyb"),a=r.has,s=r.key,u=function(e,t,n){if(a(e,t,n))return!0;var r=o(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},kPm7:function(e,t,n){n("EGsU")("Int8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},kQXc:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("I5Jy"),o=n("rrjf"),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},kkT2:function(e,t,n){"use strict";var r=n("1EV7"),i={};i[n("g5pV")("toStringTag")]="z",i+""!="[object z]"&&n("hOgw")(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},kvhr:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("NHEB"),o=n("IS5P"),a=n("IBxK"),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n("lbZd")(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},lCrv:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>>16,u=i>>>16,l=(s*a>>>0)+(o*a>>>16);return s*u+(l>>>16)+((o*u>>>0)+(l&n)>>>16)}})},lLwX:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("1Mlq"),o=n("+0kC");r(r.S,"Promise",{try:function(e){var t=i.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},lMtF:function(e,t,n){"use strict";e.exports=n("PYqL")||!n("CSYH")((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete n("CzRT")[e]}))},lPBy:function(e,t,n){"use strict";var r=n("CzRT"),i=n("T9SM"),o=n("Jt9q"),a=n("6Zvs"),s=n("hOgw"),u=n("SfLy").KEY,l=n("CSYH"),c=n("uqfp"),d=n("usP3"),f=n("2LOv"),h=n("g5pV"),p=n("GlgS"),v=n("B4wW"),m=n("PFZ3"),g=n("0ct0"),y=n("qG9X"),_=n("nP/W"),b=n("gHi9"),S=n("NHEB"),T=n("XRBt"),w=n("XtyL"),k=n("fuPg"),E=n("REGE"),C=n("KFv0"),A=n("DClA"),j=n("u4vu"),x=n("k8pk"),P=C.f,L=j.f,O=E.f,R=r.Symbol,I=r.JSON,M=I&&I.stringify,D=h("_hidden"),U=h("toPrimitive"),B={}.propertyIsEnumerable,N=c("symbol-registry"),F=c("symbols"),V=c("op-symbols"),z=Object.prototype,H="function"==typeof R&&!!A.f,G=r.QObject,q=!G||!G.prototype||!G.prototype.findChild,W=o&&l((function(){return 7!=k(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=P(z,t);r&&delete z[t],L(e,t,n),r&&e!==z&&L(z,t,r)}:L,$=function(e){var t=F[e]=k(R.prototype);return t._k=e,t},K=H&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},X=function(e,t,n){return e===z&&X(V,t,n),y(e),t=T(t,!0),y(n),i(F,t)?(n.enumerable?(i(e,D)&&e[D][t]&&(e[D][t]=!1),n=k(n,{enumerable:w(0,!1)})):(i(e,D)||L(e,D,w(1,{})),e[D][t]=!0),W(e,t,n)):L(e,t,n)},Y=function(e,t){y(e);for(var n,r=m(t=S(t)),i=0,o=r.length;o>i;)X(e,n=r[i++],t[n]);return e},Z=function(e){var t=B.call(this,e=T(e,!0));return!(this===z&&i(F,e)&&!i(V,e))&&(!(t||!i(this,e)||!i(F,e)||i(this,D)&&this[D][e])||t)},J=function(e,t){if(e=S(e),t=T(t,!0),e!==z||!i(F,t)||i(V,t)){var n=P(e,t);return!n||!i(F,t)||i(e,D)&&e[D][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=O(S(e)),r=[],o=0;n.length>o;)i(F,t=n[o++])||t==D||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===z,r=O(n?V:S(e)),o=[],a=0;r.length>a;)!i(F,t=r[a++])||n&&!i(z,t)||o.push(F[t]);return o};H||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(V,n),i(this,D)&&i(this[D],e)&&(this[D][e]=!1),W(this,e,w(1,n))};return o&&q&&W(z,e,{configurable:!0,set:t}),$(e)}).prototype,"toString",(function(){return this._k})),C.f=J,j.f=X,n("Idnr").f=E.f=Q,n("NdTx").f=Z,A.f=ee,o&&!n("PYqL")&&s(z,"propertyIsEnumerable",Z,!0),p.f=function(e){return $(h(e))}),a(a.G+a.W+a.F*!H,{Symbol:R});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=x(h.store),ie=0;re.length>ie;)v(re[ie++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return i(N,e+="")?N[e]:N[e]=R(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!H,"Object",{create:function(e,t){return void 0===t?k(e):Y(k(e),t)},defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var oe=l((function(){A.f(1)}));a(a.S+a.F*oe,"Object",{getOwnPropertySymbols:function(e){return A.f(b(e))}}),I&&a(a.S+a.F*(!H||l((function(){var e=R();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(_(t)||void 0!==e)&&!K(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!K(t))return t}),r[1]=t,M.apply(I,r)}}),R.prototype[U]||n("Bl3t")(R.prototype,U,R.prototype.valueOf),d(R,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},lT22:function(e,t){e.exports={}},lbZd:function(e,t,n){"use strict";var r=n("CSYH");e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},mC7n:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("2zQq"),o="includes";r(r.P+r.F*n("WBxH")(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},mEjU:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("FmPI")(!0),o=n("CSYH")((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*o,"String",{at:function(e){return i(this,e)}})},mN7E:function(e,t,n){"use strict";var r=n("u4vu").f,i=n("fuPg"),o=n("b0Vn"),a=n("Hk3x"),s=n("i1r4"),u=n("Kzeq"),l=n("Eg+M"),c=n("b+/2"),d=n("+WbQ"),f=n("Jt9q"),h=n("SfLy").fastKey,p=n("Cyja"),v=f?"_s":"size",m=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[v]=0,null!=r&&u(r,n,e[l],e)}));return o(c.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=p(this,t),r=m(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(e){p(this,t);for(var n,r=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!m(p(this,t),e)}}),f&&r(c.prototype,"size",{get:function(){return p(this,t)[v]}}),c},def:function(e,t,n){var r,i,o=m(e,t);return o?o.v=n:(e._l=o={i:i=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[v]++,"F"!==i&&(e._i[i]=o)),e},getEntry:m,setStrong:function(e,t,n){l(e,t,(function(e,n){this._t=p(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?c(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(e._t=void 0,c(1))}),n?"entries":"values",!n,!0),d(t)}}},mR1C:function(e,t,n){n("S3lv")("Map")},me8Y:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("u8yI"),o=n("zqLp"),a=n("cyvI"),s=n("IBxK"),u=[].slice;r(r.P+r.F*n("CSYH")((function(){i&&u.call(i)})),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=a(e,n),l=a(t,n),c=s(l-i),d=new Array(c),f=0;f<c;f++)d[f]="String"==r?this.charAt(i+f):this[i+f];return d}})},mp0a:function(e,t,n){var r=n("zqLp");e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},n0Vy:function(e,t,n){"use strict";(function(e){if(n("UhzP"),n("z8K7"),n("efJX"),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;function t(e,t,n){e[t]||Object.defineProperty(e,t,{writable:!0,configurable:!0,value:n})}t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach((function(e){[][e]&&t(Array,e,Function.call.bind([][e]))}))}).call(this,n("UywP"))},n2D4:function(e,t,n){n("B4wW")("asyncIterator")},"nP/W":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},nxFa:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("OrC7"),o=n("IBxK"),a=n("gE22"),s=n("a/gg"),u=RegExp.prototype,l=function(e,t){this._r=e,this._s=t};n("NGC/")(l,"RegExp String",(function(){var e=this._r.exec(this._s);return{value:e,done:null===e}})),r(r.P,"String",{matchAll:function(e){if(i(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(e.lastIndex),new l(r,t)}})},nxVP:function(e,t,n){"use strict";var r=n("Jt9q"),i=n("k8pk"),o=n("DClA"),a=n("NdTx"),s=n("gHi9"),u=n("G5bc"),l=Object.assign;e.exports=!l||n("CSYH")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=s(e),l=arguments.length,c=1,d=o.f,f=a.f;l>c;)for(var h,p=u(arguments[c++]),v=d?i(p).concat(d(p)):i(p),m=v.length,g=0;m>g;)h=v[g++],r&&!f.call(p,h)||(n[h]=p[h]);return n}:l},o4PT:function(e,t,n){"use strict";n("a2+z")("fixed",(function(e){return function(){return e(this,"tt","","")}}))},"onE/":function(e,t,n){var r=n("6Zvs");r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},"p+WI":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("6ap5")(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n("h7JP")(o)},p0CF:function(e,t,n){"use strict";var r=n("gHi9"),i=n("cyvI"),o=n("IBxK");e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},pFDu:function(e,t,n){var r=n("u4vu").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,a="name";a in i||n("Jt9q")&&r(i,a,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},pToA:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{log1p:n("3vGM")})},phgA:function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"q/s7":function(e,t,n){"use strict";n.r(t);var r=n("0pJw"),i=n.n(r);n("HfrQ");function o(e,t){return e.__proto__=t,e}Object.setPrototypeOf=Object.setPrototypeOf||o;o.bind(Object);var a="undefined"!=typeof Symbol&&"undefined"!=typeof Reflect&&"undefined"!=typeof Proxy&&!Object.isSealed(Proxy),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function d(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"!=typeof customElements){if(a){var n=function(e){function n(e){u(this,n);var t=l(this,(n.__proto__||Object.getPrototypeOf(n)).call(this)),r=e?HTMLElement.call(e):t;return i.call(r),l(t,r)}return c(n,e),s(n,null,[{key:"observedAttributes",get:function(){return t.observedAttributes||[]}}]),n}(d);return n.prototype.connectedCallback=o,n.prototype.disconnectedCallback=f,n.prototype.attributeChangedCallback=h,p(e,n),n}var r=function(e){var t=e?HTMLElement.call(e):this;return i.call(t),t};return r.observedAttributes=t.observedAttributes||[],r.prototype=Object.create(HTMLElement.prototype,{constructor:{configurable:!0,writable:!0,value:r}}),r.prototype.connectedCallback=o,r.prototype.disconnectedCallback=f,r.prototype.attributeChangedCallback=h,p(e,r),r}function i(){!0===t.shadow&&HTMLElement.prototype.attachShadow&&this.attachShadow({mode:"open"}),"function"==typeof t.constructorCallback&&t.constructorCallback.call(this)}function o(){"function"==typeof t.connectedCallback&&t.connectedCallback.call(this)}function f(){"function"==typeof t.disconnectedCallback&&t.disconnectedCallback.call(this)}function h(e,n,r){"function"==typeof t.attributeChangedCallback&&t.attributeChangedCallback.call(this,e,n,r)}function p(e,t){var n=customElements.get(e);return void 0!==n?n:customElements.define(e,t)}}Object.setPrototypeOf(d.prototype,HTMLElement.prototype),Object.setPrototypeOf(d,HTMLElement);var h=/-(\w)/g,p=function(e){return e.replace(h,(function(e,t){return t?t.toUpperCase():""}))},v=/([^-])([A-Z])/g,m=function(e){return e.replace(v,"$1-$2").replace(v,"$1-$2").toLowerCase()};function g(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function _(e,t){var n=e,r=["true","false"].indexOf(e)>-1,i=parseFloat(n,10),o=!isNaN(i)&&isFinite(n)&&"string"==typeof n&&!n.match(/^0+[^.]\d*$/g);return t&&t!==Boolean&&(void 0===n?"undefined":y(n))!==t?n=t(e):r||t===Boolean?n=""===n||"true"===n:o&&(n=i),n}function b(e,t){if(e&&e.length)e.forEach((function(e){var n=p(e);-1===t.camelCase.indexOf(n)&&t.camelCase.push(n)}));else if(e&&"object"===(void 0===e?"undefined":y(e)))for(var n in e){var r=p(n);-1===t.camelCase.indexOf(r)&&t.camelCase.push(r),e[r]&&e[r].type&&(t.types[n]=[].concat(e[r].type)[0])}}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={camelCase:[],hyphenate:[],types:{}};if(e.mixins&&e.mixins.forEach((function(e){b(e.props,t)})),e.extends&&e.extends.props){var n=e.extends.props;b(n,t)}return b(e.props,t),t.camelCase.forEach((function(e){t.hyphenate.push(m(e))})),t}function T(e){var t={};return g(e.attributes).forEach((function(e){t["vue-slot"===e.nodeName?"slot":e.nodeName]=e.nodeValue})),t}function w(e,t,n){var r=g(function(e){if(e.childNodes.length)return e.childNodes;if(e.content&&e.content.childNodes&&e.content.childNodes.length)return e.content.childNodes;var t=document.createElement("div");return t.innerHTML=e.innerHTML,t.childNodes}(t)).map((function(t){return"#text"===t.nodeName?t.nodeValue:e(t.tagName,{attrs:T(t),domProps:{innerHTML:t.innerHTML}})}));return n.slot=t.id,e("template",n,r)}function k(e,t){var n={bubbles:!1,cancelable:!1,detail:t},r=void 0;return"function"==typeof window.CustomEvent?r=new CustomEvent(e,n):(r=document.createEvent("CustomEvent")).initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r}function E(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=k(t,[].concat(r));e.dispatchEvent(o)}function C(e,t,n,r,i){if(!e.__vue_custom_element__){var o=t.util.extend({},n),a=function(e,t,n){var r=t.propsData||{};return n.hyphenate.forEach((function(t,i){var o=n.camelCase[i],a=e.attributes[t]||e[o],s=null;n.types[o]&&(s=n.types[o]),a instanceof Attr?r[o]=_(a.value,s):void 0!==a&&(r[o]=a)})),r}(e,o,r),s=t.version&&parseInt(t.version.split(".")[0],10)||0;if(o.beforeCreate=[].concat(o.beforeCreate||[],(function(){this.$emit=function(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];E.apply(void 0,[e].concat(r)),this.__proto__&&(t=this.__proto__.$emit).call.apply(t,[this].concat(r))}})),o._compiled){var u={};o._Ctor&&(u=Object.values(o._Ctor)[0].options),u.beforeCreate=o.beforeCreate}var l=void 0;if(s>=2){var c=e.cloneNode(!0).childNodes;l={propsData:a,props:r.camelCase,computed:{reactiveProps:function(){var e=this,t={};return r.camelCase.forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),t}},render:function(e){var t={props:this.reactiveProps};return e(o,t,function(){var e=arguments[1],t=[];return g(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){if("#text"===n.nodeName)n.nodeValue.trim()&&t.push(e("span",n.nodeValue));else if("#comment"!==n.nodeName){var r=T(n),i={attrs:r,domProps:{innerHTML:""===n.innerHTML?n.innerText:n.innerHTML}};r.slot&&(i.slot=r.slot,r.slot=void 0);var o="TEMPLATE"===n.tagName?w(e,n,i):e(n.tagName,i);t.push(o)}})),t}(c,e))}}}else if(1===s)(l=o).propsData=a;else{l=o;var d={};Object.keys(a).forEach((function(e){d[e]={default:a[e]}})),l.props=d}var f=s>=2?"<div></div>":("<div>"+e.innerHTML+"</div>").replace(/vue-slot=/g,"slot=");if(i.shadow&&e.shadowRoot?(e.shadowRoot.innerHTML=f,l.el=e.shadowRoot.children[0]):(e.innerHTML=f,l.el=e.children[0]),function(e,t){t.camelCase.forEach((function(n,r){Object.defineProperty(e,n,{get:function(){return this.__vue_custom_element__[n]},set:function(e){if("object"!==(void 0===e?"undefined":y(e))&&"function"!=typeof e||!this.__vue_custom_element__){var n=t.types[t.camelCase[r]];this.setAttribute(t.hyphenate[r],_(e,n))}else{var i=t.camelCase[r];this.__vue_custom_element__[i]=e}}})}))}(e,r),"function"==typeof i.beforeCreateVueInstance&&(l=i.beforeCreateVueInstance(l)||l),e.__vue_custom_element__=new t(l),e.__vue_custom_element_props__=r,e.getVueInstance=function(){return e.__vue_custom_element__.$children[0]},i.shadow&&i.shadowCss&&e.shadowRoot){var h=document.createElement("style");h.type="text/css",h.appendChild(document.createTextNode(i.shadowCss)),e.shadowRoot.appendChild(h)}e.removeAttribute("vce-cloak"),e.setAttribute("vce-ready",""),E(e,"vce-ready")}}function A(e){e.customElement=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i="function"==typeof n,o=i&&{props:r.props||[]},a=S(i?o:n),s=f(t,{constructorCallback:function(){"function"==typeof r.constructorCallback&&r.constructorCallback.call(this)},connectedCallback:function(){var o=this,s=i&&n(),u=s&&s.then&&"function"==typeof s.then;if("function"==typeof r.connectedCallback&&r.connectedCallback.call(this),i&&!u)throw new Error("Async component "+t+" do not returns Promise");this.__detached__||(u?s.then((function(t){var n=S(t);C(o,e,t,n,r),"function"==typeof r.vueInstanceCreatedCallback&&r.vueInstanceCreatedCallback.call(o)})):(C(this,e,n,a,r),"function"==typeof r.vueInstanceCreatedCallback&&r.vueInstanceCreatedCallback.call(this))),this.__detached__=!1},disconnectedCallback:function(){var e=this;this.__detached__=!0,"function"==typeof r.disconnectedCallback&&r.disconnectedCallback.call(this),null!==r.destroyTimeout&&setTimeout((function(){e.__detached__&&e.__vue_custom_element__&&(e.__vue_custom_element__.$destroy(!0),delete e.__vue_custom_element__,delete e.__vue_custom_element_props__)}),r.destroyTimeout||3e3)},attributeChangedCallback:function(e,t,n){if(this.__vue_custom_element__&&void 0!==n){var i=p(e);"function"==typeof r.attributeChangedCallback&&r.attributeChangedCallback.call(this,e,t,n);var o=this.__vue_custom_element_props__.types[i];this.__vue_custom_element__[i]=_(n,o)}},observedAttributes:a.hyphenate,shadow:!!r.shadow&&!!HTMLElement.prototype.attachShadow});return s}}"undefined"!=typeof window&&window.Vue&&(window.Vue.use(A),A.installed&&(A.installed=!1));var j=A,x=(n("OKyS"),n("wfkH")),P=n.n(x),L=n("Mb+X"),O=n.n(L);videojs.options.controlBar={volumePanel:{inline:!1}},videojs.options.flash.swf="liveplayer.swf",videojs.options.techOrder=["html5","flash"],videojs.log.level("off"),flvjs.LoggingControl.enableAll=!1;var R={name:"live-player",data:function(){return{player:null,timer:0,fluentBtnCls:"live-player-fluent-btn",stretchBtnCls:"live-player-stretch-btn",snapFromOutside:!1,snapForPoster:!1,snapForReload:!1,showSlot:!1,fluent_:!0,muted_:!0,stretch_:!1,poster_:"",avLoading:!1,reloadCnt:0,updateTimeAt:0,flvMediaDataSource:{},flvConfig:{},resolutionName:{sd:"标清",hd:"高清",fhd:"超清",yh:"原画"},playbackRate_:1,sub_:!1,videoUrl_:""}},props:{videoUrl:{type:String,default:""},videoTitle:{type:String,default:""},poster:{default:""},autoplay:{type:Boolean,default:!0},live:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},currentTime:{type:Number,default:0},timeout:{type:Number,default:20},alt:{type:String,default:"无信号"},muted:{type:Boolean,default:!0},aspect:{type:String,default:"16:9"},videoBufferSize:{type:Number,default:204800},audioBufferSize:{type:Number,default:131072},hlsErrorSeek:{type:Number,default:5},hlsTestMethod:{type:String,default:"HEAD"},reloadInterval:{type:Number,default:1e3},liveInterval:{type:Number,default:1e4},pauseWhenHidden:{type:Boolean,default:!0},fluent:{type:Boolean,default:!0},stretch:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},controls:{type:Boolean,default:!0},hideBigPlayButton:{type:Boolean,default:!1},hideSnapshotButton:{type:Boolean,default:!1},hideFullscreenButton:{type:Boolean,default:!1},hideFluentButton:{type:Boolean,default:!1},hideStretchButton:{type:Boolean,default:!1},hidePicInPic:{type:Boolean,default:!0},hideWaiting:{type:Boolean,default:!0},showTime:{type:Boolean,default:function(){return!videojs.browser.IS_IOS&&!videojs.browser.IS_ANDROID}},showCustomButton:{type:Boolean,default:!0},debug:{type:Boolean,default:!1},hasvideo:{type:Boolean,default:void 0},hasaudio:{type:Boolean,default:void 0},resolution:{type:String,default:""},resolutiondefault:{type:String,default:"hd"},reconnect:{type:Boolean,default:!1},playbackRates:{type:Array,default:function(){return videojs.browser.IS_IOS||videojs.browser.IS_ANDROID?[]:[.5,1,2,3]}},playbackRate:{type:Number,default:1},cors:{type:Boolean,default:!0},withCredentials:{type:Boolean,default:!1},sub:{type:Boolean,default:!1}},beforeDestroy:function(){this.destroyVideoJS()},deactivated:function(){this.destroyVideoJS()},watch:{videoUrl:function(e){this.videoUrl_=e,this.changeSub(),this.reload()},fluent:function(e){this.fluent_=e,this.reload()},muted:function(e){this.muted_=e,this.reload()},stretch:function(e){this.stretch_=e,this.reload()},poster:function(e){this.poster_=e},loop:function(e){this.reload()},currentTime:function(e){this.player&&this.player.currentTime(e)},sub:function(e){this.sub_=e}},mounted:function(){flvjs.reconnect=this.reconnect,this.muted_=this.muted,this.fluent_=this.fluent,this.stretch_=this.stretch,this.poster_=this.poster,this.playbackRate_=this.playbackRate,this.sub_=this.sub,this.videoUrl_=this.videoUrl,this.changeSub(),this.debug&&(videojs.log.level("info"),flvjs.LoggingControl.enableAll=!0),this.initVideoJS()},computed:{videoType:function(){var e="video/mp4";return this.rtmp?e="rtmp/mp4":(this.http||this.ws)&&this.flv?e="video/x-flv":this.m3u8&&(e="application/x-mpegURL"),e},videoWrapperStyle:function(){if("100%"==this.aspect||"fullscreen"==this.aspect)return{width:"100%",height:"100%"};var e=this.aspect.split(":"),t=parseInt(e[0])||16;return{paddingBottom:(parseInt(e[1])||9)/t*100+"%",position:"relative",margin:"0 auto",overflow:"hidden"}},rtmp:function(){return 0==(this.src||"").indexOf("rtmp")},http:function(){return 0==(this.src||"").indexOf("http")},webrtc:function(){return 0==(this.src||"").indexOf("webrtc")},ws:function(){return 0==(this.src||"").indexOf("ws")},mp4:function(){return/\.mp4.*$/.test(this.src||"")},m3u8:function(){return/\.m3u8.*$/.test(this.src||"")},flv:function(){return/\.flv.*$/.test(this.src||"")},src:function(){return this.videoUrl_?0===this.videoUrl_.indexOf("//")?location.protocol+this.videoUrl_:0===this.videoUrl_.indexOf("/")?location.protocol+"//"+location.host+this.videoUrl_:this.videoUrl_:""},blankHtml:function(){return this.poster_&&this.src?'\n <div class="alt" style="background-image:url(\''+this.poster_+"');\">\n </div>\n ":'\n <div class="alt">\n <table>\n <tr>\n <td>'+this.alt+"</td>\n </tr>\n </table>\n </div>\n "},videoHtml:function(){return this.src?this.rtmp||this.http||this.flv||this.mp4||this.webrtc?'\n <video class="video-js vjs-default-skin vjs-big-play-centered" style="width: 100%; height: 100%; '+(this.stretch_?"object-fit: fill;":"")+'"\n webkit-playsinline="" playsinline="" x-webkit-airplay="allow" x5-playsinline=""\n preload="none" poster="'+this.poster_+'" '+(this.muted_?"muted":"")+" "+(this.loop?"loop":"")+'>\n <source src="'+this.src+'" type="'+this.videoType+'"></source>\n <p class="vjs-no-js">\n To view this video please enable JavaScript, and consider upgrading to a web browser that\n <a href="http://videojs.com/html5-video-support/" target="_blank">\n supports HTML5 video\n </a>\n </p>\n </video>\n ':'\n <canvas style="width: 100%; height: 100%;"></canvas>\n ':this.blankHtml}},methods:{isMobile:function(){return videojs.browser.IS_IOS||videojs.browser.IS_ANDROID},hasUsableSWF:function(){return!!(void 0!==window.ActiveXObject?new ActiveXObject("ShockwaveFlash.ShockwaveFlash"):navigator.plugins["Shockwave Flash"])},reload:function(){this.reloadCnt++,this.debug&&console.log("liveplayer reload["+this.reloadCnt+"]"),this.destroyVideoJS(),this.initVideoJS()},flvError:function(e){var t=this;this.debug&&console.log(e),this.$emit("error",e),this.live&&this.src&&this.reloadInterval>0&&(this.reloadCnt<3?this.flvReload():setTimeout((function(){t.flvReload()}),this.reloadInterval))},flvReload:function(){var e=this;this.player&&(this.avLoading=!0,!this.player.isFullscreen()&&this.player.cameraButton?this.snapForReload||(this.snapForReload=!0,this.player.cameraButton.el().click()):(this.reloadCnt++,this.player.tech_.flvPlayer.unload(),this.player.tech_.flvPlayer.detachMediaElement(),this.player.tech_.flvPlayer.destroy(),this.player.tech_.flvPlayer=window.flvjs.createPlayer(Object.assign({},this.flvMediaDataSource,{type:void 0===this.flvMediaDataSource.type?"flv":this.flvMediaDataSource.type,url:this.videoUrl_}),this.flvConfig),this.player.tech_.flvPlayer.attachMediaElement(this.player.tech_.el_),this.player.tech_.flvPlayer.on("error",(function(t){e.flvError(t)})),this.player.tech_.flvPlayer.load()))},rtcError:function(e){var t=this;this.live&&this.src&&this.reloadInterval>0&&setTimeout((function(){t.rtcReload()}),this.reloadInterval)},rtcReload:function(){this.player&&(this.avLoading=!0,!this.player.isFullscreen()&&this.player.cameraButton?this.snapForReload||(this.debug&&console.log("rtc snap for reload"),this.snapForReload=!0,this.player.cameraButton.el().click()):(this.debug&&console.log("rtc tech reload"),this.reloadCnt++,this.player.tech_.reload()))},loadResolutionlist:function(e){if(""!=this.resolution){for(var t,n=this.resolution.split(","),r=[],i=0;i<n.length;i++)n[i]==this.resolutiondefault&&i,t="yh"==n[i]?this.videoUrl_:this.videoUrl_.replace(".m3u8","_"+n[i]+".m3u8"),r.push({src:t,type:this.videoType,label:this.resolutionName[n[i]],res:n[i]});e.updateSrc(r),e.on("resolutionchange",(function(){console.log("change resolution")}))}},getCustomBtn:function(e){var t=this.$el.querySelectorAll(".video-js .vjs-control-bar .vjs-button."+e);return t.length>0?t[0]:null},customFlashButton:function(){var e=this;if(!this.getCustomBtn(this.fluentBtnCls)){var t=this.player.controlBar.addChild("button");t.el_.classList.add(this.fluentBtnCls),t.el_.innerText=this.fluent_?this.player.localize("Fluent"):this.player.localize("Fast"),t.el_.title=this.fluent_?this.player.localize("Click switch to fast play"):this.player.localize("Click switch to fluent play");var n=function(){e.fluent_=!e.fluent_,t.el_.innerText=e.fluent_?e.player.localize("Fluent"):e.player.localize("Fast"),t.el_.title=e.fluent_?e.player.localize("Click switch to fast play"):e.player.localize("Click switch to fluent play"),e.player.tech_.setFluent(e.fluent_)};t.on("click",n),t.on("tap",n)}if(!this.getCustomBtn(this.stretchBtnCls)){var r=this.player.controlBar.addChild("button");r.el_.classList.add(this.stretchBtnCls),r.el_.innerText=this.stretch_?this.player.localize("STR"):this.player.localize("STD"),r.el_.title=this.stretch_?this.player.localize("Click switch to standard display"):this.player.localize("Click switch to stretch display");n=function(){e.stretch_=!e.stretch_,r.el_.innerText=e.stretch_?e.player.localize("STR"):e.player.localize("STD"),r.el_.title=e.stretch_?e.player.localize("Click switch to standard display"):e.player.localize("Click switch to stretch display"),e.player.tech_.setStretch(e.stretch_)};r.on("click",n),r.on("tap",n)}},customH5Button:function(){var e=this;if(!this.getCustomBtn(this.stretchBtnCls)&&!videojs.browser.IE_VERSION){var t=this.player.controlBar.addChild("button");t.el_.classList.add(this.stretchBtnCls),t.el_.innerText=this.stretch_?this.player.localize("STR"):this.player.localize("STD"),t.el_.title=this.stretch_?this.player.localize("Click switch to standard display"):this.player.localize("Click switch to stretch display");var n=function(){e.stretch_=!e.stretch_,t.el_.innerText=e.stretch_?e.player.localize("STR"):e.player.localize("STD"),t.el_.title=e.stretch_?e.player.localize("Click switch to standard display"):e.player.localize("Click switch to stretch display");var n=e.$el.querySelector("video");n?n.style.objectFit=e.stretch_?"fill":"":e.player.tech_.setStretch(e.stretch_)};t.on("click",n),t.on("tap",n)}},destroyVideoJS:function(){this.timer&&(clearInterval(this.timer),this.timer=0),this.updateTimeAt=0,this.showSlot=!1;var e=this.$el.querySelector(".video-js"),t=this.$el.querySelector(".video-wrapper");if(e&&t){var n=e.querySelector(".video-slot");n&&(e.removeChild(n),t.appendChild(n));var r=e.querySelector(".video-title");r&&(e.removeChild(r),t.appendChild(r))}this.player&&this.player.dispose&&(this.player.dispose(),this.player=null),this.player&&this.player.destroy&&(this.player.destroy(),this.player=null),this.flvMediaDataSource={},this.flvConfig={},this.$el.querySelector(".video-inner").innerHTML=this.blankHtml,this.$emit("update:loading",!1)},getCurrentTime:function(){return this.player&&"function"==typeof this.player.currentTime?this.player.currentTime():-1},setCurrentTime:function(e){this.player&&"function"==typeof this.player.currentTime&&this.player.currentTime(e)},snap:function(){this.player&&this.player.cameraButton?(this.snapFromOutside=!0,this.player.cameraButton.el().click()):console.log("snap not support")},play:function(){this.player&&this.player.play()},pause:function(){this.player&&this.player.pause()},paused:function(){return!!this.player&&this.player.paused()},setMuted:function(e){this.player&&this.player.muted(!!e)},getMuted:function(){return!!this.player&&this.player.muted()},setVolume:function(e){this.player&&this.player.volume(e)},getVolume:function(){return this.player?this.player.volume():0},isFullscreen:function(){return!!this.player&&this.player.isFullscreen()},requestFullscreen:function(){this.player&&this.player.requestFullscreen()},exitFullscreen:function(){this.player&&this.player.exitFullscreen()},toggleFullscreen:function(){this.player&&(this.player.isFullscreen()?this.player.exitFullscreen():this.player.requestFullscreen())},convertDataURIToBinary:function(e){for(var t=";base64,",n=e.indexOf(t)+t.length,r=e.substring(n),i=window.atob(r),o=i.length,a=new Uint8Array(o),s=0;s<o;s++)a[s]=i.charCodeAt(s);return a},convertDataURIToMIME:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t="data:",n=";base64,",r=e.indexOf(t);0==r&&(r+=t.length);var i=e.indexOf(n);return r>=0&&i>r?e.substring(r,i):""},saveFile:function(e){if(e&&e.length>100){this.poster_=e;var t=this.$el.querySelector("video");t&&t.setAttribute("poster",e)}if(this.snapFromOutside)return this.$emit("snapOutside",e),this.snapFromOutside=!1,this.snapForPoster=!1,void(this.snapForReload=!1);if(this.snapForPoster)this.snapForPoster=!1;else{if(this.snapForReload)return this.snapForReload=!1,void this.reload();this.$emit("snapInside",e);var n=this.convertDataURIToBinary(e),r=this.convertDataURIToMIME(e),i=".jpg",o=r.indexOf("/");o>0&&(i="."+r.substring(o+1)),O.a.saveAs(new Blob([n],{type:r}),(this.videoTitle||"snap")+i)}},debounceInitVideoJS:P.a.debounce((function(){this.initVideoJS()}),500),initVideoJSOK:function(){var e=this;this.player&&(this.player.muted(this.muted_),this.player.on("pause",(function(){e.updateTimeAt=0,e.$emit("pause",e.player.currentTime())})),this.player.on("snap",(function(t,n){e.saveFile(n)})),this.player.on("volumechange",(function(t,n){e.muted_=e.player.muted()})),this.snapForReload&&this.player.cameraButton&&this.player.cameraButton.el().click(),this.live&&this.liveInterval>0&&(this.timer&&(clearInterval(this.timer),this.timer=0),this.timer=setInterval((function(){if(e.updateTimeAt){var t=(new Date).getTime()-e.updateTimeAt;e.debug&&console.log("live check d = "+t),t>=e.liveInterval&&e.src&&!e.player.isFullscreen()&&e.reload()}}),this.liveInterval)));var t=this.$el.querySelector(".video-js"),n=this.$el.querySelector(".video-wrapper");if(t&&n){var r=n.querySelector(".video-slot");r&&(n.removeChild(r),t.appendChild(r));var i=n.querySelector(".video-title");i&&(n.removeChild(i),t.appendChild(i))}this.showSlot=!0},initVideoJS:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.$el.querySelector(".video-inner").innerHTML=this.videoHtml,this.src)if(this.rtmp){var n=document.title;this.player=videojs(this.$el.querySelector("video"),{notSupportedMessage:"您的浏览器没有安装或开启Flash",tech:["flash"],autoplay:this.autoplay,stretch:this.stretch,fluent:this.fluent,controls:!0}),videojs.browser.IS_SAFARI||this.player.snapshot(),this.player.one("ready",(function(){if(e.initVideoJSOK(),videojs.browser.IE_VERSION&&e.player.tech_.off("fullscreentoggle"),e.$emit("update:loading",!1),document.title=n,e.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),e.player.on("ended",(function(){e.$emit("ended")})),e.player.on("error",(function(t){e.$emit("error",t)})),e.player.on("timeupdate",(function(){e.updateTimeAt=(new Date).getTime(),e.reloadCnt=0,e.$emit("timeupdate",e.player.currentTime())})),e.player.on("playing",(function(){e.$emit("play",e.player.currentTime())})),e.showCustomButton&&e.customFlashButton(),!e.hasUsableSWF()){var t=e.$el.querySelector(".vjs-poster");t&&(t.style.display="none")}document.getElementsByClassName("vjs-picture-in-picture-control")[0].style.display="none"})),document.title=n,this.player.on("error",(function(t){(t=e.$el.querySelector(".vjs-error .vjs-error-display .vjs-modal-dialog-content")).innerHTML="<a href='http://www.adobe.com/go/getflashplayer' target='_blank'>"+t.textContent+"</a>"}))}else if((this.http||this.ws)&&this.flv)this.flvMediaDataSource={isLive:this.live,cors:this.cors,withCredentials:this.withCredentials},this.flvConfig={enableWorker:!1,enableStashBuffer:!1},videojs.browser.IE_VERSION&&(this.flvConfig.enableStashBuffer=!0,this.flvConfig.stashInitialSize=512e3),null!=this.hasaudio&&(this.flvMediaDataSource.hasAudio=this.hasaudio),null!=this.hasvideo&&(this.flvMediaDataSource.hasVideo=this.hasvideo),this.player=videojs(this.$el.querySelector("video"),{techOrder:["flvjs","html5"],controls:!0,flvjs:{mediaDataSource:this.flvMediaDataSource,config:this.flvConfig}}),videojs.browser.IS_SAFARI||this.player.snapshot(),this.player.one("ready",(function(){e.initVideoJSOK(),e.$emit("update:loading",!1),e.stretch_&&(e.player.tech_.el_.style.objectFit="fill"),e.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),e.player.tech_.flvPlayer.on("error",(function(t){e.flvError(t)})),e.player.on("canplay",(function(){e.autoplay&&e.player.tech_.flvPlayer.play().catch((function(){}))})),e.player.on("timeupdate",(function(){e.updateTimeAt=(new Date).getTime();var t=e.player.currentTime();!e.snapForPoster&&!e.poster_&&t>2&&e.player.cameraButton&&(e.snapForPoster=!0,e.player.cameraButton.el().click()),e.reloadCnt=0,e.$emit("timeupdate",t)})),e.player.on("error",(function(t){e.$emit("error",t)})),e.player.on("ended",(function(){e.live&&e.flvError("ended"),e.$emit("ended")})),e.player.on("playing",(function(){e.avLoading=!1,e.$emit("play",e.player.currentTime())})),e.showCustomButton&&e.customH5Button(),e.player.on("fullscreenchange",(function(){e.changeSub(0)}))}));else if(this.http&&this.m3u8){var r=(new Date).getTime();this.$emit("update:loading",!0),this.avLoading=!0;var i=0,o=function(){var n=document.title;e.player||(""!=e.resolution?(-1==e.resolution.indexOf(e.resolutiondefault)&&(e.resolutiondefault="yh"),e.player=videojs(e.$el.querySelector("video"),{autoplay:e.autoplay,stretch:e.stretch,controls:!0,plugins:{videoJsResolutionSwitcher:{default:e.resolutiondefault,dynamicLabel:!0}},playbackRates:e.live?[]:e.playbackRates}),e.loadResolutionlist(e.player)):e.player=videojs(e.$el.querySelector("video"),{autoplay:e.autoplay,stretch:e.stretch,controls:!0,playbackRates:e.live?[]:e.playbackRates}),e.live||1==e.playbackRate_||e.player.playbackRate(e.playbackRate_),e.player.on("ratechange",(function(){e.playbackRate_=e.player.playbackRate()})),videojs.browser.IS_SAFARI||e.player.snapshot(),e.player.one("ready",(function(){if(e.initVideoJSOK(),i=setTimeout((function(){e.avLoading=!1,e.$emit("update:loading",!1)}),1e3),document.title=n,e.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),e.player.on("ended",(function(){e.$emit("ended")})),e.player.on("timeupdate",(function(){e.updateTimeAt=(new Date).getTime(),e.reloadCnt=0,e.$emit("timeupdate",e.player.currentTime())})),e.player.on("playing",(function(){e.$emit("play",e.player.currentTime())})),e.player.tech().on("usage",(function(t){e.debug&&console.log("hls usage",t),t&&"hls-live-resync"===t.name&&e.$emit("error",t.name)})),e.player.one("error",(function(t,n){if(i&&(clearTimeout(i),i=0),e.$emit("error",t),e.live)e.reloadInterval>0&&setTimeout((function(){e.destroyVideoJS(),e.initVideoJS()}),e.reloadInterval);else if(e.hlsErrorSeek>0){var r=e.player.currentTime()+e.hlsErrorSeek;e.destroyVideoJS(),e.initVideoJS(r)}})),document.title=n,e.live)e.player&&e.player.reloadSourceOnError();else if(e.player&&(e.currentTime>0||t>0)){var r=t||e.currentTime;videojs.browser.IE_VERSION?e.player.on("loadeddata",(function(){setTimeout((function(){e.player.currentTime(r)}),500)})):e.isMobile()?setTimeout((function(){var t=e.$el.querySelector("video");t&&(t.currentTime=r)}),3200):e.player.currentTime(r)}e.autoplay&&setTimeout((function(){var t=e.$el.querySelector(".vjs-big-play-button");if(t){var n=window.getComputedStyle(t);n&&"block"===n.display&&t.click()}}),2e3),e.showCustomButton&&e.customH5Button()})))};this.timer=setInterval((function(){var t=(new Date).getTime();if(e.timeout>0&&t-r>1e3*e.timeout)return clearInterval(e.timer),e.timer=0,e.$emit("update:loading",!1),e.avLoading=!1,void e.$emit("message",{type:"error",message:"加载播放资源失败"});if(!e.src)return clearInterval(e.timer),e.timer=0,e.$emit("update:loading",!1),void(e.avLoading=!1);var n=new XMLHttpRequest;n.open(e.hlsTestMethod,e.src,!0),n.onreadystatechange=function(){4==n.readyState&&(n.status>=200&&n.status<300||304===n.status?(clearInterval(e.timer),e.timer=0,o()):e.debug&&console.log("HLS "+e.hlsTestMethod,n.status,n.statusText))},n.send()}),1e3)}else this.webrtc?(this.player=videojs(this.$el.querySelector("video"),{techOrder:["webrtc","html5"],autoplay:this.autoplay,stretch:this.stretch,controls:!0,webrtc:{debug:this.debug,autoplay:this.autoplay}}),videojs.browser.IS_SAFARI||this.player.snapshot(),this.player.one("ready",(function(){e.initVideoJSOK(),e.$emit("update:loading",!1),e.stretch_&&(e.player.tech_.el_.style.objectFit="fill"),e.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),e.player.on("error",(function(t){e.$emit("error",t),e.rtcError(t),e.debug&&console.log("player error",t)})),e.player.tech().on("error",(function(t){e.$emit("error",t),e.rtcError(t),e.debug&&console.log("rtc error",t)})),e.player.on("timeupdate",(function(){e.updateTimeAt=(new Date).getTime();var t=e.player.currentTime();!e.snapForPoster&&!e.poster_&&t>2&&e.player.cameraButton&&(e.snapForPoster=!0,e.player.cameraButton.el().click()),e.reloadCnt=0,e.$emit("timeupdate",t)})),e.player.on("ended",(function(){e.live&&e.rtcError("ended"),e.$emit("ended")})),e.player.on("playing",(function(){e.avLoading=!1,e.$emit("play",e.player.currentTime())})),e.showCustomButton&&e.customH5Button()}))):(this.player=videojs(this.$el.querySelector("video"),{autoplay:this.autoplay,stretch:this.stretch,controls:!0,playbackRates:this.live?[]:this.playbackRates}),this.live||1==this.playbackRate_||this.player.playbackRate(this.playbackRate_),this.player.on("ratechange",(function(){e.playbackRate_=e.player.playbackRate()})),videojs.browser.IS_SAFARI||this.player.snapshot(),this.player.one("ready",(function(){e.initVideoJSOK(),e.$emit("update:loading",!1),e.stretch_&&(e.player.tech_.el_.style.objectFit="fill"),e.player.hotkeys({volumeStep:.1,seekStep:5,enableModifiersForNumbers:!1,enableVolumeScroll:!1}),e.showCustomButton&&e.customH5Button(),e.player.on("ended",(function(){e.$emit("ended")})),e.player.on("timeupdate",(function(){e.updateTimeAt=(new Date).getTime(),e.reloadCnt=0,e.$emit("timeupdate",e.player.currentTime())})),e.player.on("playing",(function(){e.$emit("play",e.player.currentTime())})),e.player.on("error",(function(t){e.$emit("error",t)}))})))},changeSub:function(e){this.sub_&&(this.isFullscreen()?""!=this.videoUrl_&&-1!=this.videoUrl_.indexOf("_sub.flv")&&(this.videoUrl_=this.videoUrl,0==e&&this.flvReload()):""!=this.videoUrl&&-1!=this.videoUrl.indexOf(".flv")&&(this.videoUrl_=this.videoUrl.replace(".flv","_sub.flv"),0==e&&this.flvReload()))}}};n("UBF9");var I=function(e,t,n,r,i,o,a,s){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=u):i&&(u=s?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(e,t){return u.call(t),c(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:l}}(R,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"player-wrapper"},[n("div",{class:["video-wrapper",{"video-wrapper-stretch":this.stretch_}],style:e.videoWrapperStyle},[n("div",{staticClass:"video-inner",class:{live:e.live,"av-loading":e.avLoading,"hide-waiting":e.hideWaiting,"hide-controls":!e.controls,"hide-big-play-button":e.hideBigPlayButton,"hide-snapshot-button":e.hideSnapshotButton,"hide-fullscreen-button":e.hideFullscreenButton,"hide-stretch-button":e.hideStretchButton,"hide-fluent-button":e.hideFluentButton,"hide-pic-in-pic":e.hidePicInPic,"show-time":e.showTime&&!e.live},staticStyle:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0"}}),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.showSlot,expression:"showSlot"}],staticClass:"video-slot"},[e._t("default")],2),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.videoTitle&&e.showSlot,expression:"videoTitle && showSlot"}],staticClass:"video-title",attrs:{title:e.videoTitle}},[e._v(e._s(e.videoTitle))])])])}),[],!1,null,null,null).exports;i.a.use(j),i.a.customElement(I.name,I)},qDq2:function(e,t,n){var r=n("nP/W"),i=n("4P8B").set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},qG9X:function(e,t,n){var r=n("nP/W");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},qbkY:function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=n("rdyb"),a=r.has,s=r.get,u=r.key,l=function(e,t,n){if(a(e,t,n))return s(e,t,n);var r=o(t);return null!==r?l(e,r,n):void 0};r.exp({getMetadata:function(e,t){return l(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},qhgO:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("UqQs")(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n("h7JP")("includes")},qrga:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"qur+":function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:a(arguments[1]))}})},qwo6:function(e,t,n){var r=n("Kzeq");e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},rGdY:function(e,t,n){var r=n("6Zvs"),i=n("58gK"),o=n("NHEB"),a=n("KFv0"),s=n("E3To");r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=o(e),u=a.f,l=i(r),c={},d=0;l.length>d;)void 0!==(n=u(r,t=l[d++]))&&s(c,t,n);return c}})},rdyb:function(e,t,n){var r=n("T9SM"),i=n("gHi9"),o=n("Og1P")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},rrjf:function(e,t,n){var r=n("CzRT").navigator;e.exports=r&&r.userAgent||""},s9dh:function(e,t,n){var r=n("6Zvs"),i=n("0+8G")(!1);r(r.S,"Object",{values:function(e){return i(e)}})},sdQg:function(e,t,n){var r=n("qG9X");e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},sr7R:function(e,t,n){var r=n("6Zvs"),i=n("duNF"),o=n("CSYH");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},t2v2:function(e,t,n){n("EGsU")("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},"tH/n":function(e,t,n){"use strict";var r=n("6Zvs"),i=n("duNF"),o=n("CzRT"),a=n("Gwsb"),s=n("SDYs");r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},tMGs:function(e,t,n){var r=n("6Zvs");r(r.S,"Object",{is:n("abDT")})},tig4:function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function u(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],u=t.base?o[0]+t.base:o[0],l=n[u]||0,c="".concat(u," ").concat(l);n[u]=l+1;var d=s(c),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:c,updater:m(f,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function f(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function h(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,v=0;function m(e,t){var n,r,i;if(t.singleton){var o=v++;n=p||(p=l(t)),r=f.bind(null,n,o,!1),i=f.bind(null,n,o,!0)}else n=l(t),r=h.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=u(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);a[i].references--}for(var o=u(e,t),l=0;l<n.length;l++){var c=s(n[l]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=o}}}},tkWd:function(e,t,n){var r=n("xcso"),i=n("qwo6"),o=n("gDp1"),a=n("qG9X"),s=n("rdyb"),u=o.keys,l=o.key,c=function(e,t){var n=u(e,t),o=s(e);if(null===o)return n;var a=c(o,t);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(e){return c(a(e),arguments.length<2?void 0:l(arguments[1]))}})},u4vu:function(e,t,n){var r=n("qG9X"),i=n("g9Oc"),o=n("XRBt"),a=Object.defineProperty;t.f=n("Jt9q")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},u8yI:function(e,t,n){var r=n("CzRT").document;e.exports=r&&r.documentElement},uJpW:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("I5Jy"),o=n("rrjf"),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},uWg0:function(e,t,n){"use strict";n("6zRk")("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},uqfp:function(e,t,n){var r=n("duNF"),i=n("CzRT"),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("PYqL")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},usP3:function(e,t,n){var r=n("u4vu").f,i=n("T9SM"),o=n("g5pV")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},v3OP:function(e,t,n){"use strict";var r=n("A1Nh");n("6Zvs")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},vLlL:function(e,t,n){n("EGsU")("Float64",8,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},vRXo:function(e,t,n){var r=n("1EV7"),i=n("qwo6");e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},vSEY:function(e,t,n){"use strict";(function(t,n){var r=Object.freeze({});function i(e){return null==e}function o(e){return null!=e}function a(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function u(e){return null!==e&&"object"==typeof e}var l=Object.prototype.toString;function c(e){return"[object Object]"===l.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function h(e){return null==e?"":Array.isArray(e)||c(e)&&e.toString===l?JSON.stringify(e,null,2):String(e)}function p(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var m=v("slot,component",!0),g=v("key,ref,slot,slot-scope,is");function y(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(e,t){return _.call(e,t)}function S(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var T=/-(\w)/g,w=S((function(e){return e.replace(T,(function(e,t){return t?t.toUpperCase():""}))})),k=S((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),E=/\B([A-Z])/g,C=S((function(e){return e.replace(E,"-$1").toLowerCase()})),A=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function j(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function x(e,t){for(var n in t)e[n]=t[n];return e}function P(e){for(var t={},n=0;n<e.length;n++)e[n]&&x(t,e[n]);return t}function L(e,t,n){}var O=function(e,t,n){return!1},R=function(e){return e};function I(e,t){if(e===t)return!0;var n=u(e),r=u(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),o=Array.isArray(t);if(i&&o)return e.length===t.length&&e.every((function(e,n){return I(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||o)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every((function(n){return I(e[n],t[n])}))}catch(e){return!1}}function M(e,t){for(var n=0;n<e.length;n++)if(I(e[n],t))return n;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var U="data-server-rendered",B=["component","directive","filter"],N=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:O,isReservedAttr:O,isUnknownElement:O,getTagNamespace:L,parsePlatformTagName:R,mustUseProp:O,async:!0,_lifecycleHooks:N},V=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function z(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var H,G=new RegExp("[^"+V.source+".$_\\d]"),q="__proto__"in{},W="undefined"!=typeof window,$="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=$&&WXEnvironment.platform.toLowerCase(),X=W&&window.navigator.userAgent.toLowerCase(),Y=X&&/msie|trident/.test(X),Z=X&&X.indexOf("msie 9.0")>0,J=X&&X.indexOf("edge/")>0,Q=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===K),ee=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/)),te={}.watch,ne=!1;if(W)try{var re={};Object.defineProperty(re,"passive",{get:function(){ne=!0}}),window.addEventListener("test-passive",null,re)}catch(r){}var ie=function(){return void 0===H&&(H=!W&&!$&&void 0!==t&&t.process&&"server"===t.process.env.VUE_ENV),H},oe=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var se,ue="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys);se="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var le=L,ce=0,de=function(){this.id=ce++,this.subs=[]};de.prototype.addSub=function(e){this.subs.push(e)},de.prototype.removeSub=function(e){y(this.subs,e)},de.prototype.depend=function(){de.target&&de.target.addDep(this)},de.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},de.target=null;var fe=[];function he(e){fe.push(e),de.target=e}function pe(){fe.pop(),de.target=fe[fe.length-1]}var ve=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},me={child:{configurable:!0}};me.child.get=function(){return this.componentInstance},Object.defineProperties(ve.prototype,me);var ge=function(e){void 0===e&&(e="");var t=new ve;return t.text=e,t.isComment=!0,t};function ye(e){return new ve(void 0,void 0,void 0,String(e))}function _e(e){var t=new ve(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var be=Array.prototype,Se=Object.create(be);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=be[e];z(Se,e,(function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o}))}));var Te=Object.getOwnPropertyNames(Se),we=!0;function ke(e){we=e}var Ee=function(e){var t;this.value=e,this.dep=new de,this.vmCount=0,z(e,"__ob__",this),Array.isArray(e)?(q?(t=Se,e.__proto__=t):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];z(e,o,t[o])}}(e,Se,Te),this.observeArray(e)):this.walk(e)};function Ce(e,t){var n;if(u(e)&&!(e instanceof ve))return b(e,"__ob__")&&e.__ob__ instanceof Ee?n=e.__ob__:we&&!ie()&&(Array.isArray(e)||c(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Ee(e)),t&&n&&n.vmCount++,n}function Ae(e,t,n,r,i){var o=new de,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,u=a&&a.set;s&&!u||2!==arguments.length||(n=e[t]);var l=!i&&Ce(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return de.target&&(o.depend(),l&&(l.dep.depend(),Array.isArray(t)&&function e(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||s&&!u||(u?u.call(e,t):n=t,l=!i&&Ce(t),o.notify())}})}}function je(e,t,n){if(Array.isArray(e)&&d(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(Ae(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function xe(e,t){if(Array.isArray(e)&&d(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||b(e,t)&&(delete e[t],n&&n.dep.notify())}}Ee.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Ae(e,t[n])},Ee.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ce(e[t])};var Pe=F.optionMergeStrategies;function Le(e,t){if(!t)return e;for(var n,r,i,o=ue?Reflect.ownKeys(t):Object.keys(t),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(r=e[n],i=t[n],b(e,n)?r!==i&&c(r)&&c(i)&&Le(r,i):je(e,n,i));return e}function Oe(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?Le(r,i):i}:t?e?function(){return Le("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Re(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Ie(e,t,n,r){var i=Object.create(e||null);return t?x(i,t):i}Pe.data=function(e,t,n){return n?Oe(e,t,n):t&&"function"!=typeof t?e:Oe(e,t)},N.forEach((function(e){Pe[e]=Re})),B.forEach((function(e){Pe[e+"s"]=Ie})),Pe.watch=function(e,t,n,r){if(e===te&&(e=void 0),t===te&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in x(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Pe.props=Pe.methods=Pe.inject=Pe.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return x(i,e),t&&x(i,t),i},Pe.provide=Oe;var Me=function(e,t){return void 0===t?e:t};function De(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[w(i)]={type:null});else if(c(n))for(var a in n)i=n[a],o[w(a)]=c(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(c(n))for(var o in n){var a=n[o];r[o]=c(a)?x({from:o},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=De(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=De(e,t.mixins[r],n);var o,a={};for(o in e)s(o);for(o in t)b(e,o)||s(o);function s(r){var i=Pe[r]||Me;a[r]=i(e[r],t[r],n,r)}return a}function Ue(e,t,n,r){if("string"==typeof n){var i=e[t];if(b(i,n))return i[n];var o=w(n);if(b(i,o))return i[o];var a=k(o);return b(i,a)?i[a]:i[n]||i[o]||i[a]}}function Be(e,t,n,r){var i=t[e],o=!b(n,e),a=n[e],s=Ve(Boolean,i.type);if(s>-1)if(o&&!b(i,"default"))a=!1;else if(""===a||a===C(e)){var u=Ve(String,i.type);(u<0||s<u)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(b(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==Ne(t.type)?r.call(e):r}}(r,i,e);var l=we;ke(!0),Ce(a),ke(l)}return a}function Ne(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Fe(e,t){return Ne(e)===Ne(t)}function Ve(e,t){if(!Array.isArray(t))return Fe(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Fe(t[n],e))return n;return-1}function ze(e,t,n){he();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Ge(e,r,"errorCaptured hook")}}Ge(e,t,n)}finally{pe()}}function He(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&f(o)&&!o._handled&&(o.catch((function(e){return ze(e,r,i+" (Promise/async)")})),o._handled=!0)}catch(e){ze(e,r,i)}return o}function Ge(e,t,n){if(F.errorHandler)try{return F.errorHandler.call(null,e,t,n)}catch(t){t!==e&&qe(t,null,"config.errorHandler")}qe(e,t,n)}function qe(e,t,n){if(!W&&!$||"undefined"==typeof console)throw e;console.error(e)}var We,$e=!1,Ke=[],Xe=!1;function Ye(){Xe=!1;var e=Ke.slice(0);Ke.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&ae(Promise)){var Ze=Promise.resolve();We=function(){Ze.then(Ye),Q&&setTimeout(L)},$e=!0}else if(Y||"undefined"==typeof MutationObserver||!ae(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())We=void 0!==n&&ae(n)?function(){n(Ye)}:function(){setTimeout(Ye,0)};else{var Je=1,Qe=new MutationObserver(Ye),et=document.createTextNode(String(Je));Qe.observe(et,{characterData:!0}),We=function(){Je=(Je+1)%2,et.data=String(Je)},$e=!0}function tt(e,t){var n;if(Ke.push((function(){if(e)try{e.call(t)}catch(e){ze(e,t,"nextTick")}else n&&n(t)})),Xe||(Xe=!0,We()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}var nt=new se;function rt(e){!function e(t,n){var r,i,o=Array.isArray(t);if(!(!o&&!u(t)||Object.isFrozen(t)||t instanceof ve)){if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(o)for(r=t.length;r--;)e(t[r],n);else for(r=(i=Object.keys(t)).length;r--;)e(t[i[r]],n)}}(e,nt),nt.clear()}var it=S((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function ot(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return He(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)He(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function at(e,t,n,r,o,s){var u,l,c,d;for(u in e)l=e[u],c=t[u],d=it(u),i(l)||(i(c)?(i(l.fns)&&(l=e[u]=ot(l,s)),a(d.once)&&(l=e[u]=o(d.name,l,d.capture)),n(d.name,l,d.capture,d.passive,d.params)):l!==c&&(c.fns=l,e[u]=c));for(u in t)i(e[u])&&r((d=it(u)).name,t[u],d.capture)}function st(e,t,n){var r;e instanceof ve&&(e=e.data.hook||(e.data.hook={}));var s=e[t];function u(){n.apply(this,arguments),y(r.fns,u)}i(s)?r=ot([u]):o(s.fns)&&a(s.merged)?(r=s).fns.push(u):r=ot([s,u]),r.merged=!0,e[t]=r}function ut(e,t,n,r,i){if(o(t)){if(b(t,n))return e[n]=t[n],i||delete t[n],!0;if(b(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function lt(e){return s(e)?[ye(e)]:Array.isArray(e)?function e(t,n){var r,u,l,c,d=[];for(r=0;r<t.length;r++)i(u=t[r])||"boolean"==typeof u||(c=d[l=d.length-1],Array.isArray(u)?u.length>0&&(ct((u=e(u,(n||"")+"_"+r))[0])&&ct(c)&&(d[l]=ye(c.text+u[0].text),u.shift()),d.push.apply(d,u)):s(u)?ct(c)?d[l]=ye(c.text+u):""!==u&&d.push(ye(u)):ct(u)&&ct(c)?d[l]=ye(c.text+u.text):(a(t._isVList)&&o(u.tag)&&i(u.key)&&o(n)&&(u.key="__vlist"+n+"_"+r+"__"),d.push(u)));return d}(e):void 0}function ct(e){return o(e)&&o(e.text)&&!1===e.isComment}function dt(e,t){if(e){for(var n=Object.create(null),r=ue?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var a=e[o].from,s=t;s;){if(s._provided&&b(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var u=e[o].default;n[o]="function"==typeof u?u.call(t):u}}}return n}}function ft(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,u=n[s]||(n[s]=[]);"template"===o.tag?u.push.apply(u,o.children||[]):u.push(o)}}for(var l in n)n[l].every(ht)&&delete n[l];return n}function ht(e){return e.isComment&&!e.asyncFactory||" "===e.text}function pt(e,t,n){var i,o=Object.keys(t).length>0,a=e?!!e.$stable:!o,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==r&&s===n.$key&&!o&&!n.$hasNormal)return n;for(var u in i={},e)e[u]&&"$"!==u[0]&&(i[u]=vt(t,u,e[u]))}else i={};for(var l in t)l in i||(i[l]=mt(t,l));return e&&Object.isExtensible(e)&&(e._normalized=i),z(i,"$stable",a),z(i,"$key",s),z(i,"$hasNormal",o),i}function vt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:lt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function mt(e,t){return function(){return e[t]}}function gt(e,t){var n,r,i,a,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(u(e))if(ue&&e[Symbol.iterator]){n=[];for(var l=e[Symbol.iterator](),c=l.next();!c.done;)n.push(t(c.value,n.length)),c=l.next()}else for(a=Object.keys(e),n=new Array(a.length),r=0,i=a.length;r<i;r++)s=a[r],n[r]=t(e[s],s,r);return o(n)||(n=[]),n._isVList=!0,n}function yt(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=x(x({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function _t(e){return Ue(this.$options,"filters",e)||R}function bt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function St(e,t,n,r,i){var o=F.keyCodes[t]||n;return i&&r&&!F.keyCodes[t]?bt(i,r):o?bt(o,e):r?C(r)!==t:void 0}function Tt(e,t,n,r,i){if(n&&u(n)){var o;Array.isArray(n)&&(n=P(n));var a=function(a){if("class"===a||"style"===a||g(a))o=e;else{var s=e.attrs&&e.attrs.type;o=r||F.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var u=w(a),l=C(a);u in o||l in o||(o[a]=n[a],i&&((e.on||(e.on={}))["update:"+a]=function(e){n[a]=e}))};for(var s in n)a(s)}return e}function wt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Et(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function kt(e,t,n){return Et(e,"__once__"+t+(n?"_"+n:""),!0),e}function Et(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Ct(e[r],t+"_"+r,n);else Ct(e,t,n)}function Ct(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function At(e,t){if(t&&c(t)){var n=e.on=e.on?x({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}return e}function jt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?jt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function xt(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Pt(e,t){return"string"==typeof e?t+e:e}function Lt(e){e._o=kt,e._n=p,e._s=h,e._l=gt,e._t=yt,e._q=I,e._i=M,e._m=wt,e._f=_t,e._k=St,e._b=Tt,e._v=ye,e._e=ge,e._u=jt,e._g=At,e._d=xt,e._p=Pt}function Ot(e,t,n,i,o){var s,u=this,l=o.options;b(i,"_uid")?(s=Object.create(i))._original=i:(s=i,i=i._original);var c=a(l._compiled),d=!c;this.data=e,this.props=t,this.children=n,this.parent=i,this.listeners=e.on||r,this.injections=dt(l.inject,i),this.slots=function(){return u.$slots||pt(e.scopedSlots,u.$slots=ft(n,i)),u.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return pt(e.scopedSlots,this.slots())}}),c&&(this.$options=l,this.$slots=this.slots(),this.$scopedSlots=pt(e.scopedSlots,this.$slots)),l._scopeId?this._c=function(e,t,n,r){var o=Nt(s,e,t,n,r,d);return o&&!Array.isArray(o)&&(o.fnScopeId=l._scopeId,o.fnContext=i),o}:this._c=function(e,t,n,r){return Nt(s,e,t,n,r,d)}}function Rt(e,t,n,r,i){var o=_e(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function It(e,t){for(var n in t)e[w(n)]=t[n]}Lt(Ot.prototype);var Mt={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;Mt.prepatch(n,n)}else(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;return o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new e.componentOptions.Ctor(n)}(e,Xt)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,i,o){var a=i.data.scopedSlots,s=e.$scopedSlots,u=!!(a&&!a.$stable||s!==r&&!s.$stable||a&&e.$scopedSlots.$key!==a.$key),l=!!(o||e.$options._renderChildren||u);if(e.$options._parentVnode=i,e.$vnode=i,e._vnode&&(e._vnode.parent=i),e.$options._renderChildren=o,e.$attrs=i.data.attrs||r,e.$listeners=n||r,t&&e.$options.props){ke(!1);for(var c=e._props,d=e.$options._propKeys||[],f=0;f<d.length;f++){var h=d[f],p=e.$options.props;c[h]=Be(h,p,t,e)}ke(!0),e.$options.propsData=t}n=n||r;var v=e.$options._parentListeners;e.$options._parentListeners=n,Kt(e,n,v),l&&(e.$slots=ft(o,i.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Qt(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,tn.push(t)):Jt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(!(n&&(t._directInactive=!0,Zt(t))||t._inactive)){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);Qt(t,"deactivated")}}(t,!0):t.$destroy())}},Dt=Object.keys(Mt);function Ut(e,t,n,s,l){if(!i(e)){var c=n.$options._base;if(u(e)&&(e=c.extend(e)),"function"==typeof e){var d;if(i(e.cid)&&void 0===(e=function(e,t){if(a(e.error)&&o(e.errorComp))return e.errorComp;if(o(e.resolved))return e.resolved;var n=Vt;if(n&&o(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n),a(e.loading)&&o(e.loadingComp))return e.loadingComp;if(n&&!o(e.owners)){var r=e.owners=[n],s=!0,l=null,c=null;n.$on("hook:destroyed",(function(){return y(r,n)}));var d=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==l&&(clearTimeout(l),l=null),null!==c&&(clearTimeout(c),c=null))},h=D((function(n){e.resolved=zt(n,t),s?r.length=0:d(!0)})),p=D((function(t){o(e.errorComp)&&(e.error=!0,d(!0))})),v=e(h,p);return u(v)&&(f(v)?i(e.resolved)&&v.then(h,p):f(v.component)&&(v.component.then(h,p),o(v.error)&&(e.errorComp=zt(v.error,t)),o(v.loading)&&(e.loadingComp=zt(v.loading,t),0===v.delay?e.loading=!0:l=setTimeout((function(){l=null,i(e.resolved)&&i(e.error)&&(e.loading=!0,d(!1))}),v.delay||200)),o(v.timeout)&&(c=setTimeout((function(){c=null,i(e.resolved)&&p(null)}),v.timeout)))),s=!1,e.loading?e.loadingComp:e.resolved}}(d=e,c)))return function(e,t,n,r,i){var o=ge();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(d,t,n,s,l);t=t||{},Sn(e),o(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var i=t.on||(t.on={}),a=i[r],s=t.model.callback;o(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(i[r]=[s].concat(a)):i[r]=s}(e.options,t);var h=function(e,t,n){var r=t.options.props;if(!i(r)){var a={},s=e.attrs,u=e.props;if(o(s)||o(u))for(var l in r){var c=C(l);ut(a,u,l,c,!0)||ut(a,s,l,c,!1)}return a}}(t,e);if(a(e.options.functional))return function(e,t,n,i,a){var s=e.options,u={},l=s.props;if(o(l))for(var c in l)u[c]=Be(c,l,t||r);else o(n.attrs)&&It(u,n.attrs),o(n.props)&&It(u,n.props);var d=new Ot(n,u,a,i,e),f=s.render.call(null,d._c,d);if(f instanceof ve)return Rt(f,n,d.parent,s);if(Array.isArray(f)){for(var h=lt(f)||[],p=new Array(h.length),v=0;v<h.length;v++)p[v]=Rt(h[v],n,d.parent,s);return p}}(e,h,t,n,s);var p=t.on;if(t.on=t.nativeOn,a(e.options.abstract)){var v=t.slot;t={},v&&(t.slot=v)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Dt.length;n++){var r=Dt[n],i=t[r],o=Mt[r];i===o||i&&i._merged||(t[r]=i?Bt(o,i):o)}}(t);var m=e.options.name||l;return new ve("vue-component-"+e.cid+(m?"-"+m:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:h,listeners:p,tag:l,children:s},d)}}}function Bt(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}function Nt(e,t,n,r,l,c){return(Array.isArray(n)||s(n))&&(l=r,r=n,n=void 0),a(c)&&(l=2),function(e,t,n,r,s){if(o(n)&&o(n.__ob__))return ge();if(o(n)&&o(n.is)&&(t=n.is),!t)return ge();var l,c,d;(Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0),2===s?r=lt(r):1===s&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r)),"string"==typeof t)?(c=e.$vnode&&e.$vnode.ns||F.getTagNamespace(t),l=F.isReservedTag(t)?new ve(F.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!o(d=Ue(e.$options,"components",t))?new ve(t,n,r,void 0,void 0,e):Ut(d,n,e,r,t)):l=Ut(t,n,e,r);return Array.isArray(l)?l:o(l)?(o(c)&&function e(t,n,r){if(t.ns=n,"foreignObject"===t.tag&&(n=void 0,r=!0),o(t.children))for(var s=0,u=t.children.length;s<u;s++){var l=t.children[s];o(l.tag)&&(i(l.ns)||a(r)&&"svg"!==l.tag)&&e(l,n,r)}}(l,c),o(n)&&function(e){u(e.style)&&rt(e.style),u(e.class)&&rt(e.class)}(n),l):ge()}(e,t,n,r,l)}var Ft,Vt=null;function zt(e,t){return(e.__esModule||ue&&"Module"===e[Symbol.toStringTag])&&(e=e.default),u(e)?t.extend(e):e}function Ht(e){return e.isComment&&e.asyncFactory}function Gt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(o(n)&&(o(n.componentOptions)||Ht(n)))return n}}function qt(e,t){Ft.$on(e,t)}function Wt(e,t){Ft.$off(e,t)}function $t(e,t){var n=Ft;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function Kt(e,t,n){Ft=e,at(t,n||{},qt,Wt,$t,e),Ft=void 0}var Xt=null;function Yt(e){var t=Xt;return Xt=e,function(){Xt=t}}function Zt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Jt(e,t){if(t){if(e._directInactive=!1,Zt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Jt(e.$children[n]);Qt(e,"activated")}}function Qt(e,t){he();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)He(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),pe()}var en=[],tn=[],nn={},rn=!1,on=!1,an=0,sn=0,un=Date.now;if(W&&!Y){var ln=window.performance;ln&&"function"==typeof ln.now&&un()>document.createEvent("Event").timeStamp&&(un=function(){return ln.now()})}function cn(){var e,t;for(sn=un(),on=!0,en.sort((function(e,t){return e.id-t.id})),an=0;an<en.length;an++)(e=en[an]).before&&e.before(),t=e.id,nn[t]=null,e.run();var n=tn.slice(),r=en.slice();an=en.length=tn.length=0,nn={},rn=on=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Jt(e[t],!0)}(n),function(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Qt(r,"updated")}}(r),oe&&F.devtools&&oe.emit("flush")}var dn=0,fn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++dn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new se,this.newDepIds=new se,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!G.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=L)),this.value=this.lazy?void 0:this.get()};fn.prototype.get=function(){var e;he(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;ze(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&rt(e),pe(),this.cleanupDeps()}return e},fn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},fn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},fn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==nn[t]){if(nn[t]=!0,on){for(var n=en.length-1;n>an&&en[n].id>e.id;)n--;en.splice(n+1,0,e)}else en.push(e);rn||(rn=!0,tt(cn))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||u(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){ze(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var hn={enumerable:!0,configurable:!0,get:L,set:L};function pn(e,t,n){hn.get=function(){return this[t][n]},hn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,hn)}var vn={lazy:!0};function mn(e,t,n){var r=!ie();"function"==typeof n?(hn.get=r?gn(t):yn(n),hn.set=L):(hn.get=n.get?r&&!1!==n.cache?gn(t):yn(n.get):L,hn.set=n.set||L),Object.defineProperty(e,t,hn)}function gn(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),de.target&&t.depend(),t.value}}function yn(e){return function(){return e.call(this,this)}}function _n(e,t,n,r){return c(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var bn=0;function Sn(e){var t=e.options;if(e.super){var n=Sn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&x(e.extendOptions,r),(t=e.options=De(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function Tn(e){this._init(e)}function wn(e){return e&&(e.Ctor.options.name||e.tag)}function kn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===l.call(n)&&e.test(t));var n}function En(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=wn(a.componentOptions);s&&!t(s)&&Cn(n,o,r,i)}}}function Cn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,y(n,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=bn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=De(Sn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Kt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,i=n&&n.context;e.$slots=ft(t._renderChildren,i),e.$scopedSlots=r,e._c=function(t,n,r,i){return Nt(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Nt(e,t,n,r,i,!0)};var o=n&&n.data;Ae(e,"$attrs",o&&o.attrs||r,null,!0),Ae(e,"$listeners",t._parentListeners||r,null,!0)}(t),Qt(t,"beforeCreate"),function(e){var t=dt(e.$options.inject,e);t&&(ke(!1),Object.keys(t).forEach((function(n){Ae(e,n,t[n])})),ke(!0))}(t),function(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&ke(!1);var o=function(o){i.push(o);var a=Be(o,t,n,e);Ae(r,o,a),o in e||pn(e,"_props",o)};for(var a in t)o(a);ke(!0)}(e,t.props),t.methods&&function(e,t){for(var n in e.$options.props,t)e[n]="function"!=typeof t[n]?L:A(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;c(t=e._data="function"==typeof t?function(e,t){he();try{return e.call(t,t)}catch(e){return ze(e,t,"data()"),{}}finally{pe()}}(t,e):t||{})||(t={});for(var n,r=Object.keys(t),i=e.$options.props,o=(e.$options.methods,r.length);o--;){var a=r[o];i&&b(i,a)||36!==(n=(a+"").charCodeAt(0))&&95!==n&&pn(e,"_data",a)}Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=ie();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||L,L,vn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)_n(e,n,r[i]);else _n(e,n,r)}}(e,t.watch)}(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),Qt(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(Tn),function(e){Object.defineProperty(e.prototype,"$data",{get:function(){return this._data}}),Object.defineProperty(e.prototype,"$props",{get:function(){return this._props}}),e.prototype.$set=je,e.prototype.$delete=xe,e.prototype.$watch=function(e,t,n){if(c(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){ze(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(Tn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((o=a[s])===t||o.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this._events[e];if(t){t=t.length>1?j(t):t;for(var n=j(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;i<o;i++)He(t[i],this,n,this,r)}return this}}(Tn),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Yt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Qt(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||y(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Qt(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(Tn),function(e){Lt(e.prototype),e.prototype.$nextTick=function(e){return tt(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=pt(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{Vt=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){ze(n,t,"render"),e=t._vnode}finally{Vt=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof ve||(e=ge()),e.parent=i,e}}(Tn);var An=[String,RegExp,Array],jn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:An,exclude:An,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Cn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){En(e,(function(e){return kn(t,e)}))})),this.$watch("exclude",(function(t){En(e,(function(e){return!kn(t,e)}))}))},render:function(){var e=this.$slots.default,t=Gt(e),n=t&&t.componentOptions;if(n){var r=wn(n),i=this.include,o=this.exclude;if(i&&(!r||!kn(i,r))||o&&r&&kn(o,r))return t;var a=this.cache,s=this.keys,u=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[u]?(t.componentInstance=a[u].componentInstance,y(s,u),s.push(u)):(a[u]=t,s.push(u),this.max&&s.length>parseInt(this.max)&&Cn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F}};Object.defineProperty(e,"config",t),e.util={warn:le,extend:x,mergeOptions:De,defineReactive:Ae},e.set=je,e.delete=xe,e.nextTick=tt,e.observable=function(e){return Ce(e),e},e.options=Object.create(null),B.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,x(e.options.components,jn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=j(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=De(this.options,e),this}}(e),function(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=De(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)pn(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)mn(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,B.forEach((function(e){a[e]=n[e]})),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=x({},a.options),i[r]=a,a}}(e),function(e){B.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&c(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Tn),Object.defineProperty(Tn.prototype,"$isServer",{get:ie}),Object.defineProperty(Tn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Tn,"FunctionalRenderContext",{value:Ot}),Tn.version="2.6.12";var xn=v("style,class"),Pn=v("input,textarea,option,select,progress"),Ln=function(e,t,n){return"value"===n&&Pn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},On=v("contenteditable,draggable,spellcheck"),Rn=v("events,caret,typing,plaintext-only"),In=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Mn="http://www.w3.org/1999/xlink",Dn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Un=function(e){return Dn(e)?e.slice(6,e.length):""},Bn=function(e){return null==e||!1===e};function Nn(e,t){return{staticClass:Fn(e.staticClass,t.staticClass),class:o(e.class)?[e.class,t.class]:t.class}}function Fn(e,t){return e?t?e+" "+t:e:t||""}function Vn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)o(t=Vn(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):u(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var zn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Hn=v("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Gn=v("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),qn=function(e){return Hn(e)||Gn(e)};function Wn(e){return Gn(e)?"svg":"math"===e?"math":void 0}var $n=Object.create(null),Kn=v("text,number,password,search,email,tel,url");function Xn(e){return"string"==typeof e?document.querySelector(e)||document.createElement("div"):e}var Yn=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(zn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Zn={create:function(e,t){Jn(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Jn(e,!0),Jn(t))},destroy:function(e){Jn(e,!0)}};function Jn(e,t){var n=e.data.ref;if(o(n)){var r=e.context,i=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?y(a[n],i):a[n]===i&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var Qn=new ve("",{},[]),er=["create","activate","update","remove","destroy"];function tr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&o(e.data)===o(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=o(n=e.data)&&o(n=n.attrs)&&n.type,i=o(n=t.data)&&o(n=n.attrs)&&n.type;return r===i||Kn(r)&&Kn(i)}(e,t)||a(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&i(t.asyncFactory.error))}function nr(e,t,n){var r,i,a={};for(r=t;r<=n;++r)o(i=e[r].key)&&(a[i]=r);return a}var rr={create:ir,update:ir,destroy:function(e){ir(e,Qn)}};function ir(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===Qn,a=t===Qn,s=ar(e.data.directives,e.context),u=ar(t.data.directives,t.context),l=[],c=[];for(n in u)r=s[n],i=u[n],r?(i.oldValue=r.value,i.oldArg=r.arg,ur(i,"update",t,e),i.def&&i.def.componentUpdated&&c.push(i)):(ur(i,"bind",t,e),i.def&&i.def.inserted&&l.push(i));if(l.length){var d=function(){for(var n=0;n<l.length;n++)ur(l[n],"inserted",t,e)};o?st(t,"insert",d):d()}if(c.length&&st(t,"postpatch",(function(){for(var n=0;n<c.length;n++)ur(c[n],"componentUpdated",t,e)})),!o)for(n in s)u[n]||ur(s[n],"unbind",e,e,a)}(e,t)}var or=Object.create(null);function ar(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=or),i[sr(r)]=r,r.def=Ue(t.$options,"directives",r.name);return i}function sr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function ur(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){ze(r,n.context,"directive "+e.name+" "+t+" hook")}}var lr=[Zn,rr];function cr(e,t){var n=t.componentOptions;if(!(o(n)&&!1===n.Ctor.options.inheritAttrs||i(e.data.attrs)&&i(t.data.attrs))){var r,a,s=t.elm,u=e.data.attrs||{},l=t.data.attrs||{};for(r in o(l.__ob__)&&(l=t.data.attrs=x({},l)),l)a=l[r],u[r]!==a&&dr(s,r,a);for(r in(Y||J)&&l.value!==u.value&&dr(s,"value",l.value),u)i(l[r])&&(Dn(r)?s.removeAttributeNS(Mn,Un(r)):On(r)||s.removeAttribute(r))}}function dr(e,t,n){e.tagName.indexOf("-")>-1?fr(e,t,n):In(t)?Bn(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):On(t)?e.setAttribute(t,function(e,t){return Bn(t)||"false"===t?"false":"contenteditable"===e&&Rn(t)?t:"true"}(t,n)):Dn(t)?Bn(n)?e.removeAttributeNS(Mn,Un(t)):e.setAttributeNS(Mn,t,n):fr(e,t,n)}function fr(e,t,n){if(Bn(n))e.removeAttribute(t);else{if(Y&&!Z&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var hr={create:cr,update:cr};function pr(e,t){var n=t.elm,r=t.data,a=e.data;if(!(i(r.staticClass)&&i(r.class)&&(i(a)||i(a.staticClass)&&i(a.class)))){var s=function(e){for(var t=e.data,n=e,r=e;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Nn(r.data,t));for(;o(n=n.parent);)n&&n.data&&(t=Nn(t,n.data));return function(e,t){return o(e)||o(t)?Fn(e,Vn(t)):""}(t.staticClass,t.class)}(t),u=n._transitionClasses;o(u)&&(s=Fn(s,Vn(u))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var vr,mr,gr,yr,_r,br,Sr={create:pr,update:pr},Tr=/[\w).+\-_$\]]/;function wr(e){var t,n,r,i,o,a=!1,s=!1,u=!1,l=!1,c=0,d=0,f=0,h=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(u)96===t&&92!==n&&(u=!1);else if(l)47===t&&92!==n&&(l=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||c||d||f){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:u=!0;break;case 40:f++;break;case 41:f--;break;case 91:d++;break;case 93:d--;break;case 123:c++;break;case 125:c--}if(47===t){for(var p=r-1,v=void 0;p>=0&&" "===(v=e.charAt(p));p--);v&&Tr.test(v)||(l=!0)}}else void 0===i?(h=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(h,r).trim()),h=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==h&&m(),o)for(r=0;r<o.length;r++)i=kr(i,o[r]);return i}function kr(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function Er(e,t){console.error("[Vue compiler]: "+e)}function Cr(e,t){return e?e.map((function(e){return e[t]})).filter((function(e){return e})):[]}function Ar(e,t,n,r,i){(e.props||(e.props=[])).push(Dr({name:t,value:n,dynamic:i},r)),e.plain=!1}function jr(e,t,n,r,i){(i?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(Dr({name:t,value:n,dynamic:i},r)),e.plain=!1}function xr(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(Dr({name:t,value:n},r))}function Pr(e,t,n,r,i,o,a,s){(e.directives||(e.directives=[])).push(Dr({name:t,rawName:n,value:r,arg:i,isDynamicArg:o,modifiers:a},s)),e.plain=!1}function Lr(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function Or(e,t,n,i,o,a,s,u){var l;(i=i||r).right?u?t="("+t+")==='click'?'contextmenu':("+t+")":"click"===t&&(t="contextmenu",delete i.right):i.middle&&(u?t="("+t+")==='click'?'mouseup':("+t+")":"click"===t&&(t="mouseup")),i.capture&&(delete i.capture,t=Lr("!",t,u)),i.once&&(delete i.once,t=Lr("~",t,u)),i.passive&&(delete i.passive,t=Lr("&",t,u)),i.native?(delete i.native,l=e.nativeEvents||(e.nativeEvents={})):l=e.events||(e.events={});var c=Dr({value:n.trim(),dynamic:u},s);i!==r&&(c.modifiers=i);var d=l[t];Array.isArray(d)?o?d.unshift(c):d.push(c):l[t]=d?o?[c,d]:[d,c]:c,e.plain=!1}function Rr(e,t,n){var r=Ir(e,":"+t)||Ir(e,"v-bind:"+t);if(null!=r)return wr(r);if(!1!==n){var i=Ir(e,t);if(null!=i)return JSON.stringify(i)}}function Ir(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Mr(e,t){for(var n=e.attrsList,r=0,i=n.length;r<i;r++){var o=n[r];if(t.test(o.name))return n.splice(r,1),o}}function Dr(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function Ur(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=Br(t,o);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+a+"}"}}function Br(e,t){var n=function(e){if(e=e.trim(),vr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<vr-1)return(yr=e.lastIndexOf("."))>-1?{exp:e.slice(0,yr),key:'"'+e.slice(yr+1)+'"'}:{exp:e,key:null};for(mr=e,yr=_r=br=0;!Fr();)Vr(gr=Nr())?Hr(gr):91===gr&&zr(gr);return{exp:e.slice(0,_r),key:e.slice(_r+1,br)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Nr(){return mr.charCodeAt(++yr)}function Fr(){return yr>=vr}function Vr(e){return 34===e||39===e}function zr(e){var t=1;for(_r=yr;!Fr();)if(Vr(e=Nr()))Hr(e);else if(91===e&&t++,93===e&&t--,0===t){br=yr;break}}function Hr(e){for(var t=e;!Fr()&&(e=Nr())!==t;);}var Gr,qr="__r";function Wr(e,t,n){var r=Gr;return function i(){null!==t.apply(null,arguments)&&Xr(e,i,n,r)}}var $r=$e&&!(ee&&Number(ee[1])<=53);function Kr(e,t,n,r){if($r){var i=sn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}Gr.addEventListener(e,t,ne?{capture:n,passive:r}:n)}function Xr(e,t,n,r){(r||Gr).removeEventListener(e,t._wrapper||t,n)}function Yr(e,t){if(!i(e.data.on)||!i(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Gr=t.elm,function(e){if(o(e.__r)){var t=Y?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}o(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),at(n,r,Kr,Xr,Wr,t.context),Gr=void 0}}var Zr,Jr={create:Yr,update:Yr};function Qr(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var n,r,a=t.elm,s=e.data.domProps||{},u=t.data.domProps||{};for(n in o(u.__ob__)&&(u=t.data.domProps=x({},u)),s)n in u||(a[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=r;var l=i(r)?"":String(r);ei(a,l)&&(a.value=l)}else if("innerHTML"===n&&Gn(a.tagName)&&i(a.innerHTML)){(Zr=Zr||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var c=Zr.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;c.firstChild;)a.appendChild(c.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}function ei(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(o(r)){if(r.number)return p(n)!==p(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ti={create:Qr,update:Qr},ni=S((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function ri(e){var t=ii(e.style);return e.staticStyle?x(e.staticStyle,t):t}function ii(e){return Array.isArray(e)?P(e):"string"==typeof e?ni(e):e}var oi,ai=/^--/,si=/\s*!important$/,ui=function(e,t,n){if(ai.test(t))e.style.setProperty(t,n);else if(si.test(n))e.style.setProperty(C(t),n.replace(si,""),"important");else{var r=ci(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},li=["Webkit","Moz","ms"],ci=S((function(e){if(oi=oi||document.createElement("div").style,"filter"!==(e=w(e))&&e in oi)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<li.length;n++){var r=li[n]+t;if(r in oi)return r}}));function di(e,t){var n=t.data,r=e.data;if(!(i(n.staticStyle)&&i(n.style)&&i(r.staticStyle)&&i(r.style))){var a,s,u=t.elm,l=r.staticStyle,c=r.normalizedStyle||r.style||{},d=l||c,f=ii(t.data.style)||{};t.data.normalizedStyle=o(f.__ob__)?x({},f):f;var h=function(e,t){for(var n,r={},i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=ri(i.data))&&x(r,n);(n=ri(e.data))&&x(r,n);for(var o=e;o=o.parent;)o.data&&(n=ri(o.data))&&x(r,n);return r}(t);for(s in d)i(h[s])&&ui(u,s,"");for(s in h)(a=h[s])!==d[s]&&ui(u,s,null==a?"":a)}}var fi={create:di,update:di},hi=/\s+/;function pi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(hi).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function vi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(hi).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function mi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&x(t,gi(e.name||"v")),x(t,e),t}return"string"==typeof e?gi(e):void 0}}var gi=S((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),yi=W&&!Z,_i="transition",bi="animation",Si="transition",Ti="transitionend",wi="animation",ki="animationend";yi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Si="WebkitTransition",Ti="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(wi="WebkitAnimation",ki="webkitAnimationEnd"));var Ei=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ci(e){Ei((function(){Ei(e)}))}function Ai(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),pi(e,t))}function ji(e,t){e._transitionClasses&&y(e._transitionClasses,t),vi(e,t)}function xi(e,t,n){var r=Li(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===_i?Ti:ki,u=0,l=function(){e.removeEventListener(s,c),n()},c=function(t){t.target===e&&++u>=a&&l()};setTimeout((function(){u<a&&l()}),o+1),e.addEventListener(s,c)}var Pi=/\b(transform|all)(,|$)/;function Li(e,t){var n,r=window.getComputedStyle(e),i=(r[Si+"Delay"]||"").split(", "),o=(r[Si+"Duration"]||"").split(", "),a=Oi(i,o),s=(r[wi+"Delay"]||"").split(", "),u=(r[wi+"Duration"]||"").split(", "),l=Oi(s,u),c=0,d=0;return t===_i?a>0&&(n=_i,c=a,d=o.length):t===bi?l>0&&(n=bi,c=l,d=u.length):d=(n=(c=Math.max(a,l))>0?a>l?_i:bi:null)?n===_i?o.length:u.length:0,{type:n,timeout:c,propCount:d,hasTransform:n===_i&&Pi.test(r[Si+"Property"])}}function Oi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return Ri(t)+Ri(e[n])})))}function Ri(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Ii(e,t){var n=e.elm;o(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=mi(e.data.transition);if(!i(r)&&!o(n._enterCb)&&1===n.nodeType){for(var a=r.css,s=r.type,l=r.enterClass,c=r.enterToClass,d=r.enterActiveClass,f=r.appearClass,h=r.appearToClass,v=r.appearActiveClass,m=r.beforeEnter,g=r.enter,y=r.afterEnter,_=r.enterCancelled,b=r.beforeAppear,S=r.appear,T=r.afterAppear,w=r.appearCancelled,k=r.duration,E=Xt,C=Xt.$vnode;C&&C.parent;)E=C.context,C=C.parent;var A=!E._isMounted||!e.isRootInsert;if(!A||S||""===S){var j=A&&f?f:l,x=A&&v?v:d,P=A&&h?h:c,L=A&&b||m,O=A&&"function"==typeof S?S:g,R=A&&T||y,I=A&&w||_,M=p(u(k)?k.enter:k),U=!1!==a&&!Z,B=Ui(O),N=n._enterCb=D((function(){U&&(ji(n,P),ji(n,x)),N.cancelled?(U&&ji(n,j),I&&I(n)):R&&R(n),n._enterCb=null}));e.data.show||st(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),O&&O(n,N)})),L&&L(n),U&&(Ai(n,j),Ai(n,x),Ci((function(){ji(n,j),N.cancelled||(Ai(n,P),B||(Di(M)?setTimeout(N,M):xi(n,s,N)))}))),e.data.show&&(t&&t(),O&&O(n,N)),U||B||N()}}}function Mi(e,t){var n=e.elm;o(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=mi(e.data.transition);if(i(r)||1!==n.nodeType)return t();if(!o(n._leaveCb)){var a=r.css,s=r.type,l=r.leaveClass,c=r.leaveToClass,d=r.leaveActiveClass,f=r.beforeLeave,h=r.leave,v=r.afterLeave,m=r.leaveCancelled,g=r.delayLeave,y=r.duration,_=!1!==a&&!Z,b=Ui(h),S=p(u(y)?y.leave:y),T=n._leaveCb=D((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),_&&(ji(n,c),ji(n,d)),T.cancelled?(_&&ji(n,l),m&&m(n)):(t(),v&&v(n)),n._leaveCb=null}));g?g(w):w()}function w(){T.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),f&&f(n),_&&(Ai(n,l),Ai(n,d),Ci((function(){ji(n,l),T.cancelled||(Ai(n,c),b||(Di(S)?setTimeout(T,S):xi(n,s,T)))}))),h&&h(n,T),_||b||T())}}function Di(e){return"number"==typeof e&&!isNaN(e)}function Ui(e){if(i(e))return!1;var t=e.fns;return o(t)?Ui(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Bi(e,t){!0!==t.data.show&&Ii(t)}var Ni=function(e){var t,n,r={},u=e.modules,l=e.nodeOps;for(t=0;t<er.length;++t)for(r[er[t]]=[],n=0;n<u.length;++n)o(u[n][er[t]])&&r[er[t]].push(u[n][er[t]]);function c(e){var t=l.parentNode(e);o(t)&&l.removeChild(t,e)}function d(e,t,n,i,s,u,c){if(o(e.elm)&&o(u)&&(e=u[c]=_e(e)),e.isRootInsert=!s,!function(e,t,n,i){var s=e.data;if(o(s)){var u=o(e.componentInstance)&&s.keepAlive;if(o(s=s.hook)&&o(s=s.init)&&s(e,!1),o(e.componentInstance))return f(e,t),h(n,e.elm,i),a(u)&&function(e,t,n,i){for(var a,s=e;s.componentInstance;)if(o(a=(s=s.componentInstance._vnode).data)&&o(a=a.transition)){for(a=0;a<r.activate.length;++a)r.activate[a](Qn,s);t.push(s);break}h(n,e.elm,i)}(e,t,n,i),!0}}(e,t,n,i)){var d=e.data,v=e.children,m=e.tag;o(m)?(e.elm=e.ns?l.createElementNS(e.ns,m):l.createElement(m,e),y(e),p(e,v,t),o(d)&&g(e,t),h(n,e.elm,i)):a(e.isComment)?(e.elm=l.createComment(e.text),h(n,e.elm,i)):(e.elm=l.createTextNode(e.text),h(n,e.elm,i))}}function f(e,t){o(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,m(e)?(g(e,t),y(e)):(Jn(e),t.push(e))}function h(e,t,n){o(e)&&(o(n)?l.parentNode(n)===e&&l.insertBefore(e,t,n):l.appendChild(e,t))}function p(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)d(t[r],n,e.elm,null,!0,t,r);else s(e.text)&&l.appendChild(e.elm,l.createTextNode(String(e.text)))}function m(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return o(e.tag)}function g(e,n){for(var i=0;i<r.create.length;++i)r.create[i](Qn,e);o(t=e.data.hook)&&(o(t.create)&&t.create(Qn,e),o(t.insert)&&n.push(e))}function y(e){var t;if(o(t=e.fnScopeId))l.setStyleScope(e.elm,t);else for(var n=e;n;)o(t=n.context)&&o(t=t.$options._scopeId)&&l.setStyleScope(e.elm,t),n=n.parent;o(t=Xt)&&t!==e.context&&t!==e.fnContext&&o(t=t.$options._scopeId)&&l.setStyleScope(e.elm,t)}function _(e,t,n,r,i,o){for(;r<=i;++r)d(n[r],o,e,t,!1,n,r)}function b(e){var t,n,i=e.data;if(o(i))for(o(t=i.hook)&&o(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(o(t=e.children))for(n=0;n<e.children.length;++n)b(e.children[n])}function S(e,t,n){for(;t<=n;++t){var r=e[t];o(r)&&(o(r.tag)?(T(r),b(r)):c(r.elm))}}function T(e,t){if(o(t)||o(e.data)){var n,i=r.remove.length+1;for(o(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&c(e)}return n.listeners=t,n}(e.elm,i),o(n=e.componentInstance)&&o(n=n._vnode)&&o(n.data)&&T(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);o(n=e.data.hook)&&o(n=n.remove)?n(e,t):t()}else c(e.elm)}function w(e,t,n,r){for(var i=n;i<r;i++){var a=t[i];if(o(a)&&tr(e,a))return i}}function k(e,t,n,s,u,c){if(e!==t){o(t.elm)&&o(s)&&(t=s[u]=_e(t));var f=t.elm=e.elm;if(a(e.isAsyncPlaceholder))o(t.asyncFactory.resolved)?A(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(a(t.isStatic)&&a(e.isStatic)&&t.key===e.key&&(a(t.isCloned)||a(t.isOnce)))t.componentInstance=e.componentInstance;else{var h,p=t.data;o(p)&&o(h=p.hook)&&o(h=h.prepatch)&&h(e,t);var v=e.children,g=t.children;if(o(p)&&m(t)){for(h=0;h<r.update.length;++h)r.update[h](e,t);o(h=p.hook)&&o(h=h.update)&&h(e,t)}i(t.text)?o(v)&&o(g)?v!==g&&function(e,t,n,r,a){for(var s,u,c,f=0,h=0,p=t.length-1,v=t[0],m=t[p],g=n.length-1,y=n[0],b=n[g],T=!a;f<=p&&h<=g;)i(v)?v=t[++f]:i(m)?m=t[--p]:tr(v,y)?(k(v,y,r,n,h),v=t[++f],y=n[++h]):tr(m,b)?(k(m,b,r,n,g),m=t[--p],b=n[--g]):tr(v,b)?(k(v,b,r,n,g),T&&l.insertBefore(e,v.elm,l.nextSibling(m.elm)),v=t[++f],b=n[--g]):tr(m,y)?(k(m,y,r,n,h),T&&l.insertBefore(e,m.elm,v.elm),m=t[--p],y=n[++h]):(i(s)&&(s=nr(t,f,p)),i(u=o(y.key)?s[y.key]:w(y,t,f,p))?d(y,r,e,v.elm,!1,n,h):tr(c=t[u],y)?(k(c,y,r,n,h),t[u]=void 0,T&&l.insertBefore(e,c.elm,v.elm)):d(y,r,e,v.elm,!1,n,h),y=n[++h]);f>p?_(e,i(n[g+1])?null:n[g+1].elm,n,h,g,r):h>g&&S(t,f,p)}(f,v,g,n,c):o(g)?(o(e.text)&&l.setTextContent(f,""),_(f,null,g,0,g.length-1,n)):o(v)?S(v,0,v.length-1):o(e.text)&&l.setTextContent(f,""):e.text!==t.text&&l.setTextContent(f,t.text),o(p)&&o(h=p.hook)&&o(h=h.postpatch)&&h(e,t)}}}function E(e,t,n){if(a(n)&&o(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var C=v("attrs,class,staticClass,staticStyle,key");function A(e,t,n,r){var i,s=t.tag,u=t.data,l=t.children;if(r=r||u&&u.pre,t.elm=e,a(t.isComment)&&o(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(o(u)&&(o(i=u.hook)&&o(i=i.init)&&i(t,!0),o(i=t.componentInstance)))return f(t,n),!0;if(o(s)){if(o(l))if(e.hasChildNodes())if(o(i=u)&&o(i=i.domProps)&&o(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var c=!0,d=e.firstChild,h=0;h<l.length;h++){if(!d||!A(d,l[h],n,r)){c=!1;break}d=d.nextSibling}if(!c||d)return!1}else p(t,l,n);if(o(u)){var v=!1;for(var m in u)if(!C(m)){v=!0,g(t,n);break}!v&&u.class&&rt(u.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,s){if(!i(t)){var u,c=!1,f=[];if(i(e))c=!0,d(t,f);else{var h=o(e.nodeType);if(!h&&tr(e,t))k(e,t,f,null,null,s);else{if(h){if(1===e.nodeType&&e.hasAttribute(U)&&(e.removeAttribute(U),n=!0),a(n)&&A(e,t,f))return E(t,f,!0),e;u=e,e=new ve(l.tagName(u).toLowerCase(),{},[],void 0,u)}var p=e.elm,v=l.parentNode(p);if(d(t,f,p._leaveCb?null:v,l.nextSibling(p)),o(t.parent))for(var g=t.parent,y=m(t);g;){for(var _=0;_<r.destroy.length;++_)r.destroy[_](g);if(g.elm=t.elm,y){for(var T=0;T<r.create.length;++T)r.create[T](Qn,g);var w=g.data.hook.insert;if(w.merged)for(var C=1;C<w.fns.length;C++)w.fns[C]()}else Jn(g);g=g.parent}o(v)?S([e],0,0):o(e.tag)&&b(e)}}return E(t,f,c),t.elm}o(e)&&b(e)}}({nodeOps:Yn,modules:[hr,Sr,Jr,ti,fi,W?{create:Bi,activate:Bi,remove:function(e,t){!0!==e.data.show?Mi(e,t):t()}}:{}].concat(lr)});Z&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&$i(e,"input")}));var Fi={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?st(n,"postpatch",(function(){Fi.componentUpdated(e,t,n)})):Vi(e,t,n.context),e._vOptions=[].map.call(e.options,Gi)):("textarea"===n.tag||Kn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",qi),e.addEventListener("compositionend",Wi),e.addEventListener("change",Wi),Z&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Vi(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Gi);i.some((function(e,t){return!I(e,r[t])}))&&(e.multiple?t.value.some((function(e){return Hi(e,i)})):t.value!==t.oldValue&&Hi(t.value,i))&&$i(e,"change")}}};function Vi(e,t,n){zi(e,t,n),(Y||J)&&setTimeout((function(){zi(e,t,n)}),0)}function zi(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,u=e.options.length;s<u;s++)if(a=e.options[s],i)o=M(r,Gi(a))>-1,a.selected!==o&&(a.selected=o);else if(I(Gi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Hi(e,t){return t.every((function(t){return!I(t,e)}))}function Gi(e){return"_value"in e?e._value:e.value}function qi(e){e.target.composing=!0}function Wi(e){e.target.composing&&(e.target.composing=!1,$i(e.target,"input"))}function $i(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Ki(e){return!e.componentInstance||e.data&&e.data.transition?e:Ki(e.componentInstance._vnode)}var Xi={model:Fi,show:{bind:function(e,t,n){var r=t.value,i=(n=Ki(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,Ii(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Ki(n)).data&&n.data.transition?(n.data.show=!0,r?Ii(n,(function(){e.style.display=e.__vOriginalDisplay})):Mi(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},Yi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Zi(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Zi(Gt(t.children)):e}function Ji(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[w(o)]=i[o];return t}function Qi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var eo=function(e){return e.tag||Ht(e)},to=function(e){return"show"===e.name},no={name:"transition",props:Yi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(eo)).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=Zi(i);if(!o)return i;if(this._leaving)return Qi(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var u=(o.data||(o.data={})).transition=Ji(this),l=this._vnode,c=Zi(l);if(o.data.directives&&o.data.directives.some(to)&&(o.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(o,c)&&!Ht(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var d=c.data.transition=x({},u);if("out-in"===r)return this._leaving=!0,st(d,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Qi(e,i);if("in-out"===r){if(Ht(o))return l;var f,h=function(){f()};st(u,"afterEnter",h),st(u,"enterCancelled",h),st(d,"delayLeave",(function(e){f=e}))}}return i}}},ro=x({tag:String,moveClass:String},Yi);function io(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function oo(e){e.data.newPos=e.elm.getBoundingClientRect()}function ao(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete ro.mode;var so={Transition:no,TransitionGroup:{props:ro,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Yt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Ji(this),s=0;s<i.length;s++){var u=i[s];u.tag&&null!=u.key&&0!==String(u.key).indexOf("__vlist")&&(o.push(u),n[u.key]=u,(u.data||(u.data={})).transition=a)}if(r){for(var l=[],c=[],d=0;d<r.length;d++){var f=r[d];f.data.transition=a,f.data.pos=f.elm.getBoundingClientRect(),n[f.key]?l.push(f):c.push(f)}this.kept=e(t,null,l),this.removed=c}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(io),e.forEach(oo),e.forEach(ao),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Ai(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ti,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ti,e),n._moveCb=null,ji(n,t))})}})))},methods:{hasMove:function(e,t){if(!yi)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){vi(n,e)})),pi(n,t),n.style.display="none",this.$el.appendChild(n);var r=Li(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};Tn.config.mustUseProp=Ln,Tn.config.isReservedTag=qn,Tn.config.isReservedAttr=xn,Tn.config.getTagNamespace=Wn,Tn.config.isUnknownElement=function(e){if(!W)return!0;if(qn(e))return!1;if(e=e.toLowerCase(),null!=$n[e])return $n[e];var t=document.createElement(e);return e.indexOf("-")>-1?$n[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:$n[e]=/HTMLUnknownElement/.test(t.toString())},x(Tn.options.directives,Xi),x(Tn.options.components,so),Tn.prototype.__patch__=W?Ni:L,Tn.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=ge),Qt(e,"beforeMount"),r=function(){e._update(e._render(),n)},new fn(e,r,L,{before:function(){e._isMounted&&!e._isDestroyed&&Qt(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Qt(e,"mounted")),e}(this,e=e&&W?Xn(e):void 0,t)},W&&setTimeout((function(){F.devtools&&oe&&oe.emit("init",Tn)}),0);var uo,lo=/\{\{((?:.|\r?\n)+?)\}\}/g,co=/[-.*+?^${}()|[\]\/\\]/g,fo=S((function(e){var t=e[0].replace(co,"\\$&"),n=e[1].replace(co,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")})),ho={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Ir(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Rr(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}},po={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Ir(e,"style");n&&(e.staticStyle=JSON.stringify(ni(n)));var r=Rr(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},vo=v("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),mo=v("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),go=v("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),yo=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,_o=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,bo="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+V.source+"]*",So="((?:"+bo+"\\:)?"+bo+")",To=new RegExp("^<"+So),wo=/^\s*(\/?)>/,ko=new RegExp("^<\\/"+So+"[^>]*>"),Eo=/^<!DOCTYPE [^>]+>/i,Co=/^<!\--/,Ao=/^<!\[/,jo=v("script,style,textarea",!0),xo={},Po={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t","'":"'"},Lo=/&(?:lt|gt|quot|amp|#39);/g,Oo=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Ro=v("pre,textarea",!0),Io=function(e,t){return e&&Ro(e)&&"\n"===t[0]};function Mo(e,t){var n=t?Oo:Lo;return e.replace(n,(function(e){return Po[e]}))}var Do,Uo,Bo,No,Fo,Vo,zo,Ho,Go=/^@|^v-on:/,qo=/^v-|^@|^:|^#/,Wo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,$o=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ko=/^\(|\)$/g,Xo=/^\[.*\]$/,Yo=/:(.*)$/,Zo=/^:|^\.|^v-bind:/,Jo=/\.[^.\]]+(?=[^\]]*$)/g,Qo=/^v-slot(:|$)|^#/,ea=/[\r\n]/,ta=/\s+/g,na=S((function(e){return(uo=uo||document.createElement("div")).innerHTML=e,uo.textContent})),ra="_empty_";function ia(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:ca(t),rawAttrsMap:{},parent:n,children:[]}}function oa(e,t){var n,r;(r=Rr(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,function(e){var t=Rr(e,"ref");t&&(e.ref=t,e.refInFor=function(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){var t;"template"===e.tag?(t=Ir(e,"scope"),e.slotScope=t||Ir(e,"slot-scope")):(t=Ir(e,"slot-scope"))&&(e.slotScope=t);var n=Rr(e,"slot");if(n&&(e.slotTarget='""'===n?'"default"':n,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||jr(e,"slot",n,function(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}(e,"slot"))),"template"===e.tag){var r=Mr(e,Qo);if(r){var i=ua(r),o=i.name,a=i.dynamic;e.slotTarget=o,e.slotTargetDynamic=a,e.slotScope=r.value||ra}}else{var s=Mr(e,Qo);if(s){var u=e.scopedSlots||(e.scopedSlots={}),l=ua(s),c=l.name,d=l.dynamic,f=u[c]=ia("template",[],e);f.slotTarget=c,f.slotTargetDynamic=d,f.children=e.children.filter((function(e){if(!e.slotScope)return e.parent=f,!0})),f.slotScope=s.value||ra,e.children=[],e.plain=!1}}}(e),function(e){"slot"===e.tag&&(e.slotName=Rr(e,"name"))}(e),function(e){var t;(t=Rr(e,"is"))&&(e.component=t),null!=Ir(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var i=0;i<Bo.length;i++)e=Bo[i](e,t)||e;return function(e){var t,n,r,i,o,a,s,u,l=e.attrsList;for(t=0,n=l.length;t<n;t++)if(r=i=l[t].name,o=l[t].value,qo.test(r))if(e.hasBindings=!0,(a=la(r.replace(qo,"")))&&(r=r.replace(Jo,"")),Zo.test(r))r=r.replace(Zo,""),o=wr(o),(u=Xo.test(r))&&(r=r.slice(1,-1)),a&&(a.prop&&!u&&"innerHtml"===(r=w(r))&&(r="innerHTML"),a.camel&&!u&&(r=w(r)),a.sync&&(s=Br(o,"$event"),u?Or(e,'"update:"+('+r+")",s,null,!1,0,l[t],!0):(Or(e,"update:"+w(r),s,null,!1,0,l[t]),C(r)!==w(r)&&Or(e,"update:"+C(r),s,null,!1,0,l[t])))),a&&a.prop||!e.component&&zo(e.tag,e.attrsMap.type,r)?Ar(e,r,o,l[t],u):jr(e,r,o,l[t],u);else if(Go.test(r))r=r.replace(Go,""),(u=Xo.test(r))&&(r=r.slice(1,-1)),Or(e,r,o,a,!1,0,l[t],u);else{var c=(r=r.replace(qo,"")).match(Yo),d=c&&c[1];u=!1,d&&(r=r.slice(0,-(d.length+1)),Xo.test(d)&&(d=d.slice(1,-1),u=!0)),Pr(e,r,i,o,d,u,a,l[t])}else jr(e,r,JSON.stringify(o),l[t]),!e.component&&"muted"===r&&zo(e.tag,e.attrsMap.type,r)&&Ar(e,r,"true",l[t])}(e),e}function aa(e){var t;if(t=Ir(e,"v-for")){var n=function(e){var t=e.match(Wo);if(t){var n={};n.for=t[2].trim();var r=t[1].trim().replace(Ko,""),i=r.match($o);return i?(n.alias=r.replace($o,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r,n}}(t);n&&x(e,n)}}function sa(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function ua(e){var t=e.name.replace(Qo,"");return t||"#"!==e.name[0]&&(t="default"),Xo.test(t)?{name:t.slice(1,-1),dynamic:!0}:{name:'"'+t+'"',dynamic:!1}}function la(e){var t=e.match(Jo);if(t){var n={};return t.forEach((function(e){n[e.slice(1)]=!0})),n}}function ca(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}var da=/^xmlns:NS\d+/,fa=/^NS\d+:/;function ha(e){return ia(e.tag,e.attrsList.slice(),e.parent)}var pa,va,ma=[ho,po,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Rr(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Ir(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Ir(e,"v-else",!0),s=Ir(e,"v-else-if",!0),u=ha(e);aa(u),xr(u,"type","checkbox"),oa(u,t),u.processed=!0,u.if="("+n+")==='checkbox'"+o,sa(u,{exp:u.if,block:u});var l=ha(e);Ir(l,"v-for",!0),xr(l,"type","radio"),oa(l,t),sa(u,{exp:"("+n+")==='radio'"+o,block:l});var c=ha(e);return Ir(c,"v-for",!0),xr(c,":type",n),oa(c,t),sa(u,{exp:i,block:c}),a?u.else=!0:s&&(u.elseif=s),u}}}}],ga={expectHTML:!0,modules:ma,directives:{model:function(e,t,n){var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if(e.component)return Ur(e,r,i),!1;if("select"===o)!function(e,t,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";Or(e,"change",r=r+" "+Br(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),null,!0)}(e,r,i);else if("input"===o&&"checkbox"===a)!function(e,t,n){var r=n&&n.number,i=Rr(e,"value")||"null",o=Rr(e,"true-value")||"true",a=Rr(e,"false-value")||"false";Ar(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),Or(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Br(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Br(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Br(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=Rr(e,"value")||"null";Ar(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),Or(e,"change",Br(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,u=!o&&"range"!==r,l=o?"change":"range"===r?qr:"input",c="$event.target.value";s&&(c="$event.target.value.trim()"),a&&(c="_n("+c+")");var d=Br(t,c);u&&(d="if($event.target.composing)return;"+d),Ar(e,"value","("+t+")"),Or(e,l,d,null,!0),(s||a)&&Or(e,"blur","$forceUpdate()")}(e,r,i);else if(!F.isReservedTag(o))return Ur(e,r,i),!1;return!0},text:function(e,t){t.value&&Ar(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&Ar(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:vo,mustUseProp:Ln,canBeLeftOpenTag:mo,isReservedTag:qn,getTagNamespace:Wn,staticKeys:function(e){return e.reduce((function(e,t){return e.concat(t.staticKeys||[])}),[]).join(",")}(ma)},ya=S((function(e){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))}));var _a=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,ba=/\([^)]*?\);*$/,Sa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},wa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},ka=function(e){return"if("+e+")return null;"},Ea={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ka("$event.target !== $event.currentTarget"),ctrl:ka("!$event.ctrlKey"),shift:ka("!$event.shiftKey"),alt:ka("!$event.altKey"),meta:ka("!$event.metaKey"),left:ka("'button' in $event && $event.button !== 0"),middle:ka("'button' in $event && $event.button !== 1"),right:ka("'button' in $event && $event.button !== 2")};function Ca(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=Aa(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Aa(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map((function(e){return Aa(e)})).join(",")+"]";var t=Sa.test(e.value),n=_a.test(e.value),r=Sa.test(e.value.replace(ba,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(Ea[s])o+=Ea[s],Ta[s]&&a.push(s);else if("exact"===s){var u=e.modifiers;o+=ka(["ctrl","shift","alt","meta"].filter((function(e){return!u[e]})).map((function(e){return"$event."+e+"Key"})).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!$event.type.indexOf('key')&&"+e.map(ja).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function ja(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ta[e],r=wa[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var xa={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:L},Pa=function(e){this.options=e,this.warn=e.warn||Er,this.transforms=Cr(e.modules,"transformCode"),this.dataGenFns=Cr(e.modules,"genData"),this.directives=x(x({},xa),e.directives);var t=e.isReservedTag||O;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function La(e,t){var n=new Pa(t);return{render:"with(this){return "+(e?Oa(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Oa(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ra(e,t);if(e.once&&!e.onceProcessed)return Ia(e,t);if(e.for&&!e.forProcessed)return Da(e,t);if(e.if&&!e.ifProcessed)return Ma(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=Fa(e,t),i="_t("+n+(r?","+r:""),o=e.attrs||e.dynamicAttrs?Ha((e.attrs||[]).concat(e.dynamicAttrs||[]).map((function(e){return{name:w(e.name),value:e.value,dynamic:e.dynamic}}))):null,a=e.attrsMap["v-bind"];return!o&&!a||r||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:Fa(t,n,!0);return"_c("+e+","+Ua(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Ua(e,t));var i=e.inlineTemplate?null:Fa(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return Fa(e,t)||"void 0"}function Ra(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+Oa(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function Ia(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Ma(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Oa(e,t)+","+t.onceId+++","+n+")":Oa(e,t)}return Ra(e,t)}function Ma(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?Ia(e,n):Oa(e,n)}}(e.ifConditions.slice(),t,n,r)}function Da(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Oa)(e,t)+"})"}function Ua(e,t){var n="{",r=function(e,t){var n=e.directives;if(n){var r,i,o,a,s="directives:[",u=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var l=t.directives[o.name];l&&(a=!!l(e,o,t.warn)),a&&(u=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?",arg:"+(o.isDynamicArg?o.arg:'"'+o.arg+'"'):"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return u?s.slice(0,-1)+"]":void 0}}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var i=0;i<t.dataGenFns.length;i++)n+=t.dataGenFns[i](e);if(e.attrs&&(n+="attrs:"+Ha(e.attrs)+","),e.props&&(n+="domProps:"+Ha(e.props)+","),e.events&&(n+=Ca(e.events,!1)+","),e.nativeEvents&&(n+=Ca(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t,n){var r=e.for||Object.keys(t).some((function(e){var n=t[e];return n.slotTargetDynamic||n.if||n.for||Ba(n)})),i=!!e.if;if(!r)for(var o=e.parent;o;){if(o.slotScope&&o.slotScope!==ra||o.for){r=!0;break}o.if&&(i=!0),o=o.parent}var a=Object.keys(t).map((function(e){return Na(t[e],n)})).join(",");return"scopedSlots:_u(["+a+"]"+(r?",null,true":"")+(!r&&i?",null,false,"+function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0}(a):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(n&&1===n.type){var r=La(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map((function(e){return"function(){"+e+"}"})).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+Ha(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Ba(e){return 1===e.type&&("slot"===e.tag||e.children.some(Ba))}function Na(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Ma(e,t,Na,"null");if(e.for&&!e.forProcessed)return Da(e,t,Na);var r=e.slotScope===ra?"":String(e.slotScope),i="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(Fa(e,t)||"undefined")+":undefined":Fa(e,t)||"undefined":Oa(e,t))+"}",o=r?"":",proxy:true";return"{key:"+(e.slotTarget||'"default"')+",fn:"+i+o+"}"}function Fa(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Oa)(a,t)+s}var u=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(Va(i)||i.ifConditions&&i.ifConditions.some((function(e){return Va(e.block)}))){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some((function(e){return t(e.block)})))&&(n=1)}}return n}(o,t.maybeComponent):0,l=i||za;return"["+o.map((function(e){return l(e,t)})).join(",")+"]"+(u?","+u:"")}}function Va(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function za(e,t){return 1===e.type?Oa(e,t):3===e.type&&e.isComment?(r=e,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=e).type?n.expression:Ga(JSON.stringify(n.text)))+")";var n,r}function Ha(e){for(var t="",n="",r=0;r<e.length;r++){var i=e[r],o=Ga(i.value);i.dynamic?n+=i.name+","+o+",":t+='"'+i.name+'":'+o+","}return t="{"+t.slice(0,-1)+"}",n?"_d("+t+",["+n.slice(0,-1)+"])":t}function Ga(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function qa(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),L}}function Wa(e){var t=Object.create(null);return function(n,r,i){(r=x({},r)).warn,delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(t[o])return t[o];var a=e(n,r),s={},u=[];return s.render=qa(a.render,u),s.staticRenderFns=a.staticRenderFns.map((function(e){return qa(e,u)})),t[o]=s}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b");var $a,Ka,Xa=($a=function(e,t){var n=function(e,t){Do=t.warn||Er,Vo=t.isPreTag||O,zo=t.mustUseProp||O,Ho=t.getTagNamespace||O,t.isReservedTag,Bo=Cr(t.modules,"transformNode"),No=Cr(t.modules,"preTransformNode"),Fo=Cr(t.modules,"postTransformNode"),Uo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=t.whitespace,s=!1,u=!1;function l(e){if(c(e),s||e.processed||(e=oa(e,t)),i.length||e===n||n.if&&(e.elseif||e.else)&&sa(n,{exp:e.elseif,block:e}),r&&!e.forbidden)if(e.elseif||e.else)a=e,(l=function(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}(r.children))&&l.if&&sa(l,{exp:a.elseif,block:a});else{if(e.slotScope){var o=e.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[o]=e}r.children.push(e),e.parent=r}var a,l;e.children=e.children.filter((function(e){return!e.slotScope})),c(e),e.pre&&(s=!1),Vo(e.tag)&&(u=!1);for(var d=0;d<Fo.length;d++)Fo[d](e,t)}function c(e){if(!u)for(var t;(t=e.children[e.children.length-1])&&3===t.type&&" "===t.text;)e.children.pop()}return function(e,t){for(var n,r,i=[],o=t.expectHTML,a=t.isUnaryTag||O,s=t.canBeLeftOpenTag||O,u=0;e;){if(n=e,r&&jo(r)){var l=0,c=r.toLowerCase(),d=xo[c]||(xo[c]=new RegExp("([\\s\\S]*?)(</"+c+"[^>]*>)","i")),f=e.replace(d,(function(e,n,r){return l=r.length,jo(c)||"noscript"===c||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Io(c,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""}));u+=e.length-f.length,e=f,C(c,u-l,u)}else{var h=e.indexOf("<");if(0===h){if(Co.test(e)){var p=e.indexOf("--\x3e");if(p>=0){t.shouldKeepComment&&t.comment(e.substring(4,p),u,u+p+3),w(p+3);continue}}if(Ao.test(e)){var v=e.indexOf("]>");if(v>=0){w(v+2);continue}}var m=e.match(Eo);if(m){w(m[0].length);continue}var g=e.match(ko);if(g){var y=u;w(g[0].length),C(g[1],y,u);continue}var _=k();if(_){E(_),Io(_.tagName,e)&&w(1);continue}}var b=void 0,S=void 0,T=void 0;if(h>=0){for(S=e.slice(h);!(ko.test(S)||To.test(S)||Co.test(S)||Ao.test(S)||(T=S.indexOf("<",1))<0);)h+=T,S=e.slice(h);b=e.substring(0,h)}h<0&&(b=e),b&&w(b.length),t.chars&&b&&t.chars(b,u-b.length,u)}if(e===n){t.chars&&t.chars(e);break}}function w(t){u+=t,e=e.substring(t)}function k(){var t=e.match(To);if(t){var n,r,i={tagName:t[1],attrs:[],start:u};for(w(t[0].length);!(n=e.match(wo))&&(r=e.match(_o)||e.match(yo));)r.start=u,w(r[0].length),r.end=u,i.attrs.push(r);if(n)return i.unarySlash=n[1],w(n[0].length),i.end=u,i}}function E(e){var n=e.tagName,u=e.unarySlash;o&&("p"===r&&go(n)&&C(r),s(n)&&r===n&&C(n));for(var l=a(n)||!!u,c=e.attrs.length,d=new Array(c),f=0;f<c;f++){var h=e.attrs[f],p=h[3]||h[4]||h[5]||"",v="a"===n&&"href"===h[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;d[f]={name:h[1],value:Mo(p,v)}}l||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:d,start:e.start,end:e.end}),r=n),t.start&&t.start(n,d,l,e.start,e.end)}function C(e,n,o){var a,s;if(null==n&&(n=u),null==o&&(o=u),e)for(s=e.toLowerCase(),a=i.length-1;a>=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var l=i.length-1;l>=a;l--)t.end&&t.end(i[l].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}C()}(e,{warn:Do,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,outputSourceRange:t.outputSourceRange,start:function(e,o,a,c,d){var f=r&&r.ns||Ho(e);Y&&"svg"===f&&(o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];da.test(r.name)||(r.name=r.name.replace(fa,""),t.push(r))}return t}(o));var h,p=ia(e,o,r);f&&(p.ns=f),"style"!==(h=p).tag&&("script"!==h.tag||h.attrsMap.type&&"text/javascript"!==h.attrsMap.type)||ie()||(p.forbidden=!0);for(var v=0;v<No.length;v++)p=No[v](p,t)||p;s||(function(e){null!=Ir(e,"v-pre")&&(e.pre=!0)}(p),p.pre&&(s=!0)),Vo(p.tag)&&(u=!0),s?function(e){var t=e.attrsList,n=t.length;if(n)for(var r=e.attrs=new Array(n),i=0;i<n;i++)r[i]={name:t[i].name,value:JSON.stringify(t[i].value)},null!=t[i].start&&(r[i].start=t[i].start,r[i].end=t[i].end);else e.pre||(e.plain=!0)}(p):p.processed||(aa(p),function(e){var t=Ir(e,"v-if");if(t)e.if=t,sa(e,{exp:t,block:e});else{null!=Ir(e,"v-else")&&(e.else=!0);var n=Ir(e,"v-else-if");n&&(e.elseif=n)}}(p),function(e){null!=Ir(e,"v-once")&&(e.once=!0)}(p)),n||(n=p),a?l(p):(r=p,i.push(p))},end:function(e,t,n){var o=i[i.length-1];i.length-=1,r=i[i.length-1],l(o)},chars:function(e,t,n){if(r&&(!Y||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var i,l,c,d=r.children;(e=u||e.trim()?"script"===(i=r).tag||"style"===i.tag?e:na(e):d.length?a?"condense"===a&&ea.test(e)?"":" ":o?" ":"":"")&&(u||"condense"!==a||(e=e.replace(ta," ")),!s&&" "!==e&&(l=function(e,t){var n=t?fo(t):lo;if(n.test(e)){for(var r,i,o,a=[],s=[],u=n.lastIndex=0;r=n.exec(e);){(i=r.index)>u&&(s.push(o=e.slice(u,i)),a.push(JSON.stringify(o)));var l=wr(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),u=i+r[0].length}return u<e.length&&(s.push(o=e.slice(u)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,Uo))?c={type:2,expression:l.expression,tokens:l.tokens,text:e}:" "===e&&d.length&&" "===d[d.length-1].text||(c={type:3,text:e}),c&&d.push(c))}},comment:function(e,t,n){if(r){var i={type:3,text:e,isComment:!0};r.children.push(i)}}}),n}(e.trim(),t);!1!==t.optimize&&function(e,t){e&&(pa=ya(t.staticKeys||""),va=t.isReservedTag||O,function e(t){if(t.static=function(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||m(e.tag)||!va(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(pa))))}(t),1===t.type){if(!va(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}(n,t);var r=La(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(n)for(var a in n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=x(Object.create(e.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);r.warn=function(e,t,n){(n?o:i).push(e)};var s=$a(t.trim(),r);return s.errors=i,s.tips=o,s}return{compile:t,compileToFunctions:Wa(t)}})(ga),Ya=(Xa.compile,Xa.compileToFunctions);function Za(e){return(Ka=Ka||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',Ka.innerHTML.indexOf(" ")>0}var Ja=!!W&&Za(!1),Qa=!!W&&Za(!0),es=S((function(e){var t=Xn(e);return t&&t.innerHTML})),ts=Tn.prototype.$mount;Tn.prototype.$mount=function(e,t){if((e=e&&Xn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=es(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=Ya(r,{outputSourceRange:!1,shouldDecodeNewlines:Ja,shouldDecodeNewlinesForHref:Qa,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return ts.call(this,e,t)},Tn.compile=Ya,e.exports=Tn}).call(this,n("UywP"),n("B8O0").setImmediate)},vaCW:function(e,t,n){var r=n("nP/W"),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},vjMg:function(e,t,n){var r=n("6Zvs"),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},vob5:function(e,t,n){var r=n("6Zvs"),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,u=0;a<s;)u<(n=i(arguments[a++]))?(o=o*(r=u/n)*r+1,u=n):o+=n>0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(o)}})},vpH9:function(e,t,n){var r=n("gDp1"),i=n("qG9X"),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},vzSm:function(e,t,n){"use strict";var r=n("GZPV"),i=n("Cyja"),o="WeakSet";n("C8qm")(o,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,o),e,!0)}},r,!1,!0)},w1gs:function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{scale:n("DuUM")})},w4s5:function(e,t,n){"use strict";n("a2+z")("sub",(function(e){return function(){return e(this,"sub","","")}}))},wIR4:function(e,t,n){"use strict";n("a2+z")("italics",(function(e){return function(){return e(this,"i","","")}}))},waXl:function(e,t,n){var r=n("6Zvs"),i=n("QCSf");r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},wfkH:function(e,t,n){(function(e,r){var i;(function(){var o,a="Expected a function",s="__lodash_hash_undefined__",u="__lodash_placeholder__",l=16,c=32,d=64,f=128,h=256,p=1/0,v=9007199254740991,m=NaN,g=4294967295,y=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",c],["partialRight",d],["rearg",h]],_="[object Arguments]",b="[object Array]",S="[object Boolean]",T="[object Date]",w="[object Error]",k="[object Function]",E="[object GeneratorFunction]",C="[object Map]",A="[object Number]",j="[object Object]",x="[object Promise]",P="[object RegExp]",L="[object Set]",O="[object String]",R="[object Symbol]",I="[object WeakMap]",M="[object ArrayBuffer]",D="[object DataView]",U="[object Float32Array]",B="[object Float64Array]",N="[object Int8Array]",F="[object Int16Array]",V="[object Int32Array]",z="[object Uint8Array]",H="[object Uint8ClampedArray]",G="[object Uint16Array]",q="[object Uint32Array]",W=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,Z=RegExp(X.source),J=RegExp(Y.source),Q=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),se=/^\s+|\s+$/g,ue=/^\s+/,le=/\s+$/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,de=/\{\n\/\* \[wrapped with (.+)\] \*/,fe=/,? & /,he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/\\(\\)?/g,ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,ye=/^0b[01]+$/i,_e=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,Se=/^(?:0|[1-9]\d*)$/,Te=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",je="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Le="['’]",Oe="[\\ud800-\\udfff]",Re="["+Pe+"]",Ie="["+Ee+"]",Me="\\d+",De="[\\u2700-\\u27bf]",Ue="["+Ae+"]",Be="[^\\ud800-\\udfff"+Pe+Me+Ce+Ae+je+"]",Ne="\\ud83c[\\udffb-\\udfff]",Fe="[^\\ud800-\\udfff]",Ve="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",He="["+je+"]",Ge="(?:"+Ue+"|"+Be+")",qe="(?:"+He+"|"+Be+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Ie+"|"+Ne+")"+"?",Xe="[\\ufe0e\\ufe0f]?",Ye=Xe+Ke+("(?:\\u200d(?:"+[Fe,Ve,ze].join("|")+")"+Xe+Ke+")*"),Ze="(?:"+[De,Ve,ze].join("|")+")"+Ye,Je="(?:"+[Fe+Ie+"?",Ie,Ve,ze,Oe].join("|")+")",Qe=RegExp(Le,"g"),et=RegExp(Ie,"g"),tt=RegExp(Ne+"(?="+Ne+")|"+Je+Ye,"g"),nt=RegExp([He+"?"+Ue+"+"+We+"(?="+[Re,He,"$"].join("|")+")",qe+"+"+$e+"(?="+[Re,He+Ge,"$"].join("|")+")",He+"?"+Ge+"+"+We,He+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Ze].join("|"),"g"),rt=RegExp("[\\u200d\\ud800-\\udfff"+Ee+xe+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,st={};st[U]=st[B]=st[N]=st[F]=st[V]=st[z]=st[H]=st[G]=st[q]=!0,st[_]=st[b]=st[M]=st[S]=st[D]=st[T]=st[w]=st[k]=st[C]=st[A]=st[j]=st[P]=st[L]=st[O]=st[I]=!1;var ut={};ut[_]=ut[b]=ut[M]=ut[D]=ut[S]=ut[T]=ut[U]=ut[B]=ut[N]=ut[F]=ut[V]=ut[C]=ut[A]=ut[j]=ut[P]=ut[L]=ut[O]=ut[R]=ut[z]=ut[H]=ut[G]=ut[q]=!0,ut[w]=ut[k]=ut[I]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,dt=parseInt,ft="object"==typeof e&&e&&e.Object===Object&&e,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=ft||ht||Function("return this")(),vt=t&&!t.nodeType&&t,mt=vt&&"object"==typeof r&&r&&!r.nodeType&&r,gt=mt&&mt.exports===vt,yt=gt&&ft.process,_t=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),bt=_t&&_t.isArrayBuffer,St=_t&&_t.isDate,Tt=_t&&_t.isMap,wt=_t&&_t.isRegExp,kt=_t&&_t.isSet,Et=_t&&_t.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function At(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function xt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Ot(e,t){return!!(null==e?0:e.length)&&zt(e,t,0)>-1}function Rt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function It(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Mt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Dt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ut(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function Bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Nt=Wt("length");function Ft(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Vt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function zt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Vt(e,Gt,n)}function Ht(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Gt(e){return e!=e}function qt(e,t){var n=null==e?0:e.length;return n?Xt(e,t)/n:m}function Wt(e){return function(t){return null==t?o:t[e]}}function $t(e){return function(t){return null==e?o:e[t]}}function Kt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Xt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Zt(e){return function(t){return e(t)}}function Jt(e,t){return It(t,(function(t){return e[t]}))}function Qt(e,t){return e.has(t)}function en(e,t){for(var n=-1,r=e.length;++n<r&&zt(t,e[n],0)>-1;);return n}function tn(e,t){for(var n=e.length;n--&&zt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var rn=$t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),on=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+lt[e]}function sn(e){return rt.test(e)}function un(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,o[i++]=n)}return o}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function hn(e){return sn(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Nt(e)}function pn(e){return sn(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}var vn=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mn=function e(t){var n,r=(t=null==t?pt:mn.defaults(pt.Object(),t,mn.pick(pt,ot))).Array,i=t.Date,Ee=t.Error,Ce=t.Function,Ae=t.Math,je=t.Object,xe=t.RegExp,Pe=t.String,Le=t.TypeError,Oe=r.prototype,Re=Ce.prototype,Ie=je.prototype,Me=t["__core-js_shared__"],De=Re.toString,Ue=Ie.hasOwnProperty,Be=0,Ne=(n=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Fe=Ie.toString,Ve=De.call(je),ze=pt._,He=xe("^"+De.call(Ue).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=gt?t.Buffer:o,qe=t.Symbol,We=t.Uint8Array,$e=Ge?Ge.allocUnsafe:o,Ke=ln(je.getPrototypeOf,je),Xe=je.create,Ye=Ie.propertyIsEnumerable,Ze=Oe.splice,Je=qe?qe.isConcatSpreadable:o,tt=qe?qe.iterator:o,rt=qe?qe.toStringTag:o,lt=function(){try{var e=ho(je,"defineProperty");return e({},"",{}),e}catch(e){}}(),ft=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ht=i&&i.now!==pt.Date.now&&i.now,vt=t.setTimeout!==pt.setTimeout&&t.setTimeout,mt=Ae.ceil,yt=Ae.floor,_t=je.getOwnPropertySymbols,Nt=Ge?Ge.isBuffer:o,$t=t.isFinite,gn=Oe.join,yn=ln(je.keys,je),_n=Ae.max,bn=Ae.min,Sn=i.now,Tn=t.parseInt,wn=Ae.random,kn=Oe.reverse,En=ho(t,"DataView"),Cn=ho(t,"Map"),An=ho(t,"Promise"),jn=ho(t,"Set"),xn=ho(t,"WeakMap"),Pn=ho(je,"create"),Ln=xn&&new xn,On={},Rn=Fo(En),In=Fo(Cn),Mn=Fo(An),Dn=Fo(jn),Un=Fo(xn),Bn=qe?qe.prototype:o,Nn=Bn?Bn.valueOf:o,Fn=Bn?Bn.toString:o;function Vn(e){if(rs(e)&&!Wa(e)&&!(e instanceof qn)){if(e instanceof Gn)return e;if(Ue.call(e,"__wrapped__"))return Vo(e)}return new Gn(e)}var zn=function(){function e(){}return function(t){if(!ns(t))return{};if(Xe)return Xe(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Hn(){}function Gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function qn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Kn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new $n(e);this.size=t.size}function Zn(e,t){var n=Wa(e),r=!n&&qa(e),i=!n&&!r&&Ya(e),o=!n&&!r&&!i&&ds(e),a=n||r||i||o,s=a?Yt(e.length,Pe):[],u=s.length;for(var l in e)!t&&!Ue.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||bo(l,u))||s.push(l);return s}function Jn(e){var t=e.length;return t?e[Xr(0,t-1)]:o}function Qn(e,t){return Uo(Pi(e),ur(t,0,e.length))}function er(e){return Uo(Pi(e))}function tr(e,t,n){(n!==o&&!za(e[t],n)||n===o&&!(t in e))&&ar(e,t,n)}function nr(e,t,n){var r=e[t];Ue.call(e,t)&&za(r,n)&&(n!==o||t in e)||ar(e,t,n)}function rr(e,t){for(var n=e.length;n--;)if(za(e[n][0],t))return n;return-1}function ir(e,t,n,r){return hr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function or(e,t){return e&&Li(t,Rs(t),e)}function ar(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sr(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n<i;)a[n]=s?o:js(e,t[n]);return a}function ur(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function lr(e,t,n,r,i,a){var s,u=1&t,l=2&t,c=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ns(e))return e;var d=Wa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ue.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Pi(e,s)}else{var f=mo(e),h=f==k||f==E;if(Ya(e))return ki(e,u);if(f==j||f==_||h&&!i){if(s=l||h?{}:yo(e),!u)return l?function(e,t){return Li(e,vo(e),t)}(e,function(e,t){return e&&Li(t,Is(t),e)}(s,e)):function(e,t){return Li(e,po(e),t)}(e,or(s,e))}else{if(!ut[f])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case M:return Ei(e);case S:case T:return new r(+e);case D:return function(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case U:case B:case N:case F:case V:case z:case H:case G:case q:return Ci(e,n);case C:return new r;case A:case O:return new r(e);case P:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case L:return new r;case R:return i=e,Nn?je(Nn.call(i)):{}}var i}(e,f,u)}}a||(a=new Yn);var p=a.get(e);if(p)return p;if(a.set(e,s),us(e))return e.forEach((function(r){s.add(lr(r,t,n,r,e,a))})),s;if(is(e))return e.forEach((function(r,i){s.set(i,lr(r,t,n,i,e,a))})),s;var v=d?o:(c?l?oo:io:l?Is:Rs)(e);return jt(v||e,(function(r,i){v&&(r=e[i=r]),nr(s,i,lr(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=je(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Le(a);return Ro((function(){e.apply(o,n)}),t)}function fr(e,t,n,r){var i=-1,o=Ot,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=It(t,Zt(n))),r?(o=Rt,a=!1):t.length>=200&&(o=Qt,a=!1,t=new Xn(t));e:for(;++i<s;){var c=e[i],d=null==n?c:n(c);if(c=r||0!==c?c:0,a&&d==d){for(var f=l;f--;)if(t[f]===d)continue e;u.push(c)}else o(t,d,r)||u.push(c)}return u}Vn.templateSettings={escape:Q,evaluate:ee,interpolate:te,variable:"",imports:{_:Vn}},Vn.prototype=Hn.prototype,Vn.prototype.constructor=Vn,Gn.prototype=zn(Hn.prototype),Gn.prototype.constructor=Gn,qn.prototype=zn(Hn.prototype),qn.prototype.constructor=qn,Wn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Pn){var n=t[e];return n===s?o:n}return Ue.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==o:Ue.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pn&&t===o?s:t,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},$n.prototype.get=function(e){var t=this.__data__,n=rr(t,e);return n<0?o:t[n][1]},$n.prototype.has=function(e){return rr(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Cn||$n),string:new Wn}},Kn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Kn.prototype.get=function(e){return co(this,e).get(e)},Kn.prototype.has=function(e){return co(this,e).has(e)},Kn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Xn.prototype.add=Xn.prototype.push=function(e){return this.__data__.set(e,s),this},Xn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new $n,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(e,t),this.size=n.size,this};var hr=Ii(Sr),pr=Ii(Tr,!0);function vr(e,t){var n=!0;return hr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function mr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(u===o?s==s&&!cs(s):n(s,u)))var u=s,l=a}return l}function gr(e,t){var n=[];return hr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function yr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=_o),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?yr(s,t-1,n,r,i):Mt(i,s):r||(i[i.length]=s)}return i}var _r=Mi(),br=Mi(!0);function Sr(e,t){return e&&_r(e,t,Rs)}function Tr(e,t){return e&&br(e,t,Rs)}function wr(e,t){return Lt(t,(function(t){return Qa(e[t])}))}function kr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[No(t[n++])];return n&&n==r?e:o}function Er(e,t,n){var r=t(e);return Wa(e)?r:Mt(r,n(e))}function Cr(e){return null==e?e===o?"[object Undefined]":"[object Null]":rt&&rt in je(e)?function(e){var t=Ue.call(e,rt),n=e[rt];try{e[rt]=o;var r=!0}catch(e){}var i=Fe.call(e);r&&(t?e[rt]=n:delete e[rt]);return i}(e):function(e){return Fe.call(e)}(e)}function Ar(e,t){return e>t}function jr(e,t){return null!=e&&Ue.call(e,t)}function xr(e,t){return null!=e&&t in je(e)}function Pr(e,t,n){for(var i=n?Rt:Ot,a=e[0].length,s=e.length,u=s,l=r(s),c=1/0,d=[];u--;){var f=e[u];u&&t&&(f=It(f,Zt(t))),c=bn(f.length,c),l[u]=!n&&(t||a>=120&&f.length>=120)?new Xn(u&&f):o}f=e[0];var h=-1,p=l[0];e:for(;++h<a&&d.length<c;){var v=f[h],m=t?t(v):v;if(v=n||0!==v?v:0,!(p?Qt(p,m):i(d,m,n))){for(u=s;--u;){var g=l[u];if(!(g?Qt(g,m):i(e[u],m,n)))continue e}p&&p.push(m),d.push(v)}}return d}function Lr(e,t,n){var r=null==(e=xo(e,t=bi(t,e)))?e:e[No(Jo(t))];return null==r?o:Ct(r,e,n)}function Or(e){return rs(e)&&Cr(e)==_}function Rr(e,t,n,r,i){return e===t||(null==e||null==t||!rs(e)&&!rs(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=Wa(e),u=Wa(t),l=s?b:mo(e),c=u?b:mo(t),d=(l=l==_?j:l)==j,f=(c=c==_?j:c)==j,h=l==c;if(h&&Ya(e)){if(!Ya(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Yn),s||ds(e)?no(e,t,n,r,i,a):function(e,t,n,r,i,o,a){switch(n){case D:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!o(new We(e),new We(t)));case S:case T:case A:return za(+e,+t);case w:return e.name==t.name&&e.message==t.message;case P:case O:return e==t+"";case C:var s=un;case L:var u=1&r;if(s||(s=dn),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var c=no(s(e),s(t),r,i,o,a);return a.delete(e),c;case R:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,l,n,r,i,a);if(!(1&n)){var p=d&&Ue.call(e,"__wrapped__"),v=f&&Ue.call(t,"__wrapped__");if(p||v){var m=p?e.value():e,g=v?t.value():t;return a||(a=new Yn),i(m,g,n,r,a)}}if(!h)return!1;return a||(a=new Yn),function(e,t,n,r,i,a){var s=1&n,u=io(e),l=u.length,c=io(t).length;if(l!=c&&!s)return!1;var d=l;for(;d--;){var f=u[d];if(!(s?f in t:Ue.call(t,f)))return!1}var h=a.get(e);if(h&&a.get(t))return h==t;var p=!0;a.set(e,t),a.set(t,e);var v=s;for(;++d<l;){var m=e[f=u[d]],g=t[f];if(r)var y=s?r(g,m,f,t,e,a):r(m,g,f,e,t,a);if(!(y===o?m===g||i(m,g,n,r,a):y)){p=!1;break}v||(v="constructor"==f)}if(p&&!v){var _=e.constructor,b=t.constructor;_==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,i,a)}(e,t,n,r,Rr,i))}function Ir(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=je(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var l=(u=n[i])[0],c=e[l],d=u[1];if(s&&u[2]){if(c===o&&!(l in e))return!1}else{var f=new Yn;if(r)var h=r(c,d,l,e,t,f);if(!(h===o?Rr(d,c,3,r,f):h))return!1}}return!0}function Mr(e){return!(!ns(e)||(t=e,Ne&&Ne in t))&&(Qa(e)?He:_e).test(Fo(e));var t}function Dr(e){return"function"==typeof e?e:null==e?ou:"object"==typeof e?Wa(e)?zr(e[0],e[1]):Vr(e):pu(e)}function Ur(e){if(!Eo(e))return yn(e);var t=[];for(var n in je(e))Ue.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Br(e){if(!ns(e))return function(e){var t=[];if(null!=e)for(var n in je(e))t.push(n);return t}(e);var t=Eo(e),n=[];for(var r in e)("constructor"!=r||!t&&Ue.call(e,r))&&n.push(r);return n}function Nr(e,t){return e<t}function Fr(e,t){var n=-1,i=Ka(e)?r(e.length):[];return hr(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Vr(e){var t=fo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Ir(n,e,t)}}function zr(e,t){return To(e)&&Co(t)?Ao(No(e),t):function(n){var r=js(n,e);return r===o&&r===t?xs(n,e):Rr(t,r,3)}}function Hr(e,t,n,r,i){e!==t&&_r(t,(function(a,s){if(ns(a))i||(i=new Yn),function(e,t,n,r,i,a,s){var u=Lo(e,n),l=Lo(t,n),c=s.get(l);if(c)return void tr(e,n,c);var d=a?a(u,l,n+"",e,t,s):o,f=d===o;if(f){var h=Wa(l),p=!h&&Ya(l),v=!h&&!p&&ds(l);d=l,h||p||v?Wa(u)?d=u:Xa(u)?d=Pi(u):p?(f=!1,d=ki(l,!0)):v?(f=!1,d=Ci(l,!0)):d=[]:as(l)||qa(l)?(d=u,qa(u)?d=_s(u):ns(u)&&!Qa(u)||(d=yo(l))):f=!1}f&&(s.set(l,d),i(d,l,r,a,s),s.delete(l));tr(e,n,d)}(e,t,s,n,Hr,r,i);else{var u=r?r(Lo(e,s),a,s+"",e,t,i):o;u===o&&(u=a),tr(e,s,u)}}),Is)}function Gr(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:o}function qr(e,t,n){var r=-1;return t=It(t.length?t:[ou],Zt(lo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Fr(e,(function(e,n,i){return{criteria:It(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ai(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=kr(e,a);n(s,a)&&ei(o,bi(a,e),s)}return o}function $r(e,t,n,r){var i=r?Ht:zt,o=-1,a=t.length,s=e;for(e===t&&(t=Pi(t)),n&&(s=It(e,Zt(n)));++o<a;)for(var u=0,l=t[o],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==e&&Ze.call(s,u,1),Ze.call(e,u,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Ze.call(e,i,1):fi(e,i)}}return e}function Xr(e,t){return e+yt(wn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>v)return n;do{t%2&&(n+=e),(t=yt(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return Io(jo(e,t,ou),e+"")}function Jr(e){return Jn(zs(e))}function Qr(e,t){var n=zs(e);return Uo(n,ur(t,0,n.length))}function ei(e,t,n,r){if(!ns(e))return e;for(var i=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++i<a;){var l=No(t[i]),c=n;if(i!=s){var d=u[l];(c=r?r(d,l,u):o)===o&&(c=ns(d)?d:bo(t[i+1])?[]:{})}nr(u,l,c),u=u[l]}return e}var ti=Ln?function(e,t){return Ln.set(e,t),e}:ou,ni=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:nu(t),writable:!0})}:ou;function ri(e){return Uo(zs(e))}function ii(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function oi(e,t){var n;return hr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function ai(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!cs(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return si(e,t,ou,n)}function si(e,t,n,r){t=n(t);for(var i=0,a=null==e?0:e.length,s=t!=t,u=null===t,l=cs(t),c=t===o;i<a;){var d=yt((i+a)/2),f=n(e[d]),h=f!==o,p=null===f,v=f==f,m=cs(f);if(s)var g=r||v;else g=c?v&&(r||h):u?v&&h&&(r||!p):l?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);g?i=d+1:a=d}return bn(a,4294967294)}function ui(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!za(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function li(e){return"number"==typeof e?e:cs(e)?m:+e}function ci(e){if("string"==typeof e)return e;if(Wa(e))return It(e,ci)+"";if(cs(e))return Fn?Fn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function di(e,t,n){var r=-1,i=Ot,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Rt;else if(o>=200){var l=t?null:Yi(e);if(l)return dn(l);a=!1,i=Qt,u=new Xn}else u=t?[]:s;e:for(;++r<o;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,a&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(c)}else i(u,d,n)||(u!==s&&u.push(d),s.push(c))}return s}function fi(e,t){return null==(e=xo(e,t=bi(t,e)))||delete e[No(Jo(t))]}function hi(e,t,n,r){return ei(e,t,n(kr(e,t)),r)}function pi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ii(e,r?0:o,r?o+1:i):ii(e,r?o+1:0,r?i:o)}function vi(e,t){var n=e;return n instanceof qn&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),n)}function mi(e,t,n){var i=e.length;if(i<2)return i?di(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=fr(a[o]||s,e[u],t,n));return di(yr(a,1),t,n)}function gi(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var u=r<a?t[r]:o;n(s,e[r],u)}return s}function yi(e){return Xa(e)?e:[]}function _i(e){return"function"==typeof e?e:ou}function bi(e,t){return Wa(e)?e:To(e,t)?[e]:Bo(bs(e))}var Si=Zr;function Ti(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:ii(e,t,n)}var wi=ft||function(e){return pt.clearTimeout(e)};function ki(e,t){if(t)return e.slice();var n=e.length,r=$e?$e(n):new e.constructor(n);return e.copy(r),r}function Ei(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function Ci(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=cs(e),s=t!==o,u=null===t,l=t==t,c=cs(t);if(!u&&!c&&!a&&e>t||a&&s&&l&&!u&&!c||r&&s&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&e<t||c&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!l)return-1}return 0}function ji(e,t,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,l=t.length,c=_n(a-s,0),d=r(l+c),f=!i;++u<l;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[n[o]]=e[o]);for(;c--;)d[u++]=e[o++];return d}function xi(e,t,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,l=-1,c=t.length,d=_n(a-u,0),f=r(d+c),h=!i;++o<d;)f[o]=e[o];for(var p=o;++l<c;)f[p+l]=t[l];for(;++s<u;)(h||o<a)&&(f[p+n[s]]=e[o++]);return f}function Pi(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Li(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],l=r?r(n[u],e[u],u,n,e):o;l===o&&(l=e[u]),i?ar(n,u,l):nr(n,u,l)}return n}function Oi(e,t){return function(n,r){var i=Wa(n)?At:ir,o=t?t():{};return i(n,e,lo(r,2),o)}}function Ri(e){return Zr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&So(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=je(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Ii(e,t){return function(n,r){if(null==n)return n;if(!Ka(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=je(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Mi(e){return function(t,n,r){for(var i=-1,o=je(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Di(e){return function(t){var n=sn(t=bs(t))?pn(t):o,r=n?n[0]:t.charAt(0),i=n?Ti(n,1).join(""):t.slice(1);return r[e]()+i}}function Ui(e){return function(t){return Dt(Qs(qs(t).replace(Qe,"")),e,"")}}function Bi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return ns(r)?r:n}}function Ni(e){return function(t,n,r){var i=je(t);if(!Ka(t)){var a=lo(n,3);t=Rs(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function Fi(e){return ro((function(t){var n=t.length,r=n,i=Gn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Le(a);if(i&&!u&&"wrapper"==so(s))var u=new Gn([],!0)}for(r=u?r:n;++r<n;){var l=so(s=t[r]),c="wrapper"==l?ao(s):o;u=c&&wo(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[so(c[0])].apply(u,c[3]):1==s.length&&wo(s)?u[l]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Wa(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Vi(e,t,n,i,a,s,u,l,c,d){var h=t&f,p=1&t,v=2&t,m=24&t,g=512&t,y=v?o:Bi(e);return function o(){for(var f=arguments.length,_=r(f),b=f;b--;)_[b]=arguments[b];if(m)var S=uo(o),T=nn(_,S);if(i&&(_=ji(_,i,a,m)),s&&(_=xi(_,s,u,m)),f-=T,m&&f<d){var w=cn(_,S);return Ki(e,t,Vi,o.placeholder,n,_,w,l,c,d-f)}var k=p?n:this,E=v?k[e]:e;return f=_.length,l?_=Po(_,l):g&&f>1&&_.reverse(),h&&c<f&&(_.length=c),this&&this!==pt&&this instanceof o&&(E=y||Bi(E)),E.apply(k,_)}}function zi(e,t){return function(n,r){return function(e,t,n,r){return Sr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Hi(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=li(n),r=li(r)),i=e(n,r)}return i}}function Gi(e){return ro((function(t){return t=It(t,Zt(lo())),Zr((function(n){var r=this;return e(t,(function(e){return Ct(e,r,n)}))}))}))}function qi(e,t){var n=(t=t===o?" ":ci(t)).length;if(n<2)return n?Yr(t,e):t;var r=Yr(t,mt(e/hn(t)));return sn(t)?Ti(pn(r),0,e).join(""):r.slice(0,e)}function Wi(e){return function(t,n,i){return i&&"number"!=typeof i&&So(t,n,i)&&(n=i=o),t=vs(t),n===o?(n=t,t=0):n=vs(n),function(e,t,n,i){for(var o=-1,a=_n(mt((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,i=i===o?t<n?1:-1:vs(i),e)}}function $i(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function Ki(e,t,n,r,i,a,s,u,l,f){var h=8&t;t|=h?c:d,4&(t&=~(h?d:c))||(t&=-4);var p=[e,t,i,h?a:o,h?s:o,h?o:a,h?o:s,u,l,f],v=n.apply(o,p);return wo(e)&&Oo(v,p),v.placeholder=r,Mo(v,e,t)}function Xi(e){var t=Ae[e];return function(e,n){if(e=ys(e),n=null==n?0:bn(ms(n),292)){var r=(bs(e)+"e").split("e");return+((r=(bs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yi=jn&&1/dn(new jn([,-0]))[1]==p?function(e){return new jn(e)}:cu;function Zi(e){return function(t){var n=mo(t);return n==C?un(t):n==L?fn(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(e,t,n,i,s,p,v,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Le(a);var y=i?i.length:0;if(y||(t&=-97,i=s=o),v=v===o?v:_n(ms(v),0),m=m===o?m:ms(m),y-=s?s.length:0,t&d){var _=i,b=s;i=s=o}var S=g?o:ao(e),T=[e,t,n,i,s,_,b,p,v,m];if(S&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==h&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?ji(l,s,t[4]):s,e[4]=l?cn(e[3],u):t[4]}(s=t[5])&&(l=e[5],e[5]=l?xi(l,s,t[6]):s,e[6]=l?cn(e[5],u):t[6]);(s=t[7])&&(e[7]=s);r&f&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(T,S),e=T[0],t=T[1],n=T[2],i=T[3],s=T[4],!(m=T[9]=T[9]===o?g?0:e.length:_n(T[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||t==l?function(e,t,n){var i=Bi(e);return function a(){for(var s=arguments.length,u=r(s),l=s,c=uo(a);l--;)u[l]=arguments[l];var d=s<3&&u[0]!==c&&u[s-1]!==c?[]:cn(u,c);return(s-=d.length)<n?Ki(e,t,Vi,a.placeholder,o,u,d,o,o,n-s):Ct(this&&this!==pt&&this instanceof a?i:e,this,u)}}(e,t,m):t!=c&&33!=t||s.length?Vi.apply(o,T):function(e,t,n,i){var o=1&t,a=Bi(e);return function t(){for(var s=-1,u=arguments.length,l=-1,c=i.length,d=r(c+u),f=this&&this!==pt&&this instanceof t?a:e;++l<c;)d[l]=i[l];for(;u--;)d[l++]=arguments[++s];return Ct(f,o?n:this,d)}}(e,t,n,i);else var w=function(e,t,n){var r=1&t,i=Bi(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return Mo((S?ti:Oo)(w,T),e,t)}function Qi(e,t,n,r){return e===o||za(e,Ie[n])&&!Ue.call(r,n)?t:e}function eo(e,t,n,r,i,a){return ns(e)&&ns(t)&&(a.set(t,e),Hr(e,t,o,eo,a),a.delete(t)),e}function to(e){return as(e)?o:e}function no(e,t,n,r,i,a){var s=1&n,u=e.length,l=t.length;if(u!=l&&!(s&&l>u))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var d=-1,f=!0,h=2&n?new Xn:o;for(a.set(e,t),a.set(t,e);++d<u;){var p=e[d],v=t[d];if(r)var m=s?r(v,p,d,t,e,a):r(p,v,d,e,t,a);if(m!==o){if(m)continue;f=!1;break}if(h){if(!Bt(t,(function(e,t){if(!Qt(h,t)&&(p===e||i(p,e,n,r,a)))return h.push(t)}))){f=!1;break}}else if(p!==v&&!i(p,v,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function ro(e){return Io(jo(e,o,$o),e+"")}function io(e){return Er(e,Rs,po)}function oo(e){return Er(e,Is,vo)}var ao=Ln?function(e){return Ln.get(e)}:cu;function so(e){for(var t=e.name+"",n=On[t],r=Ue.call(On,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function uo(e){return(Ue.call(Vn,"placeholder")?Vn:e).placeholder}function lo(){var e=Vn.iteratee||au;return e=e===au?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function fo(e){for(var t=Rs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Co(i)]}return t}function ho(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Mr(n)?n:o}var po=_t?function(e){return null==e?[]:(e=je(e),Lt(_t(e),(function(t){return Ye.call(e,t)})))}:gu,vo=_t?function(e){for(var t=[];e;)Mt(t,po(e)),e=Ke(e);return t}:gu,mo=Cr;function go(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=No(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&ts(i)&&bo(a,i)&&(Wa(e)||qa(e))}function yo(e){return"function"!=typeof e.constructor||Eo(e)?{}:zn(Ke(e))}function _o(e){return Wa(e)||qa(e)||!!(Je&&e&&e[Je])}function bo(e,t){var n=typeof e;return!!(t=null==t?v:t)&&("number"==n||"symbol"!=n&&Se.test(e))&&e>-1&&e%1==0&&e<t}function So(e,t,n){if(!ns(n))return!1;var r=typeof t;return!!("number"==r?Ka(n)&&bo(t,n.length):"string"==r&&t in n)&&za(n[t],e)}function To(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!cs(e))||(re.test(e)||!ne.test(e)||null!=t&&e in je(t))}function wo(e){var t=so(e),n=Vn[t];if("function"!=typeof n||!(t in qn.prototype))return!1;if(e===n)return!0;var r=ao(n);return!!r&&e===r[0]}(En&&mo(new En(new ArrayBuffer(1)))!=D||Cn&&mo(new Cn)!=C||An&&mo(An.resolve())!=x||jn&&mo(new jn)!=L||xn&&mo(new xn)!=I)&&(mo=function(e){var t=Cr(e),n=t==j?e.constructor:o,r=n?Fo(n):"";if(r)switch(r){case Rn:return D;case In:return C;case Mn:return x;case Dn:return L;case Un:return I}return t});var ko=Me?Qa:yu;function Eo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ie)}function Co(e){return e==e&&!ns(e)}function Ao(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==o||e in je(n)))}}function jo(e,t,n){return t=_n(t===o?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=_n(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=r(t+1);++o<t;)u[o]=i[o];return u[t]=n(s),Ct(e,this,u)}}function xo(e,t){return t.length<2?e:kr(e,ii(t,0,-1))}function Po(e,t){for(var n=e.length,r=bn(t.length,n),i=Pi(e);r--;){var a=t[r];e[r]=bo(a,n)?i[a]:o}return e}function Lo(e,t){if("__proto__"!=t)return e[t]}var Oo=Do(ti),Ro=vt||function(e,t){return pt.setTimeout(e,t)},Io=Do(ni);function Mo(e,t,n){var r=t+"";return Io(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return jt(y,(function(n){var r="_."+n[0];t&n[1]&&!Ot(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(de);return t?t[1].split(fe):[]}(r),n)))}function Do(e){var t=0,n=0;return function(){var r=Sn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Uo(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Xr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Bo=function(e){var t=Da(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ie,(function(e,n,r,i){t.push(r?i.replace(pe,"$1"):n||e)})),t}));function No(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Vo(e){if(e instanceof qn)return e.clone();var t=new Gn(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var zo=Zr((function(e,t){return Xa(e)?fr(e,yr(t,1,Xa,!0)):[]})),Ho=Zr((function(e,t){var n=Jo(t);return Xa(n)&&(n=o),Xa(e)?fr(e,yr(t,1,Xa,!0),lo(n,2)):[]})),Go=Zr((function(e,t){var n=Jo(t);return Xa(n)&&(n=o),Xa(e)?fr(e,yr(t,1,Xa,!0),o,n):[]}));function qo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=_n(r+i,0)),Vt(e,lo(t,3),i)}function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ms(n),i=n<0?_n(r+i,0):bn(i,r-1)),Vt(e,lo(t,3),i,!0)}function $o(e){return(null==e?0:e.length)?yr(e,1):[]}function Ko(e){return e&&e.length?e[0]:o}var Xo=Zr((function(e){var t=It(e,yi);return t.length&&t[0]===e[0]?Pr(t):[]})),Yo=Zr((function(e){var t=Jo(e),n=It(e,yi);return t===Jo(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Pr(n,lo(t,2)):[]})),Zo=Zr((function(e){var t=Jo(e),n=It(e,yi);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Pr(n,o,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Qo=Zr(ea);function ea(e,t){return e&&e.length&&t&&t.length?$r(e,t):e}var ta=ro((function(e,t){var n=null==e?0:e.length,r=sr(e,t);return Kr(e,It(t,(function(e){return bo(e,n)?+e:e})).sort(Ai)),r}));function na(e){return null==e?e:kn.call(e)}var ra=Zr((function(e){return di(yr(e,1,Xa,!0))})),ia=Zr((function(e){var t=Jo(e);return Xa(t)&&(t=o),di(yr(e,1,Xa,!0),lo(t,2))})),oa=Zr((function(e){var t=Jo(e);return t="function"==typeof t?t:o,di(yr(e,1,Xa,!0),o,t)}));function aa(e){if(!e||!e.length)return[];var t=0;return e=Lt(e,(function(e){if(Xa(e))return t=_n(e.length,t),!0})),Yt(t,(function(t){return It(e,Wt(t))}))}function sa(e,t){if(!e||!e.length)return[];var n=aa(e);return null==t?n:It(n,(function(e){return Ct(t,o,e)}))}var ua=Zr((function(e,t){return Xa(e)?fr(e,t):[]})),la=Zr((function(e){return mi(Lt(e,Xa))})),ca=Zr((function(e){var t=Jo(e);return Xa(t)&&(t=o),mi(Lt(e,Xa),lo(t,2))})),da=Zr((function(e){var t=Jo(e);return t="function"==typeof t?t:o,mi(Lt(e,Xa),o,t)})),fa=Zr(aa);var ha=Zr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,sa(e,n)}));function pa(e){var t=Vn(e);return t.__chain__=!0,t}function va(e,t){return t(e)}var ma=ro((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof qn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:va,args:[i],thisArg:o}),new Gn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var ga=Oi((function(e,t,n){Ue.call(e,n)?++e[n]:ar(e,n,1)}));var ya=Ni(qo),_a=Ni(Wo);function ba(e,t){return(Wa(e)?jt:hr)(e,lo(t,3))}function Sa(e,t){return(Wa(e)?xt:pr)(e,lo(t,3))}var Ta=Oi((function(e,t,n){Ue.call(e,n)?e[n].push(t):ar(e,n,[t])}));var wa=Zr((function(e,t,n){var i=-1,o="function"==typeof t,a=Ka(e)?r(e.length):[];return hr(e,(function(e){a[++i]=o?Ct(t,e,n):Lr(e,t,n)})),a})),ka=Oi((function(e,t,n){ar(e,n,t)}));function Ea(e,t){return(Wa(e)?It:Fr)(e,lo(t,3))}var Ca=Oi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Aa=Zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&So(e,t[0],t[1])?t=[]:n>2&&So(t[0],t[1],t[2])&&(t=[t[0]]),qr(e,yr(t,1),[])})),ja=ht||function(){return pt.Date.now()};function xa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ji(e,f,o,o,o,o,t)}function Pa(e,t){var n;if("function"!=typeof t)throw new Le(a);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var La=Zr((function(e,t,n){var r=1;if(n.length){var i=cn(n,uo(La));r|=c}return Ji(e,r,t,n,i)})),Oa=Zr((function(e,t,n){var r=3;if(n.length){var i=cn(n,uo(Oa));r|=c}return Ji(t,r,e,n,i)}));function Ra(e,t,n){var r,i,s,u,l,c,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new Le(a);function v(t){var n=r,a=i;return r=i=o,d=t,u=e.apply(a,n)}function m(e){return d=e,l=Ro(y,t),f?v(e):u}function g(e){var n=e-c;return c===o||n>=t||n<0||h&&e-d>=s}function y(){var e=ja();if(g(e))return _(e);l=Ro(y,function(e){var n=t-(e-c);return h?bn(n,s-(e-d)):n}(e))}function _(e){return l=o,p&&r?v(e):(r=i=o,u)}function b(){var e=ja(),n=g(e);if(r=arguments,i=this,c=e,n){if(l===o)return m(c);if(h)return l=Ro(y,t),v(c)}return l===o&&(l=Ro(y,t)),u}return t=ys(t)||0,ns(n)&&(f=!!n.leading,s=(h="maxWait"in n)?_n(ys(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){l!==o&&wi(l),d=0,r=c=i=l=o},b.flush=function(){return l===o?u:_(ja())},b}var Ia=Zr((function(e,t){return dr(e,1,t)})),Ma=Zr((function(e,t,n){return dr(e,ys(t)||0,n)}));function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(a);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Da.Cache||Kn),n}function Ua(e){if("function"!=typeof e)throw new Le(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=Kn;var Ba=Si((function(e,t){var n=(t=1==t.length&&Wa(t[0])?It(t[0],Zt(lo())):It(yr(t,1),Zt(lo()))).length;return Zr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Ct(e,this,r)}))})),Na=Zr((function(e,t){var n=cn(t,uo(Na));return Ji(e,c,o,t,n)})),Fa=Zr((function(e,t){var n=cn(t,uo(Fa));return Ji(e,d,o,t,n)})),Va=ro((function(e,t){return Ji(e,h,o,o,o,t)}));function za(e,t){return e===t||e!=e&&t!=t}var Ha=$i(Ar),Ga=$i((function(e,t){return e>=t})),qa=Or(function(){return arguments}())?Or:function(e){return rs(e)&&Ue.call(e,"callee")&&!Ye.call(e,"callee")},Wa=r.isArray,$a=bt?Zt(bt):function(e){return rs(e)&&Cr(e)==M};function Ka(e){return null!=e&&ts(e.length)&&!Qa(e)}function Xa(e){return rs(e)&&Ka(e)}var Ya=Nt||yu,Za=St?Zt(St):function(e){return rs(e)&&Cr(e)==T};function Ja(e){if(!rs(e))return!1;var t=Cr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function Qa(e){if(!ns(e))return!1;var t=Cr(e);return t==k||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==ms(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=v}function ns(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var is=Tt?Zt(Tt):function(e){return rs(e)&&mo(e)==C};function os(e){return"number"==typeof e||rs(e)&&Cr(e)==A}function as(e){if(!rs(e)||Cr(e)!=j)return!1;var t=Ke(e);if(null===t)return!0;var n=Ue.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Ve}var ss=wt?Zt(wt):function(e){return rs(e)&&Cr(e)==P};var us=kt?Zt(kt):function(e){return rs(e)&&mo(e)==L};function ls(e){return"string"==typeof e||!Wa(e)&&rs(e)&&Cr(e)==O}function cs(e){return"symbol"==typeof e||rs(e)&&Cr(e)==R}var ds=Et?Zt(Et):function(e){return rs(e)&&ts(e.length)&&!!st[Cr(e)]};var fs=$i(Nr),hs=$i((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(Ka(e))return ls(e)?pn(e):Pi(e);if(tt&&e[tt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[tt]());var t=mo(e);return(t==C?un:t==L?dn:zs)(e)}function vs(e){return e?(e=ys(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=vs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?ur(ms(e),0,g):0}function ys(e){if("number"==typeof e)return e;if(cs(e))return m;if(ns(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ns(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(se,"");var n=ye.test(e);return n||be.test(e)?dt(e.slice(2),n?2:8):ge.test(e)?m:+e}function _s(e){return Li(e,Is(e))}function bs(e){return null==e?"":ci(e)}var Ss=Ri((function(e,t){if(Eo(t)||Ka(t))Li(t,Rs(t),e);else for(var n in t)Ue.call(t,n)&&nr(e,n,t[n])})),Ts=Ri((function(e,t){Li(t,Is(t),e)})),ws=Ri((function(e,t,n,r){Li(t,Is(t),e,r)})),ks=Ri((function(e,t,n,r){Li(t,Rs(t),e,r)})),Es=ro(sr);var Cs=Zr((function(e,t){e=je(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&So(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=Is(a),u=-1,l=s.length;++u<l;){var c=s[u],d=e[c];(d===o||za(d,Ie[c])&&!Ue.call(e,c))&&(e[c]=a[c])}return e})),As=Zr((function(e){return e.push(o,eo),Ct(Ds,o,e)}));function js(e,t,n){var r=null==e?o:kr(e,t);return r===o?n:r}function xs(e,t){return null!=e&&go(e,t,xr)}var Ps=zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n}),nu(ou)),Ls=zi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ue.call(e,t)?e[t].push(n):e[t]=[n]}),lo),Os=Zr(Lr);function Rs(e){return Ka(e)?Zn(e):Ur(e)}function Is(e){return Ka(e)?Zn(e,!0):Br(e)}var Ms=Ri((function(e,t,n){Hr(e,t,n)})),Ds=Ri((function(e,t,n,r){Hr(e,t,n,r)})),Us=ro((function(e,t){var n={};if(null==e)return n;var r=!1;t=It(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Li(e,oo(e),n),r&&(n=lr(n,7,to));for(var i=t.length;i--;)fi(n,t[i]);return n}));var Bs=ro((function(e,t){return null==e?{}:function(e,t){return Wr(e,t,(function(t,n){return xs(e,n)}))}(e,t)}));function Ns(e,t){if(null==e)return{};var n=It(oo(e),(function(e){return[e]}));return t=lo(t),Wr(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Zi(Rs),Vs=Zi(Is);function zs(e){return null==e?[]:Jt(e,Rs(e))}var Hs=Ui((function(e,t,n){return t=t.toLowerCase(),e+(n?Gs(t):t)}));function Gs(e){return Js(bs(e).toLowerCase())}function qs(e){return(e=bs(e))&&e.replace(Te,rn).replace(et,"")}var Ws=Ui((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$s=Ui((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ks=Di("toLowerCase");var Xs=Ui((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ys=Ui((function(e,t,n){return e+(n?" ":"")+Js(t)}));var Zs=Ui((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Js=Di("toUpperCase");function Qs(e,t,n){return e=bs(e),(t=n?o:t)===o?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(he)||[]}(e):e.match(t)||[]}var eu=Zr((function(e,t){try{return Ct(e,o,t)}catch(e){return Ja(e)?e:new Ee(e)}})),tu=ro((function(e,t){return jt(t,(function(t){t=No(t),ar(e,t,La(e[t],e))})),e}));function nu(e){return function(){return e}}var ru=Fi(),iu=Fi(!0);function ou(e){return e}function au(e){return Dr("function"==typeof e?e:lr(e,1))}var su=Zr((function(e,t){return function(n){return Lr(n,e,t)}})),uu=Zr((function(e,t){return function(n){return Lr(e,n,t)}}));function lu(e,t,n){var r=Rs(t),i=wr(t,r);null!=n||ns(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=wr(t,Rs(t)));var o=!(ns(n)&&"chain"in n&&!n.chain),a=Qa(e);return jt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Pi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Mt([this.value()],arguments))})})),e}function cu(){}var du=Gi(It),fu=Gi(Pt),hu=Gi(Bt);function pu(e){return To(e)?Wt(No(e)):function(e){return function(t){return kr(t,e)}}(e)}var vu=Wi(),mu=Wi(!0);function gu(){return[]}function yu(){return!1}var _u=Hi((function(e,t){return e+t}),0),bu=Xi("ceil"),Su=Hi((function(e,t){return e/t}),1),Tu=Xi("floor");var wu,ku=Hi((function(e,t){return e*t}),1),Eu=Xi("round"),Cu=Hi((function(e,t){return e-t}),0);return Vn.after=function(e,t){if("function"!=typeof t)throw new Le(a);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Vn.ary=xa,Vn.assign=Ss,Vn.assignIn=Ts,Vn.assignInWith=ws,Vn.assignWith=ks,Vn.at=Es,Vn.before=Pa,Vn.bind=La,Vn.bindAll=tu,Vn.bindKey=Oa,Vn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Vn.chain=pa,Vn.chunk=function(e,t,n){t=(n?So(e,t,n):t===o)?1:_n(ms(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(mt(i/t));a<i;)u[s++]=ii(e,a,a+=t);return u},Vn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Vn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Mt(Wa(n)?Pi(n):[n],yr(t,1))},Vn.cond=function(e){var t=null==e?0:e.length,n=lo();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Le(a);return[n(e[0]),e[1]]})):[],Zr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Ct(i[0],this,n))return Ct(i[1],this,n)}}))},Vn.conforms=function(e){return function(e){var t=Rs(e);return function(n){return cr(n,e,t)}}(lr(e,1))},Vn.constant=nu,Vn.countBy=ga,Vn.create=function(e,t){var n=zn(e);return null==t?n:or(n,t)},Vn.curry=function e(t,n,r){var i=Ji(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Vn.curryRight=function e(t,n,r){var i=Ji(t,l,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Vn.debounce=Ra,Vn.defaults=Cs,Vn.defaultsDeep=As,Vn.defer=Ia,Vn.delay=Ma,Vn.difference=zo,Vn.differenceBy=Ho,Vn.differenceWith=Go,Vn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,(t=n||t===o?1:ms(t))<0?0:t,r):[]},Vn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,0,(t=r-(t=n||t===o?1:ms(t)))<0?0:t):[]},Vn.dropRightWhile=function(e,t){return e&&e.length?pi(e,lo(t,3),!0,!0):[]},Vn.dropWhile=function(e,t){return e&&e.length?pi(e,lo(t,3),!0):[]},Vn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&So(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ms(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ms(r))<0&&(r+=i),r=n>r?0:gs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Vn.filter=function(e,t){return(Wa(e)?Lt:gr)(e,lo(t,3))},Vn.flatMap=function(e,t){return yr(Ea(e,t),1)},Vn.flatMapDeep=function(e,t){return yr(Ea(e,t),p)},Vn.flatMapDepth=function(e,t,n){return n=n===o?1:ms(n),yr(Ea(e,t),n)},Vn.flatten=$o,Vn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,p):[]},Vn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===o?1:ms(t)):[]},Vn.flip=function(e){return Ji(e,512)},Vn.flow=ru,Vn.flowRight=iu,Vn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Vn.functions=function(e){return null==e?[]:wr(e,Rs(e))},Vn.functionsIn=function(e){return null==e?[]:wr(e,Is(e))},Vn.groupBy=Ta,Vn.initial=function(e){return(null==e?0:e.length)?ii(e,0,-1):[]},Vn.intersection=Xo,Vn.intersectionBy=Yo,Vn.intersectionWith=Zo,Vn.invert=Ps,Vn.invertBy=Ls,Vn.invokeMap=wa,Vn.iteratee=au,Vn.keyBy=ka,Vn.keys=Rs,Vn.keysIn=Is,Vn.map=Ea,Vn.mapKeys=function(e,t){var n={};return t=lo(t,3),Sr(e,(function(e,r,i){ar(n,t(e,r,i),e)})),n},Vn.mapValues=function(e,t){var n={};return t=lo(t,3),Sr(e,(function(e,r,i){ar(n,r,t(e,r,i))})),n},Vn.matches=function(e){return Vr(lr(e,1))},Vn.matchesProperty=function(e,t){return zr(e,lr(t,1))},Vn.memoize=Da,Vn.merge=Ms,Vn.mergeWith=Ds,Vn.method=su,Vn.methodOf=uu,Vn.mixin=lu,Vn.negate=Ua,Vn.nthArg=function(e){return e=ms(e),Zr((function(t){return Gr(t,e)}))},Vn.omit=Us,Vn.omitBy=function(e,t){return Ns(e,Ua(lo(t)))},Vn.once=function(e){return Pa(2,e)},Vn.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?o:n)||(n=null==n?[]:[n]),qr(e,t,n))},Vn.over=du,Vn.overArgs=Ba,Vn.overEvery=fu,Vn.overSome=hu,Vn.partial=Na,Vn.partialRight=Fa,Vn.partition=Ca,Vn.pick=Bs,Vn.pickBy=Ns,Vn.property=pu,Vn.propertyOf=function(e){return function(t){return null==e?o:kr(e,t)}},Vn.pull=Qo,Vn.pullAll=ea,Vn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,lo(n,2)):e},Vn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$r(e,t,o,n):e},Vn.pullAt=ta,Vn.range=vu,Vn.rangeRight=mu,Vn.rearg=Va,Vn.reject=function(e,t){return(Wa(e)?Lt:gr)(e,Ua(lo(t,3)))},Vn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=lo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Kr(e,i),n},Vn.rest=function(e,t){if("function"!=typeof e)throw new Le(a);return Zr(e,t=t===o?t:ms(t))},Vn.reverse=na,Vn.sampleSize=function(e,t,n){return t=(n?So(e,t,n):t===o)?1:ms(t),(Wa(e)?Qn:Qr)(e,t)},Vn.set=function(e,t,n){return null==e?e:ei(e,t,n)},Vn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:ei(e,t,n,r)},Vn.shuffle=function(e){return(Wa(e)?er:ri)(e)},Vn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&So(e,t,n)?(t=0,n=r):(t=null==t?0:ms(t),n=n===o?r:ms(n)),ii(e,t,n)):[]},Vn.sortBy=Aa,Vn.sortedUniq=function(e){return e&&e.length?ui(e):[]},Vn.sortedUniqBy=function(e,t){return e&&e.length?ui(e,lo(t,2)):[]},Vn.split=function(e,t,n){return n&&"number"!=typeof n&&So(e,t,n)&&(t=n=o),(n=n===o?g:n>>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!ss(t))&&!(t=ci(t))&&sn(e)?Ti(pn(e),0,n):e.split(t,n):[]},Vn.spread=function(e,t){if("function"!=typeof e)throw new Le(a);return t=null==t?0:_n(ms(t),0),Zr((function(n){var r=n[t],i=Ti(n,0,t);return r&&Mt(i,r),Ct(e,this,i)}))},Vn.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Vn.take=function(e,t,n){return e&&e.length?ii(e,0,(t=n||t===o?1:ms(t))<0?0:t):[]},Vn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,(t=r-(t=n||t===o?1:ms(t)))<0?0:t,r):[]},Vn.takeRightWhile=function(e,t){return e&&e.length?pi(e,lo(t,3),!1,!0):[]},Vn.takeWhile=function(e,t){return e&&e.length?pi(e,lo(t,3)):[]},Vn.tap=function(e,t){return t(e),e},Vn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Le(a);return ns(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ra(e,t,{leading:r,maxWait:t,trailing:i})},Vn.thru=va,Vn.toArray=ps,Vn.toPairs=Fs,Vn.toPairsIn=Vs,Vn.toPath=function(e){return Wa(e)?It(e,No):cs(e)?[e]:Pi(Bo(bs(e)))},Vn.toPlainObject=_s,Vn.transform=function(e,t,n){var r=Wa(e),i=r||Ya(e)||ds(e);if(t=lo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ns(e)&&Qa(o)?zn(Ke(e)):{}}return(i?jt:Sr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Vn.unary=function(e){return xa(e,1)},Vn.union=ra,Vn.unionBy=ia,Vn.unionWith=oa,Vn.uniq=function(e){return e&&e.length?di(e):[]},Vn.uniqBy=function(e,t){return e&&e.length?di(e,lo(t,2)):[]},Vn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?di(e,o,t):[]},Vn.unset=function(e,t){return null==e||fi(e,t)},Vn.unzip=aa,Vn.unzipWith=sa,Vn.update=function(e,t,n){return null==e?e:hi(e,t,_i(n))},Vn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:hi(e,t,_i(n),r)},Vn.values=zs,Vn.valuesIn=function(e){return null==e?[]:Jt(e,Is(e))},Vn.without=ua,Vn.words=Qs,Vn.wrap=function(e,t){return Na(_i(t),e)},Vn.xor=la,Vn.xorBy=ca,Vn.xorWith=da,Vn.zip=fa,Vn.zipObject=function(e,t){return gi(e||[],t||[],nr)},Vn.zipObjectDeep=function(e,t){return gi(e||[],t||[],ei)},Vn.zipWith=ha,Vn.entries=Fs,Vn.entriesIn=Vs,Vn.extend=Ts,Vn.extendWith=ws,lu(Vn,Vn),Vn.add=_u,Vn.attempt=eu,Vn.camelCase=Hs,Vn.capitalize=Gs,Vn.ceil=bu,Vn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=ys(n))==n?n:0),t!==o&&(t=(t=ys(t))==t?t:0),ur(ys(e),t,n)},Vn.clone=function(e){return lr(e,4)},Vn.cloneDeep=function(e){return lr(e,5)},Vn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:o)},Vn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:o)},Vn.conformsTo=function(e,t){return null==t||cr(e,t,Rs(t))},Vn.deburr=qs,Vn.defaultTo=function(e,t){return null==e||e!=e?t:e},Vn.divide=Su,Vn.endsWith=function(e,t,n){e=bs(e),t=ci(t);var r=e.length,i=n=n===o?r:ur(ms(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Vn.eq=za,Vn.escape=function(e){return(e=bs(e))&&J.test(e)?e.replace(Y,on):e},Vn.escapeRegExp=function(e){return(e=bs(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Vn.every=function(e,t,n){var r=Wa(e)?Pt:vr;return n&&So(e,t,n)&&(t=o),r(e,lo(t,3))},Vn.find=ya,Vn.findIndex=qo,Vn.findKey=function(e,t){return Ft(e,lo(t,3),Sr)},Vn.findLast=_a,Vn.findLastIndex=Wo,Vn.findLastKey=function(e,t){return Ft(e,lo(t,3),Tr)},Vn.floor=Tu,Vn.forEach=ba,Vn.forEachRight=Sa,Vn.forIn=function(e,t){return null==e?e:_r(e,lo(t,3),Is)},Vn.forInRight=function(e,t){return null==e?e:br(e,lo(t,3),Is)},Vn.forOwn=function(e,t){return e&&Sr(e,lo(t,3))},Vn.forOwnRight=function(e,t){return e&&Tr(e,lo(t,3))},Vn.get=js,Vn.gt=Ha,Vn.gte=Ga,Vn.has=function(e,t){return null!=e&&go(e,t,jr)},Vn.hasIn=xs,Vn.head=Ko,Vn.identity=ou,Vn.includes=function(e,t,n,r){e=Ka(e)?e:zs(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=_n(i+n,0)),ls(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&zt(e,t,n)>-1},Vn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ms(n);return i<0&&(i=_n(r+i,0)),zt(e,t,i)},Vn.inRange=function(e,t,n){return t=vs(t),n===o?(n=t,t=0):n=vs(n),function(e,t,n){return e>=bn(t,n)&&e<_n(t,n)}(e=ys(e),t,n)},Vn.invoke=Os,Vn.isArguments=qa,Vn.isArray=Wa,Vn.isArrayBuffer=$a,Vn.isArrayLike=Ka,Vn.isArrayLikeObject=Xa,Vn.isBoolean=function(e){return!0===e||!1===e||rs(e)&&Cr(e)==S},Vn.isBuffer=Ya,Vn.isDate=Za,Vn.isElement=function(e){return rs(e)&&1===e.nodeType&&!as(e)},Vn.isEmpty=function(e){if(null==e)return!0;if(Ka(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||ds(e)||qa(e)))return!e.length;var t=mo(e);if(t==C||t==L)return!e.size;if(Eo(e))return!Ur(e).length;for(var n in e)if(Ue.call(e,n))return!1;return!0},Vn.isEqual=function(e,t){return Rr(e,t)},Vn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Rr(e,t,o,n):!!r},Vn.isError=Ja,Vn.isFinite=function(e){return"number"==typeof e&&$t(e)},Vn.isFunction=Qa,Vn.isInteger=es,Vn.isLength=ts,Vn.isMap=is,Vn.isMatch=function(e,t){return e===t||Ir(e,t,fo(t))},Vn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ir(e,t,fo(t),n)},Vn.isNaN=function(e){return os(e)&&e!=+e},Vn.isNative=function(e){if(ko(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mr(e)},Vn.isNil=function(e){return null==e},Vn.isNull=function(e){return null===e},Vn.isNumber=os,Vn.isObject=ns,Vn.isObjectLike=rs,Vn.isPlainObject=as,Vn.isRegExp=ss,Vn.isSafeInteger=function(e){return es(e)&&e>=-9007199254740991&&e<=v},Vn.isSet=us,Vn.isString=ls,Vn.isSymbol=cs,Vn.isTypedArray=ds,Vn.isUndefined=function(e){return e===o},Vn.isWeakMap=function(e){return rs(e)&&mo(e)==I},Vn.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==Cr(e)},Vn.join=function(e,t){return null==e?"":gn.call(e,t)},Vn.kebabCase=Ws,Vn.last=Jo,Vn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ms(n))<0?_n(r+i,0):bn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Vt(e,Gt,i,!0)},Vn.lowerCase=$s,Vn.lowerFirst=Ks,Vn.lt=fs,Vn.lte=hs,Vn.max=function(e){return e&&e.length?mr(e,ou,Ar):o},Vn.maxBy=function(e,t){return e&&e.length?mr(e,lo(t,2),Ar):o},Vn.mean=function(e){return qt(e,ou)},Vn.meanBy=function(e,t){return qt(e,lo(t,2))},Vn.min=function(e){return e&&e.length?mr(e,ou,Nr):o},Vn.minBy=function(e,t){return e&&e.length?mr(e,lo(t,2),Nr):o},Vn.stubArray=gu,Vn.stubFalse=yu,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=ku,Vn.nth=function(e,t){return e&&e.length?Gr(e,ms(t)):o},Vn.noConflict=function(){return pt._===this&&(pt._=ze),this},Vn.noop=cu,Vn.now=ja,Vn.pad=function(e,t,n){e=bs(e);var r=(t=ms(t))?hn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return qi(yt(i),n)+e+qi(mt(i),n)},Vn.padEnd=function(e,t,n){e=bs(e);var r=(t=ms(t))?hn(e):0;return t&&r<t?e+qi(t-r,n):e},Vn.padStart=function(e,t,n){e=bs(e);var r=(t=ms(t))?hn(e):0;return t&&r<t?qi(t-r,n)+e:e},Vn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),Tn(bs(e).replace(ue,""),t||0)},Vn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&So(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=vs(e),t===o?(t=e,e=0):t=vs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=wn();return bn(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return Xr(e,t)},Vn.reduce=function(e,t,n){var r=Wa(e)?Dt:Kt,i=arguments.length<3;return r(e,lo(t,4),n,i,hr)},Vn.reduceRight=function(e,t,n){var r=Wa(e)?Ut:Kt,i=arguments.length<3;return r(e,lo(t,4),n,i,pr)},Vn.repeat=function(e,t,n){return t=(n?So(e,t,n):t===o)?1:ms(t),Yr(bs(e),t)},Vn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Vn.result=function(e,t,n){var r=-1,i=(t=bi(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[No(t[r])];a===o&&(r=i,a=n),e=Qa(a)?a.call(e):a}return e},Vn.round=Eu,Vn.runInContext=e,Vn.sample=function(e){return(Wa(e)?Jn:Jr)(e)},Vn.size=function(e){if(null==e)return 0;if(Ka(e))return ls(e)?hn(e):e.length;var t=mo(e);return t==C||t==L?e.size:Ur(e).length},Vn.snakeCase=Xs,Vn.some=function(e,t,n){var r=Wa(e)?Bt:oi;return n&&So(e,t,n)&&(t=o),r(e,lo(t,3))},Vn.sortedIndex=function(e,t){return ai(e,t)},Vn.sortedIndexBy=function(e,t,n){return si(e,t,lo(n,2))},Vn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ai(e,t);if(r<n&&za(e[r],t))return r}return-1},Vn.sortedLastIndex=function(e,t){return ai(e,t,!0)},Vn.sortedLastIndexBy=function(e,t,n){return si(e,t,lo(n,2),!0)},Vn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=ai(e,t,!0)-1;if(za(e[n],t))return n}return-1},Vn.startCase=Ys,Vn.startsWith=function(e,t,n){return e=bs(e),n=null==n?0:ur(ms(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Vn.subtract=Cu,Vn.sum=function(e){return e&&e.length?Xt(e,ou):0},Vn.sumBy=function(e,t){return e&&e.length?Xt(e,lo(t,2)):0},Vn.template=function(e,t,n){var r=Vn.templateSettings;n&&So(e,t,n)&&(t=o),e=bs(e),t=ws({},t,r,Qi);var i,a,s=ws({},t.imports,r.imports,Qi),u=Rs(s),l=Jt(s,u),c=0,d=t.interpolate||we,f="__p += '",h=xe((t.escape||we).source+"|"+d.source+"|"+(d===te?ve:we).source+"|"+(t.evaluate||we).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++at+"]")+"\n";e.replace(h,(function(t,n,r,o,s,u){return r||(r=o),f+=e.slice(c,u).replace(ke,an),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),f+="';\n";var v=t.variable;v||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(W,""):f).replace($,"$1").replace(K,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=eu((function(){return Ce(u,p+"return "+f).apply(o,l)}));if(m.source=f,Ja(m))throw m;return m},Vn.times=function(e,t){if((e=ms(e))<1||e>v)return[];var n=g,r=bn(e,g);t=lo(t),e-=g;for(var i=Yt(r,t);++n<e;)t(n);return i},Vn.toFinite=vs,Vn.toInteger=ms,Vn.toLength=gs,Vn.toLower=function(e){return bs(e).toLowerCase()},Vn.toNumber=ys,Vn.toSafeInteger=function(e){return e?ur(ms(e),-9007199254740991,v):0===e?e:0},Vn.toString=bs,Vn.toUpper=function(e){return bs(e).toUpperCase()},Vn.trim=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.replace(se,"");if(!e||!(t=ci(t)))return e;var r=pn(e),i=pn(t);return Ti(r,en(r,i),tn(r,i)+1).join("")},Vn.trimEnd=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.replace(le,"");if(!e||!(t=ci(t)))return e;var r=pn(e);return Ti(r,0,tn(r,pn(t))+1).join("")},Vn.trimStart=function(e,t,n){if((e=bs(e))&&(n||t===o))return e.replace(ue,"");if(!e||!(t=ci(t)))return e;var r=pn(e);return Ti(r,en(r,pn(t))).join("")},Vn.truncate=function(e,t){var n=30,r="...";if(ns(t)){var i="separator"in t?t.separator:i;n="length"in t?ms(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=bs(e)).length;if(sn(e)){var s=pn(e);a=s.length}if(n>=a)return e;var u=n-hn(r);if(u<1)return r;var l=s?Ti(s,0,u).join(""):e.slice(0,u);if(i===o)return l+r;if(s&&(u+=l.length-u),ss(i)){if(e.slice(u).search(i)){var c,d=l;for(i.global||(i=xe(i.source,bs(me.exec(i))+"g")),i.lastIndex=0;c=i.exec(d);)var f=c.index;l=l.slice(0,f===o?u:f)}}else if(e.indexOf(ci(i),u)!=u){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+r},Vn.unescape=function(e){return(e=bs(e))&&Z.test(e)?e.replace(X,vn):e},Vn.uniqueId=function(e){var t=++Be;return bs(e)+t},Vn.upperCase=Zs,Vn.upperFirst=Js,Vn.each=ba,Vn.eachRight=Sa,Vn.first=Ko,lu(Vn,(wu={},Sr(Vn,(function(e,t){Ue.call(Vn.prototype,t)||(wu[t]=e)})),wu),{chain:!1}),Vn.VERSION="4.17.11",jt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Vn[e].placeholder=Vn})),jt(["drop","take"],(function(e,t){qn.prototype[e]=function(n){n=n===o?1:_n(ms(n),0);var r=this.__filtered__&&!t?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},qn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),jt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;qn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:lo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),jt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");qn.prototype[e]=function(){return this[n](1).value()[0]}})),jt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");qn.prototype[e]=function(){return this.__filtered__?new qn(this):this[n](1)}})),qn.prototype.compact=function(){return this.filter(ou)},qn.prototype.find=function(e){return this.filter(e).head()},qn.prototype.findLast=function(e){return this.reverse().find(e)},qn.prototype.invokeMap=Zr((function(e,t){return"function"==typeof e?new qn(this):this.map((function(n){return Lr(n,e,t)}))})),qn.prototype.reject=function(e){return this.filter(Ua(lo(e)))},qn.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new qn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},qn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qn.prototype.toArray=function(){return this.take(g)},Sr(qn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Vn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Vn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof qn,l=s[0],c=u||Wa(t),d=function(e){var t=i.apply(Vn,Mt([e],s));return r&&f?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&c){t=v?t:new qn(this);var m=e.apply(t,s);return m.__actions__.push({func:va,args:[d],thisArg:o}),new Gn(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),jt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Vn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Wa(i)?i:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),Sr(qn.prototype,(function(e,t){var n=Vn[t];if(n){var r=n.name+"";(On[r]||(On[r]=[])).push({name:t,func:n})}})),On[Vi(o,2).name]=[{name:"wrapper",func:o}],qn.prototype.clone=function(){var e=new qn(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},qn.prototype.reverse=function(){if(this.__filtered__){var e=new qn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=_n(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,d=c.length,f=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return vi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[l+=t];++v<d;){var g=c[v],y=g.iteratee,_=g.type,b=y(m);if(2==_)m=b;else if(!b){if(1==_)continue e;break e}}p[f++]=m}return p},Vn.prototype.at=ma,Vn.prototype.chain=function(){return pa(this)},Vn.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Vn.prototype.next=function(){this.__values__===o&&(this.__values__=ps(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Vn.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=Vo(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Vn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qn){var t=e;return this.__actions__.length&&(t=new qn(this)),(t=t.reverse()).__actions__.push({func:va,args:[na],thisArg:o}),new Gn(t,this.__chain__)}return this.thru(na)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return vi(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,tt&&(Vn.prototype[tt]=function(){return this}),Vn}();pt._=mn,(i=function(){return mn}.call(t,n,t,r))===o||(r.exports=i)}).call(this)}).call(this,n("UywP"),n("qrga")(e))},wlCu:function(e,t,n){n("0GvP")("WeakMap")},wsYS:function(e,t,n){"use strict";n("a2+z")("bold",(function(e){return function(){return e(this,"b","","")}}))},wyXM:function(e,t,n){var r=n("6Zvs"),i=n("iJ6w");r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},wzGP:function(e,t,n){var r=n("6Zvs");r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},"x/d9":function(e,t,n){var r=n("6Zvs");r(r.S,"Math",{sign:n("9Zdl")})},"xG+P":function(e,t,n){"use strict";n("v3OP");var r=n("hOgw"),i=n("Bl3t"),o=n("CSYH"),a=n("OrC7"),s=n("g5pV"),u=n("A1Nh"),l=s("species"),c=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=s(e),h=!o((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),p=h?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[l]=function(){return n}),n[f](""),!t})):void 0;if(!h||!p||"replace"===e&&!c||"split"===e&&!d){var v=/./[f],m=n(a,f,""[e],(function(e,t,n,r,i){return t.exec===u?h&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),g=m[0],y=m[1];r(String.prototype,e,g),i(RegExp.prototype,f,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},xcso:function(e,t,n){"use strict";var r=n("mN7E"),i=n("Cyja");e.exports=n("C8qm")("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},xfeU:function(e,t,n){var r=n("6Zvs"),i=n("7ewW");r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},"y/cC":function(e,t,n){var r=n("6Zvs"),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},y4VI:function(e,t,n){var r=n("IS5P"),i=n("IBxK");e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},yBXD:function(e,t,n){var r=n("6Zvs");r(r.G,{global:n("CzRT")})},yBh6:function(e,t,n){var r=n("CzRT"),i=n("6Zvs"),o=n("rrjf"),a=[].slice,s=/MSIE .\./.test(o),u=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&a.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},yppY:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("NHEB"),o=[].join;r(r.P+r.F*(n("G5bc")!=Object||!n("lbZd")(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},yr43:function(e,t,n){var r=n("6Zvs"),i=n("4P8B");i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},z8K7:function(e,t,n){(function(t){!function(t){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=b;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",v={},m={};m[a]=function(){return this};var g=Object.getPrototypeOf,y=g&&g(g(L([])));y&&y!==r&&i.call(y,a)&&(m=y);var _=k.prototype=T.prototype=Object.create(m);w.prototype=_.constructor=k,k.constructor=w,k[u]=w.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(_),e},c.awrap=function(e){return{__await:e}},E(C.prototype),C.prototype[s]=function(){return this},c.AsyncIterator=C,c.async=function(e,t,n,r){var i=new C(b(e,t,n,r));return c.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},E(_),_[u]="Generator",_[a]=function(){return this},_.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=L,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return s.type="throw",s.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:L(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function b(e,t,n,r){var i=t&&t.prototype instanceof T?t:T,o=Object.create(i.prototype),a=new P(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=A(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=S(e,t,n);if("normal"===u.type){if(r=n.done?p:f,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function S(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function T(){}function w(){}function k(){}function E(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function C(e){function n(t,r,o,a){var s=S(e[t],e,r);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&i.call(l,"__await")?Promise.resolve(l.__await).then((function(e){n("next",e,o,a)}),(function(e){n("throw",e,o,a)})):Promise.resolve(l).then((function(e){u.value=e,o(u)}),a)}a(s.arg)}var r;"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n)),this._invoke=function(e,t){function i(){return new Promise((function(r,i){n(e,t,r,i)}))}return r=r?r.then(i,i):i()}}function A(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,A(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=S(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return o.next=o}}return{next:O}}function O(){return{value:n,done:!0}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,n("UywP"))},zCeI:function(e,t,n){var r=n("6Zvs"),i=n("cyvI"),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},zgUC:function(e,t,n){"use strict";var r=n("6Zvs"),i=n("P6fP");r(r.P+r.F*!n("lbZd")([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},zqLp:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}}});
|